Generate with Ideogram 4.6
Generate images with Ideogram 4.6 from a natural-language or structured
JSON prompt. Optionally upload source images as images using
multipart/form-data to edit them with the prompt. Returns results
directly by default; set async or supply a webhook_url 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 Ideogram 4.6. Send it as application/json, or as multipart/form-data to include source images.
Controls how a natural-language prompt is prepared. auto (the
default) and on rewrite and expand the prompt before generation.
off keeps your wording and only converts it into a structured
prompt. A valid structured JSON prompt skips magic prompt unless
magic_prompt is on. With source images, every mode converts
the edit instruction into a structured edit prompt.
Optional source images to edit (max 5, max 25MB each; JPEG, PNG, or WEBP). The first image is the one being edited; any others are extra references. Multipart requests only.
An optional mask that limits the edit to part of the first source image (max 25MB; JPEG, PNG, or WEBP). Multipart requests only. Black marks the area to edit and white the area to keep; values in between are rounded to the nearer of the two. The mask must have the same width and height as the first source image and contain both black and white areas. A masked request can include at most three other source images. With a mask, the output is always the first source image’s own size, so size cannot be set.
The output size: “auto”, “auto_2k”, “auto_4k”, “source” or an exact “WIDTHxHEIGHT”.
Without source images, “auto” or omitted picks an aspect ratio based on the prompt and
renders it at the default resolution, currently 2K. “auto_2k” and
“auto_4k” also pick the aspect ratio from the prompt, but always
render it at 2K or 4K. “auto_4k” is not available at very_low
quality. “source” is rejected.
With source images, “auto” (the default) picks a size based on the
source images and the prompt at the default resolution, currently
2K. “auto_2k” and “auto_4k” make the same pick, but always at 2K or
4K. “auto_4k” is not available at very_low quality. “source”
returns the output at the first source image’s own width and height
(scaled down, keeping its proportions, if it is too large for the
model). Every source image’s aspect ratio must be between 1:6 and
6:1.
An exact size must have both sides a multiple of 32 and at least
256px, no side longer than 8192px, a total of at most 4096x4096
pixels, and an aspect ratio of at most 6:1. At very_low quality
the total is at most 2048x2048 pixels and no side may be longer
than 4608px. With source images, an exact size reshapes the source
to it.
Pricing is tiered by the resolved output pixels: up to 1024x1024 bills as 1K, up to 2048x2048 as 2K, and above that as 4K. “auto” bills at the default resolution, currently 2K; “auto_2k” always bills as 2K and “auto_4k” always bills as 4K.
The output background. transparent returns images with an alpha channel, opaque returns a solid one, and auto decides for you.
The rendering quality to use. Higher quality takes longer and costs more. Defaults to medium. very_low is the fastest and cheapest, and renders up to 2K (2048x2048 total pixels).
Optional. Run copyright detection on the generated images. Adds latency; flagged images are returned with is_image_safe: false.
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.
HTTPS URL that Ideogram delivers the generated result to. Ideogram sends a
JSON POST to this URL once all images for the request have finished
generating. The body mirrors the synchronous generate response:
request_id, created, and a data array
containing every generated image (url, prompt, resolution, seed,
is_image_safe). Each delivery is signed with Ed25519 and verifiable
against the public keys at https://api.ideogram.ai/v1/.well-known/jwks.json. Must be HTTPS;
private and loopback hosts and the cloud metadata service are rejected.
Response
The generated images (synchronous requests), or an acknowledgement to poll with GET /v2/generations/{generation_id} (async requests).
The kind of generation identified by generation_id. Both kinds can be polled through GET /v2/generations/{generation_id}.
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).