CogVideoX Video
Create text-to-video and image-to-video tasks with Z.AI and Zhipu CogVideoX.
Endpoint
POST /v1/videos/generations
Authorization: Bearer $API_KEY
Content-Type: application/jsonzai/cogvideox-3 and zhipu/cogvideox-3 share this endpoint; routing is determined by the model field. The upstream accepts the task immediately; poll via GET /v1/tasks/{taskId}.
Request body
| Field | Type | Required | Description |
|---|---|---|---|
model | string | Yes | zai/cogvideox-3 or zhipu/cogvideox-3. |
prompt | string | Yes | Generation prompt. |
image_url | string | No | Starting image URL for image-to-video; omit for text-to-video. |
size | string | No | Resolution and aspect ratio as widthxheight, e.g. 1920x1080 (default). |
quality | string | No | quality (high quality, default) or speed (faster). |
fps | integer | No | Frame rate; 24 or 30, defaults to 30. |
with_audio | boolean | No | Whether to generate synchronized audio; defaults to true. |
duration | integer | No | Video duration in seconds; currently fixed at 5 seconds. |
callback_url | string | No | Public terminal callback URL handled by the platform. |
Examples
curl "https://api.modelrover.ai/v1/videos/generations" \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "zai/cogvideox-3",
"prompt": "A cat chasing a butterfly across a sunlit meadow, slow motion",
"size": "1920x1080",
"quality": "quality",
"with_audio": true,
"callback_url": "https://example.com/hooks/video?token=unguessable"
}'Create response
{
"id": "9dcf8ab2-c4b7-42be-a516-597223897b99",
"model": "zai/cogvideox-3",
"task_status": "PROCESSING"
}id is rewritten to the platform task ID.
Task response
curl "https://api.modelrover.ai/v1/tasks/9dcf8ab2-c4b7-42be-a516-597223897b99" \
-H "Authorization: Bearer $API_KEY"{
"id": "9dcf8ab2-c4b7-42be-a516-597223897b99",
"model": "zai/cogvideox-3",
"task_status": "SUCCESS",
"video_result": [
{ "url": "https://cdn.z.ai/...", "cover_image_url": "https://cdn.z.ai/.../cover.jpg" }
]
}Task statuses are PROCESSING, SUCCESS, and FAIL. Video results are retained for 48 hours—download and transfer them immediately after completion.
The native query endpoint GET /v1/async-result/{taskId} returns the same platform snapshot as GET /v1/tasks/{taskId}.
Restrictions
cogvideox-2andcogvideox-flashare legacy models; usecogvideox-3for new integrations.- API keys for the
zaiandzhipuchannels come from their respective platforms and are not interchangeable. - Client routing and paid service-tier selections are rejected.
See Tasks and callbacks for polling, callback delivery, and task lifecycle.
Help us improve this page
Found something unclear, outdated, or incorrect?
Last updated on