Skip to main content
POST
/
api
/
v1
/
llm
/
speech
/
livekit
/
token
Typescript (SDK)
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"
}

Authorizations

Authorization
string
header
required

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.

Headers

X-On-Behalf-Of
string

Optional external user identifier for multi-user server-side integrations. Use this when acting on behalf of one of your end users.

Body

application/json

Request parameters for generating a LiveKit room token with optional conversation continuation.

previous_response_id
string

Response ID from a previous session to chain responses.

Minimum string length: 1
conversation_id
string

Conversation ID to continue an existing conversation.

Minimum string length: 1

Response

200 - application/json

OK

Response containing a LiveKit access token, server URL, and the generated room name.

token
string
required

JWT access token for authenticating with the LiveKit room

url
string<uri>
required

LiveKit server WebSocket URL to connect to (e.g., wss://apigw.mka1.com/api/v1/livekit)

roomName
string
required

Auto-generated UUID room name assigned to this session