Skip to main content

Batch API V2 (Legacy)

DEPRECATED - DO NOT USE

This API version is deprecated and will be removed. Migrate to V3 immediately.

See the Migration Guide for upgrade instructions.

Overview

V2 introduced TUS protocol for resumable uploads. V3 enhances this with improved session management and document APIs.

Key V2 Changes from V1:

  • TUS protocol for chunked, resumable uploads
  • Automatic session creation on upload
  • No separate session initialization step required

This documentation is for reference only. Use V3 for all new integrations.

TUS Upload

Endpoint: https://api.scriptix.io/api/v3/files/

Auth Headers (choose one):

  • Authorization: Bearer {JWT_TOKEN}
  • x-zoom-s2t-key: {BATCH_API_TOKEN}

Required Metadata:

  • language - Language code (e.g., 'en-US')
  • document_type - 'caption' or 'document'
  • filetype - MIME type (e.g., 'audio/mp4')
  • filename - File name

Optional Metadata:

  • punctuation - 'true'/'false'
  • keep_source - 'true'/'false'
  • multichannel - 'true'/'false'
  • document - Stringified JSON with webhook config

TUS Clients: https://tus.io/implementations.html

Python Example:

from tusclient import client

my_client = client.TusClient('https://api.scriptix.io/api/v3/files/',
headers={'x-zoom-s2t-key': 'xyz123'})
uploader = my_client.uploader("/path/to/file.mp4",
metadata={'language': 'en-US', 'document_type': 'caption', ...})
uploader.upload()

Retrieving Results

Two-step process:

  1. Get metadata from TUS upload (returns session_id):
GET /api/v3/files/${fileId}
  1. Get session results:
GET /api/v3/speech-to-text/session/${sessionId}/result

Header: x-zoom-s2t-key

Session ID auto-created on upload unless explicitly provided in metadata.

Deleting Results

DELETE /api/v3/speech-to-text/session/${sessionId}

Erases filename and transcript. Same token required as for upload.