Skip to main content

Kimi LLM

Reference for Kimi models served via LiveKit Inference.

Overview

LiveKit Inference offers Kimi models through Baseten. Pricing is available on the pricing page.

Model nameModel IDProviders
Kimi K2 Instructmoonshotai/kimi-k2-instruct
baseten

Usage

To use Kimi, pass the model id to the llm argument in your AgentSession. LiveKit Inference manages the connection to the best available provider automatically.

from livekit.agents import AgentSession
session = AgentSession(
llm="moonshotai/kimi-k2-instruct",
# ... tts, stt, vad, turn_detection, etc.
)
import { AgentSession } from '@livekit/agents';
session = new AgentSession({
llm: "moonshotai/kimi-k2-instruct",
// ... tts, stt, vad, turn_detection, etc.
});

Parameters

To customize additional parameters, including the specific provider to use, use the LLM class from the inference module.

from livekit.agents import AgentSession, inference
session = AgentSession(
llm=inference.LLM(
model="moonshotai/kimi-k2-instruct",
provider="baseten",
extra_kwargs={
"max_completion_tokens": 1000
}
),
# ... tts, stt, vad, turn_detection, etc.
)
import { AgentSession, inference } from '@livekit/agents';
session = new AgentSession({
llm: new inference.LLM({
model: "moonshotai/kimi-k2-instruct",
provider: "baseten",
extraKwargs: {
max_completion_tokens: 1000
}
}),
// ... tts, stt, vad, turn_detection, etc.
});
modelstringRequired

The model ID from the models list.

providerstringOptional

Set a specific provider to use for the LLM. Refer to the models list for available providers. If not set, LiveKit Inference uses the best available provider, and bills accordingly.

extra_kwargsdictOptional

Additional parameters to pass to the provider's Chat Completions API, such as max_completion_tokens. See the provider's documentation for more information.

Additional resources

The following links provide more information about Kimi in LiveKit Inference.