cli/resources/videos/methods/retrieve/index.md +0 −142 deleted
File Deleted View Diff
1## Retrieve video
2
3`$ openai videos retrieve`
4
5**get** `/videos/{video_id}`
6
7Fetch the latest metadata for a generated video.
8
9### Parameters
10
11- `--video-id: string`
12
13 The identifier of the video to retrieve.
14
15### Returns
16
17- `video: object { id, completed_at, created_at, 10 more }`
18
19 Structured information describing a generated video job.
20
21 - `id: string`
22
23 Unique identifier for the video job.
24
25 - `completed_at: number`
26
27 Unix timestamp (seconds) for when the job completed, if finished.
28
29 - `created_at: number`
30
31 Unix timestamp (seconds) for when the job was created.
32
33 - `error: object { code, message }`
34
35 Error payload that explains why generation failed, if applicable.
36
37 - `code: string`
38
39 A machine-readable error code that was returned.
40
41 - `message: string`
42
43 A human-readable description of the error that was returned.
44
45 - `expires_at: number`
46
47 Unix timestamp (seconds) for when the downloadable assets expire, if set.
48
49 - `model: string or "sora-2" or "sora-2-pro" or "sora-2-2025-10-06" or 2 more`
50
51 The video generation model that produced the job.
52
53 - `"sora-2"`
54
55 - `"sora-2-pro"`
56
57 - `"sora-2-2025-10-06"`
58
59 - `"sora-2-pro-2025-10-06"`
60
61 - `"sora-2-2025-12-08"`
62
63 - `object: "video"`
64
65 The object type, which is always `video`.
66
67 - `progress: number`
68
69 Approximate completion percentage for the generation task.
70
71 - `prompt: string`
72
73 The prompt that was used to generate the video.
74
75 - `remixed_from_video_id: string`
76
77 Identifier of the source video if this video is a remix.
78
79 - `seconds: string or VideoSeconds`
80
81 Duration of the generated clip in seconds. For extensions, this is the stitched total duration.
82
83 - `"4"`
84
85 - `"8"`
86
87 - `"12"`
88
89 - `size: "720x1280" or "1280x720" or "1024x1792" or "1792x1024"`
90
91 The resolution of the generated video.
92
93 - `"720x1280"`
94
95 - `"1280x720"`
96
97 - `"1024x1792"`
98
99 - `"1792x1024"`
100
101 - `status: "queued" or "in_progress" or "completed" or "failed"`
102
103 Current lifecycle status of the video job.
104
105 - `"queued"`
106
107 - `"in_progress"`
108
109 - `"completed"`
110
111 - `"failed"`
112
113### Example
114
115```cli
116openai videos retrieve \
117 --api-key 'My API Key' \
118 --video-id video_123
119```
120
121#### Response
122
123```json
124{
125 "id": "id",
126 "completed_at": 0,
127 "created_at": 0,
128 "error": {
129 "code": "code",
130 "message": "message"
131 },
132 "expires_at": 0,
133 "model": "string",
134 "object": "video",
135 "progress": 0,
136 "prompt": "prompt",
137 "remixed_from_video_id": "remixed_from_video_id",
138 "seconds": "string",
139 "size": "720x1280",
140 "status": "queued"
141}
142```