Listen in on a live call
curl --request POST \
--url https://api.upliftai.org/v1/realtime-assistants/sessions/{sessionId}/listen \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.upliftai.org/v1/realtime-assistants/sessions/{sessionId}/listen"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.upliftai.org/v1/realtime-assistants/sessions/{sessionId}/listen', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.upliftai.org/v1/realtime-assistants/sessions/{sessionId}/listen",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.upliftai.org/v1/realtime-assistants/sessions/{sessionId}/listen"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.upliftai.org/v1/realtime-assistants/sessions/{sessionId}/listen")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.upliftai.org/v1/realtime-assistants/sessions/{sessionId}/listen")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"token": "eyJhbGciOiJIUzI1NiJ9.eyJ2aWRlbyI6eyJyb29tSm9pbiI6dHJ1ZSwicm9vbSI6IndlYi00MjU3MDBjZS14eHh4…xxxx",
"wsUrl": "wss://upliftai-prod-yd34to8b.livekit.cloud",
"roomName": "web-425700ce-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}{
"message": "Session is not live (state: completed)",
"error": "Bad Request",
"statusCode": 400
}{
"message": "invalid authorization",
"error": "Unauthorized",
"statusCode": 401
}{
"message": "Forbidden resource",
"error": "Forbidden",
"statusCode": 403
}{
"message": "Session not found: 00000000-0000-4000-8000-000000000000",
"error": "Not Found",
"statusCode": 404
}Sessions & call records
Listen in on a live call
Get a LiveKit token for the room a live call is already running in. The listener joins hidden and subscribe-only — they can hear the call but not speak into it — and the token expires ten minutes after it is issued. Live transcription arrives on the lk.transcription text stream from the moment you connect, with nothing backfilled.
POST
/
realtime-assistants
/
sessions
/
{sessionId}
/
listen
Listen in on a live call
curl --request POST \
--url https://api.upliftai.org/v1/realtime-assistants/sessions/{sessionId}/listen \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.upliftai.org/v1/realtime-assistants/sessions/{sessionId}/listen"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.upliftai.org/v1/realtime-assistants/sessions/{sessionId}/listen', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.upliftai.org/v1/realtime-assistants/sessions/{sessionId}/listen",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.upliftai.org/v1/realtime-assistants/sessions/{sessionId}/listen"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.upliftai.org/v1/realtime-assistants/sessions/{sessionId}/listen")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.upliftai.org/v1/realtime-assistants/sessions/{sessionId}/listen")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"token": "eyJhbGciOiJIUzI1NiJ9.eyJ2aWRlbyI6eyJyb29tSm9pbiI6dHJ1ZSwicm9vbSI6IndlYi00MjU3MDBjZS14eHh4…xxxx",
"wsUrl": "wss://upliftai-prod-yd34to8b.livekit.cloud",
"roomName": "web-425700ce-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}{
"message": "Session is not live (state: completed)",
"error": "Bad Request",
"statusCode": 400
}{
"message": "invalid authorization",
"error": "Unauthorized",
"statusCode": 401
}{
"message": "Forbidden resource",
"error": "Forbidden",
"statusCode": 403
}{
"message": "Session not found: 00000000-0000-4000-8000-000000000000",
"error": "Not Found",
"statusCode": 404
}Authorizations
Project API key (sk_api_…).
Path Parameters
The session to listen to. Ids come from the dispatch that started the call or the assistant's session list.
