---
title: "Get task detail by ID"
description: "Fetch a generation task by ID to check its status (waiting, running, completed, cancelled or failed) and read the IDs and URLs of the media it produced."
canonical: "https://platform.pixai.art/en/docs/api/task/getTask"
last-updated: "2026-11-02"
---

# Get task detail by ID

Fetch a generation task by ID to check its status (waiting, running, completed, cancelled or failed) and read the IDs and URLs of the media it produced.



## GET https://api.pixai.art/v1/task/{taskId}

Authentication: send your API key as `Authorization: Bearer <API key>`.

Machine-readable OpenAPI spec: https://platform.pixai.art/openapi-spec.yaml

### Parameters

- `taskId` (in path, string, required)
  ID of task to return

### Responses

- `200`
  successful operation
  Body fields:
  - `id` (string, required)
    The unique identifier for the task.
  - `status` (string, required)
    The status of the task.
    Allowed values: `waiting`, `running`, `completed`, `cancelled`, `failed`.
  - `createdAt` (string, required)
    The time the task was created.
  - `updatedAt` (string, required)
    The time the task was last updated.
  - `startedAt` (string, optional)
    The time the task was started.
  - `endAt` (string, optional)
    The time the task was finished.
  - `outputs` (object, optional)
    The outputs of the task.
  - `outputs.mediaIds` (string[], optional)
    The media IDs generated by the task. You can use these IDs to fetch detailed information about the generated media.

    The images you generate are usually not permanently retained. You need to retrieve your images as soon as possible.
  - `outputs.mediaUrls` ((string | null)[], optional)
    The public URL of the images generated by the task.

    The images you generate are usually not permanently retained. You need to retrieve your images as soon as possible.
    If an image is not available, it MAY be replaced by null in the array.
  - `mediaSafetyLevel` (string, optional)
    Content-safety verdict of the generated images, derived from the task's media safety score.

    Absent whenever that score is unavailable — not moderated yet, no scorable media, or moderation failed — so a completed task may still omit it. Absence does not imply safe, and polling is not guaranteed to make it appear.
    Allowed values: `nsfw`, `safe`.
  - `textSafetyLevel` (string, optional)
    Content-safety verdict of the prompt text, derived from the task's text safety score.

    Absent whenever that score is unavailable — not moderated yet, no prompt to score, or moderation failed — so a completed task may still omit it. Absence does not imply safe, and polling is not guaranteed to make it appear.
    Allowed values: `nsfw`, `safe`.
- `404`
  Task not found
