> ## Documentation Index
> Fetch the complete documentation index at: https://mintlify.com/lumina-ai-inc/chunkr/llms.txt
> Use this file to discover all available pages before exploring further.

# Task

> Task and TaskResponse object structures for tracking document processing jobs

## Task

The Task object represents a document processing job in Chunkr. It contains all the information about the task, including its configuration, status, and locations of input/output files.

<ResponseField name="task_id" type="string" required>
  The unique identifier for the task.
</ResponseField>

<ResponseField name="status" type="Status" required>
  The current status of the task.

  <Expandable title="Status enum values">
    * `Starting` - Task has been queued and is waiting to begin
    * `Processing` - Task is currently being processed
    * `Succeeded` - Task completed successfully
    * `Failed` - Task encountered an error and failed
    * `Cancelled` - Task was cancelled by the user
  </Expandable>
</ResponseField>

<ResponseField name="configuration" type="Configuration" required>
  The processing configuration for the task. See [Configuration](/api/models/configuration) for details.
</ResponseField>

<ResponseField name="created_at" type="DateTime<Utc>" required>
  The date and time when the task was created.
</ResponseField>

<ResponseField name="started_at" type="DateTime<Utc>">
  The date and time when the task processing started.
</ResponseField>

<ResponseField name="finished_at" type="DateTime<Utc>">
  The date and time when the task completed (successfully or with failure).
</ResponseField>

<ResponseField name="expires_at" type="DateTime<Utc>">
  The date and time when the task will expire and be deleted. Expired tasks cannot be updated, polled, or accessed.
</ResponseField>

<ResponseField name="file_name" type="string">
  The name of the uploaded file.
</ResponseField>

<ResponseField name="file_size" type="integer" required>
  The size of the uploaded file in bytes.
</ResponseField>

<ResponseField name="mime_type" type="string">
  The MIME type of the uploaded file (e.g., `application/pdf`).
</ResponseField>

<ResponseField name="page_count" type="integer">
  The total number of pages in the document.
</ResponseField>

<ResponseField name="message" type="string">
  A message describing the task's current status or any errors that occurred.
</ResponseField>

<ResponseField name="task_url" type="string">
  The URL to check the status of this task.
</ResponseField>

<ResponseField name="user_id" type="string" required>
  The ID of the user who created the task.
</ResponseField>

<ResponseField name="api_key" type="string">
  The API key used to create the task (if applicable).
</ResponseField>

<ResponseField name="version" type="string">
  The version of Chunkr that processed this task.
</ResponseField>

<ResponseField name="input_location" type="string" required>
  The S3 location of the input file.
</ResponseField>

<ResponseField name="output_location" type="string" required>
  The S3 location of the output JSON file.
</ResponseField>

<ResponseField name="pdf_location" type="string" required>
  The S3 location of the processed PDF file.
</ResponseField>

<ResponseField name="image_folder_location" type="string" required>
  The S3 location of the folder containing extracted images.
</ResponseField>

## TaskResponse

The TaskResponse object is returned when querying a task. It contains the task's current state and optionally includes the output data.

<ResponseField name="task_id" type="string" required>
  The unique identifier for the task.
</ResponseField>

<ResponseField name="status" type="Status" required>
  The current status of the task.

  <Expandable title="Status enum values">
    * `Starting` - Task has been queued and is waiting to begin
    * `Processing` - Task is currently being processed
    * `Succeeded` - Task completed successfully
    * `Failed` - Task encountered an error and failed
    * `Cancelled` - Task was cancelled by the user
  </Expandable>
</ResponseField>

<ResponseField name="configuration" type="Configuration" required>
  The processing configuration used for the task. See [Configuration](/api/models/configuration) for details.
</ResponseField>

<ResponseField name="created_at" type="DateTime<Utc>" required>
  The date and time when the task was created and queued.
</ResponseField>

<ResponseField name="started_at" type="DateTime<Utc>">
  The date and time when the task processing started.
</ResponseField>

<ResponseField name="finished_at" type="DateTime<Utc>">
  The date and time when the task was finished.
</ResponseField>

<ResponseField name="expires_at" type="DateTime<Utc>">
  The date and time when the task will expire.
</ResponseField>

<ResponseField name="message" type="string" required>
  A message describing the task's status or any errors that occurred.
</ResponseField>

<ResponseField name="output" type="OutputResponse">
  The processed output data. Only included when the task status is `Succeeded` and `include_chunks=true` is specified. See [Output](/api/models/output) for details.
</ResponseField>

<ResponseField name="task_url" type="string">
  The presigned URL of the task.
</ResponseField>
