Migration Guide
The legacy POST /ffmpeg/run
is deprecated. Migrate to the new workflow:
POST /file
→ get an upload URLPUT <upload.url>
→ upload the filePOST /ffmpeg/process
→ reference inputs byfile_path
Key differences
Aspect | Legacy | New |
---|---|---|
Endpoint | POST /ffmpeg/run | POST /ffmpeg/process |
Body | multipart/form-data | application/json |
File ref | file | file_path (<dir_id>/<file_name> ) |
Organization | none | directory based |
Usage stats | none | detailed 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.