> ## 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 Official Format Query Task

> Query the status and result of a MiniMax-H3 official format video task with `GET /v1/video/generations/{task_id}`.

# MiniMax-H3 Official Format Query Task

Query the task status, progress, and result video URL based on the `task_id` returned by [Create Video (Official Format)](./official-generation).

## Method and Path

```http theme={null}
GET /v1/video/generations/{task_id}
```

## Request Example

<CodeGroup>
  ```bash theme={null}
  curl https://zx1.deepwl.net/v1/video/generations/424010985738629 \
    -H "Authorization: Bearer YOUR_API_KEY" \
    -H "Accept: application/json"
  ```

  ```python theme={null}
  import requests

  resp = requests.get(
      "https://zx1.deepwl.net/v1/video/generations/424010985738629",
      headers={
          "Authorization": "Bearer YOUR_API_KEY",
          "Accept": "application/json",
      },
      timeout=30,
  )
  print(resp.json())
  ```
</CodeGroup>

## Response Example

<ResponseExample>
  ```json 200 - In Progress theme={null}
  {
    "code": "success",
    "data": {
      "task_id": "424010985738629",
      "status": "IN_PROGRESS",
      "progress": "50%",
      "submit_time": 1785125529,
      "start_time": 1785125530,
      "finish_time": 0,
      "data": {
        "status": "running",
        "duration": 5,
        "resolution": "2K",
        "ratio": "16:9",
        "content": {},
        "usage": {}
      }
    }
  }
  ```

  ```json 200 - Success theme={null}
  {
    "code": "success",
    "data": {
      "task_id": "424010985738629",
      "status": "SUCCESS",
      "progress": "100%",
      "submit_time": 1785125529,
      "start_time": 1785125530,
      "finish_time": 1785125946,
      "data": {
        "status": "succeeded",
        "duration": 5,
        "resolution": "2K",
        "ratio": "16:9",
        "content": {
          "video_url": "https://your-cdn.example.com/h3-generated-2k-output.mp4"
        },
        "usage": {
          "total_seconds": 5,
          "input_seconds": 0,
          "output_seconds": 5,
          "input_image_count": 1,
          "input_audio_seconds": 6,
          "total_tokens": 273890,
          "prompt_tokens": 13500,
          "completion_tokens": 260390
        }
      }
    }
  }
  ```

  ```json 200 - Failure theme={null}
  {
    "code": "success",
    "data": {
      "task_id": "424010985738629",
      "status": "FAILURE",
      "progress": "100%",
      "submit_time": 1785125529,
      "start_time": 1785125530,
      "finish_time": 1785125800,
      "fail_reason": "video description contains sensitive content (1026)",
      "data": {
        "status": "failed",
        "duration": 5,
        "resolution": "2K",
        "ratio": "16:9",
        "content": {},
        "usage": {}
      }
    }
  }
  ```

  ```json 404 theme={null}
  {
    "error": {
      "code": "NotFound",
      "message": "task not found",
      "type": "new_api_error"
    }
  }
  ```
</ResponseExample>

## Authentication

```http theme={null}
Authorization: Bearer YOUR_API_KEY
```

## Path Parameters

<ParamField path="task_id" type="string" required>
  Video generation task ID, consistent with the `task_id` returned by the creation endpoint.
</ParamField>

## Response

<ResponseField name="code" type="string">
  Response code, `success` on success.
</ResponseField>

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

<ResponseField name="data.status" type="string">
  Gateway task status: `SUBMITTED`, `IN_PROGRESS`, `SUCCESS`, `FAILURE`.
</ResponseField>

<ResponseField name="data.progress" type="string">
  Progress string, such as `50%` or `100%`.
</ResponseField>

<ResponseField name="data.submit_time" type="integer">
  Task submission time, Unix timestamp (seconds).
</ResponseField>

<ResponseField name="data.start_time" type="integer">
  Task start time, Unix timestamp (seconds).
</ResponseField>

<ResponseField name="data.finish_time" type="integer">
  Task finish time, Unix timestamp (seconds); `0` when not finished.
</ResponseField>

<ResponseField name="data.fail_reason" type="string">
  Reason for failure, present only when `status=FAILURE`.
</ResponseField>

<ResponseField name="data.data.status" type="string">
  Upstream native status: `queued`, `running`, `succeeded`, `failed`, or `cancelled`.
</ResponseField>

<ResponseField name="data.data.duration" type="integer">
  Generated video duration (seconds).
</ResponseField>

<ResponseField name="data.data.resolution" type="string">
  Output resolution, e.g. `2K`.
</ResponseField>

<ResponseField name="data.data.ratio" type="string">
  Aspect ratio, e.g. `16:9`.
</ResponseField>

<ResponseField name="data.data.content.video_url" type="string">
  Generated video URL (a temporary signed link with limited validity; download or persist it promptly).
</ResponseField>

<ResponseField name="data.data.usage" type="object">
  Usage statistics. Includes `total_seconds`, `input_seconds`, `output_seconds`, `input_image_count`, `input_audio_seconds`, `total_tokens`, `prompt_tokens`, and `completion_tokens`.
</ResponseField>

<ResponseField name="error" type="object">
  Error object (returned only when the request fails), containing `code`, `message`, and `type`.
</ResponseField>

## Related Endpoints

* [MiniMax-H3 Video Overview](./overview)
* [Official Format Video Generation](./official-generation)
* [Task Query (OpenAI Format)](./query)
* [Query Task (Unified Format)](./unified-query)
