> ## Documentation Index
> Fetch the complete documentation index at: https://docs.globalai.vip/llms.txt
> Use this file to discover all available pages before exploring further.

# ChatGPT(Codex) with Global AI: CC Switch or Manual Setup

> Connect ChatGPT(Codex) to Global AI using CC Switch for one-click setup or by manually editing config.toml and auth.json.

ChatGPT(Codex) is OpenAI's official command-line and desktop client. This page shows how to point it at Global AI instead of the official API. Desktop download: [openai.com/codex](https://openai.com/codex/).

<Warning>
  Codex requires a token in the **Codex group**. Tokens for other model vendors will not work. Choose the codex group when you create the key at [globalai.vip/keys](https://globalai.vip/keys).
</Warning>

<Note>
  Pick one of the two methods below: **CC Switch** is best on the desktop with a GUI. **Manual setup** suits users comfortable with command line and config files.
</Note>

## Option 1: CC Switch (recommended)

CC Switch is a desktop tool for switching providers with one click. It supports both Claude Code and ChatGPT(Codex). Download: [github.com/farion1231/cc-switch/releases](https://github.com/farion1231/cc-switch/releases).

Global AI supports one-click import into CC Switch. Steps:

<Steps>
  <Step title="Create a Codex-group key">
    Sign in to Global AI, open **API keys** in the left menu (or go directly to [globalai.vip/keys](https://globalai.vip/keys)), and create a key in the **codex group**.
  </Step>

  <Step title="Open the CC Switch import menu">
    On the row of the new key, click the **...** button on the far right and choose **CC Switch** from the dropdown.

    <img src="https://mintcdn.com/globalai/ERAjY6P56loyiAIX/images/image.png?fit=max&auto=format&n=ERAjY6P56loyiAIX&q=85&s=b4f29cb3bf5e4d49cb4edd046ee7b022" alt="Choose CC Switch from the key menu" width="1158" height="475" data-path="images/image.png" />
  </Step>

  <Step title="Fill in the import details">
    In the dialog:

    * **App**: choose `Codex`
    * **Name**: customize as needed
    * **Main model**: choose `gpt-5.6-sol`

    Confirm and click **Open CC Switch** at the bottom.

    <img src="https://mintcdn.com/globalai/ERAjY6P56loyiAIX/images/image-1.png?fit=max&auto=format&n=ERAjY6P56loyiAIX&q=85&s=44aa2bbbd3fb205f7b47be1ab21eb2c0" alt="Fill in CC Switch import details" style={{ width:"53%" }} width="447" height="543" data-path="images/image-1.png" />
  </Step>

  <Step title="Confirm opening CC Switch">
    Confirm in the browser prompt to open the CC Switch application.

    <img src="https://mintcdn.com/globalai/ERAjY6P56loyiAIX/images/image-2.png?fit=max&auto=format&n=ERAjY6P56loyiAIX&q=85&s=47631fdc8b030164eb35adad95a0273f" alt="Confirm opening CC Switch" style={{ width:"62%" }} width="456" height="214" data-path="images/image-2.png" />
  </Step>

  <Step title="Import the configuration">
    In CC Switch, click **Import** and wait for the success message.

    <img src="https://mintcdn.com/globalai/ERAjY6P56loyiAIX/images/image-3.png?fit=max&auto=format&n=ERAjY6P56loyiAIX&q=85&s=9085331425ab5a7e36643a206d2c53d2" alt="Click the Import button" width="987" height="915" data-path="images/image-3.png" />
  </Step>

  <Step title="Send a test message">
    Open the ChatGPT(Codex) client and send a test message.

    <img src="https://mintcdn.com/globalai/ERAjY6P56loyiAIX/images/image-5.png?fit=max&auto=format&n=ERAjY6P56loyiAIX&q=85&s=ec37453acc8f7182c585268dd260b0a7" alt="Send a test message in Codex" width="1435" height="1035" data-path="images/image-5.png" />
  </Step>

  <Step title="Verify the integration">
    Open [Usage logs](https://globalai.vip/usage-logs/common). If a call appears at the same time as your test, the integration works.

    <img src="https://mintcdn.com/globalai/ERAjY6P56loyiAIX/images/image-6.png?fit=max&auto=format&n=ERAjY6P56loyiAIX&q=85&s=6223ea67fe9a11629a864ee497d96b7b" alt="Verify integration in Usage logs" width="1148" height="418" data-path="images/image-6.png" />
  </Step>
</Steps>

## Option 2: Manual setup

<Steps>
  <Step title="Install ChatGPT(Codex)">
    Download and install the desktop client from [openai.com/codex](https://openai.com/codex/).
  </Step>

  <Step title="Edit config.toml">
    Locate the config file for your OS:

    * **Windows**: `C:\Users\<your username>\.codex\config.toml`
    * **macOS / Linux**: `~/.codex/config.toml`

    Write:

    ```toml config.toml icon=file-code theme={null}
    model_provider = "globalai"
    model = "gpt-5.6-sol"
    model_reasoning_effort = "high"
    disable_response_storage = true


    [model_providers.globalai]
    name = "globalai"
    base_url = "https://globalai.vip/v1"
    wire_api = "responses"
    requires_openai_auth = true
    ```
  </Step>

  <Step title="Edit auth.json">
    Locate the file for your OS (create it if missing):

    * **Windows**: `C:\Users\<your username>\.codex\auth.json`
    * **macOS / Linux**: `~/.codex/auth.json`

    Write your codex-group key:

    ```json auth.json icon=file-code theme={null}
    {
      "OPENAI_API_KEY": "replace with your codex-group API key"
    }
    ```
  </Step>

  <Step title="Restart and verify">
    Restart the ChatGPT(Codex) client, send a test message, and confirm the call in [Usage logs](https://globalai.vip/usage-logs/common).
  </Step>
</Steps>

## Use inside VS Code

After either method is in place, install the official Codex extension from the VS Code marketplace to call Global AI directly from the IDE.

## Troubleshooting

<AccordionGroup>
  <Accordion title="Authentication error on call">
    Confirm the token is in the **codex group**, not another vendor group. Edit the token at [globalai.vip/keys](https://globalai.vip/keys) to check its group.
  </Accordion>

  <Accordion title="Model not found">
    Model IDs change over time. Use the current Codex model IDs shown on [globalai.vip/pricing](https://globalai.vip/pricing).
  </Accordion>
</AccordionGroup>

## References

* [ChatGPT(Codex) official page](https://openai.com/codex/)
* [Global AI pricing](https://globalai.vip/pricing)


## Related topics

- [Claude Code with Global AI: CC Switch or Manual Setup](/en/clients/claude-code.md)
- [Global AI Client Integrations: Parameters and Selection](/en/clients/overview.md)
- [ChatWise Setup: Unified Multi-Provider Access via Global AI](/en/clients/chatwise.md)
- [ChatBox with Global AI: Desktop and Mobile Setup](/en/clients/chatbox.md)
- [Cherry Studio with Global AI: Claude, GPT, Gemini Setup](/en/clients/cherry-studio.md)
