dl-openclaw.is
English
简体中文繁體中文EnglishРусскийفارسی

HomeGuidesModels and keys

Models and keys

Which model provider to use with OpenClaw: pay-per-token API keys versus subscription sign-in, Chinese models and OpenRouter, setting up local Ollama models, switching models and keeping keys safe.

Two ways to pay

OpenClaw has no model of its own; it connects to a model provider. There are two ways to pay:

WayBillingBest for
API keyCharged by the tokens you useLight use, or tight control over spending
Subscription sign-inUses the allowance of a subscription you havePeople already paying monthly, such as a ChatGPT or Codex subscription
Local modelNo per-use charge, just power and hardwarePeople with a GPU who want data to stay on the machine

Many providers are supported: Anthropic, OpenAI, MiniMax, DeepSeek, Qwen, Kimi, and aggregators like OpenRouter where one key reaches many models. You can set a primary model plus fallbacks that take over automatically when the primary fails.

AdLuoboyunWith an overseas model provider, the Gateway has to reach its API. If you need a Clash / Mihomo line, Luoboyun gives 1 GB on sign-up for 24 hours; Alipay and WeChat accepted.Try 1 GB

Using local models

The easiest local option is Ollama:

  1. Install Ollama from ollama.comAvailable for Windows, Mac and Linux
  2. Pull a modelFor example ollama pull followed by the model name
  3. Run openclaw onboardChoose Ollama as the provider
  4. Choose Local or Cloud + LocalThe latter also offers Ollama's cloud models
Connecting Ollama

Smaller local models are faster but weaker, and complex multi-step tasks trip them up more often. Short on GPU memory, you can send small jobs to a local model and large ones to the cloud.

A taxi meter: API keys are billed by usage, you pay for the distance you travel
A taxi meter: API keys are billed by usage, you pay for the distance you travel Subhashish Panigrahi, CC BY-SA 3.0

Switching models

To change the provider or how you sign in, run openclaw onboard again. To pick another model from a provider you are already signed in to, use:

List and switch models
openclaw models status
openclaw models list
openclaw models set provider/model

Keeping keys safe

  • Enter keys only in onboarding or in the Gateway's config and environment variables, never in a chat asking the assistant to "remember" them.
  • Keep the dashboard off the public internet. Some of the many OpenClaw dashboards exposed online in early 2026 leaked their owners' third-party API keys.
  • Set a spending limit on your API account. Scheduled jobs and heartbeat checks keep using tokens while you are not looking.
  • After replacing a leaked key, run openclaw onboard on the Gateway again and enter the new one.
Does subscription sign-in break terms of service?

OpenClaw's docs say OpenAI explicitly allows subscription sign-in in external tools. Other providers have their own rules; read them before relying on it.

What hardware do local models need?

It depends on model size. The docs suggest smaller, quantised models and watching the context length: "context length exceeded" means the context is too long.

How do I know what a month costs?

The provider's billing page is the most accurate. The OpenClaw dashboard and Windows Hub's Command Center also show usage, per session.

Read nextPhone pairing

Also worth reading

Topics on this page: OpenClaw model setup, OpenClaw API key, OpenClaw Ollama