#1
Vercel AI Gateway
models.global_route 🟢 211ms 🎁 每月 $5 团队免费额度 (每月刷新) (Vercel 全球边缘网络 Anycast)
Google 原生多模态旗舰 Flash 模型,原生支持图片、音视频及长文本,100万 Token 超大海量上下文。
按在线可用性与最低网络延迟智能排序,支持一键复制厂商专属 Model ID 并直达领 Key。
全量兼容 OpenAI SDK 规范,只需填入自己的 API Key 即可通过 Python 或 cURL 直接发起调用。
from openai import OpenAI
# 1. 替换为对应厂商领取的 API Key 与 Base URL (参见下方厂商雷达表)
client = OpenAI(
api_key="your_api_key_here",
base_url="https://api.siliconflow.cn/v1" # 示例: 硅基流动直连端点
)
response = client.chat.completions.create(
model="gemini-2.5-flash",
messages=[
{"role": "system", "content": "You are a helpful AI assistant."},
{"role": "user", "content": "Hello! Please introduce yourself briefly."}
],
temperature=0.6,
stream=True
)
for chunk in response:
if chunk.choices[0].delta.content:
print(chunk.choices[0].delta.content, end="", flush=True)
curl https://api.siliconflow.cn/v1/chat/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer your_api_key_here" \
-d '{
"model": "gemini-2.5-flash",
"messages": [
{"role": "user", "content": "Hello!"}
],
"temperature": 0.7
}'