File Transcripts
Manage transcripts for a file.
Get Transcripts
Endpoint
GET ${baseUrl}/files/get-transcriptsQuery Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| fileId | string | Yes | File ID |
| type | string | No | Type of transcript. Valid values: docx, pdf, srt, vtt, txt. Defaults to txt |
Response
interface FileTranscriptsResponse {
success: boolean
data: {
downloadUrl: string // Signed URL to download the transcript file (expires in 15 minutes)
}
}Example Requests
// Get transcript as TXT (default)
const txtTranscript = await fetch(
'${baseUrl}/files/get-transcripts?fileId=abc123',
{
headers: {
Authorization: 'Basic YOUR_API_KEY',
},
},
)
// Get transcript as SRT
const srtTranscript = await fetch(
'${baseUrl}/files/get-transcripts?fileId=abc123&type=srt',
{
headers: {
Authorization: 'Basic YOUR_API_KEY',
},
},
)
// Get transcript as DOCX
const docxTranscript = await fetch(
'${baseUrl}/files/get-transcripts?fileId=abc123&type=docx',
{
headers: {
Authorization: 'Basic YOUR_API_KEY',
},
},
)Notes
txt: Returns the plain text transcript. If the customer has edited the transcript, the edited version is returned.srt,vtt: Returns subtitle files. These are only available for transcription orders.docx,pdf: Returns formatted files. These are returned for orders that include formatting and for orders that include transcription.
Error Codes
| Status Code | Description |
|---|---|
| 200 | Success |
| 400 | Invalid request (missing fileId or invalid type) |
| 401 | Unauthorized |
| 403 | Forbidden (file does not belong to authenticated user) |
| 404 | File or transcript version not found |
| 500 | Server Error |