OpenClaw Token 永久自由且免费!Ollam (English)
OpenClaw Token 永久自由且免费!Ollam (English)
Generated: 2026-06-22 18:38:10
---
Oh my god, you should have seen my face when I got the first bill for the AI Agent—I almost smashed my laptop!
Here's what happened. I'd been playing around with OpenClaw for a while, and I started by playing it safe—hooked it up to the Claude API to automate my weekly report. Result? One afternoon, 200,000 tokens! When that bill popped up, my blood pressure shot straight to 180! I'm just an ordinary working stiff, blowing hundreds on API fees every month—who can afford that?
Then I discovered something completely counterintuitive: Think an AI Agent has to burn money in the cloud? Wrong! OpenClaw has a hidden superpower—it's built to connect to local models out of the box, and hooking it up with Ollama is literally one command away!
By now, you're probably rubbing your hands together, right?
---
First, Let's Talk About That Wallet-Hurting Token Trap
You see, OpenClaw's logic is a "think-act-observe" infinite loop—when a task gets stuck, it keeps calling the model over and over. That day I hooked it up with Claude to test a file‑organization task, and it burned through 120,000 tokens in five minutes. At the official price, that's about $6. Six bucks! That's a whole bowl of mala tang (spicy hot pot) for me!
And I know so many people are just gritting their teeth and paying the cloud fees. Some even sneak around writing scripts to milk free quotas from various providers, collecting credits with their hearts racing. I kept thinking: there has to be a cleaner solution!
Guess what? There is. And it's hiding inside that dusty computer sitting at home.
---
What's Ollama? One Sentence, Plain and Simple
It's a tool that lets you run big models directly on your own machine! No account registration, no credit card needed, download and it works immediately. It supports almost every popular open‑source model you can think of—Llama, Mistral, Qwen, DeepSeek, GLM... like a buffet menu for AI models.
I chose it for three reasons, and each one made me want to slap the table:
- Ridiculously easy to install—download an
.exefrom the website, or run onecurlcommand in the terminal. Done. I hate messing with environments, so this was perfect. - OpenClaw recognizes it natively—native interface! No need to go through that OpenAI‑compatibility detour. Tool calling and streaming output are rock solid.
- Swap models on a whim—just
ollama run qwen3.5and you're off. Want to switch?ollama run deepseek-r1:8b—done in seconds.
Feels as easy as ordering takeout, doesn't it?
---
My Hands-On Step‑by‑Step (With Bloody Lessons)
I used two computers: PC‑01 running OpenClaw 2026.3.13, and PC‑02 running Ollama 0.17.7. Running them separately lets the low‑power machine focus on model inference while the main machine does the orchestration—no interference. Think of it like a kitchen where the prep cook and the chef work side by side—efficiency doubles!
Step 1: Install Ollama & Pull a Model
PC‑02 has an i5‑12400, 16 GB RAM, and integrated graphics, so I picked Qwen3.5:4B. With 4B parameters it's plenty for daily use, and it runs fine without a dedicated GPU. Just threw the command into the terminal:
ollama run qwen3.5:4b
The first time it automatically downloads the model—took about seven or eight minutes (my internet is pretty fast). After that, ollama ps shows the model running, default service at 127.0.0.1:11434.
Big trap! I fell into this one hard: Ollama binds only to localhost by default. If your OpenClaw is on a different machine, it can't reach it. The fix? On PC‑02, set the environment variable OLLAMA_HOST=0.0.0.0, then restart Ollama. After that, open http://192.168.x.x:11434 from PC‑01's browser—you'll see the Ollama API docs interface. Success!
Step 2: Configuring OpenClaw—Another Facepalm
Newer versions of OpenClaw (post‑2026.3.11) have a hidden "gotcha": if you directly select Ollama as a provider, it automatically downloads a 20 GB glm-4.7-flash model! I didn't notice at first and waited a whole hour thinking it was a bug. How frustrating is that?
The correct move: first run openclaw uninstall to clear the old config, then manually specify the provider.
I added this block to the config, saved it, and restarted:
provider: ollama
model: qwen3.5:4b
ollama_host: http://192.168.1.102:11434
After restarting OpenClaw, the terminal showed loading model qwen3.5:4b—no errors! That moment felt like the first sip of an ice‑cold Coke on a summer day—pure bliss!
Even simpler way (if Ollama and OpenClaw are on the same machine): after installing Ollama and pulling the model, just run two commands:
openclaw config set provider ollama
openclaw config set model qwen3.5:4b
Done. No need to even write a config file.
---
The Head‑Banging Pitfalls I Encountered
1. Mac Overheating
I also tried it on my MacBook Pro M1. When I ran qwen3.5:8b, the fans went full jet engine! But in Activity Monitor, memory pressure stayed green the whole time. Later I swapped to 4B, and it cooled right down. So if you're on a Mac, pick your model based on memory pressure. If it's yellow or higher, switch to a smaller model. MacBook Air (fanless) should stick to 4B or below, or it'll double as a hand warmer.
2. LAN Access Port Issue
A friend asked why other devices on the network couldn't reach Ollama. After two hours of debugging, we found it was just the environment variable not being set. Remember this:
- Windows: Add a system environment variable
OLLAMA_HOST=0.0.0.0 - Mac/Linux:
export OLLAMA_HOST=0.0.0.0 - Then restart the Ollama service.
3. Context Length Too Short
When running complex tasks, OpenClaw would truncate the history, causing it to make repeated errors. Later I added --num-ctx 256000 to the Ollama startup parameters, pushing the context window to 256k—that solved most of the issues.
---
The Real Money‑Saving Truth: Same Task, 100x Price Difference
I ran a test: automatically organizing desktop files.
- With Claude 3.5 Sonnet: 5 minutes, about 120k tokens burned—roughly $6 at the official price.
- With local Qwen3.5:4B: same 5 minutes, zero token cost—just pennies in electricity!
Think about it: $6 vs. pennies! And for daily operations like “categorizing file types – creating folders – moving files – generating an index”, the local model performs pretty much the same as the cloud one.
Now I use the local model for all everyday tasks, and only switch to the cloud for complex code writing or deep reasoning. This hybrid strategy saves me nearly $80 a month! Plus all data stays on my own machine—privacy is rock solid.
---
Those “Free Token” Schemes Are Just Temporary Meal Tickets
I've read all those articles about milking free tokens. Google Gemini gives a monthly free quota; domestic Chinese providers like Zhipu and Tongyi Qianwen offer new user credits
Cael Lee
Full-stack developer with 8+ years of experience. Currently building AI-powered developer tools. I've tested 20+ AI API providers and coding assistants.