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

Captions Api

POST

Generate captions from a video's audio using Vosk speech recognition and burn them onto the video with custom styling. Returns both the captioned video file and an SRT subtitle file. The pipeline: download → extract audio → transcribe → generate subtitles → burn onto video. positions : "bottom", "top", "center"

Guide

Overview

Generate captions from a video's audio using Vosk speech recognition and burn them onto the video with custom styling.

Returns both the captioned video file and an SRT subtitle file.

The pipeline: download → extract audio → transcribe → generate subtitles → burn onto video.

positions : "bottom", "top", "center"

Video Tutorial

Example Request Bodies

English captions (default)

{
  "url": "https://cdn.example.com/video.mp4",
  "language": "en",
  "position": "bottom",
  "font_size": 24,
  "font_color": "white",
  "padding_top": 30,
  "outline_color": "black",
  "outline_width": 2,
  "padding_bottom": 30,
  "max_words_per_line": 7,
  "max_segment_duration": 3
}

Auto-detect language

{
  "url": "https://cdn.example.com/video.mp4",
  "position": "bottom",
  "font_size": 24,
  "font_color": "white",
  "padding_top": 30,
  "outline_color": "black",
  "outline_width": 2,
  "padding_bottom": 30,
  "max_words_per_line": 7,
  "max_segment_duration": 3
}

Spanish, top position

{
  "url": "https://cdn.example.com/video.mp4",
  "language": "es",
  "position": "top",
  "font_size": 28,
  "font_color": "yellow",
  "padding_top": 40,
  "outline_color": "black",
  "outline_width": 2,
  "padding_bottom": 30,
  "max_words_per_line": 6,
  "max_segment_duration": 3
}

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/caption

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",
  "language": "en",
  "position": "bottom",
  "font_size": 24,
  "font_color": "white",
  "padding_top": 30,
  "outline_color": "black",
  "outline_width": 2,
  "padding_bottom": 30,
  "max_words_per_line": 7,
  "max_segment_duration": 3
}

Parameters

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

ParameterTypeDefaultDescription
urlstringrequiredVideo file URL
languagestringnullBCP-47 language code (e.g. en, es, zh). Omit to auto-detect
font_colorstringwhiteSubtitle color — name (white, yellow, red, etc.) or hex (#FFFF00)
font_sizeint24Font size in pixels (8–500)
outline_colorstringblackText outline color for readability
outline_widthint2Outline thickness in pixels (0–10, 0 disables)
positionstringbottomSubtitle position: bottom, top, or center
padding_bottomint30Pixel offset from bottom edge
padding_topint30Pixel offset from top edge
max_words_per_lineint7Max words per subtitle segment (1–20)
max_segment_durationfloat3.0Max seconds per subtitle segment (0.5–10.0)

Supported Languages

Pass any code below as the language parameter. Omit it entirely to let the API auto-detect the language.

CodeLanguage
enEnglish
zhChinese
esSpanish
hiHindi
arArabic
frFrench
ptPortuguese
ruRussian
deGerman
jaJapanese
koKorean
itItalian
trTurkish
plPolish
nlDutch
viVietnamese
idIndonesian
thThai
msMalay
ukUkrainian

Showing 20 most spoken — use filters or search to see all 99

Example Request— English captions (default)

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/caption" \
  -H "x-api-key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"url":"https://cdn.example.com/video.mp4","language":"en","position":"bottom","font_size":24,"font_color":"white","padding_top":30,"outline_color":"black","outline_width":2,"padding_bottom":30,"max_words_per_line":7,"max_segment_duration":3}'

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.