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

# 创建视频

> 创建 Muse 视频任务。

**路径：** `POST https://api.omniall.ai/v1/video/generations`

**场景：**
- 文生视频：只传 `prompt` + `seconds`（及可选 `size` / `resolution`）
- 图生 / 多图参考：传 `reference_image` 或 `reference_images`（合计最多 7 张）
- 动作 / 视频参考：传 `reference_videos`（最多 3 个 MP4 URL）

**约束：**
- `muse-video`：`seconds` 必填，只能是 5 / 10 / 15 / 20 / 25 / 30
- `muse-video-60s`：固定 60 秒（传 `seconds: 60`）
- `resolution` 仅 `720P`（可省略，默认 720P）
- `size` 仅 `16:9` / `9:16`（可省略，默认 16:9）
- `count` 只能为 1
- 不支持参考音频
- 参数不合法返回 HTTP 400

鉴权：`Authorization: Bearer sk-...`



## OpenAPI

````yaml zh-CN/openapi/muse-video.yaml POST /v1/video/generations
openapi: 3.1.0
info:
  title: Omniall AI — Muse 视频
  version: 1.0.0
  description: |-
    Muse 异步视频生成（`muse-video` / `muse-video-60s`）。

    **创建：** `POST https://api.omniall.ai/v1/video/generations`

    **查询：** `GET https://api.omniall.ai/v1/video/generations/{task_id}`

    鉴权：`Authorization: Bearer sk-...`

    | 模型 | 规格 |
    |------|------|
    | `muse-video` | 720P；时长 5 / 10 / 15 / 20 / 25 / 30 秒；每次 1 条 |
    | `muse-video-60s` | 720P；固定 60 秒；每次 1 条 |

    二者为不同模型，请按场景选择。生成通常需数分钟，请轮询查询接口。
servers:
  - url: https://api.omniall.ai
security: []
tags:
  - name: Muse
    description: Muse 文生视频 / 图生视频 / 参考视频
paths:
  /v1/video/generations:
    post:
      tags:
        - Muse
      summary: 创建视频
      description: |-
        创建 Muse 视频任务。

        **路径：** `POST https://api.omniall.ai/v1/video/generations`

        **场景：**
        - 文生视频：只传 `prompt` + `seconds`（及可选 `size` / `resolution`）
        - 图生 / 多图参考：传 `reference_image` 或 `reference_images`（合计最多 7 张）
        - 动作 / 视频参考：传 `reference_videos`（最多 3 个 MP4 URL）

        **约束：**
        - `muse-video`：`seconds` 必填，只能是 5 / 10 / 15 / 20 / 25 / 30
        - `muse-video-60s`：固定 60 秒（传 `seconds: 60`）
        - `resolution` 仅 `720P`（可省略，默认 720P）
        - `size` 仅 `16:9` / `9:16`（可省略，默认 16:9）
        - `count` 只能为 1
        - 不支持参考音频
        - 参数不合法返回 HTTP 400

        鉴权：`Authorization: Bearer sk-...`
      operationId: museCreateVideo
      parameters:
        - name: Authorization
          in: header
          required: true
          schema:
            type: string
            example: Bearer sk-...
          description: Bearer API Key，例如 `Bearer sk-...`。
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/MuseCreateVideoRequest'
            examples:
              muse_text:
                summary: 文生视频（muse-video · 5 秒）
                value:
                  model: muse-video
                  prompt: 海边日落延时摄影，金色阳光洒在波浪上
                  seconds: 5
                  resolution: 720P
                  size: '16:9'
                  count: 1
              muse_refs:
                summary: 参考图 + 参考视频（muse-video · 10 秒竖屏）
                value:
                  model: muse-video
                  prompt: 人物在城市街头漫步，镜头缓慢跟随，动作参考视频
                  seconds: 10
                  size: '9:16'
                  reference_images:
                    - https://example.com/1.jpg
                    - https://example.com/2.jpg
                  reference_videos:
                    - https://example.com/motion.mp4
              muse_60:
                summary: 固定 60 秒（muse-video-60s）
                value:
                  model: muse-video-60s
                  prompt: 人物在城市街头漫步，镜头缓慢跟随
                  seconds: 60
                  resolution: 720P
                  size: '16:9'
                  reference_images:
                    - https://example.com/1.jpg
                    - https://example.com/2.jpg
      responses:
        '200':
          description: 任务已提交（processing）
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MuseVideoTask'
              example:
                id: task_xxxxxxxx
                task_id: task_xxxxxxxx
                object: video
                model: muse-video
                status: processing
                progress: 0
                seconds: '5'
                size: '16:9'
        '400':
          description: 参数不合法
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OpenAIErrorResponse'
        '401':
          description: 未授权
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OpenAIErrorResponse'
        '429':
          description: 限流
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OpenAIErrorResponse'
        '500':
          description: 服务端错误
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OpenAIErrorResponse'
components:
  schemas:
    MuseCreateVideoRequest:
      type: object
      required:
        - model
        - prompt
      description: Muse 创建视频请求体。
      properties:
        model:
          $ref: '#/components/schemas/MuseModel'
        prompt:
          type: string
          description: 视频描述文本。
          example: 海边日落延时摄影，金色阳光洒在波浪上
        seconds:
          oneOf:
            - type: integer
            - type: string
          description: |
            时长（秒）。
            - `muse-video`：必填，只能是 5 / 10 / 15 / 20 / 25 / 30
            - `muse-video-60s`：固定 60
            若同时传 `duration`，须与 `seconds` 一致；建议只传 `seconds`。
          example: 5
        duration:
          oneOf:
            - type: integer
            - type: string
          description: 与 `seconds` 等价的兼容字段；二者同时传且不一致时会拒绝。建议只传 `seconds`。
        resolution:
          type: string
          description: 分辨率。仅支持 `720P`；不传默认 `720P`。
          enum:
            - 720P
            - 720p
          default: 720P
          example: 720P
        size:
          type: string
          description: 画面比例。仅 `16:9` / `9:16`；不传默认 `16:9`。
          enum:
            - '16:9'
            - '9:16'
          default: '16:9'
          example: '16:9'
        count:
          type: integer
          description: 生成条数。只能为 1。
          enum:
            - 1
          default: 1
          example: 1
        reference_image:
          type: string
          description: 单张参考图（http/https 图片 URL）。与 `reference_images` 合计最多 7 张。
          example: https://example.com/1.jpg
        reference_images:
          type: array
          items:
            type: string
          description: 多张参考图 URL 数组。与 `reference_image` 合计最多 7 张。不传参考素材即为文生视频。
          maxItems: 7
        reference_videos:
          type: array
          items:
            type: string
          description: 参考视频 URL 数组（http/https 的 MP4）。最多 3 个。
          maxItems: 3
    MuseVideoTask:
      type: object
      description: Muse 视频任务对象。
      properties:
        id:
          type: string
          description: 任务 ID（与 `task_id` 通常相同）。
        task_id:
          type: string
          description: 任务 ID。
        object:
          type: string
          description: 对象类型，通常为 `video`。
          example: video
        model:
          $ref: '#/components/schemas/MuseModel'
        status:
          type: string
          description: 任务状态，如 `processing` / `completed` / `failed`。
          example: processing
        progress:
          type: number
          description: 进度 0–100（若返回）。
        seconds:
          oneOf:
            - type: string
            - type: integer
          description: 请求时长。
        size:
          type: string
          description: 画面比例。
        resolution:
          type: string
          description: 分辨率。
        url:
          type: string
          description: 完成后的视频地址（也可能返回为 `video_url`）。
        video_url:
          type: string
          description: 完成后的视频地址（兼容字段）。
        error:
          type: object
          description: 失败时的错误信息。
          properties:
            message:
              type: string
    OpenAIErrorResponse:
      type: object
      properties:
        error:
          type: object
          properties:
            message:
              type: string
              description: |
                常见参数错误提示示例：
                - muse-video 必须传 seconds（可选 5 / 10 / 15 / 20 / 25 / 30 秒）
                - muse-video 时长只能选 5 / 10 / 15 / 20 / 25 / 30 秒
                - 不支持的画面比例…该模型支持: 16:9 / 9:16
                - muse-video 分辨率只支持 720P
                - muse-video 每次只能生成 1 条
                - muse-video 最多 7 张参考图…
                - muse-video 最多 3 个参考视频…
                - muse-video 不支持参考音频
                - seconds 与 duration 不一致
            type:
              type: string
            code:
              type: string
    MuseModel:
      type: string
      description: Muse 模型 ID（与模型广场一致）。
      enum:
        - muse-video
        - muse-video-60s
      example: muse-video

````

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