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

# 视频查询

> 查询视频生成任务的状态和结果

查询已创建的视频生成任务的当前状态、进度和结果。

## 查询视频任务

通过视频 ID 查询任务详情：

```bash theme={null}
curl "https://models.hingnet.com.cn/v1/videos/$VIDEO_ID" \
  -H "Authorization: Bearer $TOKEN"
```

### 响应示例

任务进行中：

```json theme={null}
{
  "id": "video_691209aab0a08198a4e78870277f7e3d0215e09cec47a737",
  "object": "video",
  "created_at": 1762789802,
  "status": "processing",
  "model": "sora-2",
  "prompt": "百事可乐宣传片",
  "progress": 45,
  "seconds": "4",
  "size": "720x1280"
}
```

任务完成：

```json theme={null}
{
  "id": "video_691209aab0a08198a4e78870277f7e3d0215e09cec47a737",
  "object": "video",
  "created_at": 1762789802,
  "completed_at": 1762789891,
  "expires_at": 1762793491,
  "status": "success",
  "model": "sora-2",
  "prompt": "百事可乐宣传片",
  "progress": 100,
  "seconds": "4",
  "size": "720x1280"
}
```

### 状态说明

* `queued`：任务已排队，等待处理
* `processing`：正在生成视频
* `success`：生成完成，可下载视频
* `failed`：生成失败

### 响应字段说明

* `id`：视频任务的唯一标识符
* `created_at`：任务创建时间戳
* `completed_at`：任务完成时间戳（仅在 success 状态下存在）
* `expires_at`：视频过期时间戳（仅在 success 状态下存在）
* `progress`：处理进度（0-100）
* `seconds`：视频时长（字符串格式）
* `size`：视频分辨率

## 下载视频内容

直接下载生成的视频文件：

```bash theme={null}
curl -L "https://models.hingnet.com.cn/v1/videos/$VIDEO_ID/content" \
  -H "Authorization: Bearer $TOKEN" \
  --output "$VIDEO_ID.mp4"
```


## OpenAPI

````yaml GET /v1/videos/{video_id}
openapi: 3.0.0
info:
  title: Gemini Veo Video API
  description: Gemini Veo 视频生成 API（OpenAI 风格）
  version: 1.0.0
servers:
  - url: https://models.hingnet.com.cn
    description: HingNet 生产环境
security:
  - BearerAuth: []
paths:
  /v1/videos/{video_id}:
    get:
      tags:
        - Veo Videos
      summary: 查询视频任务
      description: 查询指定视频任务的状态和结果
      operationId: getVeoVideo
      parameters:
        - name: video_id
          in: path
          required: true
          description: 视频任务 ID
          schema:
            type: string
          example: video_abc123
      responses:
        '200':
          description: 查询成功
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/VideoObject'
              examples:
                in_progress:
                  summary: 生成中
                  value:
                    id: video_abc123
                    object: video
                    status: in_progress
                    model: veo-3.1-fast-generate-preview
                    progress: 45
                completed:
                  summary: 已完成
                  value:
                    id: video_abc123
                    object: video
                    status: completed
                    model: veo-3.1-fast-generate-preview
                    progress: 100
                    video_url: https://...
                    seconds: 6
                    size: 1280x720
        '404':
          description: 任务不存在
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    VideoObject:
      type: object
      properties:
        id:
          type: string
          description: 任务 ID
          example: video_abc123
        object:
          type: string
          enum:
            - video
          example: video
        created_at:
          type: integer
          description: 创建时间戳
          example: 1761234567
        completed_at:
          type: integer
          description: 完成时间戳
        status:
          type: string
          description: 任务状态
          enum:
            - queued
            - in_progress
            - completed
            - failed
          example: queued
        model:
          type: string
          description: 模型名称
          example: veo-3.1-fast-generate-preview
        prompt:
          type: string
          description: 提示词
        progress:
          type: number
          description: 进度（0-100）
          example: 0
        seconds:
          type: integer
          description: 视频时长
          example: 6
        size:
          type: string
          description: 分辨率
          example: 1280x720
        video_url:
          type: string
          description: 视频直链（完成后返回）
        error:
          $ref: '#/components/schemas/VideoError'
    Error:
      type: object
      properties:
        error:
          type: object
          properties:
            message:
              type: string
            type:
              type: string
            code:
              type: string
    VideoError:
      type: object
      properties:
        code:
          type: string
        message:
          type: string
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      description: API Key

````