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