Skip to main content
POST
Submit an asynchronous image task
The request body is identical to the synchronous method. The response confirms task acceptance, not image completion. Persist the returned task_id before acknowledging the job to your caller. There is no callback URL or client idempotency key in the current flow.

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

Task accepted

task_id
string
required
Example:

"task_01JY8K6M6B4YQ3R8H4T6V2Z1AB"

status
string
required
Allowed value: "queued"
created_at
integer<int64>
required

Unix timestamp in seconds.

Example:

1788307200