两者的共同点
两者都在许多供应商前面提供一个兼容 OpenAI 的 API,所以换模型只是改一个字符串。OpenRouter 称自己是 OpenAI 的直接替代,并在一个端点后提供数百个模型。AnyRouter 的目录在 anyrouter.dev/models 实时更新,价格按每 1M token 计。
本页的 OpenRouter 数字都是在 2026 年 10 月 16 日 从链接页面读取的。凡是无法找到来源的 OpenRouter 说法,我们都没有写。
并排对比
| AnyRouter | OpenRouter | |
|---|---|---|
| 购买额度 | 结账时加收银行卡处理商的 5% + $0.50。AnyRouter 一分不留(额度文档)。 | Standard 收 5.5% 手续费,最低 $0.80;Business 收 8%(FAQ、定价)。 |
| 自带供应商 key(BYOK) | 任何用量都不收费(BYOK 文档)。 | 每月标价推理用量 $25,000 以内不收费,超出部分收 5%(BYOK 文档)。 |
| 免费模型 | anyrouter/free 和 :free 模型:没有每日上限,每个 key 每分钟 2,400 次请求,需要登录(免费层)。 | :free 模型:每分钟 20 次请求;每天 50 次,购买过 $10 额度后每天 1,000 次(限制)。 |
| 套餐 | Free、Go($2/月,实收 $2.63,含 $4 额度)、Pro、Pro+ 和 Max。见定价。 | Standard 和 Business 按量付费,Free 不收费,另有按合同的 Enterprise。定价页没有列出任何一个的月费(定价)。 |
刷卡购买时两行手续费的大小接近,所以手续费不是选择任何一方的理由。区别在于谁拿走它:在 AnyRouter,处理商收走,我们不收;在 OpenRouter,那是 OpenRouter 的费用。BYOK 这一行只有在你通过自己的 key 大量消费时才有意义。
什么时候 OpenRouter 更合适
- 你需要某个只有一边目录里有的模型。迁移前请在两边的列表里核对你用到的确切 id。
- 你乐于向一个供应商购买额度,不使用自己的供应商 key,也不用编码代理。
- 你已经在用它,上表里没有任何一项对你构成问题。
AnyRouter 更合适的情况:你想要没有每日上限的免费模型,你通过自己的 key 路由,或者你运行 Claude Code 或 Codex,并希望用一条命令完成设置。
迁移:改 base URL 和 key
对兼容 OpenAI 的客户端,只需改两个值。其余一切,包括流式输出和错误处理,都保持不变。
| 设置 | OpenRouter | AnyRouter |
|---|---|---|
| Base URL | https://openrouter.ai/api/v1 | https://anyrouter.dev/api/v1 |
| API key | OpenRouter key | 你的 key,以 sk-ar- 开头 |
| 模型 | provider/model | AnyRouter 目录中的 provider/model |
import os
from openai import OpenAI
# before: base_url="https://openrouter.ai/api/v1", api_key=OPENROUTER_API_KEY
client = OpenAI(
base_url="https://anyrouter.dev/api/v1",
api_key=os.environ["ANYROUTER_API_KEY"], # sk-ar-...
)
resp = client.chat.completions.create(
model="anyrouter/free",
messages=[{"role": "user", "content": "Say hello in one sentence."}],
)
print(resp.choices[0].message.content)curl https://anyrouter.dev/api/v1/chat/completions \
-H "Authorization: Bearer $ANYROUTER_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "anyrouter/free",
"messages": [{"role": "user", "content": "Say hello in one sentence."}]
}'curl -fsSL https://anyrouter.dev/setup.sh | bash
anyr claude --model anyrouter/free- 在控制台创建 key,并保存为
ANYROUTER_API_KEY。 - 在客户端配置里替换 base URL 和 key。
- 用
GET https://anyrouter.dev/api/v1/models列出你调用的模型,确认每个 id 都存在。有些 id 在两个目录之间不同,未知 id 会返回 404。 - 保留你的
provider偏好(only、ignore、order、sort、max_price、allow_fallbacks)以及HTTP-Referer和X-Title请求头。AnyRouter 会读取它们。 - 发一个请求,在请求日志里确认。
如果你的应用用 OpenRouter 的 OAuth PKCE 流程让用户登录,同样的流程在这里也适用。替换 /auth URL 和密钥交换中的主机即可。完整步骤,包括价格上限和回退,见迁移指南。
先在免费模型上试:一个 key,不需要绑卡。
创建 key常见问题
相关文章
Run Claude Code on free models in two lines
Install the anyr CLI, then run anyr claude. Claude Code works on AnyRouter's free models with no card. Exact commands, the manual setup, which models to try, and the limits.
OpenRouter alternative: what to compare before you switch
Looking for an OpenRouter alternative? Compare markup, bring-your-own-keys, billing, and lock-in — then see where AnyRouter lands. No invented benchmarks.
OpenRouter alternatives 2026: how AnyRouter differs
OpenRouter alternatives 2026, without invented rankings: AnyRouter is one OpenRouter alternative with $0-markup BYOK, a donated shared pool, a $2/mo Go plan, Cloudflare-edge routing, on-device models via local relay, a built-in MCP server, and open pricing config.
AnyRouter pricing: Free vs Go (the $1 posts are wrong)
Older pages still say $1 Go — wrong. Free has no monthly credits; anyrouter/free has no daily cap. Go is $2/mo ($2.63 charged) → $4. Pro $10 ($11.05) → $20; Pro+ $45 ($47.89) → $100; Max $100 ($105.79) → $300.
