GitHub Copilot in Russia: Claude, GPT and DeepSeek in VS Code chat with your own key, no subscription or VPN
There is no official way to buy Copilot Pro from Russia: under its export-control rules GitHub does not sell Copilot to Russia or Belarus. But Copilot chat and agent in VS Code also work with your own API key: in Local sessions, without a Copilot plan and even without a GitHub sign-in. Add a Custom Endpoint provider in VS Code pointing to RuAPI, and Claude, GPT, DeepSeek and Gemini show up in the chat model picker. Pay in USDT, no VPN needed.
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)You can test the key in the VS Code integrated terminal first (cURL tab): the example calls deepseek-flash, which is available right after sign-up. For Copilot you will need the same key and the address https://www.ruapi.ai/v1/chat/completions.
What gets in the way of using Copilot from Russia
Copilot subscriptions are not sold to Russia.
GitHub says it plainly in its trade controls policy: Copilot may not be sold or exported without authorization to embargoed and Country Group E:1 destinations, and the list names Russia and Belarus (docs.github.com, “GitHub and trade controls”, Nov 5, 2026). Copilot is paid by bank card or PayPal, and prepaid cards are not accepted (docs.github.com, “Supported payment methods”, Nov 5, 2026). So “how to buy Copilot Pro in Russia” is about more than just a card.
Copilot Free means auto model selection and a cap.
On the free plan Copilot picks the model for you (Auto), AI credits are limited and code completions are capped at 2,000 a month (docs.github.com/copilot/get-started/plans, Nov 5, 2026). Free still needs a GitHub account with Copilot access. With your own key you decide which model answers in chat and pay only for the tokens used.
Built-in providers need keys that Russia cannot get.
The VS Code provider list includes Anthropic, OpenAI and Gemini, but each wants a key from that company, and Anthropic and OpenAI do not serve Russia (anthropic.com/supported-countries, developers.openai.com/api/docs/supported-countries, Nov 3, 2026). The Custom Endpoint provider accepts any compatible address, so one RuAPI key unlocks Claude, GPT, Gemini, DeepSeek, Qwen and GLM.
How to connect RuAPI to Copilot Chat in VS Code: 3 steps
Written for VS Code 1.145, the stable release of Nov 4, 2026. The Custom Endpoint provider has been in stable builds since 1.122, so Insiders is not required. According to the docs, your own models work in Local sessions without a GitHub sign-in or a Copilot plan (code.visualstudio.com/docs/agent-customization/language-models, Nov 5, 2026).
Create a RuAPI account and top up
Sign up at www.ruapi.ai with email, Google or Yandex; no phone number required. USDT is the easiest way to pay: from 5 USDT over TRC20, BEP20, TON or Polygon, and USDC works too. USDT can be bought for rubles via SBP; docs.ruapi.ai/en/buy-usdt walks you through it. A foreign-issued card is another option.
New accounts usually get $0.05 right away, enough to try Copilot chat on claude-haiku-5-5, deepseek-flash or gpt-6-luna. The rest of the models unlock after your first top-up.
Create a separate key for VS Code
Console → “API keys” → “Create key”. In the “Budget” block switch off “Unlimited” and set an amount, so an agent stuck in a loop cannot spend more. A dedicated editor key also keeps its spending visible in the log separately from your other projects.


Add a Custom Endpoint in VS Code
- Open the Command Palette (Ctrl+Shift+P, or Cmd+Shift+P on macOS) and run Chat: Manage Language Models. Select Add Models and pick Custom Endpoint.
- Enter a group name such as RuAPI; the models appear under it in the chat picker. Then enter a display name, your sk-… API key and the API type Chat Completions.
- VS Code opens chatLanguageModels.json. Each entry in the models array needs an id exactly as on the pricing page, for example deepseek-flash, the url https://www.ruapi.ai/v1/chat/completions, plus "toolCalling": true, "contextWindow": 1000000 and "maxOutputTokens": 32000. Without toolCalling the model will not be listed for agents. A full example is in the FAQ below.
- Save the file. New chats open in a Copilot session by default, where your own models are only available behind the experimental setting chat.agentHost.byokModels.enabled. The reliable route is to choose Local under Session Target, then deepseek-flash from the RuAPI group in the model picker. If Local is not offered, the VS Code docs suggest the experimental settings "chat.editor.localAgent.enabled": true, "chat.defaultToCopilotHarness": false and "chat.editor.preferCopilotHarness": false (on a managed machine, organization policy can override them). If the model is missing, restart VS Code. A new line in the RuAPI Console log means everything is connected.
RuAPI addresses and keys: docs.ruapi.ai/en/quickstart · tool calling: docs.ruapi.ai/en/function-calling · Claude caching: docs.ruapi.ai/en/prompt-caching
What goes into chatLanguageModels.json
Chat Completions — all models, Claude included
"vendor": "customendpoint"
"apiType": "chat-completions"
url: https://www.ruapi.ai/v1/chat/completions
"toolCalling": true
id: deepseek-flash
Messages — optional, for Claude caching
"apiType": "messages"
url: https://www.ruapi.ai/v1/messages
id: claude-sonnet-5-5
key sent in the x-api-key header
Payment
USDT / USDC from 5 USDT
foreign-issued cards
no subscription
Model prices for Copilot Chat with your own key
Models that handle VS Code agent mode well. Prices are in US dollars per 1M tokens, as on the pricing page. There is no monthly fee: your balance is charged only for the tokens the chat used.
| model | input $/M | output $/M |
|---|---|---|
| deepseek-flash | $0.17 cache read $0.0120 | $1.44 |
| glm-5.3 | $1.44 cache read $0.36 | $5.02 |
| 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 |
Input is new input tokens, “cache read” is the part of the input served from cache, output is the model reply. On every step the Copilot agent resends instructions, open files and chat history, so caching saves a lot here. GPT and DeepSeek cache a repeated prompt prefix automatically. For Claude over Chat Completions, VS Code adds no cache_control markers, so RuAPI adds them: when a request has no markers at all, already contains earlier model replies, and the previous request with the same key to the same model came less than 5 minutes ago, the gateway marks the end of the system prompt and the last user message. The first request of a conversation and requests after a pause of more than 5 minutes go without markers; if three cache writes in a row do not pay off, auto-marking pauses for an hour for that key and model. With the Messages API type VS Code places the markers itself (docs.ruapi.ai/en/prompt-caching).
The greyed “>100K” row is the vendor rate for prompts above the threshold; once a request crosses it, the whole request is billed at that rate.
Copilot Pro or VS Code with your own RuAPI key
| VS Code + RuAPI | Copilot Pro | |
|---|---|---|
| Cost | Chat and agent are free, you pay only for tokens | $10 a month: 1,000 base AI credits plus 500 flex (1 credit = $0.01) |
| How to pay | USDT from 5 USDT or a foreign-issued card | Bank card or PayPal; GitHub rules bar sales to Russia |
| GitHub account | Not needed for chat and agent in a Local session | Required |
| Model choice | Any RuAPI model with tool calling | Models included in the Pro plan |
| Code completions | No: inline suggestions only work through GitHub | Unlimited |
Based on docs.github.com (Plans for GitHub Copilot, Billing for individual plans, GitHub and trade controls) and code.visualstudio.com/docs/agent-customization/language-models, checked Nov 5, 2026.
