import { SDK } from "@meetkai/mka1";
const sdk = new SDK({
bearerAuth: "<YOUR_BEARER_TOKEN_HERE>",
});
async function run() {
const result = await sdk.llm.speech.livekitToken({
livekitTokenRequest: {},
});
console.log(result);
}
run();{
"token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
"url": "wss://apigw.mka1.com/api/v1/livekit",
"roomName": "550e8400-e29b-41d4-a716-446655440000"
}Generates a LiveKit access token for joining a new real-time audio/video room. Optionally pass previous_response_id or conversation_id to continue a conversation.
import { SDK } from "@meetkai/mka1";
const sdk = new SDK({
bearerAuth: "<YOUR_BEARER_TOKEN_HERE>",
});
async function run() {
const result = await sdk.llm.speech.livekitToken({
livekitTokenRequest: {},
});
console.log(result);
}
run();{
"token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
"url": "wss://apigw.mka1.com/api/v1/livekit",
"roomName": "550e8400-e29b-41d4-a716-446655440000"
}Authenticate with your MKA1 API key at the API gateway: Authorization: Bearer <mka1-api-key>. For multi-user server-side integrations, also send X-On-Behalf-Of to identify the end user making the request.
Optional external user identifier for multi-user server-side integrations. Use this when acting on behalf of one of your end users.
Request parameters for generating a LiveKit room token with optional conversation continuation.
OK
Response containing a LiveKit access token, server URL, and the generated room name.
Was this page helpful?