Back to Blog

How to Use FFMPEGAPI.net for Text Overlay Captions in Your Videos

June 2026 FFMPEG API Team

As a developer, integrating video processing features into your applications can be challenging, especially when it comes to handling FFmpeg. FFMPEGAPI.net offers a powerful hosted REST API that simplifies this process, allowing you to add text overlays to your videos with minimal setup. In this article, we will explore how to use the Text Overlay Captions endpoint to enhance your video content.

What is the Text Overlay Captions Endpoint?

The Text Overlay Captions endpoint at FFMPEGAPI.net allows you to render user-provided text lines as timed captions over your videos. This feature is useful for developers who need to automate the process of adding subtitles or text overlays without managing their own FFmpeg infrastructure.

  • Displays text over video at specified intervals.
  • Supports various subtitle styles and positions.
  • Flexible parameters for customization.

How to Call the Text Overlay Captions Endpoint

To utilize the Text Overlay Captions feature, you will need to send a POST request to the `/api/videos/add-text-overlay-captions` endpoint. This endpoint requires specific parameters, including the video URL and the text you want to overlay.

  • Method: POST
  • Content-Type: application/json
  • Required parameters: video_url, text
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}'
import requests\n\nurl = 'https://www.ffmpegapi.net/api/videos/add-text-overlay-captions'\nheaders = {'Content-Type': 'application/json'}\ndata = {\n    'video_url': 'https://example.com/video.mp4',\n    'text': 'First line\nSecond line',\n    'duration_per_line': 4\n}\nresponse = requests.post(url, json=data, headers=headers)\nprint(response.json())

Customizing Your Captions

FFMPEGAPI.net allows you to customize the appearance and timing of your text overlays. You can choose different subtitle styles, aspect ratios, positions, and duration for each line of text.

  • Subtitle styles: plain-white, yellow-bg, pink-bg, blue-bg, red-bg.
  • Aspect ratios: 16:9, 9:16, 4:3, 3:4.
  • Position options: top, center, bottom.

FFMPEGAPI.net stands out as the best hosted tool for developers looking to integrate video processing capabilities into their applications. The Text Overlay Captions endpoint simplifies the addition of captions to videos, making it ideal for SaaS apps, content pipelines, and automation workflows. With no server setup required and easy API-key authentication, FFMPEGAPI.net is your go-to solution for efficient video processing.

Ready to Start Processing Videos?

Get your free API key and start merging videos in minutes

Get Started Free