Moonshot (Kimi)

Configure jambonz to use Moonshot AI’s Kimi models over its OpenAI-compatible API.

Moonshot AI serves its Kimi models (including the Kimi K2 mixture-of-experts family) behind an OpenAI-compatible API. The wire is OpenAI-compatible (chat completions, streaming, tools), so the integration is straightforward — jambonz talks to it via a base URL override.

Two endpoints are available:

  • Global (default) — https://api.moonshot.ai/v1
  • Chinahttps://api.moonshot.cn/v1

Get credentials

  1. Sign in at the global console (platform.moonshot.ai) or the China console (platform.moonshot.cn).
  2. Open API Keys and create a key.
  3. Copy the value — it is shown only once.

Configure in jambonz

In the portal: Account → LLM Services → + Add LLM Service → Moonshot.

API Key
stringRequired

The key from Moonshot’s console.

Base URL
string

Defaults to https://api.moonshot.ai/v1 (global). Set to https://api.moonshot.cn/v1 for the China endpoint, or to your own proxy.

Click Test to verify.

Use in an agent verb

1session.agent({
2 llm: {
3 vendor: 'moonshot',
4 model: 'kimi-k2-0711-preview',
5 llmOptions: {
6 systemPrompt: 'You are a helpful voice assistant.',
7 },
8 },
9 stt: { vendor: 'deepgram', language: 'en-US' },
10 tts: { vendor: 'cartesia', voice: 'sonic-english' },
11 turnDetection: 'krisp',
12 bargeIn: { enable: true },
13 actionHook: '/agent-complete',
14}).send();

Available models

Model idNotes
kimi-k2-0711-previewKimi K2 — large MoE model, strong tool use
kimi-latestAlias tracking the latest Kimi chat model
moonshot-v1-8kMoonshot v1, 8k context — cheaper/faster for simple turns
moonshot-v1-32kMoonshot v1, 32k context
moonshot-v1-128kMoonshot v1, 128k context

Check GET /v1/models against your endpoint for the live list.

Quirks & errors

Global vs China: keep vendor: 'moonshot' constant — only the Base URL (in the portal credential) differs between the two regions. Keys are not interchangeable across endpoints.

401 — key revoked, copied with whitespace, or used against the wrong region’s endpoint. Regenerate in the Moonshot console and confirm the Base URL matches the console you created the key in.