Aider + OpenCompress

Set one environment variable and save 40-60% on every Aider request.Works with OpenAI, Anthropic, Google, and OpenRouter keys.

1
Set the Base URL

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-here

Note: OpenAI (sk-proj-...), Anthropic (sk-ant-...), Google (AIza...), and OpenRouter (sk-or-...) keys all work. We auto-detect the provider.

2
Done — Run Aider

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.

3
Verify (Optional)

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"}]}'
4
Upgrade for Dashboard + Higher Limits

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.