Sand AISand AI MAGI-2MAGI-2 hiện đã có trên SandBase: video 1080p với âm thanh gốcDùng thử ngay

Nano Banana 2 (Gemini 3.1 Flash Image)

google/gemini-3.1-flash-image

Nano 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.

Giá đầu vào
$0.50USD / 1M token
Giá đầu ra
$3.00USD / 1M token
Cửa sổ ngữ cảnh
131.1K
Đầu ra tối đa
32.8K
Đường dẫn production

Thử model

Gemini-native API

Model này tạo ảnh qua Gemini generateContent API và không khả dụng trên Chat Completions hoặc trong Playground. Hãy dùng ví dụ request bên dưới với SandBase API key của bạn.

Thẻ model

Thông số kỹ thuật

Giá

Đầu vào
$0.50 / 1M token
Đầu ra
$3 / 1M token

Ngữ cảnh & phương thức

Cửa sổ ngữ cảnh
131.072 token
Đầu ra tối đa
32.768 token
Đầu vào
Văn bản, hình ảnh
Đầu ra
Văn bản

Tính năng

Chat
Được hỗ trợ
Thị giác
Được hỗ trợ
Suy luận
Được hỗ trợ
Đầu ra có cấu trúc
Không được hỗ trợ
Gọi hàm
Không được hỗ trợ
Đầu vào âm thanh
Không được hỗ trợ

Truy cập

Nhà cung cấp
Google
ID mô hình
google/gemini-3.1-flash-image
Thực thi
sync
URL cơ sở
https://api.sandbase.ai
API
Gemini generateContent API
Endpoint
/v1beta/models/google/gemini-3.1-flash-image:generateContent

Bắt đầu xây dựng

Gửi request đầu tiên của bạn

Endpoint gốc Gemini với xác thực bằng SandBase API key và theo dõi mức sử dụng.

API Production
endpoint Gemini generateContent API
https://api.sandbase.ai/v1beta/models/google/gemini-3.1-flash-image:generateContent
ID mô hình
google/gemini-3.1-flash-image
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"
    ]
  }
}'
01

Schema đầu vào

7 tham số · 1 bắt buộc · 6 tùy chọn

Tham sốKiểuBắt buộcMô tả
messagesobject[]Bắt buộcConversation so far, as an ordered list of messages with a role (system, user or assistant) and content.
seedintegerTùy chọnBest-effort deterministic sampling: repeated requests with the same seed and parameters should return similar results.
top_pnumberTùy chọnNucleus sampling: only tokens within this cumulative probability are considered. · Tối thiểu: 0 · Tối đa: 1
streambooleanTùy chọnStream the response as server-sent events instead of returning it in one piece. · Mặc định: false
max_tokensintegerTùy chọnMaximum number of tokens to generate in the response. · Tối đa: 32768
temperaturenumberTùy chọnSampling temperature. Higher values make output more random; lower values make it more focused. · Tối thiểu: 0 · Tối đa: 2 · Mặc định: 1
response_formatobjectTùy chọnOutput format, for example { "type": "json_object" } or a JSON Schema for structured output.
02

Schema đầu ra

TrườngKiểuMô tả
idstringMã định danh duy nhất cho completion
objectstringLoại đối tượng, ví dụ "chat.completion"
modelstringModel được dùng cho completion
choicesarrayDanh sách các lựa chọn completion
choices[].message.contentstringNội dung văn bản được tạo
choices[].finish_reasonstringLý do việc tạo dừng lại
usage.prompt_tokensintegerSố lượng token trong prompt
usage.completion_tokensintegerSố lượng token trong completion
usage.total_tokensintegerTổng số token đã dùng

Chọn model của bạn

So sánh model

Tất cả model ngôn ngữ
Mô hìnhNgữ cảnhĐầu vào / 1MĐầu ra / 1MPhát hành
Google128K$0.50$3.0018 thg 6, 2026
Google1M$3.00$15.0018 thg 11, 2026
Google1M$1.50$7.5012 thg 11, 2026
Google1M$4.00$20.0010 thg 11, 2026
Google1M$4.00$20.0013 thg 10, 2026
Google64K$1.50$7.508 thg 10, 2026

Câu hỏi

FAQ

Làm thế nào để gọi Google Nano Banana 2 (Gemini 3.1 Flash Image) qua SandBase?

Tạo một API key SandBase, sau đó gửi yêu cầu với model ID "google/gemini-3.1-flash-image" tới Gemini generateContent API (/v1beta/models/google/gemini-3.1-flash-image:generateContent) tại https://api.sandbase.ai. Các ví dụ yêu cầu trên trang này cho thấy chính xác payload.

Google Nano Banana 2 (Gemini 3.1 Flash Image) có giá bao nhiêu?

$0.50 cho mỗi 1M token đầu vào và $3 cho mỗi 1M token đầu ra, tính phí theo từng yêu cầu từ số dư SandBase của bạn. Mức giảm giá, nếu có, được hiển thị trong phần giá trên trang này.

Cửa sổ ngữ cảnh của Google Nano Banana 2 (Gemini 3.1 Flash Image) là bao nhiêu?

131.1K token ngữ cảnh, với tối đa 32.8K token đầu ra cho mỗi phản hồi.

Google Nano Banana 2 (Gemini 3.1 Flash Image) hỗ trợ những tính năng nào?

Google Nano Banana 2 (Gemini 3.1 Flash Image) hỗ trợ vision (đầu vào hình ảnh), suy luận. Xem phần Specifications ở trên để biết danh sách đầy đủ.

Tôi có cần tài khoản Google riêng không?

Không. Chỉ cần một API key và số dư SandBase là bạn có thể truy cập Google Nano Banana 2 (Gemini 3.1 Flash Image) và các model khác trong danh mục; bạn không cần đăng ký riêng với Google.