contents and optional
generationConfig; there is no top-level YingTu envelope.
Choose the model and supported size before deciding that synchronous execution
fits. A Pro 4K response can be much larger and slower than a Lite 1K response;
the HTTP method does not remove those differences.
When synchronous fits
Use this method for interactive tools, server actions, and simple integrations where the request timeout comfortably exceeds image-generation time. The HTTP response contains the final Geminicandidates array.
Read the result safely
content.parts may contain text and image parts in different positions. Find
every part with inlineData; do not index the array by a fixed position. Use
inlineData.mimeType to decide how to save the Base64 bytes.
Open the synchronous Playground
Inspect model, body, authentication, and response schemas.
Choose a Nano Banana model
Match resolution and price to the job before sending the request.