Skip to main content

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 and set it on the gateway host:
echo 'MOONSHOT_API_KEY=your-key-here' >> ~/.openclaw/.env

Configuration

{
  models: {
    providers: {
      moonshot: {
        apiKey: "MOONSHOT_API_KEY", // references the env var
        models: [
          "kimi-k2",
          "moonshot-v1-128k",
        ],
      },
    },
  },
}
apiKey is the name of the environment variable, not the key value itself. Keep secrets in .env, not in committed config files.

Selecting a model

{
  agents: {
    defaults: {
      model: { primary: "moonshot/kimi-k2" },
    },
  },
}
ModelNotes
kimi-k2Kimi K2 — latest flagship model
moonshot-v1-128k128k context window — long-document tasks
moonshot-v1-128k supports up to 128,000 tokens of context — well-suited for large codebase analysis or long document processing.
Run openclaw models list --provider moonshot for the full current catalog.

Troubleshooting

The API key is invalid. Generate a new one at platform.moonshot.cn and update ~/.openclaw/.env.
You have exceeded your quota. Check your usage and limits in the Moonshot platform console.
Verify the model ID against the Moonshot platform documentation — the catalog may have changed.