PromptFlow AI
API docs

seedance-2.0-mini

Seedance 2.0 Mini Video (480p / 720p · 4s–15s) — Generate cinematic AI videos with smooth motion using Seedance 2.0 Mini Video — maintain character consistency across camera angles, flexible duration 4s – 15s, 480p – 720p quality (480p, 720p), support for up to 9 reference images to maintain character/scene consistency, accepts camera angle/motion reference videos, accepts sample audio/voice files, multiple aspect ratios (9:16, 16:9, 1:1, 4:3, 3:4...), prompts up to 100,000 characters.

SV18 (sv18) · healthyid: seedance-2.0-mini-4canonical_model: seedance-2.0-minitype: videooutput: video2,000đ – 10,608đ
Các gói & Server (SV) hiện có của model seedance-2.0-miniGET /api/v1/models/seedance-2.0-mini/servers

Bảng giá API chi tiết theo từng cấu hình tham số

Đơn giá thực tế (VNĐ) trừ vào ví khi gọi POST /v1/generations (hoặc kiểm tra trước qua POST /v1/generations/estimate).

2,000đ – 10,608đ
Detailed pricing by resolution & duration
Quality4s5s8s10s12s15s
480p SD2,000đ2,500đ3,750đ4,375đ5,625đ6,875đ
720p HD3,000đ3,750đ5,625đ6,875đ8,125đ10,000đ
4K3,162đ3,953đ5,949đ7,280đ8,612đ10,608đ

Hỗ trợ chọn tự do từng giây từ 4s đến 15s

Input — request parameters

POST/v1/generations

Gửi JSON theo cấu trúc chuẩn "model": "seedance-2.0-mini", "server": "sv18" and the parameters below at the same level. Parameters not listed in the table are rejected (400).

ParameterTypeSupported valuesDescription
modelrequiredstringseedance-2.0-mini-4or seedance-2.0-miniMã gói sản phẩm trực tiếp hoặc mã dòng model chuẩn (kết hợp cùng tham số chọn SV bên dưới).
serverstringsv18autoChốt máy chủ SV chạy đơn (cũng nhận alias server_id) hoặc auto để tự chọn SV healthy giá tốt nhất. Kiểm tra SV sống qua GET /v1/models/seedance-2.0-mini/servers.
promptrequiredstring

Up to 100.000 characters

Video description
image_urlsstring[] (URL image)

Up to 9 files

Reference images / Frames (optional, max 9 images)
image_modeenum
referencefirst_framefirst_last

Default: reference

Image usage mode
video_urlsstring[] (URL video)

Up to 3 files

Video tham chiếu (tuỳ chọn, tối đa 3 · tổng ≤ 15s) — Tổng thời lượng các video tối đa 15 giây (Seedance 2.5 không kèm âm thanh tham chiếu: tới 30 giây)
audio_file_urlsstring[] (URL audio)

Up to 3 files

Âm thanh tham chiếu (tuỳ chọn, tối đa 3 · tổng ≤ 15s) — Mỗi file ít nhất 2 giây, tổng thời lượng tối đa 15 giây; cần kèm ít nhất 1 ảnh hoặc video tham chiếu
resolutionrequiredenum
480p720p4k-upscale

Default: 480p

Quality
durationrequiredenum
456789101112131415

Default: 4

Duration
aspect_ratioenum
9:1616:91:14:33:421:9auto

Default: 9:16

Aspect ratio
audioboolean

true, false

Default: true

Auto-generate audio
  • File parameters (string URL) accept a public http(s) link — the server downloads it — or a URL returned by the file upload API POST /account/ai/uploads.
  • Element order in array image_urls ([url_1, url_2, url_3]) is strictly mapped 1-to-1 by the system in exact order: Image 1 / FIRST image, Image 2 / SECOND image, Image 3 / THIRD image. When uploading local files via POST /account/ai/uploads, upload them sequentially in exact [1, 2, 3] order so the URL array stays aligned.
  • Bỏ trống tham số không bắt buộc thì dùng giá trị mặc định. Có thể gửi thêm header Idempotency-Key để thử lại an toàn không trừ tiền 2 lần.

Sample request (cURL)

curl -X POST https://promptflow.web.id/api/v1/generations \
  -H "X-API-Key: $API_KEY" -H "Content-Type: application/json" \
  -d '{
  "model": "seedance-2.0-mini",
  "server": "sv18",
  "prompt": "Keep the pose and composition of Image 1, swap in the outfit from Image 2, and use the face from Image 3.",
  "image_mode": "reference",
  "resolution": "480p",
  "duration": "4",
  "aspect_ratio": "9:16",
  "audio": true
}'

Complete integration code sample (Upload file → Create job → Poll result)

Python 3

import os, time, requests

BASE = "https://promptflow.web.id/api"
API_KEY = os.environ["API_KEY"]  # lấy tại trang /api-keys
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 với đúng thứ tự mảng image_urls [1, 2, 3]
payload = {
    "model": "seedance-2.0-mini",
    "server": "sv18",
    "prompt": "Keep the pose and composition of Image 1, swap in the outfit from Image 2, and use the face from Image 3.",
    "image_mode": "reference",
    "resolution": "480p",
    "duration": "4",
    "aspect_ratio": "9:16",
    "audio": True
}
payload["image_urls"] = image_urls

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://promptflow.web.id/api";
const API_KEY = process.env.API_KEY; // lấy tại trang /api-keys

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.0-mini",
  "server": "sv18",
  "prompt": "Keep the pose and composition of Image 1, swap in the outfit from Image 2, and use the face from Image 3.",
  "image_mode": "reference",
  "resolution": "480p",
  "duration": "4",
  "aspect_ratio": "9:16",
  "audio": true
},
    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 — response

Jobs run asynchronously. POST /v1/generations immediately returns a generation object with status queued or processing; poll GET /v1/generations/{id} every 5–10 seconds until status is succeeded, failed or cancelled.

GET/v1/generations/{id}
{
  "id": "3f1c...-uuid",
  "object": "generation",
  "code": "T8KQ2M4X",
  "model": "seedance-2.0-mini-4",
  "canonical_model": "seedance-2.0-mini",
  "server_id": "sv18",
  "server_name": "SV18",
  "status": "succeeded",       // queued | processing | succeeded | failed | cancelled
  "progress": 100,
  "cost": 2400,                // amount charged
  "currency": "VND",
  "refunded": false,
  "output": {
    "type": "video",
    "files": [{ "url": "https://promptflow.web.id/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"
}
FieldMeaning
model / server_idĐúng mã gói sản phẩm và máy chủ SV đã thực thi tác vụ.
output.files[].urlResult file links — download them to your own system; files on our server may be cleaned up after some time.
output.textText content (only for models that return text).
costAmount in VND charged to your balance; refunded automatically on failure or cancellation (refunded = true).
errorError reason when status = failed.

Get a quote before running

POST/v1/generations/estimate

Cùng body với POST /v1/generations, không chạy và không trừ tiền (tự áp % chiết khấu riêng nếu tài khoản có).

# => {
#   "object": "estimate",
#   "model": "seedance-2.0-mini-4",
#   "canonical_model": "seedance-2.0-mini",
#   "server_id": "sv18",
#   "server_name": "SV18",
#   "cost": 2400,
#   "currency": "VND"
# }
Get an API key
seedance-2.0-mini-4 · API docs | PromptFlow AI