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

# Een MiniMax H3-video ophalen

> Een MiniMax H3-videotaak ophalen aan de hand van de taak-ID, inclusief de status, voortgang, tijdstempels, resultaat-URL of foutdetails.

Gebruik dit endpoint nadat je een MiniMax H3-videotaak hebt gemaakt. Het antwoord bevat `video_url` wanneer de taak is voltooid.

## Controleer deze velden

* `status` is `queued`, `in_progress`, `completed` of `failed`.
* `progress` is een globaal voltooiingspercentage van `0` tot en met `100`.
* `video_url` verschijnt wanneer de taak is voltooid.
* `error` verschijnt wanneer de taak mislukt.

## De taak opvragen

<Steps>
  <Step title="Maak eerst de taak">
    Begin met [Een MiniMax H3-video maken](./create) en sla de geretourneerde `id` op.
  </Step>

  <Step title="De taakstatus ophalen">
    Stuur de taak-ID naar dit endpoint totdat `status` `completed` of `failed` is.
  </Step>

  <Step title="Het MP4-bestand downloaden">
    Wanneer `status` `completed` is, voer je een aanroep uit naar [MiniMax H3-video-inhoud downloaden](./retrieve-content).
  </Step>
</Steps>


## OpenAPI

````yaml api/openapi/video/minimax-h3/get-retrieve.openapi.json GET /v1/videos/{task_id}
openapi: 3.1.0
info:
  title: MiniMax H3 Video Retrieve API
  version: 1.0.0
  description: >-
    Retrieve a MiniMax H3 video task by task ID. Poll this endpoint until the
    status is completed or failed.
servers:
  - url: https://api.cometapi.com
security:
  - bearerAuth: []
paths:
  /v1/videos/{task_id}:
    get:
      summary: Retrieve a MiniMax H3 video task
      description: >-
        Read the state of a MiniMax H3 video task that was created through POST
        /v1/videos.
      operationId: minimax_h3_retrieve_video
      parameters:
        - name: task_id
          in: path
          required: true
          description: Task ID returned by POST /v1/videos.
          schema:
            type: string
          example: <task_id>
      responses:
        '200':
          description: Current MiniMax H3 video task state.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MiniMaxH3VideoTask'
              examples:
                queued:
                  summary: Task queued
                  value:
                    id: <task_id>
                    task_id: <task_id>
                    object: video
                    model: minimax-h3
                    status: queued
                    progress: 0
                    created_at: 1779938152
                in_progress:
                  summary: Task in progress
                  value:
                    id: <task_id>
                    object: video
                    model: minimax-h3
                    status: in_progress
                    progress: 30
                    created_at: 1779938152
                completed:
                  summary: Task completed
                  value:
                    id: <task_id>
                    object: video
                    model: minimax-h3
                    status: completed
                    progress: 100
                    created_at: 1779938152
                    completed_at: 1779938219
                    expires_at: 1780543019
                    video_url: https://<provider-cdn>/<video_id>.mp4
                failed:
                  summary: Task failed
                  value:
                    id: <task_id>
                    object: video
                    model: minimax-h3
                    status: failed
                    progress: 100
                    created_at: 1779938152
                    completed_at: 1779938219
                    error:
                      message: The video task could not be completed.
                      code: generation_failed
      security:
        - bearerAuth: []
      x-codeSamples:
        - lang: Shell
          label: Retrieve task status
          source: |-
            curl "https://api.cometapi.com/v1/videos/<task_id>" \
              -H "Authorization: Bearer $COMETAPI_KEY"
        - lang: Python
          label: Retrieve task status
          source: |
            import os

            import requests

            task_id = "<task_id>"
            response = requests.get(
                f"https://api.cometapi.com/v1/videos/{task_id}",
                headers={
                    "Authorization": "Bearer " + os.environ["COMETAPI_KEY"]
                },
                timeout=60,
            )
            response.raise_for_status()
            print(response.json())
        - lang: JavaScript
          label: Retrieve task status
          source: |
            const taskId = "<task_id>";
            const response = await fetch(
              `https://api.cometapi.com/v1/videos/${taskId}`,
              { headers: { Authorization: `Bearer ${process.env.COMETAPI_KEY}` } },
            );

            if (!response.ok) {
              throw new Error(await response.text());
            }

            console.log(await response.json());
components:
  schemas:
    MiniMaxH3VideoTask:
      type: object
      required:
        - id
        - object
        - model
        - status
        - progress
        - created_at
      properties:
        id:
          type: string
          description: Task ID. Use this value as task_id in retrieve and content requests.
          example: <task_id>
        task_id:
          type: string
          description: >-
            Compatibility alias for id. This field can be omitted from retrieve
            responses.
          example: <task_id>
        object:
          type: string
          const: video
          description: Object type for the asynchronous video task.
        model:
          type: string
          description: Model ID that the task uses.
          enum:
            - minimax-h3
            - minimax-h3-max
        status:
          type: string
          enum:
            - queued
            - in_progress
            - completed
            - failed
          description: Task lifecycle status. Poll until the value is completed or failed.
        progress:
          type: integer
          minimum: 0
          maximum: 100
          description: Task progress as a coarse percentage.
        created_at:
          type: integer
          format: int64
          description: Task creation time as a Unix timestamp in seconds.
        completed_at:
          type: integer
          format: int64
          description: >-
            Unix timestamp returned by the platform. Use status, not this field,
            to decide when polling can stop.
        expires_at:
          type: integer
          format: int64
          description: >-
            Result expiration time as a Unix timestamp in seconds when the task
            provides one.
        video_url:
          type: string
          format: uri
          description: Video delivery URL. This field appears on completed tasks.
          example: https://<provider-cdn>/<video_id>.mp4
        error:
          type: object
          description: Failure details. This field appears when the task fails.
          properties:
            message:
              type: string
              description: Human-readable failure description.
            code:
              type: string
              description: Failure code when the task provides one.
          additionalProperties: true
      additionalProperties: true
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: Bearer authentication. Use your CometAPI API key.

````