Skip to main content

Export Document

Export documents to various formats.

Endpoint

POST /api/v3/documents/{id}/export

Request

{
"format": "srt"
}

Supported Formats

FormatExtensionDescription
txt.txtPlain text
docx.docxMicrosoft Word
pdf.pdfPDF document
srt.srtSubRip subtitles
vtt.vttWebVTT subtitles
json.jsonJSON 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")