Skip to navigation

Ad Localizer

Rebuilds an ad in one target language, preserving its layout, logos, brand type, and product so only the visible marketing copy changes. Upload the source ad as image using multipart/form-data; the copy is translated unless you supply exact_copy. Returns a generation_id; poll GET /v2/generations/{generation_id} or supply a webhook_url.

Authentication

Api-Keystring

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

Query parameters

dry_runbooleanOptionalDefaults to false

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

The source ad and the target language.
imagefileRequired

The source ad to localize (max size 25MB). Its layout, logos, brand type, and product are preserved, and the output keeps its shape, so no size or aspect ratio is needed. JPEG, PNG, and WEBP formats are supported. Multipart requests only.

languageenumRequired

The target language for the copy. Arabic is rendered right-to-left. Each request covers one language; send one request per language.

exact_copystringOptional<=4000 characters

Pre-approved wording, one original => replacement mapping per line. Each mapping names the text element showing original and sets it to replacement, placed character for character rather than translated. Any text element not listed is left as it is in the source. When omitted, all visible marketing copy is translated.

promptstringOptional<=2000 characters
Optional additional direction for the localization, for example "keep the badge in English". Anything it explicitly asks to change takes priority over the preservation rules.
qualityenumOptional
The quality tier for the edit. Higher tiers may improve detail and take longer to complete.
Allowed values:
seedintegerOptional0-2147483647
Random seed. Set for reproducible generation.
num_imagesintegerOptional1-4Defaults to 1
Number of localized variations to create for this language.
webhook_urlstringOptionalformat: "uri"<=2048 characters

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

Ad localization accepted for asynchronous processing.
generation_idstring

URL-safe base64 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
422
Unprocessable Entity Error
429
Too Many Requests Error