Ideogram Character Serverless API

Achieve perfect character consistency across multiple generations from a single reference image.

~19.94s
POST /v2/ideogram-character · submit + poll
 1# pip install "segmind>=1.1.0"
 2# export SEGMIND_API_KEY="YOUR_API_KEY"
 3import segmind
 4
 5# Async (v2): submit to the queue and block until COMPLETED.
 6# run() returns the final result dict (600s deadline, 1.0s poll by default).
 7result = segmind.run(
 8    "ideogram-character",
 9    prompt="a close up photo of a woman in a fashion magazine photoshoot",
10    resolution="512x1536",
11    style_type="Realistic",
12    aspect_ratio="16:9",
13    rendering_speed="Quality",
14    magic_prompt_option="Off",
15    character_reference_image="https://segmind-resources.s3.amazonaws.com/output/9ad9b775-7b35-4485-affe-6215a933d825-686185927069985948.png",
16)
17print(result["status"])                      # COMPLETED
18print(result.get("output"))                  # model output (e.g. media URL)
19print(result["metrics"]["inference_time"])   # server compute seconds
20
21# --- Or submit + poll manually (track request_id, control the cadence) ---
22from segmind import SegmindClient, InferenceFailed, InferenceTimeout
23
24client = SegmindClient()                      # reads SEGMIND_API_KEY
25payload = {
26    "prompt": "a close up photo of a woman in a fashion magazine photoshoot",
27    "resolution": "512x1536",
28    "style_type": "Realistic",
29    "aspect_ratio": "16:9",
30    "rendering_speed": "Quality",
31    "magic_prompt_option": "Off",
32    "character_reference_image": "https://segmind-resources.s3.amazonaws.com/output/9ad9b775-7b35-4485-affe-6215a933d825-686185927069985948.png",
33}
34job = client.submit_async("ideogram-character", **payload)
35print(job.request_id)                         # available immediately
36try:
37    result = job.wait(timeout=600, interval=1.0)
38except InferenceTimeout as e:
39    print("still running:", e.request_id)
40except InferenceFailed as e:
41    print("failed:", e.detail)

API Endpoint

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

Parameters

character_reference_imagerequired
string (uri)

Provide an image as a character reference. Use a clear headshot for accurate modeling.

Default: "https://segmind-resources.s3.amazonaws.com/output/9ad9b775-7b35-4485-affe-6215a933d825-686185927069985948.png"
promptrequired
string

Describe the image you want to create. Use creative prompts for unique images.

Default: "a close up photo of a woman in a fashion magazine photoshoot"
aspect_ratiooptional
string

Define the aspect ratio for your image. Choose a ratio like '16:9' for wide-screen images.

Default: "16:9"
Allowed values (15 total):
"1:3""3:1""1:2""2:1""9:16""16:9""10:16""16:10""2:3""3:2"+5 more
imageoptional
string (uri)

Provide an image for inpainting using the given mask. Start with a clear, high-resolution image for best results.

Default: null
magic_prompt_optionoptional
string

Toggle magic prompt modes to automate text prompts. Use 'On' for automatic prompt enhancements.

Default: "Off"
Allowed values :
"Auto""On""Off"
maskoptional
string (uri)

Use a mask to preserve parts of the image while inpainting. Choose a detailed mask for precise edits.

Default: null
rendering_speedoptional
string

Choose rendering speed for processing time. Use 'Turbo' for fast results or 'Quality' for best results.

Default: "Quality"
Allowed values :
"Default""Turbo""Quality"
resolutionoptional
string

Choose resolution for the image output. For detailed images, pick a higher resolution.

Default: "512x1536"
Allowed values (70 total):
"None""512x1536""576x1408""576x1472""576x1536""640x1344""640x1408""640x1472""640x1536""704x1152"+60 more
seedoptional
integer

Set a seed for reproducible results. Use a fixed seed for consistency across generations.

Default: nullRange: 100 - 999999
style_typeoptional
string

Select the style for the image. Use 'Fiction' for creative artwork or 'Realistic' for lifelike images.

Default: "Realistic"
Allowed values :
"Auto""Fiction""Realistic"

Response Type

Returns: Image

Asynchronous requests (v2)

Use Async for video, long-running (>~60s), or high-concurrency workloads; Sync is simplest for fast image & LLM calls. Async submits a request and you poll it to completion.

  1. 1
    POST /v2/ideogram-character

    Submitreturns request_id, status_url, response_url

  2. 2
    GET /v2/requests/{id}/status

    Polluntil COMPLETED or FAILED

  3. 3
    GET /v2/requests/{id}

    Resultfinal response body

Status states

QUEUEDAccepted, waiting for a worker
PROCESSINGRunning on a worker
COMPLETEDDone — result body is ready
FAILEDErrored (incl. content/RAI blocks)
  • A FAILED request is served as HTTP 422 — the body still carries the error detail.
  • An unknown or expired request_id returns HTTP 404.
  • Results are retained for 1 hour, then expire.
  • Content / RAI blocks surface as FAILED, not a separate state.
  • Track completion by polling the status endpoint.

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