Export Document
Export documents to various formats.
Endpoint
POST /api/v3/documents/{id}/export
Request
{
"format": "srt"
}
Supported Formats
| Format | Extension | Description |
|---|---|---|
txt | .txt | Plain text |
docx | .docx | Microsoft Word |
pdf | PDF document | |
srt | .srt | SubRip subtitles |
vtt | .vtt | WebVTT subtitles |
json | .json | JSON with full data |
Response
{
"download_url": "https://api.scriptix.io/downloads/abc123.srt",
"expires_at": "2025-01-17T18:00:00Z"
}
Download URL expires after 1 hour.
Examples
Export to SRT
curl -X POST https://api.scriptix.io/api/v3/documents/123/export \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"format": "srt"}'
Python - Download File
# 1. Request export
response = requests.post(
'https://api.scriptix.io/api/v3/documents/123/export',
headers={'Authorization': 'Bearer YOUR_API_KEY'},
json={'format': 'srt'}
)
export = response.json()
# 2. Download file
file_response = requests.get(export['download_url'])
with open('transcript.srt', 'wb') as f:
f.write(file_response.content)
print("Downloaded transcript.srt")