Subtitle Toolkit SRT WebVTT TTML Convert Shift Stats API
Free tier included · MediaSubtitle Toolkit API is a lightweight, stateless service for converting between subtitle formats (SRT, WebVTT, basic TTML), shifting cue timings by any offset, and computing cue statistics like duration, reading speed, and overlong-cue detection. It auto-detects input format by content and supports both JSON payloads and multipart file uploads.
This API covers conversion, time-shifting, and analysis. It's ideal for video platforms, course creators, and ASR/translation post-processing pipelines that need reliable, programmatic subtitle handling without installing libraries or managing infrastructure.
The service is fully offline: no external calls, no databases, and no request logging. Input is processed in-memory and discarded immediately. Each request is capped at 5 MB. Time shifting supports offsets from -31536000 to +31536000 seconds (±1 year), with negative shifts clamped to zero. Statistics include cue count, total duration, average characters-per-second, and a long-cue flag based on accessibility thresholds.
**Endpoints included:** - `POST /to-vtt` - To Vtt - `POST /to-srt` - To Srt - `POST /shift` - Shift - `POST /stats` - Stats - `POST /to-json` - Convert subtitles to structured JSON
Endpoints
| Method | Path | What it does |
|---|---|---|
GET | / | API metadata: name, version, and paths to the interactive docs and health endpoint. |
GET | /health | Liveness probe; returns status "ok" while the process is up. |
POST | /to-vtt | Convert subtitle content (SRT, WebVTT, or basic TTML) to WebVTT format. Accepts JSON {"content": "..."} or multipart file upload. |
POST | /to-srt | Convert subtitle content (SRT, WebVTT, or basic TTML) to SRT format. Accepts JSON {"content": "..."} or multipart file upload. |
POST | /shift | Shift all cue timings in subtitle content by a specified offset in seconds. Accepts JSON {"content": "...", "offset_seconds": 2.5} or multipart file upload with offset_seconds field. |
POST | /stats | Compute statistics for subtitle content: cue count, total duration, average characters-per-second, and overlong-cue detection. Accepts JSON {"content": "..."} or multipart file upload. |
POST | /to-json | Parse subtitle content (SRT, WebVTT, or basic TTML) into structured JSON with start time, end time, and text lines per cue. Accepts JSON {"content": "..."}. |
Quick start
curl -X POST "https://subtitles.p.rapidapi.com/to-vtt" \
-H "X-RapidAPI-Key: YOUR_RAPIDAPI_KEY" \
-H "X-RapidAPI-Host: subtitles.p.rapidapi.com" \
-H "Content-Type: application/json" \
-d '{"content": "1\n00:00:01,000 --> 00:00:03,500\nHello world\n\n2\n00:00:04,000 --> 00:00:06,000\nSecond cue\n"}'
FAQ
What subtitle formats are supported?
Input auto-detection supports SRT, WebVTT, and basic TTML. Output formats are SRT and WebVTT. TTML support is basic — no complex styling or layouts.
Is my subtitle data stored or logged?
No. The API is fully stateless and offline. Input is processed in-memory and discarded immediately. There are no databases, no logs, and no external calls.
What are the input size limits?
Maximum input size is 5 MB for both JSON content and file uploads. This applies to all endpoints.
Can I shift subtitles by negative offsets?
Yes. Offsets range from -31536000 to +31536000 seconds (±1 year). Negative shifts move cues earlier, and any cue that would shift before zero is clamped to start at 00:00:00.
Try Subtitle Toolkit SRT WebVTT TTML Convert Shift Stats free
Free tier on every plan. Get an API key and start calling in under a minute.
Open on RapidAPI