跳转到主要内容
POST
/
api
/
v1
/
task
/
submit
curl --request POST \
  --url https://api.maxapi.io/api/v1/task/submit \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "model": "nano-banana",
  "callBackUrl": "https://example.com/webhook",
  "input": {
    "prompt": "一只在星空下奔跑的柴犬",
    "ratio": "16:9"
  }
}'
{
  "code": 0,
  "msg": "ok",
  "data": {
    "taskId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
  }
}
使用 Gemini 驱动的 Nano Banana 模型从文本描述生成高质量图片。可在快速生成和高质量输出之间选择。

可用模型

nano-banana · nano-banana-2 · nano-banana-pro

模型对比

快速 & 高性价比
  • 引擎:Gemini 2.5 Flash
  • 支持比例:16:99:16
  • 分辨率:1K(固定)
  • 适用场景:快速迭代、原型设计
快速且高质量
  • 引擎:Gemini 3.1 Flash
  • 支持比例:16:99:161:14:33:4
  • 支持分辨率:1k2k4k
  • 适用场景:快速生成且需要高质量,平衡之选
高质量
  • 引擎:Gemini 3.0 Pro
  • 支持比例:16:99:161:14:33:4
  • 支持分辨率:1k2k4k
  • 适用场景:最终产出、高质量需求
model
string
必填
模型名称,如 nano-banananano-banana-2nano-banana-pro
callBackUrl
string
Webhook 回调地址。
input
object
必填
curl --request POST \
  --url https://api.maxapi.io/api/v1/task/submit \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "model": "nano-banana",
  "callBackUrl": "https://example.com/webhook",
  "input": {
    "prompt": "一只在星空下奔跑的柴犬",
    "ratio": "16:9"
  }
}'
{
  "code": 0,
  "msg": "ok",
  "data": {
    "taskId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
  }
}

查询结果

通过查询任务接口或 Webhook 获取生成结果:
{
  "code": 0,
  "msg": "ok",
  "data": {
    "taskId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    "status": "SUCCESS",
    "input": {
      "model": "nano-banana-pro",
      "prompt": "一只在星空下奔跑的柴犬",
      "ratio": "16:9",
      "resolution": "2k"
    },
    "result": {
      "type": "image",
      "urls": [
        "https://example.com/output/image-a1b2c3d4.png"
      ]
    },
    "created_at": "2026-02-12T10:00:00.000000Z",
    "updated_at": "2026-02-12T10:00:15.000000Z"
  }
}
Nano Banana 每次生成返回 1 张图片。平均生成时长:10-30 秒。