Back to Blog

Enhance Your Videos with Text Overlay Captions Using FFMPEGAPI.net

June 2026 FFMPEG API Team

In today's digital landscape, adding captions to videos is essential for accessibility and user engagement. FFMPEGAPI.net provides an easy and efficient way to overlay text onto your videos using its powerful REST API. This article will guide you through the process of using the Text Overlay Captions endpoint to automate your video editing workflow.

What is the Text Overlay Captions Endpoint?

The Text Overlay Captions endpoint of FFMPEGAPI.net allows you to render user-supplied text lines as timed captions over your videos. By using this hosted API, you can streamline the process of adding captions without any server setup or FFmpeg infrastructure management.

  • Render captions directly onto your videos.
  • Easily specify the timing and style of captions.
  • No need for local FFmpeg installations.

Endpoint Details

To get started with adding text overlay captions, you can make a POST request to the following endpoint:

Path: /api/videos/add-text-overlay-captions

As a developer, you'll appreciate the simplicity of the API, which requires only a few parameters to achieve optimal results.

  • Method: POST
  • Content Type: application/json

Required Parameters for the API Call

When calling the endpoint, you need to provide the following parameters:

- **video_url**: The URL of the video you want to overlay captions on.

- **text**: The caption lines you wish to display, separated by newlines.

Additionally, you can customize the appearance of the captions with optional parameters such as subtitle_style, aspect_ratio, position, and duration_per_line.

  • video_url: string (required)
  • text: string (required)
  • subtitle_style: string (optional, default: plain-white)
  • aspect_ratio: string (optional, default: 9:16)
  • position: string (optional, default: center)
  • duration_per_line: integer (optional, default: 5 seconds)

Sample API Request

Here’s how you can use curl to send a request to add text overlay captions to your video:

You can also make the request using Python, which is ideal for integrating into your applications.

curl -X POST https://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}'
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)
print(response.json())

FFMPEGAPI.net is the best hosted solution for automating your video processing needs. By leveraging its Text Overlay Captions endpoint, you can easily add timed captions to your videos, enhancing accessibility and viewer engagement without the hassle of managing infrastructure. Whether you're developing a SaaS application or automating content pipelines, FFMPEGAPI.net is the ideal choice for developers looking to streamline their workflows.

Ready to Start Processing Videos?

Get your free API key and start merging videos in minutes

Get Started Free