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

# Checking Task Status

To check task status, send a `GET` request to:

```
https://api.turbofiles.io/tasks/{taskId}
```

The response includes a data.attributes.status field that will have one of these values:

* `PENDING`: Task is queued but not yet started
* `PROCESSING`: Task is currently being processed
* `COMPLETED`: Task has finished successfully
* `FAILED`: Task encountered an error and could not complete

For completed tasks, the response will include output file information in the `included` field.
To download the processed file, use the signed URL provided in the `links.download` field of the output file object.

### Webhook Notifications

(Coming soon)

<RequestExample>
  ```http theme={null}
  POST /tasks/{taskId} HTTP/1.1
  Accept: application/vnd.api+json
  Content-Type: application/vnd.api+json
  ```
</RequestExample>

<ResponseExample>
  ```json theme={null}
  {
    "jsonapi": {
      "version": "1.1"
    },
    "links": {
      "self": "<string>"
    },
    "data": {
      "type": "tasks",
      "id": "<string>",
      "attributes": {
        "public": false,
        "created_at": "2023-01-01T00:00:00.000000Z",
        "updated_at": "2023-01-02T00:00:00.000000Z",
        "settings": {},
        "format": {
          "input": "image/png",
          "output": "image/avif"
        },
        "started_at": "2023-01-03T00:00:00.000000Z",
        "processed_at": "2023-01-04T00:00:00.000000Z",
        "processing_metadata": {},
        "status": "COMPLETED"
      },
      "relationships": {
        "input": {
          "data": {
            "type": "files",
            "id": "<string>"
          },
          "links": {
            "self": "<string>",
            "related": "<string>"
          }
        },
        "output": {
          "data": {
            "type": "files",
            "id": "<string>"
          },
          "links": {
            "self": "<string>",
            "related": "<string>"
          }
        }
      },
      "links": {
        "self": "<string>"
      }
    },
    "included": [
      {
        "type": "files",
        "id": "8fhd83jpk",
        "attributes": {
          "format": "image/png",
          "size": 504233,
          "created_at": "2023-11-07T05:31:56Z",
          "updated_at": "2023-11-07T05:31:56Z"
        },
        "links": {
          "self": "<string>",
          "upload": "<string>",
          "download": "<string>"
        }
      }
    ]
  }
  ```
</ResponseExample>
