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