const options = {
method: 'POST',
headers: {
'Idempotency-Key': '<idempotency-key>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({workflow_revision_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a'})
};
fetch('https://api.livefaces.ai/v1/workflow-runs', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request POST \
--url https://api.livefaces.ai/v1/workflow-runs \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--data '
{
"workflow_revision_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
'{
"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",
"workflow_run_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}{
"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>"
}{
"code": "<string>",
"detail": "<unknown>",
"request_id": "<string>"
}{
"code": "<string>",
"detail": "<unknown>",
"request_id": "<string>"
}Start a published workflow
Requires workflows:run. Launches a specific published revision and returns a session connection. The revision defines voice, face, instructions, and tools; overrides are not accepted.
const options = {
method: 'POST',
headers: {
'Idempotency-Key': '<idempotency-key>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({workflow_revision_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a'})
};
fetch('https://api.livefaces.ai/v1/workflow-runs', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request POST \
--url https://api.livefaces.ai/v1/workflow-runs \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--data '
{
"workflow_revision_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
'{
"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",
"workflow_run_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}{
"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>"
}{
"code": "<string>",
"detail": "<unknown>",
"request_id": "<string>"
}{
"code": "<string>",
"detail": "<unknown>",
"request_id": "<string>"
}Authorizations
Organization API key. Keep it on your server.
Headers
Unique ID for one intended launch. Reuse this key and the identical body when retrying that launch.
1 - 200Body
Published workflow revision UUID, not a working-copy ID or version number.
Values matching the published workflow input fields.
Identity for the participant joining the room.
1 - 100Application labels.
20Application context; exclude secrets.
Response
Successful response
Use this session ID for status, token refresh, end, and transcript requests.
created, active, completed, failed, cancelled Room name for the connection.
LiveKit connection URL returned by the service.
Short-lived participant credential, or null after the session becomes terminal.
Present for a workflow session; identifies its workflow run.