OpenCode in Russia — Claude, DeepSeek and GPT without a VPN
OpenCode is a free, open-source AI coding agent that runs in the terminal and as a desktop app. Its built-in free models come with limits, and an OpenCode Go subscription or a Zen top-up usually can't be paid with a Russian card. Connect OpenCode to RuAPI instead: Claude, DeepSeek, GPT and Gemini with one key, no VPN and no foreign-issued card. Pay in USDT, only for the tokens you use.
{
"provider": {
"anthropic": {
"options": {
"baseURL": "https://www.ruapi.ai/v1",
"apiKey": "sk-..."
}
}
},
"model": "anthropic/claude-sonnet-5-5"
}This is what ~/.config/opencode/opencode.json looks like. Replace sk-... with your RuAPI key; both providers can live in one file — see the full example in the docs.
Why connect OpenCode through RuAPI from Russia
OpenCode Go and Zen usually can't be paid with a Russian card.
OpenCode itself is free, but apart from the rate-limited free models, you pay for the models. OpenCode Go is $10 a month, Go Plus is $40, and a Zen balance is prepaid with a card processing fee. OpenCode takes payments through Stripe, where Russian bank cards are usually declined. RuAPI is topped up in USDT, from 5 USDT.
Free models come with limits.
Some OpenCode Zen models are free only for a limited time, and once the limit runs out, OpenCode shows "Free usage exceeded, subscribe to Go". And Beam Free isn't available in Russia at all, according to OpenCode's docs. With RuAPI you pay only for tokens, and unlike the Go plan, there are no 5-hour or weekly limits.
One key for every model, and Claude caching works.
RuAPI plugs into OpenCode as a regular provider. Claude goes through the built-in anthropic provider, so prompt caching works and the context the agent re-sends at every step costs at least 10× less. DeepSeek, GPT, Gemini, GLM, Qwen and Kimi go through an OpenAI-compatible provider. You get a key right after signing up, and it works from Russia directly.
Set up in 5 minutes
Step 1 — A RuAPI key
sign up at www.ruapi.ai
top up in USDT, from 5 USDT
Step 2 — Claude via the anthropic provider
baseURL: https://www.ruapi.ai/v1
model: anthropic/claude-sonnet-5-5
Step 3 — Every other model
npm: @ai-sdk/openai-compatible
baseURL: https://www.ruapi.ai/v1
Model prices for OpenCode
Current prices per 1M tokens in USD — the same as on the pricing page. Pay in USDT, pay as you go, no subscription.
| model | input $/M | output $/M |
|---|---|---|
| claude-opus-5-5 | $4.80 cache read $0.24 | $24.00 |
| claude-sonnet-5-5 | $2.40 cache read $0.12 | $12.00 |
| claude-haiku-5-5 | $0.12 cache read $0.0120 >100K: $0.60 | $0.60 >100K: $3.00 |
| deepseek-flash | $0.17 cache read $0.0120 | $1.44 |
| deepseek-v4-pro | $1.58 cache read $0.0600 | $4.75 |
| gpt-5.4 | $3.00 cache read $0.30 >272K: $6.00 | $18.00 >272K: $27.00 |
| glm-5.3 | $1.44 cache read $0.36 | $5.02 |
| kimi-k3.1-pro | $2.40 cache read $0.24 | $12.00 |
Prices per 1M tokens: input is the regular input price, “cache read” is the price of input tokens served from the prompt cache, output is the output price. OpenCode re-sends the task context at every step, and for models with caching most of it comes from the cache, so input ends up several times cheaper than the regular price — the “est. effective w/ cache” estimate is on the pricing page.
The grey “>100K” line is the vendor’s official tier for long prompts: when a prompt exceeds the threshold, the whole request is billed at that tier.
OpenCode with RuAPI vs. OpenCode Go or Zen
| OpenCode + RuAPI | OpenCode Go / Zen | |
|---|---|---|
| Paying from Russia | USDT, from 5 USDT; foreign-issued cards accepted too | Through Stripe; Russian bank cards are usually declined |
| How you pay | Top up a balance and pay only for the tokens you use, no subscription | Go: $10 a month, Go Plus: $40, with 5-hour, weekly and monthly limits; Zen: also pay-as-you-go, but every top-up adds a 4.6% + $0.31 fee |
| Claude | Opus, Sonnet and Haiku, with prompt caching | Go includes only Claude Haiku 5.5; Opus and Sonnet are in Zen, prepaid via Stripe |
OpenCode Go and Zen information is from the opencode.ai/go and opencode.ai/zen pages, the opencode.ai docs and terms of service (checked Oct 25, 2026).
FAQ
See also: Claude Code in Russia · Cline in Russia · DeepSeek API in Russia
