Skip to main content
Use the exact model ID in the request path:
This model uses the documented Gemini request body with one critical difference: generationConfig.imageConfig.imageSize must be absent.

Output controls

Supported ratios:
The ratio list is the current public model contract. Requests should use only these values.

Minimal generation body

Editing input

Put the instruction and source bytes in the same parts array. Add another inlineData part for each additional reference:
Use raw Base64 without a data URL prefix, and match mimeType to the actual source bytes. Unified asynchronous editing accepts 1–16 images, with a 20 MiB decoded limit per file and 64 MiB total. A fixed maximum source-image byte or pixel size is not currently published. Total request-body, proxy, and upstream limits may differ; reduce the source image if the API returns HTTP 413, and contact API support before relying on a guaranteed production envelope.
Do not send imageSize: "1K". The approximately 1K output does not make that field valid for this model.

Copy the complete examples

Use self-contained synchronous, asynchronous, and editing requests.

Review migration choices

Move to Lite or Flash according to the required output tier.
Last modified on September 3, 2026