Overview
LiveKit Inference offers Kimi models through Baseten. Pricing is available on the pricing page.
Model name | Model ID | Providers |
---|---|---|
Kimi K2 Instruct | moonshotai/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 AgentSessionsession = 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, inferencesession = 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.});
The model ID from the models list.
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.
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.