Skip to content
2api2api Docs
Open console

Guides

Download and install

The ChatGPT desktop app comes with Codex, and for most people it's the only thing to install. This page also covers the web version, the mobile apps, the IDE extension and the CLI.

You want to Install this
Chat and write, and also write code with Codex The ChatGPT desktop app. It comes with Codex. Most people choose this
Not install anything The web version. Open chatgpt.com and start using it
Use it on your phone The ChatGPT mobile app
Write code in VS Code or Cursor The Codex IDE extension
Type commands in a terminal The Codex CLI

If you only use 2api balance: a 2api key is for writing code with Codex. ChatGPT chat still needs a ChatGPT account. After you install Codex, set up 2api in one click with magpie.

The desktop app has both ChatGPT and Codex. Switch between them from the dropdown menu in the top-left corner.

Open chatgpt.com/download, download the macOS version and drag ChatGPT into Applications. You can also download it directly: Apple silicon, Intel.

Check that it’s installed: Open ChatGPT and click Continue to sign in to sign in (see Sign in). Then choose Codex from the dropdown menu in the top-left corner. If you see a new Codex conversation page, you’re done. If you installed the Codex desktop app before, it becomes the ChatGPT desktop app after an update. Open it, then switch to Codex.

  • Web: Open chatgpt.com. It works in browsers on both computers and phones. Codex is at chatgpt.com/codex.
  • iPhone / iPad: ChatGPT in the App Store. The developer is OpenAI OpCo, LLC, and it needs iOS 18 or later. The app isn’t available in the App Store in mainland China, Hong Kong or Macau. You can use the web version for now: open chatgpt.com in Safari, then tap Share → Add to Home Screen.
  • Android: ChatGPT on Google Play. The developer is OpenAI, and it needs Android 7.1 or later and Google Play services. OpenAI doesn’t offer the installer anywhere else. APKs on third-party sites may be fakes.
  1. Search for Codex in your editor’s extension marketplace. Pick the one whose publisher is OpenAI and whose extension ID is openai.chatgpt. There are quite a few look-alike extensions with similar names. You can also open the VS Code extension page directly. VS Code, Cursor and Windsurf all use this extension.

  2. After installing, click the Codex icon in the sidebar. If you can’t find the icon, press Ctrl+Shift+P (Cmd+Shift+P on macOS) to open the Command Palette and run Codex: Open Codex Sidebar. Cursor’s activity bar is horizontal, so the new icon may be hidden under More. Drag it out and pin it.

  3. Sign in. If you use a ChatGPT subscription, click Sign in with ChatGPT. If you use 2api balance, turn on Connect (接入) for Codex in magpie. The extension uses the same settings.

  4. Open a project and send “Give me an overview of this project” to try it. If it replies normally, it’s installed.

In JetBrains IDEs, choose Codex in AI Chat. In Xcode, choose Codex when you start a new conversation in the coding assistant.

You only need this if you’re used to typing commands in a terminal. If you don’t use a terminal, skip this section. Run the command for your system in a terminal (on Windows, use PowerShell, not CMD):

Terminal window
curl -fsSL https://chatgpt.com/codex/install.sh | sh

After installing, close the terminal, open a new one and run codex --version. If you see a version number, it’s installed. To update later, run codex update.

If it won’t install or says the command isn’t found, see the CLI section of the FAQ. For WSL2, the sandbox, garbled Chinese text and other Windows settings, see Using Codex on Windows.

ChatGPT is only available in the countries and territories that OpenAI supports. For the list, see Supported countries and territories in the OpenAI Help Center. According to OpenAI, using it in an unsupported region may get your account restricted or deactivated.


This page follows OpenAI’s official documentation, checked in October 2026. OpenAI updates often, so button names and menu locations may differ slightly. Go by what you see on screen.