Quick answer
Access to Codex is set by OpenAI's general list of countries for ChatGPT and the API. Russia is not on it.
Blue: the country is on the OpenAI list. Orange: the country is not on the list, with Russia in the stronger tone.
OpenAI is the company that makes ChatGPT and Codex. Codex is an agent for programmers: it works in the terminal and in an app, reads the files of a project and edits code for the task you give it. OpenAI publishes a list of countries where its services are available. If your country is on the list, the regional rules do not get in your way. If it is not, access can end with the account being blocked. OpenAI does not explain why it is built this way. In my own guess, it is company policy plus the risk of sanctions, export controls and laws of the United States and other countries.
Everyday example. Dana lives in Almaty and wants to try Codex. She opens the OpenAI list and finds the line “Kazakhstan”. The entry has no brackets and no reservations, so nothing in the region stands in the way. What remains is the ordinary part: sign in to a ChatGPT account or create an API key and choose a payment method. A person who is physically in Russia will not find such an entry.
A common mistake is to assume that Codex lives by separate rules because it runs in the terminal and installs with one command. There is no separate country list for Codex, either on OpenAI's public pages or in the program's repository. Codex sign-in points to the general ChatGPT and API list. The second mistake concerns VPN, a program that replaces the address from which you reach the network. VPN is not mentioned in the country help or in the terms of use. The terms forbid circumventing restrictions and protective measures, and replacing an address may fall under that; this conclusion is mine, OpenAI has made no direct statement about it.
You can check the answer in a minute: open the OpenAI page with the list of supported countries and find your country with the browser's page search. The help center at help.openai.com does not open for automated requests (error 403), so the rows of the list were checked on the developers.openai.com page.
Date checked: 18.11.2026. The article retells official documents and contains no ways to bypass restrictions.
OpenAI country list
OpenAI keeps one list for ChatGPT and the API and publishes no separate list of unavailable countries. What the list does not name is unavailable.
The country list is an OpenAI page that names the places where ChatGPT and the API can be used. Codex belongs to the same set: it connects either through a ChatGPT account or with an API key, so both ways of signing in run into this list. There is no separate page called “countries where Codex is closed”. So the absence of a country from the list is the only signal that access is closed.
The list works as one gate for ChatGPT, the API and Codex: a country on the list passes, a country outside it is stopped.
Most entries in the list are a single word: “Armenia”, “Georgia”, “Kazakhstan”. Such an entry means the whole country is supported. Some entries carry a reservation. The most visible one is “Ukraine (with certain exceptions)”. I will take it apart. “Ukraine” names the country. The brackets with “with certain exceptions” mean that part of the territory is excluded. Which places are excluded is not named in the entry on the OpenAI page, and there is no list of exceptions on OpenAI's public pages. For comparison, Anthropic names the excluded regions of Ukraine one by one, while OpenAI has no such list in the entry. A practical rule follows: if your country is written with brackets, the single word from the list is not enough, and you will have to clarify the answer with OpenAI support.
Everyday example. Arsen lives in Yerevan and is building a team with colleagues from Armenia, Georgia and Ukraine. He opens the list and finds “Armenia” and “Georgia” without brackets: for people located in those countries there are no questions. He reads the entry “Ukraine (with certain exceptions)” more carefully and asks a colleague from Kyiv to write to OpenAI support to find out whether his city falls under the exceptions. You can check it yourself like this: find the country with the page search and see whether brackets follow the name.
Rows checked on 18.11.2026 against the list on developers.openai.com. Before deciding, open the OpenAI page and find your country: the list changes.
Anthropic, the company that makes Claude Code, has a list of its own, and it does not fully match OpenAI's. Russia, Belarus, China, Iran, Cuba, North Korea and Syria are on neither. Afghanistan, Myanmar and Yemen are on the OpenAI list and missing from Anthropic's. So a country check for one agent does not replace the check for another: open the list of the one you plan to install. Neither company explains the differences.
How Codex signs in
The Codex sign-in documentation points to the general list of countries and contains no regional restrictions of its own.
Sign-in is the way Codex proves to OpenAI's servers that requests come from your account. There are two ways, and each is tied to its own billing. Signing in with ChatGPT uses a ChatGPT subscription: you pay a fixed amount and use the agent within its limits. Signing in with an API key uses a programmatic key: you pay API rates for actual use. Both paths sit behind the same gate with the country list, and which one to choose depends on how you pay and what you need. Cloud Codex (Codex cloud), where the agent runs on OpenAI's servers, requires signing in with ChatGPT, and an API key does not work for it.
Two sign-in paths: ChatGPT (subscription) and API key (pay per use). The sign-in data lives on your computer, in a file or in the system storage.
The program caches the sign-in data on the device. It lies in the file ~/.codex/auth.json or in the operating system's password storage. The mode is set by the parameter cli_auth_credentials_store with four values: file, keyring, auto and ephemeral. The file with the sign-in data is equivalent to a key to the account. Whoever copies it can use your account, and OpenAI's terms forbid sharing sign-in data and making an account available to others.
| Sign-in with ChatGPT | Sign-in with an API key | |
|---|---|---|
| Payment | ChatGPT subscription | API rates |
| Codex cloud | this way is required | does not work |
| Where sign-in data is stored | in the file ~/.codex/auth.json or in the system storage; the mode is set by the parameter cli_auth_credentials_store (file, keyring, auto, ephemeral) | |
| Regional check | not described on the sign-in page; the general country list applies | |
Nika lives in Tbilisi and installs Codex on her work laptop. She launches the program and picks sign-in with ChatGPT, because she already has a subscription. The sign-in data is saved on the laptop. Her country is on the list as “Georgia”, without brackets, so there are no questions about the region. A week later she decides to use cloud Codex and finds out that it needs exactly the ChatGPT sign-in: the API key her colleague uses does not work for the cloud. To check how the program signed in, you can ask the agent itself: a ready prompt is at the end of the article.
What OpenAI's servers actually check at sign-in is not described on public pages: the connection address, payment details, a phone number or all of them together. This is not confirmed. So the article makes no claim about the signal by which OpenAI would determine that you are outside the list. All that is known is that no regional checks are described at sign-in, and it points to the general list.
VPN: what is said and what is not
The terms for individuals (effective 1 January 2026) speak of “restrictions” and “protective measures” in general. VPN and region are not mentioned in them.
VPN is a program that replaces the address from which a site sees your connection. People install it for privacy on a public network or for access to a corporate network. OpenAI is silent about VPN in its documents, so I separated three things: what is written word for word, what follows from the terms and what remains opinion. This shows where the rule is and where the rumor is.
OpenAI's documents say little about VPN: VPN is not mentioned, while circumventing restrictions and protective measures is forbidden.
Word for word, the documents contain the following. VPN is not mentioned in the country help or in the terms of use. The terms forbid circumventing limits, restrictions and protective measures. They also forbid passing the account to others and using the services in countries under a US embargo. Neither “VPN is allowed” nor “VPN is forbidden” appears in these documents. Any conclusion either way remains an interpretation of the text.
Four bans in OpenAI's terms: circumventing restrictions and protective measures, passing the account to others, use in countries under a US embargo and breaking the terms.
Four bans in the terms relate to the topic of access, and each can be read as a separate rule.
- 1Circumvent restrictions and protective measuresInterfering with the services is forbidden, including circumventing limits, restrictions and protective measures. A regional check may count as such a measure, but the terms do not name it.
- 2Pass the account to othersSharing sign-in data and making the account available to anyone else is not allowed. Responsibility for everything that happens under the account stays with the owner.
- 3Use the services in countries under a US embargoThe services may not be used in a country or territory under a US embargo, or for the benefit of persons with whom dealings are prohibited by trade laws.
- 4Break the terms and usage policiesFor breaking the terms or the Usage Policies OpenAI may suspend or close access. OpenAI draws the same conclusion in case of risk of harm and when the law requires it.
Since VPN is not mentioned in the terms, is it allowed? The absence of a mention permits nothing. The ban on circumventing restrictions and protective measures is worded in general terms, and replacing an address may fall under it. How to check: find the phrase about “circumvent any rate limits or restrictions” in OpenAI's terms of use and read it in full.
Do the terms forbid VPN outright? VPN is not mentioned in them. People derive a ban on bypassing the region from the general ban on circumventing protective measures, but such a derivation is an interpretation with no quotation behind it.
Does a paid subscription give the right to access from any country? The terms and the help name the list of countries as the criterion, and pricing plans are not mentioned among the criteria. A ChatGPT subscription and an API key stand behind the same gate. How to check: read the first sentence of the page with the list.
If the country is on the list, can you stop worrying about VPN? The ban on circumventing protective measures is written in the terms for all users, and the country list does not cancel it. The country help also has a reservation about the device: the error “OpenAI's services are not available in your country.” can appear even in a supported country. The conditions for its appearance are not described in the help, so it is worth asking support.
Is it simpler with Claude Code? Anthropic does not mention VPN in its region rules either, but the Claude Code documentation has its own wording on the program's compatibility with VPNs. The wording differs between the companies and the logic is similar: a list of countries plus a general ban on circumventing protective measures. A detailed analysis for Claude Code is in a separate article.
The decision about risk stays with you. I do not describe or recommend ways to connect: on this topic I have only the wording of the terms.
Bans and their causes
A ban is the suspension or closure of an OpenAI account, after which sign-in to ChatGPT, the API and Codex stops working. OpenAI's terms name three grounds, and one of them is a breach of the terms or the usage policies.
The grounds are written in the terms of use for individuals (Terms of Use, effective 1 January 2026) and in the help article on the country list. The terms give three grounds: a breach of the terms themselves or of the Usage Policies, a legal requirement, and a risk of harm to OpenAI, other users or anyone else. A fourth ground sits in the help article on the country list: access to the services outside the listed countries “may result in your account being blocked or suspended”.
The path in the diagram: a ground, then suspension or closure, then an appeal through support. OpenAI makes the decision, and the person is left with a request to support; the terms promise no outcome.
How quickly a ban arrives and what it looks like on screen is not described on OpenAI's public pages: I found nothing. They say only that the right to suspend or terminate access belongs to the company, and that an appeal can be filed if the decision was a mistake.
Another provision of the terms concerns responsibility: an account cannot be passed to others, and the owner is responsible for everything that happens under it. So someone else's account, or shared access inside a team, remains a ground for restriction even if the country is on the list.
- 1Supportwrite to OpenAI support and state that, in your view, the ban is a mistake
- 2Detailsattach the date, the country you signed in from, the error text and copies of the emails
- 3Waitingwait for a reply: the terms give no deadlines and no chance of success
The public pages have no appeal form with a name, no address and no review deadlines, so the steps contain only what the terms say: a request to support. An appeal fixes a mistake, but the ground named in the help article stays the same while a person keeps using the service from a country outside the list. This is my reading of the terms and the help article; OpenAI makes no such comparison.
- 1Oleg lives in Russia and wants to try CodexHe installs the program, tries to sign in and sees the text “OpenAI's services are not available in your country.” Russia is absent from OpenAI's country list, and the terms warn of a block or suspension of the account for access outside the list. Which check actually fired, the address, the phone number or the payment details, is not described on the public pages. An appeal through support is possible, but it does not put the country on the list. To check it yourself: open OpenAI's country list, find Russia in it and compare the result with the error text from the help article.
Are bans given only for breaking the terms? No: the terms have two more grounds, a legal requirement and a risk of harm, and the country help article separately names access outside the list.
Does an appeal bring access back? The terms say only that an appeal can be filed through support. They promise no result.
Are the causes of an OpenAI ban fully listed in the help center? OpenAI's separate help article on the causes of account bans is closed to automated checking (error 403), so I do not retell its provisions. The business terms, the Service Terms and the Usage Policies are closed in the same way. For organizations these documents have to be read separately on openai.com and help.openai.com.
Boundary of knowledge: what the terms for individuals and the country help article say is confirmed. What lies in the closed documents is not confirmed.
What Codex sends to the server
Requests to the model always go to the server, otherwise the agent does not work. The other flows (analytics, metrics, feedback submission) are switched off in config.toml, and the text of prompts reaches OpenTelemetry logs only with explicit consent.
I based this on the source code of Codex CLI (commit 8011b92 of 18.11.2026) and on OpenAI's settings page. Codex is a coding agent: it works in the terminal and in the app and constantly talks to the server. Some data is needed for the work, some is collected on top. The needed data is your requests to the model and its replies. The extra flows are analytics of Codex products, metrics, and feedback sent by the /feedback command. Telemetry is the automatic sending of information about how the program runs: how long an action took, whether an error occurred. OpenTelemetry is an open standard for such information.
Requests to the model always go out. Analytics, metrics and /feedback are switched off by settings. Prompt text goes into OpenTelemetry only with consent.
The first two rows are linked: by default the built-in metrics exporter follows the analytics setting. Feedback submission stands apart: nothing is sent until the person runs /feedback. The last row shows the only flow that is off by default.
Codex config.toml
[analytics]
enabled = false
[otel]
metrics_exporter = "none"
[feedback]
enabled = falseThe settings schema in the repository clarifies: with analytics enabled = false, the program's own OTLP exporters stay on, and to switch metrics off you need metrics_exporter = "none". What exactly OpenAI stores from the code and requests, and for how long, is not found on the public pages for Codex CLI: not confirmed.
These settings concern data collection. They have no effect on the country list: switched-off analytics does not make use from a country outside the list permitted.
- 1Timur lives in Tashkent and writes code for a clientUzbekistan is on OpenAI's country list, so he signs in to Codex through his ChatGPT account. The client asks him not to send anything extra. Timur opens config.toml and writes three blocks: analytics off, metrics off, feedback submission off. Requests to the model keep going out, because the agent's work depends on them. To check it yourself: ask the agent to show the values of the three settings and make sure each one is set to off.
Does turning off analytics stop requests to the model from being sent? No: requests and replies always go to the server, this is the basis of the agent's work.
Is the single line [analytics] enabled = false enough? The settings schema clarifies that the program's own OTLP exporters stay on in that case, and metrics are fully switched off by metrics_exporter = "none".
Does everything the agent recorded locally go to the server? No: in the Codex CLI code, local databases in the ~/.codex directory (session history, logs) are always written, but no network code that syncs them was found. The exception: logs from them can go out when /feedback is submitted, and only by the person's decision.
Access: Codex and Claude Code
For both agents sign-in is tied to the country list of the company behind it, and Russia is on neither. The criteria of the lists differ: for OpenAI it is the countries where the services are offered, for Anthropic it is also the person's physical location, the company's registration and who owns the company.
Claude Code is Anthropic's coding agent, and it also works in the terminal. The comparison helps when a person chooses between two agents and wants to know whether access works the same way for both. It is the same in the main point: both companies publish a country list, and outside the list access is not offered. What differs is what exactly is checked and what the list covers.
Two entrances: the OpenAI list and the Anthropic list. Russia is absent from both, and the criteria of the lists differ.
| Codex (OpenAI) | Claude Code (Anthropic) | |
|---|---|---|
| Russia on the list | no | no |
| What the list covers | ChatGPT and the API; no separate rule for Codex | apps, including Claude Code, and the API |
| Criterion | list of countries where the services are offered | physical location, registration and who owns the company |
| VPN in the region policy | not mentioned | not mentioned |
| Sign-in | ChatGPT or an API key | a Claude subscription or a Console account |
| Differences between the lists | Afghanistan, Myanmar and Yemen are on OpenAI's list and not on Anthropic's | |
Three rows of the table need an explanation. In the coverage row, OpenAI has one list for ChatGPT and the API, and Codex gets no rule of its own, while Anthropic's list names the apps directly, Claude Code among them. In the criterion row, Anthropic checks three signs, so a company from an unsupported region is closed out even if its employees are in a listed country. OpenAI's country list has no such signs for companies. The last row is the difference by country: Afghanistan, Myanmar and Yemen are named on OpenAI's list and absent from Anthropic's.
The analysis for Claude Code, with install errors, phone verification and payment, is in a separate article on regions, VPNs and bans.
What you can do legitimately
OpenAI's terms leave four paths that need no workaround: find your country on the list, read the terms, write to support and choose another agent.
Legitimate options exist, and getting around the rules is part of none of them. The most direct path is to find your country on OpenAI's list. The next is to read the terms for individuals or for organizations before starting work. A third path is for the case when the country is on the list but sign-in does not work: write to support. The fourth is to choose another agent whose terms allow your country.
Four paths with a check mark are open: a country on the list, the terms, support and another agent. The closed orange door stands for getting around the rules, which does not belong here.
| Situation | Step |
|---|---|
| The country is on the list, but sign-in does not work | write to OpenAI support and attach the error text; an appeal goes through the same channel |
| The country is not on the list | treat access as closed; look for an agent whose terms allow your country |
| You need to work with a local model | OpenCode: you choose the model yourself, including a local one; check the terms of the model and its provider separately |
| A company in an unsupported region | a legal review of the terms before starting work; Anthropic closes organizations registered or controlled from an unsupported region |
OpenCode is an open agent: it provides no model of its own and connects to the model of the provider you choose, and that provider sets the region rules. So the choice should follow the country list of the model's provider.
- 1Aigul lives in Bishkek and wants to start with CodexShe finds the row “Kyrgyzstan” on OpenAI's list, reads the terms for individuals and signs in through a ChatGPT subscription in her own name. A week later sign-in stops working and the screen shows an error. She writes to OpenAI support, attaches the error text and the date, and waits for a reply. To check it yourself: open the list, find your country and save a screenshot of the row together with the date.
Someone else's account, someone else's API key, intermediaries and resale of access break the terms: an account cannot be passed to others. These ways are not covered here.
Frequently asked questions
Does Codex work in Russia?
Officially no: Russia is not on OpenAI's list of supported countries for ChatGPT and the API, and the public pages have no separate rules for Codex. Source: help.openai.com/en/articles/7947663 and developers.openai.com/api/docs/supported-countries. Date checked: 18.11.2026.Can I use Codex through a VPN?
VPN is not mentioned in the terms or in the country help article. A VPN is a program that replaces the address from which you reach the network. The terms forbid getting around restrictions and protective measures, and OpenAI warns of an account block for access outside the list. The documents give no clear answer, so the decision is yours and at your own risk. Source: openai.com/policies/row-terms-of-use. Date checked: 18.11.2026.Why does OpenAI ban accounts?
What is confirmed: access outside the country list, a breach of the terms or usage policies, a legal requirement and a risk of harm. Check the separate help article on the causes of bans by hand on help.openai.com. An appeal goes through support. Date checked: 18.11.2026.How do I turn off analytics in Codex?
In config.toml add [analytics] enabled = false, [otel] metrics_exporter = "none" and [feedback] enabled = false. The first two switch off built-in analytics and metrics, the third turns off feedback submission. Requests to the model keep going out. Source: learn.chatgpt.com/docs/config-file/config-reference. Date checked: 18.11.2026.How does OpenAI's country list differ from Anthropic's?
The criteria differ. For OpenAI it is the countries where ChatGPT and API services are offered. For Anthropic it is also the person's physical location, the company's registration and who owns the company. Afghanistan, Myanmar and Yemen are on OpenAI's list and not on Anthropic's. Date checked: 18.11.2026.What should I do if the country is on the list but sign-in does not work?
Write to OpenAI support and attach the error text: the country help article says the error is possible even in a supported country after a device was used in an unsupported region. An appeal against a ban goes through the same support. Date checked: 18.11.2026.Prompts for the agent
Three ready-made prompts that change nothing without your confirmation.
The first prompt only reads: it shows three data-collection settings. The second shows how Codex signed in, through ChatGPT or an API key, and where the sign-in data lives. The third writes to the settings file, so the agent first shows a diff, that is, the difference between the old and the new file, and waits for confirmation.
1. Which data-collection settings are set
Show which analytics, otel and feedback settings are currently set in the Codex config.toml. Change nothing.2. How Codex signed in
Show how Codex is currently signed in for me: through ChatGPT or an API key, and where the sign-in data lives.3. Turn off extra data sending
Add the blocks [analytics] enabled = false, [otel] metrics_exporter = "none" and [feedback] enabled = false to config.toml. First show the diff and wait for my confirmation.The first and second prompts only read. The third writes to the settings file, so look at the diff before it is written.