Google AI Studio logo
Google AI Studio

Gemini 3 Pro (AI Studio)

Google AI Studio 2025 最新前沿多模态模型,突破性推理能力和卓越性能

类型 文本模型 Model ID gemini-3-pro-preview
上下文长度1M tokens
输出长度64K tokens
模型类型多模态大语言模型

定价与规格

💰 定价

输入$2.0 / M tokens
输出$12.0 / M tokens

⚙️ 规格

上下文长度1M tokens
输出长度64K tokens
模型类型多模态大语言模型
多模态文本、图像、音频、视频、代码
训练截止日期2025年1月
API 支持Gemini API / OpenAI API
提供商Google AI Studio

API 调用示例

Python (OpenAI SDK)

from openai import OpenAI

client = OpenAI(
    api_key="your-api-key",
    base_url="https://api.xairouter.com/v1"
)

response = client.chat.completions.create(
    model="gemini-3-pro-preview",
    messages=[
        {"role": "user", "content": "解释一下量子纠缠的原理"}
    ]
)

print(response.choices[0].message.content)

cURL (OpenAI API)

curl https://api.xairouter.com/v1/chat/completions
  -H "Content-Type: application/json"
  -H "Authorization: Bearer YOUR_API_KEY"
  -d '{
    "model": "gemini-3-pro-preview",
    "messages": [
      {"role": "user", "content": "解释一下量子纠缠的原理"}
    ]
  }'

开发者辅助

# 下载最新版本
npm install -g @google/gemini-cli@latest

# 注意:按量付费和包月付费请二选一,不要同时配置!

# ===== Linux/macOS 按量付费配置 =====
export GOOGLE_GEMINI_BASE_URL="https://api.xairouter.com"
export GEMINI_API_KEY="sk-Xvs..."
export GEMINI_MODEL="gemini-3-pro-preview"

# ===== Linux/macOS 包月付费配置 =====
# export CODE_ASSIST_ENDPOINT="https://api.xairouter.com"
# export GOOGLE_CLOUD_ACCESS_TOKEN="sk-Xvs..."
# export GOOGLE_GENAI_USE_GCA="true"
# export GEMINI_MODEL="gemini-3-pro-preview"

# ===== Windows CMD 按量付费配置 =====
set GOOGLE_GEMINI_BASE_URL=https://api.xairouter.com
set GEMINI_API_KEY=sk-Xvs...
set GEMINI_MODEL=gemini-3-pro-preview

# ===== Windows CMD 包月付费配置 =====
# set CODE_ASSIST_ENDPOINT=https://api.xairouter.com
# set GOOGLE_CLOUD_ACCESS_TOKEN=sk-Xvs...
# set GOOGLE_GENAI_USE_GCA=true
# set GEMINI_MODEL=gemini-3-pro-preview

# ===== Windows PowerShell 按量付费配置 =====
$env:GOOGLE_GEMINI_BASE_URL="https://api.xairouter.com"
$env:GEMINI_API_KEY="sk-Xvs..."
$env:GEMINI_MODEL="gemini-3-pro-preview"

# ===== Windows PowerShell 包月付费配置 =====
# $env:CODE_ASSIST_ENDPOINT="https://api.xairouter.com"
# $env:GOOGLE_CLOUD_ACCESS_TOKEN="sk-Xvs..."
# $env:GOOGLE_GENAI_USE_GCA="true"
# $env:GEMINI_MODEL="gemini-3-pro-preview"

# 启动 Gemini CLI
gemini