Skip to main content

OpenClaw

Overview​

OpenClaw is an open-source, self-hosted AI assistant platform that connects channels like Feishu, Discord, Slack, and Teams, with long-running tasks, scheduled tasks, and multi-agent collaboration. Configuration lives in ~/.openclaw/openclaw.json, where TokenPlus can be added as an OpenAI-compatible provider.

Installation​

  1. One-click script: curl -fsSL https://openclaw.ai/install.sh | bash
  2. Or npm: after Node 22+, run npm install -g openclaw@latest
  3. Run openclaw --version and openclaw doctor for a self-check

Configure TokenPlus​

Edit ~/.openclaw/openclaw.json, add TokenPlus under providers (OpenAI compatible, api uses openai-responses or openai-completions, baseUrl with /v1), and specify the default model in agents.defaults.model.primary.

// ~/.openclaw/openclaw.json
{
"models": {
"mode": "merge",
"providers": {
"tokenplus": {
"baseUrl": "https://tokenplus.net/v1",
"apiKey": "sk-your-TokenPlus-key",
"api": "openai-responses",
"models": [
{ "id": "gpt-4o", "name": "GPT-4o" },
{ "id": "claude-sonnet-4-6", "name": "Claude Sonnet 4.6" }
]
}
}
},
"agents": {
"defaults": {
"model": { "primary": "tokenplus/gpt-4o" },
"models": { "tokenplus/gpt-4o": {}, "tokenplus/claude-sonnet-4-6": {} }
}
}
}
tip

When api is openai-responses, baseUrl must include /v1; if you switch to the native Anthropic protocol, set baseUrl to the root domain https://tokenplus.net (no /v1) and api to anthropic-messages. Keep models.mode as merge so you do not overwrite the built-in config.

Quick start (up and running in 5 minutes)​

  1. Install openclaw (script or npm -g)
  2. Write ~/.openclaw/openclaw.json, adding the TokenPlus provider and default model above
  3. Run openclaw onboard --install-daemon to install the daemon
  4. Run openclaw gateway to start the gateway; seeing the configured models means success

FAQ​

  • Startup error? Confirm openclaw.json is valid JSON and the path is correct
  • Model not taking effect? Check that primary is in provider/model-ID form and is listed under models
  • To use Claude's native protocol, change that provider's api to anthropic-messages and baseUrl without /v1
Online Service