---
title: "Advertisement Resizer"
method: POST
path: "/v1/async/ad-resizer"
tags: ["generate"]
---

# Advertisement Resizer

`POST /v1/async/ad-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.

## Query parameters

- `webhook_url` string, 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.

## Headers

- `Api-Key` string, required

## Response `200`

Request accepted for asynchronous processing.

- AsyncImageGenerationResponseV4 — Acknowledgement returned by the async (webhook) generation endpoints. The request is accepted for asynchronous processing and the generated images are POSTed to the supplied `webhook_url` once ready; this body carries only the generation_id so the caller can correlate the eventual webhook delivery.
  - `generation_id` string, required — 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.

## Other responses

- `400` — Invalid input provided.
- `401` — Unauthorized.
- `402` — Insufficient credits or quota.
- `403` — Not authorized to edit an image.
- `404` — Source asset not found.
- `429` — Too many requests.

---

[API](https://skmtc.dev/ideogram/apis/api-reference.md) · [All operations](https://skmtc.dev/ideogram/apis/api-reference/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/ideogram/api-reference/revisions/d4cec35f719f/schema)
