// Framework
Use LibreChat with llmrelay
Self-hosted multi-provider chat UI configured through librechat.yaml 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 Copy librechat.example.yaml to librechat.yaml next to your docker-compose.yml.
- 2 Under endpoints.custom, add an entry with name: 'LLM Relay' and provider: 'anthropic'.
- 3 Set baseURL to https://api.llmrelay.dev and apiKey to '${LLMRELAY_API_KEY}'.
- 4 List models explicitly under models.default and set models.fetch to false, since auto-fetch uses the OpenAI /models convention.
- 5 Put LLMRELAY_API_KEY=*** in your .env file and restart the stack (docker compose up -d).
- 6 Select LLM Relay in the endpoint dropdown in the UI.
Config
// ./librechat.yaml (plus ./.env for the key)
# librechat.yaml
endpoints:
custom:
# provider: 'anthropic' uses the native Anthropic client (/v1/messages)
- name: 'LLM Relay'
provider: 'anthropic'
apiKey: '${LLMRELAY_API_KEY}'
baseURL: 'https://api.llmrelay.dev'
headers:
anthropic-version: '2023-06-01'
models:
default:
- 'claude-opus-5'
- 'claude-sonnet-5'
fetch: false
titleConvo: true
titleModel: 'claude-sonnet-5'
modelDisplayLabel: 'LLM Relay (Claude)'
# .env
# LLMRELAY_API_KEY=*** Smoke test
Copy, paste, run. If you get JSON back with a message, you're good.
Run `docker compose up -d` then check the container logs for the custom endpoint being registered, and send one message on the LLM Relay endpoint in the UI.
Gotchas
- !With provider: 'anthropic' the baseURL must be the API root that the Anthropic SDK appends /v1/messages to, so do not include /v1 yourself.
- !Model auto-fetch does not work for the anthropic provider; you must list models explicitly and set fetch: false.
- !Leaving out provider: 'anthropic' falls back to the OpenAI-compatible client, in which case baseURL should be https://api.llmrelay.dev/v1 instead.
You need an llmrelay key first
Sign up in about 30 seconds — free to create an account, no subscription, $10 minimum top-up.