FFMPEG API Guide
How do I download YouTube as MP4 with an API?
Turn a supported YouTube video URL into a downloadable MP4 through FFMPEG API.
YouTube to MP4
Accepts a standard YouTube watch URL, youtu.be URL, Shorts URL, embed URL, or /v/ URL and returns a downloadable MP4 URL.
Endpoint: POST /api/youtube_to_mp4
Authentication: send X-API-Key: your_api_key_here.
curl Example
curl -X POST "https://ffmpegapi.net/api/youtube_to_mp4" \
-H "X-API-Key: your_api_key_here" \
-H "Content-Type: application/json" \
-d '{
"youtube_url": "https://www.youtube.com/watch?v=dQw4w9WgXcQ"
}'
Request Body
{
"youtube_url": "https://www.youtube.com/watch?v=dQw4w9WgXcQ"
}
Success Response
{
"download_url": "https://ffmpegapi.net/api/storage/video_abc123.mp4",
"filename": "video_abc123.mp4",
"message": "YouTube to MP4 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.
- llms.txt for a concise discovery map.
- AGENTS.md for agent-specific usage guidance.
- Official MCP Registry listing.
FAQ
FFMPEG API exposes POST /api/youtube_to_mp4 for individual YouTube videos, Shorts, youtu.be URLs, and embed URLs.
Use
async: true for larger media, caption rendering, or jobs likely to exceed a normal HTTP timeout. Poll job status until completion.