Native Responses API
Codex only supports the Responses transport. UnioAPI provides POST /v1/responses in the official format, so wire_api = "responses" connects directly.
Codex
The Codex CLI, desktop app and IDE extensions read the same config file. Add a UnioAPI block, export your key, and all three call GPT models through the Responses API.
model = "gpt-6.1-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"The key stays out of the file: export UNIO_API_KEY, then start codex.
Codex only supports the Responses transport. UnioAPI provides POST /v1/responses in the official format, so wire_api = "responses" connects directly.
The CLI, desktop app and IDE extensions such as VS Code all read ~/.codex/config.toml — configure once, use everywhere.
Set model_reasoning_effort within the model's supported range: low effort for small edits, higher for complex refactors.
Most GPT-6 and GPT-5.x models offer Fast; turn it on in Codex and you're billed at Fast prices. Models without Fast return 400 and nothing is executed or charged.
env_key names an environment variable, so the key never appears in the config file. Create a dedicated key for Codex with its own spend cap and expiry.
Every model call has a request log with model, reasoning effort, tokens, latency and charge; filter by key to see all of Codex's calls.
Create a key for Codex in the console and set a spend cap and expiry if you need them.
Read the docsAdd a [model_providers.unioapi] block with wire_api = "responses", and keep the top-level model_provider equal to the block id.
Read the docsExport UNIO_API_KEY and run codex; on Windows use setx and open a new terminal.
Read the docsThe desktop app and IDE extensions read the same config; just make sure they can see the environment variable.
Read the docsEvery model call Codex makes is settled from its response usage: input, cache reads, cache writes and output are priced separately, reasoning tokens count as output, and each service tier has its own prices. The model pages list current prices.
No. Since February 2026 Codex only supports the Responses transport and wire_api = "chat" has been removed, so older tutorials no longer work. Use responses.
Create an API key, write config.toml, export the key and start codex.