# Magi-2

> Magi-2 là mô hình video của Sand AI: mỗi lần tạo cho ra video 1080p có âm thanh dài từ 4 đến 30 giây, từ câu lệnh, khung hình đầu và cuối, hoặc ảnh, video và âm thanh tham chiếu. Trên Kerox, mô hình được tính phí theo từng giây đầu ra, với cùng một mức giá cho mọi chế độ, dù có hay không có âm thanh. Hãy mở mô hình trong Studio, hoặc gọi API với ID mô hình sand-ai/magi-2.

Magi-2 là công cụ tạo video bằng AI của Sand AI. Bạn có thể gọi mô hình qua Kerox API với ID mô hình sand-ai/magi-2, hoặc tạo nội dung trong Studio mà không cần viết mã. Trên Kerox, giá từ $0.0800 / giây, không cần đăng ký gói.

## Bảng giá

| Mô hình | ID | Thanh toán | Giá Kerox | Giảm giá |
| --- | --- | --- | --- | --- |
| Magi-2 | `sand-ai/magi-2` | Theo giây | 1080p: $0.0800 | — |

- [Bảng giá Magi-2](https://kerox.ai/vi/pricing#pricing-sand-ai/magi-2)
- [Tài liệu API Magi-2](https://kerox.ai/vi/docs/models/sand-ai/magi-2)
- [Magi-2](https://kerox.ai/vi/models/sand-ai/magi-2)

## Giới thiệu về Magi-2

Magi-2 là mô hình video chủ lực của Sand AI, ra mắt ngày 24/11/2026, sau bản mã nguồn mở Magi-2 Preview vào tháng 8. Sand AI xây dựng hình ảnh và âm thanh trong cùng một mô hình: một Transformer duy nhất đọc đồng thời văn bản, video và âm thanh, nên đoạn video được tạo ra kèm sẵn âm thanh. Các điểm dưới đây được lấy từ bài viết ra mắt của Sand AI.

### Sand AI nói gì về Magi-2

- **Tối đa 30 giây video 1080p trong một lần tạo.** Sand AI tạo tối đa 30 giây video 1080p kèm âm thanh trong một lần tạo, ở tốc độ 25 khung hình/giây. Đầu ra 1080p có được nhờ bước nâng độ phân giải sau lần tạo cơ bản.
- **Âm thanh từ cùng một mô hình.** Lời thoại khớp khẩu hình, hiệu ứng âm thanh, âm thanh môi trường và nhạc được tạo cùng với hình ảnh, không phải thêm vào sau.
- **Một luồng duy nhất cho văn bản, video và âm thanh.** Sand AI mô tả đây là một Transformer kiểu mixture-of-experts một luồng, với tổng cộng khoảng 480B tham số và khoảng 28B tham số hoạt động.
- **Tham chiếu đa phương thức.** Mỗi lần tạo có thể được định hướng bởi tối đa 10 ảnh, 5 video và 5 đoạn âm thanh.
- **Ổn định qua các cảnh quay dài.** Sand AI nhấn mạnh khả năng tuân thủ chỉ dẫn, bố cục phức tạp và tính nhất quán về không gian lẫn thời gian trong các video dài.

Sand AI cũng giới thiệu tính năng chỉnh sửa video có sẵn và điều khiển theo dòng thời gian. Các tính năng này hiện chưa có trên Kerox.

Trên Kerox, Magi-2 tạo video 1080p dài từ 4 đến 30 giây, ở tỷ lệ 16:9, 9:16, 1:1, 4:3, 3:4 hoặc 21:9, với âm thanh được bật theo mặc định. Mỗi yêu cầu có thể chỉ gồm một prompt, một khung hình đầu kèm khung hình cuối tùy chọn, hoặc tối đa 10 ảnh tham chiếu, 5 video tham chiếu và 5 đoạn âm thanh tham chiếu. Khi có khung hình đầu, video sẽ giữ nguyên tỷ lệ của khung hình đó. Giá như nhau ở cả ba chế độ. Cách gọi, chi phí và các lựa chọn thay thế: [Hướng dẫn API Magi-2](https://kerox.ai/vi/blog/magi-2-api)

## Cách sử dụng Magi-2

1. **Nạp tiền** Nạp tiền từ $10. Không có gói thuê bao, và số dư của bạn không hết hạn.
2. **Thiết lập video** Viết prompt, chọn thời lượng và tỷ lệ khung hình, rồi thêm khung hình đầu hoặc tệp tham chiếu nếu bạn cần. Giá cho các thiết lập này sẽ hiển thị trước khi bạn bắt đầu.
3. **Tạo và tải xuống** Số tiền được tạm giữ khi bạn bắt đầu và chỉ bị trừ chính thức khi video hoàn tất. Lượt tạo thất bại sẽ được hoàn tiền đầy đủ.

## Bạn có thể tạo gì với Magi-2

- **Tạo video từ văn bản có âm thanh.** Chỉ với một prompt, bạn nhận được đoạn video 1080p với âm thanh tự nhiên, dài tới 30 giây.
- **Tạo video từ ảnh.** Bắt đầu từ một khung hình đầu, hoặc đặt cả khung hình đầu và khung hình cuối để mô hình tự tạo chuyển động ở giữa.
- **Video dựa trên tham chiếu.** Đưa vào ảnh của một chủ thể, một sản phẩm hoặc một bối cảnh, rồi mô tả cảnh xung quanh.
- **Cảnh có lời thoại.** Viết lời thoại trong dấu ngoặc kép, mô hình sẽ lồng tiếng khớp với khẩu hình của người nói.
- **Video theo âm thanh tham chiếu.** Thêm âm thanh tham chiếu cho giọng nói, nhịp điệu hoặc một đoạn nhạc, tổng cộng tối đa 30 giây.

## Magi-2 so với các mô hình khác trên Kerox

Tất cả các mô hình này đều dùng chung một số dư và một API. Để chuyển đổi, bạn chỉ cần đổi ID mô hình và dùng các thiết lập mà mô hình đích hỗ trợ. Giá khởi điểm có trong bảng.

| Mô hình | Khi nào nên chọn | Giá khởi điểm |
| --- | --- | --- |
| [Magi-2](https://kerox.ai/vi/models/sand-ai/magi-2) | Mô hình video của Sand AI, dài 4 đến 30 giây ở 1080p có âm thanh, một mức giá cho mọi chế độ. Hãy chọn khi bạn cần video 1080p dài có lời thoại hoặc âm thanh. | 1080p: $0.0800 |
| [Seedance 2.5](https://kerox.ai/vi/models/bytedance/seedance-2.5) | Mô hình video của ByteDance, dài 4 đến 30 giây ở độ phân giải 480p, 720p hoặc 1080p, với tối đa 30 ảnh tham chiếu. Hãy chọn khi bạn muốn độ phân giải thấp hơn hoặc dùng nhiều ảnh tham chiếu. | Từ khoảng $0.0977 / giây (480p) |
| [Kling 4.0](https://kerox.ai/vi/models/kuaishou/kling-4.0) | Mô hình video của Kuaishou, dài 3 đến 30 giây ở độ phân giải 720p, 1080p hoặc 4K. Hãy chọn khi bạn cần 4K. | 4K: $0.4941, 720p: $0.1413, 1080p: $0.2115 |
| [Wan 3.0](https://kerox.ai/vi/models/alibaba/wan-3.0) | Mô hình video của Alibaba, dài 2 đến 30 giây ở độ phân giải tối đa 1080p. Hãy chọn cho các clip ngắn hơn 4 giây. | 480p: $0.0400, 720p: $0.0800, 1080p: $0.1600 |
| [MiniMax H3](https://kerox.ai/vi/models/minimax/h3) | Mô hình video của MiniMax, dài 4 đến 15 giây ở độ phân giải 768p hoặc 2K. Hãy chọn cho các clip 2K ngắn. | 2K: $0.0650, 768p: $0.0400 |

## Câu hỏi thường gặp

### Magi-2 có giá bao nhiêu?

Magi-2 trên Kerox có giá từ $0.0800 / giây. Bạn trả tiền theo từng lượt tạo và không bị tính phí cho các lượt tạo thất bại. Bảng giá trên trang này liệt kê đầy đủ mọi tùy chọn.

### Magi-2 có API không?

Có. Gửi một tác vụ tới API của Kerox với ID mô hình sand-ai/magi-2, sau đó kiểm tra định kỳ trạng thái tác vụ hoặc nhận Webhook khi tác vụ hoàn tất. Tài liệu API của Magi-2 liệt kê đầy đủ mọi tham số kèm mã mẫu.

### Tôi có thể dùng Magi-2 trực tuyến mà không cần viết mã không?

Có. Mở Magi-2 trong Kerox Studio, nhập prompt và tạo ngay trên trình duyệt. Studio và API dùng chung một số dư.

### Tôi có cần đăng ký gói để dùng Magi-2 không?

Không. Không có gói đăng ký và không có phí hằng tháng. Nạp tiền từ $10 và chỉ trả cho những gì bạn tạo.

### Làm thế nào để dùng Magi-2?

Đăng nhập Kerox, mở Magi-2 trong Studio, nhập prompt và tạo ngay trên trình duyệt. Để tích hợp vào mã nguồn, hãy tạo khóa API và gửi tác vụ với ID mô hình sand-ai/magi-2.

### Magi-2 có miễn phí không?

Magi-2 là mô hình trả phí trên Kerox: mỗi lượt tạo thành công được tính theo giá trên trang này, còn lượt tạo thất bại thì không mất phí. Không có phí hằng tháng và bạn có thể bắt đầu bằng một khoản nạp $10.

### Video Magi-2 có thể dài bao lâu?

Từ 4 đến 30 giây trong một lần tạo, với thời lượng được chọn theo từng giây nguyên. Mặc định là 5 giây. Mọi clip đều ở độ phân giải 1080p và hóa đơn chỉ tính số giây đầu ra.

### Magi-2 có tạo âm thanh không?

Có. Âm thanh được bật theo mặc định: Sand AI tạo lời thoại khớp khẩu hình, hiệu ứng âm thanh, âm thanh môi trường và nhạc cùng với hình ảnh. Đặt `generate_audio` thành false hoặc tắt Tạo âm thanh trong Studio để có clip không tiếng. Giá mỗi giây vẫn như nhau trong cả hai trường hợp.

### Nên viết prompt cho Magi-2 như thế nào?

Hãy viết theo từng cảnh quay, theo đúng thứ tự diễn ra sự việc, và nêu rõ vị trí máy quay. Đặt lời thoại trong dấu ngoặc kép, nguyên văn từng chữ, và nói rõ ai là người nói. Mô tả cả âm thanh bạn muốn: hướng dẫn viết prompt của Sand AI cho Magi-2 Preview giữ lời thoại bằng ngôn ngữ gốc và chia clip thành các cảnh quay nối với nhau bằng các điểm cắt cảnh trực tiếp.

### Magi-1, Magi-2 Preview và Magi-2 khác nhau như thế nào?

Đây là ba thế hệ mô hình của Sand AI. Magi-1, phát hành vào tháng 4 năm 2025 theo giấy phép Apache 2.0, tạo video theo phương pháp tự hồi quy, từng đoạn một. Magi-2 Preview, được mở mã nguồn theo giấy phép Apache 2.0 vào tháng 8 năm 2026, tạo các clip 10 giây có âm thanh. Magi-2, ra mắt vào tháng 11 năm 2026, là mô hình lớn hơn được huấn luyện trên lượng dữ liệu gấp khoảng ba lần bản Preview, và tạo video 1080p có âm thanh dài tới 30 giây. Kerox chạy Magi-2. Trọng số của Magi-2 hiện chưa được công khai: Sand AI cho biết các bản phát hành mã nguồn mở và báo cáo kỹ thuật sẽ ra mắt sau.


---

## Request example

Submit a task and get its id at once; get the result by polling (below) or by [webhook](https://kerox.ai/vi/docs/webhooks.md). `webhook_url` and `metadata` are optional. To use a webhook, provide your own public HTTPS address in `webhook_url`. Every field is in [Submit a task](https://kerox.ai/vi/docs/tasks.md#submit-body).

Set `KEROX_API_KEY` first. Polling requires Bash, curl and jq. For Python, run `pip install requests` first.

### cURL

```bash
curl --fail-with-body -X POST https://api.kerox.ai/v1/tasks \
  -H "Authorization: Bearer $KEROX_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "model": "sand-ai/magi-2",
  "input": {
    "prompt": "a red fox running through fresh snow, cinematic lighting",
    "resolution": "1080p",
    "duration": 5,
    "aspect_ratio": "16:9"
  }
}'
```

### Python

```python
import os
import requests

resp = requests.post(
    "https://api.kerox.ai/v1/tasks",
    headers={
        "Authorization": f"Bearer {os.environ['KEROX_API_KEY']}",
        "Content-Type": "application/json",
    },
    json={
        "model": "sand-ai/magi-2",
        "input": {
            "prompt": "a red fox running through fresh snow, cinematic lighting",
            "resolution": "1080p",
            "duration": 5,
            "aspect_ratio": "16:9",
        },
    },
    timeout=60,
)
resp.raise_for_status()
task = resp.json()
print(task["id"], task["status"])  # Save the id for polling
```

### Node.js

```javascript
const res = await fetch('https://api.kerox.ai/v1/tasks', {
  method: 'POST',
  headers: {
    Authorization: `Bearer ${process.env.KEROX_API_KEY}`,
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    "model": "sand-ai/magi-2",
    "input": {
      "prompt": "a red fox running through fresh snow, cinematic lighting",
      "resolution": "1080p",
      "duration": 5,
      "aspect_ratio": "16:9"
    }
  }),
});
const task = await res.json();
if (!res.ok) throw new Error(JSON.stringify(task));
console.log(task.id, task.status); // Save the id for polling
```

### Go

```go
package main

import (
	"bytes"
	"fmt"
	"io"
	"net/http"
	"os"
	"time"
)

func main() {
	body := []byte(`{
  "model": "sand-ai/magi-2",
  "input": {
    "prompt": "a red fox running through fresh snow, cinematic lighting",
    "resolution": "1080p",
    "duration": 5,
    "aspect_ratio": "16:9"
  }
}`)
	req, _ := http.NewRequest("POST", "https://api.kerox.ai/v1/tasks", bytes.NewReader(body))
	req.Header.Set("Authorization", "Bearer "+os.Getenv("KEROX_API_KEY"))
	req.Header.Set("Content-Type", "application/json")
	client := &http.Client{Timeout: 60 * time.Second}
	resp, err := client.Do(req)
	if err != nil {
		panic(err)
	}
	defer resp.Body.Close()
	out, _ := io.ReadAll(resp.Body)
	if resp.StatusCode >= 400 {
		fmt.Fprintln(os.Stderr, string(out))
		os.Exit(1)
	}
	fmt.Println(string(out))
}
```

### Reference image

```bash
curl --fail-with-body -X POST https://api.kerox.ai/v1/tasks \
  -H "Authorization: Bearer $KEROX_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "model": "sand-ai/magi-2",
  "input": {
    "prompt": "Image 1: the lighthouse beam sweeps slowly across the water",
    "resolution": "1080p",
    "duration": 5,
    "aspect_ratio": "16:9",
    "images": [
      "https://cdn.kerox.ai/assets/samples/seedream-5.5/lighthouse-blue-hour.webp"
    ]
  }
}'
```

### First frame

```bash
curl --fail-with-body -X POST https://api.kerox.ai/v1/tasks \
  -H "Authorization: Bearer $KEROX_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "model": "sand-ai/magi-2",
  "input": {
    "prompt": "A lighthouse beam sweeps slowly across the waves",
    "resolution": "1080p",
    "duration": 5,
    "aspect_ratio": "16:9",
    "first_frame": "https://cdn.kerox.ai/assets/samples/seedream-5.5/lighthouse-blue-hour.webp"
  }
}'
```

### First and last frames

```bash
curl --fail-with-body -X POST https://api.kerox.ai/v1/tasks \
  -H "Authorization: Bearer $KEROX_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "model": "sand-ai/magi-2",
  "input": {
    "prompt": "Slowly dissolve from the coast to the cabin by the lake",
    "resolution": "1080p",
    "duration": 5,
    "aspect_ratio": "16:9",
    "first_frame": "https://cdn.kerox.ai/assets/samples/seedream-5.5/lighthouse-blue-hour.webp",
    "last_frame": "https://cdn.kerox.ai/assets/samples/seedream-5.0-pro/alpine-cabin-dawn.webp"
  }
}'
```

### Reference video

```bash
curl --fail-with-body -X POST https://api.kerox.ai/v1/tasks \
  -H "Authorization: Bearer $KEROX_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "model": "sand-ai/magi-2",
  "input": {
    "prompt": "Use the camera motion of Video 1 for a flyover of a rocky coastline",
    "resolution": "1080p",
    "duration": 5,
    "aspect_ratio": "16:9",
    "videos": [
      "https://cdn.kerox.ai/assets/samples/seedance-2.0/sea-stacks-fog.mp4"
    ]
  }
}'
```

### Reference audio

```bash
curl --fail-with-body -X POST https://api.kerox.ai/v1/tasks \
  -H "Authorization: Bearer $KEROX_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "model": "sand-ai/magi-2",
  "input": {
    "prompt": "Show a dinosaur at dusk and time its roar to Audio 1",
    "resolution": "1080p",
    "duration": 5,
    "aspect_ratio": "16:9",
    "audios": [
      "https://interactive-examples.mdn.mozilla.net/media/cc0-audio/t-rex-roar.mp3"
    ]
  }
}'
```

## Parameters

The [parameter names](https://kerox.ai/vi/docs/models.md) mean the same on every model.

| Parameter | Type | Required | Default | Values | Description | Example |
| --- | --- | --- | --- | --- | --- | --- |
| `prompt` | string | No | — | at least one non-whitespace character; 1–15000 characters | Text describing what to generate. | `"A lighthouse at dawn"` |
| `images` | string \| string[] | No | — | one public HTTPS URL; one string or an array of 1–10 items | Images for the model to draw on, in the order the prompt refers to them. | `"https://example.com/photo.png"` |
| `videos` | string \| string[] | No | — | one public HTTPS URL; one string or an array of 1–5 items; At least 2 seconds per clip and at most 30 seconds total for this media type. Video and audio are counted separately. | Videos for the model to draw on, in the order the prompt refers to them. | `"https://example.com/clip.mp4"` |
| `audios` | string \| string[] | No | — | one public HTTPS URL; one string or an array of 1–5 items; At least 2 seconds per clip and at most 30 seconds total for this media type. Video and audio are counted separately. | Audio clips for the model to draw on, in the order the prompt refers to them. | `"https://example.com/music.wav"` |
| `first_frame` | string | No | — | one public HTTPS URL | The image a video starts from. | `"https://example.com/start.png"` |
| `last_frame` | string | No | — | one public HTTPS URL | The image a video ends on. Needs `first_frame`. | `"https://example.com/end.png"` |
| `aspect_ratio` | string | No | — | 16:9, 9:16, 1:1, 4:3, 3:4, 21:9 | Width to height of the output. | `"16:9"` |
| `resolution` | string | No | `"1080p"` | 1080p | Output resolution tier. The exact pixels follow from it and `aspect_ratio`. | `"1080p"` |
| `duration` | integer | No | `5` | 4–30 | Length of the output in whole seconds. | `5` |
| `seed` | integer | No | — | 0–2147483647 | The same seed and input give a similar result. | `0` |
| `generate_audio` | boolean | No | `true` | true, false | Whether the video comes with generated sound (voice, effects, music). | `true` |
| `n` | integer | No | `1` | 1 | How many outputs one task may produce. | `1` |

- last_frame requires first_frame
- When first_frame: omit images or videos or audios
- Supply a prompt for text or reference generation. With a first frame the prompt is optional. With a first frame the video follows the frame's aspect ratio and `aspect_ratio` has no effect; the other modes use 16:9 when it is omitted.
- Only output seconds are billed. Reference media and the audio switch do not change the price.

Use a public HTTPS URL directly for images, audio and video. For local media, upload with `POST /v1/files` and pass the returned `url`. For upload MIME and size limits, see [Files & inputs](https://kerox.ai/vi/docs/files.md#presigned).

Not supported yet: `watermark`.

## Polling and output

Poll `GET /v1/tasks/{id}`, or pass `webhook_url` when you submit and receive the same task object when it finishes: see [Webhooks](https://kerox.ai/vi/docs/webhooks.md) for the setup. Output files expire at `expires_at` (7 days after completion), so download anything you want to keep. See every task field in [Tasks & polling](https://kerox.ai/vi/docs/tasks.md#submit-response).

Set `TASK_ID` to the `id` returned on submission. The script waits up to 10 minutes, prints `error` on failure and downloads every `outputs[].url` on success.

```bash
(
  set -eu
  # Set TASK_ID to the id returned by the submit request.
  : "${TASK_ID:?Set TASK_ID}"
  deadline=$((SECONDS + 600))
  while (( SECONDS < deadline )); do
    task=$(curl --fail-with-body --silent --show-error --max-time "$((deadline - SECONDS))" https://api.kerox.ai/v1/tasks/"$TASK_ID" \
      -H "Authorization: Bearer $KEROX_API_KEY")
    case $(jq -er .status <<< "$task") in
      succeeded)
        if ! jq -e '.outputs | length > 0' <<< "$task" >/dev/null; then
          echo "Result files are unavailable." >&2
          exit 1
        fi
        i=0
        while IFS= read -r url; do
          file_path=${url%%\?*}
          filename="output-${i}.${file_path##*.}"
          curl --fail-with-body --silent --show-error --max-time 120 "$url" -o "$filename"
          printf "%s\n" "$filename"
          i=$((i + 1))
        done < <(jq -r '.outputs[].url' <<< "$task")
        exit 0 ;;
      failed) jq -c .error <<< "$task" >&2; exit 1 ;;
      processing) sleep 2 ;;
      *) echo "Unexpected task status." >&2; exit 1 ;;
    esac
  done
  echo "Poll timed out. Keep TASK_ID to check again later." >&2
  exit 1
)
```

### Success response JSON

Actual charges depend on your account price and task result.

```json
{
  "id": "task_01JD8X9B4Q2M7T8N3K5P6R1S0V",
  "object": "task",
  "model": "sand-ai/magi-2",
  "status": "succeeded",
  "source": "api",
  "format": "unified",
  "input": {
    "prompt": "a red fox running through fresh snow, cinematic lighting",
    "resolution": "1080p",
    "duration": 5,
    "aspect_ratio": "16:9"
  },
  "outputs": [
    {
      "type": "video",
      "url": "https://cdn.kerox.ai/t/task_01JD8X9B4Q2M7T8N3K5P6R1S0V/5f2b8c1e9d3a4f6b8a7c0d1e2f3a4b5c/0.mp4",
      "content_type": "video/mp4",
      "width": 1920,
      "height": 1080,
      "duration": 5
    }
  ],
  "outputs_deleted": false,
  "error": null,
  "cost": {
    "amount": "0.4000",
    "currency": "USD",
    "status": "settled"
  },
  "metadata": null,
  "warnings": [],
  "created_at": "2026-11-20T08:00:00Z",
  "started_at": "2026-11-20T08:00:01Z",
  "completed_at": "2026-11-20T08:01:10Z",
  "expires_at": "2026-11-27T08:01:10Z"
}
```

## Pricing

| Tier | Official / second | Kerox / second | Below official price |
| --- | --- | --- | --- |
| 1080p | $0.0800 | $0.0800 | — |

### Estimate before submitting

The returned `amount` is what submitting would hold. An estimate creates no task and charges nothing. When `exact` is `false`, the final charge may differ from the hold.

### Without a reference video

```bash
curl --fail-with-body -X POST https://api.kerox.ai/v1/estimate \
  -H "Authorization: Bearer $KEROX_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "model": "sand-ai/magi-2",
  "input": {
    "prompt": "a red fox running through fresh snow, cinematic lighting",
    "resolution": "1080p",
    "duration": 5,
    "aspect_ratio": "16:9"
  }
}'
```

### With a reference video

```bash
curl --fail-with-body -X POST https://api.kerox.ai/v1/estimate \
  -H "Authorization: Bearer $KEROX_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "model": "sand-ai/magi-2",
  "input": {
    "prompt": "a red fox running through fresh snow, cinematic lighting",
    "resolution": "1080p",
    "duration": 5,
    "aspect_ratio": "16:9",
    "videos": [
      "https://cdn.kerox.ai/assets/samples/seedance-2.0/sea-stacks-fog.mp4"
    ]
  }
}'
```

## Common usage

| Clip | Official price | Kerox | You save |
| --- | --- | --- | --- |
| 5 s · 1080p | $0.4000 | $0.4000 | — |
| 10 s · 1080p | $0.8000 | $0.8000 | — |
| 15 s · 1080p | $1.2000 | $1.2000 | — |

- **$10 gets you**: 125 seconds of 1080p video

## Input schema (JSON)

### Parameters (`unified.input_schema`)

```json
{
  "type": "object",
  "allOf": [
    {
      "if": {
        "required": [
          "first_frame"
        ],
        "properties": {
          "first_frame": true
        }
      },
      "else": {
        "required": [
          "prompt"
        ],
        "properties": {
          "prompt": true
        }
      },
      "then": {
        "not": {
          "anyOf": [
            {
              "required": [
                "images"
              ],
              "properties": {
                "images": true
              }
            },
            {
              "required": [
                "videos"
              ],
              "properties": {
                "videos": true
              }
            },
            {
              "required": [
                "audios"
              ],
              "properties": {
                "audios": true
              }
            }
          ]
        }
      }
    }
  ],
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "properties": {
    "prompt": {
      "type": "string",
      "pattern": "\\S",
      "maxLength": 15000,
      "minLength": 1,
      "description": "Text describing what to generate.",
      "x-label-en": "Prompt",
      "x-label-zh": "提示词",
      "x-tier": "common"
    },
    "images": {
      "oneOf": [
        {
          "type": "string",
          "pattern": "^https://"
        },
        {
          "type": "array",
          "items": {
            "type": "string",
            "pattern": "^https://"
          },
          "maxItems": 10,
          "minItems": 1
        }
      ],
      "description": "Images for the model to draw on, in the order the prompt refers to them.",
      "x-label-en": "Reference images",
      "x-label-zh": "参考图",
      "x-tier": "common"
    },
    "videos": {
      "oneOf": [
        {
          "type": "string",
          "pattern": "^https://"
        },
        {
          "type": "array",
          "items": {
            "type": "string",
            "pattern": "^https://"
          },
          "maxItems": 5,
          "minItems": 1
        }
      ],
      "x-constraints": {
        "min_clip_seconds": 2,
        "max_total_seconds": 30
      },
      "description": "Videos for the model to draw on, in the order the prompt refers to them.",
      "x-label-en": "Reference videos",
      "x-label-zh": "参考视频",
      "x-tier": "advanced"
    },
    "audios": {
      "oneOf": [
        {
          "type": "string",
          "pattern": "^https://"
        },
        {
          "type": "array",
          "items": {
            "type": "string",
            "pattern": "^https://"
          },
          "maxItems": 5,
          "minItems": 1
        }
      ],
      "x-constraints": {
        "min_clip_seconds": 2,
        "max_total_seconds": 30
      },
      "description": "Audio clips for the model to draw on, in the order the prompt refers to them.",
      "x-label-en": "Reference audio",
      "x-label-zh": "参考音频",
      "x-tier": "advanced"
    },
    "first_frame": {
      "type": "string",
      "pattern": "^https://",
      "description": "The image a video starts from.",
      "x-label-en": "First frame",
      "x-label-zh": "首帧",
      "x-tier": "common"
    },
    "last_frame": {
      "type": "string",
      "pattern": "^https://",
      "description": "The image a video ends on. Needs `first_frame`.",
      "x-label-en": "Last frame",
      "x-label-zh": "尾帧",
      "x-tier": "advanced"
    },
    "aspect_ratio": {
      "enum": [
        "16:9",
        "9:16",
        "1:1",
        "4:3",
        "3:4",
        "21:9"
      ],
      "type": "string",
      "description": "Width to height of the output.",
      "x-label-en": "Aspect ratio",
      "x-label-zh": "画面比例",
      "x-tier": "common"
    },
    "resolution": {
      "enum": [
        "1080p"
      ],
      "type": "string",
      "default": "1080p",
      "description": "Output resolution tier. The exact pixels follow from it and `aspect_ratio`.",
      "x-label-en": "Resolution",
      "x-label-zh": "分辨率",
      "x-tier": "common"
    },
    "duration": {
      "type": "integer",
      "default": 5,
      "maximum": 30,
      "minimum": 4,
      "description": "Length of the output in whole seconds.",
      "x-label-en": "Duration",
      "x-label-zh": "时长",
      "x-tier": "common"
    },
    "seed": {
      "type": "integer",
      "maximum": 2147483647,
      "minimum": 0,
      "description": "The same seed and input give a similar result.",
      "x-label-en": "Seed",
      "x-label-zh": "随机种子",
      "x-tier": "advanced"
    },
    "generate_audio": {
      "type": "boolean",
      "default": true,
      "description": "Whether the video comes with generated sound (voice, effects, music).",
      "x-label-en": "Generate audio",
      "x-label-zh": "生成声音",
      "x-tier": "common"
    },
    "n": {
      "type": "integer",
      "const": 1,
      "default": 1,
      "description": "How many outputs one task may produce.",
      "x-label-en": "Number of outputs",
      "x-label-zh": "生成数量",
      "x-tier": "advanced"
    }
  },
  "x-unsupported": [
    "watermark"
  ],
  "dependentRequired": {
    "last_frame": [
      "first_frame"
    ]
  },
  "additionalProperties": false
}
```
