Quick Setup
The easiest way to integrate Requesty with Claude Code is through environment variables:-
Set Environment Variables
- Get Your API Key Create your API key on the API Keys Page in the platform.
- Choose Your Model You can now use any Requesty model by configuring the model setting in Claude Code.
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.
Advanced Configuration
Using Settings Files
For more control, you can configure Claude Code using settings files. Create or edit your settings file: Global Settings:~/.claude/settings.json
.claude/settings.json
Model Selection
You can choose any model from the Model Library. Model IDs follow this format:-
Standard Models:
provider/model-name
anthropic/claude-3-7-sonnet
openai/gpt-4o
google/gemini-2.0-flash-exp
mistral/mistral-large-2411
-
Coding-Optimized Models:
coding/model-name
coding/claude-3-7-sonnet
coding/gpt-4o
Coding-optimized models provide auto caching of prompts and handle compatibility with reasoning models for better coding experiences.
Command Line Configuration
You can also configure Claude Code using the command line: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
Smart Routing
Intelligent routing to the best available endpoint for optimal performance
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
- 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_URL
is set tohttps://router.requesty.ai
- Check your
ANTHROPIC_API_KEY
is correct - Ensure you have internet connectivity
Environment Variables Not Working
Environment variables might not persist between sessions. Add them to your shell profile: For bash/zsh:For more advanced configuration options, check out the Claude Code Settings
Documentation.