Aibubu
访问 Aibubu ↗
图片模型Nano Banana

Nano Banana 2.1

Nano Banana 2.1 的 API 模型、参数和调用说明。

模型 ID

nano-banana-2.1

参数

字段类型说明
promptstring必填的图片描述
input_modestringtext_to_image 或 image_edit
reference_imagesstring[]编辑时的参考图片 URL
resolutionstring1K、2K 或 4K,默认 1K
ninteger默认 1,仅支持 1
aspect_ratiostring默认 1:1;支持 auto、1:1、5:4、9:16、21:9、16:9、3:2、4:3、4:5、3:4、2:3
reference_imagesstring[]编辑时传入,最多 14 张

调用方式

请先调用 GET /v1/models,读取该模型实时返回的 schema.fields、能力和价格。参数、默认值、枚举和区域可用状态以接口返回为准。

  • 图片或视频模型使用 POST /v1/generations。
  • 文字模型使用 POST /v1/chat/completions 或 POST /v1/responses。
  • 生成前可使用 POST /v1/quote 预估消耗。

示例

{
  "model": "nano-banana-2.1",
  "prompt": "Describe the desired result clearly",
  "resolution": "1K",
  "aspect_ratio": "1:1",
  "n": 1
}

该页面记录模型入口;具体参数必须以当前区域的模型 schema 为准,不要将其他模型的字段直接复制过来。

本页目录