---
title: "List background tasks"
method: GET
path: "/api/tasks"
tags: ["task"]
---

# List background tasks

`GET /api/tasks`

Retrieve a paginated list of background tasks for the authenticated user.
Supports filtering by task type, status, and creation time.

## Query parameters

- `task_name` string
- `idempotency_key` string
- `status` string
- `created_after` string, date-time
- `created_before` string, date-time
- `sort_order` 'asc' | 'desc'
- `offset` integer
- `limit` integer

## Response `200`

Success - Tasks retrieved

- TasksListResponse — Paginated list of background tasks for the authenticated user.
  - `pagination` PaginationInfo, required — Pagination metadata included in list responses. Supports both legacy offset/limit pagination and cursor-based pagination. When cursor-based pagination is used, `next_cursor` is the primary pagination token and `offset`/`total` may be zero.
    - `has_more` boolean, required — Whether more items are available beyond this page
    - `limit` integer, required — Items per page
    - `next_cursor` string — Opaque cursor for the next page. Pass this value as the `after` query parameter on the next request. Empty or absent when there are no more results.
    - `offset` integer, required — Current offset (0-based). Deprecated: use cursor-based pagination.
    - `total` integer, required — Total number of items matching filters (may be 0 when using cursor pagination)
  - `tasks` TaskEntry[], required — Array of tasks ordered by create_time
    - `completed_at` string, date-time — When task completed or failed (null if not finished)
    - `create_time` string, date-time, required — Task creation timestamp
    - `id` string, uuid, required — Unique task identifier
    - `started_at` string, date-time — When task execution started (null if not started)
    - `status` 'created' | 'running' | 'completed' | 'failed', required — Current task status
    - `task_name` string, required — Task type name (e.g., model_upload)

## Other responses

- `401` — Unauthorized - Authentication required
- `422` — Validation error - Invalid filter values
- `500` — Internal server error

---

[API](https://skmtc.net/comfy-org/apis/comfyui-api.md) · [All operations](https://skmtc.net/comfy-org/apis/comfyui-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/comfy-org/comfyui-api/revisions/a3660438bbe9/schema)
