Generate an image with gemini-3.1-flash-image
Gemini 3.1 Flash Image
Gemini 3.1 Flash Image examples
Generate a 2K image, queue a 1K task, and edit a source image with Nano Banana 2 on YingTu.
POST
Generate an image with gemini-3.1-flash-image
Generate a 2K asset
Queue a 1K task
Use the identical body withimageSize: "1K" and the asynchronous suffix.
The live task returned HTTP 202, reached in_progress, and completed after
four polls with its Gemini response under result.
Edit without changing the subject
Send the instruction and source bytes as adjacent parts. Scan the returned parts rather than assuming the image is at index zero; one verified edit returned model text before the JPEG.Test this model online
The embedded OpenAPI operation uses the fixedgemini-3.1-flash-image:generateContent path. Confirm imageSize, enter a
development key, and run the request directly on this page.
Authorizations
YingTu API key.
Body
application/json
Response
Complete Gemini response
The model version that produced the response.
Example:
"gemini-3.1-flash-image"
Provider response identifier.
Example:
"response_example"
Creation time when supplied by the selected model channel.