|
33 | 33 | "RequestReframeVideoRequest", |
34 | 34 | "RequestReframeVideoRequestMedia", |
35 | 35 | "RequestReframeVideoRequestFirstFrame", |
| 36 | + "RequestModifyVideoRequest", |
| 37 | + "RequestModifyVideoRequestMedia", |
| 38 | + "RequestModifyVideoRequestFirstFrame", |
36 | 39 | ] |
37 | 40 |
|
38 | 41 |
|
@@ -234,7 +237,7 @@ class RequestAudioGenerationRequest(BaseModel): |
234 | 237 |
|
235 | 238 | class RequestReframeImageRequestMedia(BaseModel): |
236 | 239 | url: str |
237 | | - """The URL of the image""" |
| 240 | + """The URL of the media""" |
238 | 241 |
|
239 | 242 |
|
240 | 243 | class RequestReframeImageRequest(BaseModel): |
@@ -289,12 +292,12 @@ class RequestReframeImageRequest(BaseModel): |
289 | 292 |
|
290 | 293 | class RequestReframeVideoRequestMedia(BaseModel): |
291 | 294 | url: str |
292 | | - """The URL of the image""" |
| 295 | + """The URL of the media""" |
293 | 296 |
|
294 | 297 |
|
295 | 298 | class RequestReframeVideoRequestFirstFrame(BaseModel): |
296 | 299 | url: str |
297 | | - """The URL of the image""" |
| 300 | + """The URL of the media""" |
298 | 301 |
|
299 | 302 |
|
300 | 303 | class RequestReframeVideoRequest(BaseModel): |
@@ -347,13 +350,52 @@ class RequestReframeVideoRequest(BaseModel): |
347 | 350 | """The y start of the crop bounds""" |
348 | 351 |
|
349 | 352 |
|
| 353 | +class RequestModifyVideoRequestMedia(BaseModel): |
| 354 | + url: str |
| 355 | + """The URL of the media""" |
| 356 | + |
| 357 | + |
| 358 | +class RequestModifyVideoRequestFirstFrame(BaseModel): |
| 359 | + url: str |
| 360 | + """The URL of the media""" |
| 361 | + |
| 362 | + |
| 363 | +class RequestModifyVideoRequest(BaseModel): |
| 364 | + generation_type: Literal["modify_video"] |
| 365 | + |
| 366 | + media: RequestModifyVideoRequestMedia |
| 367 | + """The image entity object""" |
| 368 | + |
| 369 | + mode: Literal[ |
| 370 | + "adhere_1", "adhere_2", "adhere_3", "flex_1", "flex_2", "flex_3", "reimagine_1", "reimagine_2", "reimagine_3" |
| 371 | + ] |
| 372 | + """The mode of the modify video""" |
| 373 | + |
| 374 | + model: Literal["ray-2"] |
| 375 | + """The model used for the modify video""" |
| 376 | + |
| 377 | + callback_url: Optional[str] = None |
| 378 | + """ |
| 379 | + The callback URL of the generation, a POST request with Generation object will |
| 380 | + be sent to the callback URL when the generation is dreaming, completed, or |
| 381 | + failed |
| 382 | + """ |
| 383 | + |
| 384 | + first_frame: Optional[RequestModifyVideoRequestFirstFrame] = None |
| 385 | + """The image entity object""" |
| 386 | + |
| 387 | + prompt: Optional[str] = None |
| 388 | + """The prompt of the generation""" |
| 389 | + |
| 390 | + |
350 | 391 | Request: TypeAlias = Union[ |
351 | 392 | RequestGenerationRequest, |
352 | 393 | RequestImageGenerationRequest, |
353 | 394 | RequestUpscaleVideoGenerationRequest, |
354 | 395 | RequestAudioGenerationRequest, |
355 | 396 | RequestReframeImageRequest, |
356 | 397 | RequestReframeVideoRequest, |
| 398 | + RequestModifyVideoRequest, |
357 | 399 | ] |
358 | 400 |
|
359 | 401 |
|
|
0 commit comments