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

# 创建 Omni 10s 视频

> 统一视频创建入口。当前可用 model：omni-10s、seedance2.0-md、seedance2.5-30s。

创建 **Omni 10s**（`omni-10s`）异步视频任务。使用统一入口 `POST /v1/videos`，并设置 `model` 为 `omni-10s`。成功后返回 `task_id`，用 [查询视频任务](/zh/api-reference/common/query) 轮询，完成后从 `result.video_url` 取片。

## 模型

| `model` | 别名 | 计费键 | 时长 | 分辨率 |
| - | - | - | - | - |
| `omni-10s` | `omni-flash-10s`（会规范为 `omni-10s`） | `omni-10s` | 固定 **10** 秒 | 固定 **720p** |

计费方式为 `per_task`（按次）。实际单价以 [模型目录](/zh/api-reference/common/model-catalog) 与创建响应中的 `cost` 为准。

## 约束

* 画幅仅支持 `16:9`、`9:16`；默认 `16:9`
* `duration` / `seconds` 可省略；若传入必须为 `10`
* `resolution` 固定为 `720p`（传入其他值无效或被忽略）
* **不支持**参考音频
* 以下模式**互斥**，不可混用：
  * 纯文生视频（仅 `prompt`）
  * 参考图（最多 **7** 张）
  * 参考视频（最多 **7** 个；不可与参考图同时使用）
  * 首尾帧（`first_image` 必填；`last_image` 可选；不可与参考图/参考视频同时使用）

参考素材须为公网 `https://` URL。

## 请求参数

| 字段 | 类型 | 必填 | 说明 |
| - | - | - | - |
| `model` | string | 是 | `omni-10s`（或别名 `omni-flash-10s`） |
| `prompt` | string | 是 | 生成描述，不能为空 |
| `aspect_ratio` / `ratio` | string | 否 | 仅 `16:9`、`9:16`；默认 `16:9` |
| `duration` / `seconds` | int \| string | 否 | 固定 **10**；省略亦可 |
| `images` / `reference_images` | string\[] | 否 | 参考图，最多 **7** 张 |
| `videos` / `reference_videos` | string\[] | 否 | 参考视频，最多 **7** 个 |
| `first_image` | string | 条件 | 首尾帧模式的首帧 URL；提供尾帧时必须同时提供首帧 |
| `last_image` | string | 否 | 尾帧 URL；需与 `first_image` 一起使用 |

## 示例

### 文生视频

```bash theme={null}
curl -X POST 'https://sigrunai.com/v1/videos' \
  -H 'Authorization: Bearer sk_xxx' \
  -H 'Content-Type: application/json' \
  -d '{
    "model": "omni-10s",
    "prompt": "一只金毛犬在阳光下的草地奔跑，电影感跟拍",
    "aspect_ratio": "16:9"
  }'
```

### 首尾帧

```bash theme={null}
curl -X POST 'https://sigrunai.com/v1/videos' \
  -H 'Authorization: Bearer sk_xxx' \
  -H 'Content-Type: application/json' \
  -d '{
    "model": "omni-10s",
    "prompt": "镜头从近景平滑推到远景，光影自然过渡",
    "aspect_ratio": "9:16",
    "first_image": "https://example.com/first.jpg",
    "last_image": "https://example.com/last.jpg"
  }'
```

成功响应示例：

```json theme={null}
{
  "code": 20000,
  "msg": "提交成功",
  "data": {
    "task_id": "vid_xxxxxxxx",
    "status": "queued",
    "progress": 0,
    "model": "omni-10s",
    "cost": 0,
    "result": {}
  }
}
```

`cost` 为本次扣费（积分），以实际响应为准。

## 轮询

```bash theme={null}
curl -X GET 'https://sigrunai.com/v1/videos/vid_xxxxxxxx' \
  -H 'Authorization: Bearer sk_xxx'
```

状态说明见 [查询视频任务](/zh/api-reference/common/query)。完成后读取 `data.result.video_url`（约保留 **3** 天，请及时转存）。


## OpenAPI

````yaml POST /v1/videos
openapi: 3.1.0
info:
  title: AI Platform OpenAPI
  description: 异步图片与视频生成。创建后轮询 task_id；结果 URL 约保留 3 天。
  version: 1.0.0
servers:
  - url: https://sigrunai.com
    description: AI Platform 生产环境
security:
  - bearerAuth: []
paths:
  /v1/videos:
    post:
      tags:
        - Videos
      summary: Create video task
      description: >-
        Unified video create entry. Available models: omni-10s, seedance2.0-md,
        seedance2.5-30s.
      operationId: createVideo
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/VideoCreateRequest'
            examples:
              omni10s:
                summary: omni-10s
                value:
                  model: omni-10s
                  prompt: >-
                    A golden retriever running across a sunny meadow, cinematic
                    tracking shot
                  aspect_ratio: '16:9'
              seedanceMd:
                summary: seedance2.0-md
                value:
                  model: seedance2.0-md
                  prompt: 城市夜景延时，车流光轨
                  duration: 10
                  aspect_ratio: '16:9'
              seedance30s:
                summary: seedance2.5-30s
                value:
                  model: seedance2.5-30s
                  prompt: 一只猫在草地上奔跑，跟拍镜头
                  aspect_ratio: '9:16'
      responses:
        '200':
          description: Submitted
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TaskQueryResponse'
components:
  schemas:
    VideoCreateRequest:
      type: object
      required:
        - model
        - prompt
      properties:
        model:
          type: string
          description: omni-10s, seedance2.0-md, or seedance2.5-30s
          example: omni-10s
        prompt:
          type: string
        duration:
          oneOf:
            - type: integer
            - type: string
          description: >-
            omni-10s: fixed 10; seedance2.0-md: 5/10/15; seedance2.5-30s: fixed
            30
        seconds:
          oneOf:
            - type: integer
            - type: string
          description: Alias of duration
        aspect_ratio:
          type: string
        ratio:
          type: string
          description: Alias of aspect_ratio
        orientation:
          type: string
          description: portrait/landscape may imply aspect ratio
        size:
          type: string
        resolution:
          type: string
          description: omni-10s is fixed at 720p
        first_image:
          type: string
          format: uri
          description: First-frame URL for omni-10s frame mode
        last_image:
          type: string
          format: uri
          description: Last-frame URL for omni-10s; use with first_image
        images:
          type: array
          items:
            type: string
            format: uri
        reference_images:
          type: array
          items:
            type: string
            format: uri
        videos:
          type: array
          items:
            type: string
            format: uri
        reference_videos:
          type: array
          items:
            type: string
            format: uri
        audios:
          type: array
          items:
            type: string
            format: uri
        reference_audios:
          type: array
          items:
            type: string
            format: uri
    TaskQueryResponse:
      type: object
      properties:
        code:
          type: integer
          example: 20000
        msg:
          type: string
        data:
          $ref: '#/components/schemas/TaskQueryData'
    TaskQueryData:
      type: object
      properties:
        task_id:
          type: string
        status:
          type: string
          description: queued / processing / completed / failed 等
        progress:
          type: integer
        model:
          type: string
        created_at:
          type: integer
        completed_at:
          type: integer
        cost:
          type: number
        error_message:
          type: string
        result:
          $ref: '#/components/schemas/TaskResult'
    TaskResult:
      type: object
      properties:
        image_url:
          type: string
        video_url:
          type: string
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API Key
      description: 控制台创建的 API Key，格式：Bearer sk_xxx

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.