Przejdź do głównej treści
GET
/
v1
/
videos
/
{video_id}
Retrieve a Sora video job
curl --request GET \
  --url https://api.cometapi.com/v1/videos/{video_id} \
  --header 'Authorization: Bearer <token>'
{
  "id": "video_69b25d5f467c81908733a56bc236b4df",
  "size": "1280x720",
  "error": null,
  "model": "sora-2",
  "object": "video",
  "prompt": "A paper airplane glides across a desk.",
  "status": "in_progress",
  "seconds": "4",
  "progress": 0,
  "created_at": 1773296991,
  "expires_at": null,
  "completed_at": null,
  "remixed_from_video_id": null
}
Użyj tego endpointu po uruchomieniu zadania Sora. Zwraca on bieżący stan zadania, skonfigurowany rozmiar i czas trwania oraz ewentualny błąd zwrócony przez dostawcę.

Obserwuj te pola

  • status dla stanu cyklu życia
  • progress jako przybliżony sygnał postępu
  • error, gdy dostawca odrzuci zadanie lub wystąpi błąd
  • expires_at po zakończeniu, jeśli chcesz wiedzieć, kiedy tymczasowe zasoby wygasną

Odpytuj aż do zakończenia

1

Najpierw utwórz lub zremiksuj wideo

Zacznij od Create Video lub Remix Video.
2

Odpytuj po id

Przekaż tutaj zwrócone id i sprawdzaj dalej, aż zadanie osiągnie stan completed lub failed.
3

Pobierz plik

Gdy zadanie ma status completed, przejdź do Retrieve Video Content.

Kształt odpowiedzi w CometAPI

Ten krok ściśle odpowiada workflow odpytywania Sora. CometAPI zachowuje kształt obiektu w stylu OpenAI, dzięki czemu możesz podłączyć sprawdzanie statusu przy minimalnej liczbie zmian.

Autoryzacje

Authorization
string
header
wymagane

Bearer token authentication. Use your CometAPI key.

Parametry ścieżki

video_id
string
wymagane

Video id returned by the create or remix endpoint.

Odpowiedź

200 - application/json

Current job state.

id
string
wymagane
size
string
wymagane
model
string
wymagane
object
string
wymagane
status
string
wymagane
seconds
string
wymagane
progress
integer
wymagane
created_at
integer
wymagane
error
object
prompt
string
expires_at
integer | null
completed_at
integer | null
remixed_from_video_id
string | null