# POST /v1/video/tasks/{task_id}/cancel

Cancel an in-flight async video task; full refund on accepted cancellation.

## Authentication

Bearer API key:

    Authorization: Bearer sk-xxxx

## Request body

```json
{
  "//": "See the route's handler for the full request schema."
}
```

## Response

Successful responses use the same JSON shape as the upstream provider (OpenAI / Anthropic).

## Errors

- `400 Bad Request` - malformed body or unsupported parameter
- `401 Unauthorized` - missing or invalid Bearer token
- `402 Payment Required` - billing reservation failed (insufficient balance)
- `429 Too Many Requests` - rate-limited; respect `Retry-After`
- `502 Bad Gateway` - upstream provider returned an error

## Example

Reproduce this call with `curl`:

```bash
curl -X POST https://tokpum.com/v1/video/tasks/{task_id}/cancel \
  -H "Authorization: Bearer sk-xxxx" \
  -H "Content-Type: application/json" \
  -d '{}'
```

## See also

- [`/agents/patterns/error-recovery.md`](/agents/patterns/error-recovery.md)
- [`/agents/patterns/rate-limits.md`](/agents/patterns/rate-limits.md)
