Google Vertex AI logo
Google Vertex AI

Gemini 2.5 Flash (Vertex AI)

Google Vertex AI 快速多模态模型,支持超长上下文,企业级可靠性

类型 文本模型 Model ID google/gemini-2.5-flash
上下文长度1M tokens
模型类型多模态大语言模型
多模态文本、图像、音频、视频

定价与规格

💰 定价

输入$0.3 / M tokens
输出$2.5 / M tokens

⚙️ 规格

上下文长度1M tokens
模型类型多模态大语言模型
多模态文本、图像、音频、视频
平台Google Vertex AI

API 调用示例

Python

from openai import OpenAI

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

response = client.chat.completions.create(
    model="google/gemini-2.5-flash",
    messages=[
        {"role": "user", "content": "Hello!"}
    ]
)

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

cURL

curl https://api.xairouter.com/v1/chat/completions \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -d '{
    "model": "google/gemini-2.5-flash",
    "messages": [
      {"role": "user", "content": "Hello!"}
    ]
  }'