> ## Documentation Index
> Fetch the complete documentation index at: https://liaobots.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Integrate OpenClaw

<img src="https://mintcdn.com/liaobots/eqza7UPJMVdehla8/images/API/OpenClaw/openclaw-icon.png?fit=max&auto=format&n=eqza7UPJMVdehla8&q=85&s=514108d106686be9b66f9edbd5ee1563" alt="OpenClaw" width="1599" height="1719" data-path="images/API/OpenClaw/openclaw-icon.png" />

## Prerequisites

Follow the [official documentation](https://docs.openclaw.ai/install) to install OpenClaw (formerly Moltbot/Clawdbot). Supports macOS, Windows (WSL2), Linux.

For price ratio, please refer to [Models & Pricing](/Aggregation/Model-Price). For API addresses and backup URLs, see [API Call Examples](/Getting-Started/en/API)

## Locate the OpenClaw Configuration File

**macOS / Linux / WSL2:**
`~/.openclaw/openclaw.json` or `~/.moltbot/moltbot.json` or `~/.clawdbot/clawdbot.json`

## Modify the Configuration File

Write the following content into your configuration file, replacing `Your Authcode` with your actual auth code:

```json theme={null}
{
  "models": {
    "mode": "merge",
    "providers": {
      "anthropic": {
        "baseUrl": "https://ai.liaobots.work",
        "apiKey": "Your Authcode",
        "models": []
      },
      "google": {
        "baseUrl": "https://ai.liaobots.work/v1beta",
        "apiKey": "Your Authcode",
        "models": []
      },
      "openai-codex": {
        "baseUrl": "https://ai.liaobots.work/codex/v1",
        "apiKey": "Your Authcode",
        "api": "openai-responses",
        "models": []
      }
    }
  },
  "agents": {
    "defaults": {
      "model": {
        "primary": "anthropic/claude-sonnet-4-6"
      },
      "models": {
        "anthropic/claude-sonnet-4-6": {}
      }
    }
  }
}
```

**Notes:**

* The `models` section configures three providers for Claude, Gemini, and OpenAI Codex model families respectively
* `models: []` means no filtering — all available models under that provider can be used
* The `agents` section sets the default model to `anthropic/claude-sonnet-4-6`

## Switch the Currently Used Model in OpenClaw

After completing the configuration, you can switch models using the following commands:

```shell theme={null}
openclaw models set anthropic/claude-sonnet-4-6
openclaw models set google/gemini-2.5-pro
openclaw models set openai-codex/o3-pro
```
