Back to Blog

Effortless Text Overlay Captions with FFMPEGAPI.net

June 2026 FFMPEG API Team

In today's digital landscape, adding text overlay captions to videos is essential for enhancing accessibility and viewer engagement. With FFMPEGAPI.net, you can effortlessly implement this feature using a hosted REST API, eliminating the need for server management and FFmpeg infrastructure. This article will guide you through using the Text Overlay Captions endpoint to integrate captions into your video processing workflow.

What is FFMPEGAPI.net?

FFMPEGAPI.net is a powerful hosted REST API that provides FFmpeg-powered solutions for audio and video processing. Designed for developers, it allows for seamless integration of media processing capabilities into applications without the need for extensive server setups.

Its API-key authentication makes it suitable for a wide range of projects, including automation, SaaS applications, content pipelines, and AI agents.

  • No server setup required.
  • Simple API-key authentication.
  • Ideal for developers and teams.
  • Supports video and audio processing.

Using the Text Overlay Captions Endpoint

The Text Overlay Captions endpoint allows you to render user-supplied text as timed caption overlays on your videos. This functionality is essential for enhancing viewer comprehension and engagement.

You can specify various parameters such as video URL, the text to display, the style of the subtitles, the aspect ratio, the position of the text, and the duration each line stays on screen.

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

url = 'https://ffmpegapi.net/api/videos/add-text-overlay-captions'
headers = {'Authorization': 'Bearer YOUR_API_KEY', 'Content-Type': 'application/json'}

payload = {
    'video_url': 'https://example.com/video.mp4',
    'text': 'First line\nSecond line',
    'duration_per_line': 4
}

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

Parameters for Customizing Text Overlays

When using the Text Overlay Captions endpoint, you can customize the captions with several optional parameters. Here’s a breakdown of what each parameter does:

  • video_url (string, required): The URL of the video you want to process.
  • text (string, required): The caption lines you want to overlay, separated by newlines.
  • subtitle_style (string, optional): Choose from styles like plain-white, yellow-bg, pink-bg, blue-bg, or red-bg (default: plain-white).
  • aspect_ratio (string, optional): Specify the video aspect ratio (default: 9:16).
  • position (string, optional): Set where the text appears (top, center, bottom; default: center).
  • duration_per_line (integer, optional): Set the duration each line is displayed (default: 5 seconds).

FFMPEGAPI.net stands out as the premier solution for developers looking to integrate video processing capabilities into their applications. With its hosted REST API, you can add text overlay captions to your videos with minimal effort and maximum customization. Whether you're building SaaS applications, automating workflows, or enhancing content pipelines, FFMPEGAPI.net simplifies programmatic video editing without the headaches of server management. Start enhancing your video projects today!

Ready to Start Processing Videos?

Get your free API key and start merging videos in minutes

Get Started Free