Tài liệu API

motion-photo-bg-20s

Motion Control Nền Ảnh 720p - Tối đa 20s — Sao chép chuyển động thực tế 1:1 từ video gốc sang nhân vật trong ảnh (giữ nguyên bối cảnh ảnh). Chất lượng 720p 30fps mượt mà, đồng bộ tự động đúng thời lượng video đầu vào (tối đa 20 giây) kèm nguyên bản âm thanh.

type: textoutput: 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": "motion-photo-bg-20s" 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ả
modelrequiredstringmotion-photo-bg-20sMã model
image_urlrequiredstring (URL image)
Ảnh nhân vật tham chiếu — Tải lên ảnh rõ khuôn mặt & dáng nhân vật (JPG, PNG, WEBP) · giữ nguyên bối cảnh ảnh
video_urlrequiredstring (URL video)
Video chuyển động gốc (Tối đa 20 giây) — Video hành động / nhảy múa mẫu (MP4, MOV, WEBM) · tự động đồng bộ đúng thời lượng gốc (tối đa 20s) kèm nguyên bản âm thanh
textstring

Tối đa 5.000 ký tự

Mặc định: Cinematic photorealistic raw candid video of the exact person in reference image, natural gentle expression, soft natural lips and clean white teeth, perfectly formed anatomically correct hands, ultra-detailed natural skin pores, realistic fluid human dance motion, natural lighting, 8k uhd, masterpiece, highly detailed face, no distortion, no plastic skin, no artificial noise.

Prompt mô tả nhân vật & bối cảnh (Có thể giữ mặc định) — Nếu xoá trống, hệ thống tự động dùng prompt chuẩn nét tự nhiên mặc định
  • 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 -X POST https://nov.ai.vn/api/v1/generations \
  -H "X-API-Key: $API_KEY" -H "Content-Type: application/json" \
  -d '{
  "model": "motion-photo-bg-20s",
  "image_url": "https://example.com/image.jpg",
  "video_url": "https://example.com/video.mp4",
  "text": "Cinematic photorealistic raw candid video of the exact person in reference image, natural gentle expression, soft natural lips and clean white teeth, perfectly formed anatomically correct hands, ultra-detailed natural skin pores, realistic fluid human dance motion, natural lighting, 8k uhd, masterpiece, highly detailed face, no distortion, no plastic skin, no artificial noise."
}'

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": "motion-photo-bg-20s",
  "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": "motion-photo-bg-20s", "cost": 2400, "currency": "VND" }
Lấy API key