OpenAI Integration
Integrate OpenAI GPT-4o, o1, o3, and GPT-4.1 models with OpenClaw.
Overview
OpenAI provides the most widely used AI models. OpenClaw supports all OpenAI Chat Completion models.
Available Models
- GPT-4o — Best for general tasks, fast and capable
- GPT-4o-mini — Cost-effective for simpler tasks
- o1 / o3 — Advanced reasoning models
- GPT-4.1 — Latest generation model
Configuration
{
"agents": {
"default": {
"provider": "openai",
"model": "gpt-4o"
}
}
}Environment Variables
export OPENAI_API_KEY="sk-..."Get API Key
- Visit platform.openai.com
- Navigate to API Keys
- Click Create new secret key
- Copy and set the key as
OPENAI_API_KEY
Next Steps
- Integration Overview — All supported providers
- AI Agent — Agent configuration