ποΈ Retrieve Results
After uploading a file using the TUS protocol, you can retrieve the transcription results by querying the session_id
linked to that file.
π‘ You do not need to create a session manually. The system handles session creation automaticallyβunless you're intentionally passing your own
session_id
in the upload metadata.
π Overviewβ
In most cases, you will receive the session_id
automatically via your configured webhook.
β‘οΈ See Webhook Setup & Usage for details.
From the webhook payload, you can use either session_id
or zoom_id
(both work interchangeably) when retrieving results.
If you did not set a webhook, you can still retrieve the session_id
by querying the file metadata after upload.
This step is optional and only needed when no webhook is configured.
β Step 1 (Optional): Retrieve File Metadataβ
After a successful TUS upload, the response includes a Location
header containing the file ID:
Location: https://api.scriptix.io/api/v3/files/<fileId>
Use this endpoint to read the fileβs metadata and extract the session_id:
GET https://api.scriptix.io/api/v3/files/<fileId>
Headers:
x-zoom-s2t-key: YOUR_BATCH_API_KEY
Example:
GET https://api.scriptix.io/api/v3/files/<fileId>
Headers:
x-zoom-s2t-key: YOUR_BATCH_API_KEY
Example response:
{
"count": 1,
"total_results": 1,
"result": {
"session_id": "1b8a70f1000001000002d1a37b",
"metadata": {
"language": "en",
"document_type": "caption",
"filetype": "video/mp4",
"filename": "test3.mp4",
"folder_id": null
}
}
}
π₯ Step 2: Retrieve Transcription Resultsβ
Once you have the session_id β either from your webhook payload or from Step 1 β you can query the final transcription result using this endpoint:
GET https://api.scriptix.io/api/v3/speech-to-text/session/<session_id>/result
Headers:
x-zoom-s2t-key: YOUR_BATCH_API_KEY
Example Response:
{
"count": 1,
"total_results": 1,
"result": {
"duration": 592,
"error": null,
"filename": "media.mp3",
"media_type": "audio",
"media_url": "https://example.com/media.mp3",
"session_id": "49b5b257000004000006ccdfc8",
"status": "done",
"results": [
{
"result": [
["word", 0.23, 0.74, 0.92],
["another", 0.75, 1.20, 0.87]
],
"speaker": "unk",
"text": "word another",
"sconf": 0.85,
"channel": 0
}
]
}
}
π Important: Only the Batch API token used to create/upload the file can be used to retrieve the result. Using a different token will result in a 401 Unauthorized error.
π§Ύ Response Codesβ
Status Code | Meaning | Notes |
---|---|---|
200 | Success | Transcription is ready |
400 | Bad request | Invalid parameters |
401 | Unauthorized | Wrong or missing token |
415 | Unsupported Media | Invalid content type |
422 | Validation error | Malformed request |
500 | Server error | Internal failure |