Fetch Sessions - API
This API let you fetch all of the AI Worker Sessions.
HTTP method and endpoint
GET
|
https://api.videosdk.live/ai/v1/ai-worker-sessionsHeaders Parameters
REQUIRED
values : YOURTOKENWITHOUTANYPREFIX
This will be a JWT token generate using VideoSDK ApiKey and Secret.
Note that the token will not include any prefix such as "Basic " or "Bearer ". Just pass a token as value.
You can generate a new token by refering this Guide: Generate Auth token
GET
|
https://api.videosdk.live/ai/v1/ai-worker-sessions
NodeJS
import fetch from 'node-fetch';
const options = {
method: "GET",
headers: {
"Authorization": "$YOUR_TOKEN",
"Content-Type": "application/json",
},
};
const url= `https://api.videosdk.live/ai/v1/ai-worker-sessions?page=undefined&perPage=undefined`;
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
RESPONSE
{
"data": [
{
"webhook": {
"endpoint": "webhook_url",
"events": [
"ai-worker-session-starting",
"ai-worker-session-started"
]
},
"status": "completed",
"workerId": "3b53abad-a685-4bf5-a137-71b3a37c3744",
"deploymentId": "2f5f787c-0386-4ae0-929c-f5853628267a",
"start": "2025-06-18T11:15:07.275Z",
"sessionId": "788d0173-fa9c-404b-a2cf-69d38a1fe952",
"createdAt": "2025-06-18T11:15:07.276Z",
"updatedAt": "2025-06-18T11:16:03.575Z",
"duration": 56,
"end": "2025-06-18T11:16:03.575Z",
"metadata": {}
}
],
"pageInfo": {
"totalItems": 113,
"currentPage": 1,
"perPage": 1,
"total": 113
}
}
Got a Question? Ask us on discord