API & MCP
Everything a person can do on Subtitle Studio, a program or AI agent can do with the same inputs and get the identical result.
HTTP API
POST https://subtitlestudio.usefulweb.site/api/v1/calculate– run Subtitle StudioGET https://subtitlestudio.usefulweb.site/api/v1/tool– inputs, output schema, examples- OpenAPI 3.1: /openapi.json · /openapi.yaml
- Errors:
application/problem+json;422includes per-fielderrors.
Subtitle Studio
Parses SRT, WebVTT, ASS/SSA (basic) and YouTube SBV subtitles and converts between them. Shift all times, re-sync by two reference points (fixes drifting subtitles), fix overlaps with a minimum gap, wrap or merge lines, remove hearing-impaired tags like [music] or (sighs), and get a reading-speed (characters per second) report and validation errors with line numbers.
| Field | Type | Default | Description |
|---|---|---|---|
text | textarea | — | Subtitle text. Paste SRT, WebVTT, ASS/SSA or SBV, or upload a file below. |
file | file | — | Subtitle file. Max 2 MB. UTF-8, UTF-16 (with BOM) or Windows-1252. Used instead of the text when given. |
inputFormat | select (auto, srt, vtt, ass, sbv) | "auto" | Input format |
outputFormat | select (same, srt, vtt, ass, sbv) | "same" | Output format |
shiftMs | integer | 0 | Shift all times. Positive = later, negative = earlier. 1000 ms = 1 s. |
syncCueA | integer | — | Sync point 1: cue number. Two-point sync fixes subtitles that drift (e.g. 25 vs 23.976 fps). Give two cues and when they should start. |
syncTimeA | text | — | Sync point 1: should start at |
syncCueB | integer | — | Sync point 2: cue number |
syncTimeB | text | — | Sync point 2: should start at |
removeHi | boolean | false | Remove hearing-impaired tags ([music], (sighs), speaker labels like JOHN:, ♪ lines) |
mergeLines | boolean | false | Merge multi-line cues into one line when they fit the maximum line length |
maxLineLength | integer | 0 | Maximum line length. 0 = no wrapping. 42 is a common limit for TV/streaming subtitles. |
maxLines | integer | 2 | Maximum lines per cue. Longer cues are split into several cues, with time shared by text length. |
fixOverlaps | boolean | false | Fix overlapping cues (shorten the earlier cue) |
minGapMs | integer | 0 | Minimum gap between cues. Used with "Fix overlapping cues". 83 ms ≈ 2 frames at 24 fps. |
maxCps | number | 17 | Reading speed limit for the report. Cues faster than this are listed. 15–20 characters per second are common guidelines. |
Example request
Clean an SRT: remove [music] tags, wrap at 42, fix overlaps, export WebVTT
curl -X POST https://subtitlestudio.usefulweb.site/api/v1/calculate -H 'content-type: application/json' -d '{"text":"1\n00:00:01,000 --> 00:00:03,200\n[MUSIC PLAYING]\nHello there!\n\n2\n00:00:03,000 --> 00:00:05,500\nJOHN: (sighs) This line is quite a bit longer than forty-two characters and needs wrapping.\n\n3\n00:00:06,000 --> 00:00:06,400\nToo fast to read comfortably.\n","outputFormat":"vtt","removeHi":true,"maxLineLength":42,"fixOverlaps":true,"minGapMs":80}'
Every result contains
inputs (normalised, defaults applied), summary, result (validated against the published schema), units, assumptions, sources, warnings, computedAt and links.
MCP (Model Context Protocol)
- Streamable HTTP endpoint:
https://subtitlestudio.usefulweb.site/mcp– protocol revisions 2026-07-28 (stateless) and 2025-11-25 / 2025-06-18 / 2025-03-26 (initialize handshake). - Tools:
subtitle_studio - Local stdio connector:
node src/mcp-stdio.ts --tool=subtitle-studio
{
"mcpServers": {
"subtitle-studio": { "type": "http", "url": "https://subtitlestudio.usefulweb.site/mcp" }
}
}