Create a session
const options = {
method: 'POST',
headers: {
'Idempotency-Key': '<idempotency-key>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
participant_identity: '<string>',
digital_human_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
tags: ['<string>'],
metadata: {}
})
};
fetch('https://api.livefaces.ai/v1/sessions', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request POST \
--url https://api.livefaces.ai/v1/sessions \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--data '
{
"participant_identity": "<string>",
"digital_human_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"tags": [
"<string>"
],
"metadata": {}
}
'{
"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>"
}{
"code": "<string>",
"detail": "<unknown>",
"request_id": "<string>"
}Sessions
Create a session
Creates a session and returns short-lived LiveKit connection credentials. Retry the same logical request with the same idempotency key.
POST
/
v1
/
sessions
Create a session
const options = {
method: 'POST',
headers: {
'Idempotency-Key': '<idempotency-key>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
participant_identity: '<string>',
digital_human_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
tags: ['<string>'],
metadata: {}
})
};
fetch('https://api.livefaces.ai/v1/sessions', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request POST \
--url https://api.livefaces.ai/v1/sessions \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--data '
{
"participant_identity": "<string>",
"digital_human_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"tags": [
"<string>"
],
"metadata": {}
}
'{
"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>"
}{
"code": "<string>",
"detail": "<unknown>",
"request_id": "<string>"
}Authorizations
A server-side Digital Human API key.
Headers
A caller-generated identifier for this logical create operation.
Required string length:
1 - 200Body
application/json
Response
Session created
Available options:
created, active, completed, failed, cancelled Short-lived room token. Null after the session becomes terminal.