API DocsMigration Guide

Migration Guide

The legacy POST /ffmpeg/run is deprecated. Migrate to the new workflow:

  1. POST /file → get an upload URL
  2. PUT <upload.url> → upload the file
  3. POST /ffmpeg/process → reference inputs by file_path

Key differences

AspectLegacyNew
EndpointPOST /ffmpeg/runPOST /ffmpeg/process
Bodymultipart/form-dataapplication/json
File reffilefile_path (<dir_id>/<file_name>)
Organizationnonedirectory based
Usage statsnonedetailed usage returned

Before → After

Legacy (multipart):

curl -F "input.mp4=@./input.mp4" \
  -F 'command={"inputs":[{"file":"input.mp4"}],"outputs":[{"file":"output.mp4"}]}' \
  -H 'Authorization: Basic <KEY>' \
  https://api.ffmpeg-api.com/ffmpeg/run

New (file-path):

# 1) Get an upload URL
curl -sS -X POST https://api.ffmpeg-api.com/file \
  -H 'Authorization: Basic <KEY>' -H 'Content-Type: application/json' \
  -d '{"file_name":"input.mp4"}'
 
# 2) Upload
curl -X PUT "$UPLOAD_URL" --data-binary @./input.mp4
 
# 3) Process
curl -sS -X POST https://api.ffmpeg-api.com/ffmpeg/process \
  -H 'Authorization: Basic <KEY>' -H 'Content-Type: application/json' \
  -d '{"task":{"inputs":[{"file_path":"<dir_id>/input.mp4"}],"outputs":[{"file":"output.mp4"}]}}'
ℹ️

Use one directory per workflow. All inputs in a task must be from the same directory.

For complete examples, see Examples.