注册

FAL Nano Banana 文生图 - QuickRouter API 中转接口

POST https://api.quickrouter.ai/fal-ai/nano-banana 在线调试 →
Authorization

在 Header 添加参数 Authorization,其值为 Bearer 之后拼接 Token

示例: Authorization: Bearer ********************

概述

官方文档: https://fal.ai/models/fal-ai/nano-banana

请求参数

Header 参数
Content-Type string
必需
示例: application/json
Authorization string
必需
示例: Bearer $OPENAI_API_KEY
Body 参数 application/json
prompt string
可选
生成图片的提示词。 必需
num_images integer
可选
生成图片数量。范围值1-4。默认值:1 { "prompt": "An action shot of a black lab swimming in an inground suburban swimming pool. The camera is placed meticulously on the water line, dividing the image in half, revealing both the dogs head above water holding a tennis ball in it's mouth, and it's paws paddling underwater.", "num_images": 1 } 请求
示例
{
    "prompt": "An action shot of a black lab swimming in an inground suburban swimming pool. The camera is placed meticulously on the water line, dividing the image in half, revealing both the dogs head above water holding a tennis ball in it's mouth, and it's paws paddling underwater.",
    "num_images": 1
}

请求示例代码

curl --location --request POST 'https://api.quickrouter.ai/fal-ai/nano-banana' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--data-raw '{
  "prompt": "An action shot of a black lab swimming in an inground suburban swimming pool. The camera is placed meticulously on the water line, dividing the image in half, revealing both the dogs head above water holding a tennis ball in it's mouth, and it's paws paddling underwater.",
  "num_images": 1
}'

返回响应

响应参数 🟢 200 OK · application/json
status string
必需
request_id string
必需
response_url string
必需
status_url string
必需
cancel_url string
必需
logs null
必需
metrics object
必需
queue_position integer
必需
{ "status": "IN_QUEUE", "request_id": "e7e9202c-efb8-40f2-81c3-13b3f7aaa4ca", "response_url": "https://queue.fal.run/fal-ai/nano-banana/requests/e7e9202c-efb8-40f2-81c3-13b3f7aaa4ca", "status_url": "https://queue.fal.run/fal-ai/nano-banana/requests/e7e9202c-efb8-40f2-81c3-13b3f7aaa4ca/status", "cancel_url": "https://queue.fal.run/fal-ai/nano-banana/requests/e7e9202c-efb8-40f2-81c3-13b3f7aaa4ca/cancel", "logs": null, "metrics": {}, "queue_position": 0 }
示例
{
    "status": "IN_QUEUE",
    "request_id": "e7e9202c-efb8-40f2-81c3-13b3f7aaa4ca",
    "response_url": "https://queue.fal.run/fal-ai/nano-banana/requests/e7e9202c-efb8-40f2-81c3-13b3f7aaa4ca",
    "status_url": "https://queue.fal.run/fal-ai/nano-banana/requests/e7e9202c-efb8-40f2-81c3-13b3f7aaa4ca/status",
    "cancel_url": "https://queue.fal.run/fal-ai/nano-banana/requests/e7e9202c-efb8-40f2-81c3-13b3f7aaa4ca/cancel",
    "logs": null,
    "metrics": {},
    "queue_position": 0
}

常见错误

  • 401 认证失败:检查 API Key 是否正确
  • 429 请求限流:降低调用频率或升级套餐
  • 500 服务器错误:稍后重试

注意事项

  • 请确保 API Key 有足够的余额
  • 请求频率受 API 限制,请参考价格页面