Setup wizard

Connect your AI tool.

Pick a tool, your operating system and a model. The steps and snippets below update to match.

1Tool
2Operating system
3Instructions

Connect OpenClaw

OpenClaw takes a custom provider in openclaw.json. The default model must point at that provider.

  1. Install OpenClaw. The installer also sets up Node.js if it is missing, then walks you through onboarding.
    Terminal
    curl -fsSL https://openclaw.ai/install.sh | bash
  2. Save your key as an environment variable. The last line reloads your shell settings, so the variables work straight away.
    Terminal
    echo 'export CHEAPTOKENS_API_KEY="YOUR_API_KEY"' >> ~/.bashrc
    source ~/.bashrc
  3. Open ~/.openclaw/openclaw.json and add the provider and default model. If the file already has agents or models sections, merge these keys into them.
    openclaw.json
    {
      agents: {
        defaults: {
          model: { primary: "cheaptokens/claude-sonnet-5-5" },
        },
      },
      models: {
        mode: "merge",
        providers: {
          cheaptokens: {
            baseUrl: "https://cheaptokens.pw/v1",
            apiKey: "${CHEAPTOKENS_API_KEY}",
            api: "openai-completions",
            models: [
              { id: "claude-sonnet-5-5", name: "claude-sonnet-5-5", contextWindow: 200000, maxTokens: 8192 },
            ],
          },
        },
      },
    }
  4. Restart the gateway and check that the model is listed.
    Terminal
    openclaw gateway restart
    openclaw models list
  5. Send your agent a message. To switch model later, run openclaw models set cheaptokens/claude-sonnet-5-5 or type /model in a chat.
  • The default model only works if the same model ID is also listed under the provider's models.
  • openclaw models status shows which model and provider are active. openclaw doctor checks the whole install.

Open the full OpenClaw guide →