Claude Code is one of the best coding agents available, but on pay-as-you-go API pricing it can burn through $20 to $100 a day on a busy codebase. This guide shows how to point Claude Code at a cheaper Anthropic-compatible endpoint so you keep the same models and workflow for about 70% less.
Why Claude Code costs so much
An agent loop rereads files, runs tools and resends its growing context on every step. A single feature can take 50 to 150 model calls, each sending tens of thousands of input tokens. At official Claude Opus prices ($5 per million input tokens, $25 per million output), a day that uses 8 million input and 400,000 output tokens costs about $50.
The fix: change the base URL
Claude Code reads two environment variables that let you send its requests to any Anthropic-compatible endpoint: ANTHROPIC_BASE_URL and ANTHROPIC_AUTH_TOKEN. Qora API exposes Claude models on an Anthropic-compatible endpoint at around 30% of official prices, so the same $50 day costs about $15.
| Daily usage | Official Opus | Qora API Opus |
|---|---|---|
| Light (2M in / 100k out) | $12.50 | about $3.75 |
| Typical (8M in / 400k out) | $50.00 | about $15.00 |
| Heavy (20M in / 1M out) | $125.00 | about $37.50 |
Current per-model prices are on the pricing page.
Setup in three minutes
- Create a key. Sign up at qoraapi.com and create an API key in the console. New users can get $5 of free credit by DMing @QoraAPI on X or emailing [email protected].
- Set the environment variables (macOS or Linux):
export ANTHROPIC_BASE_URL="https://qoraapi.com" export ANTHROPIC_AUTH_TOKEN="YOUR_QORA_API_KEY" export ANTHROPIC_MODEL="claude-opus-4-7"On Windows PowerShell use
$env:ANTHROPIC_BASE_URL="https://qoraapi.com"and so on. - Run Claude Code as usual with
claude. Add the exports to your~/.zshrcor~/.bashrcto make them permanent.
Prefer a config file? Put the same values under "env" in ~/.claude/settings.json.
Get even more out of every dollar
- Use Sonnet as your default and switch to Opus with
/modelonly for hard architecture or debugging work. - Compact early. Run
/compactwhen a session gets long so the agent stops resending stale context. - Keep CLAUDE.md short. It is sent with every request, so every extra paragraph costs money all day.
- Clear between tasks.
/clearstarts a fresh context instead of dragging the last feature along.
Works with other coding agents too
The same key works through the OpenAI-compatible endpoint https://qoraapi.com/v1 in Cursor, Cline, Roo Code, Continue, Aider and any OpenAI SDK, so one balance covers every tool you use.
FAQ
Is it the same Claude model?
Yes. Requests go to the Claude model you name, through Qora API’s gateway.
Do I need a subscription?
No. It is pay as you go, with no monthly fee. Unused balance is refundable on request.
What if a request fails?
Open a ticket in the console or email [email protected]. Support runs 24/7 with an average first reply within 30 minutes.
Start saving today: create your Qora API account and ask @QoraAPI for your $5 trial credit.

Leave a Reply