// CLI Agent
Use Crush with llmrelay
Charm's terminal coding agent with JSON-configured custom providers Point it at api.llmrelay.dev and get the same models at half the price.
Recommended model
claude-opus-5
Route
anthropic-compatible
On llmrelay
$2.5/M · $12.5/M
Setup
- 1 Create or open crush.json in your project root, or $HOME/.config/crush/crush.json for a global config.
- 2 Add a providers entry with type: 'anthropic' (use 'openai-compat' for the OpenAI-compatible surface).
- 3 Set base_url to the relay endpoint and api_key to $LLMRELAY_API_KEY so the value is expanded from the environment.
- 4 List the models you want with id, name, context_window and default_max_tokens.
- 5 Export LLMRELAY_API_KEY in your shell, then run `crush` and pick the model.
Config
// .crush.json or crush.json in the project, or $HOME/.config/crush/crush.json
// crush.json (project root, or $HOME/.config/crush/crush.json)
{
"$schema": "https://charm.land/crush.json",
"providers": {
"llmrelay": {
"type": "anthropic",
"base_url": "https://api.llmrelay.dev",
"api_key": "${LLMRELAY_API_KEY:?set LLMRELAY_API_KEY}",
"extra_headers": {
"anthropic-version": "2023-06-01"
},
"models": [
{
"id": "claude-opus-5",
"name": "Claude Opus 4.8 (relay)",
"context_window": 200000,
"default_max_tokens": 50000,
"can_reason": true,
"supports_attachments": true
}
]
}
}
}
# export LLMRELAY_API_KEY=*** Smoke test
Copy, paste, run. If you get JSON back with a message, you're good.
Run `crush` in the project, confirm the llmrelay provider and model appear in the model list, and send one prompt.
Gotchas
- !Ignore the /v1 in the README's Anthropic example (https://api.anthropic.com/v1). We tested both against the relay on 2026-07-28: https://api.llmrelay.dev returns 200, and adding /v1 yields /v1/v1/messages which 404s. Use the bare host.
- !Use type 'openai-compat' (not 'openai') for non-OpenAI providers with OpenAI-compatible APIs; 'openai' is only for proxying to OpenAI itself.
- !crush.json is trusted code: any $(...) in it runs at load time with your shell privileges before the UI appears. Use ${VAR:?message} for required keys so an unset variable fails loudly instead of resolving to empty.
You need an llmrelay key first
Sign up in about 30 seconds — free to create an account, no subscription, $10 minimum top-up.