šŸš€ Integrating OpenClaw / Clawdbot with CodingPlanX Custom Models

This tutorial will guide you through the installation of Clawdbot (OpenClaw) and the configuration of a custom API proxy, allowing you to flexibly call models like GPT-4o, Claude 3.5, and Gemini.


šŸ› ļø Step 1: Environment Preparation and Initialization

Before you begin, please ensure that Node.js is installed on your system.

1. Install Clawdbot Globally

Open your terminal (CMD or PowerShell) and run the following command:

npm i -g clawdbot

2. Run the Initialization Guide

Execute the setup wizard to complete the basic configuration. Follow the on-screen prompts:

clawdbot onboard

[!IMPORTANT] Note for Windows Users: In a native Windows environment, if the system prompts that openclaw is not recognized as an internal command, please ensure you use the clawdbot command instead.


āš™ļø Step 2: Modify the Main Configuration File clawdbot.json

In this step, we will modify the main configuration file to define the proxy API address and model mappings.

File Path: C:\Users\your-username\.clawdbot\clawdbot.json (Note: The original tutorial used 'Administrator'. Please change this to your actual system username)

Modify the agents, auth, and models sections in the file based on the following reference:

{
  "agents": {
    "defaults": {
      "workspace": "C:\\Users\\your-username\\clawd",
      "models": {
        "api-proxy-gpt/gpt-4o": { "alias": "GPT-4o" },
        "api-proxy-claude/claude-sonnet-4-5-20250929": { "alias": "Claude Sonnet 4.5" },
        "api-proxy-google/gemini-3-pro-preview": { "alias": "Gemini 3 Pro" }
      },
      "model": {
        "primary": "api-proxy-claude/claude-sonnet-4-5-20250929"
      }
    }
  },
  "auth": {
    "profiles": {
      "api-proxy-gpt:default": { "provider": "api-proxy-gpt", "mode": "api_key" },
      "api-proxy-claude:default": { "provider": "api-proxy-claude", "mode": "api_key" },
      "api-proxy-google:default": { "provider": "api-proxy-google", "mode": "api_key" }
    }
  },
  "models": {
    "mode": "merge",
    "providers": {
      "api-proxy-gpt": {
        "baseUrl": "https://api.codingplanx.ai/v1",
        "api": "openai-completions",
        "models": [
          { "id": "gpt-4o", "name": "GPT-4o", "contextWindow": 128000, "maxTokens": 8192 }
        ]
      },
      "api-proxy-claude": {
        "baseUrl": "https://api.codingplanx.ai",
        "api": "anthropic-messages",
        "models": [
          { "id": "claude-sonnet-4-5-20250929", "name": "Claude Sonnet 4.5", "contextWindow": 200000, "maxTokens": 8192 }
        ]
      },
      "api-proxy-google": {
        "baseUrl": "https://api.codingplanx.ai/v1beta",
        "api": "google-generative-ai",
        "models": [
          { "id": "gemini-3-pro-preview", "name": "Gemini 3 Pro", "contextWindow": 2000000, "maxTokens": 8192 }
        ]
      }
    }
  }
}

šŸ”‘ Step 3: Configure the Authentication File auth-profiles.json

In this step, you need to enter the actual API Keys obtained from the proxy platform.

File Path: C:\Users\your-username\.clawdbot\agents\main\agent\auth-profiles.json

Update the key fields with your own API credentials:

{
  "version": 1,
  "profiles": {
    "api-proxy-gpt:default": {
      "type": "api_key",
      "provider": "api-proxy-gpt",
      "key": "sk-your-real-gpt-key"
    },
    "api-proxy-claude:default": {
      "type": "api_key",
      "provider": "api-proxy-claude",
      "key": "sk-your-real-claude-key"
    },
    "api-proxy-google:default": {
      "type": "api_key",
      "provider": "api-proxy-google",
      "key": "sk-your-real-google-key"
    }
  },
  "lastGood": {
    "api-proxy-gpt": "api-proxy-gpt:default",
    "api-proxy-claude": "api-proxy-claude:default",
    "api-proxy-google": "api-proxy-google:default"
  }
}

🚦 Step 4: Verify and Start the Service

Once configured, verify and run the service using the following steps.

1. Run a Health Check

Verify if your configuration syntax and network connectivity are working properly:

clawdbot doctor

2. Start the Gateway Service

Run the gateway service to enable the AI proxy:

clawdbot gateway

3. Access the Web Console

  1. Open your browser and navigate to: http://127.0.0.1:18789/
  2. Login Credentials: Use the Token outputted at the end of the clawdbot onboard step to log in.
  3. You are now ready to customize and use your AI Agent!

šŸ’” Tip: If you ever switch proxy providers, simply update the baseUrl in clawdbot.json and the key in auth-profiles.json.