Text-to-video and image-to-video generation. Because a render takes minutes, video is an asynchronous task: you submit a prompt, receive a task_id, poll until it finishes, then download the MP4. Available models include grok-imagine-video, grok-imagine-video-1.5 and the Multimedia group's Seedance / Wan 3.0 / Berry / MiniMax H3 families (see below) — see the model square for the full list and pricing.
1. POST a task → get task_id. 2. GET the task until status is SUCCESS → read result_url. 3. GET the content URL → download video/mp4.
curl https://cn.chatapi.app/v1/video/generations \
-H "Authorization: Bearer sk-xxxxxxxx" \
-H "Content-Type: application/json" \
-d '{
"model": "grok-imagine-video",
"prompt": "A golden retriever puppy running on grass, 4 seconds"
}'
import requests
base = "https://cn.chatapi.app"
key = "sk-xxxxxxxx"
headers = {"Authorization": f"Bearer {key}"}
resp = requests.post(
f"{base}/v1/video/generations",
headers=headers,
json={
"model": "grok-imagine-video",
"prompt": "A golden retriever puppy running on grass, 4 seconds",
},
)
task_id = resp.json()["task_id"]
print(task_id)
The response returns immediately with a queued task:
{
"id": "task_UrufFh4Ww57Q6XWZ7trGZJajiHGw88Md",
"task_id": "task_UrufFh4Ww57Q6XWZ7trGZJajiHGw88Md",
"object": "video",
"model": "grok-imagine-video",
"status": "queued",
"progress": 0
}
| Parameter | Type | Notes |
|---|---|---|
model | string | Required. Video model name, e.g. grok-imagine-video |
prompt | string | Required. Text description of the video |
image | string | Optional. Image URL or base64 for image-to-video (model dependent) |
Poll every 5–10 seconds. status moves through queued → IN_PROGRESS → SUCCESS (or FAILURE). When it reaches SUCCESS, the response carries result_url.
curl https://cn.chatapi.app/v1/video/generations/task_UrufFh4Ww57Q6XWZ7trGZJajiHGw88Md \
-H "Authorization: Bearer sk-xxxxxxxx"
Completed response (trimmed):
{
"code": "success",
"data": {
"task_id": "task_UrufFh4Ww57Q6XWZ7trGZJajiHGw88Md",
"status": "SUCCESS",
"progress": "100%",
"result_url": "https://cn.chatapi.app/v1/videos/task_UrufFh4Ww57Q6XWZ7trGZJajiHGw88Md/content"
}
}
Fetch the result_url (or build the content URL from the task_id) to download the rendered video/mp4.
curl -L https://cn.chatapi.app/v1/videos/task_UrufFh4Ww57Q6XWZ7trGZJajiHGw88Md/content \
-H "Authorization: Bearer sk-xxxxxxxx" \
-o output.mp4
import time, requests
base = "https://cn.chatapi.app"
headers = {"Authorization": "Bearer sk-xxxxxxxx"}
# 1. submit
task_id = requests.post(
f"{base}/v1/video/generations", headers=headers,
json={"model": "grok-imagine-video",
"prompt": "A puppy running on grass, 4 seconds"},
).json()["task_id"]
# 2. poll
while True:
data = requests.get(f"{base}/v1/video/generations/{task_id}", headers=headers).json()["data"]
if data["status"] == "SUCCESS":
break
if data["status"] == "FAILURE":
raise RuntimeError(data.get("fail_reason"))
time.sleep(8)
# 3. download
mp4 = requests.get(data["result_url"], headers=headers).content
open("output.mp4", "wb").write(mp4)
Third-party unreviewed pool (NSFW allowed, minors strictly prohibited); callable from keys routed to the Multimedia vendor or in "all models" mode. OpenAI Video API: POST /v1/videos to submit → poll GET /v1/videos/{id} until completed → download the MP4 from GET /v1/videos/{id}/content (kept 7 days). Usually 1–5 minutes. Billed per second by resolution, with a per-run minimum charge. Each mode of a series is a separate model name (e.g. seedance-2.0-text-to-video / seedance-2.0-image-to-video).
| Model / mode | Duration | Price (USD/s by resolution) | Min. charge |
|---|---|---|---|
berry-1.0-image-to-videoImage to video · needs first frame image | 2–30 s | 480p $0.096 · 720p $0.192 · 1080p $0.384 | $0.192 |
berry-1.0-pro-image-to-videoImage to video · needs first frame image | 2–30 s | 1080p $0.346 · 2k $0.384 · 4k $0.442 | $0.691 |
berry-1.0-pro-reference-to-videoReference to video | 2–30 s | 1080p $0.346 · 2k $0.384 · 4k $0.442 | $0.691 |
berry-1.0-pro-text-to-videoText to video | 2–30 s | 1080p $0.346 · 2k $0.384 · 4k $0.442 | $0.691 |
berry-1.0-pro-turbo-image-to-videoImage to video · needs first frame image | 2–30 s | 1080p $0.499 · 2k $0.538 · 4k $0.595 | $0.998 |
berry-1.0-pro-turbo-reference-to-videoReference to video | 2–30 s | 1080p $0.499 · 2k $0.538 · 4k $0.595 | $0.998 |
berry-1.0-pro-turbo-text-to-videoText to video | 2–30 s | 1080p $0.499 · 2k $0.538 · 4k $0.595 | $0.998 |
berry-1.0-reference-to-videoReference to video | 2–30 s | 480p $0.096 · 720p $0.192 · 1080p $0.384 | $0.192 |
berry-1.0-text-to-videoText to video | 2–30 s | 480p $0.096 · 720p $0.192 · 1080p $0.384 | $0.192 |
berry-1.0-turbo-image-to-videoImage to video · needs first frame image | 2–30 s | 480p $0.131 · 720p $0.269 · 1080p $0.538 | $0.261 |
berry-1.0-turbo-reference-to-videoReference to video | 2–30 s | 480p $0.131 · 720p $0.269 · 1080p $0.538 | $0.261 |
berry-1.0-turbo-text-to-videoText to video | 2–30 s | 480p $0.131 · 720p $0.269 · 1080p $0.538 | $0.261 |
minimax-h3 | 5–15 s | 480p $0.026 · 768p $0.038 · 1080p $0.051 · 2k $0.064 · 4k $0.128 | $0.128 |
seedance-2.0-fast-image-to-videoImage to video · needs first frame image | 4–15 s | 480p $0.068 · 720p $0.145 | $0.271 |
seedance-2.0-fast-reference-to-videoReference to video | 4–15 s | 480p $0.068 · 720p $0.145 | $0.271 |
seedance-2.0-fast-text-to-videoText to video | 4–15 s | 480p $0.068 · 720p $0.145 | $0.271 |
seedance-2.0-image-to-videoImage to video · needs first frame image | 4–15 s | 480p $0.179 · 720p $0.389 · 1080p $0.957 | $0.717 |
seedance-2.0-mini-image-to-videoImage to video · needs first frame image | 4–15 s | 480p $0.038 · 720p $0.077 | $0.154 |
seedance-2.0-mini-reference-to-videoReference to video | 4–15 s | 480p $0.038 · 720p $0.077 | $0.154 |
seedance-2.0-mini-text-to-videoText to video | 4–15 s | 480p $0.038 · 720p $0.077 | $0.154 |
seedance-2.0-reference-to-videoReference to video | 4–15 s | 480p $0.179 · 720p $0.389 · 1080p $0.957 | $0.717 |
seedance-2.0-text-to-videoText to video | 4–15 s | 480p $0.179 · 720p $0.389 · 1080p $0.957 | $0.717 |
seedance-2.5-draft-to-videoDraft to video · needs draft task metadata.draft_task_id | from reference | 1080p $1.456 | $5.822 |
seedance-2.5-image-to-videoImage to video · needs first frame image | 4–30 s | 480p $0.263 · 720p $0.592 · 1080p $1.456 | $1.053 |
seedance-2.5-reference-to-videoReference to video | 4–30 s | 480p $0.263 · 720p $0.592 · 1080p $1.456 | $1.053 |
seedance-2.5-text-to-videoText to video | 4–30 s | 480p $0.263 · 720p $0.592 · 1080p $1.456 | $1.053 |
seedance-2.5-video-to-videoVideo to video · needs reference videos metadata.reference_video_urls | from reference | 480p $0.263 · 720p $0.592 · 1080p $1.456 | $1.053 |
w3.0-image-to-videoImage to video · needs first frame image | 2–30 s | 480p $0.096 · 720p $0.192 · 1080p $0.384 | $0.192 |
w3.0-prime-image-to-videoImage to video · needs first frame image | 2–30 s | 480p $0.131 · 720p $0.269 · 1080p $0.538 | $0.261 |
w3.0-prime-pro-image-to-videoImage to video · needs first frame image | 2–30 s | 1080p $0.499 · 2k $0.538 · 4k $0.595 | $0.998 |
w3.0-prime-pro-reference-to-videoReference to video | 2–30 s | 1080p $0.499 · 2k $0.538 · 4k $0.595 | $0.998 |
w3.0-prime-pro-text-to-videoText to video | 2–30 s | 1080p $0.499 · 2k $0.538 · 4k $0.595 | $0.998 |
w3.0-prime-reference-to-videoReference to video | 2–30 s | 480p $0.131 · 720p $0.269 · 1080p $0.538 | $0.261 |
w3.0-prime-text-to-videoText to video | 2–30 s | 480p $0.131 · 720p $0.269 · 1080p $0.538 | $0.261 |
w3.0-pro-image-to-videoImage to video · needs first frame image | 2–30 s | 1080p $0.346 · 2k $0.384 · 4k $0.442 | $0.691 |
w3.0-pro-reference-to-videoReference to video | 2–30 s | 1080p $0.346 · 2k $0.384 · 4k $0.442 | $0.691 |
w3.0-pro-text-to-videoText to video | 2–30 s | 1080p $0.346 · 2k $0.384 · 4k $0.442 | $0.691 |
w3.0-reference-to-videoReference to video | 2–30 s | 480p $0.096 · 720p $0.192 · 1080p $0.384 | $0.192 |
w3.0-text-to-videoText to video | 2–30 s | 480p $0.096 · 720p $0.192 · 1080p $0.384 | $0.192 |
wan-2.2needs first frame image | 5–8 s | 480p $0.102 · 720p $0.205 | $0.512 |
wan-2.7needs first frame image | 2–15 s | 720p $0.333 · 1080p $0.512 | $0.666 |
wan-animateneeds first frame image, driving video metadata.video_url | from reference | 480p $0.102 · 720p $0.211 | $0.102 |
curl https://cn.chatapi.app/v1/videos \
-H "Authorization: Bearer sk-xxxxxxxx" \
-H "Content-Type: application/json" \
-d '{"model":"seedance-2.0-mini-text-to-video","prompt":"a paper boat drifting on a rainy street","seconds":"5","size":"480p","metadata":{"ratio":"16:9"}}'
# → {"id":"task_xxx","status":"queued",...}; poll GET /v1/videos/task_xxx, then download /v1/videos/task_xxx/content
seconds duration (clamped to the model's range); size resolution tier (480p / 720p / 1080p / 2k / 4k, or 1280x720; defaults to the lowest tier); image first frame (image-to-video), images references (reference-to-video) — https URLs or base64 data URIs. Optional metadata: ratio, seed, last_frame_url, reference_video_urls / reference_audio_urls, generate_audio.
Models with an audio track default to generate_audio=false. If you turn it on, the generated audio is moderated and explicit content may fail the whole task (refunded automatically).
All video models are billed per second: grok-imagine-video by resolution; the Multimedia group by resolution with a per-run minimum charge. Check the model square for current prices.