51cowork APIDocs
Open docs navigation

API Reference

Codex CLI and Responses endpoint

Codex uses the Responses route at https://api.51cowork.com.

Quick answer

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
01

Provider configuration

~/.codex/config.tomltoml
model_provider = "51cowork"
model = "<model-from-v1-models>"

[model_providers."51cowork"]
name = "51cowork"
base_url = "https://api.51cowork.com"
wire_api = "responses"
requires_openai_auth = true
02

Authentication file

~/.codex/auth.jsonjson
{
  "OPENAI_API_KEY": "<key-from-dashboard>"
}
03

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.