Skip to content

Commit 915b0ce

Browse files
feat(api): api update
1 parent 995da3c commit 915b0ce

File tree

4 files changed

+50
-8
lines changed

4 files changed

+50
-8
lines changed

.stats.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 12
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/luma-ai-karanganesan%2Fluma_ai-84210a94431f3d533e0f7a0b359165d6aadeff02b2da481edafe45fd2d8b1e86.yml
3-
openapi_spec_hash: 1402c61d8dab26dc7ce3c92f3f572fa8
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/luma-ai-karanganesan%2Fluma_ai-3eb911b4125c57ada1096eaeb4cadab8ac71ac4f6e5cf178209ebd1a3d7f826a.yml
3+
openapi_spec_hash: 69a6757bf5c41f96ae0694e0b9c86491
44
config_hash: 99ed0ad60bce60c5aaf6e6e25f40c622

src/lumaai/types/generation.py

Lines changed: 45 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,9 @@
3333
"RequestReframeVideoRequest",
3434
"RequestReframeVideoRequestMedia",
3535
"RequestReframeVideoRequestFirstFrame",
36+
"RequestModifyVideoRequest",
37+
"RequestModifyVideoRequestMedia",
38+
"RequestModifyVideoRequestFirstFrame",
3639
]
3740

3841

@@ -234,7 +237,7 @@ class RequestAudioGenerationRequest(BaseModel):
234237

235238
class RequestReframeImageRequestMedia(BaseModel):
236239
url: str
237-
"""The URL of the image"""
240+
"""The URL of the media"""
238241

239242

240243
class RequestReframeImageRequest(BaseModel):
@@ -289,12 +292,12 @@ class RequestReframeImageRequest(BaseModel):
289292

290293
class RequestReframeVideoRequestMedia(BaseModel):
291294
url: str
292-
"""The URL of the image"""
295+
"""The URL of the media"""
293296

294297

295298
class RequestReframeVideoRequestFirstFrame(BaseModel):
296299
url: str
297-
"""The URL of the image"""
300+
"""The URL of the media"""
298301

299302

300303
class RequestReframeVideoRequest(BaseModel):
@@ -347,13 +350,52 @@ class RequestReframeVideoRequest(BaseModel):
347350
"""The y start of the crop bounds"""
348351

349352

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+
350391
Request: TypeAlias = Union[
351392
RequestGenerationRequest,
352393
RequestImageGenerationRequest,
353394
RequestUpscaleVideoGenerationRequest,
354395
RequestAudioGenerationRequest,
355396
RequestReframeImageRequest,
356397
RequestReframeVideoRequest,
398+
RequestModifyVideoRequest,
357399
]
358400

359401

src/lumaai/types/generations/image_reframe_params.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,4 +59,4 @@ class ImageReframeParams(TypedDict, total=False):
5959

6060
class Media(TypedDict, total=False):
6161
url: Required[str]
62-
"""The URL of the image"""
62+
"""The URL of the media"""

src/lumaai/types/generations/video_reframe_params.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,9 +59,9 @@ class VideoReframeParams(TypedDict, total=False):
5959

6060
class Media(TypedDict, total=False):
6161
url: Required[str]
62-
"""The URL of the image"""
62+
"""The URL of the media"""
6363

6464

6565
class FirstFrame(TypedDict, total=False):
6666
url: Required[str]
67-
"""The URL of the image"""
67+
"""The URL of the media"""

0 commit comments

Comments
 (0)