Nano Banana 2 (Gemini 3.1 Flash Image)
google/gemini-3.1-flash-imageNano Banana 2 (Gemini 3.1 Flash Image) is Google's image generation and conversational image editing model in the Gemini 3 series, producing images alongside text from text, image, video and PDF input. Google positions it as the high-efficiency, low-latency counterpart to Nano Banana Pro for high-volume developer use, adding output resolutions from 0.5K to 4K, extra wide and tall aspect ratios, image search grounding and improved multilingual text rendering. Choose Nano Banana Pro for complex, precision design work.
- 輸入價格
- $0.50美元/100 萬 token
- 輸出價格
- $3.00美元/100 萬 token
- 上下文視窗
- 131.1K
- 最大輸出
- 32.8K
試用這個模型
Gemini 原生 API
此模型透過 Gemini generateContent API 產生圖片,無法在 Chat Completions 或 Playground 中使用。請使用下方的請求範例搭配您的 SandBase API key。
模型卡片
規格
定價
- 輸入
- $0.50/100 萬 token
- 輸出
- $3/100 萬 token
上下文與多模態
- 上下文視窗
- 131,072 個 token
- 最大輸出
- 32,768 個 token
- 輸入
- 文字, 圖片
- 輸出
- 文字
功能
- 聊天
- 支援
- 視覺
- 支援
- 推理
- 支援
- 結構化輸出
- 不支援
- 函式呼叫
- 不支援
- 音訊輸入
- 不支援
存取
- 供應商
- 模型 ID
- google/gemini-3.1-flash-image
- 執行
- sync
- 基礎 URL
- https://api.sandbase.ai
- API
- Gemini generateContent API
- 端點
- /v1beta/models/google/gemini-3.1-flash-image:generateContent
開始建置
送出您的第一個請求
具備 SandBase API 金鑰驗證與用量追蹤的 Gemini 原生端點。
curl -X POST "https://api.sandbase.ai/v1beta/models/google/gemini-3.1-flash-image:generateContent" \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"contents": [
{
"role": "user",
"parts": [
{
"text": "A watercolor illustration of a fox in a snowy forest"
}
]
}
],
"generationConfig": {
"responseModalities": [
"TEXT",
"IMAGE"
]
}
}'輸入 Schema
7 個參數 · 1 個必要 · 6 個選用
| 參數 | 類型 | 必要 | 說明 |
|---|---|---|---|
messages | object[] | 必要 | Conversation so far, as an ordered list of messages with a role (system, user or assistant) and content. |
seed | integer | 選用 | Best-effort deterministic sampling: repeated requests with the same seed and parameters should return similar results. |
top_p | number | 選用 | Nucleus sampling: only tokens within this cumulative probability are considered. · 最小值:0 · 最大值:1 |
stream | boolean | 選用 | Stream the response as server-sent events instead of returning it in one piece. · 預設值:false |
max_tokens | integer | 選用 | Maximum number of tokens to generate in the response. · 最大值:32768 |
temperature | number | 選用 | Sampling temperature. Higher values make output more random; lower values make it more focused. · 最小值:0 · 最大值:2 · 預設值:1 |
response_format | object | 選用 | Output format, for example { "type": "json_object" } or a JSON Schema for structured output. |
輸出 Schema
| 欄位 | 類型 | 說明 |
|---|---|---|
id | string | 完成結果的唯一識別碼 |
object | string | 物件類型,例如 "chat.completion" |
model | string | 用於完成的模型 |
choices | array | 完成選項清單 |
choices[].message.content | string | 生成的文字內容 |
choices[].finish_reason | string | 生成停止的原因 |
usage.prompt_tokens | integer | 提示中的 token 數量 |
usage.completion_tokens | integer | 完成中的 token 數量 |
usage.total_tokens | integer | 使用的 token 總數 |
選擇您的模型
比較模型
| 模型 | 上下文 | 輸入 / 1M | 輸出 / 1M | 發布時間 |
|---|---|---|---|---|
Google | 128K | $0.50 | $3.00 | 2026年6月18日 |
Google | 1M | $3.00 | $15.00 | 2026年11月18日 |
Google | 1M | $1.50 | $7.50 | 2026年11月12日 |
Google | 1M | $4.00 | $20.00 | 2026年11月10日 |
Google | 1M | $4.00 | $20.00 | 2026年10月13日 |
Google | 64K | $1.50 | $7.50 | 2026年10月8日 |
問題
常見問題
我要如何透過 SandBase 呼叫 Google Nano Banana 2 (Gemini 3.1 Flash Image)?
先建立一組 SandBase API 金鑰,接著使用模型 ID「google/gemini-3.1-flash-image」向 https://api.sandbase.ai 的 Gemini generateContent API (/v1beta/models/google/gemini-3.1-flash-image:generateContent) 發送請求。此頁的請求範例會顯示完整的 payload。
Google Nano Banana 2 (Gemini 3.1 Flash Image) 的費用是多少?
每 100 萬個輸入 token $0.50、每 100 萬個輸出 token $3,費用會依每次請求從您的 SandBase 餘額中扣除。若有折扣,會顯示在本頁的價格資訊中。
Google Nano Banana 2 (Gemini 3.1 Flash Image) 的 context window 是多少?
131.1K 個 context token,每次回應最多可輸出 32.8K 個 output token。
Google Nano Banana 2 (Gemini 3.1 Flash Image) 支援哪些功能?
Google Nano Banana 2 (Gemini 3.1 Flash Image) 支援 視覺辨識(圖片輸入), 推理。完整清單請參閱上方的 Specifications。
我需要另外申請 Google 帳號嗎?
不需要。一組 SandBase API 金鑰與餘額即可讓您存取 Google Nano Banana 2 (Gemini 3.1 Flash Image) 以及目錄中的其他模型;您不需要另外註冊 Google。
