Convert SRT to ASS with the SubtoVTT API

Convert SRT to ASS/SSA with styling via the SubtoVTT API. Control positioning, fonts and effects with one request. v1 · stable

Convert SRT to ASS programmatically with one HTTP request. The SRT to ASS API adds what SRT lacks: styling, positioning, and per-line placement control. ASS files support {\an...} alignment markers, colors, and fonts — useful when captions need to sit above a player's chrome, clear of burned-in logos, or match a video's visual style.

SRT has no positioning syntax, so the conversion produces ASS dialogue with default styling unless you pass parameters to control placement. One credit per conversion, 100 free credits to start.

Why convert SRT to ASS with an API

  • Positioning: place captions away from on-screen overlays.
  • Styling: prep files for players with ASS support.
  • Automate: generate styled subtitles in a pipeline.

Convert with cURL

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

Compact example — Go

package main

import (
	"bytes"
	"io"
	"mime/multipart"
	"net/http"
	"os"
)

func main() {
	var body bytes.Buffer
	w := multipart.NewWriter(&body)

	f, _ := os.Open("movie.srt")
	part, _ := w.CreateFormFile("file", "movie.srt")
	io.Copy(part, f)
	f.Close()

	w.WriteField("from", "srt")
	w.WriteField("to", "ass")
	w.WriteField("position", "middle")
	w.Close()

	req, _ := http.NewRequest(http.MethodPost, "https://api.example.com/api/v1/convert", &body)
	req.Header.Set("Authorization", "Bearer "+os.Getenv("SUBTOVTT_API_KEY"))
	req.Header.Set("Content-Type", w.FormDataContentType())

	resp, _ := http.DefaultClient.Do(req)
	defer resp.Body.Close()
	out, _ := os.Create("movie.ass")
	defer out.Close()
	io.Copy(out, resp.Body)
}

Full examples by language

Format notes

Topic Detail
Output ASS (.ass)
Styling Default style applied, editable in the ASS header
Positioning position param: none/top/middle/bottom/remove
Alignment {\an...} markers usable in the output
Usage Players with ASS support, stylized captions

Tip: ASS is picky about font metrics — test on your target player before shipping. position=top lifts captions clear of on-screen overlays.

FAQ

Can I control where captions appear? Yes — pass position=top|middle|bottom (or none/remove) and the converter writes the matching {\an...} alignment markers.

Is ASS output valid for styled players? Yes, it produces a standard .ass file with a default style block you can edit.

Next

↑ Back to top