Setup wizard

Connect your AI tool.

Pick a tool, your operating system and a model. The steps and snippets below update to match.

1Tool
2Operating system
3Instructions

Connect Codex App

The Codex desktop app shares config.toml with Codex CLI. Add the provider there and restart the app.

  1. Install the Codex app from chatgpt.com/download.
  2. Save your key where desktop apps can read it. Apps opened from the Dock don't see variables from your shell settings, so use launchctl. Run it again after you restart your Mac.
    Terminal
    launchctl setenv CHEAPTOKENS_API_KEY "YOUR_API_KEY"
  3. Create the file ~/.codex/config.toml with this content. The app and Codex CLI share this file. If it already exists, put the first two lines at the very top and the rest at the end.
    config.toml
    model = "gpt-6.2-sol"
    model_provider = "cheaptokens"
    
    [model_providers.cheaptokens]
    name = "CheapTokens"
    base_url = "https://cheaptokens.pw/v1"
    env_key = "CHEAPTOKENS_API_KEY"
    wire_api = "responses"
    requires_openai_auth = false
  4. Quit the Codex app completely and open it again. On the sign-in screen you can skip the ChatGPT login.
  5. Start a new chat and send a message. To check the provider, open Settings → Model Providers: CheapTokens should be the current one.
  • You can also add the provider in the app: Settings → Model Providers → Add → Gateway or custom provider. Enter the base URL https://cheaptokens.pw/v1 and CHEAPTOKENS_API_KEY as the API key environment variable, then turn on Set as current provider.
  • Codex only speaks the OpenAI Responses format, so it works with the models in the list on this page, not with every model.
  • Without a ChatGPT login, cloud tasks and some plugins are not available.
  • If the app can't find your key, the environment variable isn't visible to it. Set it again and restart the app.

Open the full Codex App guide →