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

# Polling

> How often to read a job until it finishes.

A job is asynchronous: `POST /jobs` returns as soon as the job is accepted. Read `GET /jobs/{id}` until `status` is `completed`, `failed` or `canceled`.

## Strategy

1. After submitting, wait for the `Retry-After` header of the `202` response.
2. Read the job.
3. If it is not terminal, wait `next_poll_after_seconds` from the body and read again.

Blon sets `next_poll_after_seconds` from the job: 5 seconds while queued, and 3 seconds (10 seconds for video) while processing. Reading more often does not finish the job sooner.

```bash theme={null}
until
  job=$(curl -s https://api.blon.ai/v1/jobs/$JOB_ID -H "Authorization: Bearer $BLON_API_KEY")
  status=$(echo "$job" | jq -r .status)
  [ "$status" = completed ] || [ "$status" = failed ] || [ "$status" = canceled ]
do
  sleep "$(echo "$job" | jq -r '.next_poll_after_seconds // 5')"
done
```

## Rate limits

A `429` response (`rate_limited`, `queue_full` or `concurrency_limit`) carries a `Retry-After` header. Wait that many seconds before retrying. For `POST /jobs`, retry with the same `Idempotency-Key`.

## Webhooks instead

To avoid polling, pass a `webhook_url` when you submit. Blon calls it once when the job ends. See [Webhooks](https://docs.blon.ai/how-to/webhooks.md). Keep reading the job as a fallback: there is no redelivery.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.