API Docs
Client Setup

Codex App Setup

Connect the Codex desktop app and IDE extension to UnioAPI — they share config.toml with the Codex CLI, use the Responses API, and read the key from an environment variable.

The Codex desktop app, the IDE extensions (such as VS Code) and the CLI read the same configuration file, ~/.codex/config.toml. Configure it once and all three call UnioAPI through the OpenAI Responses API (POST /v1/responses).

Details depend on your version

Codex changes often; this page reflects the version at the time of writing. If configuration moves, follow the official Codex docs.

Prerequisites

  • The Codex desktop app or IDE extension (desktop apps are available for macOS and Windows; on Linux use the Codex CLI).
  • A topped-up UnioAPI account and an API key.

1. Write the configuration

Edit the file (create it if missing): ~/.codex/config.toml on macOS / Linux, %USERPROFILE%\.codex\config.toml on Windows.

model = "gpt-5.6-sol"
model_provider = "unioapi"
model_reasoning_effort = "high"

[model_providers.unioapi]
name = "UnioAPI"
base_url = "https://api.unioapi.com/v1"
env_key = "UNIO_API_KEY"
wire_api = "responses"
  • wire_api must be responses; Codex no longer supports the Chat Completions transport.
  • The top-level model_provider must match the id in [model_providers.unioapi].
  • model_reasoning_effort is optional; use a value the model supports.

2. Provide the API key

env_key points to the UNIO_API_KEY environment variable, so the key stays out of the file.

macOS

Apps launched from the Dock do not see variables from ~/.zshrc. Set it with launchctl:

launchctl setenv UNIO_API_KEY "your UnioAPI key"

This lasts until the next reboot — add it to a login script for long-term use, and also export it in ~/.zshrc for the Codex CLI in your terminal.

Windows

setx UNIO_API_KEY "your UnioAPI key"

Then fully quit Codex (including the tray icon) and open it again.

3. Start and verify

Fully quit and reopen Codex, start a task and send a message. If it replies and the console's Request logs show a call to /v1/responses, you are connected.

Codex desktop app chatting through UnioAPI
public/docs/screenshots/codex-desktop-chat.png · 1600×1000

FAQ

SymptomCheck
Missing API keyOn macOS the key wasn't set with launchctl setenv, or the app wasn't fully restarted
Provider configuration error on startwire_api is not responses, or model_provider and the block id differ
404 model not foundmodel is not a UnioAPI model ID; see GET /v1/models
402The balance is too low; redeem a CDKEY under Wallet first
400 after turning on FastThe model does not offer Fast; see Service tiers

Next steps