跳转到主要内容
Gemini 3 Pro Preview (Stream) 提供基于 Google Gemini 3 Pro Preview 模型的流式文本生成服务,通过 AnyFast 代理访问。响应通过 Server-Sent Events (SSE) 实时传输。

核心能力

  • SSE 流式输出 — 实时逐 Token 传输响应
  • 思考模式 — 支持思考配置以增强推理能力
  • 多轮对话 — 支持系统指令的复杂对话
  • 安全过滤 — 可配置的内容安全过滤器

快速示例

curl "https://www.anyfast.ai/v1beta/models/gemini-3-pro-preview:streamGenerateContent?key=YOUR_API_KEY&alt=sse" \
  -H "Content-Type: application/json" \
  -d '{
    "contents": [
      {
        "role": "user",
        "parts": [{ "text": "写一首关于大海的短诗。" }]
      }
    ],
    "generationConfig": {
      "temperature": 1,
      "topP": 1,
      "thinkingConfig": {
        "includeThoughts": true,
        "thinkingBudget": 26240
      }
    }
  }'

参数说明

参数类型必填说明
keystringAPI 密钥(查询参数)
altstring设为 sse 以启用 SSE 流式输出
contentsarray{ role, parts } 对象数组
systemInstructionobject包含 parts 数组的系统指令
generationConfig.temperaturefloat02,控制随机性,默认 1
generationConfig.topPfloat核采样阈值,默认 1
generationConfig.thinkingConfigobject思考模式配置
safetySettingsarray内容安全过滤设置

API 参考

查看 Gemini 3 Pro Preview (Stream) 的交互式 API Playground。