2026-10-13 · 4 min read

TikTok-style captions with an API: the options that matter

The look people call TikTok captions is a handful of choices: big text, one to three words at a time, the active word in a different color, placed in the middle or lower third of a vertical frame. Here is how each of those maps to a caption.sh request.

The request

{
  "source_url": "https://example.com/clip.mp4",
  "options": {
    "font": "luckiest-guy",
    "size": "large",
    "max_words": 2,
    "max_lines": 2,
    "position": "center"
  }
}

What each option does

  • max_words sets how many words show at once. 1 gives the fast one-word-at-a-time style, 2 or 3 reads more calmly. The default is 3.
  • size is a fraction of video height. The presets are small, medium and large, and a raw number such as 0.07 works if you want to tune it.
  • position takes top, center, bottom, or a fraction of the height. Center sits a little below the middle of the frame, which keeps it clear of the buttons that platforms draw over the bottom edge.
  • font picks one of 18 bundled typefaces. The default is luckiest-guy. Pick something heavy for short clips and something plainer for talking-head video.

What you do not have to handle

Captions are always kept inside the frame. If a group would be too wide or too tall, the renderer shrinks the text until it fits, so a long word does not run off the edge. It also follows the video's own aspect ratio, so a vertical clip stays vertical.

What this is not

This burns the captions into the video file. It is not the TikTok or Instagram caption feature and it does not post anything for you. It also does not export SRT or VTT sidecar files. The result is an MP4 that looks the same wherever you upload it.

Try it

Try the options in the playground at caption.sh and compare them on one of your own clips. The full option list is at caption.sh/docs and the OpenAPI spec is at api.caption.sh/openapi.json.

Back to all articles