Ideogram 3.0 Serverless API

Ideogram 3.0 revolutionizes content creation with photorealistic text-to-image generation and diverse aesthetic styles.

~10.30s
$0.037 - $0.113 per generation
 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

POSThttps://api.segmind.com/v1/ideogram-3

Parameters

promptrequired
string

The prompt guides image creation; use detailed descriptions for specific results. Example: 'A futuristic cityscape at sunset.'

Default: "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_ratiooptional
string

Aspect ratio formats your image; select '1x1' for square, '16x9' for widescreen.

Default: null
Allowed values (15 total):
"1x3""3x1""1x2""2x1""9x16""16x9""10x16""16x10""2x3""3x2"+5 more
color_paletteoptional
any | any

A color palette for generation

One of:
Preset Color Paletteoptional
any
namerequired
string
Custom Color Paletteoptional
any
membersrequired
object[]
magic_promptoptional
string

Magic Prompt helps enhance descriptions; use 'ON' for complex scenes, 'OFF' for simplicity.

Default: "AUTO"
Allowed values :
"AUTO""ON""OFF"
negative_promptoptional
string

Exclude elements by specifying negatives; e.g., 'No people, cars'.

Default: "No people, no animals."
rendering_speedoptional
string

Rendering speed affects time taken; 'TURBO' for faster, 'QUALITY' for detailed results.

Default: "DEFAULT"
Allowed values :
"TURBO""DEFAULT""QUALITY"
resolutionoptional
string

Resolution affects image detail; higher values for precise detail, lower for speed.

Default: "1024x1024"
Allowed values (69 total):
"512x1536""576x1408""576x1472""576x1536""640x1344""640x1408""640x1472""640x1536""704x1152""704x1216"+59 more
seedoptional
integer

The seed ensures reproducibility; set it for consistent output, omit for variation.

Default: nullRange: 100 - 999999
style_codesoptional
string[]

Style codes customize look; use predefined codes for specific styles.

style_typeoptional
string

Style type influences art style; choose 'REALISTIC' for lifelike, 'DESIGN' for artistic.

Default: "GENERAL"
Allowed values :
"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.

400

Bad Request

Invalid parameters or request format

401

Unauthorized

Missing or invalid API key

403

Forbidden

Insufficient permissions

404

Not Found

Model or endpoint not found

406

Insufficient Credits

Not enough credits to process request

429

Rate Limited

Too many requests

500

Server Error

Internal server error

502

Bad Gateway

Service temporarily unavailable

504

Timeout

Request timed out