grok-imagine-video-1.0
Grok Imagine Video 1.0 · 720p — Fast AI video generation with vivid motion using Grok Imagine Video 1.0 · 720p — closely follows action and scene descriptions, flexible duration 6s – 15s, quality 480p – 1080p (480p, 720p, 1080p), smooth interpolation from first & last frame pairs, supports up to 5 reference images for consistent character/scene, multiple aspect ratios (16:9, 9:16, 1:1, 4:3, 3:4...), no prompt character limit.
grok-imagine-video-1.0GET /api/v1/models/grok-imagine-video-1.0/serversBả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).
| Resolution | 6s | 8s | 10s | 15s |
|---|---|---|---|---|
| 480p | 249đ | 249đ | 249đ | 249đ |
| 720p | 249đ | 249đ | 249đ | 249đ |
| 4K | 493đ | 573đ | 654đ | 857đ |
Input — request parameters
/v1/generationsGửi JSON theo cấu trúc chuẩn "model": "grok-imagine-video-1.0", "server": "sv9" and the parameters below at the same level. Parameters not listed in the table are rejected (400).
| Parameter | Type | Supported values | Description |
|---|---|---|---|
modelrequired | string | grok-imagine-video-1.0 | Mã 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). |
server | string | sv9auto | Chố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/grok-imagine-video-1.0/servers. |
moderequired | enum | 10:t2v10:i2v10:ref | Mode |
image_urlsrequired | string[] (URL image) | Up to 5 files | Ảnh tham chiếu (tối đa 5) — Gọi trong mô tả là <IMAGE_0>, <IMAGE_1>… theo thứ tự (hoặc Ảnh 1, Ảnh 2…). Video theo ảnh tham chiếu hỗ trợ tối đa 720p. Only applies when |
image_urlrequired | string (URL image) | Ảnh khung đầu — Tải ảnh khung hình bắt đầu để biến ảnh tĩnh thành video chuyển động Only applies when | |
last_frame_url | string (URL image) | Ảnh khung cuối (tuỳ chọn) — Chốt khung hình cuối (không bắt buộc; khi dùng Khung cuối độ phân giải tối đa là 720p) Only applies when | |
promptrequired | string | Scene & motion prompt | |
aspect_ratiorequired | enum | Options change based on 15:t2v:16:99:161:14:33:43:22:3 lite:t2v:16:99:161:14:33:43:22:3 10:t2v:16:99:161:14:33:43:22:3 15:i2v:auto16:99:161:14:33:43:22:3 lite:i2v:auto16:99:161:14:33:43:22:3 10:i2v:auto16:99:161:14:33:43:22:3 15:ref:16:99:161:1 lite:ref:16:99:161:1 10:ref:16:99:161:1 | Aspect ratio |
durationrequired | enum | 681015 Default: | Duration |
resolutionrequired | enum | Options change based on 15:t2v:480p720p1080p4k-upscale 15:i2v:480p720p1080p4k-upscale lite:t2v:480p720p1080p4k-upscale lite:i2v:480p720p1080p4k-upscale 15:ref:480p720p4k-upscale lite:ref:480p720p4k-upscale 10:t2v:480p720p4k-upscale 10:i2v:480p720p4k-upscale 10:ref:480p720p4k-upscale Default: | Resolution |
- 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.
- 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": "grok-imagine-video-1.0",
"server": "sv9",
"mode": "10:t2v",
"prompt": "An astronaut cat",
"duration": "6",
"aspect_ratio": "16:9",
"resolution": "720p"
}'Complete integration code sample (Upload file → Create job → Poll result)
Python 3
import os, time, requests
BASE = "https://promptflow.web.id/api"
HEADERS = {"X-API-Key": os.environ["API_KEY"]}
r = requests.post(f"{BASE}/v1/generations", headers=HEADERS, json={
"model": "grok-imagine-video-1.0",
"server": "sv9",
"mode": "10:t2v",
"prompt": "An astronaut cat",
"duration": "6",
"aspect_ratio": "16:9",
"resolution": "720p"
}, timeout=60)
gen = r.json()
if not r.ok:
raise RuntimeError(gen.get("message") or r.text)
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ả:", gen["output"])Node.js (18+)
const BASE = "https://promptflow.web.id/api";
const headers = { "X-API-Key": process.env.API_KEY, "Content-Type": "application/json" };
const createRes = await fetch(`${BASE}/v1/generations`, {
method: "POST",
headers,
body: JSON.stringify({
"model": "grok-imagine-video-1.0",
"server": "sv9",
"mode": "10:t2v",
"prompt": "An astronaut cat",
"duration": "6",
"aspect_ratio": "16:9",
"resolution": "720p"
}),
});
let gen = await createRes.json();
if (!createRes.ok) throw new Error(gen.message || createRes.statusText);
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 — 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.
/v1/generations/{id}{
"id": "3f1c...-uuid",
"object": "generation",
"code": "T8KQ2M4X",
"model": "grok-imagine-video-1.0",
"canonical_model": "grok-imagine-video-1.0",
"server_id": "sv9",
"server_name": "SV9",
"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"
}| Field | Meaning |
|---|---|
| model / server_id | Đúng mã gói sản phẩm và máy chủ SV đã thực thi tác vụ. |
| output.files[].url | Result file links — download them to your own system; files on our server may be cleaned up after some time. |
| output.text | Text content (only for models that return text). |
| cost | Amount in VND charged to your balance; refunded automatically on failure or cancellation (refunded = true). |
| error | Error reason when status = failed. |
Get a quote before running
/v1/generations/estimateCù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": "grok-imagine-video-1.0",
# "canonical_model": "grok-imagine-video-1.0",
# "server_id": "sv9",
# "server_name": "SV9",
# "cost": 2400,
# "currency": "VND"
# }