Skip to main content
POST
Billable request (imageSize omitted): generate an image with gemini-2.5-flash-image
Google lists October 2, 2026 as the model’s earliest shutdown date. Use these examples to maintain or migrate an existing integration, not to establish a new long-lived default.

Generate synchronously

cURL
Do not add imageSize to this model.

Submit the same job asynchronously

cURL
Persist the HTTP 202 task_id, then use the bounded polling implementation. Continue omitting size for this model.

Edit from reference images

Read the representative response

A successful response can contain text before the image:
Treat the text as illustrative and the structure as representative. Always scan all parts and use the returned mimeType.

Test this model online

The embedded form is fixed to gemini-2.5-flash-image:generateContent and intentionally has no imageSize control.
Try it is billable. Use a development key. Mintlify includes the entered key in its generated cURL, so do not share authenticated screenshots or copied commands.

Review the parameter contract

Confirm the ratio set and omitted size field.

Move to a current model

Choose Lite for 1K or Flash for higher resolutions.

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-2.5-flash-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