Skip to main content
The Queue API provides asynchronous job processing for Dedicated Containers. Submit jobs to a managed queue, and workers automatically claim and process them. This model supports long-running inference, batch workloads, and explicit priority control.
New to Dedicated Containers? Start with the Overview to understand the platform, or jump to the Quickstart to deploy your first container.

Core Concepts

Jobs

A job is a single unit of work submitted to your deployment. Jobs can run for seconds or hours, making them ideal for:
  • Video generation
  • Batch image processing
  • Long-running inference tasks
  • Any workload that doesn’t fit the request-response pattern

Job Lifecycle

Priority

Jobs are processed in strict order of priority first, then submission time. Priority is an integer where higher values are processed first.
By default, priority is not considered for autoscaling metrics—the autoscaler scales based on total queue depth regardless of priority. Contact [email protected] for advanced scaling policies that account for priority tiers.

Job State with info

The info field provides persistent state that survives across the job lifecycle. You can:
  1. Set initial state when submitting a job via the info parameter
  2. Update state during processing using emit() in your Sprocket worker
  3. Preserve state across retries—info accumulates rather than resets
This is useful for tracking progress, storing metadata, or passing context between retries.
For full endpoint documentation — request parameters, response schemas, and error codes — see the Queue REST API Reference: submit, status, cancel, metrics.

Polling for Job Completion

For jobs that take time to complete, poll the status endpoint until the job reaches a terminal state (done, failed, or canceled).

Best Practices

Use Priority for Tiered Service

Implement different service tiers by assigning priority based on customer type:

Track Progress for Long-Running Jobs

For jobs that take more than a few seconds, emit progress updates so clients can show status:

Handle All Terminal States

Always check for done, failed, and canceled when polling:

Store Metadata in info

Use info to store job metadata that you’ll need when the job completes:

Error Codes