Use Codex with Steerwise
The Codex CLI uses the OpenAI Responses API at /v1/responses.
- Needs: a Steerwise key
- Endpoint: POST /v1/responses
Set it up
Replace <model id> with auto or any id from GET /v1/models, and YOUR_API_KEY with your key. The Console’s Connect your tool page fills these in for your key and plan.
Add to ~/.codex/config.toml:
model = "<model id>"
model_provider = "steerwise"
[model_providers.steerwise]
name = "Steerwise"
base_url = "https://api.steerwise.s3techpulse.com/v1"
env_key = "STEERWISE_API_KEY"
wire_api = "responses"Then, in your shell:
export STEERWISE_API_KEY="YOUR_API_KEY"Check that it works
Send one short request with the same key. It costs a few tokens and shows up in the Console under Usage, with the model that answered and its cost.
curl https://api.steerwise.s3techpulse.com/v1/responses \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"model": "auto", "max_output_tokens": 16, "input": "Say hi"}' Notes
- Confirm: the config keys above match your Codex CLI version.
If a request fails
The codes you are most likely to see while setting up:
| Status | Code | When |
|---|---|---|
| 401 | invalid_api_key | The key is malformed, unknown, revoked or expired. |
| 402 | insufficient_balance | The wallet balance is too low for this request. |
| 402 | spend_cap_reached | Spend has reached a daily or monthly cap of the key or the organisation, or the agent run’s cap. |
| 404 | model_not_found | No active model has that id. |
| 429 | rate_limit_exceeded | A per-minute request or token limit, or the limit on calls at once, of the organisation, user, key or model. |
Every code is on Errors and limits.