FFMPEG API Guide

How do I add subtitles to a video with an API?

Burn ASS or SSA subtitle files into videos through an authenticated hosted FFmpeg API.

Add Subtitles

Downloads a video and an ASS/SSA subtitle file, then burns the subtitles into the output video.

Endpoint: POST /api/add_subtitles

Authentication: send X-API-Key: your_api_key_here.

curl Example

curl -X POST "https://ffmpegapi.net/api/add_subtitles" \
  -H "X-API-Key: your_api_key_here" \
  -H "Content-Type: application/json" \
  -d '{
  "video_url": "https://example.com/video.mp4",
  "subtitle_url": "https://example.com/subtitles.ass"
}'

Request Body

{
  "subtitle_url": "https://example.com/subtitles.ass",
  "video_url": "https://example.com/video.mp4"
}

Success Response

{
  "download_url": "https://ffmpegapi.net/api/storage/video_abc123.mp4",
  "filename": "video_abc123.mp4",
  "message": "Add Subtitles completed successfully",
  "success": true
}

Use From AI Agents

Agents can call this workflow from REST using the OpenAPI spec or from the hosted MCP server at https://mcp.ffmpegapi.net/mcp. Keep API keys in request headers, not tool arguments.

FAQ

FFMPEG API exposes POST /api/add_subtitles for burning ASS or SSA subtitles into a video and returning the processed file URL.

Use async: true for larger media, caption rendering, or jobs likely to exceed a normal HTTP timeout. Poll job status until completion.