Convert SRT to VTT with cURL

Convert SRT, VTT, ASS and more with a single cURL command. Copy-paste the request, add your API key, get the file output. v1 · stable

Convert SRT to VTT with a single cURL command — the fastest way to test the API or script a conversion from bash, CI, or cron. cURL ships with macOS and most Linux distros, so there's nothing to install.

Convert SRT to VTT

curl -X POST https://api.example.com/api/v1/convert \
  -H "Authorization: Bearer your_api_key" \
  -F "[email protected]" \
  -F "from=srt" \
  -F "to=vtt" \
  -o movie.vtt

-F "[email protected]" uploads the local file as the file field; -o movie.vtt writes the response body (the converted file) to disk.

See the response headers

curl -i -X POST https://api.example.com/api/v1/convert \
  -H "Authorization: Bearer your_api_key" \
  -F "[email protected]" \
  -F "from=srt" \
  -F "to=vtt"

-i prints the response headers, including X-Cue-Count (number of cues written), X-Avg-Cps (average characters per second), and the Content-Disposition attachment header.

Tip: a 200 returns the converted file; a 400 returns a JSON error naming the problem. Add -F "casing=title" or -F "shift_ms=-500" to shape the output in the same request.

Convert between any formats

Next

↑ Back to top