.jpg, .jpeg, .png, .webp) with a preset or a custom operation chain. Every request returns a job, always the same shape. Small images are processed inline and the job comes back already completed (HTTP 200, result included); everything else is queued (HTTP 202) and finishes asynchronously.
Sync eligibility: input of at most 5 MB, output format not AVIF, and no webhookUrl. Everything else is queued; AVIF always queues.
Request
Bearer sk_live_...Optional, 1–255 characters. Returns the existing job if a job with this key was already created. Applies to queued jobs only; sync jobs complete inline and are not deduplicated.
One of
chill, medium, aggressive, thumbnail. Either preset or operations is required.1–10 custom operations, applied in order. See below.
URL to receive
job.completed / job.failed events for this job. Forces the queued path. Requires a plan with webhooks.Presets
Operations
Encoding rules:
- If your chain has no
encodeoperation, one is appended with defaults (WebP, quality 80). encodealways runs last, regardless of where you place it. If several are sent, the last one wins.- The output file is
result.webp,.avif,.jpg, or.pngdepending onformat. AVIF encoding is memory-heavy, so AVIF jobs always take the queued path.
GET /v1/image/presets and GET /v1/image/operations return these definitions as JSON.
Examples
End-to-end: upload a photo, then thumbnail it synchronously:End-to-end (sync)
Custom operations, AVIF output (queued)
Results
One code path handles both: checkstatus. If it’s completed, the result is already in the response. Otherwise poll GET /v1/jobs/:id (ideally with ?wait=25 to long-poll) or wait for the webhook.
result.outputUrl is a signed download URL, freshly generated on every read and valid for 1 hour; re-fetch the job for a new one. Results are retained for 7 days.