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

# Jimeng Video Generation

> Use `POST /v1/videos` to call the Jimeng model and submit asynchronous video tasks.

# Jimeng Video Generation

OpenAI-format entry point. If you need to use the unified video `POST /v1/video/create`, see [Generate Video](./unified-generation).

Jimeng currently uses `POST /v1/videos` to submit tasks, primarily via `multipart/form-data`.

* The route entry is `POST /v1/videos`.
* Currently submitted via `multipart/form-data`.
* The reference image is passed as a single file through the `input_reference` field.
* After a successful submission, the task `id` and `status` are returned, and you can later poll the result via [Task Status Query](./query).

## Supported Models

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

## Method and Path

```http theme={null}
POST /v1/videos
```

## Request Example

<CodeGroup>
  ```bash theme={null}
  curl -X POST https://octopusx.ai/v1/videos \
    -H "Authorization: Bearer YOUR_API_KEY" \
    -F "model=jimeng-video-3.0" \
    -F "prompt=猫咪在草地上追逐蝴蝶" \
    -F "seconds=5" \
    -F "size=1280x720"
  ```

  ```python theme={null}
  import requests

  resp = requests.post(
      "https://octopusx.ai/v1/videos",
      headers={"Authorization": "Bearer YOUR_API_KEY"},
      data={
          "model": "jimeng-video-3.0",
          "prompt": "猫咪在草地上追逐蝴蝶",
          "seconds": "5",
          "size": "1280x720",
      },
      timeout=60,
  )
  print(resp.json())
  ```
</CodeGroup>

### Image-to-Video Example

<CodeGroup>
  ```bash theme={null}
  # 带参考图的请求示例
  curl -X POST https://octopusx.ai/v1/videos \
    -H "Authorization: Bearer YOUR_API_KEY" \
    -F "model=jimeng-video-3.0" \
    -F "prompt=让人物向前走并微笑" \
    -F "seconds=5" \
    -F "size=720x1280" \
    -F "input_reference=@/path/to/image.png"
  ```

  ```python theme={null}
  # 带参考图的请求示例
  import requests

  with open("image.png", "rb") as f:
      resp = requests.post(
          "https://octopusx.ai/v1/videos",
          headers={"Authorization": "Bearer YOUR_API_KEY"},
          data={
              "model": "jimeng-video-3.0",
              "prompt": "让人物向前走并微笑",
              "seconds": "5",
              "size": "720x1280",
          },
          files={"input_reference": f},
          timeout=60,
      )
      print(resp.json())
  ```
</CodeGroup>

## Response Example

<ResponseExample>
  ```json 200 theme={null}
  {
    "id": "video_123",
    "task_id": "video_123",
    "object": "video",
    "model": "jimeng-video-3.0",
    "status": "queued",
    "progress": 0,
    "created_at": 1712697600
  }
  ```
</ResponseExample>

## Authentication

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

## Body

<ParamField body="model" type="string" required>
  Model name. Supports `jimeng-video-3.0` and `jimeng-video-2.0`.
</ParamField>

<ParamField body="prompt" type="string" required>
  Prompt describing the video content. Supports Chinese and English.
</ParamField>

<ParamField body="input_reference" type="file">
  Reference image. Upload a single image file for image-to-video scenarios. Supported image formats include png, jpeg, jpg, and webp.
</ParamField>

<ParamField body="seconds" type="string">
  Video duration in seconds. Available values: `5`, `10`, `15`.
</ParamField>

<ParamField body="size" type="string">
  Video size. Available values: `720x1280` (portrait), `1280x720` (landscape). Defaults to `720x1280`.
</ParamField>

## Current Rules

| Item                    | Rule                                                |
| ----------------------- | --------------------------------------------------- |
| Default duration        | If not explicitly provided, defaults to `5` seconds |
| Default size            | If not explicitly provided, defaults to `720x1280`  |
| Reference image         | Upload a single image file via `input_reference`    |
| Reference image formats | Supports png, jpeg, jpg, and webp                   |

## Related APIs

* [Jimeng Video Overview](./overview)
* [Task Status Query](./query)
* [Generate Video (Unified Video)](./unified-generation)
