openclaw/docs/providers/openai.md
Sarah Fortune 7dc4a94490
docs: give Agents API its own onboarding guide (#162255)
Summary:
- Moves Agents API onboarding into a dedicated plugin guide and updates navigation, provider references, the plugin README, and release links.

Automerge notes:
- PR branch already contained follow-up commit before automerge: docs: address Agents API onboarding review

Validation:
- ClawSweeper review passed for head af284a9707b38cc6b72094559a4b14ffdac83019.
- Required merge gates passed before the squash merge.

Prepared head SHA: af284a9707b38cc6b72094559a4b14ffdac83019
Review: https://github.com/openclaw/openclaw/pull/162255#issuecomment-5922939944

Co-authored-by: Sarah Fortune <sjf@openai.com>
Approved-by: sjf-oa
2026-10-01 02:54:25 +00:00

12 KiB

summary read_when title
Use OpenAI via API keys or Codex subscription in OpenClaw
You want to use OpenAI models in OpenClaw
You want Codex subscription auth instead of API keys
You want Astra async tools, mid-turn steering, or cached reasoning changes
You need stricter GPT-5 agent execution behavior
OpenAI

OpenClaw uses one provider id, openai, for both direct API-key auth and ChatGPT/Codex subscription auth. openai/* is the canonical 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 explicit agentRuntime config 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_KEY or an openai API-key auth profile.
  • Legacy config - codex/* and openai-codex/* refs are repaired to openai/* plus model-scoped agentRuntime.id: "codex" by openclaw 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.

OpenAI setup

OpenAI models

OpenAI runtimes and Codex auth

OpenAI coverage and cost

OpenAI image generation

OpenAI voice and speech

Azure OpenAI endpoints

OpenAI advanced configuration

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.