Skip to main content

Operations

Each job runs an ordered list of operations against its source. An operation has a type and a set of options. The SDK ships six operation types:

OperationDoes
compressReduce file size for images, video, audio, and documents.
convertChange a file's format.
thumbnailGenerate a preview image.
mergeCombine several inputs into one output.
archiveBundle inputs into a ZIP or tarball.
watermarkApply a branding overlay to images and video.
Accepted formats are per-operation, not global

Do not generalise from the first operation page you read. Each operation declares its own accepted MIME types, and they genuinely differ — merge accepts five audio types while compress and convert accept six, because merge does not take audio/mp4.

The per-operation lists on each page are correct for that page only. getSchema() returns the authoritative set at runtime, per operation and per media type, and is the thing to trust if you are deciding programmatically.

Options are media-type specific

The valid option keys for an operation depend on the input's media type: a JPEG compress accepts different options than a video compress. The file-first chain knows each input's media type and validates the options before any upload — so a typo or an option that doesn't apply to the media type is caught locally rather than coming back as a server 422.

// Validated locally before the file is uploaded.
const result = await client
.compress('./photo.jpg', { quality: 80 })
.run({ maxWait: '5m' });

The authoritative option set

The contracts are the source of truth for which options each media type accepts. To fetch the authoritative, per-MIME option list at runtime — for building a dynamic UI, or to confirm what the API currently supports — call getSchema() for the input's media type and operation.

Per-operation pages