Anthropic Direct API
Use your Anthropic API key directly to access Claude models without going through CLIProxy. Perfect for users who already have Anthropic subscriptions and want direct API control.Overview
Quick Start
Authentication
Getting Your API Key
1
Visit Anthropic Console
Go to console.anthropic.com
2
Navigate to API Keys
Click on your profile → Settings → API Keys
3
Create New Key
Click Create Key and copy the generated keyFormat:
sk-ant-...Keep this key secure. Treat it like a password. Do not commit to git or share publicly.
4
Create CCS Profile
Rotating Keys
When you need to change your API key:Configuration
Default Setup
Manual Configuration
Edit~/.ccs/config.yaml:
Custom Base URL (Advanced)
For organizations using Anthropic Workbench or custom deployments:Available Models
Claude 5 Series (Latest)
Claude 4.8 Series
Opt in explicitly via
ANTHROPIC_MODEL or the dashboard; the default profile model is unchanged.
Claude 4.6 Series
Claude 4.5 Series
Claude 3 Series (Previous)
Usage Examples
Basic Chat
Model Selection
Temperature and Creativity
Response Length Control
API Features Supported
Full Feature Support
Direct Anthropic API access supports all Claude features:- ✅ Vision (image analysis)
- ✅ Extended thinking
- ✅ Tool use (function calling)
- ✅ Batch processing
- ✅ Long context (200K tokens)
- ✅ Token counting
- ✅ Streaming
How to Enable
Billing & Rate Limits
Usage Tracking
Check your API usage:Rate Limits
Default limits (can be increased):Enterprise users can request higher limits at Anthropic console.
Cost Estimation
Visit console.anthropic.com/pricing for current rates.
Rates are per million tokens.
Typical usage:
- Claude 3.5 Sonnet: ~$3-10/month for light use
- Extended thinking: Additional cost based on thinking tokens
Comparison with CLIProxy Providers
Troubleshooting
Invalid API Key
Symptom:Error: 401 Unauthorized or Invalid authentication credentials
Solutions:
- Verify key starts with
sk-ant- - Check key hasn’t expired or been revoked
- Copy key again from console.anthropic.com/settings/keys
- Update with:
ccs api create --preset anthropic
Rate Limited
Symptom:Error: 429 Too Many Requests or Rate limit exceeded
Solutions:
- Wait a few minutes before retrying
- Reduce concurrent requests
- Use Haiku for high-volume tasks (cheaper, faster)
- Request higher limits at Anthropic console
Connection Timeout
Symptom:Error: Request timeout or ECONNREFUSED
Causes & Solutions:
- Network issue — Check internet connection
- API down — Check Anthropic status
- Firewall blocked — Check firewall/proxy settings
Insufficient Balance
Symptom:Error: Insufficient balance or Credit limit exceeded
Solutions:
- Check remaining balance at console.anthropic.com/dashboard
- Add payment method or credits
- Switch to lower-cost model (Haiku)
Cost Optimization
Use Right Model for Task
Limit Response Length
Batch Processing
For bulk operations, use Anthropic’s Batch API (available through direct API):Storage Locations
Security Best Practices
- Never commit API keys — Use
.gitignorefor config files - Rotate keys regularly — Generate new keys, revoke old ones
- Use environment variables — For CI/CD pipelines instead of files
- Monitor usage — Check console.anthropic.com regularly for suspicious activity
- Limit key scope — Create separate keys for different applications if possible
Next Steps
API Profiles
Learn more about creating and managing API profiles
Claude Accounts
Compare with OAuth-based Claude accounts
All Providers
Explore other available providers
Dashboard
Manage profiles via web interface
