Set up OpenClaw with THALAM, from zero
A complete walkthrough for first-time users — no prior terminal experience needed. By the end you'll have OpenClaw installed, connected to every leading AI model through THALAM, and chatting back to you in your browser. Allow ~10 minutes.
Before you start — what you need
- • A computer running Windows 10/11 or macOS 12+.
- • Roughly 10 minutes. Each command takes seconds; most of the time is waiting for installs.
- • A working internet connection.
- • That's it. No prior terminal, Node.js, or coding knowledge required — the OpenClaw installer handles all of that for you.
Install OpenClaw
OpenClaw ships with one-line installers for both Windows and macOS. The script detects your OS, installs Node.js if needed, installs OpenClaw, and walks you into the onboarding wizard.
Windows
Open PowerShell (press Win + X, pick "Terminal" or "Windows PowerShell"), then paste:
iwr -useb https://openclaw.ai/install.ps1 | iexmacOS
Open Terminal (Cmd+Space → type "Terminal"), then paste:
curl -fsSL https://openclaw.ai/install.sh | bashYou should see: a stream of "Downloading…", "Installing…" lines, then "OpenClaw installed". The installer takes 1–2 minutes. If it asks to install Node.js, accept.
Run the onboarding wizard
This sets up OpenClaw's local gateway with default safety settings (a private auth token, port 18789, blocked-by-default risky commands like camera/SMS).
openclaw onboardYou should see: a series of prompts asking about install mode, channels (Telegram is offered — you can accept or skip; we'll cover Telegram in the optional section at the bottom). At the end it tells you the config lives at ~/.openclaw/openclaw.json.
Get your THALAM API key
THALAM gives OpenClaw access to every leading model — Claude, GPT, Gemini, DeepSeek, Qwen, and more — through one key.
- Go to thalam.ai and sign up (under a minute, no credit card).
- Open your dashboard → API Keys → Create new key.
- Copy it. It starts with
tl-live-.
Treat this key like a password. Don't paste it in chats, screenshots, or commit it to git. If you ever leak it, revoke it from the dashboard and generate a new one.
Download the starter config and open it
We've prepared a config snippet that pre-fills everything OpenClaw needs to talk to THALAM. You'll merge it into your existing openclaw.json in step 5.
Now open your existing OpenClaw config in your text editor of choice (Notepad, TextEdit, VS Code — any will do):
Windows
C:\Users\<you>\.openclaw\openclaw.jsonOr in PowerShell: notepad "$env:USERPROFILE\.openclaw\openclaw.json"
macOS
~/.openclaw/openclaw.jsonOr in Terminal: open -e ~/.openclaw/openclaw.json
Merge the starter config in
Open the downloaded openclaw-thalam-starter.json in your text editor. Inside it you'll see three top-level keys: agents, models, and a _README (which you can ignore — it's just instructions).
- Replace the placeholder key. Find
"REPLACE_WITH_YOUR_THALAM_KEY"and replace it with your realtl-live-...key from step 3. Keep the quotation marks. - Copy the
modelsblock from the starter file (everything from"models": {down to its matching}) and paste it into your existingopenclaw.jsonat the top level — alongside"agents"and"gateway". - Update the
agents.defaultsblock. In your existingopenclaw.json, findagents.defaults.model.primaryand change it to"thalam/anthropic/claude-sonnet-4.6". Add the two THALAM model ids toagents.defaults.modelsalongside whatever else is there. - Save the file.
Don't replace the entire file with the starter — your existing config has a unique gateway.auth.token generated by onboard. Replacing the whole file would wipe it.
Validate the file
Before starting OpenClaw, run the built-in JSON checker. This catches typos, missing commas, and anything OpenClaw's schema doesn't accept.
openclaw config validateYou should see: a "Config is valid" message. If you see errors, the most common cause is a missing or extra comma in the JSON — open the file and check the area around the line number reported.
Start the OpenClaw gateway
The gateway is the small local service that handles every conversation. If you're already running it from onboard, restart it instead so the new config takes effect.
openclaw gateway restartVerify it's up:
openclaw gateway statusYou should see: "Running" with a port number (typically 18789).
Send your first message
OpenClaw includes a built-in chat interface that runs in your browser. Open it at:
You'll be asked for an authentication token the first time. It's stored in your config at gateway.auth.token — open openclaw.json and copy the value.
Once you're in: pick Claude Sonnet 4.6 (THALAM) from the model picker, type a message, and hit send.
You should see: a streamed reply within a couple of seconds. To confirm it's actually routing through THALAM, ask:
The reply should mention Claude Sonnet 4.6 and api.thalam.ai. If it does — you're done. Everything works.
Add Telegram (chat from your phone)
Already working in the browser. If you also want to message OpenClaw from Telegram on your phone or laptop, here's the setup. Skip this section if you only need the local Control UI.
Network requirement: Telegram integration requires your machine to reach api.telegram.org. If your network can't reach that host, the Telegram bot won't connect — but everything you set up above keeps working in the browser.
- Create a Telegram bot. In Telegram, open a chat with @BotFather, send
/newbot, follow the prompts to name it, and copy the token it gives you (looks like8562826425:AAEU9...). - Paste the token in your config. In
openclaw.json, find or add achannels.telegram.botTokenfield and paste it. Setchannels.telegram.enabledtotrue. (If you ranopenclaw onboardwith Telegram chosen, both fields will already exist.) - Restart:
openclaw gateway restart. - Find your bot in Telegram by the username you chose, tap Start, then send a message. You should get a reply.
If something goes wrong
Five most common issues. Run openclaw logs --follow in a separate terminal whenever you're debugging — the live logs make every problem 10× easier to diagnose.
openclaw logs --follow"Unrecognized key: name" on validate
You probably copied an older example that put a "name" field at the provider level. The current OpenClaw schema rejects it — model display names live inside the "models" array, not on the provider. Match the starter snippet exactly.
"Model not found" or model missing from picker
The model id needs to appear in BOTH "models.providers.thalam.models" (full definition) AND "agents.defaults.models" (allowlist). OpenClaw silently refuses to route to undeclared models.
"[assistant turn failed]" with no detail
The Control UI hides upstream errors. Open openclaw logs --follow and retry — the real error appears in the log. Most often it's an auth issue (key wrong) or your config didn't reload (run openclaw gateway restart after every change).
Browser shows "Page can't be reached" at 127.0.0.1:18789
Gateway isn't running. Run openclaw gateway status — if it says "Stopped", run openclaw gateway start. If "Not installed", re-run openclaw onboard.
401 unauthorized when chatting
Your THALAM API key is wrong, expired, or has stray whitespace from a paste. Open openclaw.json, re-copy the key from your THALAM dashboard, save, and run openclaw gateway restart.
You're done. What now?
- • Add more models from the THALAM catalog by appending to both lists in your config (provider models + allowlist).
- • Use OpenClaw with other workflows — there are guides for Cline, Continue, Cursor, and Aider too.
- • Learn about model selection — Chat Completions docs covers when to use which model.