# Job endpoints

After submitting a job, poll status and download the result.

## Get job status

```http
GET /job/{id}
X-Fast-Api-Key: YOUR_API_KEY
```

Typical statuses:

| Status | Meaning |
| --- | --- |
| `queued` | The job is waiting to start. |
| `running` | The job is processing. |
| `succeeded` | The ZIP is ready. |
| `failed` | The job failed; inspect the stable error code. |
| `canceled` | The job was canceled. |

Poll with backoff. A practical starting point is every 1 to 2 seconds while queued or running, then slower after repeated unchanged responses.

## Download result

```http
GET /job/{id}/download
X-Fast-Api-Key: YOUR_API_KEY
```

Downloads a ZIP when the job has succeeded. The ZIP is deleted automatically after the configured retention window.

## Cancel job

```http
POST /job/{id}/cancel
X-Fast-Api-Key: YOUR_API_KEY
```

Cancellation mirrors the other Tools.FAST APIs. It can cancel queued or running work when the job state allows it. If a charged job is canceled or fails after debit, refund handling follows the service billing state machine.

## Delete job

```http
DELETE /job/{id}
X-Fast-Api-Key: YOUR_API_KEY
```

Deletes job metadata and stored artifacts when the job is accessible to the caller and the state allows deletion.
