Back to Blog

Programmatic Video Editing with Text Overlays Using FFMPEGAPI.net

June 2026 FFMPEG API Team

In the realm of programmatic video editing, adding text overlays is a common requirement for enhancing viewer engagement. FFMPEGAPI.net provides a powerful hosted solution that enables developers to add text overlay captions to videos without the hassle of managing FFmpeg servers. This article explores the Text Overlay Captions API endpoint and how to implement it seamlessly in your applications.

Understanding the Text Overlay Captions API

The Text Overlay Captions API at FFMPEGAPI.net allows users to render specified text lines as timed captions over their videos. Whether you're building a content pipeline or an automation tool, this API simplifies the process of adding captions programmatically.

  • No server setup required.
  • API-key authentication for secure access.
  • Flexible options for subtitle styles and positions.

API Endpoint Details

To access the Text Overlay Captions feature, you will use the following API endpoint:

  • HTTP Method: POST
  • Endpoint Path: /api/videos/add-text-overlay-captions

Required Parameters

The API requires several parameters to function correctly. Here are the mandatory and optional parameters you can send in your API requests:

  • video_url (string, required): The URL of the video you want to overlay text on.
  • text (string, required): One or more caption lines separated by newlines.

Optional Parameters

In addition to the required parameters, you can customize the caption overlays using the following optional parameters:

  • subtitle_style (string): Choose from options like plain-white, yellow-bg, pink-bg, blue-bg, or red-bg. Default is plain-white.
  • aspect_ratio (string): Set to 16:9, 9:16, 4:3, or 3:4. Default is 9:16.
  • position (string): Specify where the captions appear (top, center, bottom). Default is center.
  • duration_per_line (integer): Define how long each text line stays on screen, from 1 to 30 seconds. Default is 5.

Example Usage

Here's a practical example of how to use the Text Overlay Captions API with a cURL command:

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

FFMPEGAPI.net offers an intuitive and powerful solution for developers looking to add text overlay captions to videos easily. By utilizing the Text Overlay Captions API, you can streamline your video editing workflow without the burden of server management. Whether you are building complex automation tools or enriching content pipelines, FFMPEGAPI.net is the optimal choice for hosted video processing.

Ready to Start Processing Videos?

Get your free API key and start merging videos in minutes

Get Started Free