---
title: "Reframe a source image to a target size, by asset id or by uploaded bytes"
method: POST
path: "/v1/ad-resizer"
tags: ["generate"]
---

# Reframe a source image to a target size, by asset id or by uploaded bytes

`POST /v1/ad-resizer`

Reframe a source image to a target size.

Supply the source image as either an `AssetIdentifier` reference
(`image_asset_identifier`) or the raw image bytes directly (`image`,
multipart requests only) -- callers are never required to call
`POST /v2/assets` first. Provide exactly one of the two; supplying both,
or neither, is rejected with a 400.

The target `resolution` (`WIDTHxHEIGHT`) sets the exact output dimensions
and selects the reframing layout, so it is required.

The model is fixed by the route, so no `model` field is accepted.

The request blocks until the reframed image(s) are ready and returns them
directly in the response.

## Request body

- ResizeAdImageRequest — Supply the source image as either an `AssetIdentifier` reference or (multipart requests only) raw image bytes; provide exactly one of `image_asset_identifier` / `image`. Supplying both, or neither, is rejected with a 400.
  - `image_asset_identifier` AssetIdentifier — An identifier for an ideogram asset.
    - `asset_type` 'ASSET' | 'CANVAS_ASSET' | 'LAYERED_ASSET' | 'RESPONSE' | 'UPLOAD', required
    - `asset_id` string, required
  - `image` string, binary — The source image to reframe (max size 10MB), as raw bytes; only JPEG, PNG, and WEBP formats are supported. Multipart requests only. Provide exactly one of `image_asset_identifier` or `image`.
  - `resolution` '300x250' | '336x280' | '300x600' | '1080x1080' | '1080x1350' | '1080x1920' | '1920x1080' | '728x90' | '160x600' | '970x250' | '320x50' | '300x50' | '320x100' | '1800x900' | '2400x2400' | '1200x3500', required — 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.
  - `prompt` string — Optional edit instruction to apply while reframing, for example "remove the logo" or "put the price bottom-right".
  - `quality` 'LOW' | 'MEDIUM' | 'HIGH'
  - `num_images` integer — The number of reframed variations to generate.
  - `store_assets` boolean — 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 `200`

The reframed image(s).

- EditImageFromV1AssetsResponse — The reframed image(s) returned by the `/v1/ad-resizer` route. Image links are available for a limited period of time; if you would like to keep an image, you must download it.
  - `created` string, date-time, required — The time the request was created.
  - `data` EditImageFromV1AssetsImageObject[], required — The reframed images, one entry per requested variation (`num_images`).
    - `url` string, uri, nullable — The direct link to the reframed image. Empty when the image fails safety checks.
    - `is_image_safe` boolean, required — Whether the reframed image passes safety checks. If false, the url field will be empty.

## 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.net/ideogram/apis/ideogram-openapi-3-0.md) · [All operations](https://skmtc.net/ideogram/apis/ideogram-openapi-3-0/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/ideogram/ideogram-openapi-3-0/versions/bd40f367a834/schema)
