Skip to main content
POST
Submit an asynchronous image task
请求体与同步方法完全一致。响应只确认任务已受理,不表示图片已经生成完成。 向调用方确认成功前先持久化返回的 task_id。当前流程没有回调 URL 或客户端幂等键。

授权

Authorization
string
header
必填

YingTu API key.

路径参数

model
enum<string>
必填

Current Nano Banana model ID.

可用选项:
gemini-2.5-flash-image,
gemini-3.1-flash-lite-image,
gemini-3.1-flash-image,
gemini-3-pro-image

请求体

application/json
contents
Prompt and input · object[]
必填

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

响应

Task accepted

task_id
string
必填
示例:

"task_01JY8K6M6B4YQ3R8H4T6V2Z1AB"

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

Unix timestamp in seconds.

示例:

1788307200