Claude Code is Anthropic’s powerful AI coding assistant that works directly in your terminal and IDE. Using the Requesty integration, you can:Documentation Index
Fetch the complete documentation index at: https://docs.requesty.ai/llms.txt
Use this file to discover all available pages before exploring further.
- Use 300+ models while coding, giving you flexibility to choose the best model for each task.
- Track and manage your spend in a single location
- Keep a record of your conversations
Configuration
1. (Recommended) Setup using the settings file
You can configure Claude Code using the settings files. You will only have to edit it once. Create or edit your settings file:~/.claude/settings.json
And set the ANTHROPIC_BASE_URL and ANTHROPIC_AUTH_TOKEN values inside the env block:
2. Quick setup using environment variables
You can also integrate Requesty with Claude Code through environment variables:- Get Your API Key Create an API key on the API Keys Page.
-
Set Environment Variables
We recommend using the
ANTHROPIC_MODEL environment variable, and not the /model directive as Claude might not accept it sometimes.-
(Optional) Enable Analytics
Additionally, you can track cost per branch, repo, and developer by installing the Requesty analytics wrapper:
Then restart your terminal or run
source ~/.zshrc(or~/.bashrc). Every Claude Code session will now automatically tag requests with your git branch, repo, and username — visible in your Requesty dashboard. -
Run Claude
Run
claudein your terminal.
With this setup, Claude Code will route all requests through Requesty, giving you access to models from OpenAI, Anthropic, Google,
Mistral, and many more providers.
Model Selection
You can choose any model from the Model Library or any policy configured for your organization. Standard model IDs follow the formatprovider/model-name:
anthropic/claude-3-7-sonnetopenai/gpt-4ogoogle/gemini-2.0-flash-expmistral/mistral-large-2411
policy/policy-name:
policy/reliable-sonnet-4-5
Command Line Configuration
You can also configure Claude Code using the command line:Claude Code Analytics
Track exactly how much each branch, repo, and developer costs in Claude Code. One command installs a lightweight shell wrapper that tags every Claude Code session with metadata — visible in your Requesty dashboards.What you get
- Cost per branch — see which feature branch is burning the most credits
- Cost per repo — break down spend across multiple repositories
- Cost per developer — know who’s spending what
- Agent version tracking — see which Claude Code version is generating spend
Install
source ~/.zshrc (or ~/.bashrc).
That’s it. Every Claude Code session will now automatically send these headers to Requesty:
| Header | Value |
|---|---|
X-Requesty-Branch | Current git branch |
X-Requesty-Repo | org/repo from git origin |
X-Requesty-Ai-Agent | Claude Code version |
X-Requesty-User | OS username |
Headers are set once at session launch and sent only to Requesty — they are stripped before forwarding to any AI provider. No data leaves Requesty’s gateway.
How it works
The installer appends a small shell function to your~/.zshrc or ~/.bashrc that wraps the claude command. Each time you start Claude Code, it reads your git context and sets ANTHROPIC_CUSTOM_HEADERS before launching. The wrapper is ~10 lines and fully visible in your rc file.
Uninstall
Remove the block between# --- Requesty header injection --- markers in your shell rc file, or just delete the claude() function.
Custom headers
You can add your ownX-Requesty-* headers for additional dimensions. See Request Metadata for more.
Benefits of Using Requesty with Claude Code
Access 300+ Models
Switch between models from different providers without changing your setup
Cost Management
Monitor spending and set limits across all your AI interactions
Fallback Policies
Automatic fallbacks ensure your coding sessions never get interrupted
Troubleshooting
Model Not Found
If you get a “model not found” error, make sure:- Your API key is valid and has access to the model (check the approved models in your organization)
- The model ID format is correct (
provider/model-name) - The model is available in the Model Library
Connection Issues
If Claude Code can’t connect:- Verify your
ANTHROPIC_BASE_URLis set tohttps://router.requesty.ai - Check your
ANTHROPIC_AUTH_TOKENis correct - Ensure you have internet connectivity