Moonshot AI (Kimi) with OpenClaw

Configure Kimi K2.5 and K2 Thinking — API key

Moonshot AI's Kimi models are supported in OpenClaw for chat and coding. Kimi K2 offers strong long-context performance and reasoning. Get an API key from Moonshot Platform or your region's Kimi API portal.

Models

  • kimi-k2.5 — Recommended for general tasks
  • kimi-k2-thinking — Extended reasoning
  • kimi-k2-thinking-turbo — Faster reasoning
  • kimi-k2-turbo-preview — Lightweight option

Use moonshot/kimi-k2.5 or moonshot/kimi-k2-thinking in your config. Kimi Coding is a separate provider (kimi-coding/) — onboard with kimi-code-api-key if you need it.

Quick Setup

Onboard with the wizard:

Onboard
openclaw onboard --auth-choice moonshot-api-key

API Endpoint

  • International: https://api.moonshot.ai/v1
  • China: https://api.moonshot.cn/v1

Use the correct baseUrl for your API key region. International keys will fail on the .cn endpoint.

Basic Configuration

Example config
{
  "agent": { "model": "moonshot/kimi-k2.5" },
  "models": {
    "providers": {
      "moonshot": {
        "baseUrl": "https://api.moonshot.ai/v1",
        "apiKey": "${MOONSHOT_API_KEY}",
        "api": "openai-completions"
      }
    }
  }
}

Store MOONSHOT_API_KEY in credentials or environment. See Configuration.

Why Moonshot for OpenClaw

  • Long context — Kimi K2 supports large context windows
  • Reasoning — K2 Thinking variants for complex tasks
  • API compatible — OpenAI-style API, easy integration

Related