Skip to main content
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 to retrieve results. Add callbacks only when the model-specific page documents callback support.

Choose a video API

Seedance create

Create Seedance video tasks.

Create a HappyHorse video

Create HappyHorse text-to-video jobs.

Create Sora video

Create Sora video jobs.

Retrieve Sora video

Query Sora video jobs.

Veo async video generation

Create Veo video jobs.

Create a Wan video

Create Wan text-to-video jobs.

xAI video generation

Generate xAI video jobs.

Create a Vidu video

Create Vidu text-to-video jobs.

Create an Omni video (Beta)

Create beta Omni video jobs.

Kling text to video

Generate Kling videos from text prompts.

Runway image to video

Generate Runway videos from images.

Create and poll a video task

Use a video-capable model ID from the Models page or the model directory. The examples below create a video task with POST /v1/videos, then poll the returned task ID until the task reaches a terminal state.
These examples use the placeholder your-video-model-id. Replace it with an available video model ID from the Models page or model directory before you run the request.
Open Create and Query to use the API playgrounds and endpoint schemas.
import os
import time
import requests

headers = {"Authorization": "Bearer " + os.environ["COMETAPI_KEY"]}

create_response = requests.post(
    "https://api.cometapi.com/v1/videos",
    headers=headers,
    data={
        "model": "your-video-model-id",
        "prompt": "A calm camera move across a desk with a paper airplane",
    },
    timeout=30,
)
create_response.raise_for_status()
task = create_response.json()
task_id = task["id"]

terminal_statuses = {"completed", "failed", "error"}

while True:
    poll_response = requests.get(
        f"https://api.cometapi.com/v1/videos/{task_id}",
        headers=headers,
        timeout=30,
    )
    poll_response.raise_for_status()
    result = poll_response.json()
    print(result["status"], result.get("progress"))

    if result["status"] in terminal_statuses:
        print(result.get("video_url"))
        break

    time.sleep(10)

Response examples

A successful create response can look like this. Store the task ID before polling:
{
  "id": "task_example",
  "task_id": "task_example",
  "object": "video",
  "model": "your-video-model-id",
  "status": "queued",
  "progress": 0,
  "created_at": 1779872000
}
A successful polling response can look like this. Completed responses can include video_url; some provider formats use model-specific result fields or the video content route when that route is documented:
{
  "id": "task_example",
  "object": "video",
  "model": "your-video-model-id",
  "status": "completed",
  "progress": 100,
  "completed_at": 1779872300,
  "video_url": "https://example.com/generated-video.mp4"
}

Example model records

This example model catalog response shows the /api/models envelope and one video model record shape. It is not a complete model list.
cURL
curl https://api.cometapi.com/api/models
{
  "success": true,
  "page": 1,
  "page_size": 20,
  "total": 302,
  "data": [
    {
      "created": 1767529753,
      "id": "your-video-model-id",
      "code": "your-video-model-id",
      "provider": "ExampleProvider",
      "provider_code": "example",
      "name": "Example video model",
      "model_type": "video",
      "features": [
        "text-to-video"
      ],
      "endpoints": "{\n  \"seedance\": {\n    \"path\": \"/v1/videos\",\n    \"method\": \"POST\"\n  }\n}",
      "pricing": {
        "currency": "USD / M Tokens",
        "input": null,
        "output": null,
        "per_request": null,
        "per_second": 0.024
      }
    }
  ]
}

Common errors

Store the ID from the create response before returning from your job handler.
Add delay and backoff between status checks.
Use the duration and resolution fields documented for the selected video endpoint.
Treat video_url as optional and fall back to model-specific result fields or the content route when available.
Use polling as the source of truth and verify that your callback URL accepts POST requests.

Error codes and retry strategy

Do not retry until the prompt, files, duration, or size fields are fixed.
Do not retry until the API key is present and valid.
Check the task ID, base URL, path, and model ID before retrying.
Reduce upload size before retrying.
Retry with exponential backoff and reduce create or polling concurrency.
Retry task creation with backoff; keep polling existing tasks unless the task reaches a terminal error.

Pricing and model directory

Models page

Read how CometAPI exposes model IDs in the docs.

Model directory

Browse model availability and capabilities.

Pricing

Check pricing before you call a model.
Last modified on June 4, 2026