Tài liệu API

seedance-2.5/seedance-video

Seedance 2.5 · Điện ảnh 1080p, tới 30s, có tiếng — Tạo video điện ảnh dài tới 30 giây có sẵn âm thanh, lời thoại tự nhiên bằng Seedance 2.5 & 2.5 Flash. Hỗ trợ ảnh đầu–cuối và đa tham chiếu đồng thời nhiều ảnh (@Image1), video (@Video1), âm thanh (@Audio1).

type: videooutput: videoTheo tham số — dùng POST /v1/generations/estimate để báo giá

Input — tham số đầu vào

POST/v1/generations

Gửi JSON gồm "model": "seedance-2.5/seedance-video" và các tham số dưới đây ở cùng cấp. Tham số không có trong bảng sẽ bị từ chối (400).

Tham sốKiểuGiá trị hỗ trợMô tả
modelrequiredstringseedance-2.5/seedance-videoMã model
moderequiredenum
seedance-2.5:t2vseedance-2.5:i2vseedance-2.5:ref
Chế độ đầu vào — Chọn chế độ tạo video: Chữ → Video, Ảnh → Video, Khung đầu – cuối hoặc Tham chiếu (@Image1, @Video1, @Audio1)
promptrequiredstring

Tối đa 5.000 ký tự

Mô tả cảnh & chuyển động (prompt)
image_urlstring (URL image)
Ảnh khung đầu — Tải lên ảnh khung hình mở đầu của video

Chỉ có hiệu lực khi mode ∈ seedance-2.5:i2v, seedance-2.5-flash:i2v, seedance-2.0:i2v, seedance-2.0-fast:i2v, seedance-2.0-mini:i2v

last_frame_urlstring (URL image)
Ảnh khung cuối — Chốt khung hình kết thúc (bắt buộc ở chế độ Khung đầu – cuối; tuỳ chọn ở Ảnh → Video)

Chỉ có hiệu lực khi mode ∈ seedance-2.5:i2v, seedance-2.5-flash:i2v, seedance-2.0:i2v, seedance-2.0-fast:i2v, seedance-2.0-mini:i2v

image_urlsstring[] (URL image)

Tối đa 30 file

Ảnh tham chiếu @Image1, @Image2... (tối đa 30 ảnh) — Thứ tự ảnh #1, #2, #3... tương ứng @Image1, @Image2, @Image3 trong câu mô tả

Chỉ có hiệu lực khi mode ∈ seedance-2.5:ref, seedance-2.5-flash:ref, seedance-2.0:ref, seedance-2.0-fast:ref, seedance-2.0-mini:ref

video_urlsstring[] (URL video)

Tối đa 10 file

Video tham chiếu @Video1... (tối đa 10 video) — Tham chiếu chuyển động / góc máy (@Video1...). Hệ thống tự báo giá thời gian thực theo độ dài video tham chiếu đính kèm

Chỉ có hiệu lực khi mode ∈ seedance-2.5:ref, seedance-2.5-flash:ref, seedance-2.0:ref, seedance-2.0-fast:ref, seedance-2.0-mini:ref

audio_urlsstring[] (URL audio)

Tối đa 10 file

Âm thanh tham chiếu @Audio1... (tối đa 10 file) — File giọng thoại / nhạc nền MP3, WAV để nhân vật nhép môi hoặc khớp nhịp (@Audio1...)

Chỉ có hiệu lực khi mode ∈ seedance-2.5:ref, seedance-2.5-flash:ref, seedance-2.0:ref, seedance-2.0-fast:ref, seedance-2.0-mini:ref

resolutionrequiredenum

Lựa chọn thay đổi theo mode

Độ phân giải
durationrequiredenum

Lựa chọn thay đổi theo mode

Thời lượng video
aspectrequiredenum

Lựa chọn thay đổi theo mode

Tỉ lệ khung hình

Chỉ có hiệu lực khi mode ∈ seedance-2.5:t2v, seedance-2.5:ref, seedance-2.5-flash:t2v, seedance-2.5-flash:ref, seedance-2.0:t2v, seedance-2.0:i2v, seedance-2.0:ref, seedance-2.0-fast:t2v, seedance-2.0-fast:i2v, seedance-2.0-fast:ref, seedance-2.0-mini:t2v, seedance-2.0-mini:i2v, seedance-2.0-mini:ref

audioboolean

true, false

Mặc định: true

Tạo âm thanh & lời thoại — Tự sinh tiếng động môi trường và lời thoại theo cảnh (với Veo 3.1 & Kling 3.0, tắt tiếng giúp giảm mạnh chi phí)

Chỉ có hiệu lực khi mode ∈ seedance-2.5:t2v, seedance-2.5:i2v, seedance-2.5:ref, seedance-2.5-flash:t2v, seedance-2.5-flash:i2v, seedance-2.5-flash:ref, seedance-2.0:t2v, seedance-2.0:i2v, seedance-2.0:ref, seedance-2.0-fast:t2v, seedance-2.0-fast:i2v, seedance-2.0-fast:ref, seedance-2.0-mini:t2v, seedance-2.0-mini:i2v, seedance-2.0-mini:ref

draftboolean

true, false

Mặc định: false

Bản nháp 480p tiết kiệm — Chạy thử bản nháp 480p với chi phí gốc chỉ 500đ/giây để duyệt chuyển động nhanh

Chỉ có hiệu lực khi mode ∈ seedance-2.5:t2v, seedance-2.5:i2v, seedance-2.5:ref

seedstring

Tối đa 20 ký tự

Seed cố định (tuỳ chọn)

Chỉ có hiệu lực khi mode ∈ seedance-2.5:ref, seedance-2.5-flash:ref

  • Tham số file (string URL) nhận link công khai http(s) — máy chủ tự tải về — hoặc URL trả về từ API tải file POST /account/ai/uploads.
  • Thứ tự phần tử trong mảng image_urls ([url_1, url_2, url_3]) được hệ thống khoá cố định 1–1 theo đúng thứ tự: Ảnh 1 / Image 1 / FIRST image, Ảnh 2 / Image 2 / SECOND image, Ảnh 3 / Image 3 / THIRD image. Khi tải file từ máy qua POST /account/ai/uploads, hãy upload tuần tự theo đúng thứ tự [1, 2, 3] để mảng URL không bị đảo.
  • Bỏ trống tham số không bắt buộc thì dùng giá trị mặc định.

Ví dụ request (cURL)

curl -X POST https://nov.ai.vn/api/v1/generations \
  -H "X-API-Key: $API_KEY" -H "Content-Type: application/json" \
  -d '{
  "model": "seedance-2.5/seedance-video",
  "mode": "seedance-2.5:t2v",
  "prompt": "Giữ nguyên tư thế và bố cục của Ảnh 1, thay sang bộ trang phục ở Ảnh 2 và lấy khuôn mặt từ Ảnh 3.",
  "resolution": "...",
  "duration": "..."
}'

Code mẫu tích hợp đầy đủ (Upload file → Tạo tác vụ → Nhận kết quả)

Python 3

import os, time, requests

BASE = "https://nov.ai.vn/api"
API_KEY = os.environ["API_KEY"]  # hoặc điền trực tiếp "cmsnt_..."
HEADERS = {"X-API-Key": API_KEY}

def upload_file(local_path: str) -> str:
    """Tải 1 file từ máy lên server và trả về URL đầu vào"""
    with open(local_path, "rb") as f:
        r = requests.post(f"{BASE}/account/ai/uploads", headers=HEADERS, files={"file": f}, timeout=120)
    data = r.json()
    if not r.ok:
        raise RuntimeError(data.get("message") or r.text)
    return data["url"]

# Bước 1: Upload tuần tự đúng thứ tự Ảnh 1 -> Ảnh 2 -> Ảnh 3 (hoặc dùng thẳng link https công khai)
image_urls = [
    upload_file("./1.jpg"),  # Ảnh 1 (Image 1 / FIRST image)
    upload_file("./2.jpg"),  # Ảnh 2 (Image 2 / SECOND image)
    upload_file("./3.jpg"),  # Ảnh 3 (Image 3 / THIRD image)
]

# Bước 2: Gửi yêu cầu tạo ảnh với đúng thứ tự mảng image_urls [1, 2, 3]
payload = {
    "model": "seedance-2.5/seedance-video",
    "mode": "seedance-2.5:t2v",
    "prompt": "Giữ nguyên tư thế và bố cục của Ảnh 1, thay sang bộ trang phục ở Ảnh 2 và lấy khuôn mặt từ Ảnh 3.",
    "resolution": "...",
    "duration": "..."
}
r = requests.post(f"{BASE}/v1/generations", headers=HEADERS, json=payload, timeout=60)
gen = r.json()
if not r.ok:
    raise RuntimeError(gen.get("message") or r.text)

# Bước 3: Hỏi trạng thái mỗi 5 giây tới khi hoàn tất
while gen["status"] in ("queued", "processing"):
    time.sleep(5)
    poll = requests.get(f"{BASE}/v1/generations/{gen['id']}", headers=HEADERS, timeout=60)
    gen = poll.json()

if gen["status"] != "succeeded":
    raise RuntimeError(gen.get("error") or gen["status"])

print("Kết quả:", [f["url"] for f in gen["output"]["files"]])

Node.js (18+)

import fs from "node:fs";
import path from "node:path";

const BASE = "https://nov.ai.vn/api";
const API_KEY = process.env.API_KEY; // hoặc điền trực tiếp "cmsnt_..."

async function uploadFile(filePath) {
  const form = new FormData();
  const buf = fs.readFileSync(filePath);
  form.append("file", new Blob([buf]), path.basename(filePath));
  const res = await fetch(`${BASE}/account/ai/uploads`, {
    method: "POST",
    headers: { "X-API-Key": API_KEY },
    body: form,
  });
  const data = await res.json();
  if (!res.ok) throw new Error(data.message || res.statusText);
  return data.url;
}

// Bước 1: Upload tuần tự từng ảnh 1 -> 2 -> 3 để giữ đúng thứ tự mảng
const imageUrls = [];
for (const file of ["./1.jpg", "./2.jpg", "./3.jpg"]) {
  imageUrls.push(await uploadFile(file));
}

// Bước 2: Gửi tạo tác vụ
const createRes = await fetch(`${BASE}/v1/generations`, {
  method: "POST",
  headers: { "X-API-Key": API_KEY, "Content-Type": "application/json" },
  body: JSON.stringify({
    ...{
  "model": "seedance-2.5/seedance-video",
  "mode": "seedance-2.5:t2v",
  "prompt": "Giữ nguyên tư thế và bố cục của Ảnh 1, thay sang bộ trang phục ở Ảnh 2 và lấy khuôn mặt từ Ảnh 3.",
  "resolution": "...",
  "duration": "..."
},
    image_urls: imageUrls,
  }),
});
let gen = await createRes.json();
if (!createRes.ok) throw new Error(gen.message || createRes.statusText);

// Bước 3: Chờ kết quả
while (["queued", "processing"].includes(gen.status)) {
  await new Promise((r) => setTimeout(r, 5000));
  const pollRes = await fetch(`${BASE}/v1/generations/${gen.id}`, {
    headers: { "X-API-Key": API_KEY },
  });
  gen = await pollRes.json();
}
if (gen.status !== "succeeded") throw new Error(gen.error ?? gen.status);
console.log("Kết quả:", gen.output.files.map((f) => f.url));

Output — kết quả trả về

Tác vụ chạy bất đồng bộ. POST /v1/generations trả ngay đối tượng generation với status queued hoặc processing; hỏi lại GET /v1/generations/{id} mỗi 5–10 giây tới khi status là succeeded, failed hoặc cancelled.

GET/v1/generations/{id}
{
  "id": "3f1c...-uuid",
  "object": "generation",
  "code": "T8KQ2M4X",
  "model": "seedance-2.5/seedance-video",
  "status": "succeeded",       // queued | processing | succeeded | failed | cancelled
  "progress": 100,
  "cost": 2400,                // số tiền đã trừ
  "currency": "VND",
  "refunded": false,
  "output": {
    "type": "video",
    "files": [{ "url": "https://nov.ai.vn/uploads/ai/outputs/....mp4", "type": "video", "name": "video.mp4" }],
    "text": null
  },
  "error": null,
  "created_at": "2026-10-30T08:00:00.000Z",
  "completed_at": "2026-10-30T08:01:12.000Z"
}
TrườngÝ nghĩa
output.files[].urlLink file kết quả — nên tải về hệ thống của bạn, file trên máy chủ có thể được dọn sau một thời gian.
output.textNội dung văn bản (chỉ có với model trả văn bản).
costSố tiền VND đã trừ vào số dư; lỗi hoặc huỷ thì tự hoàn lại (refunded = true).
errorLý do lỗi khi status = failed.

Báo giá trước khi chạy

POST/v1/generations/estimate

Cùng body với POST /v1/generations, không chạy và không trừ tiền.

# => { "object": "estimate", "model": "seedance-2.5/seedance-video", "cost": 2400, "currency": "VND" }
Lấy API key
seedance-2.5/seedance-video · Tài liệu API | NOV AI