88API88API
User GuideAI ApplicationsAPI ReferenceHelp & Support

OpenClaw - Self-hosted AI Assistant Platform

OpenClaw Tutorial — Install OpenClaw, integrate 88API, and quickly set up a self-hosted AI assistant. Open-source project, supporting multi-channel integration like Telegram, Discord, WhatsApp.

Project Introduction

OpenClaw is an open-source, self-hosted personal AI assistant platform that connects messaging apps to AI agents running on your own hardware. Designed for developers and advanced users, it allows you to have an autonomous AI assistant without giving up control of your data.

OpenClaw is completely open-source. You can browse the source code, submit issues, or contribute on OpenClaw's GitHub repository. This tutorial covers the complete steps for installing, configuring, and integrating OpenClaw with 88API.

🌟 Core Features

Multi-channel Integration

  • Multi-channel Integration: Supports various messaging channels like Telegram, Discord, WhatsApp, iMessage, and can be extended to more platforms via plugins.
  • Single Gateway: Unified management of all channels through a single Gateway process.
  • Voice Support: Supports macOS/iOS/Android voice interaction.
  • Canvas Interface: Can render interactive Canvas interfaces.

Self-hosting and Data Security

  • Fully Self-hosted: Runs on your own machine or server.
  • Open Source Transparency: MIT open-source license, completely transparent code.
  • Local Data: Context and skills are stored on your local computer, not in the cloud.

Intelligent Agent Capabilities

  • Continuous Operation: Supports persistent background operation with long-term memory.
  • Scheduled Tasks: Supports cron scheduled tasks.
  • Session Isolation: Isolates sessions by agent/workspace/sender.
  • Multi-agent Routing: Supports collaborative work among multiple agents.
  • Tool Calling: Native support for tool calling and code execution.

📦 Preparation Before Integration

Preparation Information

  • Node.js 24.16+ or 26.1+ (Node 26 is officially recommended; Node 22, 23 and 25 are not supported. The official installer script sets up Node automatically)
  • 88API endpoint: https://api.88api.ai/v1
  • An API Key created in the 88API console
  • Keep your API Key safe and do not paste it into apps or pages from unknown sources.

Before integrating 88API, it's recommended to first get the Gateway and Control UI running according to OpenClaw's official current recommended process. This makes it easier to distinguish whether OpenClaw itself is not starting or if the model provider configuration is incorrect when troubleshooting later.

1. Install OpenClaw

macOS/Linux:

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

Windows (PowerShell):

iwr -useb https://openclaw.ai/install.ps1 | iex

For other installation methods, refer to the OpenClaw official documentation: Getting Started.

2. Run the Onboarding Wizard

openclaw onboard --install-daemon

This wizard will complete basic authentication, Gateway setup, and optional channel initialization. The goal here is to get OpenClaw running first, then switch the default model to 88API later.

The official installer starts this wizard automatically when it finishes; if you already completed the wizard during installation, you can skip this step. The wizard requires a working model before it can finish. If you only have an 88API key, choose More… → Custom Provider in the model provider list: set Base URL to https://api.88api.ai/v1 (it must include /v1), keep Compatibility at the default openai, set Model ID to gpt-6.1-sol, and paste your 88API key. The wizard sends a real request and saves only after it succeeds. The provider it creates is named something like custom-api-88api-ai and can coexist with the api88 provider added manually below.

Do not choose Skip for now: it exits without starting the Gateway, so the checks in the next step will fail.

3. Check Gateway and Control UI

openclaw gateway status
openclaw dashboard

If the browser can open the Control UI, it means OpenClaw's basic operation is normal. At this stage, there's no need to configure Telegram, Discord, Feishu, or other messaging channels yet.

4. Locate the Configuration File

OpenClaw's configuration file is usually located at ~/.openclaw/openclaw.json. You can continue to modify it based on what the onboarding wizard generated.

Path-related Environment Variables

If you run OpenClaw under a dedicated service account, or wish to customize the configuration/state directory, you can use:

  • OPENCLAW_HOME
  • OPENCLAW_STATE_DIR
  • OPENCLAW_CONFIG_PATH

For detailed instructions, see the official environment variables documentation: Environment Variables.

🚀 Using 88API as a Model Provider

OpenClaw supports integrating custom or OpenAI-compatible model gateways via models.providers. For 88API, the most common approach is to add it as a custom provider to the configuration, then point the default model to api88/model-ID.

Integration Approach

  1. Declare an api88 provider under models.providers.
  2. Set baseUrl to https://api.88api.ai/v1 (it must include /v1).
  3. Set api to openai-completions.
  4. List the model IDs you want OpenClaw to use in models.
  5. Switch the default model in agents.defaults.model.primary to api88/....

When the Gateway runs as a background service (--install-daemon in step 2), it cannot see variables you export in a terminal. Write the key to OpenClaw's officially recommended global environment file ~/.openclaw/.env (or the .env in OPENCLAW_STATE_DIR if you set it), then restart the Gateway:

macOS/Linux:

echo 'API88_API_KEY=sk-your-88api-key' >> ~/.openclaw/.env
openclaw gateway restart

Windows (PowerShell):

Add-Content -Path "$HOME\.openclaw\.env" -Value 'API88_API_KEY=sk-your-88api-key' -Encoding ascii
openclaw gateway restart

Then, add or modify the following snippet in openclaw.json:

{
  models: {
    mode: "merge",
    providers: {
      api88: {
        baseUrl: "https://api.88api.ai/v1",
        apiKey: "${API88_API_KEY}",
        api: "openai-completions",
        models: [
          { id: "gemini-3.5-flash", name: "Gemini 3.5 Flash" },
          { id: "kimi-k3", name: "Kimi K3" },
        ],
      },
    },
  },

  agents: {
    defaults: {
      model: {
        primary: "api88/gemini-3.5-flash",
        fallbacks: ["api88/kimi-k3"],
      },
      models: {
        "api88/gemini-3.5-flash": { alias: "flash" },
        "api88/kimi-k3": { alias: "kimi" },
      },
    },
  },
}

This is not a complete configuration that must be copied exactly, but rather the most critical part for integrating 88API. As long as the provider, model IDs, and default model references are correct, OpenClaw will be able to call the corresponding models through 88API.

Key Configuration Details

Configuration ItemDescription
models.modeRecommended to set to merge, appending api88 while retaining OpenClaw's built-in providers
models.providers.api88.baseUrlThe 88API endpoint https://api.88api.ai/v1; it must include /v1
models.providers.api88.apiKey88API key, recommended to inject via ${API88_API_KEY}
models.providers.api88.apiFor OpenAI-compatible gateways like 88API, use openai-completions
models.providers.api88.modelsThe model IDs listed here must match the model names actually offered by 88API
agents.defaults.model.primaryDefault primary model, format must be provider/model-id
agents.defaults.model.fallbacksList of fallback models, automatically switches if the primary model fails
agents.defaults.modelsOptional, used to create aliases for models, convenient for referencing in UI or sessions

Verify Successful Integration

After completing the configuration, return to the Control UI or reopen it:

openclaw dashboard

If you can initiate conversations normally in OpenClaw and the default model has become api88/..., then the integration is successful. You can also use:

openclaw models list

to confirm that models with the api88/ prefix appear in the selectable list.

Common Issues

  • baseUrl missing /v1: This is one of the most common integration errors.
  • Incorrect model ID: primary and fallbacks must correspond to the id in models.providers.api88.models.
  • API key only effective in the current terminal: the background service does not inherit variables exported in a terminal. Write the key to ~/.openclaw/.env, then run openclaw gateway restart.
  • For foreground troubleshooting: Use the official foreground running method openclaw gateway --port 18789 to observe logs and errors.