from mka1 import SDK
with SDK(
bearer_auth="<YOUR_BEARER_TOKEN_HERE>",
) as sdk:
res = sdk.llm.speech.livekit_token(llm={
"model": "meetkai:glm-4.6v",
})
# Handle response
print(res){
"token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
"url": "wss://apigw.mka1.com/api/v1/livekit",
"roomName": "550e8400-e29b-41d4-a716-446655440000"
}Generates a LiveKit access token for joining a real-time voice room. The token includes encrypted credentials and model configuration for the voice agent.
from mka1 import SDK
with SDK(
bearer_auth="<YOUR_BEARER_TOKEN_HERE>",
) as sdk:
res = sdk.llm.speech.livekit_token(llm={
"model": "meetkai:glm-4.6v",
})
# Handle response
print(res){
"token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
"url": "wss://apigw.mka1.com/api/v1/livekit",
"roomName": "550e8400-e29b-41d4-a716-446655440000"
}Gateway auth: send Authorization: Bearer <mka1-api-key>. For multi-user server-side integrations, you can also send X-On-Behalf-Of: <external-user-id>.
Request parameters for generating a LiveKit room token with LLM configuration and optional STT settings.
LLM configuration for the voice session. Uses a subset of the responses create schema — fields like input, stream, background, webhooks, and store are excluded since the voice agent manages those. WARNING: This object is serialized into the LiveKit JWT metadata which is transmitted via HTTP headers. Keep payloads small — large tools arrays can exceed the ~8KB header size limit imposed by most servers and proxies.
Show child attributes
Optional STT (speech-to-text) VAD configuration.
Show child attributes
OK
Response containing a LiveKit access token, server URL, and the generated room name.
Was this page helpful?