AgentRouter.org 目前提供免费的Claude API中转服务,通过GitHub账号登录即可获得:
# 使用pnpm(推荐)
pnpm install -g @anthropic-ai/claude-code
# 或使用npm
npm install -g @anthropic-ai/claude-code
# 必须设置的基础URL
export ANTHROPIC_BASE_URL=https://agentrouter.org/
# 从AgentRouter后台获取的鉴权信息
export ANTHROPIC_AUTH_TOKEN=your_token_here
export ANTHROPIC_API_KEY=your_sk_key_here
多账号策略:
当前仅需GitHub账号登录,后期可通过更换GitHub账号获取新额度
开发建议:
Claude在以下场景表现优异:
额度监控:
建议定期在AgentRouter后台检查剩余额度
优化说明: