返回模型列表

Gemini 3.1 Flash Image

googlegoogle/gemini-3.1-flash-image

供应商自营与 TheRouter 服务形态的差异

供应商自己运营时

Google 原生 Gemini API 通过 generateContent 和 Gemini 专用图像生成指南描述 Gemini 图像模型。

在 TheRouter 上

TheRouter 通过 OpenAI 兼容 API 暴露同一模型 ID,使团队可将它与其他托管图像和多模态模型放在同一路由层,而无需直接调用 Google 原生 endpoint。

API 使用指南

多模态图像生成

将文本提示发送到 TheRouter 的 OpenAI 兼容 chat endpoint,并在需要均衡 Google 图像档位时指定 Gemini 3.1 Flash Image。

cURL
curl https://api.therouter.ai/v1/chat/completions \
  -H "Authorization: Bearer $THEROUTER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "google/gemini-3.1-flash-image",
    "messages": [
      {
        "role": "user",
        "content": "Create a square product hero image for a ceramic travel mug on a warm studio background."
      }
    ],
    "max_tokens": 1024
  }'

参考图编辑

可在应用层附加图像上下文,用同一模型处理编辑类提示;上线前应根据你的 TheRouter SDK 验证具体 payload 形态。

cURL
curl https://api.therouter.ai/v1/chat/completions \
  -H "Authorization: Bearer $THEROUTER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "google/gemini-3.1-flash-image",
    "messages": [
      {
        "role": "user",
        "content": "Using the provided product reference image, create a warmer lifestyle variant for an autumn landing page."
      }
    ],
    "max_tokens": 1024
  }'
事实档案 — 本页每条断言可在此回溯来源
来源URL采集于
访问状态ai.google.dev changelog ↗2026-08-05已核实
输入 / 输出模态ai.google.dev image generation docs ↗2026-08-05已核实
上下文窗口TheRouter API docs ↗2026-08-05已核实
最大输出TheRouter API docs ↗2026-08-05已核实
TheRouter 混合计费TheRouter API docs ↗2026-08-05已核实
Google 原生图像输出费率ai.google.dev pricing ↗2026-08-05已核实
TheRouter 支持参数TheRouter API docs ↗2026-08-05已核实
许可ai.google.dev image generation docs ↗2026-08-05已核实
Public benchmark suiteai.google.dev image generation docs ↗2026-08-05未知
Production latencyTheRouter API docs ↗2026-08-05未知
Image quality rankingai.google.dev image generation docs ↗2026-08-05未知
Nano Banana 2 Lite 成为新的默认 Gemini 图像端点:路由决策框架blog.google ↗2026-08-05已核实
2026 年 Gemini API 图像生成:preview 关停后修复 failed to fetchai.google.dev changelog ↗2026-08-05已核实
什么时候应选择 Gemini 3.1 Flash Image,而不是 Lite 或 Pro?ai.google.dev image generation docs ↗2026-08-05待核实
google/gemini-3.1-flash-image 是 preview ID 的替代品吗?ai.google.dev changelog ↗2026-08-05待核实
本页代码片段是否经过 live verification?TheRouter API docs ↗2026-08-05待核实
帮助与联系