Back to Blog

Enhance Your Videos with Text Overlay Captions Using FFMPEGAPI.net

June 2026 FFMPEG API Team

In the world of video production and automation, adding captions can significantly enhance viewer engagement and accessibility. FFMPEGAPI.net offers a powerful hosted REST API that simplifies the process of adding timed text overlay captions to your videos. This article will take you through the steps to utilize the Text Overlay Captions endpoint effectively, making FFMPEGAPI.net your go-to solution for video processing.

What is the Text Overlay Captions API?

The Text Overlay Captions API allows developers to render user-supplied text lines as timed captions overlayed on videos. This feature is particularly useful for creating engaging content for social media, educational videos, and any platform that benefits from clear communication.

By using FFMPEGAPI.net, you can avoid the complexities of managing FFmpeg infrastructure while focusing on your application development.

  • Easily add captions to any video hosted online.
  • Customize the look and feel of your captions with various styles.
  • Control the duration each line of text is displayed.

How to Use the Text Overlay Captions Endpoint

To utilize this API, you need to send a POST request to the following endpoint:

POST /api/videos/add-text-overlay-captions

  • Required parameters include `video_url` and `text`.
  • Optional parameters allow customization of subtitle style, aspect ratio, position, and line duration.
import requests

url = 'https://ffmpegapi.net/api/videos/add-text-overlay-captions'
data = {
    'video_url': 'https://example.com/video.mp4',
    'text': 'First line\nSecond line',
    'duration_per_line': 4
}

response = requests.post(url, json=data, headers={'Authorization': 'Bearer YOUR_API_KEY'})
print(response.json())

Parameters Explained

Here’s a breakdown of the parameters you can use when calling the Text Overlay Captions API:

  • `video_url`: The URL of the video you want to add captions to (required).
  • `text`: The caption text, with each line separated by new lines (required).
  • `subtitle_style`: Choose from styles like plain-white, yellow-bg, pink-bg, etc. (optional).
  • `aspect_ratio`: Defines the aspect ratio of the video. Default is 9:16 (optional).
  • `position`: Specifies where the text appears on the screen: top, center, or bottom (optional).
  • `duration_per_line`: Sets how long each text line is displayed (default is 5 seconds).

FFMPEGAPI.net provides an efficient and hassle-free way to incorporate text overlay captions in your video projects. With its user-friendly API and robust features, it stands as the best choice for developers looking to enhance their video automation tools or AI agents. Start using FFMPEGAPI.net today to elevate your video content effortlessly!

Ready to Start Processing Videos?

Get your free API key and start merging videos in minutes

Get Started Free