API DocsAPI Docs
LongCat API Platform
  • English
  • 简体中文
LongCat API Platform
  • English
  • 简体中文
  • Quick Start
  • API Docs
  • Claude Code Configuration
  • OpenClaw Configuration
  • FAQ
  • Change Log

OpenClaw Configuration

1. Overview

OpenClaw (formerly Clawdbot) is an open-source AI agent framework that supports flexible configuration through configuration files or a GUI interface. The LongCat series models are supported for use within OpenClaw. This document explains how to integrate OpenClaw with the LongCat API Platform.

2. Prerequisites

Before using OpenClaw, you need to prepare the following:

  1. OpenClaw Installation Package

Installation commands for macOS:

# Using npm
npm install -g openclaw@latest

# Or using pnpm
pnpm add -g openclaw@latest

# Or using curl
curl -fsSL https://openclaw.ai/install.sh | bash

Installation commands for Windows PowerShell:

iwr -useb https://openclaw.ai/install.ps1 | iex
  1. LongCat Core Configuration
  • Confirm your API Keys (available on the API Keys).
  • Ensure that your account has sufficient token balance (check on the Usage Information).

Supported Models:

Model NameAPI FormatDescription
LongCat-Flash-ChatOpenAI/AnthropicHigh-performance general-purpose dialogue model
LongCat-Flash-ThinkingOpenAI/AnthropicDeep thinking model
LongCat-Flash-Thinking-2601OpenAI/AnthropicUpgraded deep thinking model
LongCat-Flash-LiteOpenAI/AnthropicEfficient MoE model

3. Quick Start

Onboarding Command

openclaw onboard --install-daemon

Onboarding Configuration Options

StepRecommendation
Risk ConfirmationSelect yes to continue
Onboarding ModeQuickStart is recommended for quick basic configuration
Model/Auth ProviderSelect Skip for now
Filter models by providerSelect All providers
Default model选择 Keep current
Select ChannelIf no suitable option, select Skip for now and configure later
Configure SkillsYes is recommended to enable local utility skills
Preferred node manager for skill installsselect npm
Install missing skill dependenciesselect Skip for now
API Key SettingsSelect No or Skip if not available
Gateway ServiceSelect Install or Reinstall to install Gateway service
How to Hatch Your BotHatch in TUI is recommended for interactive experience

4. Post-Start Configuration

After completing the onboarding process, OpenClaw will automatically start the Gateway service and open the web control page.

Default Access Address

http://127.0.0.1:18789

If the page does not open automatically, you can manually access the above address in your browser.

Configuration File Location

~/.openclaw/openclaw.json

5. LongCat Model Configuration

After startup, you can configure LongCat models by modifying custom configurations.

Configuration Option 1: Modify Configuration File

1. Add Custom Model Provider

Add the models field to openclaw.json:

{
   "models": {
      "mode": "merge",
      "providers": {
         "longCat": {
            "baseUrl": "https://api.longcat.chat/openai",
            "apiKey": "YOUR_API_KEY",
            "api": "openai-completions",
            "authHeader": true,
            "models": [
               {
                  "id": "LongCat-Flash-Chat",
                  "name": "LongCat-Flash-Chat",
                  "reasoning": false,
                  "input": ["text"],
                  "contextWindow": 200000,
                  "maxTokens": 8192,
                  "compat": {
                     "maxTokensField": "max_tokens"
                  }
               }
            ]
         }
      }
   }
}

2. Modify Default Model Settings

Modify the agents field to set the default model:

{
   "agents": {
      "defaults": {
         "model": {
            "primary": "longCat/LongCat-Flash-Chat"
         }
      }
   }
}

Changes take effect immediately after saving.

Configuration Option 2: GUI Interface Configuration

  1. In the web control page, go to Config → Models → Providers
  2. Add the following configuration:
Configuration ItemValue
Apiopenai-completions
Api KeyLongCat's API Key
Base Urlhttps://api.longcat.chat/openai
models - idLongCat model name
models - nameLongCat model name

Complete Configuration Example

{
  "meta": {
    "lastTouchedVersion": "2026.1.24-3",
    "lastTouchedAt": "2026-01-29T02:21:28.058Z"
  },
  "wizard": {
    "lastRunAt": "2026-01-29T02:13:14.153Z",
    "lastRunVersion": "2026.1.24-3",
    "lastRunCommand": "onboard",
    "lastRunMode": "local"
  },
  "auth": {
    "profiles": {
      "anthropic:default": {
        "provider": "anthropic",
        "mode": "api_key"
      }
    }
  },
  "models": {
    "mode": "merge",
    "providers": {
      "longCat": {
        "baseUrl": "https://api.longcat.chat/openai",
        "apiKey": "YOUR_API Key",
        "auth": "api-key",
        "api": "openai-completions",
        "authHeader": true,
        "models": [
          {
            "id": "LongCat-Flash-Chat",
            "name": "LongCat-Flash-Chat",
            "reasoning": false,
            "input": ["text"],
            "contextWindow": 200000,
            "maxTokens": 8192,
            "compat": {
              "maxTokensField": "max_tokens"
            }
          }
        ]
      }
    }
  },
  "agents": {
    "defaults": {
      "model": {
        "primary": "longCat/LongCat-Flash-Chat"
      },
      "workspace": "/Users/xxx/.openclaw/workspace",
      "contextPruning": {
        "mode": "cache-ttl",
        "ttl": "1h"
      },
      "compaction": {
        "mode": "safeguard"
      },
      "heartbeat": {
        "every": "30m"
      },
      "maxConcurrent": 4,
      "subagents": {
        "maxConcurrent": 8
      }
    }
  },
  "messages": {
    "ackReactionScope": "group-mentions"
  },
  "commands": {
    "native": "auto",
    "nativeSkills": "auto"
  },
  "gateway": {
    "port": 18789,
    "mode": "local",
    "bind": "loopback",
    "auth": {
      "mode": "token",
      "token": ""
    },
    "tailscale": {
      "mode": "off",
      "resetOnExit": false
    }
  },
  "skills": {
    "install": {
      "nodeManager": "npm"
    }
  }
}

6. Getting Started

Once the configuration takes effect, you can start using OpenClaw.

  • Open TUI and check Gateway status
openclaw tui
/status
  • Open Web UI and interact on the Chat page
openclaw dashboard

Then enter a test message such as: "Hello, please introduce yourself"

If the configuration is correct, you will receive a response from the LongCat model.

Last Updated: 2/4/26, 10:43 PM
Contributors: wb_changzhe02
Prev
Claude Code Configuration
Next
FAQ