LibreChat in Russia: your own team ChatGPT on Claude, GPT, Gemini and DeepSeek, no VPN
LibreChat is an open-source (MIT) chat app that looks a lot like ChatGPT: you deploy it on your own server with Docker, create accounts for yourself and your colleagues, and plug in models from different vendors. RuAPI goes into librechat.yaml as a custom endpoint pointing at https://www.ruapi.ai/v1; restart the containers and Claude, GPT, Gemini and DeepSeek show up together in the model menu, all on a single key. For Claude you can also add a native Anthropic endpoint with prompt caching. No VPN is needed, and you top up in USDT.
Updated:
from openai import OpenAI
client = OpenAI(
api_key="sk-...",
base_url="https://www.ruapi.ai/v1",
)
resp = client.chat.completions.create(
model="deepseek-flash",
messages=[{"role": "user", "content": "Hello"}],
)
print(resp.choices[0].message.content)Run the cURL tab of this example in a terminal on the server that will host LibreChat to check the key: the RuAPI custom endpoint sends the same request to /v1/chat/completions whenever you chat. In librechat.yaml, baseURL takes only the start of the address — https://www.ruapi.ai/v1, without /chat/completions.
What stands between LibreChat and strong models in Russia
LibreChat has no models of its own.
LibreChat is an interface: it forwards every message to a model provider’s API. An OpenAI or Anthropic key is not an option from Russia: neither company serves the country (anthropic.com/supported-countries, developers.openai.com/api/docs/supported-countries, 3 Nov 2026). A RuAPI key, by contrast, can be created a minute after registration, and www.ruapi.ai is reachable from Russia without a VPN.
Every vendor is a separate config block and a separate bill.
librechat.yaml can hold OpenAI, Anthropic, Google and a dozen more providers, but each one needs its own account, key and payment method. With RuAPI, models from every vendor live in a single custom endpoint under one key, and Usage Logs in the RuAPI Console show what each request cost.
The whole team spends one balance — and not only on answers.
The key in .env is shared by everyone registered in your LibreChat. On top of that, LibreChat makes an extra request for every new chat by default to write its title, and if titleModel is not set it uses the chat’s own model for that. So give the key a budget and leave titles to a cheap model such as deepseek-flash, where a million input tokens cost $0.168.
How to connect RuAPI to LibreChat: 3 steps
You need a computer or server with Git and Docker; the docs recommend giving Docker at least 2 GB of memory (librechat.ai/docs/local/docker, 3 Nov 2026). The setup lives in two files in the LibreChat folder: the key in .env, the endpoints in librechat.yaml.
Sign up for RuAPI and top up
Signing in to www.ruapi.ai needs only an email, a Google account or a Yandex account; nobody asks for a phone number. Fund the balance in USDT (5 USDT minimum; TRC20, BEP20, TON or Polygon) or in USDC. No crypto yet? The guide at docs.ruapi.ai/en/buy-usdt shows how to get USDT for rubles through SBP. We also take cards issued by foreign banks.
For a first LibreChat test there is the $0.05 a new account usually receives on sign-up: it covers claude-haiku-5-5, deepseek-flash and gpt-6-luna. Everything else opens up after your first top-up.
Create a key for LibreChat
Console → API Keys → "Create API key". All accounts in your LibreChat will share this key, which is why it deserves a cap: in the Credit limit block switch off "Unlimited" and type an amount. When the cap is reached the key stops working, even if the balance still has money on it.


Install LibreChat and add RuAPI to librechat.yaml
- Download the project and create the settings file: git clone https://github.com/LibreChat-AI/LibreChat.git, then cd LibreChat and cp .env.example .env. Append the line RUAPI_KEY=sk-… with your key to the end of .env.
- The container does not see librechat.yaml on its own — the file has to be mounted. Run cp docker-compose.override.yml.example docker-compose.override.yml and uncomment the services: line plus the api → volumes block with source: ./librechat.yaml and target: /app/librechat.yaml.
- Create librechat.yaml next to it: first line version: 1.3.18, then an endpoints → custom block with one item — name: "RuAPI", apiKey: "${RUAPI_KEY}", baseURL: "https://www.ruapi.ai/v1", models → default: ["deepseek-flash", "gpt-5.4", "claude-sonnet-5-5"] and fetch: false, titleConvo: true, titleModel: "deepseek-flash", modelDisplayLabel: "RuAPI". Indent with spaces — YAML is strict about it.
- Start it with docker compose up -d (after any config change — docker compose down && docker compose up -d). Open http://localhost:3080 and sign up: the first account becomes the admin. RuAPI shows up in the model menu with the models from default.
Step-by-step guide and troubleshooting: docs.ruapi.ai/en/integrations/librechat · RuAPI addresses and keys: docs.ruapi.ai/en/quickstart
What to set in LibreChat
Custom endpoint for all models
.env: RUAPI_KEY=sk-…
apiKey: "${RUAPI_KEY}"
baseURL: "https://www.ruapi.ai/v1"
titleModel: "deepseek-flash"
Separate endpoint for Claude
provider: "anthropic"
baseURL: "https://www.ruapi.ai"
models.fetch: false
Payment
USDT / USDC from 5 USDT
foreign-issued cards
no subscription
Model prices for LibreChat
What teams typically put in the LibreChat menu and what it costs: US dollars per 1M tokens, the same figures as on the pricing page. There is no monthly fee: the balance only goes down by the tokens your team’s chats actually use.
| model | input $/M | output $/M |
|---|---|---|
| deepseek-flash | $0.17 cache read $0.0120 | $1.44 |
| gpt-5.4-mini | $0.90 cache read $0.0900 | $5.40 |
| claude-haiku-5-5 | $0.12 cache read $0.0120 >100K: $0.60 | $0.60 >100K: $3.00 |
| gemini-3.8-flash | $0.90 cache read $0.0900 | $4.50 |
| gpt-5.4 | $3.00 cache read $0.30 >272K: $6.00 | $18.00 >272K: $27.00 |
| claude-sonnet-5-5 | $2.40 cache read $0.12 | $12.00 |
| claude-opus-5-5 | $4.80 cache read $0.24 | $24.00 |
The input column prices fresh input tokens, "cache read" the ones the model pulls from cache, output the reply tokens. With every new message LibreChat resends the whole chat history, so long conversations gradually get more expensive. GPT and DeepSeek cache a repeated prompt prefix on their own. For OpenAI-compatible custom endpoints (other than OpenRouter) LibreChat adds no cache_control markers; for Claude RuAPI then adds them if you reply within 5 minutes. Still, Claude is better kept in a separate endpoint with provider: "anthropic", where caching is on by default (docs.ruapi.ai/en/prompt-caching).
A grey ">100K" row marks the vendor’s special price for large prompts: cross the threshold and the entire request moves to that price.
LibreChat or Open WebUI for your own chat
| LibreChat + RuAPI | Open WebUI + RuAPI | |
|---|---|---|
| Where RuAPI is connected | The librechat.yaml file (custom endpoint) plus the key in .env, then a container restart | Admin Panel → Settings → Connections, right in the browser |
| What Docker runs | Several containers: LibreChat, an admin panel, MongoDB, Meilisearch, PostgreSQL with pgvector, RAG API | One container, ghcr.io/open-webui/open-webui:main; a pip install also exists |
| User keys | A shared key from .env, or apiKey: "user_provided" — each user enters their own RuAPI key | The admin sets the connection and key; to make models visible to users, set them to Public in Admin Panel → Settings → Models |
| License | MIT | Open WebUI License: BSD-3 plus a ban on changing Open WebUI branding above 50 users in 30 days (without the copyright holder’s permission) |
Sources: github.com/LibreChat-AI/LibreChat (docker-compose.yml, LICENSE) and github.com/open-webui/open-webui (LICENSE), checked 3 Nov 2026; Open WebUI menus per docs.openwebui.com (1 Nov 2026). Both interfaces connect to RuAPI at the same address, https://www.ruapi.ai/v1.
