OpenClaw works with multiple AI providers. You only need one to get started. Pick whichever provider you prefer, follow the steps below, and you'll have a key in a few minutes.
An API key is a unique code that lets OpenClaw communicate with your AI provider (OpenAI, Google, Anthropic) on your behalf. It's separate from your regular account login. Having a ChatGPT, Gemini, or Claude subscription does not automatically give you an API key. You need to generate one specifically.
Think of it this way: your subscription lets you use the chatbot. An API key lets your Claw use the AI model. They're billed separately and managed in different places.
OpenClaw is an always-on agent. Unlike a chatbot you open and close, it runs continuously, processes messages, executes scheduled tasks, and calls your AI provider throughout the day. That means token costs can add up quickly, especially with more capable models.
For this course, we recommend setting aside $20 to $30 for API usage if you're paying per token. That's a comfortable upper bound assuming you're experimenting and playing around as you learn.
Note: Anthropic Claude subscriptions (Pro and Max) do not cover OpenClaw usage. You will need a Claude API key to use Claude with OpenClaw. See the Anthropic (Claude) section below for details.
Many people in the OpenClaw community run local models on Mac minis or other dedicated hardware to avoid API costs entirely. That's a valid path, but it comes with a larger learning curve. If you've never set up OpenClaw before, we recommend starting with an API key or subscription so you can focus on learning how OpenClaw works. You can always add local models and dedicated hardware later once you're comfortable.
OpenAI is the only provider here that also supports a subscription-backed OAuth path instead of pay-per-token billing. If you already have a ChatGPT Plus or Pro plan, that can reduce direct model costs, but this course still uses the API key flow for Day 1 because it is easier to set up reliably on Hostinger.
- Go to platform.openai.com
- Click "Sign up" and register with email, Google, Microsoft, or Apple
- Verify your email address
- Verify your phone number via SMS (required)
- In the left sidebar, click "API keys"
- Click "Create new secret key" and give it a name
- Copy the key immediately. It's only shown once
- Go to Settings > Billing to add a payment method and load at least $20 in credits
Google has the most generous free tier for getting started. No credit card, no phone verification, and you get ongoing free access to capable models. The trade-off: it's pay-per-token only, with no subscription option for OpenClaw.
- Go to aistudio.google.com
- Sign in with your Google account
- Accept the Terms of Service for Generative AI
- Click "Get API Key" in the left sidebar
- Select your project (or let Google create a default one for you)
- Click "Create Key"
- Copy the key and store it somewhere safe
Note: Claude subscriptions (Pro and Max) do not cover usage on third-party tools like OpenClaw. To use Claude with OpenClaw, you need an API key with pay-per-token billing (steps below). Your subscription still works normally on Anthropic's own products (Claude.ai, Claude Code, Claude Desktop, and Claude Cowork).
For more details, see the OpenClaw Anthropic provider docs.
- Go to console.anthropic.com
- Click "Sign Up" and register with Google, Microsoft, Apple, or email
- Verify your email if you signed up with email
- In the left sidebar, go to Settings > API Keys
- Click "Create Key" and give it a name
- Copy the key immediately. It starts with
sk-ant-and is only shown once - Go to Settings > Billing to add a payment method and load credits