Codex does not work directly from Russia: the country is missing from the official list for both ChatGPT and the OpenAI API, and sign-up and subscription payment regularly fail at different steps. The route that works for people who need the Codex CLI itself rather than a ChatGPT subscription is to sign in with a separate API key through a gateway that pays OpenAI for the tokens itself and sells access with payment in rubles. Below: where the restriction comes from and how to get around payment and sign-up specifically, without touching the terms of service.
What "Russia is not on the list of countries" means at OpenAI
OpenAI keeps two separate lists of supported countries: one for ChatGPT and one for the API. Both follow the rule "access is allowed only from the listed countries and territories", and Russia is on neither. It does not read as an explicit ban by country name: OpenAI simply leaves Russia out of the list where the service works officially.
In practice that means three things. Signing up for a new ChatGPT account from a Russian IP often ends with an "unsupported country" error. A Russian card cannot be attached to subscription payment or API billing, because the billing address does not match an allowed region. And an account created earlier can fall under restrictions if the system sees a connection from an unsupported country.
Does a VPN help
Briefly: partly, and not reliably. A VPN changes the location visible by IP, and with it you can sometimes get through sign-up or into an existing account. But a VPN does not solve payment: a Russian card or a billing address in Russia still does not fit the billing system, and payment providers check the card issuer's country separately from the IP.
There is a second side. OpenAI, like most large services, notices patterns typical of data-center IPs and sudden location changes, and such sessions sometimes get extra checks. We advise against bypassing regional restrictions by faking the country or hiding your real location: if an account is flagged as suspicious, the review can drag on for weeks, and nobody guarantees it will not be blocked. It is more practical to pick a route where the country has no bearing on access to the model.
The API-key route instead of a ChatGPT account
A detail that OpenAI describes directly in the Codex documentation helps here: the tool's local surfaces (CLI, IDE extension, app) accept, besides the regular ChatGPT subscription, a sign-in with a separate API key billed by actual token usage. The official wording: "Pay for Codex usage based on API pricing". When you work through a key, only the cloud features such as code review in GitHub and the Slack integration disappear, and the agent in the terminal works unchanged.
That opens a route not tied to the country of a ChatGPT account: you can get a key not from OpenAI itself but from a gateway that has already arranged payment and hands out access to end users. This is how codexkey works: you get a key on the codexkey site, pay for it with a Russian card or through SBP (the Russian Faster Payments System), and point Codex CLI at that key instead of a platform.openai.com key.
How to set up Codex CLI with codexkey
Codex CLI configuration lives in ~/.codex/config.toml. To switch the provider to codexkey, add:
model_provider = "codexkey"
model_reasoning_effort = "medium"
model = "gpt-5.6-sol"
[model_providers.codexkey]
name = "codexkey"
base_url = "https://api.codexkey.online/v1"
env_key = "CODEX_KEY"
The key goes into an environment variable:
export CODEX_KEY="your-codexkey-key"
After that, the codex command in the terminal works the same as with an OpenAI key directly, except payment goes through codexkey in rubles and the account's country is not checked at all. A detailed walkthrough of setup, model choice and per-token cost estimates is in Codex CLI with an API key instead of a subscription, and the official guide with steps for each OS is in the documentation.
One honest caveat: the catalog changes. At the time of this update codexkey offers GPT-5.6, GPT-6 and GPT-6.1, including gpt-6-sol and gpt-6.1-sol. Before a production launch, check the exact ID on the models page and test it on your own repository.
If you still need a ChatGPT subscription
Some Codex searches are really about the ChatGPT Pro or Plus subscription, not the CLI. There is a wrinkle here too: since September 10, 2026, OpenAI has paused sales of and upgrades to the $200 Pro plan (Pro 20x), and that has nothing to do with geography. Who the pause does not affect and what to do if you need exactly that plan is covered in Where to buy Codex now that Pro 20x is closed. Even without the pause, a ChatGPT subscription is hard to set up from Russia for the same payment reasons described above, so for coding in the terminal the API-key route is usually shorter.
Codex or Claude Code: which to pick here
If the task is not tied to the OpenAI brand and you need a working terminal agent available from Russia without a VPN, look at Claude Code too: it also connects through environment variables and the same API-key principle, only to Claude models. A comparison of Codex CLI, Claude Code and Cursor by scenario and price is in Codex, Cursor and Claude Code: which to choose.
FAQ
Does Codex work in Russia at all?
Officially no: neither ChatGPT nor the OpenAI API is on the list of supported countries for Russia, so direct sign-up and subscription payment regularly fail. Codex CLI can still be run through a separate API key obtained not from OpenAI but through a gateway such as codexkey.
Do I need a VPN for Codex?
A VPN sometimes helps you get through sign-up by IP, but it does not solve paying with a Russian card and it adds the risk that the session gets flagged as suspicious. The API-key route through a third-party provider removes the geolocation question entirely: the provider itself sits in a supported region.
How is Codex different from ChatGPT when it comes to access from Russia?
ChatGPT is a chat interface with a subscription. Codex is a coding agent that runs both on a subscription and on a separate API key billed per token. The second option works regardless of whether a ChatGPT subscription is available in your country.
Can I get a codexkey key without a VPN and without a card tied to OpenAI?
Yes. Signing up with codexkey needs no OpenAI account and does not check your country by your card: payment goes through YooKassa, Platega, SBP (the Russian Faster Payments System) or cryptocurrency, and a codexkey key is not directly tied to platform.openai.com.
Will my OpenAI account be blocked if I used a VPN before?
We cannot give a guarantee either way, and promises of "definitely no ban" are not worth trusting in this situation. To remove that risk entirely, it is simpler to switch to access through an API key that is not tied to a ChatGPT account.