Skip to main content

Documentation Index

Fetch the complete documentation index at: https://apidoc.cometapi.com/llms.txt

Use this file to discover all available pages before exploring further.

Use CometAPI video model docs by choosing the provider workflow that matches your job type. Most video endpoints create asynchronous tasks, so save the task ID and use polling or webhooks to retrieve results.

Choose a video API

GoalStart here
Create Sora video jobsCreate video
Query Sora video jobsRetrieve video
Generate Runway videosImage to Video
Generate Kling videosText to Video
Create Seedance videosCreate
Generate xAI video jobsVideo Generation

Create a video task

The following example submits a video generation task with multipart form data:
curl https://api.cometapi.com/v1/videos \
  -H "Authorization: Bearer $COMETAPI_KEY" \
  -F "model=doubao-seedance-2-0" \
  -F "prompt=A calm camera move across a desk with a paper airplane" \
  -F "seconds=4" \
  -F "size=1280x720"
The response returns an ID that your app should store:
{
  "id": "task_example",
  "task_id": "task_example",
  "object": "video",
  "model": "doubao-seedance-2-0",
  "status": "queued",
  "progress": 0,
  "created_at": 1779872000
}

Poll for the result

The following example polls a video task by ID:
curl https://api.cometapi.com/v1/videos/task_example \
  -H "Authorization: Bearer $COMETAPI_KEY"
The response shows whether the task is still running or complete:
{
  "id": "task_example",
  "object": "video",
  "model": "doubao-seedance-2-0",
  "status": "completed",
  "progress": 100,
  "completed_at": 1779872300,
  "video_url": "<generated-video-url>"
}

Common errors

ErrorFix
Missing task IDStore the ID from the create response before returning from your job handler.
Polling too fastAdd delay and backoff between status checks.
Unsupported duration or sizeUse values accepted by the selected video endpoint.
Callback not receivedKeep polling as a fallback and verify that your callback URL accepts POST requests.
Last updated: May 27, 2026