Skip to main content

πŸ—’οΈ 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 CodeMeaningNotes
200SuccessTranscription is ready
400Bad requestInvalid parameters
401UnauthorizedWrong or missing token
415Unsupported MediaInvalid content type
422Validation errorMalformed request
500Server errorInternal failure