---
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

## Changes

> 38 revisions in range; 2 could not be searched.

- **2026-06-09** `84406063d958` — 2 info
  - added the optional property `pagination/next_cursor` to the response with the `200` status
  - response property `pagination/offset` deprecated
- **2026-06-03** `8560879e6188` — 2 breaking, 9 info
  - removed the required property `error` from the response with the `401` status
  - removed the required property `error` from the response with the `422` status
  - added the optional property `details` to the response with the `500` status
  - the response property `code` became required for the status `401`
  - …7 more
- **2026-05-22** `09a5075587c8` — 1 info
  - added the non-success response with the status `500`
- **2026-05-08** `c9640fded659` — 1 info
  - endpoint added
- **2026-04-24** `a66055fa384e` — 1 breaking
  - api path removed without deprecation

[Change history](https://skmtc.dev/comfy-org/apis/comfyui-api/changes/api/tasks/get.md)

---

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