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

# Asynchronous jobs

> Job states, polling, cancellation, and result downloads.

Generation requests are asynchronous. A job moves through non-terminal states and finishes exactly once.

```text theme={null}
queued → submitting → processing → succeeded
                              ↘ failed
queued → cancelled
any non-terminal state → expired
```

Terminal states are:

* `succeeded`
* `failed`
* `cancelled`
* `expired`

## Polling

Poll `GET /v1/jobs/{job_id}` no more than once per second per job.

A succeeded job contains `data` with a short-lived signed URL for each output. Download the bytes to storage you control.

## Cancellation

`POST /v1/jobs/{job_id}/cancel` works while the job is still queued and releases the reserve in full.

After a job has been handed to the provider, cancellation returns `409 job_not_cancelable`. We do not promise an upstream stop that cannot be guaranteed.

Cancelling a terminal job returns its existing state without changing billing.
