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

# 获取视频任务状态

> OpenAI 兼容的视频任务状态查询接口。

返回视频任务的详细状态信息。



## OpenAPI

````yaml api-reference/cn/openapi.json GET /v1/videos/{task_id}
openapi: 3.0.0
info:
  title: 出海营 API 参考文档
  version: 1.0.0
  description: Public AI Gateway API Reference
servers:
  - url: https://api.aiid.edu.kg
security:
  - BearerAuth: []
tags:
  - name: OpenAI格式(Chat)
  - name: OpenAI格式(Responses)
  - name: 图片生成Gemini格式
  - name: 图片生成OpenAI DALL-E格式
  - name: 获取模型列表
  - name: 视频生成HappyHorse与Wan
  - name: 视频生成Kling格式
  - name: 视频生成Omni与Veo格式
  - name: 视频生成Seedance格式
  - name: 视频生成Sora兼容格式
  - name: 视频生成Vidu格式
  - name: 音乐生成任务格式
paths:
  /v1/videos/{task_id}:
    get:
      tags:
        - 视频生成Sora兼容格式
      summary: 获取视频任务状态
      description: |-
        OpenAI 兼容的视频任务状态查询接口。

        返回视频任务的详细状态信息。
      operationId: getVideo
      parameters:
        - name: task_id
          in: path
          description: 视频任务 ID
          required: true
          example: sora-2-123456
          schema:
            type: string
      responses:
        '200':
          description: 成功获取视频任务状态
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                  object:
                    type: string
                  model:
                    type: string
                  status:
                    type: string
                  progress:
                    type: integer
                  created_at:
                    type: integer
                  seconds:
                    type: string
                  video_url:
                    type: string
                    format: uri
                    description: 视频结果地址。不同模型可能返回 `video_url` 或 `url`，二者取其一。
                  url:
                    type: string
                    format: uri
                    description: 视频结果地址。不同模型可能返回 `url` 或 `video_url`，二者取其一。
                  completed_at:
                    type: integer
                    description: 完成时间（Unix 秒）。
                  expires_at:
                    type: integer
                    description: 结果过期时间（Unix 秒）。
                  error:
                    type: object
                    description: 失败时的错误信息。
                  metadata:
                    type: object
                    description: 附加元数据。
                required:
                  - id
                  - object
                  - model
                  - status
                  - progress
                  - created_at
                  - seconds
              example:
                id: sora-2-123456
                object: video
                model: sora-2
                status: queued
                progress: 0
                created_at: 1764347090922
                seconds: '8'
          headers: {}
        '404':
          description: 任务不存在
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          headers: {}
      deprecated: false
      security:
        - BearerAuth: []
components:
  schemas:
    ErrorResponse:
      type: object
      properties:
        error:
          type: object
          properties:
            message:
              type: string
              description: 错误信息
            type:
              type: string
              description: 错误类型
            param:
              type: string
              description: 相关参数
              nullable: true
            code:
              type: string
              description: 错误代码
              nullable: true
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      description: |-
        使用 Bearer Token 认证。
        格式: `Authorization: Bearer sk-xxxxxx`

````