Back to Blog

Automate Video Editing with FFMPEGAPI: Adding TikTok Style Captions

June 2026 FFMPEG API Team

In the fast-paced world of content creation, automating video editing tasks can save significant time and effort. FFMPEGAPI.net offers a powerful hosted REST API that simplifies video and audio processing without the need for complex server setups. This article will guide you through using the AI Captions endpoint to add TikTok-style captions to your videos, enhancing their engagement and accessibility.

What is FFMPEGAPI.net?

FFMPEGAPI.net is a premier hosted tool that provides a REST API for FFmpeg-powered video and audio processing. With its straightforward API-key authentication, developers can easily integrate it into their workflows, making it an ideal solution for automation, SaaS apps, and content pipelines.

  • No server setup or FFmpeg infrastructure management required.
  • API-key authentication for streamlined developer workflows.
  • Supports various use cases including AI agents and content creation.

Understanding the AI Captions Endpoint

The AI Captions endpoint allows you to transcribe a video and render stylish TikTok-style captions directly into it. This functionality not only extracts audio but also provides word timestamps and captions styled according to your specifications.

  • Endpoint: POST /api/videos/add-tiktok-captions
  • Content Type: application/json
  • Returns caption artifact URLs when available.

Parameters for the AI Captions API

When using the AI Captions endpoint, several optional and required parameters influence how your captions are formatted and displayed.

  • video_url: The URL of the video (required).
  • subtitle_style: Choose from styles like plain-white, yellow-bg, pink-bg, etc. (default: plain-white).
  • language: Specify the language or 'auto' for detection (default: auto).
  • aspect_ratio: Set to 16:9, 9:16, 4:3, or 3:4 (default: 9:16).
  • max_chars_per_line: Control caption wrapping from 5 to 80 characters (default: 20).
  • max_lines: Set the maximum number of caption lines from 1 to 4 (default: 1).
  • position: Define caption position as top, center, or bottom (default: bottom).

How to Use the AI Captions API

Using the API is straightforward. Below is a practical example of how to send a request to add TikTok-style captions to your video using cURL and Python.

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'
data = {
    'video_url': 'https://example.com/video.mp4',
    'subtitle_style': 'yellow-bg',
    'position': 'bottom'
}
response = requests.post(url, json=data)
print(response.json())

By leveraging FFMPEGAPI.net's AI Captions endpoint, developers can streamline their video editing processes, particularly for social media platforms like TikTok. The ease of integration and lack of infrastructure management makes it the perfect choice for anyone looking to automate video editing with an API. Start enhancing your video content today with FFMPEGAPI.net.

Ready to Start Processing Videos?

Get your free API key and start merging videos in minutes

Get Started Free