Kimi Code API Integration for Openclaw

A specialized integration guide and configuration skill to run Kimi K2.5 as a drop-in replacement for Anthropic models in OpenClaw and Claude Code.

jack-yang-ai
v2.0.0
Mar 24, 2026
0
921
0

Install & Download

1. ClawHub CLI

The fastest way to install a skill directly from the registry.

npx clawhub@latest install kimi-code-api

2. Manual Installation

Copy the skill folder to one of these locations

Global
~/.openclaw/skills/
Workspace
<project>/skills/

Priority: Workspace > Local > Bundled

3. Prompt Installation

Copy this prompt to OpenClaw to install it automatically.

Help me install kimi-code-api using Clawhub. If Clawhub is not installed, install it first (npm i -g clawhub).

Prefer to download?

Get the raw skill files in a ZIP archive.

What is Kimi Code API Integration?

The Kimi Code API skill enables developers to leverage Kimi K2.5 (Kimi Code) as their primary coding model within the Openclaw Skills ecosystem. Because Kimi Code is built to be compatible with the Anthropic Messages API, it serves as a powerful, cost-effective alternative for high-performance coding tasks.

By simply swapping the base URL and providing a Kimi API key, users can power their Openclaw Skills agents or the Claude Code CLI with Kimi's advanced reasoning capabilities. This skill provides the exact configuration parameters needed to bridge these environments seamlessly.

Kimi Code API Integration Use Cases

  • Replacing expensive models with Kimi K2.5 for large-scale refactoring tasks in Openclaw Skills.
  • Running the Claude Code CLI using Kimi as the backend provider.
  • Setting up multi-agent workflows where Kimi handles specific coding sub-tasks.
  • Reducing latency and costs for iterative development within the Openclaw Skills framework.

How Kimi Code API Integration Works

  1. The user generates a Kimi-specific API key (sk-kimi-...) via the Kimi Code Console.
  2. The Openclaw Skills configuration is updated to define a new provider using the anthropic type but pointing to the Kimi base URL.
  3. Requests made by the AI agent are routed to https://api.kimi.com/coding/v1/messages.
  4. Kimi processes the coding prompt and returns a response in the standard Anthropic format.
  5. The agent or CLI interprets the response as if it came from a native Anthropic model, executing the code changes locally.

Kimi Code API Integration Setup

To get started with Kimi Code in Openclaw Skills, obtain your key from the Kimi Console and update your openclaw.json:

{
  "id": "kimi",
  "type": "anthropic",
  "baseUrl": "https://api.kimi.com/coding",
  "apiKey": "sk-kimi-..."
}

For Claude Code CLI usage, export the environment variables before running your commands:

export ANTHROPIC_BASE_URL="https://api.kimi.com/coding"
export ANTHROPIC_API_KEY="sk-kimi-..."
claude

Kimi Code API Integration Data Schema & Taxonomy

Kimi Code organizes its interactions via the Anthropic Messages protocol. Below is the metadata taxonomy for Openclaw Skills integration:

Property Value Note
Protocol Anthropic Messages Ensures compatibility with Openclaw Skills
Request Model kimi-k2.5 Used in the API payload
Response Model kimi-for-coding Returned in the JSON response
Base URL [https://api.kimi.com/coding](https://api.kimi.com/coding) The entry point for all requests

Kimi Code API Integration Advanced Features

  • Support for OpenClaw sessions_spawn to launch localized ACP sessions powered by Kimi.
  • Full streaming support (SSE) for real-time code generation within Openclaw Skills.
  • Environment variable injection for seamless CLI transitions.
  • Compatible with Anthropic-version: 2023-06-01 headers for high-fidelity tool use.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*