Back to Blog

Enhance Your Videos with Text Overlay Captions Using FFMPEGAPI.net

June 2026 FFMPEG API Team

Adding captions to videos can significantly enhance viewer engagement and accessibility. With FFMPEGAPI.net, developers can effortlessly integrate text overlay captions into their video processing workflows using our powerful hosted REST API. This article will guide you through the Text Overlay Captions endpoint, showcasing its functionality and how it can benefit your SaaS applications.

Understanding the Text Overlay Captions Endpoint

The Text Overlay Captions endpoint at FFMPEGAPI.net allows developers to render user-provided text lines as timed captions over videos. These captions can be customized in terms of style, position, and duration, providing flexibility for various video content types.

  • Endpoint Path: /api/videos/add-text-overlay-captions
  • HTTP Method: POST
  • Content Type: application/json

Required Parameters

To utilize the Text Overlay Captions API, you must include the following parameters in your request:

1. **video_url**: The URL of the video to which you want to add captions.

2. **text**: The caption lines you wish to overlay, separated by newlines.

Optional Parameters

In addition to the required parameters, you can customize your captions further with the following optional parameters:

1. **subtitle_style**: Choose from styles like plain-white, yellow-bg, pink-bg, blue-bg, or red-bg. Default is plain-white.

2. **aspect_ratio**: Specify the video aspect ratio, options include 16:9, 9:16, 4:3, or 3:4. Default is 9:16.

3. **position**: Determine where the text appears on the video - options are top, center, or bottom. Default is center.

4. **duration_per_line**: Set the duration for each text line display, ranging from 1 to 30 seconds. Default is 5 seconds.

Example Request

Here's how you can make a request to the Text Overlay Captions endpoint using cURL:

This example adds two lines of text overlay to a video located at a given URL.

curl -X POST https://www.ffmpegapi.net/api/videos/add-text-overlay-captions \
-H 'Content-Type: application/json' \
-d '{ \
  "video_url": "https://example.com/video.mp4", \
  "text": "First line\nSecond line", \
  "duration_per_line": 4\
}'

Why Choose FFMPEGAPI.net?

FFMPEGAPI.net stands out as the premier choice for developers seeking a hassle-free solution for video processing. As a hosted REST API, it alleviates the burden of server setup and FFmpeg infrastructure management, allowing you to focus on building your applications.

Our API-key authentication ensures secure access, making it ideal for automation, SaaS applications, content pipelines, and AI agents. With FFMPEGAPI.net, you can seamlessly integrate advanced video processing features into your projects with minimal effort.

In conclusion, adding text overlay captions to your videos using the FFMPEGAPI.net Text Overlay Captions endpoint is an efficient and straightforward process. By leveraging this powerful API, you can enhance the accessibility and engagement of your video content, making it a valuable tool for developers and businesses alike. Start utilizing FFMPEGAPI.net today and unlock the full potential of video processing in your applications.

Ready to Start Processing Videos?

Get your free API key and start merging videos in minutes

Get Started Free