全部模型 / Google
gemini-3.1-pro-preview
数据同步于
| 输入 | 缓存读取 | 输出 | |
|---|---|---|---|
| Standard 默认 | $1.60 超过 200K: $3.20 / $14.40 | $0.16 | $9.60 |
| Saver | $1.00 超过 200K: $2.00 / $9.00 | $0.10 | $6.00 |
| Spot | $0.60 超过 200K: $1.20 / $5.40 | $0.060 | $3.60 |
| Official | $2.00 超过 200K: $4.00 / $18.00 | $0.20 | $12.00 |
| OpenAI Chat Completions | |
| > 200K | |
| Standard · Saver · Spot · Official | |
| · |
| 10M in + 1M out | $25.60 |
| 100M in + 20M out | $352 |
curl https://api.xhuoapi.ai/v1/chat/completions \
-H "Authorization: Bearer $XHUO_API_KEY" \
-H "Content-Type: application/json" \
-d '{"model": "gemini-3.1-pro-preview", "messages": [{"role": "user", "content": "Hello"}]}'
from openai import OpenAI
client = OpenAI(base_url="https://api.xhuoapi.ai/v1", api_key="YOUR_XHUOAPI_KEY")
resp = client.chat.completions.create(
model="gemini-3.1-pro-preview",
messages=[{"role": "user", "content": "Hello"}],
)
print(resp.choices[0].message.content)