resources/videos/methods/retrieve/index.md +0 −185 deleted
File Deleted View Diff
1> For the complete documentation index, see [llms.txt](/llms.txt). Markdown versions of documentation pages are available by appending `.md` to the page URL.
2
3## Retrieve a video
4
5**get** `/videos/{video_id}`
6
7Fetch the latest metadata for a generated video.
8
9### Path Parameters
10
11- `video_id: string`
12
13### Returns
14
15- `Video object { id, completed_at, created_at, 10 more }`
16
17 Structured information describing a generated video job.
18
19 - `id: string`
20
21 Unique identifier for the video job.
22
23 - `completed_at: number or null`
24
25 Unix timestamp (seconds) for when the job completed, if finished.
26
27 - `created_at: number`
28
29 Unix timestamp (seconds) for when the job was created.
30
31 - `error: VideoCreateError or null`
32
33 Error payload that explains why generation failed, if applicable.
34
35 - `code: string`
36
37 A machine-readable error code that was returned.
38
39 - `message: string`
40
41 A human-readable description of the error that was returned.
42
43 - `headers: optional map[string]`
44
45 The Retry-After and Retry-After-Ms headers returned with the original error, if any.
46
47 - `misalignment: optional object { detailed_explanation, error_type, steer }`
48
49 - `detailed_explanation: optional string`
50
51 The public explanation for this block.
52
53 - `error_type: optional string or "potentially_unintended_data_transfer" or "potentially_unintended_data_access" or "potentially_unintended_destructive_activity" or "other"`
54
55 An optional classification; clients must accept additional values.
56
57 - `string`
58
59 - `SafetyAlertErrorType = "potentially_unintended_data_transfer" or "potentially_unintended_data_access" or "potentially_unintended_destructive_activity" or "other"`
60
61 An optional classification; clients must accept additional values.
62
63 - `"potentially_unintended_data_transfer"`
64
65 - `"potentially_unintended_data_access"`
66
67 - `"potentially_unintended_destructive_activity"`
68
69 - `"other"`
70
71 - `steer: optional object { message }`
72
73 An optional public continuation instruction.
74
75 - `message: string`
76
77 The public continuation instruction.
78
79 - `expires_at: number or null`
80
81 Unix timestamp (seconds) for when the downloadable assets expire, if set.
82
83 - `model: VideoModel`
84
85 The video generation model that produced the job.
86
87 - `string`
88
89 - `"sora-2" or "sora-2-pro" or "sora-2-2025-10-06" or 2 more`
90
91 - `"sora-2"`
92
93 - `"sora-2-pro"`
94
95 - `"sora-2-2025-10-06"`
96
97 - `"sora-2-pro-2025-10-06"`
98
99 - `"sora-2-2025-12-08"`
100
101 - `object: "video"`
102
103 The object type, which is always `video`.
104
105 - `"video"`
106
107 - `progress: number`
108
109 Approximate completion percentage for the generation task.
110
111 - `prompt: string or null`
112
113 The prompt that was used to generate the video.
114
115 - `remixed_from_video_id: string or null`
116
117 Identifier of the source video if this video is a remix.
118
119 - `seconds: string`
120
121 Duration of the generated clip in seconds. For extensions, this is the stitched total duration.
122
123 - `size: VideoSize`
124
125 The resolution of the generated video.
126
127 - `"720x1280"`
128
129 - `"1280x720"`
130
131 - `"1024x1792"`
132
133 - `"1792x1024"`
134
135 - `status: "queued" or "in_progress" or "completed" or "failed"`
136
137 Current lifecycle status of the video job.
138
139 - `"queued"`
140
141 - `"in_progress"`
142
143 - `"completed"`
144
145 - `"failed"`
146
147### Example
148
149```http
150curl https://api.openai.com/v1/videos/$VIDEO_ID \
151 -H "Authorization: Bearer $OPENAI_API_KEY"
152```
153
154#### Response
155
156```json
157{
158 "id": "id",
159 "completed_at": 0,
160 "created_at": 0,
161 "error": {
162 "code": "code",
163 "message": "message",
164 "headers": {
165 "foo": "string"
166 },
167 "misalignment": {
168 "detailed_explanation": "detailed_explanation",
169 "error_type": "potentially_unintended_data_transfer",
170 "steer": {
171 "message": "message"
172 }
173 }
174 },
175 "expires_at": 0,
176 "model": "sora-2",
177 "object": "video",
178 "progress": 0,
179 "prompt": "prompt",
180 "remixed_from_video_id": "remixed_from_video_id",
181 "seconds": "string",
182 "size": "720x1280",
183 "status": "queued"
184}
185```