Eranol LogoEranol
BlogCommunityDocumentationPricingSign In

General

OverviewGet Started

Universal

Add IntroAdd OutroAudio to VideoBackground AudioCaptions ApiComposeConcatConvert a video file to MP4Convert Audio to Mp3Convert Audio to wavConvert to JPGConvert to WebMConvert to WebPDenoiseExtract audio track from a videoExtract images from a videoGenerate a GIF from a videoHighlightsImageMergeNotifyOverlayProgress BarReframeRemove SilenceThumbnailTikTokTrimVerifyWatermarkZoom

General

DeleteImage StatusStatusTikTok StatusFFmpeg Results

Need help?

Contact Support

Overlay

POST

Overlay text or an image on a video with per-frame rendering. Supports: Text overlay using drawtext (with font, colour, position control) Image overlay using the overlay filter (PNG recommended) Time-range control (start_sec / end_sec) Opacity control Example (text): {"url": "https://cdn.example.com/video.mp4", "text": "LIVE", "position": "top_right", "font_color": "red"} Example (image): {"url": "https://cdn.example.com/video.mp4", "overlay_url": "https://cdn.example.com/badge.png", "position": "bottom_left"}

Guide

Overview

Overlay text or an image on a video with per-frame rendering.

Supports:

Text overlay using drawtext (with font, colour, position control) Image overlay using the overlay filter (PNG recommended) Time-range control (start_sec / end_sec) Opacity control Example (text): {"url": "https://cdn.example.com/video.mp4", "text": "LIVE", "position": "top_right", "font_color": "red"}

Example (image): {"url": "https://cdn.example.com/video.mp4", "overlay_url": "https://cdn.example.com/badge.png", "position": "bottom_left"}

Example Request Bodies

Live badge text (top-right, timed)

{
  "url": "https://cdn.example.com/video.mp4",
  "type": "text",
  "margin": 15,
  "content": "LIVE",
  "end_sec": 10,
  "position": "top_right",
  "font_size": 32,
  "start_sec": 0,
  "font_color": "#ff0000"
}

Single image watermark (named position, semi-transparent)

{
  "url": "https://cdn.example.com/video.mp4",
  "type": "image",
  "scale": 0.1,
  "margin": 20,
  "content": "https://cdn.example.com/watermark.png",
  "opacity": 0.5,
  "position": "bottom_right"
}

Single image overlay (exact pixel position, timed)

{
  "x": 50,
  "y": 50,
  "url": "https://cdn.example.com/video.mp4",
  "type": "image",
  "scale": 0.15,
  "content": "https://cdn.example.com/badge.png",
  "end_sec": 8,
  "opacity": 0.8,
  "start_sec": 2
}

Multiple overlays — image + text together

{
  "url": "https://cdn.example.com/video.mp4",
  "overlays": [
    {
      "x": 20,
      "y": 20,
      "type": "image",
      "scale": 0.12,
      "content": "https://cdn.example.com/logo.png",
      "opacity": 0.9
    },
    {
      "type": "text",
      "margin": 20,
      "content": "Breaking News",
      "end_sec": 12,
      "position": "bottom_left",
      "font_size": 40,
      "start_sec": 3,
      "font_color": "#ffffff"
    }
  ]
}

Multiple timed image overlays (e.g. sponsor logos swapping in/out)

{
  "url": "https://cdn.example.com/video.mp4",
  "overlays": [
    {
      "x": 30,
      "y": 30,
      "type": "image",
      "scale": 0.15,
      "content": "https://cdn.example.com/sponsor-a.png",
      "end_sec": 10,
      "opacity": 1,
      "start_sec": 0
    },
    {
      "x": 30,
      "y": 30,
      "type": "image",
      "scale": 0.15,
      "content": "https://cdn.example.com/sponsor-b.png",
      "end_sec": 20,
      "opacity": 1,
      "start_sec": 10
    }
  ]
}

Example Response

{
  "job_id": "f595b9ad-1e15-4452-b7c2-8f8ff09c0a34",
  "status": "pending",
  "message": "Job created. Poll status_url for progress.",
  "job_type": "caption",
  "result_url": "https://eranol.com/api/v1/ffmpeg/result/f595b9ad-1e15-4452-b7c2-8f8ff09c0a34",
  "status_url": "https://eranol.com/api/v1/ffmpeg/status/f595b9ad-1e15-4452-b7c2-8f8ff09c0a34"
}

Endpoint

Send your requests to the following URL using the specified HTTP method.

POST https://eranol.com/api/v1/ffmpeg/video/overlay

Headers

Include the following headers with every request. Your API key is required for authentication.

Content-Type:application/json
x-api-key:YOUR_API_KEY

Request Body

Send the following JSON payload in the request body. Adjust the values to match your use case.

json
{
  "url": "https://cdn.example.com/video.mp4",
  "type": "text",
  "margin": 15,
  "content": "LIVE",
  "end_sec": 10,
  "position": "top_right",
  "font_size": 32,
  "start_sec": 0,
  "font_color": "#ff0000"
}

Parameters

All available options for this endpoint. Required parameters are marked accordingly.

ParameterTypeDefaultDescription
urlstringrequiredVideo file URL
overlaysarrayrequiredArray of overlay objects to apply
overlays[].typestringrequiredOverlay type: text or image
overlays[].contentstringrequiredText string or image URL
overlays[].xint0X position in pixels from left
overlays[].yint0Y position in pixels from top
overlays[].start_secfloat0Start time in seconds
overlays[].end_secfloatnullEnd time in seconds (null = until end)
overlays[].font_sizeint24Font size (text overlays only)
overlays[].font_colorstringwhiteFont color (text overlays only)
overlays[].scalefloat0.2Scale relative to video width (image overlays only)
overlays[].opacityfloat1.0Overlay opacity (0.0–1.0)

Example Request— Live badge text (top-right, timed)

Use the following cURL command to make a request to this API endpoint. Replace YOUR_API_KEY with your actual API key from the dashboard.

bash
curl -X POST "https://eranol.com/api/v1/ffmpeg/video/overlay" \
  -H "x-api-key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"url":"https://cdn.example.com/video.mp4","type":"text","margin":15,"content":"LIVE","end_sec":10,"position":"top_right","font_size":32,"start_sec":0,"font_color":"#ff0000"}'

Example Response

Below is an example of a successful JSON response from this endpoint.

json
{
  "job_id": "f595b9ad-1e15-4452-b7c2-8f8ff09c0a34",
  "status": "pending",
  "message": "Job created. Poll status_url for progress.",
  "job_type": "caption",
  "result_url": "https://eranol.com/api/v1/ffmpeg/result/f595b9ad-1e15-4452-b7c2-8f8ff09c0a34",
  "status_url": "https://eranol.com/api/v1/ffmpeg/status/f595b9ad-1e15-4452-b7c2-8f8ff09c0a34"
}

Response Status

A successful request will return one of the following HTTP status codes.

200 OKRequest was successful and data is returned in the response body.
201 CreatedResource was successfully created.
401 UnauthorizedMissing or invalid API key.
429 Too Many RequestsRate limit exceeded. Try again later.