# Queue

Canonical HTML: https://anchorshell.com/docs/queue

Inspect requests waiting for capacity and cancel work you no longer need.

Last updated: 2026-09-17

The Queue contains requests waiting for eligible model capacity. It makes planned waiting visible: cooldowns, pacing, and individual budgets can delay a request without making the provider unhealthy.

## Dashboard

1. Open **Queue**.
2. Find the waiting request.
3. Inspect its target, wait time, and limiting condition.
4. Click **Cancel** if you no longer need it.

Requests can wait because of provider capacity, cooldowns, pacing, or configured limits. A wait does not necessarily mean the provider is unavailable. Cancellation requires queue-management permission. Waiting requests do not survive a Relay restart.

## API

Use an appropriately scoped [API key](https://anchorshell.com/docs/api) for these requests.

### List queued requests

```bash
curl 'https://api.anchorshell.com/api/relay/queue/items' \
  -H 'Authorization: Bearer <API_KEY>'
```

**Response — 200 OK**

Selected response fields shown; IDs and values are illustrative.

```json
[
  {
    "task_id": "<TASK_ID>",
    "request_id": "<REQUEST_ID>",
    "incoming_model": "agentic",
    "state": "queued",
    "wait_ms": 1500
  }
]
```

### Cancel a request

```bash
curl -X POST 'https://api.anchorshell.com/api/relay/queue/cancel/<TASK_ID>' \
  -H 'Authorization: Bearer <API_KEY>'
```

**Response — 204 No Content**

No response body.

Use the task ID from the queue. Cancellation requires `relay:queue:manage`; listing respects self/organization visibility.

## Next

[Logs](https://anchorshell.com/docs/logs).
