HTTP API

The same endpoints the page uses. No key, no quota, no account. Be reasonable โ€” it runs on one small server.

Compress a file

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>

Job kinds

kindWhat it doesKey options
videoRe-encode videocodec mode crf targetMb vbitrate preset scale fps audio abitrate twopass tenbit
audioRe-encode audiocodec bitrate rate channels samplerate normalize
pdfShrink a PDFpreset dpi jpegQuality grayscale fastWeb
meshSimplify a 3D modelweld decimate ratio quantize quantBits outFormat
dataCompress one filealgo level long
benchTry every algorithmโ€”
bundleArchive many filesformat level password
extractUnpack an archivepassword

Live preview

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'

Bundling several files

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"

Capabilities

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.

Notes