Aider in Russia: Claude, GPT and DeepSeek in your terminal, no VPN or foreign card
Aider is an open-source AI pair programmer that runs in your terminal: you add files to the chat, describe the task, and Aider edits the code and makes the git commit for you. Aider has no models of its own — it uses whatever API key you give it. Point it at https://www.ruapi.ai/v1 with a RuAPI key, and Aider runs on DeepSeek, GPT, Claude, Qwen and GLM from one account. No VPN, no subscription, pay 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)Test the key with this example (cURL, Python or Node.js), then give Aider the same details: OPENAI_API_BASE=https://www.ruapi.ai/v1 and OPENAI_API_KEY=sk-…, with the model prefixed by openai/, for example openai/deepseek-flash.
What gets in the way of running Aider from Russia
Aider is free, the model behind it is not.
Aider itself is Apache 2.0 licensed, but every request goes to the API of the model you pick, and your key pays for it. You cannot get an Anthropic or OpenAI key directly from Russia: neither company lists Russia among supported countries (anthropic.com/supported-countries, developers.openai.com/api/docs/supported-countries). A RuAPI key is issued right after sign-up and works for every model.
Aider runs unknown models in a basic mode.
If a model name is missing from Aider’s built-in list, it warns «Unknown context window size and costs», treats requests as free and falls back to the whole edit format: the model returns entire files and the repo map stays off (aider.chat/docs/llms/warnings, models.py source, 05.11.2026). That works, but it burns more tokens. A few lines in .aider.model.settings.yml switch the model to the leaner diff format — see the steps below.
In Aider, Claude caching is off by default.
Aider can put cache markers on the system prompt, the repo map and the files in the chat, but only with the --cache-prompts flag and only for models whose settings say cache_control: true (aider.chat/docs/usage/caching). On top of that, litellm — the library Aider uses to call APIs — strips cache_control markers from models with the openai/ prefix. RuAPI adds markers itself to requests that have none, on the end of the system prompt and the last message, as long as you keep the session going within 5 minutes. Aider marks things in more detail, though: the repo map and the chat files separately. So Claude is better connected in Anthropic format, via anthropic/ and https://www.ruapi.ai, and started with --cache-prompts. GPT and DeepSeek cache automatically.
How to connect RuAPI to Aider in 4 steps
Written for Aider 0.86.2 (the latest PyPI release) on macOS, Linux and Windows. Aider 0.86.2 runs on Python 3.10–3.12; if a suitable version is missing, aider-install sets up a separate Python 3.12 (aider.chat/docs/install, 05.11.2026).
Sign up at RuAPI and top up
Create an account at www.ruapi.ai with email, Google or Yandex. The easiest way to pay is USDT: from 5 USDT on TRC20, BEP20, TON or Polygon; USDC is accepted too. USDT can be bought for rubles via SBP — step-by-step guide at docs.ruapi.ai/en/buy-usdt. Foreign-issued cards also work.
New accounts usually get $0.05 right away, enough to try Aider with claude-haiku-5-5, deepseek-flash or gpt-6-luna. The other models unlock after your first top-up.
Create a separate key for Aider
Console → «API keys» → «Create key». In the «Budget» block turn off «Unlimited» and set an amount — the key will never spend more, even if you leave Aider running with --cache-keepalive-pings or in --watch-files mode. A dedicated key also shows the cost of every Aider reply in the Console request log.


Install Aider
- The method recommended in the docs: python -m pip install aider-install, then aider-install. Aider goes into its own environment and does not interfere with your other Python packages.
- With uv: uv tool install --force --python python3.12 --with pip aider-chat@latest. With pipx: pipx install aider-chat. The PyPI package is called aider-chat; the terminal command is aider.
- Check the install: aider --version should print 0.86.2 or later.
Set the RuAPI address and key, then start Aider
- DeepSeek, GPT, Qwen, GLM — in OpenAI-compatible format. On macOS and Linux: export OPENAI_API_BASE=https://www.ruapi.ai/v1 and export OPENAI_API_KEY=sk-… (on Windows use setx with the same names, then restart the terminal). Start it in your project folder: aider --model openai/deepseek-flash. The openai/ prefix is required — it tells Aider to look for the model at your address.
- Claude — in Anthropic format, so Aider marks the cache itself: export ANTHROPIC_API_BASE=https://www.ruapi.ai (no /v1 — litellm appends /v1/messages itself) and export ANTHROPIC_API_KEY=sk-… — the same RuAPI key. Start: aider --model anthropic/claude-sonnet-5-5 --cache-prompts.
- Create .aider.model.settings.yml in the repo root or your home folder. It is a YAML list, and each entry starts with «- name:». For Claude: name: anthropic/claude-sonnet-5-5, edit_format: diff, use_repo_map: true, cache_control: true, and max_tokens: 32000 under extra_params. Without max_tokens litellm caps Claude replies at 4096 tokens, and Sonnet 5.5 also reasons by default, so a long edit gets cut off; 32000 leaves headroom well within the model limit (128K). For openai/deepseek-flash, edit_format: diff and use_repo_map: true are enough. For GPT models (openai/gpt-6.1-terra, for example) also add use_temperature: false: Aider sends temperature: 0 by default, and GPT reasoning models may reject it. When started with Claude, Aider should report «with diff edit format, prompt cache».
- Ask Aider something about the project. A new line in the RuAPI Console request log means the connection works.
RuAPI addresses and keys: docs.ruapi.ai/en/quickstart · caching: docs.ruapi.ai/en/prompt-caching · OpenAI vs Anthropic format: docs.ruapi.ai/en/openai-vs-anthropic-format
What to set in Aider
OpenAI-compatible format — all models
OPENAI_API_BASE=https://www.ruapi.ai/v1
OPENAI_API_KEY=sk-…
aider --model openai/deepseek-flash
in .aider.conf.yml: openai-api-base, openai-api-key
Anthropic format — Claude with caching
ANTHROPIC_API_BASE=https://www.ruapi.ai
ANTHROPIC_API_KEY=sk-…
aider --model anthropic/claude-sonnet-5-5
--cache-prompts + cache_control: true
Payment
USDT / USDC from 5 USDT
foreign-issued cards
no subscription
Model prices for Aider
Models people most often pick for pair programming in the terminal. Prices are per 1M tokens in US dollars, taken from the RuAPI pricing page. No monthly fee: you pay only for the tokens Aider uses.
| 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 |
| gpt-6.1-terra | $1.20 cache read $0.0600 >272K: $2.40 | $6.00 >272K: $9.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 |
Input is new input tokens, “cache read” is the part of the input served from cache, output is the model’s reply. Aider resends the system prompt, repo map and chat files with every request, so caching cuts the bill noticeably. GPT and DeepSeek cache a repeated request prefix on their own. For Claude via anthropic/ with --cache-prompts, Aider places the cache markers itself; when a request has none (for example via openai/), RuAPI adds them as long as pauses stay under 5 minutes, and after three cache writes in a row that do not pay off it pauses for an hour for that key and model (docs.ruapi.ai/en/prompt-caching).
The grey «>100K» row is the vendor rate for prompts above the threshold; a request that crosses it is billed entirely at that rate.
