Claude Code without the rate limits: using ANTHROPIC_BASE_URL for unlimited sessions
If you've used Claude Code for any serious project, you've hit this:
Claude AI usage limit reached
Your limit will reset at 9:00 AM
You're in flow. You're debugging a hairy async race condition. And now you wait.
Here's the environment variable that changes everything.
ANTHROPIC_BASE_URL
Claude Code respects one environment variable that most developers don't know about:
export ANTHROPIC_BASE_URL=https://your-api-proxy.com
When set, Claude Code routes ALL requests through that URL instead of Anthropic's servers. Same Claude. Same interface. Different backend.
This means:
- You control the rate limits
- You control the billing model
- You can use a flat-rate proxy instead of per-token pricing
Why this matters
Anthropic's Claude Code usage limits exist because they're billing you per token under the hood. Every message, every file read, every tool call costs tokens.
A flat-rate proxy decouples the usage from the per-token billing. You pay a fixed amount per month, the proxy absorbs the token costs.
Setting it up
# In your shell profile (~/.zshrc or ~/.bashrc)
export ANTHROPIC_BASE_URL=https://api.simplylouie.com
export ANTHROPIC_API_KEY=your-simplylouie-key
# Then reload
source ~/.zshrc
# Verify Claude Code picks it up
claude --version
Then just use Claude Code normally:
claude
No other changes. Same commands, same CLAUDE.md files, same slash commands — just no usage cap interrupting your flow.
What about CLAUDE.md?
Your existing CLAUDE.md files work exactly the same. The base URL only changes where requests go, not how Claude Code behaves.
# My project CLAUDE.md
## Tech stack
- Node.js 20
- PostgreSQL 16
- React 18
## Code style
- Prefer async/await over callbacks
- Always handle errors explicitly
- No console.log in production code
This still loads. Claude still reads it. Nothing changes in your workflow.
The rate limit math
Claude Code's rate limits reset every few hours. If you're doing a full refactor, you can easily hit limits 3-4 times in a day.
At $20/month for Claude Pro, you're paying for a usage cap that fires at the worst possible moments.
A flat-rate proxy at $2/month (SimplyLouie) removes that cap entirely. The math:
| Option | Cost | Rate Limits |
|---|---|---|
| Claude Pro | $20/month | Yes - hits during heavy sessions |
| API direct | Pay per token | Expensive at scale |
| Flat-rate proxy | $2/month | No hard caps |
The real use case: long refactoring sessions
Rate limits hit hardest during:
- Full codebase refactors — reading many files, many edits
- Debugging sessions — lots of back-and-forth tool calls
- Code review passes — reading entire directories
These are exactly the sessions where interruptions destroy flow state.
Checking your current usage
Before switching, you can check how often you're actually hitting limits:
# Check Claude Code logs
cat ~/.claude/logs/claude-*.log | grep -i 'rate limit\|usage limit\|limit reached' | wc -l
If that number is > 0, you've been interrupted at least once. The proxy eliminates those interruptions.
Setting up per-project
You can also set this per-project using a shell script:
# project-root/.claude-env.sh
export ANTHROPIC_BASE_URL=https://api.simplylouie.com
export ANTHROPIC_API_KEY=sl_your_key_here
# Add to your project README:
# source .claude-env.sh && claude
This lets you run the proxy for specific projects while keeping direct API access for others.
What the proxy actually does
A well-built proxy:
- Accepts OpenAI-compatible requests (Claude Code uses this format)
- Forwards to Anthropic with its own API key
- Returns responses transparently
- Handles retries and rate limit backoff internally
From Claude Code's perspective, it's talking to a normal API endpoint. The proxy handles the Anthropic relationship.
Try it
# Test the proxy with a direct curl
curl https://api.simplylouie.com/v1/messages \
-H 'x-api-key: your-key' \
-H 'anthropic-version: 2023-06-01' \
-H 'content-type: application/json' \
-d '{
"model": "claude-opus-4-5",
"max_tokens": 100,
"messages": [{"role": "user", "content": "Say hello"}]
}'
If that returns a response, you're set. Point ANTHROPIC_BASE_URL at it and you're done.
The 7-day free trial is at simplylouie.com — no charge for 7 days, then $2/month. Card required upfront (standard SaaS), not charged until day 8.
For developers hitting rate limits during serious sessions, the math is obvious.
Top comments (0)