ModelRover

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/json

zai/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

FieldTypeRequiredDescription
modelstringYeszai/cogvideox-3 or zhipu/cogvideox-3.
promptstringYesGeneration prompt.
image_urlstringNoStarting image URL for image-to-video; omit for text-to-video.
sizestringNoResolution and aspect ratio as widthxheight, e.g. 1920x1080 (default).
qualitystringNoquality (high quality, default) or speed (faster).
fpsintegerNoFrame rate; 24 or 30, defaults to 30.
with_audiobooleanNoWhether to generate synchronized audio; defaults to true.
durationintegerNoVideo duration in seconds; currently fixed at 5 seconds.
callback_urlstringNoPublic 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-2 and cogvideox-flash are legacy models; use cogvideox-3 for new integrations.
  • API keys for the zai and zhipu channels 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