wire_api = "responses" in Codex: what it means and why it stays in the file

Coding with AICodex CLI·· 9 views· 2 min read

In the Codex config.toml, each provider has a wire_api line. It says which format Codex uses to talk to that provider. With All in One AI, the value is "responses".

What it means

Codex speaks the OpenAI Responses format. With wire_api = "responses", it adds /responses to the base address and sends the requests there: in our case, https://api.mozout.co.mz/v1/responses. Our API answers in that format, with the same models, the same reservation and charge, or Coding Plan points, and the same sandbox.

model = "moonshotai/kimi-k2.7-code"
model_provider = "api"

[model_providers.api]
name = "MozOut"
base_url = "https://api.mozout.co.mz/v1"
env_key = "MOZOUT_API_KEY"
wire_api = "responses"

Is it really required?

According to the official Codex documentation, "responses" is the only accepted value, and it is what Codex uses when the line is missing. Our docs ask for it anyway: with the line written out, the file states the format without relying on the default, and anyone reading it sees at once how Codex talks to our API.

If you copied an old example with another value, such as wire_api = "chat", change it to "responses": Codex no longer accepts any other.

The right address

Field Value
base_url https://api.mozout.co.mz/v1
wire_api "responses"
What Codex calls https://api.mozout.co.mz/v1/responses

base_url ends in /v1. Without it, the request goes to an address that does not exist and the API answers 404 not_found.

How to check

Open Codex with a sandbox_ key and say "hello". The answer is always "Resposta de teste (sandbox).", in the Responses format, and nothing is spent. Then switch to the prod_ key.

In the Responses format, each response is kept for 30 days. See how Codex carries on a conversation.

Want to code with AI in Codex? Visit the Coding with AI page.

See Coding with AI

SEE ALSO

Codex CLI with All in One AI: creating config.toml, the key and the model

How Codex carries on a conversation: responses kept for 30 days

Errors in Codex CLI: the OpenAI format and the code field

Errors when setting up a tool with All in One AI: 401, model not found, no credits, /v1 and rejected config files

Coding with AI in All in One AI

RECOMMENDED PRODUCT

Web hosting with cPanel

Domain and SSL included, daily backups and the panel you already know. from $6.60/mo (3-year plan, with coupon)

See plans
Was this answer helpful? Your answer helps us improve this article.