Skip to main content

Kimi K3 integration

K3 can be used through Rig's compatible chat-completions client. The official K3 guide documents kimi-k3, strict JSON schema output, separate reasoning content, and preserving complete assistant messages in continued conversations.

export AI_BACKEND=moonshot
export AI_MODEL=kimi-k3
export AI_BASE_URL=https://api.moonshot.ai/v1
# Supply MOONSHOT_API_KEY securely in this environment, not in browser code.
BOOTH_TOKEN=your-local-token cargo run --release --bin boothd

For the moonshot backend, model/base URL default to the values above. AI_API_KEY takes precedence over MOONSHOT_API_KEY if both exist. No API key is bundled or saved in session artifacts. Both DJs use the configured model with separate personalities and musical memory.

Rig 0.42's native Moonshot extension still disables schema response formats. Our K3 configuration therefore uses Rig's compatible client with strict schema output, low reasoning effort, 4096 maximum output tokens and a 90-second deadline. The engine still validates selected tracks and transition IDs. Truncated, filtered or tool-call-only responses are rejected. Provider reasoning is not a public DJ decision.

Each MVP decision starts a fresh provider request containing compact musical memory. It is not a continued assistant/tool conversation. Protocol tests confirm that Rig can preserve separate reasoning and tool-call IDs when assistant messages are explicitly replayed, but multi-step tool execution is not part of the current DJ actor. A live Open Platform run on 2026-09-11 completed four K3 decisions (A → B → A → B) against the procedural library, with separate actor memory and partner handoffs, no planner fallback, and a 120-second stereo mix. Replaying its recorded decisions produced identical WAV bytes without model calls. This validates the integration; it does not establish musical quality on a real music collection.

Subscription or API?

The DJ runtime is a product integration and should use the Open Platform API with separate usage billing. Kimi Code membership can help develop the software through supported development tools; it is not the billing assumption for a deployed DJ actor. Kimi's own platform comparison distinguishes membership-based coding usage from pay-as-you-go product integration.

The coding endpoint has a different model alias and billing context. Do not substitute a Kimi Code token for the Open Platform key in the configuration above.