Back to Blog

Effortless Programmatic Video Editing with AI Captions on FFMPEGAPI.net

June 2026 FFMPEG API Team

In the fast-paced world of content creation, adding engaging captions to videos is crucial for audience retention and accessibility. FFMPEGAPI.net offers a powerful hosted REST API that enables developers to implement video processing features without the hassle of server management. This article will delve into the AI Captions endpoint, demonstrating how to transcribe videos and generate TikTok-style captions effortlessly.

What is the AI Captions Endpoint?

The AI Captions endpoint at FFMPEGAPI.net allows users to transcribe a video and render styled captions, making it perfect for social media platforms like TikTok. This API extracts audio from the provided video URL, transcribes it, and creates captions with customizable styles.

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

Understanding the Request Parameters

To use the AI Captions endpoint, you need to send a POST request to /api/videos/add-tiktok-captions with the appropriate parameters. Below is a breakdown of the required and optional parameters:

  • video_url (required): The URL of the video to transcribe.
  • subtitle_style (optional): Choose from styles like plain-white, yellow-bg, or pink-bg.
  • language (optional): Specify the language code or set to auto for automatic detection.
  • aspect_ratio (optional): Determine the aspect ratio such as 16:9 or 9:16.
  • max_chars_per_line (optional): Limit the character count per line (default: 20).
  • max_lines (optional): Set the maximum number of caption lines (default: 1).
  • position (optional): Define the location of the captions (top, center, bottom).

Making Your First API Call

Integrating the AI Captions functionality into your application is straightforward. Below is an example of how to make a call to the AI Captions endpoint using curl and Python.

  • Utilize the API-key for authentication.
  • Adapt the request parameters to suit your video and style preferences.
curl -X POST https://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://ffmpegapi.net/api/videos/add-tiktok-captions'
data = {
  'video_url': 'https://example.com/video.mp4',
  'subtitle_style': 'yellow-bg',
  'position': 'bottom'
}
headers = {'Content-Type': 'application/json'}
response = requests.post(url, json=data, headers=headers)
print(response.json())

FFMPEGAPI.net empowers developers to implement advanced video processing capabilities without the overhead of server management. With the AI Captions endpoint, you can enhance your video content programmatically and efficiently, allowing you to focus on creativity and engagement. Start leveraging FFMPEGAPI.net today to unlock the potential of automated video editing and captioning.

Ready to Start Processing Videos?

Get your free API key and start merging videos in minutes

Get Started Free