Branch #04 docs/api/04-video.md

06. Video Router (Kling / Runway / Luma / Wan)

Branch #04 — Sinh video bất đồng bộ cho marketing, truyền thông, chiến dịch quảng cáo.

Endpoints

POST
https://bizgpt.vn/wp-json/video/router/v1/generate

Tạo video từ prompt/image

Auth: Bearer

GET
https://bizgpt.vn/wp-json/video/router/v1/status?task_id={id}

Theo dõi tiến trình

Auth: Bearer

GET
https://bizgpt.vn/wp-json/video/router/v1/models

Catalog model video

Auth: Bearer

GET
https://bizgpt.vn/wp-json/video/router/v1/usage

Usage theo key/user

Auth: Bearer

GET
https://bizgpt.vn/wp-json/video/router/v1/logs

Lịch sử task

Auth: Bearer

Method Path Auth Mô tả
POST https://bizgpt.vn/wp-json/video/router/v1/generate Bearer Tạo video từ prompt/image
GET https://bizgpt.vn/wp-json/video/router/v1/status?task_id={id} Bearer Theo dõi tiến trình
GET https://bizgpt.vn/wp-json/video/router/v1/models Bearer Catalog model video
GET https://bizgpt.vn/wp-json/video/router/v1/usage Bearer Usage theo key/user
GET https://bizgpt.vn/wp-json/video/router/v1/logs Bearer Lịch sử task

Query Examples

POST Tạo video từ prompt/image
curl -X POST "https://bizgpt.vn/wp-json/video/router/v1/generate" -H "Authorization: Bearer biz-YOUR_KEY" -H "Content-Type: application/json" -d '{"prompt":"Product launch cinematic","duration":5}'
const res = await fetch('https://bizgpt.vn/wp-json/video/router/v1/generate', {
  method: 'POST',
  headers: {
    Authorization: 'Bearer biz-YOUR_KEY',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({"prompt":"Product launch cinematic","duration":5}),
});
const data = await res.json();
console.log(data);
import requests
url = "https://bizgpt.vn/wp-json/video/router/v1/generate"
headers = {'Authorization': 'Bearer biz-YOUR_KEY', 'Content-Type': 'application/json'}
payload = '{"prompt":"Product launch cinematic","duration":5}'
res = requests.request("POST", url, headers=headers, data=payload)
print(res.json())
GET Theo dõi tiến trình
curl -X GET "https://bizgpt.vn/wp-json/video/router/v1/status?task_id={id}" -H "Authorization: Bearer biz-YOUR_KEY"
const res = await fetch('https://bizgpt.vn/wp-json/video/router/v1/status?task_id={id}', {
  method: 'GET',
  headers: {
    Authorization: 'Bearer biz-YOUR_KEY',
  },
});
const data = await res.json();
console.log(data);
import requests
url = "https://bizgpt.vn/wp-json/video/router/v1/status?task_id={id}"
headers = {'Authorization': 'Bearer biz-YOUR_KEY'}
res = requests.get(url, headers=headers)
print(res.json())
GET Catalog model video
curl -X GET "https://bizgpt.vn/wp-json/video/router/v1/models" -H "Authorization: Bearer biz-YOUR_KEY"
const res = await fetch('https://bizgpt.vn/wp-json/video/router/v1/models', {
  method: 'GET',
  headers: {
    Authorization: 'Bearer biz-YOUR_KEY',
  },
});
const data = await res.json();
console.log(data);
import requests
url = "https://bizgpt.vn/wp-json/video/router/v1/models"
headers = {'Authorization': 'Bearer biz-YOUR_KEY'}
res = requests.get(url, headers=headers)
print(res.json())
GET Usage theo key/user
curl -X GET "https://bizgpt.vn/wp-json/video/router/v1/usage" -H "Authorization: Bearer biz-YOUR_KEY"
const res = await fetch('https://bizgpt.vn/wp-json/video/router/v1/usage', {
  method: 'GET',
  headers: {
    Authorization: 'Bearer biz-YOUR_KEY',
  },
});
const data = await res.json();
console.log(data);
import requests
url = "https://bizgpt.vn/wp-json/video/router/v1/usage"
headers = {'Authorization': 'Bearer biz-YOUR_KEY'}
res = requests.get(url, headers=headers)
print(res.json())
GET Lịch sử task
curl -X GET "https://bizgpt.vn/wp-json/video/router/v1/logs" -H "Authorization: Bearer biz-YOUR_KEY"
const res = await fetch('https://bizgpt.vn/wp-json/video/router/v1/logs', {
  method: 'GET',
  headers: {
    Authorization: 'Bearer biz-YOUR_KEY',
  },
});
const data = await res.json();
console.log(data);
import requests
url = "https://bizgpt.vn/wp-json/video/router/v1/logs"
headers = {'Authorization': 'Bearer biz-YOUR_KEY'}
res = requests.get(url, headers=headers)
print(res.json())

Use Cases

  • Sinh video quảng cáo ngắn cho social commerce.
  • Tạo video demo sản phẩm hàng loạt theo template.
  • Tự động hóa pipeline content video theo lịch.

Implementation Steps

  1. Submit tác vụ generate và nhận task_id.
  2. Poll status đến khi nhận completed URL.
  3. Lưu metadata video vào CRM/campaign để tái sử dụng.

Quick Start cURL

bash
curl -X POST https://bizgpt.vn/wp-json/video/router/v1/generate -H "Authorization: Bearer biz-YOUR_KEY" -H "Content-Type: application/json" -d "{\"prompt\":\"Product launch cinematic\",\"model\":\"kling-v2.6-pro\",\"duration\":5}"
Canonical Spec

docs/api/04-video.md

Notes for Public Deployment
  • Nên kiểm tra cost estimate và entitlement trước khi generate số lượng lớn.