auto-model

Transform images from an instruction, letting the server pick the best model

Transform one or more source images by describing the change in plain language, without choosing a model. The server selects the model best suited to the request and may route different requests to different models. Supply the sources either as image_asset_identifiers references (images already stored with Ideogram) or as raw images bytes (multipart requests only) — callers are never required to upload assets first. If both are supplied, the references win and the bytes are ignored.

By default the request blocks until the images are ready and returns them in data. Set async to true to return immediately after the request is accepted, then poll for completion and results with GET /v1/generations/{generation_id} using the returned generation_id.

post/v2/tool/image-to-image

Request body

promptstring required

The instruction describing how to transform the source images.

imagesstring[]

The source images to transform (max 10, max size 25MB per image), as raw bytes; only JPEG, PNG, and WEBP formats are supported. Multipart requests only; ignored if image_asset_identifiers is also supplied.

aspect_ratiostring

The output aspect ratio. AUTO (the default) lets the server pick the ratio; the model generally preserves the source images' composition. Any other value requests a shape hint formatted as "WIDTHxHEIGHT", for example "16x9" or "9x23". The selected model may serve the closest shape and resolution it supports. Omit resolution when supplying a non-AUTO value.

resolutionstring

The requested output resolution, formatted as "WIDTHxHEIGHT" (for example "900x2300"). The output is served at the closest resolution the selected model supports. Omit aspect_ratio (or leave it AUTO) when supplying a resolution.

resolution_tier'1K' | '2K' | '4K'

The output resolution tier. Influences which model serves the request; not every model offers every tier. When omitted the server uses the selected model's default tier.

magic_prompt'AUTO' | 'ON' | 'OFF'

Determine if MagicPrompt should be used in generating the request or not.

num_imagesinteger

The number of images to generate.

seedinteger

Random seed. Set for reproducible generation.

privateboolean

Whether the generated images should be kept private. When omitted, the default follows the caller's plan; some plans always generate privately.

target_collection_idstring

A collection you can write to, by its URL-safe base64 collection id. The output images are added to it when the request completes.

category_idstring

The internal generation category to attribute to the output, as a URL-safe base64 UUID without padding.

asyncboolean

When false (the default), the request blocks until the images are ready and returns them in data. When true, the request returns as soon as it is accepted; poll for completion and results with GET /v1/generations/{generation_id} using the returned generation_id.

Example request

{
  "image_asset_identifiers": [
    {
      "asset_type": "RESPONSE",
      "asset_id": "7uS_VESkRI6O3-sVgHQp_A"
    }
  ],
  "magic_prompt": "ON",
  "seed": 12345
}

Response

The transformed images (synchronous requests), or an acknowledgement to poll with GET /v1/generations/{generation_id} (async requests).

generation_idstring required

URL-safe base64 ID of the accepted generation. Accepted by the GET /v1/generations/{generation_id} polling endpoint.

seedinteger required

Random seed. Set for reproducible generation.

Example response

{
  "data": [
    {
      "seed": 12345,
      "prompt": "prompt",
      "resolution": "1024x1024",
      "url": "https://openapi-generator.tech",
      "is_image_safe": true
    },
    {
      "seed": 12345,
      "prompt": "prompt",
      "resolution": "1024x1024",
      "url": "https://openapi-generator.tech",
      "is_image_safe": true
    }
  ],
  "seed": 12345,
  "generation_id": "generation_id"
}

Changes