Skip to content
All use cases

Keys behind Claude Code

Several provider keys behind Claude Code

Save more than one key, for one provider or for several. Claude Code keeps one URL, and AnyRouter tries the next key 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
Key 1tried first
Key 2if key 1 fails

Steps, then copy

  1. 1.Add your first key under Dashboard → BYOK, then add a second key on the same provider card, or a key for another provider.
  2. 2.On the provider card, keep the Fallback strategy and set each key's priority. Round Robin and Weighted spread requests 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 from the same provider account share that account's limits. A second key adds redundancy, not capacity.
  • Use keys from accounts you own, and follow each provider's terms.
  • 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.