Quotaflow
llms.txtOpenAPIDashboard
Serverless & Agents

Codex Desktop

Use this page to connect Codex Desktop to Quotaflow while keeping your normal ChatGPT sign-in for the app.

What this setup does

Login versus model provider

Codex has two separate pieces of configuration:

WhatUseDo not use
Codex app sign-in, device connections, remote control, and approvalsYour normal ChatGPT login inside Codex DesktopDo not replace this with a Quotaflow API key.
Model requests made by CodexYour Quotaflow API key in ~/.codex/config.tomlDo not write the key into ~/.codex/auth.json.

Do not run codex login --with-api-key just to install Quotaflow. Keep ChatGPT sign-in, and add Quotaflow only as the model provider.

If you do not have a ChatGPT account

A Quotaflow key can power model requests, but it is not a Codex Desktop login. If Codex Desktop asks you to sign in, use a ChatGPT account for the app sign-in first, then install Quotaflow as the model provider.

If you do not have or do not want a ChatGPT account, use Codex CLI or another OpenAI-compatible local agent that supports a custom base URL and API key. Those clients can call Quotaflow directly with your qf_ key.

Choose your operating system

SystemWhat to do
macOS Codex DesktopUse the installer below in Terminal.
macOS Codex CLIUse the installer below in Terminal.
Linux Codex CLIUse the installer below in your shell.
Windows with WSLRun the installer inside the WSL terminal for the Codex CLI environment that lives in WSL.
Windows native Codex DesktopKeep the app signed in with ChatGPT. Do not paste the bash installer into PowerShell. Use a POSIX shell such as Git Bash only if that Codex installation reads the same home directory, or use the manual setup section below.

Before you start

  1. Install and open Codex Desktop or Codex CLI.
  2. Keep Codex Desktop signed in with ChatGPT if you use ChatGPT mobile, remote control, or app approvals.
  3. Have your Quotaflow API key ready. It starts with qf_.
  4. Open the right terminal for your system:

- macOS: Applications → Utilities → Terminal.

- Linux: your normal terminal.

- Windows WSL: your WSL Ubuntu terminal.

- Windows native PowerShell: do not use the bash installer block directly; use manual setup or ask Quotaflow support for a Windows-native installer.

Step 1: run the installer

For macOS, Linux, WSL, or a compatible POSIX shell, copy the whole block below, paste it into Terminal, and press Enter. You do not need to type the commands one by one:

curl -fsSL https://docs.quotaflow.ai/install/codex-desktop.sh -o /tmp/quotaflow-codex-desktop.sh
chmod +x /tmp/quotaflow-codex-desktop.sh
/tmp/quotaflow-codex-desktop.sh

The installer will ask for your Quotaflow key. Paste the key when prompted. The key input is hidden, so Terminal may look blank while you paste or type it.

Do not paste your key into screenshots, issue trackers, shared recordings, or the command itself.

Step 2: restart Codex Desktop

Quit and reopen Codex Desktop so it reloads ~/.codex/config.toml.

Step 3: test Codex Desktop

In Codex Desktop, start a new session and send:

Reply with only: connected

A successful setup should return:

connected

Switch back or uninstall

If you need to restore the previous Codex configuration, run:

bash ~/.codex/bin/quotaflow-codex-desktop-restore.sh

Then quit and reopen Codex Desktop.

The restore command puts your original ~/.codex/config.toml back. It does not delete your ChatGPT login. If you also want to remove the saved Quotaflow key file, run:

rm ~/.codex/quotaflow-codex-api-key

What the installer writes

The installer writes these local files:

FilePurpose
~/.codex/config.tomlAdds the Quotaflow model provider.
~/.codex/quotaflow-codex-api-keyStores your Quotaflow key with private permissions.
~/.codex/bin/read-quotaflow-codex-key.shLets Codex read the local key without putting it in the config file.
~/.codex/bin/quotaflow-codex-desktop-restore.shRestores your previous Codex config.
~/.codex/backups/Keeps backups of the previous config.

Configuration values

SettingValue
API keyYour Quotaflow production API key
Base URLhttps://api.quotaflow.ai/openai/v1
Responses URLhttps://api.quotaflow.ai/openai/v1/responses
Models URLhttps://api.quotaflow.ai/openai/v1/models
Default modelgpt-5.5

Manual setup for advanced users

Most macOS, Linux, and WSL users should use the installer above. If you manage Codex configuration manually, preserve ChatGPT OAuth and do not edit ~/.codex/auth.json.

Add a user-level provider in ~/.codex/config.toml on macOS/Linux/WSL, or the equivalent Codex user config file for your native Windows installation:

model = "gpt-5.5"
model_provider = "quotaflow-codex"

[model_providers.quotaflow-codex]
name = "Quotaflow"
base_url = "https://api.quotaflow.ai/openai/v1"
env_key = "QUOTAFLOW_API_KEY"
wire_api = "responses"

Then provide QUOTAFLOW_API_KEY through your shell profile or secret manager. The installer is safer for most users because it avoids putting the key directly in a command that could be saved to shell history.

For native Windows setups, do not paste the macOS/Linux bash installer into PowerShell. Configure the same provider values in the Codex user config location used by your Windows Codex installation, and keep the key in a Windows secret store or a private local file.

Other desktop or IDE agents

For other desktop agents, IDE extensions, or local GUI coding tools that support OpenAI-compatible endpoints:

  1. Open the agent settings.
  2. Choose OpenAI-compatible API settings if available.
  3. Paste your Quotaflow API key.
  4. Set the base URL to https://api.quotaflow.ai/openai/v1.
  5. Save and run the same connected test prompt.

Image generation in Codex Desktop

For Codex Desktop image prompts such as 生图:..., use the Quotaflow GPT Image 2 skill setup in the GPT Image 2 reference. This installs a local Codex skill that calls https://api.quotaflow.ai/openai/v1/responses with the Responses image_generation tool and displays the returned PNG in Codex Desktop.

Codex Desktop's built-in image generation may use its own first-party path. If you need image generation to bill through your Quotaflow key, tell the agent to use the local quotaflow-imagegen skill instead of the built-in image generator.

Troubleshooting