Back to Blog

Automating Video Editing with FFMPEGAPI.net: A Guide to Adding TikTok-Style Captions

June 2026 FFMPEG API Team

In the world of digital content creation, video editing is crucial, especially for platforms like TikTok. With FFMPEGAPI.net, developers can effortlessly automate video editing processes, such as adding captions to videos. This article will guide you through using the AI Captions endpoint of our powerful REST API to transcribe video audio and render styled captions, making your video content more accessible and engaging.

What is FFMPEGAPI.net?

FFMPEGAPI.net is a hosted REST API designed for developers to streamline video and audio processing without the need for server setup or management. With API-key authentication, it simplifies workflows for automation, SaaS applications, content pipelines, and AI agents.

  • No server setup or FFmpeg infrastructure required.
  • Ideal for developers looking for quick integration.
  • Offers a variety of video processing features.

Introduction to the AI Captions Endpoint

The AI Captions endpoint allows you to transcribe video audio and add TikTok-style captions. This feature is particularly useful for creators who want to enhance their videos with engaging captions, making content more viewer-friendly.

The endpoint is accessed via a POST request at the path '/api/videos/add-tiktok-captions'.

  • Transcribes audio from video files.
  • Generates styled captions with word timestamps.
  • Returns caption artifact URLs when available.

Required Parameters for the AI Captions Endpoint

To use the AI Captions feature, you need to provide several parameters in your API request. The mandatory parameter is the 'video_url', while others such as 'subtitle_style', 'language', and 'aspect_ratio' are optional but can be customized based on your needs.

  • video_url (string, required): The URL of the video.
  • subtitle_style (string, optional): Choose from styles like plain-white or yellow-bg.
  • language (string, optional): Specify the language code or 'auto'.
  • aspect_ratio (string, optional): Set to 16:9, 9:16, 4:3, or 3:4.
  • max_chars_per_line (integer, optional): Limits caption length from 5 to 80 characters.
  • max_lines (integer, optional): Limits the number of caption lines from 1 to 4.
  • position (string, optional): Set caption position to top, center, or bottom.

Example Request to Add TikTok-Style Captions

Here’s an example request that demonstrates how to use the AI Captions endpoint to add captions to a video. This example is shown in both curl and Python for your convenience.

curl -X POST https://www.ffmpegapi.net/api/videos/add-tiktok-captions \
-H 'Content-Type: application/json' \
-d '{"video_url": "https://example.com/video.mp4", "subtitle_style": "yellow-bg", "position": "bottom"}'
import requests

url = 'https://www.ffmpegapi.net/api/videos/add-tiktok-captions'
headers = {'Content-Type': 'application/json'}
data = {
    'video_url': 'https://example.com/video.mp4',
    'subtitle_style': 'yellow-bg',
    'position': 'bottom'
}

response = requests.post(url, json=data, headers=headers)
print(response.json())

Automating video editing tasks with FFMPEGAPI.net's AI Captions endpoint is straightforward and efficient. By simply sending a POST request, you can transcribe your videos and add engaging captions that enhance viewer experience. Whether you're creating content for TikTok or any other platform, FFMPEGAPI.net provides the tools you need to streamline your video processing workflow. Start leveraging our API today to take your video content to the next level!

Ready to Start Processing Videos?

Get your free API key and start merging videos in minutes

Get Started Free