End a session
const options = {method: 'DELETE', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.livefaces.ai/v1/sessions/{session_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request DELETE \
--url https://api.livefaces.ai/v1/sessions/{session_id} \
--header 'Authorization: Bearer <token>'{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "created",
"room_name": "<string>",
"livekit_url": "<string>",
"participant_token": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"started_at": "2023-11-07T05:31:56Z",
"ended_at": "2023-11-07T05:31:56Z"
}{
"code": "<string>",
"detail": "<unknown>",
"request_id": "<string>"
}{
"code": "<string>",
"detail": "<unknown>",
"request_id": "<string>"
}{
"code": "<string>",
"detail": "<unknown>",
"request_id": "<string>"
}{
"code": "<string>",
"detail": "<unknown>",
"request_id": "<string>"
}Sessions
End a session
Ends a session and returns its terminal state. Ending an already terminal session is safe.
DELETE
/
v1
/
sessions
/
{session_id}
End a session
const options = {method: 'DELETE', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.livefaces.ai/v1/sessions/{session_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request DELETE \
--url https://api.livefaces.ai/v1/sessions/{session_id} \
--header 'Authorization: Bearer <token>'{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "created",
"room_name": "<string>",
"livekit_url": "<string>",
"participant_token": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"started_at": "2023-11-07T05:31:56Z",
"ended_at": "2023-11-07T05:31:56Z"
}{
"code": "<string>",
"detail": "<unknown>",
"request_id": "<string>"
}{
"code": "<string>",
"detail": "<unknown>",
"request_id": "<string>"
}{
"code": "<string>",
"detail": "<unknown>",
"request_id": "<string>"
}{
"code": "<string>",
"detail": "<unknown>",
"request_id": "<string>"
}Authorizations
A server-side Digital Human API key.
Path Parameters
Session identifier returned by create session.
Response
Current session
Available options:
created, active, completed, failed, cancelled Short-lived room token. Null after the session becomes terminal.