Skip to content

Project introduction

OpenClaw is an open-source self-hosted AI assistant platform that connects messaging apps to AI agents running on your own hardware. It is designed for developers and advanced users who want control over data, deployment, and routing.

OpenClaw is fully open source. This guide covers the practical steps required to connect it to the Dli.li AI OpenAI-compatible endpoint.

Core features

Multi-channel integration

  • Telegram, Discord, WhatsApp, iMessage, and plugin-based extensions
  • Unified gateway process
  • Voice interaction support
  • Interactive canvas UI support

Self-hosting and security

  • Runs on your own hardware
  • Open-source and auditable
  • Context and skills stay local

Agent capabilities

  • Persistent background execution
  • Scheduled tasks
  • Session isolation
  • Multi-agent routing
  • Native tool calling

Before connecting Dli.li AI

Requirements

- Node.js 22 or later - A working compatible endpoint; the official default API is `https://api.dli.li/v1`, and if you want the official backup API directly, use `https://api.dlizz.com/v1` - A working API key

It is recommended to get OpenClaw itself running first, then switch the model provider to Dli.li AI afterward. That makes troubleshooting much easier.

1. Install OpenClaw

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

See the official Getting Started page for other install options.

2. Run onboarding

bash
openclaw onboard --install-daemon

3. Verify gateway and dashboard

bash
openclaw gateway status
bash
openclaw dashboard

4. Find the config file

OpenClaw typically stores its configuration at ~/.openclaw/openclaw.json.

Useful environment variables

You can customize paths with:
  • OPENCLAW_HOME
  • OPENCLAW_STATE_DIR
  • OPENCLAW_CONFIG_PATH

Use Dli.li AI as the provider

OpenClaw supports custom or OpenAI-compatible providers through models.providers. For Dli.li AI, the typical approach is to add a newapi provider and point default models to newapi/model-id.

Integration outline

  1. Declare a newapi provider in models.providers.
  2. Point baseUrl to your endpoint, including /v1.
  3. Set api to openai-completions.
  4. List the models you want to expose.
  5. Point the default model to newapi/....
bash
export NEWAPI_API_KEY="sk-your-newapi-key"

Then update openclaw.json:

json5
{
  models: {
    mode: "merge",
    providers: {
      newapi: {
        baseUrl: "https://api.dli.li/v1",
        apiKey: "${NEWAPI_API_KEY}",
        api: "openai-completions",
        models: [
          { id: "gemini-2.5-flash", name: "Gemini 2.5 Flash" },
          { id: "kimi-k2.5", name: "Kimi K2.5" }
        ]
      }
    }
  },
  agents: {
    defaults: {
      model: {
        primary: "newapi/gemini-2.5-flash",
        fallbacks: ["newapi/kimi-k2.5"]
      },
      models: {
        "newapi/gemini-2.5-flash": { alias: "flash" },
        "newapi/kimi-k2.5": { alias: "kimi" }
      }
    }
  }
}

Key fields

FieldMeaning
models.modeUse merge to keep built-in providers and add newapi
models.providers.newapi.baseUrlYour compatible endpoint, usually ending with /v1; the official default API is https://api.dli.li/v1, and the official backup API is https://api.dlizz.com/v1
models.providers.newapi.apiKeyYour API key, ideally injected from ${NEWAPI_API_KEY}
models.providers.newapi.apiUse openai-completions for a Dli.li AI compatible gateway
models.providers.newapi.modelsModel IDs must match the site-exposed names
agents.defaults.model.primaryDefault model, formatted as provider/model-id
agents.defaults.model.fallbacksFallback models
agents.defaults.modelsOptional aliases for easier reference

Verify the result

Open the dashboard again:

bash
openclaw dashboard

Or list models:

bash
openclaw models list

If you can start a chat and see the newapi/ models in the list, the integration is working.

Common issues

  • Missing /v1 in baseUrl
  • Wrong model IDs
  • API key only exported in the current shell while the gateway runs as a background service
  • Need foreground logs for debugging: openclaw gateway --port 18789