NEW 📢 Limited launch offer: up to 70% off your first month on every game!See plans

Which AI provider key to use with OpenClaw

OpenClawUpdated Nov 6, 20266 min read

Short answer. OpenClaw needs an account with at least one AI model provider; it does not include a model. On PlayNHost you can paste an API key from OpenAI, Anthropic, Google Gemini, xAI or OpenRouter, and one key is enough. Pick the provider whose models you already pay for. If you want to try several models with one bill, OpenRouter gives you many providers behind a single key. Your provider bills your model use directly; the server plan does not include it.

Checked on 6 November 2026, accurate for OpenClaw 2026.11.1.

This guide uses OpenClaw's provider documentation and the PlayNHost panel as it works today.

The five keys the panel takes

ProviderField on the Agent pageWhere the key comes fromModel PlayNHost starts with if this is your only key
OpenAIOpenAI API keyYour OpenAI Platform account. OpenClaw's FAQ: set OPENAI_API_KEY for direct OpenAI Platform billingOpenClaw's own default
AnthropicAnthropic API keyThe Anthropic Consoleanthropic/claude-sonnet-5-5
Google GeminiGoogle Gemini API keyGoogle AI Studio (aistudio.google.com/apikey)google/gemini-4-argon
xAIxAI API keyYour xAI accountxai/grok-4.7
OpenRouterOpenRouter API keyopenrouter.ai/keysopenrouter/auto (OpenRouter picks the model)

Each key reaches OpenClaw under the environment name its docs use: OPENAI_API_KEY, ANTHROPIC_API_KEY, GEMINI_API_KEY, XAI_API_KEY, OPENROUTER_API_KEY.

Which one to choose

  • You already pay one provider: use that key. Nothing else changes in OpenClaw.
  • You want to compare models: OpenRouter puts many providers behind one key and one bill. OpenClaw's FAQ notes that OpenRouter has US-hosted options for MiniMax, Kimi and GLM if you need that traffic kept in the US.
  • You use Anthropic and want its top model: OpenClaw's own Anthropic setup defaults to Opus 5.5. On PlayNHost, with only an Anthropic key, the start picks anthropic/claude-sonnet-5-5 instead; set AI model to anthropic/claude-opus-5-5 if you want Opus.
  • Not on PlayNHost: other providers such as DeepSeek and Mistral (not bundled with OpenClaw 2026.11.1 in our test install), local models such as Ollama or LM Studio (they need a model server the plan does not include), and subscription sign-ins such as a ChatGPT login or a Claude Code login, which need a sign-in on the server itself. The panel takes API keys.

OpenClaw's FAQ also advises against small local models for an agent: it needs a large context and strong safety, and small or quantized models raise the risk of prompt injection.

Add the key on PlayNHost

  1. Open your server at panel.playnhost.com, then the Agent tab.
  2. Under AI provider ("One key is enough. Each provider bills your own account for what your agent uses."), press Set on your provider's row, paste the key and press Save. The row then shows only the last four characters. The key is stored encrypted and never shown again; Replace and Remove change it later.
  3. Start or restart the agent: "Changes apply the next time your agent starts." When the start picks a model for you, the console says which:
    [PlayNHost] AI model: anthropic/claude-sonnet-5-5 (change it on the Agent page, Code, Settings).

Choose the model yourself

On the Agent page, open Code. Under Settings, AI model takes provider/model, for example anthropic/claude-sonnet-5-5 or openrouter/auto. Save, then restart. Left empty, the start picks a model as described under Several keys below, and a model you set inside OpenClaw itself is never replaced. The field only accepts the provider/model form.

The model you name must belong to a provider whose key you set: an anthropic/... model needs the Anthropic key.

Several keys at once

You can set more than one. When nobody chose a model, the start only picks one if there is no OpenAI key; with an OpenAI key present, OpenClaw's own default applies. Otherwise the order is Anthropic, then Google Gemini, then xAI, then OpenRouter. Set AI model to decide for yourself.

Keep the bill under control

  • Your provider bills you, not us. PlayNHost does not resell model use or add it to your bill; the plan pays for the server.
  • Set a spending limit or budget alert at your provider before you connect an agent that runs scheduled jobs: an agent can make model calls while you are not watching. An OpenRouter key can carry its own credit limit. Check-ins, when your agent wakes up and runs a turn on its own, are off by default: to switch them on, set Check-in interval (for example 1h) under Code, Settings, and every check-in uses your own AI key.
  • Only you can message it. The Agent page's user ID lists keep strangers from spending your credits (see Telegram and Discord).
  • Rate limits: an HTTP 429 from Anthropic means your quota for the current window is used up; OpenClaw's FAQ suggests checking usage and limits in the Anthropic Console, or setting a fallback model.

On your own machine

Set the same environment variable before starting the Gateway, or let onboarding store it, for example:

openclaw onboard --auth-choice gemini-api-key
openclaw onboard --auth-choice openrouter-api-key
openclaw models set anthropic/claude-sonnet-5-5

Onboarding also offers OAuth sign-ins (ChatGPT/Codex, xAI, OpenRouter) that do not need an API key. See how to host OpenClaw 24/7, or create an OpenClaw server and paste your key in the panel.

PlayNHost is not affiliated with the OpenClaw Foundation. OpenClaw is open-source software under the MIT licence.

Already hosting it somewhere else? Move your server to us

OUR LATEST BLOGS