Codex CLI
Codex CLI works over OpenAI Responses and no longer supports Chat Completions. We answer over Responses as is: the response.* event stream, tools and reasoning.
Setup#
Add a provider to ~/.codex/config.toml:
model = "gpt-6-astra"
model_provider = "aic"
[model_providers.aic]
name = "AI Creator"
base_url = "https://api.aicreator.app/v1"
env_key = "AIC_API_KEY"
wire_api = "responses"
stream_idle_timeout_ms = 300000Codex reads the key from the environment variable named by env_key:
export AIC_API_KEY=sk-aic-…
codexbase_urlends with/v1.wire_api = "responses"— required.stream_idle_timeout_ms— five minutes without events; on long runs we send keepalives, so the stream holds.
Models#
Set model to the model’s full id. Models tagged Codex on the pricing page work with Codex. The API itself gives the exact list for your key:
curl "https://api.aicreator.app/v1/models?surface=responses" \
-H "Authorization: Bearer $AIC_API_KEY"A model that is not on the Responses protocol returns 400 model_not_available. Other common failures are in Troubleshooting.