motion-v3-video-bg-10s
Motion Control Nền Video V3 Plus - Tối đa 10s — Cụm GPU Plus V3 mới: Thay nhân vật giữ nguyên nền & âm thanh video gốc, chống lệch màu giữa các đoạn và chống tua nhanh (720p 30fps, tối đa 10 giây).
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).
Input — tham số đầu vào
/v1/generationsGửi JSON gồm "model": "motion-v3-video-bg-10s" 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ểu | Giá trị hỗ trợ | Mô tả |
|---|---|---|---|
modelrequired | string | motion-v3-video-bg-10s | Mã model |
image_urlrequired | string (URL image) | Ảnh nhân vật thay thế — Ảnh nhân vật muốn ghép vào video (JPG, PNG, WEBP) | |
video_urlrequired | string (URL video) | Video gốc giữ nền (Tối đa 10 giây) — Video gốc cần thay nhân vật (MP4, MOV, WEBM) · giữ nguyên bối cảnh, ánh sáng & âm thanh · tối đa 10s |
- 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.
- 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://zova.io.vn/api/v1/generations \
-H "X-API-Key: $API_KEY" -H "Content-Type: application/json" \
-d '{
"model": "motion-v3-video-bg-10s",
"image_url": "https://example.com/image.jpg",
"video_url": "https://example.com/video.mp4"
}'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://zova.io.vn/api"
API_KEY = os.environ["API_KEY"]
HEADERS = {"X-API-Key": API_KEY}
with open("./input.jpg", "rb") as f:
up = requests.post(f"{BASE}/account/ai/uploads", headers=HEADERS, files={"file": f}, timeout=120).json()
payload = {
"model": "motion-v3-video-bg-10s",
"image_url": "https://example.com/image.jpg",
"video_url": "https://example.com/video.mp4"
}
payload["image_url"] = up["url"]
gen = requests.post(f"{BASE}/v1/generations", headers=HEADERS, json=payload, timeout=60).json()
while gen.get("status") in ("queued", "processing"):
time.sleep(5)
gen = requests.get(f"{BASE}/v1/generations/{gen['id']}", headers=HEADERS, timeout=60).json()
if gen.get("status") != "succeeded":
raise RuntimeError(gen.get("error") or gen.get("status"))
print("Kết quả:", [f["url"] for f in gen["output"]["files"]])Node.js (18+)
const BASE = "https://zova.io.vn/api";
const headers = { "X-API-Key": process.env.API_KEY, "Content-Type": "application/json" };
let gen = await fetch(`${BASE}/v1/generations`, {
method: "POST",
headers,
body: JSON.stringify({
"model": "motion-v3-video-bg-10s",
"image_url": "https://example.com/image.jpg",
"video_url": "https://example.com/video.mp4"
}),
}).then((r) => r.json());
while (["queued", "processing"].includes(gen.status)) {
await new Promise((r) => setTimeout(r, 5000));
gen = await fetch(`${BASE}/v1/generations/${gen.id}`, { headers }).then((r) => r.json());
}
if (gen.status !== "succeeded") throw new Error(gen.error ?? gen.status);
console.log("Kết quả:", gen.output);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.
/v1/generations/{id}{
"id": "3f1c...-uuid",
"object": "generation",
"code": "T8KQ2M4X",
"model": "motion-v3-video-bg-10s",
"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://zova.io.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[].url | Link 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.text | Nội dung văn bản (chỉ có với model trả văn bản). |
| cost | Số tiền VND đã trừ vào số dư; lỗi hoặc huỷ thì tự hoàn lại (refunded = true). |
| error | Lý do lỗi khi status = failed. |
Báo giá trước khi chạy
/v1/generations/estimateCùng body với POST /v1/generations, không chạy và không trừ tiền.
# => { "object": "estimate", "model": "motion-v3-video-bg-10s", "cost": 2400, "currency": "VND" }