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

# Get Task Status

> Retrieve the current status and result of a generation task.

## Path Parameters

<ParamField path="id" type="string" required>
  Task ID returned from the generation request.
</ParamField>

## Response Fields

<ResponseField name="success" type="boolean">
  Whether the request was successful.
</ResponseField>

<ResponseField name="data" type="object">
  Task details.

  <Expandable title="data properties">
    <ResponseField name="data.id" type="string">
      Unique task identifier (e.g. `task_abc123`).
    </ResponseField>

    <ResponseField name="data.type" type="string">
      Media type. One of: `video`, `image`, `audio`, `music`.
    </ResponseField>

    <ResponseField name="data.status" type="string">
      Current task status. One of: `pending`, `queued`, `running`, `succeeded`, `failed`, `cancelled`, `expired`.
    </ResponseField>

    <ResponseField name="data.provider" type="string">
      Provider that processed the request (e.g. `vidu`, `kling`, `seedream`).
    </ResponseField>

    <ResponseField name="data.model" type="string">
      Model used for generation (e.g. `viduq3-turbo`, `gen3-alpha-turbo`).
    </ResponseField>

    <ResponseField name="data.result" type="object[]">
      Array of output items. Only present when status is `succeeded`.

      <Expandable title="result item properties">
        <ResponseField name="url" type="string">
          Signed download URL for the output file. Valid for 15 minutes.
        </ResponseField>

        <ResponseField name="duration" type="number">
          Output duration in seconds (video/audio only).
        </ResponseField>

        <ResponseField name="format" type="string">
          Output file format (e.g. `mp4`, `png`, `jpg`, `mp3`).
        </ResponseField>

        <ResponseField name="size_bytes" type="number">
          Output file size in bytes.
        </ResponseField>
      </Expandable>
    </ResponseField>

    <ResponseField name="data.error" type="object">
      Error details. Only present when status is `failed`.

      <Expandable title="error properties">
        <ResponseField name="data.error.code" type="string">
          Machine-readable error code (e.g. `PROVIDER_ERROR`).
        </ResponseField>

        <ResponseField name="data.error.message" type="string">
          Human-readable error message.
        </ResponseField>
      </Expandable>
    </ResponseField>

    <ResponseField name="data.created_at" type="string">
      ISO 8601 timestamp when the task was created.
    </ResponseField>

    <ResponseField name="data.completed_at" type="string">
      ISO 8601 timestamp when the task completed (succeeded, failed, or cancelled).
    </ResponseField>

    <ResponseField name="data.metadata" type="object">
      Custom key-value metadata attached when the task was created.
    </ResponseField>
  </Expandable>
</ResponseField>

<ResponseExample>
  ```json 200 Succeeded theme={null}
  {
    "success": true,
    "data": {
      "id": "task_abc123",
      "type": "video",
      "status": "succeeded",
      "provider": "vidu",
      "model": "viduq3-turbo",
      "result": [
        {
          "url": "https://cdn.modelhunter.ai/results/task_abc123.mp4",
          "duration": 4,
          "format": "mp4",
          "size_bytes": 12582912
        }
      ],
      "created_at": "2025-01-15T10:00:00Z",
      "completed_at": "2025-01-15T10:00:32Z",
      "metadata": { "project": "demo" }
    }
  }
  ```

  ```json 200 Running theme={null}
  {
    "success": true,
    "data": {
      "id": "task_abc123",
      "type": "video",
      "status": "running",
      "provider": "vidu",
      "model": "viduq3-turbo",
      "created_at": "2025-01-15T10:00:00Z",
      "metadata": { "project": "demo" }
    }
  }
  ```

  ```json 404 theme={null}
  {
    "success": false,
    "error": {
      "code": "TASK_NOT_FOUND",
      "message": "Task not found"
    }
  }
  ```
</ResponseExample>
