gemini-3.1-flash-image-preview
Google image
輸入$0.5/M
輸出$60/M
知識截止2025-01
廠商牌價,無平台加價,按用量計費。 以下為官方 list 價。已登入的使用者可在 /console/pricing 查看含工作空間折扣的實際價格。
30 秒用上 gemini-3.1-flash-image-preview
OpenAI 相容:換掉 base_url,SDK 不用改。POST /v1/images/generations
from openai import OpenAI
client = OpenAI(
base_url="https://synthorai.io/v1",
api_key="sk-syn-...",
)
resp = client.images.generate(
model="gemini-3.1-flash-image-preview",
prompt="a watercolor lighthouse at dawn",
size="1024x1024",
)
print(resp.data[0].b64_json[:80])import OpenAI from "openai";
const client = new OpenAI({
baseURL: "https://synthorai.io/v1",
apiKey: "sk-syn-...",
});
const resp = await client.images.generate({
model: "gemini-3.1-flash-image-preview",
prompt: "a watercolor lighthouse at dawn",
size: "1024x1024",
});
console.log(resp.data?.[0]?.b64_json?.slice(0, 80));curl https://synthorai.io/v1/images/generations \
-H "Authorization: Bearer sk-syn-..." \
-H "Content-Type: application/json" \
-d '{
"model": "gemini-3.1-flash-image-preview",
"prompt": "a watercolor lighthouse at dawn",
"size": "1024x1024"
}'package main
import (
"context"
"fmt"
"github.com/openai/openai-go/v3"
"github.com/openai/openai-go/v3/option"
)
func main() {
client := openai.NewClient(
option.WithBaseURL("https://synthorai.io/v1"),
option.WithAPIKey("sk-syn-..."),
)
resp, _ := client.Images.Generate(context.TODO(), openai.ImageGenerateParams{
Model: "gemini-3.1-flash-image-preview",
Prompt: "a watercolor lighthouse at dawn",
Size: "1024x1024",
})
fmt.Println(resp.Data[0].B64JSON[:80])
}import com.openai.client.OpenAIClient;
import com.openai.client.okhttp.OpenAIOkHttpClient;
import com.openai.models.images.*;
OpenAIClient client = OpenAIOkHttpClient.builder()
.baseUrl("https://synthorai.io/v1")
.apiKey("sk-syn-...")
.build();
ImagesResponse resp = client.images().generate(
ImageGenerateParams.builder()
.model("gemini-3.1-flash-image-preview")
.prompt("a watercolor lighthouse at dawn")
.size("1024x1024")
.build());
System.out.println(resp.data().orElseThrow().get(0).b64Json().orElseThrow().substring(0, 80));關於 gemini-3.1-flash-image-preview
解析度擴充套件至 0.5K–4K
1:4、8:1 等極端寬高比
影像搜尋接地融合網頁結果
Gemini 3.1 Flash Image(preview),市場名稱 Nano Banana 2,以低延遲提供高品質影像生成和對話式編輯,是 Nano Banana Pro 的高效搭檔。
- 相比更早的 Nano Banana 一代,官方頁面強調擴充套件的解析度支援(0.5K、1K、2K 和 4K)、1:4 和 8:1 等新的極端寬高比、融合網頁文本與影像結果的影像搜尋接地(Image Search Grounding),以及改進的寬高比遵循、影像一致性和多語種文字渲染。
- 輸入 token 最高 131,072,輸出 32,768。
- Synthorai 透過其 OpenAI 相容 API 提供該模型。
規格與限制
| 最大輸出(廠商規格) | 32,768 |
| 模態 | text + image → image + text |
| 特性 | vision · batch · reasoning |
| 圖像能力 | 0.5K/2K/4K output (default 1K); conversational image editing; extended aspect ratios incl. 1:4, 4:1, 1:8, 8:1; improved i18n text rendering; search grounding supported |
| 備註 | Gateway preview id has no live official page; GA model code is gemini-3.1-flash-image (released 2026-05-28); caching, function calling, structured outputs not supported. |
常見問題
gemini-3.1-flash-image-preview API 可以免費試用嗎?
可以,新帳號可獲得 10 次試用呼叫和最高 $1 的免費額度,無需信用卡。足以在新增付款方式之前,用真實工作負載試試 gemini-3.1-flash-image-preview。
gemini-3.1-flash-image-preview 最擅長什麼?
解析度擴充套件至 0.5K–4K,以及1:4、8:1 等極端寬高比和影像搜尋接地融合網頁結果。完整能力請見 About 一節,內容取自廠商官方發布說明。
gemini-3.1-flash-image-preview 的價格是多少?
在 Synthorai 上,gemini-3.1-flash-image-preview 輸入 $0.5/百萬 token、輸出 $60/百萬 token,即廠商牌價,無平台加價。
如何呼叫 gemini-3.1-flash-image-preview API 生成圖片?
向 Synthorai 的 /v1/images/generations 發送 POST,model="gemini-3.1-flash-image-preview"。這是標準 OpenAI images API 形式,無需廠商 SDK。
如何開通 gemini-3.1-flash-image-preview?
把現有 OpenAI SDK 的 base_url 指向 "https://synthorai.io/v1",model 設為 "gemini-3.1-flash-image-preview" 即可。一組 API key 通用閘道上的所有模型。