Retrieve a document
📝 Use correct API token
It is important that the correct API token is used for document retrieval. Only the token linked to the TranscriptSession can be used.
📎 URL
GET https://api.scriptix.io/api/v3/speech-to-text/session/${sessionId}/document/${documentId}
🔐 Request headers
The following headers need to be present:
Parameter | Value | Description |
---|---|---|
X-Zoom-S2T-Key | Scriptix Batch API Token | API key belonging to TranscriptSession |
🔢 Request path arguments
Argument | Description |
---|---|
sessionId | Scriptix Transcript Session ID returned from a Batch Session |
documentId | Scriptix Document ID returned from creating a document |
🔍 Request query parameters
Key | Type | Description |
---|---|---|
format | string | Default: json Returns the document in the specified format. See supported document formats. |
Supported Document Formats
The following formats are supported when retrieving a document using the format
query parameter:
Format | Description |
---|---|
json | Scriptix ExtendedDocumentModel JSON response |
sbv | SBV subtitle format |
srt | SRT subtitle format |
ttml | TTML subtitle format |
vtt | VTT subtitle format |
docx | Microsoft Word document |
template | AI generated template (either with a specific format or summarization) |
stl | Subtitle format for broadcast |
html | HTML document |
🔁 Response Codes
Status code | Description |
---|---|
200 | Document in requested format |
400 | Bad request |
401 | Unauthorized — no valid authentication found |
403 | Forbidden — access to resource is not allowed |
404 | Not found — the transcript session is not found or doesn't match the API token |
Retrieve Document Response
✅ HTTP 200 OK
The response will be in the following format:
Format: APIResultResponse<DocumentModel>
{
"result": {
"id": "12780b54-5575-44e4-bbca-0a410b432183",
"created": "2021-01-25T10:31:46.960411+00:00",
"last_modified": "2021-01-25T10:31:46.960411+00:00",
"filename": "Example document",
"type": "caption",
"document": [
{
"start": 525,
"stop": 6252,
"speaker": "M1",
"text": "This is just an example.\non two lines."
}
]
}
}
TTML Example Output
Below is an example of a TTML subtitle document generated by Scriptix:
<?xml version="1.0" encoding="UTF-8"?>
<tt xmlns="http://www.w3.org/ns/ttml" xml:lang="en-us">
<head>
<metadata xmlns:ttm="http://www.w3.org/ns/ttml#metadata">
<ttm:title>Scriptix TTML</ttm:title>
</metadata>
<styling xmlns:tts="http://www.w3.org/ns/ttml#styling">
<style xml:id="s1" tts:textAlign="center" tts:fontFamily="Arial" tts:fontSize="100%"/>
</styling>
<layout xmlns:tts="http://www.w3.org/ns/ttml#layout">
<region xml:id="bottom" tts:displayAlign="after" tts:extent="80% 40%" tts:origin="10% 50%"/>
</layout>
</head>
<body region="bottom" style="s1">
<div>
<p begin="00:00:00.000" end="00:00:02.850" style="s1" region="bottom">the quick brown fox jumps over the</p>
<p begin="00:00:02.850" end="00:00:03.570" style="s1" region="bottom">lazy dog</p>
</div>
</body>
</tt>
Subtitle Format Examples
SBV
00:00:00.000 --> 00:00:02.850
the quick brown fox jumps over the
00:00:02.850 --> 00:00:03.570
lazy dog
SRT
srt
Copy
Edit
1
00:00:00.000 --> 00:00:02.850
the quick brown fox jumps over the
2
00:00:02.850 --> 00:00:03.570
lazy dog
VTT
vtt
Copy
Edit
WEBVTT
NOTE This file has been generated by Scriptix
00:00.000 --> 00:02.850
the quick brown fox jumps over the
00:02.850 --> 00:03.570
lazy dog