Pro uses the same Gemini-native body as Flash, with different YingTu prices and
a stronger reason to consider asynchronous execution for large output.
Plan for Base64 size
The verified 4096 × 4096 JPEG contained roughly 7.4 MB of decoded image data;
the JSON Base64 string was larger. Set client, proxy, and log limits accordingly.
Do not retain full response bodies in ordinary application logs.
For a caller with a short timeout, submit the same body to
:asyncGenerateContent and move the completed image into storage you control.
Use inlineData for a source image and preserve its real MIME type. The live
1K edit returned JPEG output and optional text may still appear before it.
A 4K request is billed at the 4K tier even when the prompt fails to use the
extra resolution effectively. Validate at 1K or 2K before scaling 4K traffic.