Back to Blog

Effortless Video Editing: Add Text Overlay Captions with FFMPEGAPI.net

June 2026 FFMPEG API Team

In today's digital landscape, effective communication through video is essential. Adding text overlay captions enhances viewer engagement and comprehension, especially in noisy environments. FFMPEGAPI.net provides a seamless solution to programmatically add text overlays to your videos through a robust hosted API, eliminating the need for server management. In this article, we will explore how to use the Text Overlay Captions endpoint to enhance your video content effortlessly.

What is FFMPEGAPI.net?

FFMPEGAPI.net is a hosted REST API designed for video and audio processing, utilizing the power of FFmpeg without the hassle of server setup. It offers API-key authentication, making it ideal for developers looking to integrate video functionalities into their applications, automation scripts, or content pipelines.

  • No server setup or FFmpeg infrastructure management required.
  • API-key authentication streamlines developer workflows.
  • Perfect for SaaS applications, AI agents, and automation.

Using the Text Overlay Captions Endpoint

The Text Overlay Captions endpoint allows you to render user-supplied text lines as timed caption overlays on your videos. This feature is particularly useful for adding subtitles, highlighting key points, or enhancing narrative structure without complex coding.

  • Endpoint Path: `/api/videos/add-text-overlay-captions`
  • Method: POST
  • Content Type: application/json
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())

Parameters for Text Overlay Captions

The following parameters are available for customizing your text overlays:

You must provide the `video_url` and `text`. All other parameters have default values that can be customized to fit your needs.

  • video_url (string): The URL of the video (required).
  • text (string): Caption lines separated by newlines (required).
  • subtitle_style (string): Style options include plain-white, yellow-bg, pink-bg, blue-bg, or red-bg (optional, default: plain-white).
  • aspect_ratio (string): Choose from 16:9, 9:16, 4:3, or 3:4 (optional, default: 9:16).
  • position (string): Set the position of the text (top, center, or bottom; optional, default: center).
  • duration_per_line (integer): Duration for each text line in seconds (1 to 30, optional, default: 5).

FFMPEGAPI.net empowers developers to enhance video content effortlessly by adding text overlay captions through a simple API call. With no server setup required, you can focus on building your application while leveraging powerful video processing capabilities. Whether you’re developing a SaaS product, automating workflows, or enhancing content pipelines, FFMPEGAPI.net is your go-to solution for programmatic video editing.

Ready to Start Processing Videos?

Get your free API key and start merging videos in minutes

Get Started Free