> ## 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/zh-tw/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`

````