Ideogram 3.0 Serverless API
Ideogram 3.0 revolutionizes content creation with photorealistic text-to-image generation and diverse aesthetic styles.
1import requests
2import json
3
4url = "https://api.segmind.com/v1/ideogram-3"
5headers = {
6 "x-api-key": "YOUR_API_KEY",
7 "Content-Type": "application/json"
8}
9
10data = {
11 "prompt": "A cinematic photograph of a dark forest scene viewed from a distance. In the center, a small patch of glowing plants and flowers is illuminated by a faint, focused glow, casting a soft reflection in a still stream below. The delicate neon-style white text 'Segmind' is softly lit, creating a striking contrast against the deep shadows and mist. The surrounding dense foliage and mist create a mysterious and moody atmosphere, with strong contrast between light and shadow, enhancing the emotional and atmospheric tone.",
12 "resolution": "1024x1024",
13 "rendering_speed": "DEFAULT",
14 "magic_prompt": "AUTO",
15 "negative_prompt": "No people, no animals.",
16 "style_codes": [],
17 "style_type": "GENERAL"
18}
19
20response = requests.post(url, headers=headers, json=data)
21
22if response.status_code == 200:
23 result = response.json()
24 print(json.dumps(result, indent=2))
25else:
26 print(f"Error: {response.status_code}")
27 print(response.text) 1import requests
2import json
3
4url = "https://api.segmind.com/v1/ideogram-3"
5headers = {
6 "x-api-key": "YOUR_API_KEY",
7 "Content-Type": "application/json"
8}
9
10data = {
11 "prompt": "A cinematic photograph of a dark forest scene viewed from a distance. In the center, a small patch of glowing plants and flowers is illuminated by a faint, focused glow, casting a soft reflection in a still stream below. The delicate neon-style white text 'Segmind' is softly lit, creating a striking contrast against the deep shadows and mist. The surrounding dense foliage and mist create a mysterious and moody atmosphere, with strong contrast between light and shadow, enhancing the emotional and atmospheric tone.",
12 "resolution": "1024x1024",
13 "rendering_speed": "DEFAULT",
14 "magic_prompt": "AUTO",
15 "negative_prompt": "No people, no animals.",
16 "style_codes": [],
17 "style_type": "GENERAL"
18}
19
20response = requests.post(url, headers=headers, json=data)
21
22if response.status_code == 200:
23 result = response.json()
24 print(json.dumps(result, indent=2))
25else:
26 print(f"Error: {response.status_code}")
27 print(response.text)API Endpoint
https://api.segmind.com/v1/ideogram-3Parameters
promptrequiredstringThe prompt guides image creation; use detailed descriptions for specific results. Example: 'A futuristic cityscape at sunset.'
"A cinematic photograph of a dark forest scene viewed from a distance. In the center, a small patch of glowing plants and flowers is illuminated by a faint, focused glow, casting a soft reflection in a still stream below. The delicate neon-style white text 'Segmind' is softly lit, creating a striking contrast against the deep shadows and mist. The surrounding dense foliage and mist create a mysterious and moody atmosphere, with strong contrast between light and shadow, enhancing the emotional and atmospheric tone."aspect_ratiooptionalstringAspect ratio formats your image; select '1x1' for square, '16x9' for widescreen.
null"1x3""3x1""1x2""2x1""9x16""16x9""10x16""16x10""2x3""3x2"+5 morecolor_paletteoptionalany | anyA color palette for generation
Preset Color PaletteoptionalanynamerequiredstringCustom Color Paletteoptionalanymembersrequiredobject[]magic_promptoptionalstringMagic Prompt helps enhance descriptions; use 'ON' for complex scenes, 'OFF' for simplicity.
"AUTO""AUTO""ON""OFF"negative_promptoptionalstringExclude elements by specifying negatives; e.g., 'No people, cars'.
"No people, no animals."rendering_speedoptionalstringRendering speed affects time taken; 'TURBO' for faster, 'QUALITY' for detailed results.
"DEFAULT""TURBO""DEFAULT""QUALITY"resolutionoptionalstringResolution affects image detail; higher values for precise detail, lower for speed.
"1024x1024""512x1536""576x1408""576x1472""576x1536""640x1344""640x1408""640x1472""640x1536""704x1152""704x1216"+59 moreseedoptionalintegerThe seed ensures reproducibility; set it for consistent output, omit for variation.
nullRange: 100 - 999999style_codesoptionalstring[]Style codes customize look; use predefined codes for specific styles.
style_typeoptionalstringStyle type influences art style; choose 'REALISTIC' for lifelike, 'DESIGN' for artistic.
"GENERAL""AUTO""GENERAL""REALISTIC""DESIGN"Response Type
Returns: Text/JSON
Common Error Codes
The API returns standard HTTP status codes. Detailed error messages are provided in the response body.
Bad Request
Invalid parameters or request format
Unauthorized
Missing or invalid API key
Forbidden
Insufficient permissions
Not Found
Model or endpoint not found
Insufficient Credits
Not enough credits to process request
Rate Limited
Too many requests
Server Error
Internal server error
Bad Gateway
Service temporarily unavailable
Timeout
Request timed out