{"openapi":"3.1.0","info":{"title":"Subtitle API","version":"1.0.0","description":"Work with subtitle and caption files — parse, convert and re-sync, entirely locally. The parse endpoint reads SubRip (.srt) or WebVTT (.vtt) text into clean, structured cues — index, start, end (as both HH:MM:SS,mmm timecodes and milliseconds), duration and the cue text (multi-line preserved) — auto-detecting which format you sent. The convert endpoint converts between SRT and WebVTT, getting the details right: the timestamp separator (comma for SRT, dot for WebVTT), adding or removing the WEBVTT header, and renumbering cues. The shift endpoint moves every timestamp by an offset in milliseconds, positive or negative, to fix a track that runs early or late, clamping at zero so nothing goes negative. Everything is computed locally and deterministically, so it is instant and private — your media files never leave the request. Ideal for video and streaming pipelines, caption editors and players, localization and translation workflows, accessibility, and fixing out-of-sync subtitles. Pure local computation — no key, no third-party service, instant. Live, nothing stored. 4 endpoints. This handles subtitle files; for SMPTE video timecode (HH:MM:SS:FF) use a timecode API.","contact":{"name":"PremiumApi","url":"https://www.oanor.com/by/premiumapi"}},"servers":[{"url":"https://api.oanor.com/subtitle-api","description":"oanor gateway"}],"tags":[{"name":"Subtitle"},{"name":"Meta"}],"components":{"securitySchemes":{"oanorKey":{"type":"apiKey","in":"header","name":"x-oanor-key","description":"Get your key at https://www.oanor.com/developer/keys"}}},"security":[{"oanorKey":[]}],"paths":{"/v1/convert":{"get":{"operationId":"get_v1_convert","tags":["Subtitle"],"summary":"Convert SRT/VTT","description":"","parameters":[{"name":"subtitle","in":"query","required":true,"description":"The subtitle text","schema":{"type":"string"},"example":"1\n00:00:01,000 --> 00:00:04,000\nHello"},{"name":"to","in":"query","required":false,"description":"'srt' or 'vtt' (default: the other format)","schema":{"type":"string"},"example":"vtt"}],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"to":"vtt","from":"srt","count":1,"subtitle":"WEBVTT\n\n00:00:01.000 --> 00:00:04.000\nHello\n"},"meta":{"timestamp":"2026-06-03T17:42:20.586Z","request_id":"10b99080-8a5b-4cfc-9be0-93038a83b1e5"},"status":"ok","message":"Convert SRT/VTT","success":true}}}},"401":{"description":"Missing or invalid x-oanor-key header"},"402":{"description":"Active subscription required"},"429":{"description":"Rate-limit or monthly quota reached"},"502":{"description":"Upstream did not respond"}}}},"/v1/parse":{"get":{"operationId":"get_v1_parse","tags":["Subtitle"],"summary":"Parse a subtitle file","description":"","parameters":[{"name":"subtitle","in":"query","required":true,"description":"The .srt or .vtt file text","schema":{"type":"string"},"example":"1\n00:00:01,000 --> 00:00:04,000\nHello world"}],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"cues":[{"end":"00:00:04,000","text":"Hello world","index":1,"start":"00:00:01,000","end_ms":4000,"start_ms":1000,"duration_ms":3000}],"count":1,"format":"srt"},"meta":{"timestamp":"2026-06-03T17:42:20.654Z","request_id":"f1597329-d875-4705-97e5-0828827585fd"},"status":"ok","message":"Parse a subtitle file","success":true}}}},"401":{"description":"Missing or invalid x-oanor-key header"},"402":{"description":"Active subscription required"},"429":{"description":"Rate-limit or monthly quota reached"},"502":{"description":"Upstream did not respond"}}}},"/v1/shift":{"get":{"operationId":"get_v1_shift","tags":["Subtitle"],"summary":"Shift subtitle timing","description":"","parameters":[{"name":"subtitle","in":"query","required":true,"description":"The subtitle text","schema":{"type":"string"},"example":"1\n00:00:01,000 --> 00:00:04,000\nHi"},{"name":"offset","in":"query","required":true,"description":"Milliseconds to shift (negative = earlier)","schema":{"type":"string"},"example":"2500"},{"name":"to","in":"query","required":false,"description":"Output format (default: keep input format)","schema":{"type":"string"}}],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"count":1,"format":"srt","subtitle":"1\n00:00:03,500 --> 00:00:06,500\nHi\n","offset_ms":2500},"meta":{"timestamp":"2026-06-03T17:42:20.765Z","request_id":"d15af992-e642-4431-87aa-ca257771c6d3"},"status":"ok","message":"Shift subtitle timing","success":true}}}},"401":{"description":"Missing or invalid x-oanor-key header"},"402":{"description":"Active subscription required"},"429":{"description":"Rate-limit or monthly quota reached"},"502":{"description":"Upstream did not respond"}}}},"/v1/meta":{"get":{"operationId":"get_v1_meta","tags":["Meta"],"summary":"Spec","description":"","parameters":[],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"name":"Subtitle API","notes":"Auto-detects SRT vs WebVTT. SRT uses HH:MM:SS,mmm and numbered cues; WebVTT uses HH:MM:SS.mmm under a WEBVTT header. Shifting clamps negative times to zero. This handles subtitle files — for SMPTE video timecode use a timecode API. Nothing is stored.","version":"v1","endpoints":[{"path":"/v1/parse","params":{"subtitle":"the .srt or .vtt file text (required)"},"returns":"the parsed cues with times in HH:MM:SS,mmm and milliseconds"},{"path":"/v1/convert","params":{"to":"'srt' or 'vtt' (default: the other format)","subtitle":"the subtitle text (required)"},"returns":"the converted subtitle text"},{"path":"/v1/shift","params":{"to":"output format (default: keep the input format)","offset":"milliseconds to shift (negative to move earlier)","subtitle":"the subtitle text (required)"},"returns":"the time-shifted subtitle text"},{"path":"/v1/meta","params":[],"returns":"this document"}],"description":"Work with subtitle files. The parse endpoint reads SubRip (.srt) or WebVTT (.vtt) text into structured cues — index, start, end (as both HH:MM:SS,mmm and milliseconds), duration and text — auto-detecting the format. The convert endpoint converts between SRT and WebVTT, fixing the timestamp separator (comma vs dot), adding or removing the WEBVTT header and renumbering cues. The shift endpoint moves every timestamp by an offset in milliseconds (positive or negative) to re-sync a track that runs early or late, clamping at zero. Pure local, no key."},"meta":{"timestamp":"2026-06-03T17:42:20.864Z","request_id":"961f1a01-1334-41b9-b2fc-446f6270bccb"},"status":"ok","message":"Meta","success":true}}}},"401":{"description":"Missing or invalid x-oanor-key header"},"402":{"description":"Active subscription required"},"429":{"description":"Rate-limit or monthly quota reached"},"502":{"description":"Upstream did not respond"}}}}},"x-oanor-pricing":[{"slug":"free","name":"Free","price_cents_month":0,"monthly_call_quota":4535,"rps_limit":2,"hard_limit":true},{"slug":"starter","name":"Starter","price_cents_month":605,"monthly_call_quota":14050,"rps_limit":8,"hard_limit":true},{"slug":"pro","name":"Pro","price_cents_month":2595,"monthly_call_quota":191500,"rps_limit":20,"hard_limit":true},{"slug":"mega","name":"Mega","price_cents_month":6395,"monthly_call_quota":1000000,"rps_limit":50,"hard_limit":true}],"x-oanor-marketplace-url":"https://www.oanor.com/api/subtitle-api"}