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

# 创建视频 · 即梦兼容

> 使用即梦兼容格式提交 Seedance 视频任务，查看示例、输入限制和完整参数。

已有即梦 CVSync2Async 客户端时，可以复用以下请求字段。你需要改用 AIOHub API 令牌，将 `req_key` 改为 Seedance 模型名，并按本页适配响应解析。提交与查询的响应不同，不是完整的即梦官方 API。

## 接入配置

服务地址为 `https://api.aiohub.org`。所有请求使用 `Authorization: Bearer <AIOHUB_API_KEY>`，替换为完整 `sk-` API 令牌，不使用即梦的签名鉴权。令牌分组需能访问所选模型。

## 请求示例

```bash theme={"system"}
curl "https://api.aiohub.org/jimeng/?Action=CVSync2AsyncSubmitTask&Version=2022-08-31" \
  -H "Authorization: Bearer <AIOHUB_API_KEY>" \
  -H "Content-Type: application/json" \
  -d '{
    "req_key": "doubao-seedance-2-0-fast-260128",
    "prompt": "A blue ceramic cup on a wooden table in daylight.",
    "frames": 121,
    "aspect_ratio": "16:9",
    "seed": -1
  }'
```

提交响应是 OpenAI 视频对象，关键字段如下。保存顶层 `task_id`，不要从 `data.task_id` 读取。

```json theme={"system"}
{"id": "task_example", "task_id": "task_example", "object": "video", "status": "queued"}
```

拿到任务标识后，转到 [查询任务](/cn/api/video-jimeng-get)。

## 参数范围

输出固定为 720p。需要其他分辨率、参考音频或视频编辑时，使用 [Ark / Seedance](/cn/api/video-ark)。

<Note>创建请求超时且未拿到任务标识时，先检查 [用量日志](https://api.aiohub.org/console/log)，避免重复生成和扣费。400 错误需要先修正参数；401 错误请检查令牌。模型权限和额度见 [鉴权](/cn/api/authentication)。</Note>


## OpenAPI

````yaml openapi/jimeng-submit.json POST /jimeng/
openapi: 3.0.1
info:
  title: AIOHub 即梦视频 API
  version: 1.0.0
servers:
  - url: https://api.aiohub.org
security: []
paths:
  /jimeng/:
    post:
      tags:
        - 即梦视频
      summary: 提交即梦视频任务
      description: |
        即梦提交操作，通过 Action=CVSync2AsyncSubmitTask 区分。

        返回顶层 id 和 task_id，不是 data.task_id。保存 task_id，后续使用查询接口；重复提交会创建新的生成任务。
      operationId: submitJimengSeedanceVideo
      parameters:
        - name: Action
          in: query
          required: true
          schema:
            type: string
            enum:
              - CVSync2AsyncSubmitTask
            default: CVSync2AsyncSubmitTask
          description: 操作名称，使用此页的固定值。
        - name: Version
          in: query
          required: true
          schema:
            type: string
            enum:
              - '2022-08-31'
            default: '2022-08-31'
          description: 协议版本。
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                req_key:
                  type: string
                  description: 完整 Seedance 模型名。
                  example: doubao-seedance-2-0-fast-260128
                prompt:
                  type: string
                  description: 提示词，纯文本生成时必填。
                image_urls:
                  type: array
                  maxItems: 2
                  items:
                    type: string
                    format: uri
                  description: 一张首帧图或首帧加尾帧。不能与 binary_data_base64 同时使用。
                binary_data_base64:
                  type: array
                  maxItems: 2
                  items:
                    type: string
                  description: 首帧或首尾帧的 base64 图片内容，不带 data URL 前缀。
                frames:
                  type: integer
                  enum:
                    - 121
                    - 241
                  default: 121
                  description: 121 为 5 秒，241 为 10 秒。
                aspect_ratio:
                  type: string
                  description: 文生视频使用该比例；有图片输入时跟随图片。
                  enum:
                    - '16:9'
                    - '4:3'
                    - '1:1'
                    - '3:4'
                    - '9:16'
                    - '21:9'
                  default: '16:9'
                seed:
                  type: integer
                  enum:
                    - -1
                  default: -1
                  description: 仅支持随机种子 -1。
              required:
                - req_key
            example:
              req_key: doubao-seedance-2-0-fast-260128
              prompt: A blue ceramic cup on a wooden table in daylight.
              frames: 121
              aspect_ratio: '16:9'
              seed: -1
      responses:
        '200':
          description: 任务已受理。
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                    description: 任务 ID。
                  task_id:
                    type: string
                    description: 用于即梦查询的任务 ID。
                  object:
                    type: string
                    enum:
                      - video
                  model:
                    type: string
                  status:
                    type: string
                    enum:
                      - queued
                  progress:
                    type: integer
                  created_at:
                    type: integer
                    format: int64
                required:
                  - id
                  - task_id
                  - object
                  - model
                  - status
                  - progress
                  - created_at
              example:
                id: task_example
                task_id: task_example
                object: video
                model: doubao-seedance-2-0-fast-260128
                status: queued
                progress: 0
                created_at: 1791275108
        '400':
          description: 字段或取值不支持。
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SeedanceTaskError'
        '401':
          description: API 令牌缺失或无效。
        '429':
          description: 请求过多，等待后重试。
      security:
        - BearerAuth: []
components:
  schemas:
    SeedanceTaskError:
      type: object
      description: 视频任务接口的错误响应。
      properties:
        code:
          type: string
          description: 错误码
          example: invalid_duration
        message:
          type: string
          description: 错误信息
          example: duration must be between 4 and 30 seconds for this model
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      description: API key (sk-xxx)

````

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