OpenClaw ChatGPT Support
EDIT 2026-03-05: This note is outdated — GPT-5.3 is now available via API. Read the updated note.
Date: 2026-02-22 Version: OpenClaw 2026.2.21-2 (35a57bc)
You can configure OpenClaw to use ChatGPT in two ways:
- Via OAuth — uses your ChatGPT account directly (e.g. the Pro tier at ~$20/month). Officially supported. If you use high-end models like GPT-5.3 Codex you may hit rate limits after a while.
- Upside: fixed monthly cost, likely cheaper for heavy use.
- Downside: OpenAI retains your prompts and may use them to train future models — including any API keys, credentials, or private data that ends up in context.
- Via API — pay per call, can get expensive fast.
- Upside: prompts are not used for training.
- Downside: As of today, GPT-5.3 Codex and GPT-5.3 Codex Spark are not available via API — only GPT-5.2 and below.
Worth noting: even if GPT-5.3 Codex were made available via the API, OpenClaw has internal checks that detect it and force routing back through OAuth — so you'd need the OAuth flow regardless.
Test it yourself
GPT-5.2 Codex — works:
curl https://api.openai.com/v1/responses \
-H "Content-Type: application/json" \
-H "Authorization: Bearer X" \
-d '{
"model": "gpt-5.2-codex",
"input": "Write a function in Python that reverses a string.",
"reasoning": { "effort": "medium" }
}'
GPT-5.3 Codex — no API access:
curl https://api.openai.com/v1/responses \
-H "Content-Type: application/json" \
-H "Authorization: Bearer X" \
-d '{
"model": "gpt-5.3-codex",
"input": "Write a function in Python that reverses a string.",
"reasoning": { "effort": "medium" }
}'
GPT-5.3 Codex Spark — model does not exist:
curl https://api.openai.com/v1/responses \
-H "Content-Type: application/json" \
-H "Authorization: Bearer X" \
-d '{
"model": "gpt-5.3-codex-spark",
"input": "Write a function in Python that reverses a string.",
"reasoning": { "effort": "medium" }
}'
Config (API key auth)
For API key based auth, add to models.providers in openclaw.json:
"openai": {
"baseUrl": "https://api.openai.com/v1",
"apiKey": "X",
"api": "openai-responses",
"models": [
{
"id": "gpt-5.2-codex",
"name": "GPT-5.2 Codex",
"api": "openai-responses",
"reasoning": false,
"input": ["text"],
"cost": { "input": 1.75, "output": 14.0, "cacheRead": 0, "cacheWrite": 0 },
"contextWindow": 400000,
"maxTokens": 16384
}
]
}