Requesty
Claude Code

Claude Code on any model, billed per token

Point Claude Code at Requesty with two environment variables. Switch between Claude, GPT, Gemini and DeepSeek with one setting, fail over when a provider throttles, and see what every branch costs.

Read the setup guide
two environment variables600+ modelsEU endpoint in Frankfurt
~/.claude/settings.json
via requesty
{
  "env": {
    "ANTHROPIC_BASE_URL": "https://router.requesty.ai",
    "ANTHROPIC_AUTH_TOKEN": "your_requesty_api_key",
    "ANTHROPIC_MODEL": "anthropic/claude-fable-5"
  }
}
Setup

Set up Claude Code in three steps

Claude Code reads the Anthropic variables, so the gateway sits in front of it without a plugin. Prefer not to edit JSON? The Requesty CLI starts Claude Code on Requesty with requesty claude.

  1. 01
    Create a key

    Make an API key on the API Keys page. Give each developer or agent its own key, so each one carries its own spend cap.

  2. 02
    Set the variables

    Put ANTHROPIC_BASE_URL and ANTHROPIC_AUTH_TOKEN in the env block of ~/.claude/settings.json, or export them in your shell. ANTHROPIC_MODEL sets the default model.

  3. 03
    Run claude

    Start a session as usual. Each request shows up in the Requesty analytics dashboard within seconds, with tokens, cost and latency.

zsh
shell
export ANTHROPIC_BASE_URL="https://router.requesty.ai"
export ANTHROPIC_AUTH_TOKEN="your_requesty_api_key"
export ANTHROPIC_MODEL="anthropic/claude-fable-5"

claude
Models

Run Claude Code on GPT, Gemini, DeepSeek or Claude

Any model ID from the Model Library works in ANTHROPIC_MODEL or with claude --model. Requesty serves every one of them on the Anthropic Messages format Claude Code speaks.

Use the variable rather than /model: Claude Code sometimes rejects model names it does not recognise in the picker.

ANTHROPIC_MODEL
via requesty
Model IDs that work here
anthropic/claude-fable-5Anthropic
openai/gpt-6.1-solOpenAI
vertex/gemini-3.8-flashGoogle, on Vertex
deepseek/deepseek-v4.1-flash-1017DeepSeek
bedrock/claude-sonnet-5-5@eu-central-1Claude on Bedrock, Frankfurt
policy/claude-auto-coderyour own routing policy
92%

prompt-cache hit rate on Claude Code traffic through the gateway, April 2026. It is what keeps a long session affordable.

Open data note

209

calls in a P95 Claude Code session. One unretried throttle anywhere in the run is a dead task.

Open data note

99.25%

eventual success on a routing policy in April 2026, against 85.01% for callers pinned to one provider.

Open data note

Cost attribution

Know what every branch costs

One install script tags each Claude Code session with the git branch, repo, user and Claude Code version, so spend breaks down the way your team works.

  • Cost per branch and repoHeaders set at launch, stripped before the request reaches a provider
  • A key per developerIts own monthly cap, alerts and revocation
  • Fallback on 429sSet ANTHROPIC_MODEL to a policy and a throttle moves to the next model
keys / sk-agent-eval
capped
monthly cap$500 / $500
requests refused until the cap is raised
80% of the cap
email to the key owner
14 Apr
95% of the cap
webhook to #ai-spend
16 Apr
cap reached
key paused, other keys unaffected
17 Apr

The loop stopped at the ceiling, not at the invoice.

Questions

Claude Code with Requesty, answered

How do I use Claude Code with other models like GPT, Gemini or DeepSeek?

Set ANTHROPIC_BASE_URL to https://router.requesty.ai and ANTHROPIC_AUTH_TOKEN to your Requesty API key, then set ANTHROPIC_MODEL to any model ID from the Model Library, for example openai/gpt-6.1-sol or deepseek/deepseek-v4.1-flash-1017. Requesty serves every model on the Anthropic Messages format Claude Code expects, so nothing else changes.

What environment variables does Claude Code need to use a gateway?

Two are required: ANTHROPIC_BASE_URL, the gateway URL (https://router.requesty.ai), and ANTHROPIC_AUTH_TOKEN, your Requesty API key, sent as a Bearer token. ANTHROPIC_MODEL sets the default model and ANTHROPIC_SMALL_FAST_MODEL the model for background tasks. Put them in the env block of ~/.claude/settings.json or export them in your shell.

Can I use Claude Code with an API key instead of a Pro or Max subscription?

Yes. With ANTHROPIC_AUTH_TOKEN set to a Requesty key, Claude Code authenticates against Requesty and you pay per token from your Requesty balance: the provider price plus 5%. No Claude subscription is needed.

How do I avoid Claude Code usage limits?

Usage limits belong to the Claude Pro and Max plans. Billed per token through an API key, a session runs until the spend cap you set, not a plan quota. Providers still throttle with 429s, so set ANTHROPIC_MODEL to a fallback policy and a throttled request retries on the next model in the chain.

How do I change the model in Claude Code?

Set ANTHROPIC_MODEL in ~/.claude/settings.json for a default, or start one session with claude --model "openai/gpt-5.4". We recommend the variable over the /model command, which Claude Code sometimes rejects for model names it does not know.

How much does Claude Code cost through Requesty?

You pay the provider's token price plus 5%, with no subscription. Claude Code resends long context on every turn, and the prompt-cache hit rate on Claude Code traffic through the gateway was 92% in April 2026, which keeps long sessions affordable. A monthly cap on each key bounds the worst case.

How do I roll Claude Code out to a team with budgets?

Create one Requesty key per developer, each with a monthly spend cap, and distribute the base URL and key through your usual config management. Caps also exist per user, team and organization. Add the analytics wrapper to break spend down by branch, repo and developer.

Can I run Claude Code on Bedrock or Vertex through Requesty?

Yes. Use a provider-prefixed model ID such as bedrock/claude-sonnet-5-5@eu-central-1 or vertex/claude-sonnet-5-5 in ANTHROPIC_MODEL. Requesty handles the cloud provider side, so Claude Code only needs your Requesty key.

Does Claude Code work with the EU endpoint?

Set ANTHROPIC_BASE_URL to https://router.eu.requesty.ai and requests go through the Frankfurt gateway. Pair it with an EU-hosted model, such as an ID ending in @eu-central-1, when the inference itself has to stay in the EU.

Run Claude Code on Requesty

600+ models, a spend cap on every key, and every session on the record.

Speak to founders