---
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 — Offset/limit-based pagination metadata included in list responses.
    - `has_more` boolean, required — Whether more items are available beyond this page
    - `limit` integer, required — Items per page
    - `offset` integer, required — Current offset (0-based)
    - `total` integer, required — Total number of items matching filters
  - `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

- **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/8560879e6188/schema)
