main
 1# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
 2
 3from typing import Optional
 4from typing_extensions import Literal
 5
 6from .._models import BaseModel
 7from .video_size import VideoSize
 8from .video_model import VideoModel
 9from .video_seconds import VideoSeconds
10from .video_create_error import VideoCreateError
11
12__all__ = ["Video"]
13
14
15class Video(BaseModel):
16    id: str
17    """Unique identifier for the video job."""
18
19    completed_at: Optional[int] = None
20    """Unix timestamp (seconds) for when the job completed, if finished."""
21
22    created_at: int
23    """Unix timestamp (seconds) for when the job was created."""
24
25    error: Optional[VideoCreateError] = None
26    """Error payload that explains why generation failed, if applicable."""
27
28    expires_at: Optional[int] = None
29    """Unix timestamp (seconds) for when the downloadable assets expire, if set."""
30
31    model: VideoModel
32    """The video generation model that produced the job."""
33
34    object: Literal["video"]
35    """The object type, which is always `video`."""
36
37    progress: int
38    """Approximate completion percentage for the generation task."""
39
40    prompt: Optional[str] = None
41    """The prompt that was used to generate the video."""
42
43    remixed_from_video_id: Optional[str] = None
44    """Identifier of the source video if this video is a remix."""
45
46    seconds: VideoSeconds
47    """Duration of the generated clip in seconds."""
48
49    size: VideoSize
50    """The resolution of the generated video."""
51
52    status: Literal["queued", "in_progress", "completed", "failed"]
53    """Current lifecycle status of the video job."""