TopRank Skills

Home / Claw Skills / API 集成 / kimi-integration
Official OpenClaw rules 36%

kimi-integration

Step-by-step guide for integrating Moonshot AI (Kimi) and Kimi Code models into Clawdbot. Use when someone asks how to add Kimi models, configure Moonshot AI, or set up Kimi for Coding in Clawdbot.

Stars

0

Installs

0

Status

ACTIVE

Visibility

PUBLIC

安装方式

直接复制以下提示词,发送给你的 AI 助手即可完成安装。

请先检查是否已安装 SkillHub 商店,若未安装,请根据 https://skillhub-1388575217.cos.ap-guangzhou.myqcloud.com/install/skillhub.md 安装 SkillHub 商店,然后安装 kimi-integration 技能。 若已安装,则直接安装 kimi-integration 技能。

Overview

Skill Key
evgyur/kimi-integration
Author
evgyur
Source Repo
openclaw/skills
Version
-
Source Path
skills/evgyur/kimi-integration
Latest Commit SHA
819aa817cfcd76e448c4f399459902b781510869

Extracted Content

SKILL.md excerpt

# Kimi Model Integration

Complete guide for adding Moonshot AI (Kimi) and Kimi Code models to Clawdbot.

## Overview

Kimi offers two separate model families:

1. **Moonshot AI (Kimi K2)** - General-purpose models via OpenAI-compatible API
2. **Kimi Code** - Specialized coding model with dedicated endpoint

Both require API keys from different sources.

## Prerequisites

- Clawdbot installed and configured
- API keys (see Getting API Keys section)

## Getting API Keys

### Moonshot AI (Kimi K2)

1. Visit https://platform.moonshot.cn
2. Register an account
3. Navigate to API Keys section
4. Create a new API key
5. Copy the key (starts with `sk-...`)

### Kimi Code

1. Visit https://api.kimi.com/coding
2. Register an account  
3. Navigate to API Keys section
4. Create a new API key
5. Copy the key (starts with `sk-...`)

**Note:** Moonshot and Kimi Code use separate keys and endpoints.

## Integration Steps

### Option 1: Moonshot AI (Kimi K2 models)

#### Step 1: Set environment variable

```bash
export MOONSHOT_API_KEY="sk-your-moonshot-key-here"
```

Or add to `.env` file:

```bash
echo 'MOONSHOT_API_KEY="sk-your-moonshot-key-here"' >> ~/.env
```

#### Step 2: Add provider configuration

Edit your `clawdbot.json` config:

```json5
{
  "agents": {
    "defaults": {
      "model": {
        "primary": "moonshot/kimi-k2.5"
      }
    }
  },
  "models": {
    "mode": "merge",
    "providers": {
      "moonshot": {
        "baseUrl": "https://api.moonshot.cn/v1",
        "apiKey": "${MOONSHOT_API_KEY}",
        "api": "openai-completions",
        "models": [
          {
            "id": "moonlight-v1-32k",
            "name": "Moonlight V1 32K",
            "contextWindow": 32768
          },
          {
            "id": "moonshot-v1-8k",
            "name": "Moonshot V1 8K",
            "contextWindow": 8192
          },
          {
            "id": "moonshot-v1-32k",
            "name": "Moonshot V1 32K",
            "contextWindow": 32768
          },...

README excerpt

# Kimi Integration for Clawdbot

Complete integration guide for adding Moonshot AI (Kimi K2.5) and Kimi Code models to Clawdbot.

## Overview

This skill provides step-by-step instructions for integrating two Kimi model families:

- **Moonshot AI (Kimi K2.5)** - General-purpose models with 200K context window
- **Kimi Code** - Specialized coding model optimized for programming tasks

Both providers use separate API keys and endpoints.

## Installation

```bash
clawdbot skills install kimi-integration.skill
```

Or manually install by placing the skill folder in your Clawdbot skills directory.

## Quick Start

### 1. Get API Keys

- **Moonshot AI**: https://platform.moonshot.cn
- **Kimi Code**: https://api.kimi.com/coding

### 2. Set Environment Variables

```bash
export MOONSHOT_API_KEY="sk-your-moonshot-key"
export KIMICODE_API_KEY="sk-your-kimicode-key"
```

### 3. Configure Clawdbot

Add to your `clawdbot.json`:

```json
{
  "agents": {
    "defaults": {
      "model": {
        "primary": "moonshot/kimi-k2.5"
      }
    }
  },
  "models": {
    "mode": "merge",
    "providers": {
      "moonshot": {
        "baseUrl": "https://api.moonshot.cn/v1",
        "apiKey": "${MOONSHOT_API_KEY}",
        "api": "openai-completions",
        "models": [
          { "id": "kimi-k2.5", "name": "Kimi K2.5", "contextWindow": 200000 }
        ]
      }
    }
  }
}
```

### 4. Restart and Verify

```bash
clawdbot gateway restart
clawdbot models list
```

## Features

- ✅ Complete configuration examples for both providers
- ✅ Multi-model setup with failover support
- ✅ Model aliases for quick switching
- ✅ API connection test script
- ✅ Troubleshooting guide
- ✅ Cost and context window specifications

## Available Models

### Moonshot AI

| Model | Context Window | Max Output | Use Case |
|-------|----------------|------------|----------|
| `kimi-k2.5` | 200K | 8K | General purpose, large context |
| `moonshot-v1-128k` | 128K | 16K | Legacy model |
| `moonshot-v1-32k` | 3...

Related Claw Skills