Skip to main content

Overview

OpenClaw is an open-source AI agent Gateway that acts as a bridge between chat applications and AI agents. Through a centralized Gateway process, it connects chat platforms like Telegram, WhatsApp, and Discord to AI coding agents, enabling direct AI programming interactions within chat windows. By configuring EvoLink API as a custom model provider in OpenClaw and connecting a Telegram Bot, you can use EvoLink’s Claude models (such as Claude 4.6 Opus, Claude 4.5 Sonnet, Claude 4.5 Haiku) for AI-assisted coding conversations directly in Telegram. This guide covers:
  • Installing and configuring OpenClaw Gateway
  • Creating a Telegram Bot and connecting it to OpenClaw
  • Setting up EvoLink API as a custom model provider
  • Verifying the connection and getting started

Prerequisites

Before configuring, make sure you have:

1. Install Node.js

OpenClaw is installed via npm. You need to install Node.js first.
  • Log in to EvoLink Dashboard
  • Find API Keys in the dashboard, click ‘Create New Key’ button, then copy the generated Key
  • API Key usually starts with sk-

3. Prepare a Telegram Account

You will need it to create a Bot and test the integration.

Step 1: Install OpenClaw

Run the following command in your terminal:
npm install -g openclaw@latest

Step 2: Onboarding

Run the onboarding command. OpenClaw will guide you through the initial setup and install the background daemon service:
openclaw onboard --install-daemon

1. Confirm Installation

The system will display a risk disclaimer. Confirm to proceed: Confirm Installation

2. Select Installation Mode

When prompted to choose an installation mode, select Quickstart: Select Quickstart

3. Select Provider

When prompted to choose a model provider, select Skip. We will manually configure EvoLink as a custom provider later: Skip Provider Selection

4. Select Models

When prompted to choose which models to enable, select All: Select All Models

5. Select Default Model

When prompted to choose a default model, select Keep current: Keep Current Model

Step 3: Create Telegram Bot

The onboarding flow will prompt you to select a chat channel. Select Telegram (Bot API).

1. Visit BotFather

Open Telegram and visit @BotFather, then click START BOT to begin: Start BotFather

2. Create Bot

Type /start in the chat. BotFather will reply with a list of available commands: Type /start Type /newbot. Follow the prompt to set a unique Bot username that must end with bot (e.g., my_evolink_bot). Once created, BotFather will return a message containing a Token in this format:
123456789:ABCdefGHIjklMNOpqrsTUVwxyz
Copy and save this Token.

3. Enter Token

Go back to the terminal onboarding flow, paste the Bot Token into the prompt and confirm: Enter Token

4. Restart Gateway

After entering the Token, restart the Gateway to apply the configuration: Restart Gateway

1. Locate Config File

Locate the openclaw.json configuration file in the OpenClaw installation directory and open it for editing: Locate Config File

2. Configure Model Provider

In openclaw.json, find the models field and add EvoLink as a custom model provider:
"models": {
  "providers": {
    "anthropic": {
      "api": "anthropic-messages",
      "baseUrl": "https://code.evolink.ai",
      "apiKey": "your-evolink-api-key",
      "models": [
        {
          "id": "claude-opus-4-6",
          "name": "Claude Opus 4.6",
          "reasoning": false,
          "input": ["text"],
          "cost": {
            "input": 0,
            "output": 0,
            "cacheRead": 0,
            "cacheWrite": 0
          },
          "contextWindow": 200000,
          "maxTokens": 8192
        }
      ]
    }
  }
}
Replace "your-evolink-api-key" with the actual API Key from your EvoLink Dashboard.
Configure Model

3. Configure Default Model

In the agents field, set model.primary to the EvoLink model you just added:
"model": {
  "primary": "anthropic/claude-opus-4-6"
}
Configure Default Model

4. Verify Telegram Configuration

Verify the Telegram configuration in the channels field. The botToken was automatically filled in during the onboarding flow and does not need to be changed:
"channels": {
  "telegram": {
    "enabled": true,
    "botToken": "your-bot-token (auto-filled)",
    "dmPolicy": "pairing",
    "groups": { "*": { "requireMention": true } }
  }
}
  • enabled: Enable the Telegram channel
  • dmPolicy: Set to "pairing", unauthorized users must verify via pairing code when sending DMs
  • groups: "*" allows all groups, requireMention set to true means the Bot only responds when @mentioned in groups
Telegram Configuration

Step 5: Verify Connection

1. Visit Your Bot

Search for the Bot username you just created in Telegram and open the chat: Visit Bot

2. Get Pairing Code

Send /start to the Bot. It will return a pairing code: Get Pairing Code

3. Complete Pairing

Open a new terminal window and run the following command to complete pairing:
openclaw pairing approve telegram <pairing-code>
Replace <pairing-code> with the actual code returned by the Bot. Make sure to remove the angle brackets <>.
Complete Pairing

4. Test Connection

Go back to the original terminal window and type the following to test if the connection is working:
Wake up, my friend!
Test Connection Once pairing is complete, sending messages to the Bot in Telegram will also receive AI responses, confirming the integration is successful.