OpenClaw manual configuration reference
Use this page when the dashboard wizard is not available or when you need to inspect the local configuration file directly.
Configuration file paths
| System | Path |
|---|---|
| macOS | /Users/<your-name>/.openclaw/openclaw.json |
| Linux | /home/<your-name>/.openclaw/openclaw.json |
| Windows | C:\Users\<your-name>\.openclaw\openclaw.json |
The ~ shortcut means your home directory. For example, on macOS ~/.openclaw/openclaw.json expands to /Users/alex/.openclaw/openclaw.json.
Values to put into OpenClaw
Use these values anywhere OpenClaw asks for a provider, base URL, key, or model:
| Setting | Value |
|---|---|
| Provider type | OpenAI-compatible |
| Provider name | unikey |
| Base URL | https://www.getunikey.ai/v1 |
| API key | Your UniKey API key |
| Default model | claude-sonnet-4-6 |
| Backup model | gpt-5.2 |
Do not add /chat/completions to the Base URL. OpenClaw or its OpenAI-compatible client adds /chat/completions automatically.
Safe manual-edit workflow
- Stop the gateway:
openclaw gateway stop
- Back up the config file.
macOS/Linux:
cp ~/.openclaw/openclaw.json ~/.openclaw/openclaw.json.bak
Windows PowerShell:
Copy-Item "$env:USERPROFILE\.openclaw\openclaw.json" "$env:USERPROFILE\.openclaw\openclaw.json.bak"
-
Edit
openclaw.jsonwith a text editor. -
Make the UniKey provider entry use the values from the table above.
-
Save the file.
-
Restart:
openclaw gateway restart
openclaw gateway status
Test with a direct UniKey API call
Before blaming OpenClaw, verify the UniKey key and model with curl.
macOS/Linux:
export UNIKEY_API_KEY="sk-..."
curl https://www.getunikey.ai/v1/chat/completions \
-H "Authorization: Bearer $UNIKEY_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "gpt-5.2",
"messages": [{"role": "user", "content": "Reply with OK."}]
}'
Windows PowerShell:
$env:UNIKEY_API_KEY = "sk-..."
curl.exe https://www.getunikey.ai/v1/chat/completions `
-H "Authorization: Bearer $env:UNIKEY_API_KEY" `
-H "Content-Type: application/json" `
-d "{\"model\":\"gpt-5.2\",\"messages\":[{\"role\":\"user\",\"content\":\"Reply with OK.\"}]}"
If curl works but OpenClaw does not, the issue is in the OpenClaw provider configuration. If curl fails, check the API key, model access, Credits balance, and network.