Generate with automatic model selection
Generate images with the model Ideogram picks as best suited to each
request. Optionally upload source images as images using
multipart/form-data to edit them with the prompt. Returns results
directly by default; set async to get a generation_id and poll
GET /v2/generations/{generation_id}.
Authentication
API key for access control. Use in the header with the name "Api-Key"
Query parameters
When true, the request is validated and priced but not run: nothing is
generated, stored, or billed, and no safety review is performed. The
response is a PriceQuote object instead of the usual response for this
endpoint. Send exactly the request you would send to generate, so the
quote reflects the same options.
Request
A request to generate images with an automatically selected model. Send it as application/json, or as multipart/form-data to include source images.
Optional source images to edit (max 10, max 25MB each; JPEG, PNG, or WEBP). Multipart requests only.
The output aspect ratio. auto (the default) picks the most suitable ratio for the request. Without source images the value must be a supported ratio (for example "16x9" or "1x1"); with source images any "WIDTHxHEIGHT" value is accepted and the output uses the closest supported shape. Omit resolution when supplying a non-auto value.
The requested output resolution, formatted as "WIDTHxHEIGHT" (for example "1280x800"). The output is served at the closest resolution the selected model supports. Omit aspect_ratio (or leave it auto) when supplying a resolution.
Controls magic prompt (automatic prompt rewriting). Defaults to auto.
Whether the generated images should be kept private. When omitted, the default follows the caller's plan; some plans always generate privately.
When false (the default), the request waits until the images are ready and returns them in data. When true, the request returns as soon as it is accepted; poll GET /v2/generations/{generation_id} with the returned generation_id for the result.
Response
The generated images (synchronous requests), or an acknowledgement to poll with GET /v2/generations/{generation_id} (async requests).
URL-safe base64 ID of the generation. Use it to poll
GET /v2/generations/{generation_id}.
The generated images, in generation order. Present only for synchronous requests (async omitted or false).