Skip to main content
OpenClaw connects to BetterToken through ~/.openclaw/openclaw.json. GPT provider models use openai-responses; other supported providers use openai-completions.

Key settings

Prerequisites

Install

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.
Confirm that 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.
Do not infer 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:
The setup is active when validation passes, the Gateway restarts, and 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 to models.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.
  • 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.

Optional: manage the provider with CC Switch

To manage providers for several tools in one place, see OpenClaw setup in CC Switch.

Technical details

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.