~/.openclaw/openclaw.json. GPT provider models use openai-responses; other supported providers use openai-completions.
Key settings
Prerequisites
- Install the latest OpenClaw
- Create a BetterToken API Key
- Copy a Model ID from the model plaza or key Setup dialog
Install
- macOS / Linux
- Windows
Command-line setup
The BetterToken Automatic setup script writes the OpenClaw configuration. It requires Node.js. If you do not pass an API Key or Model ID as an argument, the script prompts you for them.- macOS / Linux
- Windows
agents.defaults.model.primary uses the YOUR_MODEL_ID shown in Setup, then run the validation and Gateway restart commands below.
Manual setup
Configure OpenClaw
Edit~/.openclaw/openclaw.json. Use only the example that matches the provider of your Model ID.
- GPT: openai-responses
- Non-GPT: openai-completions
api from a model name. GPT uses openai-responses. Use openai-completions for a non-GPT provider only when the model plaza or Setup dialog confirms compatibility.
Verify the connection
Run:bettertoken/YOUR_MODEL_ID appears in the model list and status. If an existing session still uses an old model, start a new session and check again.
Switch models
Add the new model tomodels.providers.bettertoken.models, then change agents.defaults.model.primary to bettertoken/YOUR_MODEL_ID. Save, validate, and restart the Gateway.
Common errors
Advanced setup
Supported providers
Statuses apply to the BetterToken setup documented on this page.
What the setup methods mean
What the setup methods mean
- Command-line + manual setup: use a generated command or follow the complete manual steps.
- Manual setup: enter the API Key, Base URL, and Model.
- Not supported: no verified direct setup is currently available.
Related FAQ
- OpenAI-compatible API vs Anthropic-compatible API
- MCP vs API Key and Base URL
- What are model_provider, base_url, and wire_api?
- How to configure an OpenAI-compatible API in Cline
Optional: manage the provider with CC Switch
To manage providers for several tools in one place, see OpenClaw setup in CC Switch.Technical details
Responses and Chat Completions
Responses and Chat Completions
openai-responses makes OpenClaw call /v1/responses for GPT provider models. openai-completions calls /v1/chat/completions for confirmed compatible non-GPT providers. Both use https://bettertoken.ai/v1 as baseUrl.
