Cancel Artifact
Cancel a queued or processing artifact.
Cancellation is atomic โ once the API returns 200, the artifact will not transition to any other state. See the Artifacts overview for lifecycle rules.
Cancelling a non-terminal artifact:
- Flips
statustocancelledand setscompleted_at. - Frees the artifact's
idempotencyKeyfor reuse on a future create. - Generation work in progress stops; no further bytes are written and any partial output is discarded.
Cancelling an already-terminal artifact (succeeded, failed, cancelled, purged) returns 409 cancel_invalid_state. Only a queued or processing artifact can be cancelled.
โถUse cases
- Abort an artifact you no longer need (e.g. a user closed the UI before the bundle completed).
- Free an
idempotencyKeyafter a misconfigured request so a retry can use the same key.
โถPath parameters
| Param | Type | Description |
|---|---|---|
id | uuid | Artifact ID. Must be visible to your organization. |
โถResponse schema (data)
data)Identical to GET /artifacts/:id. On a successful cancellation status is cancelled and completed_at is the cancellation timestamp.
โถStatus codes
200โ Artifact cancelled. The response carries the full artifact resource in its newcancelledstate.400โ Invalidid(not a UUID).401โ Missing or invalid API key.403โ Caller lacks theartifacts:writescope.404โ Artifact does not exist or is not visible to your organization.409โcancel_invalid_state: the artifact is already in a terminal state.
Required scope:
artifacts:write