> ## 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` 通过统一视频格式提交 Veo 异步生成任务。

# 创建视频

Veo 统一视频入口使用 `POST /v1/video/create`，请求体为 JSON。与 [OpenAI 格式的 Veo 视频生成](./generation) 不同，本接口使用 `images`、`orientation`、`aspect_ratio` 等字段表达参考图与画幅。

* 路由入口是 `POST /v1/video/create`。
* 参考图通过 `images` 数组传入 URL 列表。
* 常见模型示例包括 `veo3.1-fast-components` 等，以当前渠道实际可用模型为准。
* 提交成功后返回带 `id`、`status`、`progress` 的任务对象，后续用 [查询任务](./unified-query) 轮询结果。

## 方法与路径

```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" \
    -H "Accept: application/json" \
    -d '{
      "prompt": "牛飞上天了",
      "model": "veo3.1-fast-components",
      "images": [
        "https://example.com/frame-1.png",
        "https://example.com/frame-2.png"
      ],
      "orientation": "landscape",
      "size": "1280x720",
      "duration": 8,
      "aspect_ratio": "16:9",
      "enable_upsample": false
    }'
  ```

  ```python theme={null}
  import requests

  resp = requests.post(
      "https://octopusx.ai/v1/video/create",
      headers={
          "Authorization": "Bearer YOUR_API_KEY",
          "Content-Type": "application/json",
          "Accept": "application/json",
      },
      json={
          "prompt": "牛飞上天了",
          "model": "veo3.1-fast-components",
          "images": [
              "https://example.com/frame-1.png",
              "https://example.com/frame-2.png",
          ],
          "orientation": "landscape",
          "size": "1280x720",
          "duration": 8,
          "aspect_ratio": "16:9",
          "enable_upsample": False,
      },
      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",
      Accept: "application/json",
    },
    body: JSON.stringify({
      prompt: "牛飞上天了",
      model: "veo3.1-fast-components",
      images: [
        "https://example.com/frame-1.png",
        "https://example.com/frame-2.png",
      ],
      orientation: "landscape",
      size: "1280x720",
      duration: 8,
      aspect_ratio: "16:9",
      enable_upsample: false,
    }),
  });

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

## 响应示例

<ResponseExample>
  ```json 200 theme={null}
  {
    "id": "video_8b8232a3-847b-40e2-a3a3-912813b7ac60",
    "object": "video",
    "model": "veo3.1-fast-components",
    "status": "queued",
    "progress": 0,
    "created_at": 1768489641,
    "size": "1280x720",
    "detail": {
      "input": {
        "aspect_ratio": "16:9",
        "images": [
          "https://example.com/frame-1.png",
          "https://example.com/frame-2.png"
        ],
        "model": "veo3.1-fast-components",
        "prompt": "牛飞上天了"
      }
    },
    "status_update_time": 1768489641
  }
  ```
</ResponseExample>

## 认证

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

## Body

<ParamField body="images" type="array" required>
  图片链接数组。传入参考图片 URL 列表。
</ParamField>

<ParamField body="model" type="string" required>
  模型名字。例如 `veo3.1-fast-components`。
</ParamField>

<ParamField body="orientation" type="string" required>
  画面方向。`portrait` 表示竖屏，`landscape` 表示横屏。
</ParamField>

<ParamField body="prompt" type="string" required>
  提示词。描述视频内容的文本。
</ParamField>

<ParamField body="size" type="string" required>
  输出尺寸。默认为 `720x1280`。可选值：`720x1280`、`1280x720`。
</ParamField>

<ParamField body="duration" type="integer" required>
  视频时长（秒）。Veo 默认为 8 秒。
</ParamField>

<ParamField body="aspect_ratio" type="string" required>
  宽高比。`16:9` 或者 `9:16`。
</ParamField>

<ParamField body="enable_upsample" type="boolean">
  是否高清增强（仅支持横屏）。
</ParamField>

## Response

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

<ResponseField name="object" type="string">
  对象类型，常见为 `video`。
</ResponseField>

<ResponseField name="model" type="string">
  实际使用的模型名。
</ResponseField>

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

<ResponseField name="progress" type="integer">
  任务进度百分比。
</ResponseField>

<ResponseField name="created_at" type="integer">
  创建时间（Unix 时间戳）。
</ResponseField>

<ResponseField name="size" type="string">
  输出尺寸。
</ResponseField>

<ResponseField name="detail" type="object">
  提交详情，通常包含回显的 `input` 字段。
</ResponseField>

<ResponseField name="status_update_time" type="integer">
  状态最近更新时间（Unix 时间戳）。
</ResponseField>

## 相关接口

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