// CLI Agent
Use OpenCode with llmrelay
The open-source terminal agent from the sst/opencode team. Point it at api.llmrelay.dev and get the same models at half the price.
Recommended model
claude-opus-4-7
Route
openai-compatible
On llmrelay
$2.5/M · $12.5/M
Setup
- 1 brew install sst/tap/opencode # or curl install script
- 2 opencode auth login openai --url https://api.llmrelay.dev/v1
- 3 Paste your llmrelay key.
- 4 opencode → pick claude-opus-4-7 in the model list.
Config
# ~/.local/share/opencode/config.json
{
"provider": {
"openai": {
"options": {
"baseURL": "https://api.llmrelay.dev/v1",
"apiKey": "sk-llmrelay-..."
}
}
}
} Smoke test
Copy, paste, run. If you get JSON back with a message, you're good.
opencode run "say hi"
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.