Skip to main content
POST
Billable request (defaults to 1K): generate an image with gemini-3.1-flash-lite-image
The -image suffix selects the image model. These examples use uppercase 1K; Lite does not accept 2K or 4K through this API.

Generate a mobile illustration

Python

Queue the request

cURL
The submit returns HTTP 202. Save task_id and follow the polling guide.

Edit a source image

Representative response

The PNG value illustrates the response shape, not a permanent encoding contract. Scan all response parts and use the actual MIME.

Test this model online

The form is fixed to gemini-3.1-flash-lite-image:generateContent, exposes the ten explicit ratios, and keeps imageSize at 1K.
Try it is billable. Use a development key. Mintlify shows the key in its generated cURL; do not share authenticated screenshots or copied commands.

Confirm Lite parameters

Review the exact ID, ratios, and 1K-only boundary.

Move to Flash when needed

Add higher resolutions without confusing the two model IDs.

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
promptFeedback
object
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.

Last modified on September 3, 2026