Endpoint
POST /test-runs/create-livekit-rooms
Authentication
This endpoint requires authentication.
Request Body
Parameter | Type | Description |
---|
datasetId | string | ID of the dataset to use |
datasetItemIds | string[] | Optional list of dataset item IDs to filter by |
Response
{
"experimentId": "string",
"rooms": [
{
"roomName": "string",
"url": "string",
"datasetItemId": "string",
"token": "string"
}
]
}
Example Usage
// Create LiveKit rooms for a specific dataset
const response = await fetch('https://app.hamming.ai/api/rest/test-runs/create-livekit-rooms', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'Authorization': 'Bearer YOUR_API_TOKEN'
},
body: JSON.stringify({
datasetId: 'ds_abc123',
datasetItemIds: ['di_xyz789', 'di_def456'] // Optional
})
});
const result = await response.json();
console.log(result);
/*
{
"experimentId": "exp_123abc",
"rooms": [
{
"roomName": "direct_call_abc123",
"url": "wss://livekit.hamming.ai",
"datasetItemId": "di_xyz789",
"token": "eyJhbG..."
},
{
"roomName": "direct_call_def456",
"url": "wss://livekit.hamming.ai",
"datasetItemId": "di_def456",
"token": "eyJhbG..."
}
]
}
*/
Using LiveKit Room Data
The returned tokens can be used to establish direct WebRTC connections to the LiveKit rooms, where voice agent interactions can take place without traditional telephony integration.
Responses are generated using AI and may contain mistakes.