Skip to main content
POST
Generate an image with gemini-3.1-flash-lite-image

Create a 1K image

The verified output was a 1024 × 1024 PNG in the first image part:

Queue the same job

Change the method suffix to :asyncGenerateContent. In live verification the submit returned queued, and the task completed after four polls with the same 1K PNG response shape under result.
When reading either mode, iterate over every part and decode only entries with inlineData.

Test this model online

The OpenAPI panel on this page is fixed to gemini-3.1-flash-lite-image:generateContent and prefills the valid 1K body. Enter a development key and use Try it without navigating elsewhere.
Try it is billable. Mintlify shows the entered key in its generated cURL; do not share authenticated screenshots.

Authorizations

Authorization
string
header
required

YingTu API key.

Body

application/json
contents
Message · object[]
required

Prompt and optional source image.

Minimum array length: 1
generationConfig
Output settings · object

Response

Complete Gemini response

candidates
object[]
required
usageMetadata
object
modelVersion
string

The model version that produced the response.

Example:

"gemini-3.1-flash-lite-image"

responseId
string

Provider response identifier.

Example:

"response_example"

createTime
string<date-time>

Creation time when supplied by the selected model channel.