> ## 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.

# 创建任务

> 提交 Runway 任务（文生 / 图生 / 视频生视频）。

**路径：** `POST https://api.omniall.ai/v1/task/submit`

也可用 `POST /runway/v1/task/submit`。请求体：`model` + `input`。

**同一接口、不同用例：** 文生视频 · 图生视频 · 视频生视频 — 在下方示例中切换。

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



## OpenAPI

````yaml zh-CN/openapi/runway-unified.yaml POST /v1/task/submit
openapi: 3.1.0
info:
  title: Omniall AI — Runway（统一任务格式）
  version: 1.0.0
  description: >-
    通过统一任务格式调用 Runway（推荐）。


    **创建：** `POST https://api.omniall.ai/v1/task/submit`


    别名： `POST /runway/v1/task/submit`


    **查询：** `GET /v1/task/{task_id}` (alias `GET /runway/v1/task/{task_id}`)


    模型示例： `gen4_turbo`, `gen4_turbo/image-to-video`, `gen4_aleph`,
    `gen4_aleph/video-to-video`, `gen3a_turbo`, `gen4.5/image-to-video` —
    见[模型广场](https://omniall.ai/pricing)。


    鉴权：`Authorization: Bearer sk-...`
servers:
  - url: https://api.omniall.ai
security: []
paths:
  /v1/task/submit:
    post:
      tags:
        - Runway unified
      summary: 创建任务
      description: |-
        提交 Runway 任务（文生 / 图生 / 视频生视频）。

        **路径：** `POST https://api.omniall.ai/v1/task/submit`

        也可用 `POST /runway/v1/task/submit`。请求体：`model` + `input`。

        **同一接口、不同用例：** 文生视频 · 图生视频 · 视频生视频 — 在下方示例中切换。

        鉴权：`Authorization: Bearer sk-...`
      operationId: runwayUnifiedSubmit
      parameters:
        - name: Authorization
          in: header
          required: true
          schema:
            type: string
            example: Bearer sk-...
          description: Bearer API Key。
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - model
                - input
              properties:
                model:
                  type: string
                  description: 模型 ID，如 `gen4_turbo`、`gen4_aleph/video-to-video`。
                  example: gen4_turbo
                input:
                  type: object
                  description: 任务输入；字段随文生 / 图生 / 视频生视频变化。
                  properties:
                    promptText:
                      type: string
                      maxLength: 1000
                      description: 提示词（最长 1000 字符 UTF-16）。多数场景必填。
                    promptImage:
                      oneOf:
                        - type: string
                        - type: array
                          items:
                            type: string
                      description: 图生视频参考图 URL（可为字符串或数组）。
                    videoUri:
                      type: string
                      description: 视频生视频源视频（HTTPS / Runway / data URI）。
                    ratio:
                      type: string
                      enum:
                        - '1280:720'
                        - '720:1280'
                        - '1104:832'
                        - '960:960'
                        - '832:1104'
                        - '1584:672'
                      description: 输出比例。
                    duration:
                      type: integer
                      minimum: 2
                      maximum: 10
                      description: 时长（秒），2–10。
                    seed:
                      oneOf:
                        - type: string
                        - type: integer
                      description: 随机种子 0–4294967295。
                    references:
                      type: array
                      items:
                        type: object
                      description: 可选参考（视频生视频）。
                    contentModeration:
                      type: object
                      description: 内容审核选项。
                callback_url:
                  type: string
                  description: 可选回调 URL。
            examples:
              文生视频:
                summary: 文生视频
                value:
                  model: gen4_turbo
                  input:
                    promptText: 一只猫在雨中行走
                    ratio: '1280:720'
                    duration: 5
              图生视频:
                summary: 图生视频
                value:
                  model: gen4_turbo
                  input:
                    promptText: 一只猫在雨中行走
                    promptImage: https://example.com/cat.png
                    ratio: '1280:720'
                    duration: 5
              视频生视频:
                summary: 视频生视频
                value:
                  model: gen4_aleph/video-to-video
                  input:
                    videoUri: https://example.com/source.mp4
                    promptText: 电影感调色，慢动作
                    ratio: '1280:720'
                    duration: 5
      responses:
        '200':
          description: 任务已受理
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnifiedTask'
              example:
                id: task_xxxxxxxxxxxxxxx
                status: pending
                created_at: 1743724770
components:
  schemas:
    UnifiedTask:
      type: object
      properties:
        id:
          type: string
        status:
          type: string
          description: pending / running / completed / failed …
        created_at:
          type: integer
        completed_at:
          type: integer
        outputs:
          type: array
          items:
            type: string
          description: 完成后的结果 URL 列表。
        error:
          type: string
        message:
          type: string

````

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