Docs / Serverless

Job states

Every job moves through a small, fixed set of states. Two are transient and four are terminal; once a job is terminal its output or error never changes, unless you retry it.

States

StatusMeaningTerminal
IN_QUEUEAccepted and waiting for a free worker.No
IN_PROGRESSA worker picked up the job and the handler is running.No
COMPLETEDThe handler returned. The result is in output.Yes
FAILEDThe handler raised an exception or returned an error key. Details are in error.Yes
CANCELLEDCancelled through /cancel/{jobId} or /purge-queue before it completed.Yes
TIMED_OUTThe job exceeded its execution timeout, or its time-to-live expired while it was still in the queue.Yes

Transitions

Job state machine
            /run, /runsync, /retry
                     │
                     ▼
               ┌──────────┐  ttl expired   ┌───────────┐
               │ IN_QUEUE │───────────────▶│ TIMED_OUT │
               └──────────┘                └───────────┘
                │      │ /cancel, /purge-queue     ▲
     worker     │      └──────────────▶ CANCELLED  │ execution timeout
     picks up   ▼                           ▲      │
             ┌─────────────┐  /cancel       │      │
             │ IN_PROGRESS │────────────────┘      │
             └─────────────┘───────────────────────┘
                │        │
       returns  │        │ raises / returns {"error": ...}
                ▼        ▼
          COMPLETED    FAILED

/retry moves a FAILED, TIMED_OUT or CANCELLED job back to IN_QUEUE with the same ID.

Timing fields

FieldUnitMeaning
delayTimemsFrom submission until a worker started the handler. Includes queueing and any cold start.
executionTimemsHandler run time. This is what the execution timeout is compared against.
createdAtISO 8601When the job was submitted.
completedAtISO 8601When the job reached a terminal state. null until then.
COMPLETED job
{
  "id": "job_3x9wq2mt",
  "status": "COMPLETED",
  "delayTime": 812,
  "executionTime": 1934,
  "workerId": "wrk_8q3m2x9k",
  "output": {
    "imageUrl": "https://s3.eu-nl-1.apipods.com/vol_c7d2h4ke/outputs/job_3x9wq2mt.png",
    "seed": 1730299
  },
  "createdAt": "2026-11-18T10:02:13Z",
  "completedAt": "2026-11-18T10:02:16Z"
}

FAILED versus TIMED_OUT

  • FAILED means your handler ran and reported an error. error.type is the exception class, error.message the message and error.traceback the Python traceback. Fix the input or the code.
  • TIMED_OUT means the job either waited in the queue longer than its ttlInSec (check executionTime: it is 0) or ran longer than its execution timeout. The first usually means maxWorkers is too low or your GPU pools are throttled; the second means the timeout is too short or the handler is stuck.

Result retention

Terminal jobs from /run are kept for 30 minutes, and from /runsync for 60 seconds. After that /status returns 404 resource_not_found. Persist outputs you need to keep, for example from a webhook handler.