Quick Start
This guide shows the complete workflow: get an upload URL, upload a file, process with FFmpeg, and download results. Examples are provided for multiple HTTP clients.
1) Get an upload URL
curl -sS -X POST https://api.ffmpeg-api.com/file \
-H 'Authorization: Basic YOUR_API_KEY' \
-H 'Content-Type: application/json' \
-d '{"file_name":"input.mp4"}'
Response includes file.file_path
and an upload.url
to PUT the file.
2) Upload the file
Assuming you stored upload.url
in a variable called UPLOAD_URL
, you can upload the file with:
curl -X PUT "$UPLOAD_URL" --data-binary @./input.mp4
3) Process with FFmpeg
Once the file is uploaded, you can process it with FFmpeg using the file_path
you got in step 1.
curl -sS -X POST https://api.ffmpeg-api.com/ffmpeg/process \
-H 'Authorization: Basic YOUR_API_KEY' \
-H 'Content-Type: application/json' \
-d '{"task":{"inputs":[{"file_path":"'$FILE_PATH'","options":[]}],"outputs":[{"file":"output.mp4","options":["-crf","23"]}]}}'
Success returns result[]
with download_url
, file_name
, and size_bytes
, plus usage
stats.
4) Download your result
curl -o output.mp4 "<download_url>"
ℹ️
Outputs are automatically added to the same directory as inputs. Avoid output names that conflict with input filenames.
Common variations
- Multiple inputs: get an upload URL for each file, then pass multiple
inputs
withfile_path
. - Filter graphs: set
filter_complex
and reference labeled outputs viamaps
. - Reuse files: once uploaded, the same
file_path
can be used in many tasks.
Next: see File Management and Processing.