Video Compress API
Convert mp4, mov, mkv, webm, avi files to mp4, mov, mkv, webm, avi with a single POST request. Upload a file as multipart/form-data and the API returns a download URL for the converted file.
Input
mp4, mov, mkv, webm, avi
Output
mp4, mov, mkv, webm, avi (video/mp4)
Credit cost
2 per file
Max file size
Per plan (10–500 MB)
Endpoint
https://api.fileswitch.co/api/v1/converter/video-compressAuthentication is optional for guests and recommended for production. Send either an API key or a JWT access token as a Bearer token. Authenticated requests deduct 2 credits from your balance; failed conversions are refunded. See Authentication for details.
Quick start
The same request in every supported language. Each example uploads a file and prints the downloadUrl from the response.
curl -X POST https://api.fileswitch.co/api/v1/converter/video-compress \
-H "Authorization: Bearer fc_YOUR_API_KEY" \
-F "file=@input.mp4" \
-F "quality=medium" \
-F "crf=0" \
-F "resolution=0" \
-F "fps=0" \
-F "audioBitrate=192k" \
-F "preset=veryfast" \
-F "stripMetadata=true"Parameters
Send file plus any optional options. Every option is optional and falls back to its default when omitted.
| Field | Type | Default | Description |
|---|---|---|---|
| file | binary | — | The file to convert. Accepts .mp4 , .mov , .mkv , .webm , .avi |
| quality | string | medium | Target quality: low saves the most space. Values: low, medium, high |
| crf | number | 0 | Explicit CRF (0-51, lower = better); 0 derives it from quality. Range: 0 .. 51 |
| resolution | string | 0 | Max output height; 0 keeps the source resolution. Values: 0, 2160, 1440, 1080, 720, 480, 360 |
| fps | number | 0 | Output frame rate; 0 keeps the source frame rate. Range: 0 .. 60 |
| audioBitrate | string | 192k | Output audio bitrate. Values: 320k, 256k, 192k, 128k, 96k, 64k |
| preset | string | veryfast | Encoding speed/size trade-off. Values: ultrafast, superfast, veryfast, faster, fast, medium, slow, slower, veryslow |
| stripMetadata | boolean | true | Remove title/artist/comment tags and metadata. |
{
"file": "input.mp4",
"quality": "medium",
"crf": 0,
"resolution": "0",
"fps": 0,
"audioBitrate": "192k",
"preset": "veryfast",
"stripMetadata": true
}Response
Every conversion endpoint returns the same success / message / data envelope. The data object is a Conversion record with a temporary downloadUrl.
{
"success": true,
"message": "Conversion completed",
"data": {
"id": "b10a5f2e-8c1e-4b3a-9c1d-2e3f4a5b6c7d",
"inputFormat": "html",
"outputFormat": "pdf",
"inputFileName": "document.html",
"outputFileName": "document.pdf",
"inputFileSize": 45210,
"outputFileSize": 88431,
"status": "completed",
"error": null,
"creditCost": 2,
"downloadUrl": "/api/v1/converter/download/conversions%2Fb10a5f2e-8c1e-4b3a-9c1d-2e3f4a5b6c7d%2Foutput.pdf",
"createdAt": "2026-07-31T13:00:00.000Z",
"completedAt": "2026-07-31T13:00:02.000Z"
}
}Prepend https://api.fileswitch.co/api/v1 to the downloadUrl and download with the same credentials. Files are retained temporarily and auto-deleted. See the full field reference in Response Schema.
Related conversions
Ready to convert mp4, mov, mkv, webm, avi → mp4, mov, mkv, webm, avi? Start free — no credit card required.