Aider + OpenCompress
Set one environment variable and save 40-60% on every Aider request.
Works with OpenAI, Anthropic, Google, and OpenRouter keys.
Point Aider at the OpenCompress endpoint. Use environment variables, CLI flags, a .env file, or .aider.conf.yml — whichever you prefer.
Env / CLI
# Option 1: Environment variables
export OPENAI_API_BASE=https://www.opencompress.ai/api/v1
export OPENAI_API_KEY=your-key-here
aider
# Option 2: CLI flags
aider --openai-api-base https://www.opencompress.ai/api/v1 --openai-api-key your-key-here.env
# .env (in your project root or home directory)
OPENAI_API_BASE=https://www.opencompress.ai/api/v1
OPENAI_API_KEY=your-key-here.aider.conf.yml
# .aider.conf.yml
openai-api-base: https://www.opencompress.ai/api/v1
openai-api-key: your-key-hereNote: OpenAI (sk-proj-...), Anthropic (sk-ant-...), Google (AIza...), and OpenRouter (sk-or-...) keys all work. We auto-detect the provider.
That's it. Run aider as you normally would. All requests are compressed automatically — same models, same experience, 40-60% lower token cost. Free tier: 5 req/min.
Note: Works with all Aider modes including --architect.
Test from the terminal to confirm compression is working:
curl https://www.opencompress.ai/api/v1/chat/completions \
-H "Authorization: Bearer YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{"model":"gpt-4o-mini","messages":[{"role":"user","content":"Hello"}]}'Free tier has no stats and 5 req/min. Sign up for a usage dashboard, 120 req/min, and $10 free credit.
Go to Dashboard →FAQ
Common questions about Aider + OpenCompress.
Does this work with all Aider modes?
Yes — code editing, architect mode, and all chat interactions go through the same OpenAI-compatible endpoint.
Do you store my API key?
No. Your key is forwarded directly to the upstream provider in memory and never persisted.
Which config method should I use?
The .env file is recommended for per-project config. Use environment variables for global setup, or .aider.conf.yml for persistent configuration.
Can I use Anthropic models?
Yes. Put your sk-ant-* key in OPENAI_API_KEY. We auto-translate between OpenAI and Anthropic API formats.
Start Saving
Every Aider request gets cheaper. One config change, zero code modifications.