OpenClaw Ollama or Hosted API Keys for a Company Agent
How OpenClaw uses Ollama, what local models cost once hardware and upkeep count, a worked 12-person example and when a hosted instance with your own provider key is the better buy.
OpenClaw can use Ollama as a model provider, which means the agent thinks on a machine you control instead of sending every prompt to a hosted API. For a company, that sounds like the safe default. In practice it moves a different problem onto your desk: somebody now owns a GPU box, its uptime, its model files and the quality of an agent running on a smaller model. This article is for the person deciding between a local Ollama setup and a hosted OpenClaw instance that calls a provider with your own key.
How does OpenClaw work with Ollama?
OpenClaw talks to Ollama through its native /api/chat endpoint, configured under models.providers.ollama with a baseUrl such as http://host:11434. The OpenClaw Ollama documentation says not to use the /v1 path, because that breaks tool calling, and that the legacy OpenAI-compatible mode is not reliable for tools. The agent picks a model with a command such as openclaw models set ollama/gemma4.
The documentation also lists the limits that matter for real work. Auto-discovery only considers models that support tools and have at least 16K of context. Local discovery normally caps the context at 32,768 tokens. Small local models can fail on tool schemas, and the suggested fix is to switch tool support off for that model, which turns it into a chat model that cannot act. Large models need a long first load, so the docs suggest a 300 second timeout and keeping the model loaded for 15 minutes.
Is a local Ollama model cheaper than an API?
Only if the hardware is already paid for and busy. OpenClaw lists every Ollama model at zero cost, which is a billing field, not a statement about what running it costs you. A machine that can serve a useful tool-calling model to an always-on agent is a GPU server or a large Apple silicon box that stays powered, patched and monitored.
| Cost line | Local Ollama | Hosted OpenClaw with a provider key |
|---|---|---|
| Model tokens | No per-token bill | Billed by your provider, you see the usage |
| Hardware | Your GPU or Mac, always on | Included in the instance price |
| Who keeps it running | Your team, including model updates | The hosting provider |
| Tool-calling quality | Depends on the local model you can fit | Whatever frontier model your key allows |
| Context window | Commonly capped near 32K in local discovery | Set by the model you choose |
| Failure mode | Host sleeps, model unloads, agent goes quiet | Provider outage or spend limit reached |
A worked example: one support agent for a small team
Take a 12-person firm that wants one OpenClaw agent answering internal questions in Slack and drafting replies from shared documents. Say the agent handles 80 conversations a day and each averages 6,000 tokens of context in plus 800 out. That is 480,000 input and 64,000 output tokens a day, about 14.4 million input and 1.9 million output tokens a month. At API prices that stay in the low tens of dollars for a mid-priced model, the model bill is rarely the number that decides this.
Now price the local route for the same agent. A used GPU workstation or a 64 GB Mac that can serve a 27B-class model sits near the price of several years of a Team plan, before power, before someone spends a weekend on the first setup and before the model update that changes tool behavior. The agent also runs on a smaller model, so ask your team honestly whether it will handle multi-step tool use. The OpenClaw docs themselves say small models may fail on tool schemas.
The local route earns its keep in two cases. One is volume: an agent that consumes hundreds of millions of tokens a month, where per-token pricing really does add up. The other is data that must not leave your network at all. Everywhere else the simpler answer is a managed instance and a provider key with a spend limit set with the provider.
When does data handling decide it?
If prompts contain regulated records, your model provider's terms and data handling become a procurement question, and a local model can be the compliant answer. A software vendor handling criminal justice information, for example, would look at a framework such as cjis.io before deciding where any model call is allowed to go. In that situation, self-host on your own hardware, keep the Ollama host on a private network, and accept that you own the operations.
If your concern is only that an agent should not share a machine or a secret store with other things, you do not need local models. You need isolation. A hosted instance in its own container with its own secrets, as described on the OpenClaw sandbox hosting page, addresses that without a GPU.
What does the hosted option cost?
ClawEngine hosted instances call model providers with your own key, so tokens are billed by your provider, not by us. Team is $24 a month billed yearly ($49 monthly) for one instance with up to 3 agents. Business is $99.50 a month billed yearly ($199 monthly) with 15 agents across 3 instances and action approvals. Hosted instances are not a way to run Ollama models, since an instance has a hard limit of 1 vCPU and 2 GB RAM, which is far too small to serve a language model. If local inference is a requirement, this is not the right product, and that is better to know before you buy.
For the rest of the cost picture, read how to control OpenClaw model costs with budgets and BYOK, compare plans on the pricing page or see the hosted OpenClaw page.
Frequently asked questions
Can OpenClaw use Ollama?
Yes. OpenClaw has a native Ollama provider that talks to /api/chat on your Ollama host. Use the host root URL, not a /v1 path, and pick a model that supports tools with at least 16K of context, or the agent loses its ability to act.
Which Ollama model works best with OpenClaw?
The one that supports tool calling and fits your hardware with a large enough context. The docs name gemma4 and qwen3.5:27b in examples. Test your real workflow, not a chat prompt, because small models often fail on tool schemas.
Can I run Ollama on a hosted OpenClaw instance?
Not on ClawEngine. Instances have a hard 1 vCPU and 2 GB RAM limit and call a model provider with your key. Run Ollama on your own machine if you need local inference and self-host the agent next to it.
Is a local model private?
The prompts stay on your network, which helps with regulated data. It does not make the agent safe by itself. Tool permissions, secrets and what the agent may touch still need to be scoped.
Why does my OpenClaw Ollama agent stop calling tools?
Usually one of three causes: the base URL ends in /v1, the model lacks tool support or enough context, or tool support was switched off for a small model. Fix the URL first, then test a larger model.
Build the agent you just read about
Describe the job on our home page and get its workspace files, its first reply and the instance we would host for it.
Build your agent