Kimi Search: Moonshot Web Search Provider Setup and Configuration

This page explains how to set up and configure Kimi, a web search provider powered by Moonshot's native web search. It covers obtaining an API key, storing credentials, and configuring the provider for use with OpenClaw.

Read this when

  • You want to use Kimi for web_search
  • You need a KIMI_API_KEY or MOONSHOT_API_KEY

Kimi is a web_search provider powered by Moonshot's native web search capability. Instead of delivering a ranked list of results, Moonshot produces a single response with inline citations, much like the grounded-response providers from Gemini and Grok.

Setup

Create a key

To obtain an API key, visit Moonshot AI.

Store the key

Configure the Gateway environment by setting KIMI_API_KEY or MOONSHOT_API_KEY (for a gateway installation, append it to ~/.openclaw/.env), or apply the following configuration:

openclaw configure --section web

When you select Kimi during openclaw onboard or openclaw configure --section web, you will also be asked for:

  • the Moonshot API region: https://api.moonshot.ai/v1 or https://api.moonshot.cn/v1
  • the web-search model (kimi-k2.6 is the default)

Config

{
  plugins: {
    entries: {
      moonshot: {
        config: {
          webSearch: {
            apiKey: "sk-...", // optional if KIMI_API_KEY or MOONSHOT_API_KEY is set
            baseUrl: "https://api.moonshot.ai/v1",
            model: "kimi-k2.6",
          },
        },
      },
    },
  },
  tools: {
    web: {
      search: {
        provider: "kimi",
      },
    },
  },
}

If omitted, tools.web.search.provider is detected automatically from the available API keys. When multiple search credentials are configured, set it to kimi explicitly.

Under plugins.entries.moonshot.config.webSearch, define Kimi-specific values for apiKey, baseUrl, and model.

Defaults: when left out, baseUrl uses https://api.moonshot.ai/v1 and model uses kimi-k2.6.

When chat traffic goes through the China host (models.providers.moonshot.baseUrl: https://api.moonshot.cn/v1), Kimi web_search automatically reuses that host if its own baseUrl is not set. This prevents .cn keys from accidentally reaching the international endpoint, which returns HTTP 401 for those keys. To override this inheritance, set an explicit Kimi baseUrl.

Grounding requirement

OpenClaw only provides a Kimi web_search result when Moonshot's response contains native web-search grounding evidence, such as a $web_search tool-call replay, search_results, or citation URLs. If Kimi responds directly without any grounding (for instance, "I cannot browse the internet"), OpenClaw returns a kimi_web_search_ungrounded error rather than treating that text as a search result. In that case, retry the query, switch to a structured provider like Brave, or use web_fetch or the browser tool if you already have a target URL.

Tool parameters

ParameterSupported
queryYes
countAccepted for cross-provider compatibility but ignored: Kimi always returns one synthesized answer, not an N-result list
country, language, freshness, date_after, date_beforeNo
425 words · updated Jul 27, 2026