The same endpoints the page uses. No key, no quota, no account. Be reasonable โ it runs on one small server.
Three calls: create a job with the file as the body, start it with your options, then poll until it finishes.
# 1. upload โ returns {"id": "...", "size": 123, "info": {...}}
curl -s -X POST --data-binary @clip.mp4 \
'https://compress.nitaimaarek.com/api/new?kind=video&name=clip.mp4'
# 2. start with options
curl -s -X POST -H 'Content-Type: application/json' \
-d '{"codec":"h264","mode":"quality","crf":28,"preset":"medium"}' \
https://compress.nitaimaarek.com/api/start/<id>
# 3. poll โ state is queued | running | done | error
curl -s https://compress.nitaimaarek.com/api/job/<id>
# 4. download
curl -s -o out.mp4 https://compress.nitaimaarek.com/api/out/<id>
kind | What it does | Key options |
|---|---|---|
video | Re-encode video | codec mode crf targetMb vbitrate preset scale fps audio abitrate twopass tenbit |
audio | Re-encode audio | codec bitrate rate channels samplerate normalize |
pdf | Shrink a PDF | preset dpi jpegQuality grayscale fastWeb |
mesh | Simplify a 3D model | weld decimate ratio quantize quantBits outFormat |
data | Compress one file | algo level long |
bench | Try every algorithm | โ |
bundle | Archive many files | format level password |
extract | Unpack an archive | password |
Compresses a sample with identical settings and returns it, with the
numbers in an X-Preview JSON header. Pass an increasing
seq; superseded requests return 409 so that dragging
a slider does not queue a dozen stale encodes.
curl -s -D- -X POST -H 'Content-Type: application/json' \
-d '{"preset":"screen"}' \
'https://compress.nitaimaarek.com/api/preview/<id>?seq=1&pos=0.25'
ID=$(curl -s -X POST 'https://compress.nitaimaarek.com/api/new?kind=bundle&name=archive' | jq -r .id)
for f in *.txt; do
curl -s -X POST --data-binary "@$f" \
"https://compress.nitaimaarek.com/api/add/$ID?name=$f"
done
curl -s -X POST -H 'Content-Type: application/json' \
-d '{"format":"7z","level":9}' "https://compress.nitaimaarek.com/api/start/$ID"
GET /api/caps reports which encoders this host actually has
and the compression algorithms available, so a client can avoid offering
something that would fail.
{"error": "..."} with a 4xx status.