java/resources/videos/methods/remix/index.md +0 −206 deleted
File Deleted View Diff
1## Remix video
2
3`Video videos().remix(VideoRemixParamsparams, RequestOptionsrequestOptions = RequestOptions.none())`
4
5**post** `/videos/{video_id}/remix`
6
7Create a remix of a completed video using a refreshed prompt.
8
9### Parameters
10
11- `VideoRemixParams params`
12
13 - `Optional<String> videoId`
14
15 - `String prompt`
16
17 Updated text prompt that directs the remix generation.
18
19### Returns
20
21- `class Video:`
22
23 Structured information describing a generated video job.
24
25 - `String id`
26
27 Unique identifier for the video job.
28
29 - `Optional<Long> completedAt`
30
31 Unix timestamp (seconds) for when the job completed, if finished.
32
33 - `long createdAt`
34
35 Unix timestamp (seconds) for when the job was created.
36
37 - `Optional<VideoCreateError> error`
38
39 Error payload that explains why generation failed, if applicable.
40
41 - `String code`
42
43 A machine-readable error code that was returned.
44
45 - `String message`
46
47 A human-readable description of the error that was returned.
48
49 - `Optional<Long> expiresAt`
50
51 Unix timestamp (seconds) for when the downloadable assets expire, if set.
52
53 - `VideoModel model`
54
55 The video generation model that produced the job.
56
57 - `SORA_2("sora-2")`
58
59 - `SORA_2_PRO("sora-2-pro")`
60
61 - `SORA_2_2025_10_06("sora-2-2025-10-06")`
62
63 - `SORA_2_PRO_2025_10_06("sora-2-pro-2025-10-06")`
64
65 - `SORA_2_2025_12_08("sora-2-2025-12-08")`
66
67 - `JsonValue; object_ "video"constant`
68
69 The object type, which is always `video`.
70
71 - `VIDEO("video")`
72
73 - `long progress`
74
75 Approximate completion percentage for the generation task.
76
77 - `Optional<String> prompt`
78
79 The prompt that was used to generate the video.
80
81 - `Optional<String> remixedFromVideoId`
82
83 Identifier of the source video if this video is a remix.
84
85 - `VideoSeconds seconds`
86
87 Duration of the generated clip in seconds. For extensions, this is the stitched total duration.
88
89 - `_4("4")`
90
91 - `_8("8")`
92
93 - `_12("12")`
94
95 - `VideoSize size`
96
97 The resolution of the generated video.
98
99 - `_720X1280("720x1280")`
100
101 - `_1280X720("1280x720")`
102
103 - `_1024X1792("1024x1792")`
104
105 - `_1792X1024("1792x1024")`
106
107 - `Status status`
108
109 Current lifecycle status of the video job.
110
111 - `QUEUED("queued")`
112
113 - `IN_PROGRESS("in_progress")`
114
115 - `COMPLETED("completed")`
116
117 - `FAILED("failed")`
118
119### Example
120
121```java
122package com.openai.example;
123
124import com.openai.client.OpenAIClient;
125import com.openai.client.okhttp.OpenAIOkHttpClient;
126import com.openai.models.videos.Video;
127import com.openai.models.videos.VideoRemixParams;
128
129public final class Main {
130 private Main() {}
131
132 public static void main(String[] args) {
133 OpenAIClient client = OpenAIOkHttpClient.fromEnv();
134
135 VideoRemixParams params = VideoRemixParams.builder()
136 .videoId("video_123")
137 .prompt("x")
138 .build();
139 Video video = client.videos().remix(params);
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": "string",
162 "size": "720x1280",
163 "status": "queued"
164}
165```
166
167### Example
168
169```java
170package com.openai.example;
171
172import com.openai.client.OpenAIClient;
173import com.openai.client.okhttp.OpenAIOkHttpClient;
174import com.openai.models.videos.Video;
175import com.openai.models.videos.VideoRemixParams;
176
177public final class Main {
178 private Main() {}
179
180 public static void main(String[] args) {
181 OpenAIClient client = OpenAIOkHttpClient.fromEnv();
182
183 VideoRemixParams params = VideoRemixParams.builder()
184 .videoId("video_123")
185 .prompt("Extend the scene with the cat taking a bow to the cheering audience")
186 .build();
187 Video video = client.videos().remix(params);
188 }
189}
190```
191
192#### Response
193
194```json
195{
196 "id": "video_456",
197 "object": "video",
198 "model": "sora-2",
199 "status": "queued",
200 "progress": 0,
201 "created_at": 1712698600,
202 "size": "720x1280",
203 "seconds": "8",
204 "remixed_from_video_id": "video_123"
205}
206```