FFmpeg behind a plain HTTP call. Convert to MP4 or WebM, pull the audio track out, cut a clip, build a GIF, or just read the stream metadata.
Click one to see its parameters and a ready-to-paste curl call.
Read container, codecs, duration and bitrate
Returns: json
| Parameter | Type | Description |
|---|---|---|
file |
file |
Audio or video file. |
url |
string |
Public URL instead of an upload. |
curl -X POST "https://173-249-18-142.sslip.io/v1/media/info" \
-H "X-API-Key: $SMALLAPIS_KEY" \
-F "file=@input.mp4"
Transcode a video to MP4, WebM or MKV
Returns: binary video
| Parameter | Type | Description |
|---|---|---|
file |
file |
Source video. |
format |
string |
mp4, webm or mkv. Default: mp4 |
crf |
integer |
Quality, 14 (best) to 45 (smallest). Default: 26 |
height |
integer |
Scale to this height, keeping the aspect ratio. |
fps |
integer |
Force a frame rate. |
mute |
boolean |
Drop the audio track. Default: false |
curl -X POST "https://173-249-18-142.sslip.io/v1/media/convert" \
-H "X-API-Key: $SMALLAPIS_KEY" \
-F "file=@input.mp4" \
-F "format=mp4" \
-F "crf=26" \
-F "mute=false" \
--output result.bin
Shrink a video with one quality knob
Returns: binary video
| Parameter | Type | Description |
|---|---|---|
file |
file |
Source video. |
quality |
string |
high, balanced or small. Default: balanced |
curl -X POST "https://173-249-18-142.sslip.io/v1/media/compress" \
-H "X-API-Key: $SMALLAPIS_KEY" \
-F "file=@input.mp4" \
-F "quality=balanced" \
--output result.bin
Extract or convert the audio track
Returns: binary audio
| Parameter | Type | Description |
|---|---|---|
file |
file |
Source media. |
format |
string |
mp3, aac, opus, wav or flac. Default: mp3 |
bitrate |
integer |
Target bitrate in kbps for lossy formats. Default: 192 |
mono |
boolean |
Downmix to a single channel. Default: false |
curl -X POST "https://173-249-18-142.sslip.io/v1/media/audio" \
-H "X-API-Key: $SMALLAPIS_KEY" \
-F "file=@input.mp4" \
-F "format=mp3" \
-F "bitrate=192" \
-F "mono=false" \
--output result.bin
Grab a frame as a JPEG
Returns: binary image
| Parameter | Type | Description |
|---|---|---|
file |
file |
Source video. |
time |
number |
Timestamp in seconds. |
width |
integer |
Output width in pixels. Default: 640 |
curl -X POST "https://173-249-18-142.sslip.io/v1/media/thumbnail" \
-H "X-API-Key: $SMALLAPIS_KEY" \
-F "file=@input.mp4" \
-F "width=640" \
--output result.bin
Stream-copies by default, so a cut is near-instant and lossless.
Returns: binary media
| Parameter | Type | Description |
|---|---|---|
file |
file |
Source media. |
start |
number |
Start offset in seconds. Default: 0 |
duration |
number |
Clip length in seconds. Pass this or `end`. |
end |
number |
End offset in seconds. |
reencode |
boolean |
Re-encode for a frame-accurate cut. Default: false |
curl -X POST "https://173-249-18-142.sslip.io/v1/media/trim" \
-H "X-API-Key: $SMALLAPIS_KEY" \
-F "file=@input.mp4" \
-F "start=0" \
-F "reencode=false" \
--output result.bin
Turn a clip into a GIF or animated WebP
Returns: binary image
| Parameter | Type | Description |
|---|---|---|
file |
file |
Source video. |
start |
number |
Start offset in seconds. Default: 0 |
duration |
number |
Clip length in seconds, max 30. Default: 5 |
width |
integer |
Output width in pixels. Default: 480 |
fps |
integer |
Frames per second, 5-30. Default: 12 |
format |
string |
gif or webp. Default: gif |
curl -X POST "https://173-249-18-142.sslip.io/v1/media/gif" \
-H "X-API-Key: $SMALLAPIS_KEY" \
-F "file=@input.mp4" \
-F "start=0" \
-F "duration=5" \
-F "width=480" \
-F "fps=12" \
--output result.bin