resources/videos/methods/extend/index.md +0 −165 deleted
File Deleted View Diff
1## Create an extension of a completed video.
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`
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`
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 - `expires_at: number`
62
63 Unix timestamp (seconds) for when the downloadable assets expire, if set.
64
65 - `model: VideoModel`
66
67 The video generation model that produced the job.
68
69 - `string`
70
71 - `"sora-2" or "sora-2-pro" or "sora-2-2025-10-06" or 2 more`
72
73 - `"sora-2"`
74
75 - `"sora-2-pro"`
76
77 - `"sora-2-2025-10-06"`
78
79 - `"sora-2-pro-2025-10-06"`
80
81 - `"sora-2-2025-12-08"`
82
83 - `object: "video"`
84
85 The object type, which is always `video`.
86
87 - `"video"`
88
89 - `progress: number`
90
91 Approximate completion percentage for the generation task.
92
93 - `prompt: string`
94
95 The prompt that was used to generate the video.
96
97 - `remixed_from_video_id: string`
98
99 Identifier of the source video if this video is a remix.
100
101 - `seconds: string`
102
103 Duration of the generated clip in seconds. For extensions, this is the stitched total duration.
104
105 - `size: VideoSize`
106
107 The resolution of the generated video.
108
109 - `"720x1280"`
110
111 - `"1280x720"`
112
113 - `"1024x1792"`
114
115 - `"1792x1024"`
116
117 - `status: "queued" or "in_progress" or "completed" or "failed"`
118
119 Current lifecycle status of the video job.
120
121 - `"queued"`
122
123 - `"in_progress"`
124
125 - `"completed"`
126
127 - `"failed"`
128
129### Example
130
131```http
132curl https://api.openai.com/v1/videos/extensions \
133 -H 'Content-Type: application/json' \
134 -H "Authorization: Bearer $OPENAI_API_KEY" \
135 -d '{
136 "prompt": "x",
137 "seconds": "4",
138 "video": {
139 "id": "video_123"
140 }
141 }'
142```
143
144#### Response
145
146```json
147{
148 "id": "id",
149 "completed_at": 0,
150 "created_at": 0,
151 "error": {
152 "code": "code",
153 "message": "message"
154 },
155 "expires_at": 0,
156 "model": "string",
157 "object": "video",
158 "progress": 0,
159 "prompt": "prompt",
160 "remixed_from_video_id": "remixed_from_video_id",
161 "seconds": "seconds",
162 "size": "720x1280",
163 "status": "queued"
164}
165```