Aider is one of the best AI pair programmers you can run in a terminal. It maps your repo, edits files, and commits every change to git. It also burns through tokens. Every request carries a repo map, the files you added to the chat, and the conversation so far. Pair that with Claude Opus or Sonnet at official Anthropic rates and a busy week of refactoring can turn into a three-figure bill.
The good news: Aider talks to any OpenAI-compatible endpoint. That means you can keep the exact same Claude models and point Aider at a cheaper gateway. This guide shows how to run Aider with a cheap Claude API through Qora API, what it actually costs per model, and how to cut your token use even further.
Why Aider gets expensive with Claude
Aider’s token use comes from three places:
- The repo map. Aider sends a compressed map of your codebase so the model knows where things live. On a large repo this alone is thousands of tokens per request.
- Files in the chat. Every file you
/addis sent in full on every turn until you/dropit. - Chat history. Long sessions keep re-sending earlier messages, so input tokens grow with every turn.
Input tokens usually outnumber output tokens many times over in a coding session. So the per-token input price matters most, and that is exactly where a discount pays off.
Claude API cost for Aider: official vs Qora
These are per-million-token prices. Official prices come from Anthropic’s pricing page; Qora prices come from the Qora pricing page. Every model below is cheaper on Qora than buying direct.
| Model (Qora model ID) | Official input / output | Qora input / output | You save |
|---|---|---|---|
Claude Opus 4.7 (claude-opus-4-7) |
$5 / $25 | $1.50 / $7.50 | 70% |
Claude Sonnet 4.6 (claude-sonnet-4-6) |
$3 / $15 | $0.90 / $4.50 | 70% |
Claude Sonnet 5 (claude-sonnet-5) |
$2 / $10 | $0.60 / $3.00 | 70% |
Claude Haiku 4.5 (claude-haiku-4-5-20251001) |
$1 / $5 | $0.30 / $1.50 | 70% |
Claude Opus 5.5 (claude-opus-5-5) |
$4 / $20 | $2.40 / $12.00 | 40% |
Claude Sonnet 5.5 (claude-sonnet-5-5) |
$2 / $10 | $1.20 / $6.00 | 40% |
The newest Claude 5.5 models run on Qora’s Stable group at about 60% of the official price. The rest run on the default group at about 30% of official.
What that means for a month of Aider
Take an example month of heavy Aider use: 60M input tokens and 6M output tokens. Your own numbers will differ, but the ratio is typical of repo-map-heavy sessions.
| Model | Official cost | Qora cost |
|---|---|---|
| Claude Opus 4.7 | $450 | $135 |
| Claude Sonnet 4.6 | $270 | $81 |
| Claude Sonnet 5 | $180 | $54 |
| Claude Opus 5.5 | $360 | $216 |
| Claude Haiku 4.5 | $90 | $27 |
Same model, same Aider workflow, a fraction of the bill. For the math behind input vs output pricing, see our guide to AI API pricing explained.
How to set up Aider with Qora API
Qora exposes an OpenAI-compatible endpoint at https://qoraapi.com/v1, and Aider supports OpenAI-compatible APIs out of the box. Setup takes about two minutes.
Step 1: Create an account and an API key
- Sign up at qoraapi.com/register.
- Create an API key in your dashboard.
- New user? Message @QoraAPI on X or email [email protected] to get $5 of free trial credit, enough to test Aider on a real repo.
Step 2: Install Aider
python -m pip install aider-install
aider-install
Step 3: Point Aider at Qora
Set your endpoint and key as environment variables:
# Mac / Linux
export OPENAI_API_BASE=https://qoraapi.com/v1
export OPENAI_API_KEY=your-qora-key
# Windows (restart the terminal afterwards)
setx OPENAI_API_BASE https://qoraapi.com/v1
setx OPENAI_API_KEY your-qora-key
Step 4: Start Aider with a Claude model
Prefix the Qora model ID with openai/ so Aider routes it through the OpenAI-compatible endpoint:
cd /path/to/your/project
aider --model openai/claude-sonnet-4-6
Aider may print a warning that it does not recognize the model’s context window or pricing. That is expected for custom endpoints and does not affect the requests. Add --no-show-model-warnings to hide it.
Step 5: Save it in a config file
To avoid typing flags every time, create .aider.conf.yml in your project or home directory:
openai-api-base: https://qoraapi.com/v1
openai-api-key: your-qora-key
model: openai/claude-sonnet-4-6
weak-model: openai/claude-haiku-4-5-20251001
show-model-warnings: false
Do not commit this file if it holds your key. Add it to .gitignore, or keep the key in an environment variable instead.
Cost-cutting tips for Aider
1. Use a cheap weak model
Aider uses a “weak model” for side jobs like writing commit messages and summarizing chat history. Setting it to openai/claude-haiku-4-5-20251001 ($0.30 / $1.50 on Qora) keeps those calls nearly free.
2. Use architect mode with two models
Architect mode lets one model plan and another apply the edits. Plan with a strong model and edit with a cheaper one:
aider --architect \
--model openai/claude-opus-4-7 \
--editor-model openai/claude-sonnet-4-6
Opus handles the hard reasoning; Sonnet writes the diffs at $0.90 / $4.50 instead of Opus rates.
3. Keep the chat lean
/addonly the files the change needs, and/dropthem when you are done.- Run
/clearbetween unrelated tasks so old history stops riding along. - Use
/tokensto see what is eating your context before it eats your budget.
4. Match the model to the task
Most day-to-day edits, tests and small refactors run well on Sonnet 4.6 or Sonnet 5. Save Opus for gnarly multi-file changes. For a broader playbook, read how to reduce AI API costs and our guide to choosing the right model.
5. Top up as a partner if you spend a lot
Qora is pay-as-you-go with no subscription. Partners get an extra 30% on every top-up: put in $1,000 and get $1,300 of credit.
Using other coding tools too?
The same key works across your tools. If you also use Claude Code, see how to run Claude Code on a cheaper API. For Cursor, Cline and Continue, follow our custom API endpoint guide. Comparing gateways? Here is OpenRouter vs Qora API.
FAQ
Does Aider work with Claude through an OpenAI-compatible API?
Yes. Aider supports any OpenAI-compatible endpoint. Set OPENAI_API_BASE to https://qoraapi.com/v1 and use model names like openai/claude-sonnet-4-6.
What is the cheapest Claude model for Aider?
Of the models in the table above, Claude Haiku 4.5 is the cheapest at $0.30 / $1.50 per million tokens on Qora. For serious coding, Claude Sonnet 5 at $0.60 / $3.00 is the best value among the stronger models.
Is it the same Claude model?
You call the same model IDs, such as claude-opus-4-7 and claude-sonnet-4-6. Qora is a gateway, so you get one key for Claude, GPT, Gemini and 350+ other models.
Can I use Qora with tools that need the Anthropic API format?
Yes. Claude models also have an Anthropic-compatible endpoint with base URL https://qoraapi.com. Aider itself only needs the OpenAI-compatible one.
Do I need a subscription?
No. Qora is pay-as-you-go. You only pay for the tokens you use. See full rates on the pricing page or browse every model at qoraapi.com/models.
Start using Aider for less
Aider is worth every token. You just do not need to pay full price for them. Create your Qora account, set two environment variables, and keep coding with Claude at up to 70% off official rates. Want to try it first? Message @QoraAPI on X or email [email protected] and ask for your $5 free trial credit.

Leave a Reply