Prevail API: Access Session Materials
Retrieve Session Recordings
Retrieves audio recordings for the specified Session. Each recording includes a filename, file size, creation timestamp, user label (typically “Recording”), and a presigned URL for downloading the file. The presigned URL expires after 24 hours.
Parameters
- Use the GET Sessions endpoint to retrieve a list of Sessions and their
remote_session_id
values.
Response Fields
Field | Parameter Path | Type | Required |
---|---|---|---|
filename | filename | string | — |
The name of the audio recording file, typically in .mp4 format. | |||
type | type | string | — |
The type of file. Always assigned audio . | |||
user | user | string | — |
Identifies the source of the recording. Assigned "Recording" when no specific user is associated with the file. | |||
size | size | string | — |
The file size of the recording, reported in bytes. | |||
presigned_url | presigned_url | string | — |
A time-limited presigned URL for downloading the recording file. The URL expires after 24 hours. | |||
created_at | created_at | string | — |
The timestamp when the recording file was created. |
Authorization
Bearer Token {{jwt_signed}}
Authenticates the request. Replace with your access token.
Headers
Accept application/json
Specifies the expected format of the response body.
Example Request
curl -X GET "https://prevail.ai/api/v1/sessions/example-remote-session-id/recordings" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-H "Accept: application/json"
// Get session recordings using fetch API
async function getSessionRecordings() {
const response = await fetch('https://prevail.ai/api/v1/sessions/example-remote-session-id/recordings', {
method: 'GET',
headers: {
'Authorization': 'Bearer YOUR_ACCESS_TOKEN',
'Accept': 'application/json'
}
});
const data = await response.json();
console.log(data);
}
// Call the function
getSessionRecordings();
import requests
url = "https://prevail.ai/api/v1/sessions/example-remote-session-id/recordings"
headers = {
"Authorization": "Bearer YOUR_ACCESS_TOKEN",
"Accept": "application/json"
}
response = requests.get(url, headers=headers)
data = response.json()
print(data)
GET https://prevail.ai/api/v1/sessions/example-remote-session-id/recordings
Authorization: Bearer YOUR_ACCESS_TOKEN
Accept: application/json
Example Response
{
"recordings": [
{
"filename": "complete-session-audio.mp4",
"type": "audio",
"size": "1034663 bytes",
"user": "Recording",
"presigned_url": "",
"created_at": "Jan 17 2025 01:22:06 PM CST"
}
]
}
Get Transcripts
Retrieves the transcript for the specified Session as a UTF-8 encoded string of plain text. The response includes speaker names, timestamps, and dialogue, with each turn of speech separated by a newline (\n
). The transcript is only available in .txt
format.
Parameters
- Use the GET Sessions endpoint to retrieve a list of Sessions and their
remote_session_id
values.
Response Fields
\n
) are used to separate turns of speech. Authorization
Bearer Token {{jwt_signed}}
Authenticates the request. Replace with your access token.
Headers
Accept application/json
Specifies the expected format of the response body.
Example Request
curl -X GET "https://prevail.ai/api/v1/sessions/example-remote-session-id/transcripts" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-H "Accept: application/json"
// Get transcript using fetch API
async function getTranscript() {
const response = await fetch('https://prevail.ai/api/v1/sessions/example-remote-session-id/transcripts', {
method: 'GET',
headers: {
'Authorization': 'Bearer YOUR_ACCESS_TOKEN',
'Accept': 'application/json'
}
});
const data = await response.json();
console.log(data);
}
// Call the function
getTranscript();
import requests
url = "https://prevail.ai/api/v1/sessions/example-remote-session-id/transcripts"
headers = {
"Authorization": "Bearer YOUR_ACCESS_TOKEN",
"Accept": "application/json"
}
response = requests.get(url, headers=headers)
data = response.json()
print(data)
GET https://prevail.ai/api/v1/sessions/example-remote-session-id/transcripts
Authorization: Bearer YOUR_ACCESS_TOKEN
Accept: application/json
Example Response
{
"transcript": "AZURITE OLEANDER: Good morning, everyone. We are now starting.\n\nMALACHITE YARROW: Thank you.\n\nAZURITE OLEANDER: We’ll begin shortly.\n\nMALACHITE YARROW: Understood.\n\nAZURITE OLEANDER: Session is now on the record."
}