Skip to main content
POST
Generate an image synchronously
Use this method when the caller can wait for the final Gemini response. Select a model-specific size before choosing Try it. The shared schema contains all family sizes; individual model guides define which values are valid.

Compare model limits

Review price and resolution before sending a billable request.

Authorizations

Authorization
string
header
required

YingTu API key.

Path Parameters

model
enum<string>
required

Current Nano Banana model ID.

Available options:
gemini-2.5-flash-image,
gemini-3.1-flash-lite-image,
gemini-3.1-flash-image,
gemini-3-pro-image

Body

application/json
contents
Prompt and input · object[]
required

Messages sent to the model.

Minimum array length: 1
tools
object[]

Optional Gemini tools. Availability depends on the selected image model.

toolConfig
object

Configuration for tools declared in tools.

safetySettings
object[]
systemInstruction
object
cachedContent
string

Optional cached content resource name when supported by the selected model.

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-image"

responseId
string

Provider response identifier.

Example:

"response_example"

createTime
string<date-time>

Creation time when supplied by the selected model channel.