Async Processing
Some compression tasks complete almost instantly, while others require significantly more processing time. Large videos, multi-file archives, batch operations, and complex transformations can exceed typical HTTP timeout limits if handled synchronously. To support these workloads reliably, the Compressor API provides built-in asynchronous processing.
When a request is handled asynchronously, the API does not wait for the job to finish. Instead, it immediately acknowledges the request and returns a job ID, allowing processing to continue in the background. This approach prevents timeouts, improves fault tolerance, and enables stable handling of long-running or resource-intensive operations.
Example:
{
"id": "38a8bb5e-7b50-4a22-a0a6-b9602fccb225",
"status": "enqueued"
}Asynchronous processing is triggered automatically for certain workloads — such as input files larger than 32 MB — or can be explicitly relied upon when predictable completion times are not guaranteed. Once a job has been enqueued, the final result becomes available through one of the supported completion mechanisms.
The Compressor API offers two standard ways to receive results from asynchronous jobs:
- Webhooks, where the API notifies your system as soon as processing finishes
- Long Polling, where your application periodically checks job status until completion
Both approaches are designed to integrate cleanly with existing systems and scale from simple scripts to high-throughput production pipelines.
This page introduces the concept of asynchronous processing. Detailed implementation instructions, payload formats, security considerations, and best practices are covered in the dedicated Webhooks and Long Polling documentation.