Files
openclaw-skill/openclaw-knowhow-skill/docs/models/openai.md
Selig 4c966a3ad2 Initial commit: OpenClaw Skill Collection
6 custom skills (assign-task, dispatch-webhook, daily-briefing,
task-capture, qmd-brain, tts-voice) with technical documentation.
Compatible with Claude Code, OpenClaw, Codex CLI, and OpenCode.
2026-03-13 10:58:30 +08:00

37 lines
1.2 KiB
Markdown

# OpenAI
This documentation covers two authentication approaches for OpenAI access within the Codex platform.
## Authentication Options
**API Key Method**: Users can configure direct API access through OpenAI's platform using usage-based billing. Setup requires obtaining credentials from the OpenAI dashboard and running the onboarding wizard with the appropriate flag.
**ChatGPT Subscription Method**: An alternative approach leverages existing ChatGPT or Codex subscriptions rather than direct API credentials. This method requires OAuth authentication through the Codex CLI or cloud interface.
## Configuration Details
Both approaches require specifying a model reference in the format `provider/model`. Model refs always use `provider/model`.
## Setup Process
The onboarding CLI accepts either direct API key input or interactive authentication selection. Users can bypass the interactive wizard by providing credentials as command-line arguments during setup.
```bash
openclaw onboard --auth-choice openai-api-key
```
Or with the API key directly:
```bash
openclaw onboard --openai-api-key "$OPENAI_API_KEY"
```
## Config snippet
```json5
{
env: { OPENAI_API_KEY: "sk-..." },
agents: { defaults: { model: { primary: "openai/gpt-4o" } } },
}
```