Skip to content
All use cases

Keys behind Claude Code

Several provider keys behind Claude Code

Save keys for more than one provider. Claude Code keeps one URL, and AnyRouter tries the next provider when one fails.

What this is for

One revoked, paused or capped key stops Claude Code mid-task. Swapping keys in your shell by hand loses the session.

How the request flows

Claude Code
AnyRouter
Anthropic keytried first
OpenRouter keyif the first fails

Steps, then copy

  1. 1.Add a key for one provider under Dashboard → BYOK, then add a key for a second provider, such as OpenRouter.
  2. 2.On each provider card, keep the Fallback strategy. Round Robin and Weighted spread requests across a provider's keys instead.
  3. 3.Run anyr claude. anyrouter/coding picks from every model your saved keys can reach and moves on if a provider is busy.
anyr CLI
bash
curl -fsSL https://anyrouter.dev/setup.sh | bash
anyr claude --model anyrouter/coding

Limits

  • Keys for one provider should come from one account you own. A second key there is redundancy against a revoked key, not more rate limit.
  • Fallback moves to the next key on a rate limit or provider error. If every key fails, the provider's error comes back.
  • A key that fails repeatedly is marked unhealthy and skipped until it recovers.

Ready to try it

The guide has the full walkthrough. Sign up if you still need a key.