Create a video task
The following request creates a minimal video task and stores the returned ID. Add duration, resolution, or callback fields only when the selected model page documents those fields.Poll status
The following request checks the video task status:video_url when the model adapter has a result URL; otherwise use model-specific result fields or the /v1/videos/{id}/content content route when that model supports proxied downloads.
Receive a webhook
CometAPI does not define one universal callback payload for every video model. Treat callbacks as provider-specific pass-through events, store the raw body, and reconcile final state with polling. The following Express handler accepts a video callback and stores the event:Common errors
| Error | Fix |
|---|---|
| Lost callback | Poll by task ID until your app has stored a terminal state. |
| Duplicate callback | Make callback handling idempotent by task ID. |
| Callback rejected | Return a 2xx response quickly, then process the job in the background. |
| Provider-specific payload mismatch | Store the raw callback payload and normalize it in your app. |
Missing video_url | Treat video_url as optional and use polling plus model-specific result fields or /v1/videos/{id}/content when available. |