API Reference
Codex CLI and Responses endpoint
Codex uses the Responses route at https://api.51cowork.com.
Set wire_api = responses in config.toml. Store only OPENAI_API_KEY in auth.json, and select a model from /v1/models.
- Wire API
- responses
- Config
- ~/.codex/config.toml
- Auth
- ~/.codex/auth.json
- Key
- OPENAI_API_KEY
Provider configuration
~/.codex/config.toml
tomlmodel_provider = "51cowork"
model = "<model-from-v1-models>"
[model_providers."51cowork"]
name = "51cowork"
base_url = "https://api.51cowork.com"
wire_api = "responses"
requires_openai_auth = trueAuthentication file
~/.codex/auth.json
json{
"OPENAI_API_KEY": "<key-from-dashboard>"
}Restart and verify
- Merge an existing config.toml instead of replacing other providers.
- Quit and restart the CLI or extension completely.
- Create a new task, send a minimal request, and verify request_id in Usage.
