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

# 获取视频结果

<Note>
  异步创建的视频任务（`async`参数为`true`）需要通过视频结果获取接口查询视频生成状态，该接口响应数据格式和创建视频接口完全一致，只需要关注  `task_status` 和 `video_result` 字段值即可。
</Note>

### 请求/响应参数明细


## OpenAPI

````yaml openapi.yaml GET /videos/{task_id}
openapi: 3.1.0
info:
  title: 极客智坊 API文档
  description: 极客智坊 API 消息接口规范文档
  version: 1.0.0
servers:
  - url: https://geekai.co/api/v1
    description: 国内代理入口
  - url: https://geekai.dev/api/v1
    description: 海外代理入口
security:
  - bearerAuth: []
  - apiKeyAuth: []
paths:
  /videos/{task_id}:
    get:
      tags:
        - Video
      summary: 视频任务查询接口
      description: 根据任务ID查询视频生成任务的状态和结果。
      operationId: getVideoResult
      parameters:
        - name: task_id
          in: path
          required: true
          description: 视频生成任务ID
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: 成功响应
          content:
            application/json:
              schema:
                type: object
                required:
                  - model
                  - task_id
                  - task_status
                properties:
                  model:
                    type: string
                    description: 使用的视频模型
                  task_id:
                    type: string
                    description: 任务ID
                    format: uuid
                  task_status:
                    type: string
                    description: 任务状态
                    enum:
                      - pending
                      - running
                      - succeed
                      - failed
                  video_result:
                    type: object
                    description: 视频生成结果(仅在生成成功时返回)
                    properties:
                      url:
                        type: string
                        format: uri
                        description: 视频URL
                      cover_image_url:
                        type: string
                        format: uri
                        description: 封面图片URL
                      duration:
                        type: number
                        description: 实际视频时长(秒)
                      revised_prompt:
                        type: string
                        description: 增强后的提示文本
                  error:
                    type: object
                    description: 错误信息(仅在生成失败时返回)
                    properties:
                      code:
                        type: string
                        description: 错误代码
                      message:
                        type: string
                        description: 错误描述
                      details:
                        type: object
                        description: 详细错误信息
        '400':
          $ref: '#/components/responses/ValidationError'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          description: 任务不存在
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          $ref: '#/components/responses/StandardError'
components:
  responses:
    ValidationError:
      description: 参数验证错误
      content:
        application/json:
          schema:
            type: object
            properties:
              code:
                type: string
                example: validation_error
              message:
                type: string
                example: 参数验证失败
              details:
                type: object
                additionalProperties:
                  type: string
                example:
                  field: 错误描述
    Unauthorized:
      description: 未授权
      content:
        application/json:
          schema:
            type: object
            properties:
              code:
                type: string
                example: unauthorized
              message:
                type: string
                example: Invalid API key or token
    StandardError:
      description: 标准错误响应
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  schemas:
    Error:
      type: object
      required:
        - code
        - message
      properties:
        code:
          type: string
          description: 错误代码
          example: invalid_request
        message:
          type: string
          description: 错误信息描述
          example: 请求参数不合法
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: API认证token
    apiKeyAuth:
      type: apiKey
      in: header
      name: GeekAI-API-Key
      description: API密钥认证

````