OpenClaw API setup with cheap multi-model access

Add AnyModel as a custom provider in OpenClaw to run GPT, Claude, Gemini and other models from one prepaid balance, then pay only for the tokens your agents use.

Setup

  1. 1.
    Create a free account and copy your API key.
  2. 2.

    Add the provider to ~/.openclaw/openclaw.json while preserving the rest of your existing settings:

    {
      "agents": {
        "defaults": {
          "model": {
            "primary": "9router/gpt-5.6-terra"
          }
        }
      },
      "models": {
        "providers": {
          "9router": {
            "baseUrl": "https://anymodel.org/v1",
            "apiKey": "<YOUR_API_KEY>",
            "api": "openai-completions",
            "models": [
              {
                "id": "gpt-5.6-terra",
                "name": "GPT-5.6 Terra"
              }
            ]
          }
        }
      }
    }

    Restart OpenClaw. To switch models, add another id to the models array and set primary to 9router/<model-id>.

  3. 3.
    Start coding. Switch models any time by changing the model id — same key, same endpoint.

Popular models for OpenClaw

See all on the models page, or compare two side by side.

FAQ

Can I use a free API with OpenClaw?

No. The signup grant is disabled; AnyModel uses a prepaid balance billed by actual token usage.

Which models work in OpenClaw?

The AnyModel provider can expose available GPT, Claude, Gemini, GLM, Kimi and other models. Add every model id you want to use to the OpenClaw configuration.

Where is the OpenClaw configuration file?

The main file is ~/.openclaw/openclaw.json. Back it up before editing and never publish the API key.