librechat.yaml — after that, the RuAPI models you list show up in the model picker.
Prerequisites
1
RuAPI account and API key
Console → API Keys → create an
sk-... key. Every account in your LibreChat will use this key, so give it a budget: turn off Unlimited and enter an amount. The balance tops up in USDT — see Top-up.2
LibreChat
Install per the LibreChat docs (usually Docker):
git clone https://github.com/LibreChat-AI/LibreChat.git, cd LibreChat, cp .env.example .env.Setup
1
Add the key to .env
2
Mount librechat.yaml into the container (Docker)
The container does not read
librechat.yaml on its own — the file has to be mounted. Copy the example with cp docker-compose.override.yml.example docker-compose.override.yml and uncomment the services: line and the config block:3
Add RuAPI to librechat.yaml
Create
librechat.yaml next to .env:4
Restart LibreChat
docker compose down && docker compose up -d. Open http://localhost:3080 — a RuAPI provider with the models from default appears in the model picker.fetch: true instead of a manual list pulls the whole RuAPI catalog via /v1/models, image and video models included, so listing the IDs you need in default is usually tidier. LibreChat sends a separate request to title every new chat; without titleModel it uses the chat’s own model, so hand titles to deepseek-flash.Claude with prompt caching: a separate Anthropic endpoint
Claude works through the OpenAI-compatible custom endpoint too, but LibreChat sends nocache_control marks there, so only RuAPI auto-caching applies: on the first turn of a new conversation at most the system prompt is cached, and after a gap of more than 5 minutes the cache expires and the whole chat history is billed again. Add a second item under custom with provider: "anthropic" — LibreChat then talks to Claude in the native Anthropic format and turns prompt caching on by itself (see Prompt caching):
provider: "anthropic". Thinking is on by default in this endpoint, and thinking tokens are billed as output.
Verify
In the UI, pick the RuAPI provider and a model, then send a message. A reply plus an entry in RuAPI Console → Usage Logs confirms the wiring.Troubleshooting
The RuAPI provider didn't appear
The RuAPI provider didn't appear
- Check that
librechat.yamlis mounted into the container viadocker-compose.override.yml(the “Mount librechat.yaml into the container” step). - Check the indentation in
librechat.yaml(YAML is whitespace-sensitive) and that the block sits underendpoints.custom. Parse errors show up indocker compose logs api. - Make sure the containers were restarted after your edits.
401 or 404 error
401 or 404 error
- 401:
RUAPI_KEYin.envmust hold the full RuAPI key (sk-...), andapiKeymust reference it via${RUAPI_KEY}. - 404: the OpenAI-compatible endpoint needs
baseURLhttps://www.ruapi.ai/v1with/v1; theprovider: "anthropic"endpoint needshttps://www.ruapi.aiwithout/v1.
The model returns an error
The model returns an error
Until the first top-up only
claude-haiku-5-5, deepseek-flash and gpt-6-luna work. Error codes — Errors.Conversation titles aren't generated
Conversation titles aren't generated
Check
titleConvo: true and that titleModel points to an available model.