> ## 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.

# 查询视频

> 查询 Vidu Q4 视频任务状态。

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

使用创建接口返回的任务号轮询（建议每 10–15 秒），直至 `completed`（含视频地址）或 `failed`。

鉴权：`Authorization: Bearer sk-...`



## OpenAPI

````yaml zh-CN/openapi/vidu-video.yaml GET /v1/video/generations/{task_id}
openapi: 3.1.0
info:
  title: Omniall AI — Vidu 视频
  version: 1.0.0
  description: |-
    Vidu Q4 异步视频生成（`vidu-q4-720p` / `vidu-q4-1080p`）。

    **创建：** `POST https://api.omniall.ai/v1/video/generations`

    **查询：** `GET https://api.omniall.ai/v1/video/generations/{task_id}`

    鉴权：`Authorization: Bearer sk-...`

    | 模型 | 规格 |
    |------|------|
    | `vidu-q4-720p` | 720P；时长 4–16 秒任选同价；每次 1 条 |
    | `vidu-q4-1080p` | 1080P；时长 4–16 秒任选同价；每次 1 条 |

    按次计费。生成通常需数分钟，请轮询查询接口。
servers:
  - url: https://api.omniall.ai
security: []
tags:
  - name: Vidu
    description: Vidu Q4 文生视频 / 图生视频 / 参考音频
paths:
  /v1/video/generations/{task_id}:
    get:
      tags:
        - Vidu
      summary: 查询视频
      description: |-
        查询 Vidu Q4 视频任务状态。

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

        使用创建接口返回的任务号轮询（建议每 10–15 秒），直至 `completed`（含视频地址）或 `failed`。

        鉴权：`Authorization: Bearer sk-...`
      operationId: viduGetVideo
      parameters:
        - name: Authorization
          in: header
          required: true
          schema:
            type: string
            example: Bearer sk-...
          description: Bearer API Key。
        - name: task_id
          in: path
          required: true
          schema:
            type: string
            example: task_xxxxxxxx
          description: 创建任务返回的 `id` / `task_id`。
      responses:
        '200':
          description: 任务状态
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ViduVideoTask'
              examples:
                processing:
                  summary: 处理中
                  value:
                    id: task_xxxxxxxx
                    task_id: task_xxxxxxxx
                    object: video
                    model: vidu-q4-720p
                    status: processing
                    progress: 40
                    seconds: '5'
                    size: '16:9'
                completed:
                  summary: 已完成
                  value:
                    id: task_xxxxxxxx
                    task_id: task_xxxxxxxx
                    object: video
                    model: vidu-q4-720p
                    status: completed
                    progress: 100
                    seconds: '5'
                    size: '16:9'
                    url: https://example.com/result.mp4
                    video_url: https://example.com/result.mp4
                failed:
                  summary: 失败
                  value:
                    id: task_xxxxxxxx
                    task_id: task_xxxxxxxx
                    object: video
                    model: vidu-q4-720p
                    status: failed
                    error:
                      message: 生成失败
        '401':
          description: 未授权
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OpenAIErrorResponse'
        '404':
          description: 任务不存在
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OpenAIErrorResponse'
components:
  schemas:
    ViduVideoTask:
      type: object
      description: Vidu 视频任务对象。
      properties:
        id:
          type: string
          description: 任务 ID（与 `task_id` 通常相同）。
        task_id:
          type: string
          description: 任务 ID。
        object:
          type: string
          description: 对象类型，通常为 `video`。
          example: video
        model:
          $ref: '#/components/schemas/ViduModel'
        status:
          type: string
          description: 任务状态，如 `processing` / `completed` / `failed`。
          example: processing
        progress:
          type: number
          description: 进度 0–100（若返回）。
        seconds:
          oneOf:
            - type: string
            - type: integer
          description: 请求时长。
        size:
          type: string
          description: 画面比例。
        resolution:
          type: string
          description: 分辨率。
        url:
          type: string
          description: 完成后的视频地址（也可能返回为 `video_url` / `result_url`）。
        video_url:
          type: string
          description: 完成后的视频地址（兼容字段）。
        result_url:
          type: string
          description: 完成后的视频地址（兼容字段）。
        error:
          type: object
          description: 失败时的错误信息。
          properties:
            message:
              type: string
    OpenAIErrorResponse:
      type: object
      properties:
        error:
          type: object
          properties:
            message:
              type: string
              description: |
                常见参数错误提示示例：
                - 时长须在 4–16 秒
                - 不支持的画面比例…该模型支持: 16:9 / 9:16
                - 最多 10 张参考图
                - 最多 3 个参考音频
                - 不支持参考视频
            type:
              type: string
            code:
              type: string
    ViduModel:
      type: string
      description: Vidu Q4 模型 ID（与模型广场一致）。
      enum:
        - vidu-q4-720p
        - vidu-q4-1080p
      example: vidu-q4-720p

````

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