python/resources/videos/methods/remix/index.md +0 −191 deleted
File Deleted View Diff
1## Remix video
2
3`videos.remix(strvideo_id, VideoRemixParams**kwargs) -> Video`
4
5**post** `/videos/{video_id}/remix`
6
7Create a remix of a completed video using a refreshed prompt.
8
9### Parameters
10
11- `video_id: str`
12
13- `prompt: str`
14
15 Updated text prompt that directs the remix generation.
16
17### Returns
18
19- `class Video: …`
20
21 Structured information describing a generated video job.
22
23 - `id: str`
24
25 Unique identifier for the video job.
26
27 - `completed_at: Optional[int]`
28
29 Unix timestamp (seconds) for when the job completed, if finished.
30
31 - `created_at: int`
32
33 Unix timestamp (seconds) for when the job was created.
34
35 - `error: Optional[VideoCreateError]`
36
37 Error payload that explains why generation failed, if applicable.
38
39 - `code: str`
40
41 A machine-readable error code that was returned.
42
43 - `message: str`
44
45 A human-readable description of the error that was returned.
46
47 - `expires_at: Optional[int]`
48
49 Unix timestamp (seconds) for when the downloadable assets expire, if set.
50
51 - `model: VideoModel`
52
53 The video generation model that produced the job.
54
55 - `str`
56
57 - `Literal["sora-2", "sora-2-pro", "sora-2-2025-10-06", 2 more]`
58
59 - `"sora-2"`
60
61 - `"sora-2-pro"`
62
63 - `"sora-2-2025-10-06"`
64
65 - `"sora-2-pro-2025-10-06"`
66
67 - `"sora-2-2025-12-08"`
68
69 - `object: Literal["video"]`
70
71 The object type, which is always `video`.
72
73 - `"video"`
74
75 - `progress: int`
76
77 Approximate completion percentage for the generation task.
78
79 - `prompt: Optional[str]`
80
81 The prompt that was used to generate the video.
82
83 - `remixed_from_video_id: Optional[str]`
84
85 Identifier of the source video if this video is a remix.
86
87 - `seconds: Union[str, VideoSeconds]`
88
89 Duration of the generated clip in seconds. For extensions, this is the stitched total duration.
90
91 - `str`
92
93 - `Literal["4", "8", "12"]`
94
95 - `"4"`
96
97 - `"8"`
98
99 - `"12"`
100
101 - `size: VideoSize`
102
103 The resolution of the generated video.
104
105 - `"720x1280"`
106
107 - `"1280x720"`
108
109 - `"1024x1792"`
110
111 - `"1792x1024"`
112
113 - `status: Literal["queued", "in_progress", "completed", "failed"]`
114
115 Current lifecycle status of the video job.
116
117 - `"queued"`
118
119 - `"in_progress"`
120
121 - `"completed"`
122
123 - `"failed"`
124
125### Example
126
127```python
128import os
129from openai import OpenAI
130
131client = OpenAI(
132 api_key=os.environ.get("OPENAI_API_KEY"), # This is the default and can be omitted
133)
134video = client.videos.remix(
135 video_id="video_123",
136 prompt="x",
137)
138print(video.id)
139```
140
141#### Response
142
143```json
144{
145 "id": "id",
146 "completed_at": 0,
147 "created_at": 0,
148 "error": {
149 "code": "code",
150 "message": "message"
151 },
152 "expires_at": 0,
153 "model": "string",
154 "object": "video",
155 "progress": 0,
156 "prompt": "prompt",
157 "remixed_from_video_id": "remixed_from_video_id",
158 "seconds": "string",
159 "size": "720x1280",
160 "status": "queued"
161}
162```
163
164### Example
165
166```python
167from openai import OpenAI
168
169client = OpenAI()
170video = client.videos.remix(
171 video_id="video_123",
172 prompt="Extend the scene with the cat taking a bow to the cheering audience",
173)
174print(video.id)
175```
176
177#### Response
178
179```json
180{
181 "id": "video_456",
182 "object": "video",
183 "model": "sora-2",
184 "status": "queued",
185 "progress": 0,
186 "created_at": 1712698600,
187 "size": "720x1280",
188 "seconds": "8",
189 "remixed_from_video_id": "video_123"
190}
191```