Skip to navigation

Ad Resizer

Reframes an ad creative to an exact ad resolution, regenerating the layout so text and key elements stay legible at the new size. Upload the source creative as image using multipart/form-data, and supply platform to keep the ad inside that platform’s safe zone. 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 creative, the target ad resolution, and optionally the platform whose safe zone the ad must stay inside.
imagefileRequired

The source creative to reframe (max size 25MB). JPEG, PNG, and WEBP formats are supported. Multipart requests only.

resolutionenumRequired

Target ad resolution, formatted as WIDTHxHEIGHT. Any value not in the list is rejected with a 400. Each output image has exactly these pixel dimensions, with or without a platform.

platformenumOptional

The ad platform whose published safe zone the ad must stay inside. The ad is generated inside the largest rectangle that fits the platform's safe zone for the requested aspect ratio, and the space around it is filled in so the output is still exactly the requested resolution. google covers YouTube and Google Ads placements. Use meta_stories or meta_reels for Meta placements; Reels uses the largest rectangle inside its notched safe zone. The legacy meta value is still supported and uses a more conservative safe zone. When omitted, the ad fills the whole frame and every supported resolution is accepted. Any other value is rejected with a 400.

Each platform accepts only the resolutions for which it publishes a safe zone; any other resolution is rejected with a 400:

PlatformAccepted resolutions
google1920x1080, 3840x2160, 1080x1080, 2400x2400, 2880x2880, 1080x1920, 2160x3840
tiktok1920x1080, 3840x2160, 1080x1080, 2400x2400, 2880x2880, 1080x1920, 2160x3840
meta_stories1080x1920, 2160x3840
meta_reels1080x1920, 2160x3840
meta (legacy)1080x1920, 2160x3840
snapchat1080x1920, 2160x3840
promptstringOptional

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

qualityenumOptional
The quality tier for the reframe. Higher tiers may improve detail and take longer to complete.
Allowed values:
num_imagesintegerOptional1-4Defaults to 1
The number of reframed variations to generate.
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 resize 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