> ## Documentation Index
> Fetch the complete documentation index at: https://docs.decky-ai.com/llms.txt
> Use this file to discover all available pages before exploring further.

# cancel_deck

> Cancel a queued or running deck job. Reserved credits are refunded in full.

<Info>
  **Type:** Write · **Required scope:** `decks:write` · **Cost:** Free (credits from the canceled job are refunded)
</Info>

## Parameters

<ParamField path="job_id" type="string" required>
  The job ID to cancel.
</ParamField>

## Response

Returns the updated job object with `status: "canceled"`. All reserved credits are returned to your balance immediately.

<Expandable title="Example response">
  ```json theme={null}
  {
    "id": "job_abc123",
    "status": "canceled",
    "credits_reserved": 100,
    "credits_charged": 0,
    "finished_at": "2026-06-23T10:03:12Z"
  }
  ```
</Expandable>

<Note>
  You can cancel jobs in `queued` or `running` state. Jobs that are `succeeded`, `failed`, or already `canceled` cannot be canceled again.
</Note>

Useful when you've started too many jobs or want to free up your active job slots (there's a small concurrent-job limit per account).

## Errors

| Error                                                      | Cause                                  |
| ---------------------------------------------------------- | -------------------------------------- |
| `Job is already 'succeeded' and can no longer be canceled` | Job finished before the cancel arrived |
| `Deck job 'X' not found`                                   | Invalid job ID                         |
