On this page
On this page
Providers
OpenAI
OpenClaw uses one provider id, openai, for both direct API-key auth and
ChatGPT/Codex subscription auth. openai/* is the standard model route.
For embedded agent turns with runtime policy unset or auto, OpenAI's route
facts decide whether OpenClaw may select the bundled Codex app-server runtime
implicitly. The openai/* prefix alone does not select a runtime.
- Agent models -
openai/*through the runtime selected by explicitagentRuntimeconfig or OpenAI's implicit route policy. Sign in with Codex auth for ChatGPT/Codex subscription use, or configure an API-key auth profile when you want key-based billing. - Non-agent OpenAI APIs - direct OpenAI Platform access, billed per use,
through
OPENAI_API_KEYor anopenaiAPI-key auth profile. - Legacy config -
codex/*andopenai-codex/*refs are repaired toopenai/*plus model-scopedagentRuntime.id: "codex"byopenclaw doctor --fix.
OpenAI explicitly supports subscription OAuth usage in external tools and workflows like OpenClaw.
This page is an index. OpenAI is documented on nine pages, one per reader job. Open the page that matches your task.
| Page | Read it when |
|---|---|
| OpenAI setup | You are connecting an account: the API-key and Codex subscription paths, route summaries, OAuth recovery, and the long-context opt-in. |
| OpenAI authentication | Choose Codex login, an API key, or SIWC based on model access, plugins, usage tracking, and permissions. |
| OpenAI models | You are choosing a model ref: the quick-choice table, GPT-6 Astra, Sol, Luna, and the GPT-5.6 tiers. |
| OpenAI runtimes and Codex auth | You need to know which runtime runs an openai/* turn, and how native Codex resolves its account. |
| OpenAI coverage and cost | You want the capability matrix, memory embeddings, or how subscription quota and Platform billing are reported. |
| OpenAI image generation | You are generating or editing images through the bundled openai plugin. |
| OpenAI voice and speech | You are configuring text-to-speech, transcription, or realtime voice, including per-route auth order. |
| Azure OpenAI endpoints | You are pointing the bundled openai provider at an Azure OpenAI resource. |
| OpenAI advanced configuration | You are tuning prompt contribution, transport, Fast mode, compaction, strict-agentic mode, or proxy compat. |
Where each section moved
Every anchor the single-page version published still resolves here, so an
existing link such as /providers/openai#implicit-agent-runtime keeps
working. Each entry points at the page that now holds the content.
- Getting started
- Route summary
- Config example
- Route summary
- Config example
- Check and recover Codex OAuth routing
- Status indicator
- Doctor warning
- Context window defaults and long-context opt-in
- Embedded OpenClaw translation
- Native Codex translation
- Catalog recovery
- API key (OpenAI Platform)
- Get your API key
- Run onboarding
- Verify the model is available
- Codex subscription
- Run Codex OAuth
- Use the standard OpenAI model route
- Verify Codex auth is available
- Quick choice
- Retired subscription model references
- GPT-6 Astra
- Async tools, steering, and reasoning changes
- GPT-5.6 limited preview
OpenAI runtimes and Codex auth
- Voice and speech
- Gateway-controlled Realtime call cleanup
- GA Realtime browser authentication
- Released GPT-Live browser and Gateway relay authentication
- Unlisted and private realtime transport paths
- Speech synthesis (TTS)
- Speech-to-text
- Realtime transcription
- Realtime voice
- Azure OpenAI endpoints
- Configuration
- API version
- Model names are deployment names
- Regional availability
- Parameter differences
- GPT-5 prompt contribution
- Advanced configuration
- Config
- CLI
- Transport (WebSocket vs SSE)
- Fast mode
- OpenAI API Fast mode with service_tier
- Server-side compaction (Responses API)
- Enable explicitly
- Custom threshold
- Disable
- Strict-agentic GPT mode
- Native vs OpenAI-compatible routes
Related
For hosted execution, file handling, and connected tools in chat, see the Agents API guide.
Choosing providers, model refs, and failover behavior.
Shared image tool parameters and provider selection.
Shared video tool parameters and provider selection.
Auth details and credential reuse rules.
Decision models
The bundled openai plugin supports the beta
OpenAI Decisions API
through OpenClaw's Decision model role.
Configure OPENAI_API_KEY or an openai API-key auth profile, then select
openai/gpt-6-luna in the Decision picker or set:
The account and selected model must have Decisions API access. OpenClaw requires
a Platform API key for Decisions. It excludes ChatGPT/Codex subscription profiles
and Sign in with ChatGPT token-sharing grants before credential resolution.
The provider selects the Decisions route before credential resolution. A model-level
baseUrl takes precedence over the provider URL, then OPENAI_BASE_URL, then
the Platform default. A custom Platform-compatible endpoint must implement
the native POST /decisions question and image contract; route metadata does not
validate a custom endpoint's implementation. Declare the supported model under
models.providers.openai.models when using a custom provider URL; implicit
native model discovery does not advertise models for arbitrary endpoints.
ChatGPT backend URLs are rejected. Prepared provider, model and request headers
retain their normal precedence. An explicit @profile
selection remains locked; an incompatible subscription profile does not fall
through to a different account.
Boolean questions map to predicates; choices retain their string labels; score
levels use zero-based rubric positions. A V2 batch supports up to 400 questions,
with up to 255 alternatives per choice question. Larger requests return
unsupported-input before credential resolution or an API call. Split independent
questions into separate batches, or reduce the alternatives. Legacy V1 callers
retain the host's 256-question limit; use contractVersion: 2 for larger batches.
The prepared V2 adapter accepts tagged text, JSON, or one inline PNG, JPEG, or
WebP image up to 4 MiB, with optional text. It does not fetch remote image URLs.
Explicit JSON scalars and strings remain JSON-encoded; text remains literal.
Omitted reasoning and reasoning: "auto" preserve the endpoint default; explicit
on and off controls are unsupported.
Boolean, Choice, and Score questions work with image evidence. OpenClaw's
image envelope is an integration limit, not a claim about the vendor's maximum.
A per-question refusal becomes an error answer with providerCode: "refusal";
successful siblings remain available. Malformed or incomplete answers return
invalid-response. Probabilities, fractional scores, confidence, and input/output
token usage are preserved. Decision cost stays unknown unless reported; chat
token prices do not price this endpoint. V1 text/JSON callers still use the
lossless bridge, so a refusal batch cannot be narrowed to V1.
Selecting a Decision model does not replace the primary chat model or enable automatic Decision assistance. Explicit evaluations send the supplied evidence to OpenAI and use Platform billing.
Harness and authentication
Both the OpenClaw and Codex harnesses expose the shared decision_evaluate tool
when a Decision model is configured, subject to normal tool policy.
The OpenAI plugin sends its requests to
POST /v1/decisions. Codex's native model loop still uses Responses.
| Primary-model harness | Primary-model auth | Decision auth and behavior |
|---|---|---|
| OpenClaw | Platform API key | The shared tool resolves a compatible OpenAI API key. |
| OpenClaw | ChatGPT OAuth | The shared tool requires a separate OpenAI API-key profile or OPENAI_API_KEY. |
| Codex | Platform API key | The shared tool resolves an OpenClaw OpenAI API key independently of Codex's native credentials. |
| Codex | ChatGPT OAuth | Native Codex login remains available for chat. The shared tool requires an OpenClaw OpenAI API-key profile or OPENAI_API_KEY. |
With automatic OAuth-only discovery, an evaluation returns credentials-unavailable
without an API request. An explicitly incompatible provider credential binding
remains terminal; OpenClaw does not substitute another account. Configure the
Decision API key through OpenClaw's existing OpenAI auth setup, without changing
the primary model or Codex login.