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

# Moonshot (Kimi)

> Connect WednesdayAI to Moonshot AI — developers of the Kimi model series.

# Moonshot (Kimi)

Moonshot AI develops the Kimi model series, known for long-context capabilities. WednesdayAI supports Moonshot's cloud API.

## Prerequisites

Create an API key at [platform.moonshot.cn](https://platform.moonshot.cn) (China mainland) or [platform.moonshot.ai](https://platform.moonshot.ai) (international) and set it on the gateway host:

```bash theme={"dark"}
echo 'MOONSHOT_API_KEY=your-key-here' >> ~/.openclaw/.env
```

## Configuration

```json5 theme={"dark"}
{
  models: {
    providers: {
      moonshot: {
        apiKey: "MOONSHOT_API_KEY", // references the env var
        models: [
          "kimi-k2.5",
          "kimi-k2-0905-preview",
          "kimi-k2-turbo-preview",
          "kimi-k2-thinking",
          "kimi-k2-thinking-turbo",
        ],
      },
    },
  },
}
```

<Note>
  `apiKey` is the name of the environment variable, not the key value itself. Keep secrets in `.env`, not in committed config files.
</Note>

<Note>
  **Regional endpoints:** use `baseUrl: "https://api.moonshot.ai/v1"` for international access, or `baseUrl: "https://api.moonshot.cn/v1"` for China mainland. If omitted, the default endpoint is used — set `baseUrl` explicitly if you are routing to a specific region.
</Note>

## Selecting a model

```json5 theme={"dark"}
{
  agents: {
    defaults: {
      model: { primary: "moonshot/kimi-k2.5" },
    },
  },
}
```

| Model                    | Notes                                          |
| ------------------------ | ---------------------------------------------- |
| `kimi-k2.5`              | Current flagship — strong coding and reasoning |
| `kimi-k2-0905-preview`   | Dated preview snapshot of K2                   |
| `kimi-k2-turbo-preview`  | Faster, lower-cost K2 variant                  |
| `kimi-k2-thinking`       | Extended thinking / chain-of-thought mode      |
| `kimi-k2-thinking-turbo` | Thinking mode — faster variant                 |

Run `openclaw models list --provider moonshot` for the full current catalog.

## Extended reasoning (thinking mode)

Kimi models support native extended reasoning. Enable it by adding `thinking` to the provider config:

```json5 theme={"dark"}
{
  models: {
    providers: {
      moonshot: {
        apiKey: "MOONSHOT_API_KEY",
        thinking: { type: "enabled" },
        models: [
          "kimi-k2-thinking",
          "kimi-k2-thinking-turbo",
        ],
      },
    },
  },
}
```

<Note>
  Thinking mode is most effective with the `kimi-k2-thinking` and `kimi-k2-thinking-turbo` model variants, which are tuned for chain-of-thought generation.
</Note>

## kimi-coding variant

`kimi-coding` is a distinct provider variant with a separate endpoint and separate API keys from the standard Moonshot API. It is optimised for code-generation workloads. If you have `kimi-coding` credentials, configure it as its own provider entry with the `kimi-coding` base URL and credentials — do not mix keys with the `moonshot` provider.

## Troubleshooting

<AccordionGroup>
  <Accordion title="401 Unauthorized">
    The API key is invalid. Generate a new one at [platform.moonshot.cn](https://platform.moonshot.cn) and update `~/.openclaw/.env`.
  </Accordion>

  <Accordion title="429 Rate limited">
    You have exceeded your quota. Check your usage and limits in the Moonshot platform console.
  </Accordion>

  <Accordion title="Model not found">
    Verify the model ID against the Moonshot platform documentation — the catalog may have changed.
  </Accordion>
</AccordionGroup>
