怎么接入
- 接口地址
- https://openrouter.ai/api/v1
- 密钥
- 请求头 Authorization: Bearer,密钥在 openrouter.ai 申请
- 写法
- 兼容 OpenAI。model 写成 厂商/模型,例如 deepseek/deepseek-v4-pro。
已收录的调用名:deepseek/deepseek-v4-pro、deepseek/deepseek-v3.2、anthropic/claude-sonnet-4.6、anthropic/claude-haiku-4.5、openai/gpt-5.4-mini、openai/gpt-4.1-mini、google/gemini-2.5-flash。官方接入说明
curl https://openrouter.ai/api/v1/chat/completions \
-H "Authorization: Bearer $OPENROUTER_API_KEY" \
-H "Content-Type: application/json" \
-d '{"model":"deepseek/deepseek-v4-pro","messages":[{"role":"user","content":"你好"}]}'
下表按一次调用 100 万输入 Token、20 万输出 Token 估算要花多少钱。
美元标价
| 模型 | 商家 | 渠道 | 输入 / 百万 | 输出 / 百万 | 缓存命中 / 百万 | 预计成本 | 核对 |
|---|---|---|---|---|---|---|---|
| DeepSeek V4 Pro | OpenRouter | Baidu | $0.1707 | $0.3414 | 未知 | $0.239 | 来源 |
| DeepSeek V4 Pro | OpenRouter | StreamLake | $0.2088 | $0.4176 | 未知 | $0.2923 | 来源 |
| DeepSeek V4 Pro | OpenRouter | Parasail | $0.45 | $3.48 | 未知 | $1.146 | 来源 |
| DeepSeek V4 Pro | OpenRouter | Cloudflare | $1.15 | $2.55 | 未知 | $1.66 | 来源 |
| DeepSeek V3.2 | OpenRouter | GMICloud | $0.2088 | $0.3096 | 未知 | $0.2707 | 来源 |
| DeepSeek V3.2 | OpenRouter | SiliconFlow | $0.259 | $0.80 | 未知 | $0.419 | 来源 |
| DeepSeek V3.2 | OpenRouter | DeepInfra | $0.26 | $0.38 | 未知 | $0.336 | 来源 |
| DeepSeek V3.2 | OpenRouter | AtlasCloud | $0.26 | $0.38 | 未知 | $0.336 | 来源 |
| DeepSeek V3.2 | OpenRouter | Venice | $0.2683 | $0.3902 | 未知 | $0.3463 | 来源 |
| DeepSeek V3.2 | OpenRouter | Baidu | $0.28 | $0.42 | 未知 | $0.364 | 来源 |
| Claude Sonnet 4.6 | OpenRouter | Anthropic | $3.00 | $15.00 | $0.30 | $6.00 | 来源 |
| Claude Sonnet 4.6 | OpenRouter | Amazon Bedrock 美国 | $3.30 | $16.50 | 未知 | $6.60 | 来源 |
| Claude Sonnet 4.6 | OpenRouter | Google 欧洲 | $3.30 | $16.50 | 未知 | $6.60 | 来源 |
| Claude Haiku 4.5 | OpenRouter | 标准档 | $1.00 | $5.00 | $0.10 | $2.00 | 来源 |
| GPT-5.4 mini | OpenRouter | OpenAI 标准档 | $0.75 | $4.50 | $0.075 | $1.65 | 来源 |
| GPT-5.4 mini | OpenRouter | OpenAI Flex | $0.375 | $2.25 | 未知 | $0.825 | 来源 |
| GPT-5.4 mini | OpenRouter | OpenAI 快速档 | $1.50 | $9.00 | 未知 | $3.30 | 来源 |
| GPT-4.1 mini | OpenRouter | 标准档 | $0.40 | $1.60 | $0.10 | $0.72 | 来源 |
| Gemini 2.5 Flash | OpenRouter | Google AI Studio 标准 | $0.30 | $2.50 | $0.03 | $0.80 | 来源 |
| Gemini 2.5 Flash | OpenRouter | Google AI Studio Flex | $0.15 | $1.25 | 未知 | $0.40 | 来源 |
| Gemini 2.5 Flash | OpenRouter | Google AI Studio 优先 | $0.54 | $4.50 | 未知 | $1.44 | 来源 |