Omni
Retrieve an Omni video
Retrieve a beta Omni video task by task ID, including status, progress, timestamps, and the completed video URL.
GET
/
v1
/
videos
/
{task_id}
cURL
curl https://api.cometapi.com/v1/videos/<TASK_ID> \
-H "Authorization: Bearer $COMETAPI_KEY"import os
import time
import requests
TASK_ID = "<TASK_ID>"
headers = {"Authorization": "Bearer " + os.environ["COMETAPI_KEY"]}
terminal_statuses = {"completed", "failed"}
while True:
response = requests.get(
f"https://api.cometapi.com/v1/videos/{TASK_ID}",
headers=headers,
timeout=60,
)
response.raise_for_status()
task = response.json()
print(task["status"], task.get("progress"))
if task["status"] in terminal_statuses:
print(task.get("video_url"))
break
time.sleep(10)const TASK_ID = "<TASK_ID>";
const terminalStatuses = new Set(["completed", "failed"]);
while (true) {
const response = await fetch(
`https://api.cometapi.com/v1/videos/${TASK_ID}`,
{ headers: { Authorization: `Bearer ${process.env.COMETAPI_KEY}` } },
);
const task = await response.json();
console.log(task.status, task.progress);
if (terminalStatuses.has(task.status)) {
console.log(task.video_url);
break;
}
await new Promise((resolve) => setTimeout(resolve, 10_000));
}<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.cometapi.com/v1/videos/{task_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.cometapi.com/v1/videos/{task_id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.cometapi.com/v1/videos/{task_id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.cometapi.com/v1/videos/{task_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"id": "task_example",
"model": "omni-fast",
"object": "video",
"status": "queued",
"progress": 0,
"created_at": 1779938152
}
Use this endpoint after you create a beta Omni video task. It returns the task state and includes
video_url after the task is completed.
Status: Beta
Check these fields
statustells you whether the task isqueued,in_progress,completed, orfailed.progressis a coarse completion percentage.video_urlappears on completed responses.errorappears when a task fails.
Polling flow
1
Create the task first
Start with Create an Omni video and store the returned
id.2
Poll by task ID
Send the task ID to this endpoint until
status reaches completed or failed.3
Download the MP4 file
When
status is completed, call Retrieve Omni video content.Response
Omni video task state.
Last modified on August 10, 2026
⌘I
cURL
curl https://api.cometapi.com/v1/videos/<TASK_ID> \
-H "Authorization: Bearer $COMETAPI_KEY"import os
import time
import requests
TASK_ID = "<TASK_ID>"
headers = {"Authorization": "Bearer " + os.environ["COMETAPI_KEY"]}
terminal_statuses = {"completed", "failed"}
while True:
response = requests.get(
f"https://api.cometapi.com/v1/videos/{TASK_ID}",
headers=headers,
timeout=60,
)
response.raise_for_status()
task = response.json()
print(task["status"], task.get("progress"))
if task["status"] in terminal_statuses:
print(task.get("video_url"))
break
time.sleep(10)const TASK_ID = "<TASK_ID>";
const terminalStatuses = new Set(["completed", "failed"]);
while (true) {
const response = await fetch(
`https://api.cometapi.com/v1/videos/${TASK_ID}`,
{ headers: { Authorization: `Bearer ${process.env.COMETAPI_KEY}` } },
);
const task = await response.json();
console.log(task.status, task.progress);
if (terminalStatuses.has(task.status)) {
console.log(task.video_url);
break;
}
await new Promise((resolve) => setTimeout(resolve, 10_000));
}<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.cometapi.com/v1/videos/{task_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.cometapi.com/v1/videos/{task_id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.cometapi.com/v1/videos/{task_id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.cometapi.com/v1/videos/{task_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"id": "task_example",
"model": "omni-fast",
"object": "video",
"status": "queued",
"progress": 0,
"created_at": 1779938152
}