---
title: "Reframe an image with Gemini 3.1 Flash Image"
method: POST
path: "/v2/images/reframe/gemini-3.1-flash-image"
tags: ["images-reframe"]
---

# Reframe an image with Gemini 3.1 Flash Image

`POST /v2/images/reframe/gemini-3.1-flash-image`

Expand one image to a new aspect ratio with Gemini 3.1 Flash Image.
Supply either an existing Ideogram image asset or raw image bytes,
but not both. The requested aspect ratio is resolved to the closest
supported 1K output dimensions.

This operation is asynchronous. It returns as soon as the request is
accepted; poll `GET /v1/generations/{generation_id}` for completion
and results.

## Request body

- ReframeImageGemini31FlashImageRequest — Supply exactly one source: `image_asset_identifier` for an existing Ideogram asset, or `image` for a raw upload. 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 JPEG, PNG, or WEBP image to reframe (max 50MB).
  - `aspect_ratio` string, required — The requested output aspect ratio. It resolves to the closest dimensions Gemini supports at the 1K output tier.
  - `private` boolean — API-key requests are always private. For bearer-authenticated requests, this controls whether the result is private; when omitted, it follows the caller's plan entitlement. Enterprise generations are always private.
  - `num_images` integer — The number of output images to generate.
  - `seed` integer — Random seed. Set for reproducible generation.

## Response `200`

An acknowledgement to poll with `GET /v1/generations/{generation_id}`.

- ReframeImageGemini31FlashImageResponse — Acknowledges an accepted asynchronous Reframe request. Poll `GET /v1/generations/{generation_id}` for completion and output images. The seed, width, and height report the values the request resolved to when the caller left them unset.
  - `generation_id` string, required — URL-safe base64 ID of the accepted generation. Accepted by the `GET /v1/generations/{generation_id}` polling endpoint.
  - `seed` integer, required — Random seed. Set for reproducible generation.
  - `width` integer, required — The resolved 1K output width in pixels.
  - `height` integer, required — The resolved 1K output height in pixels.

## Other responses

- `400` — Invalid input provided.
- `401` — Unauthorized.
- `402` — Insufficient credits or quota.
- `404` — The referenced source asset was not found.
- `429` — Too many requests.
- `500` — Internal server error.
- `503` — The endpoint is temporarily unavailable.

## Changes

- **2026-09-02** `1429d75daa36` — 2 info
  - added the media type `application/json` for the response with the status `402`
  - added the media type `application/json` for the response with the status `429`
- **2026-08-31** `583d86789548` — 1 info
  - endpoint added

[Change history](https://skmtc.dev/ideogram/apis/ideogram-openapi-3-0/changes/v2/images/reframe/gemini-3.1-flash-image/post.md)

---

[API](https://skmtc.dev/ideogram/apis/ideogram-openapi-3-0.md) · [All operations](https://skmtc.dev/ideogram/apis/ideogram-openapi-3-0/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/ideogram/ideogram-openapi-3-0/revisions/1429d75daa36/schema)
