> ## Documentation Index
> Fetch the complete documentation index at: https://docs2.openclaw.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Kimi 搜尋

Kimi 是由 Moonshot 原生網頁搜尋支援的 `web_search` 提供者。Moonshot
會整合出一個附有行內引用的答案，類似 Gemini 與 Grok 的
有依據回應提供者，而非傳回排序後的結果清單。

## 設定

<Steps>
  <Step title="建立金鑰">
    從 [Moonshot AI](https://platform.moonshot.cn/) 取得 API 金鑰。
  </Step>

  <Step title="儲存金鑰">
    在閘道環境中設定 `KIMI_API_KEY` 或 `MOONSHOT_API_KEY`（若為
    閘道安裝，請將其加入 `~/.openclaw/.env`），或透過下列方式設定：

    ```bash theme={"theme":{"light":"min-light","dark":"min-dark"}}
    openclaw configure --section web
    ```
  </Step>
</Steps>

在 `openclaw onboard` 或 `openclaw configure --section web` 期間選擇 **Kimi**
時，也會提示設定：

* Moonshot API 區域：`https://api.moonshot.ai/v1` 或 `https://api.moonshot.cn/v1`
* 網頁搜尋模型（預設為 `kimi-k2.6`）

## 設定

```json5 theme={"theme":{"light":"min-light","dark":"min-dark"}}
{
  plugins: {
    entries: {
      moonshot: {
        config: {
          webSearch: {
            apiKey: "sk-...", // 若已設定 KIMI_API_KEY 或 MOONSHOT_API_KEY，則為選填
            baseUrl: "https://api.moonshot.ai/v1",
            model: "kimi-k2.6",
          },
        },
      },
    },
  },
  tools: {
    web: {
      search: {
        provider: "kimi",
      },
    },
  },
}
```

若省略 `tools.web.search.provider`，系統會依可用的 API 金鑰自動偵測；
若設定了多組搜尋認證資訊，請將其明確設為 `kimi`。

請在 `plugins.entries.moonshot.config.webSearch` 下設定 Kimi 專用的 `apiKey`、`baseUrl` 和 `model` 值。

預設值：省略 `baseUrl` 時，預設為 `https://api.moonshot.ai/v1`；`model`
預設為 `kimi-k2.6`。

若聊天流量使用中國主機（`models.providers.moonshot.baseUrl`：
`https://api.moonshot.cn/v1`），當 Kimi 自身的 `baseUrl` 未設定時，
其 `web_search` 會自動沿用該主機，避免 `.cn` 金鑰意外存取
國際端點（該端點會對這些金鑰傳回 HTTP 401）。若要覆寫此繼承行為，
請明確設定 Kimi 的 `baseUrl`。

## 依據要求

只有當 Moonshot 的回應包含原生網頁搜尋依據證據時，例如
`$web_search` 工具呼叫重播、`search_results` 或引用 URL，
OpenClaw 才會傳回 Kimi 的 `web_search` 結果。若 Kimi 在沒有
依據的情況下直接回答（例如「我無法瀏覽網際網路」），OpenClaw 會傳回
`kimi_web_search_ungrounded` 錯誤，而不會將該文字視為搜尋結果。請重試查詢、
改用 Brave 等結構化提供者，或在已有目標 URL 時使用
`web_fetch`／瀏覽器工具。

## 工具參數

| 參數                                                          | 支援情況                                           |
| ----------------------------------------------------------- | ---------------------------------------------- |
| `query`                                                     | 是                                              |
| `count`                                                     | 為跨提供者相容性而接受，但會忽略：Kimi 一律傳回一個整合答案，而非包含 N 個結果的清單 |
| `country`、`language`、`freshness`、`date_after`、`date_before` | 否                                              |

## 相關內容

* [網頁搜尋概覽](/zh-TW/tools/web) - 所有提供者與自動偵測
* [Moonshot AI](/zh-TW/providers/moonshot) - Moonshot 模型與 Kimi Coding 提供者文件
* [Gemini 搜尋](/zh-TW/tools/gemini-search) - 透過 Google 依據產生的 AI 整合答案
* [Grok 搜尋](/zh-TW/tools/grok-search) - 透過 xAI 依據產生的 AI 整合答案
