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

# 创建视频

> 使用 `POST /v1/video/create` 通过统一视频格式提交即梦异步生成任务。

# 创建视频

即梦统一视频入口使用 `POST /v1/video/create`，请求体为 JSON。与 [OpenAI 格式的即梦视频生成](./generation) 不同，本接口使用 `images`、`aspect_ratio`、`size`、`duration` 等字段。

* 路由入口是 `POST /v1/video/create`。
* 参考图通过 `images` 数组传入 URL 列表，文生视频可传空数组。
* 常见模型示例为 `jimeng-video-3.0`，以当前渠道实际可用模型为准。
* 提交成功后返回任务 `id` 与 `status`，后续用 [查询任务](./unified-query) 轮询结果。

## 支持模型

* `jimeng-video-3.0`
* `jimeng-video-2.0`

## 方法与路径

```http theme={null}
POST /v1/video/create
```

## 请求示例

<CodeGroup>
  ```bash theme={null}
  curl -X POST https://octopusx.ai/v1/video/create \
    -H "Authorization: Bearer YOUR_API_KEY" \
    -H "Content-Type: application/json" \
    -d '{
      "model": "jimeng-video-3.0",
      "prompt": "cat fish",
      "aspect_ratio": "16:9",
      "size": "1080P",
      "images": []
    }'
  ```

  ```python theme={null}
  import requests

  resp = requests.post(
      "https://octopusx.ai/v1/video/create",
      headers={
          "Authorization": "Bearer YOUR_API_KEY",
          "Content-Type": "application/json",
      },
      json={
          "model": "jimeng-video-3.0",
          "prompt": "cat fish",
          "aspect_ratio": "16:9",
          "size": "1080P",
          "images": [],
      },
      timeout=60,
  )
  print(resp.json())
  ```

  ```javascript theme={null}
  const response = await fetch("https://octopusx.ai/v1/video/create", {
    method: "POST",
    headers: {
      Authorization: "Bearer YOUR_API_KEY",
      "Content-Type": "application/json",
    },
    body: JSON.stringify({
      model: "jimeng-video-3.0",
      prompt: "cat fish",
      aspect_ratio: "16:9",
      size: "1080P",
      images: [],
    }),
  });

  console.log(await response.json());
  ```
</CodeGroup>

## 响应示例

<ResponseExample>
  ```json 200 theme={null}
  {
    "created_at": "2025-11-08T23:07:57.510141923+08:00",
    "status": "processing",
    "task_id": "48038932-0ff5-4251-8b4b-7a76c09fd114"
  }
  ```
</ResponseExample>

## 认证

```http theme={null}
Authorization: Bearer YOUR_API_KEY
```

## Body

<ParamField body="model" type="string" required>
  模型名称，例如 `jimeng-video-3.0`。
</ParamField>

<ParamField body="prompt" type="string" required>
  提示词。生成视频的文本描述，支持中文和英文。
</ParamField>

<ParamField body="images" type="array<string>" required>
  图片链接列表。文生视频传 `[]`，首帧生视频传 1 张图片，首尾帧生视频传 2 张图片。支持图片 URL，图片格式包括 png、jpeg、jpg、webp。
</ParamField>

<ParamField body="aspect_ratio" type="string" required>
  画幅比例。可选值包括 `16:9`、`4:3`、`1:1`、`3:4`、`9:16`、`21:9`。
</ParamField>

<ParamField body="size" type="string" required>
  视频尺寸。可选值包括 `720P`、`1080P`。
</ParamField>

## Response

<ResponseField name="created_at" type="string">
  创建时间（ISO 8601 格式）。
</ResponseField>

<ResponseField name="status" type="string">
  任务状态，常见值包括 `processing`、`failed`、`completed`。
</ResponseField>

<ResponseField name="task_id" type="string">
  任务 ID，后续查询时作为 `id` 参数传入。
</ResponseField>

## 相关接口

* [即梦视频概览](./overview)
* [查询任务](./unified-query)
* [即梦视频生成（OpenAI 格式）](./generation)
