Tools /

Convert format

Convert subtitles between SRT, WebVTT, ASS and JSON. Timing and text are preserved; styling is kept where the target format supports it.

convert_subtitles

Plan
All plans
Usage
1 upload
Effect
Returns a new file

Parameters

ParameterTypeDescription
contentrequiredstringFull subtitle file contents as text (SRT, WebVTT, ASS/SSA, or the JSON produced by convert_subtitles).
filenameoptionalstringOriginal file name. The extension helps detect the format.
formatoptionalenumInput format. Detected from the file name or contents when omitted."srt" · "vtt" · "ass" · "ssa" · "json"
outputFormatrequiredenumFormat to convert to."srt" · "vtt" · "ass" · "json"

Example

You ask your assistant:

“Turn this SRT into WebVTT for my HTML5 player.”

It calls convert_subtitles with:

arguments
{
  "filename": "talk.srt",
  "content": "1\n00:00:01,000 --> 00:00:03,500\nHello there.\n",
  "outputFormat": "vtt"
}

and gets back:

result
Converted 120 cues from SRT to VTT.

WEBVTT

00:00:01.000 --> 00:00:03.500
Hello there.