Back to Blog

The Best Way to Merge Videos Programmatically with FFMPEGAPI.net

June 2026 FFMPEG API Team

As a developer, streamlining video processing tasks is crucial for enhancing productivity. With FFMPEGAPI.net, you can easily merge videos and add engaging TikTok-style captions without the hassle of managing your own FFmpeg infrastructure. This blog post will guide you through the process of using our AI Captions endpoint to enhance your video content.

Why Use FFMPEGAPI.net for Video Processing?

FFMPEGAPI.net offers a powerful hosted REST API for video and audio processing. As a developer, you can focus on building applications without worrying about the complexities of server setup or FFmpeg management.

Our API-key authentication ensures a secure workflow, making it suitable for automation, SaaS apps, content pipelines, and AI agents.

  • Hosted solution with no infrastructure management.
  • Scalable and easy to integrate into existing applications.
  • Supports a wide range of video processing features.

Using the AI Captions Endpoint

The AI Captions endpoint allows you to transcribe a video and render styled captions with ease. This is particularly useful for creating dynamic content suitable for platforms like TikTok.

To use this endpoint, you'll need to send a POST request to /api/videos/add-tiktok-captions with the appropriate parameters.

  • Automatically transcribes audio and generates captions.
  • Offers customizable subtitle styles and positioning.
  • Returns caption artifact URLs for easy access.
curl -X POST https://ffmpegapi.net/api/videos/add-tiktok-captions \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer YOUR_API_KEY' \
-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 = {'Authorization': 'Bearer YOUR_API_KEY', 'Content-Type': 'application/json'}

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

Parameters for AI Captions

The AI Captions endpoint accepts several parameters to customize your video output:

Understanding these parameters allows you to tailor the captioning to your specific needs, improving viewer engagement.

  • video_url (string, required): URL of the video.
  • subtitle_style (string, optional): Choose from plain-white, yellow-bg, pink-bg, blue-bg, or red-bg.
  • language (string, optional): Specify language code or use 'auto'.
  • aspect_ratio (string, optional): Options include 16:9, 9:16, 4:3, or 3:4.
  • max_chars_per_line (integer, optional): Limit from 5 to 80 characters.
  • max_lines (integer, optional): Define maximum caption lines from 1 to 4.
  • position (string, optional): Choose where captions appear - top, center, or bottom.

Incorporating video captions can significantly enhance your content's accessibility and engagement. With FFMPEGAPI.net's AI Captions endpoint, merging videos and adding captions has never been easier. Leverage our hosted API to streamline your video processing workflows today!

Ready to Start Processing Videos?

Get your free API key and start merging videos in minutes

Get Started Free