ruby/resources/videos/methods/remix/index.md +0 −186 deleted
File Deleted View Diff
1## Remix video
2
3`videos.remix(video_id, **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: String`
12
13- `prompt: String`
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: String`
24
25 Unique identifier for the video job.
26
27 - `completed_at: Integer`
28
29 Unix timestamp (seconds) for when the job completed, if finished.
30
31 - `created_at: Integer`
32
33 Unix timestamp (seconds) for when the job was created.
34
35 - `error: VideoCreateError`
36
37 Error payload that explains why generation failed, if applicable.
38
39 - `code: String`
40
41 A machine-readable error code that was returned.
42
43 - `message: String`
44
45 A human-readable description of the error that was returned.
46
47 - `expires_at: Integer`
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 - `String = String`
56
57 - `VideoModel = :"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: :video`
70
71 The object type, which is always `video`.
72
73 - `:video`
74
75 - `progress: Integer`
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 | VideoSeconds`
88
89 Duration of the generated clip in seconds. For extensions, this is the stitched total duration.
90
91 - `String = String`
92
93 - `VideoSeconds = :"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: :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```ruby
128require "openai"
129
130openai = OpenAI::Client.new(api_key: "My API Key")
131
132video = openai.videos.remix("video_123", prompt: "x")
133
134puts(video)
135```
136
137#### Response
138
139```json
140{
141 "id": "id",
142 "completed_at": 0,
143 "created_at": 0,
144 "error": {
145 "code": "code",
146 "message": "message"
147 },
148 "expires_at": 0,
149 "model": "string",
150 "object": "video",
151 "progress": 0,
152 "prompt": "prompt",
153 "remixed_from_video_id": "remixed_from_video_id",
154 "seconds": "string",
155 "size": "720x1280",
156 "status": "queued"
157}
158```
159
160### Example
161
162```ruby
163require "openai"
164
165openai = OpenAI::Client.new
166
167video = openai.videos.remix("video_123", prompt: "Extend the scene with the cat taking a bow to the cheering audience")
168
169puts(video)
170```
171
172#### Response
173
174```json
175{
176 "id": "video_456",
177 "object": "video",
178 "model": "sora-2",
179 "status": "queued",
180 "progress": 0,
181 "created_at": 1712698600,
182 "size": "720x1280",
183 "seconds": "8",
184 "remixed_from_video_id": "video_123"
185}
186```