Concepts · Runs

Runs

Runs are executions of workflow templates. They are the canonical experimental record: what happened, when it happened, how long each step took, what it cost, and whether the output was worth keeping.

Lifecycle

status transitionsascii
queued ─▶ running ─▶ review ─▶ completed
                       │
                       └─▶ failed

Status values

StatusMeaning
queuedAccepted by the API, waiting for execution.
runningActively executing one or more steps.
reviewProduced an artifact awaiting operator review.
completedFinal state. Artifact accepted, or no review required.
failedTerminal error. error_code records the cause.

Timing fields

FieldMeaning
queuedAtWall time the run was accepted by the API.
startedAtWall time execution began on a worker.
firstArtifactAtWall time the first usable artifact existed.
completedAtWall time the run reached a terminal state.
durationMsstartedAt to terminal state, in milliseconds.
queueWaitMsqueuedAt to startedAt, in milliseconds.
timeToFirstArtifactMsstartedAt to first persisted artifact, in milliseconds.
timeToFinalArtifactMsstartedAt to final processed artifact, in milliseconds.

Example run

GET /v1/runs/run-a1b2c3d4json
{
  "id": "run-a1b2c3d4",
  "templateId": "generate-clip-art-asset",
  "status": "completed",
  "queuedAt":        "2026-05-16T22:14:12.482Z",
  "startedAt":       "2026-05-16T22:14:12.604Z",
  "firstArtifactAt": "2026-05-16T22:14:43.711Z",
  "completedAt":     "2026-05-16T22:14:54.681Z",
  "durationMs":          42077,
  "queueWaitMs":           122,
  "timeToFirstArtifactMs": 31107,
  "timeToFinalArtifactMs": 42077
}

Step telemetry

Each run carries a runSteps array. The step catalog varies by workflow, but every run opens with prompt resolution and closes with artifact creation. Steps are named with a dotted convention so they stay groupable across templates.

Lifecycle steps

Present on every run, regardless of workflow.

StepRecords
prompt.resolveResolved style descriptors and content-type template into the final prompt.
storage.uploadPersisted the output file(s) to storage.
artifact.createFinal persistence of the artifact record and its link to the run.

Workflow-specific steps

Example: the generate-clip-art-asset workflow adds these steps between prompt resolution and artifact creation.

StepRecords
image.generateProvider call that produced the raw image.
background.removeBackground-removal model invocation.
image.convert_webp.*PNG to WebP conversion for raw and processed outputs.