Skip to main content

Platform jobs API

The platform jobs API provides a durable, priority-based background job queue. You can enqueue provisioning and chat jobs that run asynchronously with automatic retries and status tracking.
These endpoints are backend-internal and require a valid internal API key passed in the Authorization header. Web clients should use the Jobs API proxy endpoints instead.

Job model

Every job follows a common lifecycle:
  1. A job is created with status queued.
  2. A worker claims the job and moves it to running.
  3. On success the job moves to completed with a result payload.
  4. On failure the job is retried (up to maxAttempts) or moves to failed.
Jobs that remain in running state for more than ten minutes are automatically requeued.

Job types

Job statuses

Enqueue a provision job

Queues a new managed-runtime provisioning job. The job is processed asynchronously and the response is returned immediately with a 202 Accepted status.

Request body

Response (202)

Errors

Enqueue a chat job

Queues a gateway chat completion job. The job is processed asynchronously and the response is returned immediately with a 202 Accepted status.

Request body

Response (202)

Errors

Get a job

Returns the current state of a job by its identifier.

Path parameters

Response

Job response fields

Errors

Get job metrics

Returns aggregate metrics across all jobs, grouped by lane and status. Useful for monitoring queue health.

Response

Errors

Retry behavior

Failed jobs are automatically retried with exponential backoff: Provision jobs allow up to five attempts. Chat jobs allow up to three attempts. After exhausting all attempts, the job status is set to failed.