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

# 获取视频任务

> 按任务 ID 查询任务状态、进度、结果地址与错误信息。

**路径：** `GET https://api.omniall.ai/v1/videos/{task_id}`

任务状态由平台按上游处理进度推进；仅 `completed` 提供结果地址，`failed` 时由 `error` 字段给出原因。



## OpenAPI

````yaml zh-CN/openapi/magi-video.yaml GET /v1/videos/{task_id}
openapi: 3.1.0
info:
  title: Omniall AI — MAGI-2 视频
  version: 1.0.0
  description: |-
    通过 OpenAI 兼容视频接口创建、查询并下载视频任务，支持文生视频、图生视频与多模态参考。

    **模型：** `magi-2`（以[模型广场](https://omniall.ai/pricing)为准）

    **鉴权方式：** `Authorization: Bearer sk-...`
servers:
  - url: https://api.omniall.ai
security: []
paths:
  /v1/videos/{task_id}:
    get:
      tags:
        - MAGI-2 视频
      summary: 获取视频任务
      description: |-
        按任务 ID 查询任务状态、进度、结果地址与错误信息。

        **路径：** `GET https://api.omniall.ai/v1/videos/{task_id}`

        任务状态由平台按上游处理进度推进；仅 `completed` 提供结果地址，`failed` 时由 `error` 字段给出原因。
      operationId: magiGetVideo
      parameters:
        - name: task_id
          in: path
          required: true
          schema:
            type: string
            example: task_abc123
          description: 任务 ID，取创建接口返回的 id（形如 task_<uuid>）。
        - name: Authorization
          in: header
          required: true
          schema:
            type: string
            example: Bearer sk-...
          description: 鉴权头，例如 `Bearer sk-...`。
      responses:
        '200':
          description: 返回任务对象，含状态、进度、结果地址与错误信息。
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                  status:
                    type: string
                  progress:
                    type: integer
                  url:
                    type: string
                    description: 结果地址（仅 completed 时提供）
                  video:
                    type: object
                    properties:
                      url:
                        type: string
                  error:
                    type: object
                    properties:
                      message:
                        type: string
                      code:
                        type: string
              example:
                id: task_abc123
                object: video
                model: magi-2
                status: completed
                progress: 100
                url: https://cdn.example.com/result.mp4
        '401':
          description: 未授权
        '404':
          description: 未找到

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.