// CLI Agent
Use Aider with llmrelay
The terminal-native pair programmer that commits directly to git. Point it at api.llmrelay.dev and get the same models at half the price.
Recommended model
claude-sonnet-4-6
Route
openai-compatible
On llmrelay
$1.5/M · $7.5/M
Setup
- 1 pip install aider-chat
- 2 export OPENAI_API_BASE=https://api.llmrelay.dev/v1
- 3 export OPENAI_API_KEY=sk-llmrelay-...
- 4 aider --model openai/claude-sonnet-4-6
Config
// ~/.aider.conf.yml
# ~/.aider.conf.yml openai-api-base: https://api.llmrelay.dev/v1 openai-api-key: sk-llmrelay-... model: openai/claude-sonnet-4-6
Smoke test
Copy, paste, run. If you get JSON back with a message, you're good.
aider --model openai/claude-sonnet-4-6 --message "add a docstring to main.py"
Gotchas
- !Prefix the model name with "openai/" so aider routes via the OpenAI-compatible endpoint.
- !Sonnet 4.6 is usually enough for aider; switch to Opus 4.7 only for complex refactors.
You need an llmrelay key first
Sign up in about 30 seconds. New accounts get $0.20 in free credit — enough to smoke-test every model.