Skip to main content

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

SystemPath
macOS/Users/<your-name>/.openclaw/openclaw.json
Linux/home/<your-name>/.openclaw/openclaw.json
WindowsC:\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:

SettingValue
Provider typeOpenAI-compatible
Provider nameunikey
Base URLhttps://www.getunikey.ai/v1
API keyYour UniKey API key
Default modelclaude-sonnet-4-6
Backup modelgpt-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

  1. Stop the gateway:
openclaw gateway stop
  1. 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"
  1. Edit openclaw.json with a text editor.

  2. Make the UniKey provider entry use the values from the table above.

  3. Save the file.

  4. 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.