go/resources/videos/methods/remix/index.md +0 −223 deleted
File Deleted View Diff
1## Remix video
2
3`client.Videos.Remix(ctx, videoID, body) (*Video, error)`
4
5**post** `/videos/{video_id}/remix`
6
7Create a remix of a completed video using a refreshed prompt.
8
9### Parameters
10
11- `videoID string`
12
13- `body VideoRemixParams`
14
15 - `Prompt param.Field[string]`
16
17 Updated text prompt that directs the remix generation.
18
19### Returns
20
21- `type Video struct{…}`
22
23 Structured information describing a generated video job.
24
25 - `ID string`
26
27 Unique identifier for the video job.
28
29 - `CompletedAt int64`
30
31 Unix timestamp (seconds) for when the job completed, if finished.
32
33 - `CreatedAt int64`
34
35 Unix timestamp (seconds) for when the job was created.
36
37 - `Error VideoCreateError`
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 - `ExpiresAt int64`
50
51 Unix timestamp (seconds) for when the downloadable assets expire, if set.
52
53 - `Model VideoModel`
54
55 The video generation model that produced the job.
56
57 - `string`
58
59 - `type VideoModel string`
60
61 - `const VideoModelSora2 VideoModel = "sora-2"`
62
63 - `const VideoModelSora2Pro VideoModel = "sora-2-pro"`
64
65 - `const VideoModelSora2_2025_10_06 VideoModel = "sora-2-2025-10-06"`
66
67 - `const VideoModelSora2Pro2025_10_06 VideoModel = "sora-2-pro-2025-10-06"`
68
69 - `const VideoModelSora2_2025_12_08 VideoModel = "sora-2-2025-12-08"`
70
71 - `Object Video`
72
73 The object type, which is always `video`.
74
75 - `const VideoVideo Video = "video"`
76
77 - `Progress int64`
78
79 Approximate completion percentage for the generation task.
80
81 - `Prompt string`
82
83 The prompt that was used to generate the video.
84
85 - `RemixedFromVideoID string`
86
87 Identifier of the source video if this video is a remix.
88
89 - `Seconds VideoSeconds`
90
91 Duration of the generated clip in seconds. For extensions, this is the stitched total duration.
92
93 - `string`
94
95 - `type VideoSeconds string`
96
97 - `const VideoSeconds4 VideoSeconds = "4"`
98
99 - `const VideoSeconds8 VideoSeconds = "8"`
100
101 - `const VideoSeconds12 VideoSeconds = "12"`
102
103 - `Size VideoSize`
104
105 The resolution of the generated video.
106
107 - `const VideoSize720x1280 VideoSize = "720x1280"`
108
109 - `const VideoSize1280x720 VideoSize = "1280x720"`
110
111 - `const VideoSize1024x1792 VideoSize = "1024x1792"`
112
113 - `const VideoSize1792x1024 VideoSize = "1792x1024"`
114
115 - `Status VideoStatus`
116
117 Current lifecycle status of the video job.
118
119 - `const VideoStatusQueued VideoStatus = "queued"`
120
121 - `const VideoStatusInProgress VideoStatus = "in_progress"`
122
123 - `const VideoStatusCompleted VideoStatus = "completed"`
124
125 - `const VideoStatusFailed VideoStatus = "failed"`
126
127### Example
128
129```go
130package main
131
132import (
133 "context"
134 "fmt"
135
136 "github.com/openai/openai-go"
137 "github.com/openai/openai-go/option"
138)
139
140func main() {
141 client := openai.NewClient(
142 option.WithAPIKey("My API Key"),
143 )
144 video, err := client.Videos.Remix(
145 context.TODO(),
146 "video_123",
147 openai.VideoRemixParams{
148 Prompt: "x",
149 },
150 )
151 if err != nil {
152 panic(err.Error())
153 }
154 fmt.Printf("%+v\n", video.ID)
155}
156```
157
158#### Response
159
160```json
161{
162 "id": "id",
163 "completed_at": 0,
164 "created_at": 0,
165 "error": {
166 "code": "code",
167 "message": "message"
168 },
169 "expires_at": 0,
170 "model": "string",
171 "object": "video",
172 "progress": 0,
173 "prompt": "prompt",
174 "remixed_from_video_id": "remixed_from_video_id",
175 "seconds": "string",
176 "size": "720x1280",
177 "status": "queued"
178}
179```
180
181### Example
182
183```go
184package main
185
186import (
187 "context"
188 "fmt"
189
190 "github.com/openai/openai-go"
191)
192
193func main() {
194 client := openai.NewClient()
195 video, err := client.Videos.Remix(
196 context.TODO(),
197 "video_123",
198 openai.VideoRemixParams{
199 Prompt: "Extend the scene with the cat taking a bow to the cheering audience",
200 },
201 )
202 if err != nil {
203 panic(err.Error())
204 }
205 fmt.Printf("%+v\n", video.ID)
206}
207```
208
209#### Response
210
211```json
212{
213 "id": "video_456",
214 "object": "video",
215 "model": "sora-2",
216 "status": "queued",
217 "progress": 0,
218 "created_at": 1712698600,
219 "size": "720x1280",
220 "seconds": "8",
221 "remixed_from_video_id": "video_123"
222}
223```