FFMPEG API Guide

How do I merge videos with an API?

Use FFMPEG API to merge multiple video URLs into one MP4 from REST, OpenAPI, or MCP clients.

Video Merge

Downloads one or more videos, normalizes them when needed, and concatenates them. Optional audio replacement, output dimensions, subtitle burn-in, and watermark overlay are supported.

Endpoint: POST /api/merge_videos

Authentication: send X-API-Key: your_api_key_here.

curl Example

curl -X POST "https://ffmpegapi.net/api/merge_videos" \
  -H "X-API-Key: your_api_key_here" \
  -H "Content-Type: application/json" \
  -d '{
  "video_urls": [
    "https://example.com/intro.mp4",
    "https://example.com/main.mp4"
  ],
  "dimensions": "1920x1080"
}'

Request Body

{
  "dimensions": "1920x1080",
  "video_urls": [
    "https://example.com/intro.mp4",
    "https://example.com/main.mp4"
  ]
}

Success Response

{
  "download_url": "https://ffmpegapi.net/api/storage/video_abc123.mp4",
  "filename": "video_abc123.mp4",
  "message": "Video Merge 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/merge_videos for authenticated video merging and returns a downloadable MP4 URL or async job status.

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