Project introduction
- Official website: https://openclaw.ai
- Docs: https://docs.openclaw.ai
- GitHub: https://github.com/openclaw/openclaw
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
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
curl -fsSL https://openclaw.ai/install.sh | bashSee the official Getting Started page for other install options.
2. Run onboarding
openclaw onboard --install-daemon3. Verify gateway and dashboard
openclaw gateway statusopenclaw dashboard4. Find the config file
OpenClaw typically stores its configuration at ~/.openclaw/openclaw.json.
Useful environment variables
OPENCLAW_HOMEOPENCLAW_STATE_DIROPENCLAW_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
- Declare a
newapiprovider inmodels.providers. - Point
baseUrlto your endpoint, including/v1. - Set
apitoopenai-completions. - List the models you want to expose.
- Point the default model to
newapi/....
Recommended: store the key in an environment variable
export NEWAPI_API_KEY="sk-your-newapi-key"Then update openclaw.json:
{
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
| Field | Meaning |
|---|---|
models.mode | Use merge to keep built-in providers and add newapi |
models.providers.newapi.baseUrl | Your 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.apiKey | Your API key, ideally injected from ${NEWAPI_API_KEY} |
models.providers.newapi.api | Use openai-completions for a Dli.li AI compatible gateway |
models.providers.newapi.models | Model IDs must match the site-exposed names |
agents.defaults.model.primary | Default model, formatted as provider/model-id |
agents.defaults.model.fallbacks | Fallback models |
agents.defaults.models | Optional aliases for easier reference |
Verify the result
Open the dashboard again:
openclaw dashboardOr list models:
openclaw models listIf you can start a chat and see the newapi/ models in the list, the integration is working.
Common issues
- Missing
/v1inbaseUrl - 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
