跳转到主要内容
POST
/
v3
/
nano-banana-2-t2i
Nano Banana 2 文生图
curl --request POST \
  --url https://api.jiekou.ai/v3/nano-banana-2-t2i \
  --header 'Authorization: <authorization>' \
  --header 'Content-Type: <content-type>' \
  --data '
{
  "prompt": "<string>",
  "size": "<string>",
  "quality": "<string>",
  "image": [
    "<string>"
  ],
  "response_format": "<string>"
}
'
{
  "images": [
    "<string>"
  ]
}

Documentation Index

Fetch the complete documentation index at: https://docs.jiekou.ai/llms.txt

Use this file to discover all available pages before exploring further.

基于文本提示词使用 Nano Banana 2 模型生成图像,支持配置图像尺寸比例与画质等级;亦可附带参考图像作为生成参考。

请求头

Content-Type
string
必填
枚举值: application/json
Authorization
string
必填
Bearer 身份验证格式: Bearer {{API 密钥}}。

请求体

prompt
string
必填
用于生成图像的文本提示词,支持中英文。建议不超过 1000 个字符。
size
string
默认值:"1x1"
输出图像的尺寸比例,系统会自动映射为对应的像素尺寸。可选值:1x1, 2x3, 3x2, 3x4, 4x3, 4x5, 5x4, 9x16, 16x9, 21x9
quality
string
默认值:"1k"
图像生成质量等级,更高质量可生成更清晰、更细腻的图像。可选值:1k, 2k, 4k
image
string | string[]
可选的参考图像,支持图像 URL 或 Base64 编码。可传入单张图像(字符串)或多张图像(字符串数组)作为生成参考。
response_format
string
默认值:"url"
生成图像的返回格式。可选值:url, b64_json

响应

images
string[]
必填
生成的图像数组,元素为图像 URL(当 response_formaturl 时)或 Base64 编码字符串(当 response_formatb64_json 时)。