基礎 URL、請求方法與必要請求頭,皆依當前模型的協議模板渲染。

Nano Banana 2 Lite (Gemini 3.1 Flash Lite Image)
The lightest image model in its series, producing images in about four seconds with consistent character rendering and precise edits. Suited for high-throughput pipelines and interactive visual iteration.
價格
| Token 類型 | 輸入 | 輸出 | 快取讀 | 快取寫 |
|---|---|---|---|---|
| 文字 | $0.25/ M tokens | $1.5/ M tokens | $0/ M tokens | $0/ M tokens |
| 圖片 | $0/ M tokens | $30/ M tokens | $0/ M tokens | $0/ M tokens |
快速開始
可直接貼上執行下方範例程式碼。Gate.AI API 與 OpenAI 相容,多數 SDK 只需替換 base URL;切換模型時,只需修改模型 ID。
Get your API key
Sign in to the Gate.AI console and create a key under "API Keys". Keep it secure and send it in the Authorization header.
前往控制台建立金鑰Make a non-streaming request
Send a POST request to the Gemini GenerateContent endpoint with text in contents. The endpoint returns a complete JSON response.
curl --location \
--request POST "https://api.gate.ai/gemini/v1beta/models/gemini-3.1-flash-lite-image:generateContent" \
--header "Authorization: Bearer {API_KEY}" \
--header "Content-Type: application/json" \
--data-raw '{"contents":[{"role":"user","parts":[{"text":"hello"}]}]}'Make a streaming request
Call the Gemini StreamGenerateContent endpoint with alt=sse. The server returns generated content using Server-Sent Events.
curl --no-buffer --location \
--request POST "https://api.gate.ai/gemini/v1beta/models/gemini-3.1-flash-lite-image:streamGenerateContent?alt=sse" \
--header "Authorization: Bearer {API_KEY}" \
--header "Content-Type: application/json" \
--data-raw '{"contents":[{"role":"user","parts":[{"text":"hello"}]}]}'端點
基礎 URL、請求方法與必要請求頭,皆依當前模型的協議模板渲染。
基礎 URL、請求方法與必要請求頭,皆依當前模型的協議模板渲染。
基礎 URL、請求方法與必要請求頭,皆依當前模型的協議模板渲染。
相關模型
Gemini 3.8 FlashFlash tier in Gemini 3.8 with gains over 3.7 Flash across software engineering, agent workflows, and multi-step reasoning.
Gemini 3.5 FlashDesigned for efficient multimodal AI tasks, offering strong coding, reasoning, real-time chat, and agent execution at Flash-tier cost and speed.
Gemini 3.1 Flash LiteA high-efficiency multimodal lite model for low-latency, high-volume workloads like translation, classification, and data extraction, priced at about half of Gemini 3 Flash.
Gemma-4-31BOpen-weights dense model with stronger math and coding, plus native function calling for self-hosted agent workflows.
Nano Banana 2 (Gemini 3.1 Flash Image)Mid-tier image generation and editing model in the series, with near-flagship visual quality at higher generation speed. Renders legible text and photorealistic subjects, suited for infographics and marketing visuals.
Gemini 3.1 ProGoogle's latest. Strong reasoning with native image and video.
Gemini 3 FlashSpeed-tier variant in the Gemini 3 line, pairing Pro-grade reasoning with Flash-level latency and cost, built for agent workflows and high-throughput interactive apps.
Nano Banana Pro (Gemini 3 Pro Image)Built-in reasoning; complex multi-turn creation; up to 4K; optional web grounding.
Nano Banana (Gemini 2.5 Flash Image)Built for fast generation and conversational editing; low latency and cost; multimodal text-and-image input.
Gemini 2.5 Flash LiteA lightweight reasoning model in the Gemini 2.5 family, optimized for ultra-low latency and cost efficiency, with faster token generation and higher throughput. Thinking is disabled by default but can be enabled via API.