Skip to main content
Version: Latest

List Sessions

Returns a list of all sessions created under your userKey. You can filter active vs. ended sessions. Results are scoped to the STUDIO-API-KEY (only sessions for the appId mapped to that key). The next and previous URLs are based on the request host—if you deploy behind a reverse proxy, configure X-Forwarded-* headers accordingly.

GET/api/v2/sessions

Headers

HeaderValue
STUDIO-API-KEY{userKey}

Query parameters

ParameterTypeDefaultDescription
pageinteger1Page number (≥ 1)
page_sizeinteger20Items per page (1–100)
typestringactive: active sessions
historic: ended sessions (optional)

Examples

curl https://ai-streamer.deepbrain.io/api/v2/sessions \
-H "Content-Type: application/json" \
-H "STUDIO-API-KEY: ${userKey}" \
-X GET

Success (code: 1000)

{
"code": 1000,
"data": {
"count": 2,
"next": "<https://dev-streamer.example.com/api/v2/sessions?page=2&page_size=20&type=active>",
"previous": null,
"results": [
{
"sessionId": "${SESSION_ID}",
"created_at": "2026-04-07T02:37:50.000Z",
"updated_at": "2026-04-07T02:37:50.000Z",
"duration": 0,
"source": "API",
"credits_consumed": 0
}
]
},
"message": null
}

Next step

Use the Get Session Detail API to fetch details for a specific session.