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

# Tasks

> AI media processing operations available as async jobs.

## How tasks work

Tasks follow the same async pattern as renders:

1. **Submit** a `POST /v1/tasks/{type}` request
2. **Receive** `202 Accepted` with a `task_*` job ID
3. **Wait** for the `task.completed` webhook (or poll `GET /v1/tasks/{id}`)
4. **Download** the artifact via `output.url` or `/v1/tasks/{id}/download`

## Task types

| Task              | Endpoint                           | Description                                            |
| ----------------- | ---------------------------------- | ------------------------------------------------------ |
| Remove Background | `POST /v1/tasks/remove-background` | AI background removal (image or video)                 |
| Gaze Redirect     | `POST /v1/tasks/gaze-redirect`     | Redirect eye contact towards camera                    |
| Super Resolution  | `POST /v1/tasks/super-resolution`  | AI upscaling (1–4×)                                    |
| Transcribe        | `POST /v1/tasks/transcribe`        | Speech-to-text with word-level timestamps (AssemblyAI) |

## Common fields

All task bodies share these optional fields:

| Field         | Type   | Description                        |
| ------------- | ------ | ---------------------------------- |
| `metadata`    | object | Key-value pairs echoed in webhooks |
| `webhook_url` | string | Per-request webhook override       |

## Idempotency

Task endpoints accept the same `Idempotency-Key` header as renders.

## Endpoints

| Method   | Path                      | Description                            |
| -------- | ------------------------- | -------------------------------------- |
| `GET`    | `/v1/tasks`               | List tasks (filterable by type/status) |
| `GET`    | `/v1/tasks/{id}`          | Get a single task                      |
| `DELETE` | `/v1/tasks/{id}`          | Cancel a queued task                   |
| `GET`    | `/v1/tasks/{id}/download` | Redirect to signed artifact URL        |
