In This Article
ChatGPT vs the OpenAI API
There is an important distinction to make here: ChatGPT is OpenAI's consumer chat interface (chat.openai.com). The OpenAI API is the developer product that OpenClaw uses. They both access GPT models, but they are separate products with separate credentials and billing.
OpenClaw integrates with OpenAI through the API — not through ChatGPT. Your ChatGPT subscription (Free, Plus, or Team) does not give you API access. You need a separate OpenAI API account.
OpenAI Is OpenClaw's Default Provider
OpenAI is OpenClaw's default LLM provider — the one used in most tutorials, documentation examples, and community guides. When you follow a standard OpenClaw setup guide, you are almost certainly configuring OpenAI. This means:
- OpenAI integration is the most tested and best-documented configuration
- The community has the most experience troubleshooting OpenAI-specific behaviours
- Examples and Skills in the community library are typically written assuming OpenAI
If you are setting up OpenClaw for the first time, starting with OpenAI is the path of least resistance.
Connecting OpenClaw to OpenAI
Get your API key from platform.openai.com → API Keys → Create new secret key. Then configure your OpenClaw config.yaml:
llm:
default_provider: openai
providers:
openai:
api_key: "${OPENAI_API_KEY}"
model: "gpt-4o"
Using an environment variable (recommended):
export OPENAI_API_KEY="sk-your-key-here"
Or in a .env file in your OpenClaw directory:
OPENAI_API_KEY=sk-your-key-here
Restart OpenClaw and send a test message. You should see a response within a few seconds confirming the connection is active.
Which OpenAI Model to Use
OpenAI's model lineup for 2026 — mapped to OpenClaw use cases:
- GPT-4o Mini — fast, cheap (~$0.15/$0.60 per million tokens), excellent for high-volume deployments and simple to moderate task complexity. Strong default choice for most business automations where cost matters.
- GPT-4o — the full-capability model (~$2.50/$10.00 per million tokens). Use for complex reasoning, nuanced decision-making, or tasks where quality is more important than cost. The right choice for agents handling sensitive customer interactions or complex workflows.
- o3-mini / o1-mini — OpenAI's reasoning-optimised models. Best for agents that need to work through genuinely complex logic problems. Higher latency than standard GPT-4o, but better at multi-step reasoning chains.
For most production OpenClaw deployments: start with GPT-4o Mini and upgrade to GPT-4o for tasks where you observe quality gaps. Running both in a routing configuration is a cost-effective approach.
Understanding OpenAI Costs in OpenClaw
OpenAI charges per token — roughly per word processed. Every OpenClaw agent interaction involves:
- The system prompt (sent with every message)
- The conversation history (grows over time)
- Tool call schemas (sent with every message if tools are enabled)
- The user message and agent response
A typical OpenClaw interaction with GPT-4o Mini costs $0.001–$0.005. With GPT-4o, closer to $0.02–$0.10. For a business handling 500 customer interactions per day, that is $0.50–$2.50/day with Mini, or $10–$50/day with full GPT-4o.
Set a usage limit in your OpenAI account settings to prevent unexpected bills if your agent encounters unusual traffic.
Can I Use My ChatGPT Plus Subscription?
No. ChatGPT Plus ($20/month) gives you unlimited access to GPT-4o through chat.openai.com, but it does not include API access. API usage is billed separately, regardless of your ChatGPT subscription status.
OpenAI does offer a "ChatGPT Plus + API" combination, but API credits still need to be purchased separately from your subscription. The API has its own pay-as-you-go billing that is entirely independent.
Conclusion
OpenClaw and OpenAI are designed to work together — it is the default configuration for good reason. Setup takes under five minutes, the community documentation is extensive, and GPT-4o Mini makes the economics favourable for almost any business use case. For help building a production OpenClaw deployment on OpenAI — including cost optimisation and multi-model routing — OpenClaw Consult handles end-to-end configuration.