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

# Tạo video

> Giao diện tạo video định dạng tương thích OpenAI Sora. Hỗ trợ chế độ tạo từ văn bản thành video và tạo bằng ảnh/video tham chiếu.

- `POST /v1/videos`: Tạo tác vụ video
- `GET /v1/videos/{video_id}`: Truy vấn trạng thái tác vụ
- `GET /v1/videos/{video_id}/content`: Lấy nội dung nhị phân của video

Hiện chưa cung cấp ra bên ngoài:
- `GET /v1/videos`
- `POST /v1/videos/{video_id}/remix`

Header xác thực tiêu chuẩn:
- `Content-Type: application/json`

1. `POST /v1/videos` tạo tác vụ, lấy `id`
2. Thăm dò `GET /v1/videos/{id}` cho đến khi `completed` hoặc `failed`
3. Sau khi hoàn tất, ưu tiên sử dụng `video_url` trong kết quả trả về
4. Nếu cần tải xuống thống nhất, gọi `GET /v1/videos/{id}/content`

Tham số cốt lõi:
- `model: string`: Bắt buộc, tên mô hình công khai
- `prompt: string`: Khuyến nghị, mô tả tạo video
- `seconds: number|string`: Tùy chọn, thời lượng mục tiêu
- `duration: number|string`: Tùy chọn, bí danh thời lượng
- `size: string`: Tùy chọn, kích thước đầu ra
- `mode: string`: Tùy chọn, các giá trị phổ biến `t2v` `i2v` `i2v_first_last` `reference_material`

Tham số tương thích thường dùng:
- `aspect_ratio`
- `ratio`
- `quality`
- `resolution`
- `fps`
- `image`
- `image_url`
- `image_urls`
- `images`
- `reference_images`
- `input_reference`
- `end_image_url`
- `last_image_url`
- `video_urls`
- `audio_urls`
- `function_mode`
- `content`
- `callback_url`
- `external_task_id`

Kling 4.0 sử dụng trực tiếp các tham số video tiêu chuẩn; xem mục 4.6 để biết định dạng yêu cầu cụ thể.

### 4.1 Dòng Veo

Lưu ý: `stable`, `official` v.v. biểu thị các nhóm khác nhau, không phải hậu tố `model` dùng đối ngoại; khi gọi, vui lòng giữ `model` là tên mô hình cơ sở, nhóm tài khoản hoặc mã thông báo sẽ quyết định thực tế đi qua nhóm nào.

#### Mô hình chính Veo 3.x

- `veo3`
- `veo3-fast`
- `veo3-fast-frames`
- `veo3-frames`
- `veo3-pro`
- `veo3-pro-frames`
- `veo3.1`
- `veo3.1-fast`
- `veo3.1-pro`
- `veo3.1-components`
- `veo3.1-4k`
- `veo3.1-pro-4k`

Khuyến nghị:
- Với video tạo từ văn bản thuần túy, ưu tiên dùng mô hình chính `veo3*` / `veo3.1*`
- Với các tình huống tạo video từ ảnh hoặc từ tham chiếu, nên truyền rõ ràng `mode + image_url/reference_images`

### 4.2 Dòng Sora

Mô hình cơ sở:
- `sora-2`
- `sora-2-pro`

Khuyến nghị:
- `sora-2*` phù hợp cho các lệnh gọi thông dụng
- Nếu cần sử dụng các nhóm như `stable` / `official`, vui lòng giữ `model` là tên mô hình cơ sở, không thêm hậu tố vào sau tên mô hình.

Ví dụ yêu cầu:

```json
{
  "size": "1280x720",
  "images": [
    "https://example.png"
  ],
  "model": "sora-2",
  "prompt": "this is an example",
  "duration": 12,
  "fps": "24",
  "seed": "20231024",
  "mode": "i2v"
}
```

### 4.3 Dòng HappyHorse

Mô hình công khai:
- `happyhorse-1.0`

Khuyến nghị:
- `happyhorse-1.0` được phân biệt thông qua `mode`, `t2v`, `i2v`, `r2v`, `video_edit`.
- Trong định dạng tương thích của Sora, nên dùng mảng `content` để truyền các mục phương tiện.
- Mục văn bản dùng `type=text`, mục phương tiện dùng `type=image_url` và có thể kết hợp `role`, `name` để đánh dấu mục đích sử dụng của tài nguyên.

Ví dụ yêu cầu:

```json
{
  "size": "720x1280",
  "model": "happyhorse-1.0",
  "mode": "r2v",
  "prompt": "this is an example",
  "duration": 15,
  "content": [
    {
      "type": "text",
      "text": "this is an example"
    },
    {
      "type": "image_url",
      "image_url": {
        "url": "https://example.png"
      },
      "role": "reference_image",
      "name": "image1"
    }
  ],
  "parameters": {
    "resolution": "720P",
    "ratio": "9:16",
    "duration": 15,
    "seed": 1
  }
}
```

### 4.4 Dòng Seedance

Mô hình công khai:
- `doubao-seedance-1-0-lite-t2v-250428`
- `doubao-seedance-1-0-lite-i2v-250428`
- `doubao-seedance-1-0-pro-250528`
- `doubao-seedance-1-0-pro-fast-251015`
- `doubao-seedance-1-5-pro-251215`
- `doubao-seedance-2-0-260128`
- `doubao-seedance-2-0-fast-260128`

Khuyến nghị:
- Với tạo video từ văn bản, ưu tiên `*-t2v-*` hoặc `pro / fast`
- Với tạo video từ hình ảnh, ưu tiên `*-i2v-*`
- Với các tình huống có tư liệu tham chiếu phức tạp, ưu tiên dùng `content`

Ví dụ yêu cầu:

```json
{
  "size": "1280x720",
  "model": "doubao-seedance-2-0-fast-260128",
  "prompt": "this is an example",
  "duration": 15,
  "fps": "24",
  "seed": "20231024",
  "mode": "reference_material",
  "content": [
    {
      "type": "text",
      "text": "this is an example"
    },
    {
      "type": "image_url",
      "image_url": {
        "url": "https://example.png"
      },
      "role": "reference_image",
      "name": "image1"
    },
    {
      "type": "audio_url",
      "audio_url": {
        "url": "https://example.mp3"
      },
      "role": "reference_audio",
      "name": "audio1"
    }
  ]
}
```

### 4.5 Dòng video Grok

Mô hình công khai:
- `grok-imagine-1.0-video`
- `grok-imagine-video-1.5-preview`
- `grok-video-3`

Tham số thường dùng:
- `prompt`
- `ratio` / `aspect_ratio`
- `resolution` / `size`
- `seconds` / `duration`
- `image` / `image_url` / `input_reference`
- `reference_images`

Ví dụ:

```json
{
  "model": "grok-imagine-1.0-video",
  "prompt": "雨夜霓虹街道上的电影感推镜，光影丰富，运动自然",
  "reference_images": [
    "https://example.com/ref-1.jpg"
  ],
  "seconds": 10,
  "aspect_ratio": "16:9",
  "resolution": "720P"
}
```

### 4.6 Video Kling 4.0

Các mô hình công khai: `kling-4.0` (720p), `kling-4.0-1080p`. Định dạng gốc có thể dùng `POST /text-to-video/kling-4.0`, `POST /image-to-video/kling-4.0`, `POST /omni-video/kling-4.0` và truy vấn qua `GET /tasks?task_ids=任务ID`. Yêu cầu gốc không cần `model`; dùng `settings.resolution` để chọn độ phân giải, mặc định là 1080p. Các kiểu ảnh/video tham chiếu gốc là `refer_image`, `feature_video`; thao tác tạo trả về đối tượng `data`, còn truy vấn trả về mảng `data`. Có thể gửi yêu cầu qua `POST /api/v3/contents/generations/tasks` hoặc `POST /v1/videos`, rồi truy vấn qua `GET /{task_id}` trong đường dẫn tương ứng. OpenAI/Sora dùng trực tiếp `prompt`, `seconds`, `size` và `input_reference`; Seedance dùng trực tiếp `content` cùng `duration/resolution/ratio/mode` ở cấp cao nhất; cả hai đều không cần `contents/settings/options` bổ sung. `kling-4.0` tương ứng với 720p, `kling-4.0-1080p` tương ứng với 1080p; hãy đảm bảo `settings.resolution` khớp với tên mô hình. Trong `settings`, dùng `duration` (4–30 giây), `resolution` (720p/1080p), `aspect_ratio` (21:9, 16:9, 9:16, 1:1). API hiện hỗ trợ tối đa 10 ảnh tham chiếu và 5 video tham chiếu. Kling 4.0 mặc định tạo âm thanh và hình ảnh cùng lúc. Chế độ tham chiếu đa năng hỗ trợ URL âm thanh công khai: /v1/videos dùng audio_urls, Seedance dùng mục audio_url trong content; cần sử dụng tuyến hỗ trợ tư liệu âm thanh. Ba điểm truy cập chuyên dụng gốc hiện không nhận trường âm thanh tham chiếu.

```json
{
  "model": "kling-4.0",
  "prompt": "A cinematic product shot",
  "seconds": "4",
  "size": "1280x720",
  "input_reference": "https://example.com/product.jpg"
}
```

### 4.7 Series video MiniMax / Hailuo

Mô hình công khai:
- `minimax-h3`
- `hailuo-2.3`

Khuyến nghị:
- `minimax-h3` hỗ trợ tạo video từ văn bản, tham chiếu hình ảnh và tham chiếu âm thanh; khuyến nghị trộn văn bản và tài nguyên qua `content`; cũng có thể dùng các trường tương thích như `image_urls`, `audio_urls`.
- `hailuo-2.3` cần ảnh khung hình đầu tiên, khuyến nghị truyền mục `image_url` của `role=first_frame` trong `content`, hoặc dùng `image_urls` để truyền ảnh khung hình đầu tiên.
- `minimax-h3` thường dùng `duration=5~15`, `resolution=1440p`; `hailuo-2.3` thường dùng `duration=6` hoặc `10`, `resolution=768p`.

`minimax-h3` Ví dụ:

```json
{
  "model": "minimax-h3",
  "prompt": "A cinematic product video with smooth camera motion",
  "content": [
    {
      "type": "text",
      "text": "Use the product image as reference and match the rhythm of the audio."
    },
    {
      "type": "image_url",
      "image_url": {
        "url": "https://example.com/product.jpg"
      },
      "role": "reference_image",
      "name": "product"
    },
    {
      "type": "audio_url",
      "audio_url": {
        "url": "https://example.com/music.mp3"
      },
      "role": "reference_audio",
      "name": "music"
    }
  ],
  "duration": 8,
  "resolution": "1440p",
  "aspect_ratio": "16:9",
  "generate_audio": true
}
```

`hailuo-2.3` Ví dụ:

```json
{
  "model": "hailuo-2.3",
  "prompt": "The camera slowly pushes in, natural motion and cinematic lighting.",
  "content": [
    {
      "type": "text",
      "text": "The camera slowly pushes in, natural motion and cinematic lighting."
    },
    {
      "type": "image_url",
      "image_url": {
        "url": "https://example.com/first-frame.jpg"
      },
      "role": "first_frame",
      "name": "first"
    }
  ],
  "duration": 10,
  "resolution": "768p",
  "aspect_ratio": "16:9"
}
```

- `mode=t2v`
- Tham số đầu vào tối thiểu: `model + prompt`

- `mode=i2v`
- Tham số đầu vào tối thiểu: `model + prompt + image_url`

- `mode=i2v_first_last`
- Tham số đầu vào tối thiểu: `model + prompt + image_url + end_image_url`

- `mode=reference_images`
- Tham số đầu vào tối thiểu: `model + prompt + reference_images`

- `mode=reference_material`
- Tham số đầu vào tối thiểu: `model + prompt + (image_urls/video_urls/audio_urls 至少一种)`

### Hướng dẫn gọi Gemini Omni

- `gemini-omni` là tên mô hình video công khai của new-api, có thể trực tiếp gọi qua `POST /v1/videos`.
- `mode=t2v`: tạo video từ văn bản, tham số đầu vào tối thiểu là `model + prompt`.
- `mode=r2v`: tạo bằng ảnh/tư liệu tham chiếu, ảnh có thể đặt trong `image`、`image_url`、`images`、`image_urls`、`reference_images`、`input_reference` hoặc `content`.
- `mode=edit`: chỉnh sửa video, video có thể đặt trong `video`、`video_url`、`videos` hoặc `content`, đồng thời cũng có thể truyền ảnh tham chiếu.
- Trường thời lượng có thể dùng `seconds` hoặc `duration`, hệ thống sẽ tự động khớp với các mức 4 / 6 / 8 / 10 giây.

Kling 4.0 có thể dùng trực tiếp định dạng Seedance với content/duration/resolution/ratio/mode hoặc định dạng video OpenAI với prompt/seconds/size/input_reference; cả hai đều không cần thêm contents/settings/options. mode có thể chọn t2v (chỉ văn bản), i2v (một khung hình đầu), i2v_first_last (khung hình đầu và cuối), reference_images (ảnh tham chiếu thông thường), reference_material (tham chiếu tư liệu đa năng; âm thanh cần dùng tuyến hỗ trợ tính năng này). Nếu bỏ qua mode và không chỉ định công cụ tường minh, mặc định là reference_material khi có tư liệu tham chiếu, hoặc t2v khi không có tư liệu tham chiếu. Chế độ tham chiếu dùng vai trò ảnh tham chiếu thông thường, không âm thầm chuyển các khung hình đầu và cuối được chỉ định rõ thành ảnh tham chiếu; với khung hình đầu và cuối, hãy chọn rõ i2v hoặc i2v_first_last và bỏ qua tham số tỷ lệ khung hình. Kling 4.0 mặc định tạo âm thanh và hình ảnh cùng lúc. Chế độ tham chiếu đa năng hỗ trợ URL âm thanh công khai: /v1/videos dùng audio_urls, Seedance dùng mục audio_url trong content; cần sử dụng tuyến hỗ trợ tư liệu âm thanh. Ba điểm truy cập chuyên dụng gốc hiện không nhận trường âm thanh tham chiếu.

Vidu Q4: `vidu-q4` cố định ở 720p, `vidu-q4-540p` cố định ở 540p, hỗ trợ tạo video dài 3～16 giây. Yêu cầu ít nhất 1 ảnh và hỗ trợ tối đa 15 ảnh tham chiếu; quá trình tạo từ tham chiếu có thể kèm tối đa 3 đoạn âm thanh MP3, mỗi đoạn dài 3～12 giây và tối đa 50MB. Không hỗ trợ chỉ tạo từ văn bản, chỉ định khung hình đầu/cuối hoặc video tham chiếu. Nhiều ảnh được dùng làm tham chiếu chung, không biểu thị vị trí đầu/cuối. Có thể tạo tác vụ qua `POST /v1/videos`, `POST /api/v3/contents/generations/tasks`, hoặc theo định dạng Vidu `POST /ent/v2/img2video`, `POST /ent/v2/reference2video`. Khuyến nghị dùng `mode=reference_images` làm điểm vào hợp nhất; khi có âm thanh, dùng `mode=reference_material`. Có thể dùng `audio_urls` cho âm thanh tham chiếu; ở định dạng Seedance, cũng có thể dùng mục `audio_url` của `content` tiêu chuẩn; trường boolean `audio` biểu thị công tắc tạo âm thanh và được sử dụng riêng với danh sách URL âm thanh tham chiếu. Độ phân giải phải khớp với tên mô hình.

### Magi-2 1080p

`magi-2-1080p` hỗ trợ hai định dạng OpenAI `/v1/videos` và Ark `/api/v3/contents/generations/tasks`, có thể truy vấn lần lượt qua `GET /{task_id}` của đường dẫn tương ứng. Độ phân giải cố định là 1080p, thời lượng tạo từ 4 đến 30 giây. Hỗ trợ các tỷ lệ khung hình 16:9, 9:16, 1:1, 4:3, 3:4 và 21:9; đầu ra tỷ lệ 1:1 có kích thước 1440×1440. Chế độ tham chiếu hỗ trợ tối đa 10 ảnh, 5 video và 5 đoạn âm thanh, tổng cộng 20 tài nguyên. Mỗi video và đoạn âm thanh có thời lượng từ 2 đến 30 giây; tổng thời lượng của tất cả video không quá 30 giây, và tổng thời lượng của tất cả âm thanh cũng không quá 30 giây. Kích thước tối đa của ảnh là 30 MB, video là 200 MB và âm thanh là 15 MB. Chế độ khung hình đầu và cuối không thể kết hợp với các ảnh, video hoặc âm thanh tham chiếu khác. Trong câu lệnh, có thể dùng `<<<image_1>>>`, `<<<video_1>>>` và `<<<audio_1>>>` để tham chiếu tài nguyên theo thứ tự nhập của từng loại. Hiện chưa cung cấp lối truy cập riêng cho định dạng chính thức của sand.ai.

```json
{
  "model": "magi-2-1080p",
  "prompt": "以 <<<image_1>>> 的彩色积木为主体，参考 <<<video_1>>> 的缓慢转动及 <<<audio_1>>> 的轻柔节奏。",
  "seconds": "4",
  "size": "1440x1440",
  "image_urls": [
    "https://example.com/blocks.png"
  ],
  "video_urls": [
    "https://example.com/rotation.mp4"
  ],
  "audio_urls": [
    "https://example.com/rhythm.wav"
  ]
}
```



## OpenAPI

````yaml api-reference/vi/openapi.json POST /v1/videos
openapi: 3.0.0
info:
  title: Tài liệu tham khảo API của NewAPIs
  version: 1.0.0
  description: Public AI Gateway API Reference
servers:
  - url: https://api.newapi.si
security:
  - BearerAuth: []
tags:
  - name: Định dạng OpenAI (Chat)
  - name: Định dạng OpenAI (Responses)
  - name: Định dạng Gemini cho tạo ảnh
  - name: Tạo hình ảnhOpenAI định dạng DALL-E
  - name: Lấy danh sách mô hình
  - name: Tạo video HappyHorse và Wan
  - name: Định dạngKling tạo video
  - name: Định dạng Video Generation Omni và Veo
  - name: Tạo video Seedance
  - name: Định dạng tương thích Sora cho tạo video
  - name: Tạo video Vidu
  - name: Định dạng tác vụ tạo nhạc
paths:
  /v1/videos:
    post:
      tags:
        - Định dạng tương thích Sora cho tạo video
      summary: Tạo video
      description: >-
        Giao diện tạo video định dạng tương thích OpenAI Sora. Hỗ trợ chế độ tạo
        từ văn bản thành video và tạo bằng ảnh/video tham chiếu.


        - `POST /v1/videos`: Tạo tác vụ video

        - `GET /v1/videos/{video_id}`: Truy vấn trạng thái tác vụ

        - `GET /v1/videos/{video_id}/content`: Lấy nội dung nhị phân của video


        Hiện chưa cung cấp ra bên ngoài:

        - `GET /v1/videos`

        - `POST /v1/videos/{video_id}/remix`


        Header xác thực tiêu chuẩn:

        - `Content-Type: application/json`


        1. `POST /v1/videos` tạo tác vụ, lấy `id`

        2. Thăm dò `GET /v1/videos/{id}` cho đến khi `completed` hoặc `failed`

        3. Sau khi hoàn tất, ưu tiên sử dụng `video_url` trong kết quả trả về

        4. Nếu cần tải xuống thống nhất, gọi `GET /v1/videos/{id}/content`


        Tham số cốt lõi:

        - `model: string`: Bắt buộc, tên mô hình công khai

        - `prompt: string`: Khuyến nghị, mô tả tạo video

        - `seconds: number|string`: Tùy chọn, thời lượng mục tiêu

        - `duration: number|string`: Tùy chọn, bí danh thời lượng

        - `size: string`: Tùy chọn, kích thước đầu ra

        - `mode: string`: Tùy chọn, các giá trị phổ biến `t2v` `i2v`
        `i2v_first_last` `reference_material`


        Tham số tương thích thường dùng:

        - `aspect_ratio`

        - `ratio`

        - `quality`

        - `resolution`

        - `fps`

        - `image`

        - `image_url`

        - `image_urls`

        - `images`

        - `reference_images`

        - `input_reference`

        - `end_image_url`

        - `last_image_url`

        - `video_urls`

        - `audio_urls`

        - `function_mode`

        - `content`

        - `callback_url`

        - `external_task_id`


        Kling 4.0 sử dụng trực tiếp các tham số video tiêu chuẩn; xem mục 4.6 để
        biết định dạng yêu cầu cụ thể.


        ### 4.1 Dòng Veo


        Lưu ý: `stable`, `official` v.v. biểu thị các nhóm khác nhau, không phải
        hậu tố `model` dùng đối ngoại; khi gọi, vui lòng giữ `model` là tên mô
        hình cơ sở, nhóm tài khoản hoặc mã thông báo sẽ quyết định thực tế đi
        qua nhóm nào.


        #### Mô hình chính Veo 3.x


        - `veo3`

        - `veo3-fast`

        - `veo3-fast-frames`

        - `veo3-frames`

        - `veo3-pro`

        - `veo3-pro-frames`

        - `veo3.1`

        - `veo3.1-fast`

        - `veo3.1-pro`

        - `veo3.1-components`

        - `veo3.1-4k`

        - `veo3.1-pro-4k`


        Khuyến nghị:

        - Với video tạo từ văn bản thuần túy, ưu tiên dùng mô hình chính `veo3*`
        / `veo3.1*`

        - Với các tình huống tạo video từ ảnh hoặc từ tham chiếu, nên truyền rõ
        ràng `mode + image_url/reference_images`


        ### 4.2 Dòng Sora


        Mô hình cơ sở:

        - `sora-2`

        - `sora-2-pro`


        Khuyến nghị:

        - `sora-2*` phù hợp cho các lệnh gọi thông dụng

        - Nếu cần sử dụng các nhóm như `stable` / `official`, vui lòng giữ
        `model` là tên mô hình cơ sở, không thêm hậu tố vào sau tên mô hình.


        Ví dụ yêu cầu:


        ```json

        {
          "size": "1280x720",
          "images": [
            "https://example.png"
          ],
          "model": "sora-2",
          "prompt": "this is an example",
          "duration": 12,
          "fps": "24",
          "seed": "20231024",
          "mode": "i2v"
        }

        ```


        ### 4.3 Dòng HappyHorse


        Mô hình công khai:

        - `happyhorse-1.0`


        Khuyến nghị:

        - `happyhorse-1.0` được phân biệt thông qua `mode`, `t2v`, `i2v`, `r2v`,
        `video_edit`.

        - Trong định dạng tương thích của Sora, nên dùng mảng `content` để
        truyền các mục phương tiện.

        - Mục văn bản dùng `type=text`, mục phương tiện dùng `type=image_url` và
        có thể kết hợp `role`, `name` để đánh dấu mục đích sử dụng của tài
        nguyên.


        Ví dụ yêu cầu:


        ```json

        {
          "size": "720x1280",
          "model": "happyhorse-1.0",
          "mode": "r2v",
          "prompt": "this is an example",
          "duration": 15,
          "content": [
            {
              "type": "text",
              "text": "this is an example"
            },
            {
              "type": "image_url",
              "image_url": {
                "url": "https://example.png"
              },
              "role": "reference_image",
              "name": "image1"
            }
          ],
          "parameters": {
            "resolution": "720P",
            "ratio": "9:16",
            "duration": 15,
            "seed": 1
          }
        }

        ```


        ### 4.4 Dòng Seedance


        Mô hình công khai:

        - `doubao-seedance-1-0-lite-t2v-250428`

        - `doubao-seedance-1-0-lite-i2v-250428`

        - `doubao-seedance-1-0-pro-250528`

        - `doubao-seedance-1-0-pro-fast-251015`

        - `doubao-seedance-1-5-pro-251215`

        - `doubao-seedance-2-0-260128`

        - `doubao-seedance-2-0-fast-260128`


        Khuyến nghị:

        - Với tạo video từ văn bản, ưu tiên `*-t2v-*` hoặc `pro / fast`

        - Với tạo video từ hình ảnh, ưu tiên `*-i2v-*`

        - Với các tình huống có tư liệu tham chiếu phức tạp, ưu tiên dùng
        `content`


        Ví dụ yêu cầu:


        ```json

        {
          "size": "1280x720",
          "model": "doubao-seedance-2-0-fast-260128",
          "prompt": "this is an example",
          "duration": 15,
          "fps": "24",
          "seed": "20231024",
          "mode": "reference_material",
          "content": [
            {
              "type": "text",
              "text": "this is an example"
            },
            {
              "type": "image_url",
              "image_url": {
                "url": "https://example.png"
              },
              "role": "reference_image",
              "name": "image1"
            },
            {
              "type": "audio_url",
              "audio_url": {
                "url": "https://example.mp3"
              },
              "role": "reference_audio",
              "name": "audio1"
            }
          ]
        }

        ```


        ### 4.5 Dòng video Grok


        Mô hình công khai:

        - `grok-imagine-1.0-video`

        - `grok-imagine-video-1.5-preview`

        - `grok-video-3`


        Tham số thường dùng:

        - `prompt`

        - `ratio` / `aspect_ratio`

        - `resolution` / `size`

        - `seconds` / `duration`

        - `image` / `image_url` / `input_reference`

        - `reference_images`


        Ví dụ:


        ```json

        {
          "model": "grok-imagine-1.0-video",
          "prompt": "雨夜霓虹街道上的电影感推镜，光影丰富，运动自然",
          "reference_images": [
            "https://example.com/ref-1.jpg"
          ],
          "seconds": 10,
          "aspect_ratio": "16:9",
          "resolution": "720P"
        }

        ```


        ### 4.6 Video Kling 4.0


        Các mô hình công khai: `kling-4.0` (720p), `kling-4.0-1080p`. Định dạng
        gốc có thể dùng `POST /text-to-video/kling-4.0`, `POST
        /image-to-video/kling-4.0`, `POST /omni-video/kling-4.0` và truy vấn qua
        `GET /tasks?task_ids=任务ID`. Yêu cầu gốc không cần `model`; dùng
        `settings.resolution` để chọn độ phân giải, mặc định là 1080p. Các kiểu
        ảnh/video tham chiếu gốc là `refer_image`, `feature_video`; thao tác tạo
        trả về đối tượng `data`, còn truy vấn trả về mảng `data`. Có thể gửi yêu
        cầu qua `POST /api/v3/contents/generations/tasks` hoặc `POST
        /v1/videos`, rồi truy vấn qua `GET /{task_id}` trong đường dẫn tương
        ứng. OpenAI/Sora dùng trực tiếp `prompt`, `seconds`, `size` và
        `input_reference`; Seedance dùng trực tiếp `content` cùng
        `duration/resolution/ratio/mode` ở cấp cao nhất; cả hai đều không cần
        `contents/settings/options` bổ sung. `kling-4.0` tương ứng với 720p,
        `kling-4.0-1080p` tương ứng với 1080p; hãy đảm bảo `settings.resolution`
        khớp với tên mô hình. Trong `settings`, dùng `duration` (4–30 giây),
        `resolution` (720p/1080p), `aspect_ratio` (21:9, 16:9, 9:16, 1:1). API
        hiện hỗ trợ tối đa 10 ảnh tham chiếu và 5 video tham chiếu. Kling 4.0
        mặc định tạo âm thanh và hình ảnh cùng lúc. Chế độ tham chiếu đa năng hỗ
        trợ URL âm thanh công khai: /v1/videos dùng audio_urls, Seedance dùng
        mục audio_url trong content; cần sử dụng tuyến hỗ trợ tư liệu âm thanh.
        Ba điểm truy cập chuyên dụng gốc hiện không nhận trường âm thanh tham
        chiếu.


        ```json

        {
          "model": "kling-4.0",
          "prompt": "A cinematic product shot",
          "seconds": "4",
          "size": "1280x720",
          "input_reference": "https://example.com/product.jpg"
        }

        ```


        ### 4.7 Series video MiniMax / Hailuo


        Mô hình công khai:

        - `minimax-h3`

        - `hailuo-2.3`


        Khuyến nghị:

        - `minimax-h3` hỗ trợ tạo video từ văn bản, tham chiếu hình ảnh và tham
        chiếu âm thanh; khuyến nghị trộn văn bản và tài nguyên qua `content`;
        cũng có thể dùng các trường tương thích như `image_urls`, `audio_urls`.

        - `hailuo-2.3` cần ảnh khung hình đầu tiên, khuyến nghị truyền mục
        `image_url` của `role=first_frame` trong `content`, hoặc dùng
        `image_urls` để truyền ảnh khung hình đầu tiên.

        - `minimax-h3` thường dùng `duration=5~15`, `resolution=1440p`;
        `hailuo-2.3` thường dùng `duration=6` hoặc `10`, `resolution=768p`.


        `minimax-h3` Ví dụ:


        ```json

        {
          "model": "minimax-h3",
          "prompt": "A cinematic product video with smooth camera motion",
          "content": [
            {
              "type": "text",
              "text": "Use the product image as reference and match the rhythm of the audio."
            },
            {
              "type": "image_url",
              "image_url": {
                "url": "https://example.com/product.jpg"
              },
              "role": "reference_image",
              "name": "product"
            },
            {
              "type": "audio_url",
              "audio_url": {
                "url": "https://example.com/music.mp3"
              },
              "role": "reference_audio",
              "name": "music"
            }
          ],
          "duration": 8,
          "resolution": "1440p",
          "aspect_ratio": "16:9",
          "generate_audio": true
        }

        ```


        `hailuo-2.3` Ví dụ:


        ```json

        {
          "model": "hailuo-2.3",
          "prompt": "The camera slowly pushes in, natural motion and cinematic lighting.",
          "content": [
            {
              "type": "text",
              "text": "The camera slowly pushes in, natural motion and cinematic lighting."
            },
            {
              "type": "image_url",
              "image_url": {
                "url": "https://example.com/first-frame.jpg"
              },
              "role": "first_frame",
              "name": "first"
            }
          ],
          "duration": 10,
          "resolution": "768p",
          "aspect_ratio": "16:9"
        }

        ```


        - `mode=t2v`

        - Tham số đầu vào tối thiểu: `model + prompt`


        - `mode=i2v`

        - Tham số đầu vào tối thiểu: `model + prompt + image_url`


        - `mode=i2v_first_last`

        - Tham số đầu vào tối thiểu: `model + prompt + image_url +
        end_image_url`


        - `mode=reference_images`

        - Tham số đầu vào tối thiểu: `model + prompt + reference_images`


        - `mode=reference_material`

        - Tham số đầu vào tối thiểu: `model + prompt +
        (image_urls/video_urls/audio_urls 至少一种)`


        ### Hướng dẫn gọi Gemini Omni


        - `gemini-omni` là tên mô hình video công khai của new-api, có thể trực
        tiếp gọi qua `POST /v1/videos`.

        - `mode=t2v`: tạo video từ văn bản, tham số đầu vào tối thiểu là `model
        + prompt`.

        - `mode=r2v`: tạo bằng ảnh/tư liệu tham chiếu, ảnh có thể đặt trong
        `image`、`image_url`、`images`、`image_urls`、`reference_images`、`input_reference`
        hoặc `content`.

        - `mode=edit`: chỉnh sửa video, video có thể đặt trong
        `video`、`video_url`、`videos` hoặc `content`, đồng thời cũng có thể
        truyền ảnh tham chiếu.

        - Trường thời lượng có thể dùng `seconds` hoặc `duration`, hệ thống sẽ
        tự động khớp với các mức 4 / 6 / 8 / 10 giây.


        Kling 4.0 có thể dùng trực tiếp định dạng Seedance với
        content/duration/resolution/ratio/mode hoặc định dạng video OpenAI với
        prompt/seconds/size/input_reference; cả hai đều không cần thêm
        contents/settings/options. mode có thể chọn t2v (chỉ văn bản), i2v (một
        khung hình đầu), i2v_first_last (khung hình đầu và cuối),
        reference_images (ảnh tham chiếu thông thường), reference_material (tham
        chiếu tư liệu đa năng; âm thanh cần dùng tuyến hỗ trợ tính năng này).
        Nếu bỏ qua mode và không chỉ định công cụ tường minh, mặc định là
        reference_material khi có tư liệu tham chiếu, hoặc t2v khi không có tư
        liệu tham chiếu. Chế độ tham chiếu dùng vai trò ảnh tham chiếu thông
        thường, không âm thầm chuyển các khung hình đầu và cuối được chỉ định rõ
        thành ảnh tham chiếu; với khung hình đầu và cuối, hãy chọn rõ i2v hoặc
        i2v_first_last và bỏ qua tham số tỷ lệ khung hình. Kling 4.0 mặc định
        tạo âm thanh và hình ảnh cùng lúc. Chế độ tham chiếu đa năng hỗ trợ URL
        âm thanh công khai: /v1/videos dùng audio_urls, Seedance dùng mục
        audio_url trong content; cần sử dụng tuyến hỗ trợ tư liệu âm thanh. Ba
        điểm truy cập chuyên dụng gốc hiện không nhận trường âm thanh tham
        chiếu.


        Vidu Q4: `vidu-q4` cố định ở 720p, `vidu-q4-540p` cố định ở 540p, hỗ trợ
        tạo video dài 3～16 giây. Yêu cầu ít nhất 1 ảnh và hỗ trợ tối đa 15 ảnh
        tham chiếu; quá trình tạo từ tham chiếu có thể kèm tối đa 3 đoạn âm
        thanh MP3, mỗi đoạn dài 3～12 giây và tối đa 50MB. Không hỗ trợ chỉ tạo
        từ văn bản, chỉ định khung hình đầu/cuối hoặc video tham chiếu. Nhiều
        ảnh được dùng làm tham chiếu chung, không biểu thị vị trí đầu/cuối. Có
        thể tạo tác vụ qua `POST /v1/videos`, `POST
        /api/v3/contents/generations/tasks`, hoặc theo định dạng Vidu `POST
        /ent/v2/img2video`, `POST /ent/v2/reference2video`. Khuyến nghị dùng
        `mode=reference_images` làm điểm vào hợp nhất; khi có âm thanh, dùng
        `mode=reference_material`. Có thể dùng `audio_urls` cho âm thanh tham
        chiếu; ở định dạng Seedance, cũng có thể dùng mục `audio_url` của
        `content` tiêu chuẩn; trường boolean `audio` biểu thị công tắc tạo âm
        thanh và được sử dụng riêng với danh sách URL âm thanh tham chiếu. Độ
        phân giải phải khớp với tên mô hình.


        ### Magi-2 1080p


        `magi-2-1080p` hỗ trợ hai định dạng OpenAI `/v1/videos` và Ark
        `/api/v3/contents/generations/tasks`, có thể truy vấn lần lượt qua `GET
        /{task_id}` của đường dẫn tương ứng. Độ phân giải cố định là 1080p, thời
        lượng tạo từ 4 đến 30 giây. Hỗ trợ các tỷ lệ khung hình 16:9, 9:16, 1:1,
        4:3, 3:4 và 21:9; đầu ra tỷ lệ 1:1 có kích thước 1440×1440. Chế độ tham
        chiếu hỗ trợ tối đa 10 ảnh, 5 video và 5 đoạn âm thanh, tổng cộng 20 tài
        nguyên. Mỗi video và đoạn âm thanh có thời lượng từ 2 đến 30 giây; tổng
        thời lượng của tất cả video không quá 30 giây, và tổng thời lượng của
        tất cả âm thanh cũng không quá 30 giây. Kích thước tối đa của ảnh là 30
        MB, video là 200 MB và âm thanh là 15 MB. Chế độ khung hình đầu và cuối
        không thể kết hợp với các ảnh, video hoặc âm thanh tham chiếu khác.
        Trong câu lệnh, có thể dùng `<<<image_1>>>`, `<<<video_1>>>` và
        `<<<audio_1>>>` để tham chiếu tài nguyên theo thứ tự nhập của từng loại.
        Hiện chưa cung cấp lối truy cập riêng cho định dạng chính thức của
        sand.ai.


        ```json

        {
          "model": "magi-2-1080p",
          "prompt": "以 <<<image_1>>> 的彩色积木为主体，参考 <<<video_1>>> 的缓慢转动及 <<<audio_1>>> 的轻柔节奏。",
          "seconds": "4",
          "size": "1440x1440",
          "image_urls": [
            "https://example.com/blocks.png"
          ],
          "video_urls": [
            "https://example.com/rotation.mp4"
          ],
          "audio_urls": [
            "https://example.com/rhythm.wav"
          ]
        }

        ```
      operationId: createVideo
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                model:
                  type: string
                  description: >-
                    Bắt buộc, tên mô hình công khai. `gemini-omni` Có thể được
                    gọi thông qua `/v1/videos`.
                  enum:
                    - sora-2
                    - sora-2-pro
                    - gemini-omni
                    - happyhorse-1.1
                    - happyhorse-1.1-1080p
                    - wan-3.0-prime
                    - wan-3.0-prime-1080p
                    - sd-2-5-4k
                    - sd-2-5-flash
                    - sd-2-5-flash-480p
                    - happyhorse-1.0
                    - happyhorse-1.0-i2v
                    - happyhorse-1.0-t2v
                    - happyhorse-1.0-r2v
                    - happyhorse-1.0-video-edit
                    - doubao-seedance-1-0-lite-i2v-250428
                    - doubao-seedance-1-0-lite-t2v-250428
                    - doubao-seedance-1-0-pro-250528
                    - doubao-seedance-1-0-pro-fast-251015
                    - doubao-seedance-1-5-pro-251215
                    - doubao-seedance-2-0-260128
                    - doubao-seedance-2-0-fast-260128
                    - sd-2-5
                    - veo3
                    - veo3-fast
                    - veo3-fast-frames
                    - veo3-frames
                    - veo3-pro
                    - veo3-pro-frames
                    - veo3.1
                    - veo3.1-4k
                    - veo3.1-components
                    - veo3.1-fast
                    - veo3.1-pro
                    - veo3.1-pro-4k
                    - kling-4.0
                    - kling-4.0-1080p
                    - grok-imagine-1.0-video
                    - grok-imagine-video-1.5-preview
                    - grok-video-3
                    - minimax-h3
                    - hailuo-2.3
                    - viduq3-turbo
                    - viduq2
                    - vidu2.0
                    - vidu-q4
                    - vidu-q4-540p
                    - magi-2-1080p
                  example: sora-2
                prompt:
                  type: string
                  description: >-
                    Mô tả video. Các yêu cầu OpenAI/Sora tiêu chuẩn cho Kling
                    4.0 sử dụng trực tiếp prompt; khi sử dụng định dạng Seedance
                    tiêu chuẩn, có thể cung cấp văn bản trong mục text của
                    content mà không cần contents/settings/options. Các mô hình
                    khác cung cấp văn bản theo yêu cầu định dạng tương ứng.
                image:
                  type: string
                  format: binary
                  description: >-
                    Cổng vào cho một ảnh đơn, một số chế độ tương thích sẽ được
                    ánh xạ tới `images`.
                duration:
                  type: integer
                  description: >-
                    Đầu vào thời lượng được thống nhất; một số mô hình cũng chấp
                    nhận seconds.
                width:
                  type: integer
                  example: 512
                  description: Video width
                height:
                  type: integer
                  example: 512
                  description: Video height
                fps:
                  type: integer
                  example: 30
                  description: Video frame rate
                seed:
                  type: integer
                  example: 20231234
                  description: Random seed
                'n':
                  type: integer
                  example: 1
                  description: Number of videos to generate
                response_format:
                  type: string
                  example: url
                  description: Response format
                user:
                  type: string
                  example: user-1234
                  description: User identifier
                metadata:
                  type: object
                  additionalProperties: true
                  description: >-
                    Container trường mở rộng động. Một số lượng lớn các trường
                    đặc thù của mô hình được giải tuần tự hóa từ đây.
                tool:
                  type: string
                mode:
                  type: string
                  description: >-
                    Tùy chọn, chế độ tạo video. `gemini-omni` Hỗ trợ `t2v`,
                    `r2v`, `edit`.


                    Kling 4.0 có thể dùng trực tiếp định dạng Seedance với
                    content/duration/resolution/ratio/mode hoặc định dạng video
                    OpenAI với prompt/seconds/size/input_reference; cả hai đều
                    không cần thêm contents/settings/options. mode có thể chọn
                    t2v (chỉ văn bản), i2v (một khung hình đầu), i2v_first_last
                    (khung hình đầu và cuối), reference_images (ảnh tham chiếu
                    thông thường), reference_material (tham chiếu tư liệu đa
                    năng; âm thanh cần dùng tuyến hỗ trợ tính năng này). Nếu bỏ
                    qua mode và không chỉ định công cụ tường minh, mặc định là
                    reference_material khi có tư liệu tham chiếu, hoặc t2v khi
                    không có tư liệu tham chiếu. Chế độ tham chiếu dùng vai trò
                    ảnh tham chiếu thông thường, không âm thầm chuyển các khung
                    hình đầu và cuối được chỉ định rõ thành ảnh tham chiếu; với
                    khung hình đầu và cuối, hãy chọn rõ i2v hoặc i2v_first_last
                    và bỏ qua tham số tỷ lệ khung hình. Kling 4.0 mặc định tạo
                    âm thanh và hình ảnh cùng lúc. Chế độ tham chiếu đa năng hỗ
                    trợ URL âm thanh công khai: /v1/videos dùng audio_urls,
                    Seedance dùng mục audio_url trong content; cần sử dụng tuyến
                    hỗ trợ tư liệu âm thanh. Ba điểm truy cập chuyên dụng gốc
                    hiện không nhận trường âm thanh tham chiếu.
                  example: reference_material
                  x-kling-modes:
                    - t2v
                    - i2v
                    - i2v_first_last
                    - reference_images
                    - reference_material
                images:
                  type: array
                  description: >-
                    Điểm vào thống nhất cho nhiều ảnh. Vidu, Seedance, Veo sẽ sử
                    dụng, v.v.
                  items:
                    type: string
                content:
                  type: array
                  items:
                    type: object
                    additionalProperties: true
                  description: >-
                    Định dạng Seedance cũng có thể gọi Kling 4.0; văn bản sử
                    dụng text, còn hình ảnh/video/âm thanh sử dụng các đối tượng
                    image_url/video_url/audio_url. role của hình ảnh là
                    first_frame, last_frame hoặc reference_image; của video là
                    reference_video; của âm thanh là reference_audio. Âm thanh
                    tham chiếu phải sử dụng tuyến tham chiếu đa năng hỗ trợ khả
                    năng này; không thể suy ra rằng mọi tuyến đều có thể nhận
                    đầu vào âm thanh chỉ dựa trên bản âm thanh đầu ra. Dùng mode
                    để phân biệt các ngữ cảnh tạo sinh.
                contents:
                  type: array
                  minItems: 1
                  description: >-
                    Trường tương thích phong bì cũ của Kling 4.0; không cần cung
                    cấp cho các yêu cầu OpenAI/Sora và Seedance tiêu chuẩn.
                  items:
                    type: object
                    required:
                      - type
                    properties:
                      type:
                        type: string
                        enum:
                          - prompt
                          - reference_image
                          - reference_video
                          - first_frame
                          - last_frame
                      text:
                        type: string
                        description: Mô tả văn bản khi type=prompt.
                      url:
                        type: string
                        format: uri
                        description: >-
                          URL có thể truy cập của tài liệu tham khảo hoặc khung
                          hình đầu/cuối.
                settings:
                  type: object
                  description: >-
                    Cài đặt tương thích với phong bì cũ; định dạng tiêu chuẩn sử
                    dụng trực tiếp seconds/size hoặc duration/resolution/ratio.
                  properties:
                    duration:
                      type: integer
                      minimum: 4
                      maximum: 30
                      example: 4
                    resolution:
                      type: string
                      enum:
                        - 720p
                        - 1080p
                    aspect_ratio:
                      type: string
                      enum:
                        - '21:9'
                        - '16:9'
                        - '9:16'
                        - '1:1'
                options:
                  type: object
                  maxProperties: 0
                  description: >-
                    Trường tương thích cho phong bì cũ; không cần cung cấp ở
                    định dạng tiêu chuẩn.
                size:
                  type: string
                  description: >-
                    Điểm vào kích thước hợp nhất, sẽ được ánh xạ thành
                    resolution/aspect_ratio, v.v.
                seconds:
                  type: string
                  description: >-
                    Sora điểm vào tương thích, trong thời gian chạy sẽ quay về
                    duration.
                input_reference:
                  type: string
                  description: >-
                    Sora/Veo điểm vào ảnh tham chiếu tương thích, có thể là tệp
                    multipart hoặc đối tượng tương thích.
                parameters:
                  type: object
                  additionalProperties: true
                audio_urls:
                  type: array
                  items:
                    type: string
                    format: uri
                  description: >-
                    Danh sách URL âm thanh tham chiếu cho OpenAI/Sora và
                    Seedance tiêu chuẩn; chỉ dùng cho các tuyến tham chiếu đa
                    năng hỗ trợ tham chiếu âm thanh, khác với công tắc tạo bản
                    âm thanh đầu ra.
                resolution:
                  type: string
                  description: >-
                    Độ phân giải đầu ra, các giá trị thường gặp là `540p`,
                    `720p`, `1080p`.
              required:
                - model
            examples:
              openai_i2v_json:
                summary: OpenAI Sora i2v (application/json)
                value:
                  size: 1280x720
                  images:
                    - https://example.png
                  model: sora-2
                  prompt: this is an example
                  duration: 12
                  fps: '24'
                  seed: '20231024'
                  mode: i2v
              openai_i2v_input_reference:
                summary: OpenAI i2v (input_reference)
                value:
                  model: sora-2
                  prompt: A cinematic drone shot over snowy mountains at sunrise
                  input_reference:
                    image_url: https://example.com/input.jpg
                  seconds: '8'
                  size: 1280x720
                  response_format: url
              openai_alias_compat:
                summary: Alias兼容 (image_url/duration/aspect_ratio)
                value:
                  model: sora-2
                  prompt: A cinematic drone shot over snowy mountains at sunrise
                  image_url: https://example.com/input.jpg
                  duration: '8'
                  aspect_ratio: '16:9'
                  response_format: url
              gemini_omni_sora_t2v:
                summary: Gemini Omni Sora t2v
                value:
                  model: gemini-omni
                  mode: t2v
                  prompt: A cinematic product video with smooth camera motion
                  duration: 8
                  size: 1280x720
              gemini_omni_sora_r2v:
                summary: Gemini Omni Sora r2v
                value:
                  model: gemini-omni
                  mode: r2v
                  content:
                    - type: text
                      text: Keep the product consistent and create a short ad video
                    - type: image_url
                      image_url:
                        url: https://example.com/product.jpg
                  duration: 8
                  size: 1280x720
              gemini_omni_sora_edit:
                summary: Gemini Omni Sora edit
                value:
                  model: gemini-omni
                  mode: edit
                  content:
                    - type: text
                      text: Change the outfit color while keeping the motion natural
                    - type: video_url
                      video_url:
                        url: https://example.com/input.mp4
                    - type: image_url
                      image_url:
                        url: https://example.com/style.jpg
                  duration: 8
                  size: 1280x720
              canvas_video_tier:
                summary: Video có độ phân giải cố định
                value:
                  model: happyhorse-1.1-1080p
                  prompt: A white horse walking through a meadow.
                  seconds: '5'
                  size: 1920x1080
              happyhorse_sora_t2v:
                summary: HappyHorse Sora t2v
                value:
                  model: happyhorse-1.0
                  mode: t2v
                  content:
                    - type: text
                      text: >-
                        A cinematic white horse running through a neon city
                        street
                  duration: 5
                  resolution: 720P
                  ratio: '16:9'
              happyhorse_sora_i2v:
                summary: HappyHorse Sora i2v
                value:
                  model: happyhorse-1.0
                  mode: i2v
                  content:
                    - type: text
                      text: The camera slowly pushes in, natural motion
                    - type: image_url
                      image_url: https://example.com/first-frame.jpg
                  duration: 5
                  resolution: 720P
              happyhorse_sora_r2v:
                summary: HappyHorse Sora r2v
                value:
                  size: 720x1280
                  model: happyhorse-1.0
                  mode: r2v
                  prompt: this is an example
                  duration: 15
                  content:
                    - type: text
                      text: this is an example
                    - type: image_url
                      image_url:
                        url: https://example.png
                      role: reference_image
                      name: image1
                  parameters:
                    resolution: 720P
                    ratio: '9:16'
                    duration: 15
                    seed: 1
              happyhorse_sora_video_edit:
                summary: HappyHorse Sora video_edit
                value:
                  model: happyhorse-1.0
                  mode: video_edit
                  content:
                    - type: text
                      text: >-
                        Change the jacket to a striped sweater and keep the
                        motion natural
                    - type: video_url
                      video_url: https://example.com/input.mp4
                    - type: image_url
                      image_url: https://example.com/reference.jpg
                  resolution: 720P
              seedance_i2v_first:
                summary: Seedance i2v_first
                value:
                  model: doubao-seedance-1-0-lite-i2v-250428
                  mode: i2v_first
                  prompt: A panda skateboarding in a city street, cinematic
                  image_urls:
                    - https://example.com/first.jpg
                  seconds: '5'
                  size: 1280x720
              seedance_i2v_first_last:
                summary: Seedance i2v_first_last
                value:
                  model: doubao-seedance-1-0-lite-i2v-250428
                  mode: i2v_first_last
                  prompt: A camera moves from first frame to last frame naturally
                  image_urls:
                    - https://example.com/first.jpg
                  end_image_url: https://example.com/last.jpg
                  seconds: '5'
                  size: 1280x720
              seedance_reference_images:
                summary: Seedance reference_images
                value:
                  model: doubao-seedance-1-0-lite-i2v-250428
                  mode: reference_images
                  prompt: Stylized short video keeping character consistency
                  reference_images:
                    - https://example.com/ref-1.jpg
                    - https://example.com/ref-2.jpg
                  seconds: '5'
                  size: 1280x720
              seedance_reference_material:
                summary: Seedance Chế độ tham chiếu toàn năng(reference_material)
                value:
                  model: doubao-seedance-1-0-lite-i2v-250428
                  mode: reference_material
                  prompt: >-
                    Blend image and short reference video into a coherent
                    cinematic clip
                  reference_images:
                    - https://example.com/ref-1.jpg
                    - https://example.com/ref-2.jpg
                  video_urls:
                    - https://example.com/ref-video.mp4
                  audio_urls:
                    - https://example.com/ref-audio.mp3
                  seconds: '5'
                  size: 1280x720
              seedance_volc_content:
                summary: Seedance chế độ content của Volcengine Ark
                value:
                  size: 1280x720
                  model: doubao-seedance-2-0-fast-260128
                  prompt: this is an example
                  duration: 15
                  fps: '24'
                  seed: '20231024'
                  mode: reference_material
                  content:
                    - type: text
                      text: this is an example
                    - type: image_url
                      image_url:
                        url: https://example.png
                      role: reference_image
                      name: image1
                    - type: audio_url
                      audio_url:
                        url: https://example.mp3
                      role: reference_audio
                      name: audio1
              veo_first_last_frame:
                summary: Veo chế độ khung đầu-cuối
                value:
                  model: veo3.1-fast
                  prompt: >-
                    A smooth transition from first frame to last frame,
                    cinematic motion
                  image_urls:
                    - https://example.com/first-frame.jpg
                  end_image_url: https://example.com/last-frame.jpg
                  seconds: '8'
                  size: 1280x720
              veo_reference_images_1to3:
                summary: Veo Chế độ 1~3 ảnh tham chiếu
                value:
                  model: veo3.1-fast
                  prompt: >-
                    Use reference style and character consistency for a short ad
                    clip
                  reference_images:
                    - https://example.com/ref-1.jpg
                  seconds: '8'
                  size: 1280x720
              kling_4_sora:
                summary: Định dạng video Kling 4.0 720p OpenAI
                value:
                  model: kling-4.0
                  prompt: A cinematic product shot with natural motion
                  seconds: '4'
                  size: 1280x720
                  input_reference: https://example.com/product.jpg
              kling_4_sora_1080p:
                summary: Định dạng video OpenAI Kling 4.0 1080p
                value:
                  model: kling-4.0-1080p
                  prompt: A cinematic product shot with natural motion
                  seconds: '4'
                  size: 1920x1080
                  input_reference: https://example.com/product.jpg
              kling_4_seedance_reference_material:
                summary: Kling 4.0 720p Seedance · Tham chiếu tư liệu mặc định
                value:
                  model: kling-4.0
                  mode: reference_material
                  duration: 4
                  resolution: 720p
                  content:
                    - type: text
                      text: A cinematic product shot with natural motion
                    - type: image_url
                      image_url:
                        url: https://example.com/product.jpg
                      role: reference_image
                  ratio: '16:9'
              kling_4_seedance_t2v:
                summary: Kling 4.0 720p Seedance · Văn bản thuần túy
                value:
                  model: kling-4.0
                  mode: t2v
                  duration: 4
                  resolution: 720p
                  content:
                    - type: text
                      text: A cinematic product shot with natural motion
                  ratio: '16:9'
              kling_4_seedance_i2v:
                summary: Kling 4.0 720p Seedance · Tạo từ hình ảnh khung hình đầu tiên
                value:
                  model: kling-4.0
                  mode: i2v
                  duration: 4
                  resolution: 720p
                  content:
                    - type: text
                      text: A cinematic product shot with natural motion
                    - type: image_url
                      image_url:
                        url: https://example.com/first-frame.jpg
                      role: first_frame
              kling_4_seedance_i2v_first_last:
                summary: Kling 4.0 720p Seedance · Khung hình đầu và cuối
                value:
                  model: kling-4.0
                  mode: i2v_first_last
                  duration: 4
                  resolution: 720p
                  content:
                    - type: text
                      text: A cinematic product shot with natural motion
                    - type: image_url
                      image_url:
                        url: https://example.com/first-frame.jpg
                      role: first_frame
                    - type: image_url
                      image_url:
                        url: https://example.com/last-frame.jpg
                      role: last_frame
              kling_4_seedance_reference_images:
                summary: Kling 4.0 720p Seedance · Ảnh tham chiếu
                value:
                  model: kling-4.0
                  mode: reference_images
                  duration: 4
                  resolution: 720p
                  content:
                    - type: text
                      text: A cinematic product shot with natural motion
                    - type: image_url
                      image_url:
                        url: https://example.com/product.jpg
                      role: reference_image
                  ratio: '16:9'
              kling_4_seedance_reference_material_1080p:
                summary: Kling 4.0 1080p Seedance · Tham chiếu tư liệu mặc định
                value:
                  model: kling-4.0-1080p
                  mode: reference_material
                  duration: 4
                  resolution: 1080p
                  content:
                    - type: text
                      text: A cinematic product shot with natural motion
                    - type: image_url
                      image_url:
                        url: https://example.com/product.jpg
                      role: reference_image
                  ratio: '16:9'
              kling_4_seedance_t2v_1080p:
                summary: Kling 4.0 1080p Seedance · Văn bản thuần túy
                value:
                  model: kling-4.0-1080p
                  mode: t2v
                  duration: 4
                  resolution: 1080p
                  content:
                    - type: text
                      text: A cinematic product shot with natural motion
                  ratio: '16:9'
              kling_4_seedance_i2v_1080p:
                summary: Kling 4.0 1080p Seedance · Tạo từ ảnh khung hình đầu tiên
                value:
                  model: kling-4.0-1080p
                  mode: i2v
                  duration: 4
                  resolution: 1080p
                  content:
                    - type: text
                      text: A cinematic product shot with natural motion
                    - type: image_url
                      image_url:
                        url: https://example.com/first-frame.jpg
                      role: first_frame
              kling_4_seedance_i2v_first_last_1080p:
                summary: Kling 4.0 1080p Seedance · Khung hình đầu và cuối
                value:
                  model: kling-4.0-1080p
                  mode: i2v_first_last
                  duration: 4
                  resolution: 1080p
                  content:
                    - type: text
                      text: A cinematic product shot with natural motion
                    - type: image_url
                      image_url:
                        url: https://example.com/first-frame.jpg
                      role: first_frame
                    - type: image_url
                      image_url:
                        url: https://example.com/last-frame.jpg
                      role: last_frame
              kling_4_seedance_reference_images_1080p:
                summary: Kling 4.0 1080p Seedance · Ảnh tham chiếu
                value:
                  model: kling-4.0-1080p
                  mode: reference_images
                  duration: 4
                  resolution: 1080p
                  content:
                    - type: text
                      text: A cinematic product shot with natural motion
                    - type: image_url
                      image_url:
                        url: https://example.com/product.jpg
                      role: reference_image
                  ratio: '16:9'
              kling_4_text:
                summary: >-
                  Kling 4.0 720p tạo video từ văn bản (tương thích với phong bì
                  cũ)
                value:
                  model: kling-4.0
                  mode: t2v
                  contents:
                    - type: prompt
                      text: A cinematic product shot with natural motion
                  settings:
                    duration: 4
                    resolution: 720p
                    aspect_ratio: '16:9'
                  options: {}
              kling_4_reference:
                summary: Kling 4.0 Tạo tham chiếu 720p (tương thích với phong bì cũ)
                value:
                  model: kling-4.0
                  mode: reference_material
                  contents:
                    - type: prompt
                      text: A cinematic product shot with natural motion
                    - type: reference_image
                      url: https://example.com/product.jpg
                    - type: reference_video
                      url: https://example.com/motion.mp4
                  settings:
                    duration: 4
                    resolution: 720p
                    aspect_ratio: '16:9'
                  options: {}
              kling_4_reference_audio:
                summary: Kling 4.0 720p URL âm thanh tham chiếu đa năng
                value:
                  model: kling-4.0
                  prompt: A cinematic product shot with natural motion
                  seconds: '4'
                  size: 1280x720
                  input_reference: https://example.com/product.jpg
                  mode: reference_material
                  audio_urls:
                    - https://example.com/reference.mp3
              kling_4_text_1080p:
                summary: >-
                  Kling 4.0 1080p tạo video từ văn bản (tương thích với phong bì
                  cũ)
                value:
                  model: kling-4.0-1080p
                  mode: t2v
                  contents:
                    - type: prompt
                      text: A cinematic product shot with natural motion
                  settings:
                    duration: 4
                    resolution: 1080p
                    aspect_ratio: '16:9'
                  options: {}
              kling_4_reference_1080p:
                summary: Kling 4.0 tạo tham chiếu 1080p (tương thích với phong bì cũ)
                value:
                  model: kling-4.0-1080p
                  mode: reference_material
                  contents:
                    - type: prompt
                      text: A cinematic product shot with natural motion
                    - type: reference_image
                      url: https://example.com/product.jpg
                    - type: reference_video
                      url: https://example.com/motion.mp4
                  settings:
                    duration: 4
                    resolution: 1080p
                    aspect_ratio: '16:9'
                  options: {}
              kling_4_reference_audio_1080p:
                summary: URL âm thanh tham chiếu toàn năng Kling 4.0 1080p
                value:
                  model: kling-4.0-1080p
                  prompt: A cinematic product shot with natural motion
                  seconds: '4'
                  size: 1920x1080
                  input_reference: https://example.com/product.jpg
                  mode: reference_material
                  audio_urls:
                    - https://example.com/reference.mp3
              grok_reference_video:
                summary: Grok Chế độ video
                value:
                  model: grok-imagine-1.0-video
                  prompt: A dramatic cinematic shot with fast motion and rich lighting
                  reference_images:
                    - https://example.com/ref-1.jpg
                  seconds: 10
                  aspect_ratio: '16:9'
                  resolution: 720P
              minimax_h3_sora_reference:
                summary: Video đa tư liệu MiniMax H3
                value:
                  model: minimax-h3
                  prompt: A cinematic product video with smooth camera motion
                  content:
                    - type: text
                      text: >-
                        Use the product image as reference and match the rhythm
                        of the audio.
                    - type: image_url
                      image_url:
                        url: https://example.com/product.jpg
                      role: reference_image
                      name: product
                    - type: audio_url
                      audio_url:
                        url: https://example.com/music.mp3
                      role: reference_audio
                      name: music
                  duration: 8
                  resolution: 1440p
                  aspect_ratio: '16:9'
                  generate_audio: true
              hailuo_2_3_sora_first_frame:
                summary: Hailuo 2.3 Tạo video từ ảnh khung đầu tiên
                value:
                  model: hailuo-2.3
                  prompt: >-
                    The camera slowly pushes in, natural motion and cinematic
                    lighting.
                  content:
                    - type: text
                      text: >-
                        The camera slowly pushes in, natural motion and
                        cinematic lighting.
                    - type: image_url
                      image_url:
                        url: https://example.com/first-frame.jpg
                      role: first_frame
                      name: first
                  duration: 10
                  resolution: 768p
                  aspect_ratio: '16:9'
              vidu_sora_t2v:
                summary: Vidu Sora t2v
                value:
                  model: viduq3-turbo
                  mode: t2v
                  content:
                    - type: text
                      text: A stylish product ad clip with cinematic lighting
                  duration: 5
                  resolution: 720p
                  aspect_ratio: '16:9'
              vidu_sora_i2v:
                summary: Vidu Sora i2v
                value:
                  model: viduq3-turbo
                  mode: i2v
                  content:
                    - type: text
                      text: A stylish ad clip from a product still image
                    - type: image_url
                      image_url: https://example.com/product.jpg
                  duration: 5
                  resolution: 720p
              vidu_sora_first_last:
                summary: Vidu Sora i2v_first_last
                value:
                  model: viduq3-turbo
                  mode: i2v_first_last
                  content:
                    - type: text
                      text: A smooth shot from start frame to end frame
                    - type: image_url
                      image_url: https://example.com/start.jpg
                    - type: image_url
                      image_url: https://example.com/end.jpg
                  duration: 5
                  resolution: 720p
              vidu_sora_reference:
                summary: Vidu Sora reference_images
                value:
                  model: viduq3-turbo
                  mode: reference_images
                  content:
                    - type: text
                      text: Maintain product style and character consistency
                    - type: image_url
                      image_url: https://example.com/ref-1.jpg
                    - type: image_url
                      image_url: https://example.com/ref-2.jpg
                    - type: image_url
                      image_url: https://example.com/ref-3.jpg
                  duration: 5
                  resolution: 720p
                  aspect_ratio: '16:9'
              hailuo_text2video:
                summary: Hailuo 2.3 Tạo video từ ảnh khung đầu tiên
                value:
                  model: hailuo-2.3
                  prompt: A cinematic travel shot over the coastline
                  image_urls:
                    - https://example.com/first-frame.jpg
                  duration: 6
                  resolution: 768p
                  aspect_ratio: '16:9'
              vidu_q4_openai_720p_reference:
                summary: Vidu Q4 720p tham chiếu nhiều ảnh / âm thanh
                value:
                  model: vidu-q4
                  prompt: 保持参考图中的主体与色彩，镜头缓慢推进，主体自然运动。
                  resolution: 720p
                  mode: reference_material
                  seconds: '3'
                  images:
                    - https://example.com/reference-1.jpg
                    - https://example.com/reference-2.jpg
                  audio_urls:
                    - https://example.com/reference-1.mp3
                    - https://example.com/reference-2.mp3
              vidu_q4_openai_540p_reference:
                summary: Vidu Q4 540p tham chiếu nhiều ảnh / âm thanh
                value:
                  model: vidu-q4-540p
                  prompt: 保持参考图中的主体与色彩，镜头缓慢推进，主体自然运动。
                  resolution: 540p
                  mode: reference_material
                  seconds: '3'
                  images:
                    - https://example.com/reference-1.jpg
                    - https://example.com/reference-2.jpg
                  audio_urls:
                    - https://example.com/reference-1.mp3
                    - https://example.com/reference-2.mp3
              magi_2_1080p_openai:
                summary: Tham chiếu hình ảnh/video/âm thanh Magi-2 1080p
                value:
                  model: magi-2-1080p
                  prompt: >-
                    以 <<<image_1>>> 的彩色积木为主体，参考 <<<video_1>>> 的缓慢转动及
                    <<<audio_1>>> 的轻柔节奏。
                  seconds: '4'
                  size: 1440x1440
                  image_urls:
                    - https://example.com/blocks.png
                  video_urls:
                    - https://example.com/rotation.mp4
                  audio_urls:
                    - https://example.com/rhythm.wav
      responses:
        '200':
          description: Đã tạo tác vụ video thành công
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                  task_id:
                    type: string
                    description: Tương thích với giao diện cũ (Sắp ngừng hỗ trợ)
                  object:
                    type: string
                  model:
                    type: string
                  status:
                    type: string
                    description: >-
                      Should use VideoStatus constants: VideoStatusQueued,
                      VideoStatusInProgress, VideoStatusCompleted,
                      VideoStatusFailed
                    enum:
                      - queued
                      - in_progress
                      - completed
                      - failed
                      - video_url
                      - url
                      - completed_at
                  progress:
                    type: integer
                  created_at:
                    type: integer
                  completed_at:
                    type: integer
                  expires_at:
                    type: integer
                  seconds:
                    type: string
                  size:
                    type: string
                  remixed_from_video_id:
                    type: string
                  error:
                    type: object
                  metadata:
                    type: object
                    additionalProperties: true
                  output:
                    type: object
                  request_id:
                    type: string
                required:
                  - created_at
                  - id
                  - model
                  - object
                  - progress
                  - status
              example:
                id: video_abc123
                object: video
                model: sora-2
                status: queued
                progress: 0
                created_at: 1764347090922
                seconds: '8'
          headers: {}
        '400':
          description: Tham số yêu cầu bị lỗi
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          headers: {}
      deprecated: false
      security:
        - BearerAuth: []
components:
  schemas:
    ErrorResponse:
      type: object
      properties:
        error:
          type: object
          properties:
            message:
              type: string
              description: Thông báo lỗi
            type:
              type: string
              description: Loại lỗi
            param:
              type: string
              description: Các tham số liên quan
              nullable: true
            code:
              type: string
              description: Mã lỗi
              nullable: true
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      description: |-
        Sử dụng xác thực Bearer Token.
        Định dạng: `Authorization: Bearer sk-xxxxxx`

````

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