generationConfig.imageConfig.imageSize must be absent.
Output controls
Supported ratios:
Minimal generation body
Editing input
Put the instruction and source bytes in the sameparts array. Add another inlineData part for each additional reference:
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.
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.