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

# 视频下载

> 下载生成的视频文件

当视频生成任务完成后，你可以通过下载接口获取视频文件。

## 下载视频文件

使用视频 ID 直接下载生成的视频：

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

<Callout type="info">
  注意使用 `-L` 参数以支持重定向，视频文件可能托管在 CDN 上。
</Callout>

### 路径参数

* `video_id`：视频任务的唯一标识符

### 响应

* **成功（200）**：返回 MP4 格式的视频文件流
* **未找到（404）**：视频任务不存在或尚未完成

## 注意事项

* 下载不消耗额外配额，可以多次下载同一视频
* 建议在下载后保存到本地存储，避免依赖临时链接

## 时长与文件大小提示

* 当前支持的视频时长档位：10 秒、15 秒、25 秒（具体可用档位取决于所选模型与渠道）。
* 同等内容下，时长越长文件越大、生成时间越久；下载时间也会相应增加。
* 若需更快下载与预览，建议先生成 10 秒版本进行效果确认，再发起更长时长的正式生成。

<Callout type="warning">
  视频文件过期时间较短，请在任务完成后及时下载。视频 URL 可能包含临时访问令牌，请勿公开分享。
</Callout>


## OpenAPI

````yaml GET /v1/videos/{video_id}/content
openapi: 3.0.0
info:
  title: OpenAI Video API
  description: OpenAI Sora 视频生成 API
  version: 1.0.0
servers:
  - url: https://models.rivus.cn
    description: Rivus AI 生产环境
security:
  - BearerAuth: []
paths:
  /v1/videos/{video_id}/content:
    get:
      tags:
        - Videos
      summary: 下载视频内容
      description: 下载生成的视频文件
      operationId: downloadVideo
      parameters:
        - name: video_id
          in: path
          required: true
          description: 视频任务的唯一标识符
          schema:
            type: string
          example: video_abc123
      responses:
        '200':
          description: 视频文件
          content:
            video/mp4:
              schema:
                type: string
                format: binary
        '404':
          description: 视频任务不存在或未完成
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '410':
          description: 视频已过期
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    Error:
      type: object
      properties:
        error:
          type: object
          properties:
            message:
              type: string
              description: 错误描述
              example: Invalid request parameters
            type:
              type: string
              description: 错误类型
              example: invalid_request_error
            code:
              type: string
              description: 错误代码
              example: invalid_parameters
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: 使用 API Key 作为 Bearer Token

````