Advertisement Resizer

Resizes an advertisement image to the exact target size. Supply `prompt` to provide specific instructions for how the advertisement should look after resizing. The request is processed asynchronously and immediately returns a `generation_id`. Poll `GET /v1/generations/{generation_id}` until `status` is `completed` or `failed`. The completed polling response contains the final resized image(s) in `data` and the amount charged for variable usage-based pricing in `usage_cost_usd_micros`. If a `webhook_url` is supplied, the completed result is also POSTed to that URL. Supply the advertisement image as raw `image` bytes via `multipart/form-data`. The required `resolution` (`WIDTHxHEIGHT`) sets the exact output dimensions. The model is fixed by the route, so no `model` field is accepted.

Authentication

Api-Keystring

API key for access control. Use in the header with the name “Api-Key”

Query parameters

webhook_urlstringOptionalformat: "uri"
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.

Request

A request to resize a source image.
imagefileOptional

The source image to reframe (max size 25MB), as raw bytes; only JPEG, PNG, and WEBP formats are supported.

resolutionenumRequired

Target ad resolution, formatted as WIDTHxHEIGHT. Must be one of the supported ad resolutions listed above; any other value is rejected with a 400. Each returned image has exactly these pixel dimensions.

promptstringOptional

Optional edit instruction to apply while reframing, for example “remove the logo” or “put the price bottom-right”.

qualityenumOptionalDefaults to HIGH
Output quality tier. Higher tiers generally improve detail and may take longer to complete. Supported values are LOW, MEDIUM, and HIGH.
Allowed values:
num_imagesintegerOptional1-4Defaults to 1
The number of reframed variations to generate.
store_assetsbooleanOptionalDefaults to false

Reserved for a future release: accepted for forward compatibility but not yet applied. Resulting assets are not stored to your account regardless of this value.

Response

Request accepted for asynchronous processing.
generation_idstring

URL-safe base64 ID of the accepted generation. Matches the generation_id field delivered in the webhook payload, and the generation_id accepted by the generation polling endpoint.

Errors

400
Bad Request Error
401
Unauthorized Error
402
Payment Required Error
403
Forbidden Error
404
Not Found Error
429
Too Many Requests Error