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

# Task Result

**This API is used to retrieve images, audio, or video results from v3 asynchronous tasks using the `task_id`.**

## Request Headers

**Content-Type** `string` *required*

Enum: `application/json`

**Authorization** `string` *required*

Bearer authentication format, for example: Bearer \{\{API Key}}.

## Query Parameters

**task\_id** `string` *required*

Returned in the 200 response of v3 asynchronous APIs.

## Response

**extra** `object`

**properties**

**seed** `string`

A seed is a number from which Stable Diffusion generates noise, making generation deterministic. Using the same seed and set of parameters will produce identical images each time, minimum -1.

**enable\_nsfw\_detection** `boolean`

When set to true, NSFW detection will be enabled, incurring an additional cost of \$0.0015 for each generated image.

**debug\_info** `object`

**properties**

**request\_info** `string`

Records request parameters for debugging purposes.

**submit\_time\_ms** `string`

The timestamp (in milliseconds) of when the task was submitted.

**execute\_time\_ms** `string`

The timestamp (in milliseconds) of when the task started execution.

**complete\_time\_ms** `string`

The timestamp (in milliseconds) of when the task was completed.

**task** `object`

Task information.

**properties**

**task\_id** `string`

Task ID.

**status** `string`

Indicates the current status of a task. This parameter allows you to filter results based on the following status categories: `TASK_STATUS_QUEUED`: The task is queued and awaiting processing. `TASK_STATUS_SUCCEED`: The task has been processed successfully. `TASK_STATUS_FAILED`: The task failed during processing. `TASK_STATUS_PROCESSING`: The task is currently being processed.\\

Enum: `TASK_STATUS_QUEUED`, `TASK_STATUS_SUCCEED`, `TASK_STATUS_FAILED`, `TASK_STATUS_PROCESSING`

**reason** `string`

Provides the reason for a task's failure. This parameter specifies the explanation or error message associated with tasks that did not succeed. Utilizing this filter can aid in diagnosing issues and implementing corrective actions for failed processes.

**task\_type** `string`

Specifies the type of task.

**eta** `number`

Specifies the estimated time of completion for tasks, measured in seconds. This parameter is particularly relevant for video-type tasks, providing a forecast of how long it will take to complete the task based on current processing parameters and system load. This information can be vital for planning and resource management in environments with time-sensitive video processing requirements.

**progress\_percent** `number`

Progress of task completion in percentage. This feature is currently available only for: \
&#x20;1\. Video Generator APIs; \
&#x20;2\. Text-to-Image API and Image-to-Image API.

**images** `object[]`

Contains information about images associated with image-type tasks. This parameter provides detailed data on each image processed or generated during the task, such as file paths, metadata, or any image-specific attributes. It is returned only for tasks that involve image operations, facilitating enhanced tracking and management of image data.

**properties**

**image\_url** `string`

Image URL.

**image\_url\_ttl** `integer`

Image expiration time in seconds.

**image\_type** `string`

Image type.\\

Enum: `jpeg`, `png`, `webp`

**videos** `object[]`

Contains information about videos associated with video-type tasks. This parameter provides detailed data on each video processed or generated during the task, such as file paths, metadata, or any video-specific attributes. It is returned only for tasks that involve video operations, facilitating enhanced tracking and management of video data.

**properties**

**video\_url** `string`

Video URL.

**video\_url\_ttl** `string`

Video expiration time in seconds.

**video\_type** `string`

Video type.\\

Enum: `mp4`, `gif`

**audios** `object[]`

Contains information about audios associated with audio type tasks. This parameter provides detailed data on each audio processed or generated during the task, such as file paths, metadata, or any image-specific attributes. It is returned only for tasks that involve audio operations, facilitating enhanced tracking and management of audio data.

**properties**

**audio\_url** `string`

Audio url.

**audio\_url\_ttl** `string`

Audio url expire time in seconds.

**audio\_type** `string`

Audio type.\\

Enum: `wav`

**audio\_metadata** `object`

Contains detailed metadata about audio files processed or generated during audio-related tasks.

**properties**

**text** `string`

**start\_time** `float32`

the start\_time of the text in seconds.

**end\_time** `float32`

the end\_time of the text in seconds.

## Example

request

```bash theme={"system"}
curl --location --globoff 'https://api.novita.ai/v3/async/task-result?task_id={{Novita-TaskID}}' \
--header 'Authorization: Bearer {{API Key}}'
```

response

```json theme={"system"}
{
  "extra": {
    "seed": "158881667",
    "enable_nsfw_detection": false,
    "debug_info": {
      "request_info": "",
      "submit_time_ms": "",
      "execute_time_ms": "",
      "complete_time_ms": ""
    }
  },
  "task": {
    "task_id": "830d9c90-d53f-4c5a-8009-xxx",
    "status": "TASK_STATUS_SUCCEED",
    "reason": "",
    "task_type": "TXT_TO_IMG",
    "eta": 0,
    "progress_percent": 0
  },
  "images": [
    {
      "image_url": "https://faas-output-image.s3.ap-southeast-1.amazonaws.com/prod/xxx",
      "image_url_ttl": 3600,
      "image_type": "jpeg",
      "nsfw_detection_result": {}
    }
  ],
  "videos": [],
  "audios": []
}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.