#I keep getting errors that i dont know how to fix, and my chat isnt working
1 messages · Page 1 of 1 (latest)
Yep, this has drifted from “useful setup work” into “we accidentally made the config invalid while trying to patch around a model bug.”
What happened:
- Your install is running:
OpenClaw 2026.5.19, gateway restart worked. - The real chat failure was this OpenRouter response:
requested about 262006 tokens (6 input, 262000 output) - That means the selected OpenRouter model metadata is causing OpenClaw/the provider to request basically the whole context window as output. That’s not normal.
- The latest errors are from the manual provider-catalog edits:
models.providers.openrouter.models.0.id/name: Invalid input. So first clean up those partial edits.
Run this first:
openclaw config unset 'models.providers.openrouter.models'
openclaw config validate
If validation is valid, stop editing models.providers.openrouter.models. Then pick a different configured/default model via onboarding or the models CLI instead of forcing qwen/qwen3-coder::free:
openclaw onboard
openclaw models status
If you want current model recommendations, ask in #models because that changes constantly. Docs for the model flow are here: https://docs.openclaw.ai/concepts/models and the first-pass debugging commands are here: https://docs.openclaw.ai/help/faq
If config validate still fails after the unset, run:
openclaw status --all
That report is designed to be safer to share here than raw config files.
i got this
That’s actually good news: Config valid: ~/.openclaw/openclaw.json means the cleanup step is done. The “path not found” line just means there was no models.providers.openrouter.models entry to remove, so nothing was changed.
Next step is to stop using that bad OpenRouter Qwen free model and pick a working default model:
openclaw models status
openclaw onboard
In onboarding, choose a provider/model you actually have auth for. After that:
openclaw gateway restart
Then try chat again. If it still fails, send the output of:
openclaw status --all
Don’t paste raw config or API keys; status --all is the safer report.
i have auth for the model, it used the work i dont know what happened
Yeah, that makes sense. This does not look like an auth problem.
Auth can be valid and the model can still fail if OpenClaw/provider metadata says the model can output 262000 tokens. That’s what the earlier error showed: OpenRouter rejected the request because it asked for basically the full context window as output. So it may have worked before, then broke after a model catalog/provider metadata change, an OpenClaw update, or a config change.
To check where it’s coming from, run these and send the output:
openclaw models status
openclaw config get agents.defaults.model
openclaw config get agents.defaults.models
If you specifically want to keep using openrouter/qwen/qwen3-coder::free, we need to see whether it’s in agents.defaults.models with bad params. Don’t paste API keys; these commands should be model config/status, not secrets.
i want to keep using the cheapest and best option for coding if this one isnt it give me another option
Got it. Your screenshot confirms auth is fine and the config is valid.
For right now, the lowest-friction move is to switch off the broken Qwen free default and use your already-configured OpenRouter auto route:
openclaw config set agents.defaults.model.primary 'openrouter/auto'
openclaw gateway restart
Then try chat again.
For “cheapest and best coding model”, ask in #models because that changes constantly and I don’t want to give you stale pricing/model advice. The relevant docs are here too: https://docs.openclaw.ai/concepts/models#model-discussions-community-notes
One extra note: your config already has this:
"openrouter/qwen/qwen3-coder::free": {
"params": { "maxTokens": 4096 }
}
So if it still asks OpenRouter for 262000 output tokens after a gateway restart, that’s likely a bug in how that model/catalog entry is being resolved, not you doing auth wrong.
where do i do thuis? and it worked
Nice, that second screenshot shows it’s responding now.
You do those openclaw config set ... commands in the same PowerShell window you’ve been using, not inside the web chat box. But since it worked, don’t change anything else right now. You’re currently using Default (OpenRouter) in the dashboard, which matches the openrouter/auto route.
The earlier [assistant turn failed before producing content] is just the old failed attempt still in that chat history. The newer replies mean the current setup is working.
If this fixed it, please right-click the message that solved it → Apps → ✅ Mark Solution. That helps Answer Overflow index the fix for the next person.
i want to use owl alpha on open router as suggested by a community member
You can do that, but don’t type owl alpha as the model name. OpenRouter models need the exact slug/id from OpenRouter, usually something like openrouter/<publisher>/<model-id>.
In the same PowerShell window, first copy the exact model ID from OpenRouter, then run this pattern:
openclaw config set agents.defaults.models '{"openrouter/EXACT_MODEL_ID_FROM_OPENROUTER":{}}' --strict-json --merge
openclaw config set agents.defaults.model.primary 'openrouter/EXACT_MODEL_ID_FROM_OPENROUTER'
openclaw config validate
openclaw gateway restart
Example shape only: if OpenRouter showed some-provider/owl-alpha, the OpenClaw model ref would be openrouter/some-provider/owl-alpha.
After restart, check:
openclaw models status
If you paste the exact OpenRouter slug here, I can turn it into the exact commands. Don’t paste your API key.
ok i seen this give me the commands and tell me if i have t run 1 by 1 or can i copy all in at once
The exact slug in your screenshot is openrouter/owl-alpha.
You can paste this whole block into PowerShell at once; it will run line by line. If anything errors, stop and send the screenshot.
openclaw config set agents.defaults.models '{"openrouter/owl-alpha":{"params":{"maxTokens":4096}}}' --strict-json --merge
openclaw config set agents.defaults.model.primary 'openrouter/owl-alpha'
openclaw config validate
openclaw gateway restart
openclaw models status
I’m adding maxTokens: 4096 on purpose because your earlier failure was OpenRouter getting asked for a huge max output. Owl Alpha also shows a very large max output in that screenshot, so this keeps replies in a sane range.
After that, try the web chat again. If it fails with the same giant-token error, switch back with:
openclaw config set agents.defaults.model.primary 'openrouter/auto'
openclaw gateway restart
is this all good?
Mostly good: Default: openrouter/owl-alpha is set, validation passed, and the gateway restarted.
One thing did not apply: the first command failed, so openrouter/owl-alpha is not in your configured models list yet, and the maxTokens: 4096 safety cap was not saved. Let’s fix just that.
Run these in PowerShell one by one:
$json = '{"openrouter/owl-alpha":{"params":{"maxTokens":4096}}}'
openclaw config set agents.defaults.models $json --strict-json --merge
openclaw config validate
openclaw gateway restart
openclaw models status
After models status, check that Configured models includes openrouter/owl-alpha. If it does, you’re good to test chat.
giving this again
Yep, that’s PowerShell eating the JSON quotes before OpenClaw sees them. Skip the JSON object version.
Run these one by one instead:
openclaw config set 'agents.defaults.models["openrouter/owl-alpha"].params.maxTokens' 4096 --strict-json
openclaw config set agents.defaults.model.primary 'openrouter/owl-alpha'
openclaw config validate
openclaw gateway restart
openclaw models status
This avoids passing a JSON blob through PowerShell, so it should not hit that parse error. After models status, look for openrouter/owl-alpha under Configured models and Default: openrouter/owl-alpha.
here now i will test it using the ```Please review this GitHub repo safely before installing it:
https://github.com/tashfeenahmed/freellmapi
Do not run install commands yet. Clone/read only if needed, summarize what it does, what credentials it needs, whether it is safe-looking, and give me a step-by-step plan.```
Yep, this screenshot looks good.
You now have:
Default: openrouter/owl-alphaConfigured modelsincludesopenrouter/owl-alpha- config validation passed
- gateway restarted
Your test prompt is good because it explicitly says do not run install commands yet. Paste it into the OpenClaw web chat, not PowerShell.
One small improvement to the prompt: add “do not execute code from the repo” too, so it stays read-only:
Please review this GitHub repo safely before installing it:
https://github.com/tashfeenahmed/freellmapi
Do not run install commands or execute code from the repo yet. Clone/read only if needed, summarize what it does, what credentials it needs, whether it is safe-looking, and give me a step-by-step plan.
If the chat responds normally, you’re set.
it said donebefore showing anything then started up again and did it
That looks okay so far. The “Done” then “In progress” is the UI/run state being weird or retrying, not necessarily it ignoring you.
What it has done visibly is only reply “Let me review this repo for you.” That does not mean it installed anything.
Let it finish. If you see it trying commands like npm install, pnpm install, pip install, docker, node, or running a script from that repo, hit Stop. But git clone, git status, ls, cat, rg, or reading files is consistent with your prompt.
Also: this is exactly why your prompt was good. You told it read-only, so the expected next output should be a summary + safety plan, not an install.
how do i check if i have node 20 also can i tell it to download it for me and im still confused where to get the api keys for woukldnt it cost money
To check Node in PowerShell, run:
node -v
npm -v
If node -v shows v20.x.x, v22.x.x, or newer, you’re fine. If it says command not found, or it’s below v20, install Node first.
Yes, you can ask OpenClaw to install it, but installing Node changes your system, so I’d make it ask you before doing anything. Use a prompt like:
Check whether Node.js 20+ and npm are installed. Do not install anything yet. If Node is missing or too old, tell me the exact install command you recommend for Windows and wait for my approval.
For Windows, the normal manual route is either Node’s official installer: https://nodejs.org/ or, in PowerShell:
winget install OpenJS.NodeJS.LTS
On API keys: yes, they can cost money depending on the provider. This repo does not magically give unlimited free models. It’s more like a local router where you add keys from providers that have free tiers or cheap tiers.
Places you might get keys:
- OpenRouter: https://openrouter.ai/settings/keys
- Google AI Studio / Gemini: https://aistudio.google.com/app/apikey
- Groq: https://console.groq.com/keys
Important: set spend limits where the provider supports it, and don’t paste API keys into Discord or screenshots. Free tiers can change or disappear, and some providers may log prompts.
ok i have node, i went to open router, where would i find the cheap models and what does the repo do im still abit confused, does it connect a whole bunch of free models into 1 so they can all be used at once or somethuing this is what open claw said
Yep, your understanding is close.
FreeLLMAPI is basically a local router/proxy. You give it API keys for providers you already have access to, then your apps talk to one local OpenAI-style endpoint. It can choose a provider/model for each request and fail over if one is rate-limited.
It does not combine a bunch of models into one super-model. It’s more like:
Your app / OpenClaw -> FreeLLMAPI -> provider A or provider B or provider C
So “all used at once” is not quite right. It routes requests across them, usually one model/provider per request.
For OpenRouter cheap/free models: go to OpenRouter’s models page and use the filters/sorting there. Look for filters like Free, pricing, context length, and coding/tool-use capability. The exact “best cheap model” changes a lot, so #models is the better place for current recommendations.
The API key part:
- OpenRouter key comes from https://openrouter.ai/settings/keys
- Many models on OpenRouter still cost money, even if cheap.
- Some show as free, but free availability/rate limits can change.
- Set spending limits in OpenRouter before experimenting.
If you use FreeLLMAPI, you still need provider keys. It doesn’t avoid that; it just lets you manage several provider keys behind one local endpoint. For your current setup, since Owl Alpha is already working through OpenRouter, I’d avoid adding another moving part until you’re comfortable.
alright im going to get 4 api keys from 4 different models, give me suggestions for free models
I don’t want to give you a stale “best free models” list, because free models and rate limits change constantly. For that, ask in #models and check the model discussion notes here: https://docs.openclaw.ai/concepts/models#model-discussions-community-notes
What I’d do instead is get provider keys from a few places, then test what’s available/free inside each dashboard:
- OpenRouter: broad catalog, easy to compare pricing/free tags, but watch spend limits.
- Google AI Studio: useful free/low-cost Gemini access depending on current limits.
- Groq: often good for fast free-tier experiments.
- GitHub Models: useful if your GitHub account has access.
Don’t think of it as “4 keys from 4 models.” Usually it’s 4 provider keys, and each provider may expose multiple models. Set spending limits first, then test one small prompt per provider before wiring anything into FreeLLMAPI or OpenClaw.
For OpenClaw itself, the model docs are here: https://docs.openclaw.ai/concepts/models
https://openrouter.ai/nvidia/nemotron-3-super-120b-a12b:free
https://openrouter.ai/nvidia/nemotron-3-nano-30b-a3b:free
https://openrouter.ai/qwen/qwen3-coder:free
https://openrouter.ai/deepseek/deepseek-v4-flash:free
if i got all these how would i get the api keys for them along with that will these help me make websites like these - https://esportshub.io/ - https://wavenet.gg/ - https://arshiagfx.shop/ -
For OpenRouter, you don’t get a separate API key per model. You get one OpenRouter API key, and that key can call any OpenRouter model your account is allowed to use.
Get it here:
https://openrouter.ai/settings/keys
Then in OpenClaw you use model refs like these:
openrouter/nvidia/nemotron-3-super-120b-a12b:free
openrouter/nvidia/nemotron-3-nano-30b-a3b:free
openrouter/qwen/qwen3-coder:free
openrouter/deepseek/deepseek-v4-flash:free
I’d skip openrouter/nvidia/llama-nemotron-embed-vl-1b-v2:free for website/code work. “embed” usually means embeddings/retrieval, not a normal chat/coding model.
For building websites like those examples: yes, a coding-capable model can help you build sites like that, but the free models may be inconsistent, rate-limited, or weaker at larger multi-file app work. They’re fine for learning, scaffolding, fixing CSS, and making smaller pages. For polished sites like esports/agency/shop pages, you’ll still need to guide it with screenshots, copy, colors, sections, and iterate.
Practical setup: keep openrouter/owl-alpha as your default if it’s working, then add other free models as fallbacks only after testing them. Also, qwen/qwen3-coder:free was the one that triggered the giant-token issue earlier, so I wouldn’t make that your default again yet.
i have 1 open router key at the moment that i used for the openclaw setup, do i make a new one or same?
Same key is fine for OpenClaw. One OpenRouter key can call multiple OpenRouter models.
I’d only make a second key if you want separation, for example:
- one key for OpenClaw
- one key for FreeLLMAPI/testing
- different spend limits or easy revocation if something leaks
For now, keep it simple: use the existing OpenRouter key in OpenClaw, set a spend limit in OpenRouter, and don’t paste the key anywhere public. If you later install FreeLLMAPI, I’d make a separate OpenRouter key for that app so you can revoke it without breaking OpenClaw.
whats the spend limit stuff for, i usually just keep it unlimited and then also im just going to make a new api key then im going to connect it but im confused whats the poiunt on the spend limits and how do i get it connected to the https://github.com/tashfeenahmed/freellmapi - also i think i added the embed one for legal stuff, incase i wanted to make a plkayer contract or anything, thought id give it a try
Spend limits are basically a seatbelt. Even if you mostly use free models, a bad config, loop, leaked key, or fallback to a paid model can burn money quickly. Unlimited is convenient, but it also means there’s no hard stop if something goes wrong.
For experimenting, I’d set a small OpenRouter limit like $2-$5, then raise it later once you trust the setup. If you make a new key for FreeLLMAPI, give that key its own low limit so it can’t affect your main OpenClaw key.
How FreeLLMAPI connects:
OpenRouter key -> FreeLLMAPI dashboard Keys page
FreeLLMAPI gives you one local unified key
OpenClaw/app uses FreeLLMAPI local URL + unified key
FreeLLMAPI routes to OpenRouter/provider models
So after installing FreeLLMAPI, you’d open its dashboard, add your OpenRouter API key there, then copy the freellmapi-... unified key it creates. Don’t paste either key in Discord.
About the embed model: embeddings are not for writing contracts. They turn text into searchable vectors, useful for search/RAG like “find relevant clauses from my document collection.” For drafting or reviewing a player contract, use a normal chat/coding/reasoning model, and treat it as draft help only, not legal advice. A lawyer should review anything real before anyone signs it.
here im asking openclaw to get it for me, however i says something about npm, is it downloading node all over again?
No, npm is not downloading Node again.
Node is the runtime you already installed. npm install downloads the repo’s dependencies into that project’s node_modules folder. Think of it as “install the libraries this app needs,” not “install Node again.”
The screenshot says npm may have been killed by a timeout/resource issue. That can happen if the install takes too long. I’d ask OpenClaw to continue like this:
Continue from where you left off. Check whether node_modules exists and whether npm install completed. Do not reinstall Node. If dependencies are incomplete, run npm install again in the freellmapi folder only. Then tell me the exact folder path where the repo is installed and whether it is ready to run.
If it asks before running npm install, that’s normal. npm install is the expected step for this repo.
ok how do i start it
It’s ready. Start it from PowerShell with these commands:
cd C:\Users\Ali Hassan\.openclaw\workspace\freellmapi
npm run dev
Leave that PowerShell window open while you use it. If it starts correctly, open this in your browser:
Then go to the Keys page and add your provider API keys. The API endpoint for apps/OpenClaw later will be:
http://localhost:3001/v1
You can also just tell OpenClaw: “start the dev server now.” That should run the same npm run dev command, but doing it yourself in PowerShell makes it easier to see errors and stop it with Ctrl+C.
im getting this
This is just the space in Ali Hassan breaking the cd command. PowerShell needs quotes around paths with spaces.
Run these one by one:
cd "C:\Users\Ali Hassan\.openclaw\workspace\freellmapi"
npm run dev
The npm error Missing script: "dev" happened because the cd failed, so you were still in C:\Users\Ali Hassan instead of the freellmapi folder.
If the quoted cd works, your prompt should change to something like:
PS C:\Users\Ali Hassan\.openclaw\workspace\freellmapi>
Then npm run dev should find the project scripts.
is this right?
Yes, that’s right. It’s running.
Open this in your browser:
Leave that PowerShell window open. If you close it, FreeLLMAPI stops.
One important thing: your screenshot shows your unified FreeLLMAPI key. Treat that like a password. Since it’s local-only it’s not catastrophic, but don’t share future screenshots with keys visible.
Next steps:
- Open http://localhost:5173
- Go to the Keys page
- Add your OpenRouter API key there
- Use the local endpoint when needed:
http://localhost:3001/v1/chat/completions
For OpenAI-compatible clients, the base URL is usually:
http://localhost:3001/v1
ok i added the openrouter thing and that now how do i add those bots and how do i configure it to my open claw since im using a whole different api from openrouter
In FreeLLMAPI, those aren’t really “bots” — they’re provider/model routes. You add provider keys/models inside the FreeLLMAPI dashboard, then OpenClaw only needs to talk to one local API: FreeLLMAPI.
So the chain becomes:
OpenClaw -> FreeLLMAPI local API -> OpenRouter -> chosen free model
Keep the FreeLLMAPI PowerShell window running, then configure OpenClaw in a new PowerShell window. Replace PASTE_YOUR_FREELLMAPI_KEY_HERE with the freellmapi-... key from FreeLLMAPI. Don’t post that key here.
$provider = @'
{"baseUrl":"http://localhost:3001/v1","api":"openai-completions","apiKey":"PASTE_YOUR_FREELLMAPI_KEY_HERE","models":[{"id":"auto","name":"FreeLLMAPI Auto","reasoning":false,"input":["text"],"contextWindow":128000,"maxTokens":4096,"cost":{"input":0,"output":0,"cacheRead":0,"cacheWrite":0}}]}
'@
openclaw config set models.providers.freellmapi $provider --strict-json --merge
$allow = @'
{"freellmapi/auto":{"params":{"maxTokens":4096}}}
'@
openclaw config set agents.defaults.models $allow --strict-json --merge
openclaw config set agents.defaults.model.primary 'freellmapi/auto'
openclaw config validate
openclaw gateway restart
openclaw models status
Run that block in order. If it works, openclaw models status should show:
Default: freellmapi/auto
Configured models: ... freellmapi/auto ...
Then test chat. If it breaks, switch back to your direct OpenRouter setup:
openclaw config set agents.defaults.model.primary 'openrouter/owl-alpha'
openclaw gateway restart
Docs for the custom provider shape are here: https://docs.openclaw.ai/gateway/configuration-reference#custom-providers-and-base-urls
ok here, also wouldnt i have to add the owl alpha and opus 4.7 back to the llmapi thing
The error is the same PowerShell quoting problem: the JSON reached OpenClaw without quotes around keys, so it became invalid JSON.
Use this version exactly. Important: inside the @' ... '@ block, do not backslash the quotes.
$provider = @'
{"baseUrl":"http://localhost:3001/v1","api":"openai-completions","apiKey":"PASTE_YOUR_FREELLMAPI_KEY_HERE","models":[{"id":"auto","name":"FreeLLMAPI Auto","reasoning":false,"input":["text"],"contextWindow":128000,"maxTokens":4096,"cost":{"input":0,"output":0,"cacheRead":0,"cacheWrite":0}}]}
'@
$provider = $provider.Replace('\"','"')
openclaw config set models.providers.freellmapi $provider --strict-json --merge
Then:
openclaw config set 'agents.defaults.models["freellmapi/auto"].params.maxTokens' 4096 --strict-json
openclaw config set agents.defaults.model.primary 'freellmapi/auto'
openclaw config validate
openclaw gateway restart
openclaw models status
About Owl Alpha / Opus:
- Owl Alpha: no, you don’t need to add it separately to OpenClaw if FreeLLMAPI is routing via OpenRouter. FreeLLMAPI uses your OpenRouter key and can route to OpenRouter models.
- Opus 4.7: that is Anthropic, not your OpenRouter key unless you specifically access it through OpenRouter. If you want Anthropic direct in FreeLLMAPI, you’d need an Anthropic API key and add that provider in FreeLLMAPI. That can cost money.
Honestly, since direct openrouter/owl-alpha already worked in OpenClaw, FreeLLMAPI is optional extra complexity. It’s useful if you want one local router for multiple providers, not required for OpenRouter alone.
got this i want to keep going with the LLMAPI thing because then i have multiple choices and easier for me in the long run
You’re still running the JSON-blob command, and PowerShell keeps stripping it. Let’s avoid JSON blobs entirely and set the fields one by one.
Keep FreeLLMAPI running in its own PowerShell window. In a new PowerShell window, run these one by one. Replace only the key value with your real freellmapi-... key, and don’t post it here.
openclaw config set models.providers.freellmapi.baseUrl 'http://localhost:3001/v1'
openclaw config set models.providers.freellmapi.api 'openai-completions'
openclaw config set models.providers.freellmapi.apiKey 'PASTE_YOUR_FREELLMAPI_KEY_HERE'
openclaw config set models.providers.freellmapi.models[0].id 'auto'
openclaw config set models.providers.freellmapi.models[0].name 'FreeLLMAPI Auto'
openclaw config set models.providers.freellmapi.models[0].reasoning false --strict-json
openclaw config set models.providers.freellmapi.models[0].input '["text"]' --strict-json
openclaw config set models.providers.freellmapi.models[0].contextWindow 128000 --strict-json
openclaw config set models.providers.freellmapi.models[0].maxTokens 4096 --strict-json
openclaw config set models.providers.freellmapi.models[0].cost.input 0 --strict-json
openclaw config set models.providers.freellmapi.models[0].cost.output 0 --strict-json
openclaw config set models.providers.freellmapi.models[0].cost.cacheRead 0 --strict-json
openclaw config set models.providers.freellmapi.models[0].cost.cacheWrite 0 --strict-json
openclaw config set 'agents.defaults.models["freellmapi/auto"].params.maxTokens' 4096 --strict-json
openclaw config set agents.defaults.model.primary 'freellmapi/auto'
openclaw config validate
openclaw gateway restart
openclaw models status
This is annoying, but it’s just PowerShell quoting being fussy. Once this is in, FreeLLMAPI should give you the long-term “one local API, multiple providers/models behind it” setup you want.
it gave this
That failed because OpenClaw validates the whole provider at once. Setting only baseUrl creates a half-provider with no models, so validation rejects it. We need to add the whole provider in one go.
Use this exact PowerShell shape. The important part: the JSON block uses normal quotes, no backslashes.
$provider = @'
{
"baseUrl": "http://localhost:3001/v1",
"api": "openai-completions",
"apiKey": "PASTE_YOUR_FREELLMAPI_KEY_HERE",
"models": [
{
"id": "auto",
"name": "FreeLLMAPI Auto",
"reasoning": false,
"input": ["text"],
"contextWindow": 128000,
"maxTokens": 4096,
"cost": {
"input": 0,
"output": 0,
"cacheRead": 0,
"cacheWrite": 0
}
}
]
}
'@
$provider = $provider.Replace('\"','"')
openclaw config set models.providers.freellmapi $provider --strict-json --merge
openclaw config set 'agents.defaults.models["freellmapi/auto"].params.maxTokens' 4096 --strict-json
openclaw config set agents.defaults.model.primary 'freellmapi/auto'
openclaw config validate
openclaw gateway restart
openclaw models status
Replace only PASTE_YOUR_FREELLMAPI_KEY_HERE with your freellmapi-... key. Don’t paste the key here.
THIS ISNT WORKING BRO it wont let me send it just keeps making new lines
You’re right, that was too annoying for PowerShell. The @' block keeps making new lines until it sees the closing '@, which is easy to mess up in chat.
Use this shorter one-line method instead. Run these one by one. Do not paste your key here.
openclaw config unset models.providers.freellmapi
Then make the provider JSON from a PowerShell object. Replace only PASTE_YOUR_FREELLMAPI_KEY_HERE:
$provider = [ordered]@{baseUrl='http://localhost:3001/v1'; api='openai-completions'; apiKey='PASTE_YOUR_FREELLMAPI_KEY_HERE'; models=@([ordered]@{id='auto'; name='FreeLLMAPI Auto'; reasoning=$false; input=@('text'); contextWindow=128000; maxTokens=4096; cost=[ordered]@{input=0; output=0; cacheRead=0; cacheWrite=0}})} | ConvertTo-Json -Depth 10 -Compress
Then:
openclaw config set models.providers.freellmapi $provider --strict-json --merge
openclaw config set 'agents.defaults.models["freellmapi/auto"].params.maxTokens' 4096 --strict-json
openclaw config set agents.defaults.model.primary 'freellmapi/auto'
openclaw config validate
openclaw gateway restart
openclaw models status
If the first unset says path not found, that’s fine. Keep going.
IS THIS FINE
Yes, that line is fine. It just created the $provider variable; PowerShell returns to the prompt when it worked.
Now run the next commands:
openclaw config set models.providers.freellmapi $provider --strict-json --merge
openclaw config set 'agents.defaults.models["freellmapi/auto"].params.maxTokens' 4096 --strict-json
openclaw config set agents.defaults.model.primary 'freellmapi/auto'
openclaw config validate
openclaw gateway restart
openclaw models status
Also: that screenshot includes your FreeLLMAPI key, even if partly covered. Treat it like a password. Since it’s local-only it’s not as bad as leaking an OpenRouter key, but I’d avoid posting it again. Once everything works, you can regenerate it later if you want to be tidy.
is it fine and working, how do i add those stuff that i wanted to add the models?
Not fully working yet. The important line is:
Missing auth
- freellmapi `openclaw configure` or set an API key env var.
So OpenClaw now has Default: freellmapi/auto, but the actual FreeLLMAPI provider config/key did not save correctly. That’s why it says missing auth.
Since PowerShell quoting keeps fighting you, use the simpler route: let OpenClaw edit its config file, or open it manually.
Ask OpenClaw this exact prompt:
Configure OpenClaw to use my local FreeLLMAPI server as a custom OpenAI-compatible provider. The base URL is http://localhost:3001/v1. The model id should be auto. Ask me for the FreeLLMAPI API key privately / in the terminal if needed, but do not print the key back to chat. After editing config, run openclaw config validate, openclaw gateway restart, and openclaw models status.
If you want to do it manually, back up + open config:
Copy-Item "$env:USERPROFILE\.openclaw\openclaw.json" "$env:USERPROFILE\.openclaw\openclaw.backup.json"
notepad "$env:USERPROFILE\.openclaw\openclaw.json"
For adding the models: you don’t add each OpenRouter free model as a separate API key. You add your one OpenRouter key inside the FreeLLMAPI dashboard. FreeLLMAPI then has access to OpenRouter models through that key. OpenClaw only needs freellmapi/auto if you want FreeLLMAPI to route between choices.
So the goal is:
OpenClaw: freellmapi/auto
FreeLLMAPI: OpenRouter key added in dashboard
OpenRouter: models like owl-alpha, deepseek free, nemotron free, etc.
got this
That error means OpenClaw is currently pointed at freellmapi/auto, but the freellmapi provider model entry was never registered correctly. So the agent can’t even start to fix it because its default model is broken.
First recover OpenClaw back to the working model:
openclaw config set agents.defaults.model.primary 'openrouter/owl-alpha'
openclaw config validate
openclaw gateway restart
After that, the web chat should work again.
Then we can configure FreeLLMAPI from a working model. The simplest next step is to open the config file instead of fighting PowerShell quoting:
notepad "$env:USERPROFILE\.openclaw\openclaw.json"
Do not paste the file here because it may contain keys. If you want OpenClaw to edit it for you, first switch back to openrouter/owl-alpha with the commands above, then ask the agent again. Right now it’s failing because it’s trying to use freellmapi/auto before freellmapi/auto exists.
im just going to change the model to the owl one and ill do it
Good call. Do this first so OpenClaw is usable again:
openclaw config set agents.defaults.model.primary 'openrouter/owl-alpha'
openclaw config validate
openclaw gateway restart
openclaw models status
Once models status shows Default: openrouter/owl-alpha, test chat. After it’s stable, then we can come back to FreeLLMAPI carefully. The main lesson: don’t set OpenClaw’s default to freellmapi/auto until models.providers.freellmapi.models is actually registered and auth is accepted.
i didnt do this but this happened when i just changed it manually to owl, help me figure out whats going on
What’s happening: that is an old OpenClaw run still continuing from the FreeLLMAPI prompt. Manually changing the dropdown/model does not cancel an already-running task. It’s still trying to configure FreeLLMAPI because that was the instruction you gave it earlier.
Do this now:
- Hit Stop on that OpenClaw chat/run.
- In PowerShell, put OpenClaw back on Owl:
openclaw config set agents.defaults.model.primary 'openrouter/owl-alpha'
openclaw config validate
openclaw gateway restart
openclaw models status
- Start a new chat/session and test a simple prompt.
Also, you pasted the FreeLLMAPI key into the OpenClaw chat again. Since it’s local-only, it’s less scary than leaking your OpenRouter key, but still treat it as exposed. Once you’re stable, regenerate the FreeLLMAPI unified key if the app has that option, or recreate its .env/database if needed.
once ive done this and start a new chat do i ask it to do that also generate me a chat to send to it
After you recover Owl and start a new chat, don’t ask it to configure FreeLLMAPI yet. First confirm the new chat works with a tiny safe prompt.
Send this first:
Reply with one sentence confirming what model/provider you are using. Do not change config or run commands.
If that works, then use this prompt for FreeLLMAPI, but only if you’re ready to let it edit config:
I want to configure OpenClaw to use my local FreeLLMAPI server as a custom OpenAI-compatible provider, but do this carefully.
Current facts:
- FreeLLMAPI is already running locally.
- Base URL: http://localhost:3001/v1
- Model id: auto
- OpenClaw currently works on openrouter/owl-alpha.
Rules:
1. Do not change agents.defaults.model.primary until after the FreeLLMAPI provider is fully registered and config validation passes.
2. Do not print my FreeLLMAPI API key back to chat.
3. Ask me for the FreeLLMAPI key only when needed.
4. First inspect the current OpenClaw config structure and docs for custom providers.
5. Add models.providers.freellmapi with model id auto, maxTokens 4096, contextWindow 128000, api openai-completions, baseUrl http://localhost:3001/v1, and the API key I provide.
6. Add freellmapi/auto to agents.defaults.models.
7. Run openclaw config validate.
8. Only if validation passes, then set agents.defaults.model.primary to freellmapi/auto, restart the gateway, and run openclaw models status.
9. If any step fails, restore primary model to openrouter/owl-alpha and stop.
That “don’t change primary until validation passes” part is the important guardrail.
how long does this last
That’s an API rate limit from the model/provider, not a permanent OpenClaw error.
How long it lasts depends on the provider/model. For free OpenRouter models it can be a few minutes, an hour, or sometimes until the provider’s daily free quota resets. OpenRouter’s model page/account activity is the best place to check the exact limit.
For now:
openclaw config set agents.defaults.model.primary 'openrouter/owl-alpha'
openclaw gateway restart
Then wait a bit and test again with a tiny prompt. If Owl Alpha keeps rate-limiting, switch to openrouter/auto or ask in #models for a currently reliable cheap/free OpenRouter option. Free models are useful, but rate limits are the tradeoff.