Skip to content
GigAI Tools

Developer API / docs

Compress Image API

Recompress an image by quality, or give target_kb and the engine finds the best quality that fits under that size. If the target is impossible it says so instead of silently missing it.

POSThttps://api.gigai.tools/v1/jobsAsync

Runs as the compress-image operation inside a job. Needs a key with the jobs:write scope. Try it in the browser

Options

  • quality - integer, 1..100
  • target_kb - integer, 1..51200
  • format - string, one of jpeg, webp, avif

Limits

  • Input: png, jpg, webp, avif, gif (one file, checked by content, never by extension).
  • Max input size: 50 MB.
  • Output: jpg, webp, avif.
  • Time budget: 60 seconds, then the task fails with the timeout code.
  • Engine: sharp.

Inside a bigger job

Chain it: any task can consume this one's output by naming it in input. The recipes show working pipelines.

as one task in a graph

"step": { "operation": "compress-image", "input": ["previous-task"] }
Was this page helpful?