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

# MiniMax-H3 Task Query

> Query a MiniMax-H3 video task status and result with `GET /v1/videos/{task_id}`.

# MiniMax-H3 Task Query

Query a video generation or 2K regeneration task by task ID. Once the task completes, the time-limited download URL is in the `video_url` field.

## Method and Path

```http theme={null}
GET /v1/videos/{task_id}
```

<RequestExample>
  ```bash cURL theme={null}
  curl https://zx1.deepwl.net/v1/videos/task_a1b2xxxxx5f6 \
    -H "Authorization: Bearer YOUR_API_KEY"
  ```

  ```python Python theme={null}
  import requests

  resp = requests.get(
      "https://zx1.deepwl.net/v1/videos/task_a1b2xxxxx5f6",
      headers={"Authorization": "Bearer YOUR_API_KEY"},
      timeout=30,
  )
  print(resp.json())
  ```

  ```javascript JavaScript theme={null}
  const response = await fetch(
    "https://zx1.deepwl.net/v1/videos/task_a1b2xxxxx5f6",
    { headers: { Authorization: "Bearer YOUR_API_KEY" } },
  );

  console.log(await response.json());
  ```
</RequestExample>

## Path Parameters

<ParamField path="task_id" type="string" required>
  The task `id` returned by the create endpoint.
</ParamField>

## Status Flow

| `status`      | Meaning            | Typical `progress` |
| ------------- | ------------------ | ------------------ |
| `queued`      | Queued             | 10                 |
| `in_progress` | Generating         | 50                 |
| `completed`   | Succeeded          | 100                |
| `failed`      | Failed or canceled | 100                |

<Note>
  Poll every 5–10 seconds. The upstream retains task records for only the last 7 days; video download links are time-limited, so download or persist them promptly.
</Note>

## Response Example

<ResponseExample>
  ```json 200 - Completed theme={null}
  {
    "id": "task_a1b2xxxxx5f6",
    "object": "video",
    "model": "MiniMax-H3",
    "status": "completed",
    "progress": 100,
    "created_at": 1785125529,
    "completed_at": 1785125946,
    "seconds": "5",
    "size": "2K",
    "video_url": "https://cdn.example.com/h3-generated-2k-output.mp4",
    "metadata": {
      "url": "https://cdn.example.com/h3-generated-2k-output.mp4",
      "ratio": "16:9"
    }
  }
  ```

  ```json 400 theme={null}
  {
    "code": "task_not_exist",
    "message": "task_not_exist",
    "data": null
  }
  ```
</ResponseExample>

## Response

<ResponseField name="id" type="string">
  Task ID.
</ResponseField>

<ResponseField name="task_id" type="string">
  Legacy task ID, may be returned; same value as `id`.
</ResponseField>

<ResponseField name="object" type="string">
  Object type, always `video`.
</ResponseField>

<ResponseField name="model" type="string">
  Model name used by the task.
</ResponseField>

<ResponseField name="status" type="string">
  Task status: `queued`, `in_progress`, `completed`, or `failed`.
</ResponseField>

<ResponseField name="progress" type="integer">
  Task progress percentage.
</ResponseField>

<ResponseField name="created_at" type="integer">
  Task creation time, Unix timestamp (seconds).
</ResponseField>

<ResponseField name="completed_at" type="integer">
  Task completion time, Unix timestamp (seconds).
</ResponseField>

<ResponseField name="expires_at" type="integer">
  Result expiration time, Unix timestamp (seconds).
</ResponseField>

<ResponseField name="seconds" type="string">
  Output duration (seconds), as a string.
</ResponseField>

<ResponseField name="size" type="string">
  Output resolution.
</ResponseField>

<ResponseField name="video_url" type="string">
  Time-limited download URL of the video output.
</ResponseField>

<ResponseField name="metadata" type="object">
  Extra information. On success, contains `url` and the actual aspect ratio `ratio`.
</ResponseField>

<ResponseField name="error" type="object">
  Failure reason, containing `code` and `message`.
</ResponseField>

## Error Codes

| HTTP Status | Description                                              |
| ----------- | -------------------------------------------------------- |
| `400`       | Task does not exist or is outside the 7-day query window |
| `401`       | Authentication failed                                    |
| `500`       | Server error                                             |

## Related Endpoints

* [MiniMax-H3 Video Overview](./overview)
* [Video Generation](./generation)
* [2K Regeneration](./remix)
* [Query Task (Unified Format)](./unified-query)
