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