skills$openclaw/kimi-integration
evgyur8.2k

by evgyur

kimi-integration – OpenClaw Skill

kimi-integration is an OpenClaw Skills integration for coding workflows. 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.

8.2k stars2.1k forksSecurity L1
Updated Feb 7, 2026Created Feb 7, 2026coding

Skill Snapshot

namekimi-integration
descriptionStep-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. OpenClaw Skills integration.
ownerevgyur
repositoryevgyur/kimi-integration
languageMarkdown
licenseMIT
topics
securityL1
installopenclaw add @evgyur/kimi-integration
last updatedFeb 7, 2026

Maintainer

evgyur

evgyur

Maintains kimi-integration in the OpenClaw Skills directory.

View GitHub profile
File Explorer
7 files
.
references
config-examples.md
5.7 KB
scripts
test_kimi_connection.sh
1.9 KB
_meta.json
284 B
README.md
3.8 KB
SKILL.md
6.3 KB
SKILL.md

name: kimi-integration description: 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.

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
export MOONSHOT_API_KEY="sk-your-moonshot-key-here"

Or add to .env file:

echo 'MOONSHOT_API_KEY="sk-your-moonshot-key-here"' >> ~/.env
Step 2: Add provider configuration

Edit your clawdbot.json config:

{
  "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
          },
          {
            "id": "moonshot-v1-128k",
            "name": "Moonshot V1 128K",
            "contextWindow": 131072
          },
          {
            "id": "kimi-k2.5",
            "name": "Kimi K2.5",
            "contextWindow": 200000
          }
        ]
      }
    }
  }
}
Step 3: Restart Clawdbot
clawdbot gateway restart
Step 4: Verify integration
clawdbot models list

You should see Moonshot models in the list.

Step 5: Use the model

Set as default:

clawdbot models set moonshot/kimi-k2.5

Or use model aliases in chat:

/model moonshot/kimi-k2.5

Option 2: Kimi Code (specialized coding model)

Step 1: Set environment variable
export KIMICODE_API_KEY="sk-your-kimicode-key-here"

Or add to .env:

echo 'KIMICODE_API_KEY="sk-your-kimicode-key-here"' >> ~/.env
Step 2: Add provider configuration

Edit your clawdbot.json config:

{
  "agents": {
    "defaults": {
      "model": {
        "primary": "kimicode/kimi-for-coding"
      },
      "models": {
        "kimicode/kimi-for-coding": {
          "alias": "kimi"
        }
      }
    }
  },
  "models": {
    "mode": "merge",
    "providers": {
      "kimicode": {
        "baseUrl": "https://api.kimi.com/coding/v1",
        "apiKey": "${KIMICODE_API_KEY}",
        "api": "openai-completions",
        "models": [
          {
            "id": "kimi-for-coding",
            "name": "Kimi For Coding",
            "contextWindow": 200000,
            "maxTokens": 8192
          }
        ]
      }
    }
  }
}
Step 3: Restart Clawdbot
clawdbot gateway restart
Step 4: Verify integration
clawdbot models list

You should see kimicode/kimi-for-coding in the list.

Step 5: Use the model

Set as default:

clawdbot models set kimicode/kimi-for-coding

Or use model alias in chat:

/model kimi

Using Both Providers

You can configure both Moonshot and Kimi Code simultaneously:

{
  "agents": {
    "defaults": {
      "model": {
        "primary": "moonshot/kimi-k2.5"
      },
      "models": {
        "kimicode/kimi-for-coding": {
          "alias": "kimi"
        },
        "moonshot/kimi-k2.5": {
          "alias": "k25"
        }
      }
    }
  },
  "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 }
        ]
      },
      "kimicode": {
        "baseUrl": "https://api.kimi.com/coding/v1",
        "apiKey": "${KIMICODE_API_KEY}",
        "api": "openai-completions",
        "models": [
          { "id": "kimi-for-coding", "name": "Kimi For Coding", "contextWindow": 200000 }
        ]
      }
    }
  }
}

Switch between models using aliases:

  • /model k25 - Kimi K2.5 (general)
  • /model kimi - Kimi for Coding (specialized)

Troubleshooting

Model not appearing in list

Check config syntax:

clawdbot gateway config.get | grep -A 20 moonshot

Verify API key is set:

echo $MOONSHOT_API_KEY
echo $KIMICODE_API_KEY

Authentication errors

  • Verify API key starts with sk-
  • Check key is valid on provider dashboard
  • Ensure correct base URL for each provider

Connection issues

Test API endpoint directly:

curl -X POST "https://api.moonshot.cn/v1/chat/completions" \
  -H "Authorization: Bearer $MOONSHOT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model": "kimi-k2.5", "messages": [{"role": "user", "content": "test"}]}'

Model Recommendations

  • Kimi K2.5 (moonshot/kimi-k2.5) - Best for general tasks, 200K context
  • Kimi for Coding (kimicode/kimi-for-coding) - Specialized for code generation
  • Moonshot V1 128K (moonshot/moonshot-v1-128k) - Legacy model, 128K context

References

README.md

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

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

2. Set Environment Variables

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

3. Configure Clawdbot

Add to your clawdbot.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

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

ModelContext WindowMax OutputUse Case
kimi-k2.5200K8KGeneral purpose, large context
moonshot-v1-128k128K16KLegacy model
moonshot-v1-32k32K8KStandard tasks
moonshot-v1-8k8K2KQuick responses

Kimi Code

ModelContext WindowMax OutputUse Case
kimi-for-coding200K8KCode generation & analysis

Usage Examples

Switch models in chat

/model moonshot/kimi-k2.5
/model kimicode/kimi-for-coding

Use model aliases

/model k25    # Kimi K2.5
/model kimi   # Kimi for Coding

Set as default

clawdbot models set moonshot/kimi-k2.5

Testing

Run the connection test script:

bash scripts/test_kimi_connection.sh

This verifies:

  • API keys are set correctly
  • Endpoints are accessible
  • Authentication works

Documentation

  • SKILL.md - Complete integration guide with step-by-step instructions
  • references/config-examples.md - Ready-to-use configuration snippets
  • scripts/test_kimi_connection.sh - API connection tester

Troubleshooting

Models not showing in list

# Check config syntax
clawdbot gateway config.get | grep -A 20 moonshot

# Verify API keys
echo $MOONSHOT_API_KEY
echo $KIMICODE_API_KEY

Authentication errors

  • Ensure API key starts with sk-
  • Verify key is valid on provider dashboard
  • Check correct base URL for each provider

Connection issues

Test endpoint directly:

curl -X POST "https://api.moonshot.cn/v1/chat/completions" \
  -H "Authorization: Bearer $MOONSHOT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model": "kimi-k2.5", "messages": [{"role": "user", "content": "test"}]}'

Resources

Contributing

Found an issue or have suggestions? Open an issue or submit a pull request!

License

MIT

Permissions & Security

Security level L1: Low-risk skills with minimal permissions. Review inputs and outputs before running in production.

Requirements

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

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 }, { "id": "moonshot-v1-128k", "name": "Moonshot V1 128K", "contextWindow": 131072 }, { "id": "kimi-k2.5", "name": "Kimi K2.5", "contextWindow": 200000 } ] } } } } ```

FAQ

How do I install kimi-integration?

Run openclaw add @evgyur/kimi-integration in your terminal. This installs kimi-integration into your OpenClaw Skills catalog.

Does this skill run locally or in the cloud?

OpenClaw Skills execute locally by default. Review the SKILL.md and permissions before running any skill.

Where can I verify the source code?

The source repository is available at https://github.com/openclaw/skills/tree/main/skills/evgyur/kimi-integration. Review commits and README documentation before installing.