22
33from __future__ import annotations
44
5- from typing import Union
5+ from typing import Union , Iterable
66from typing_extensions import Literal
77
88import httpx
3939 async_to_raw_response_wrapper ,
4040 async_to_streamed_response_wrapper ,
4141)
42- from .camera_motion import (
43- CameraMotionResource ,
44- AsyncCameraMotionResource ,
45- CameraMotionResourceWithRawResponse ,
46- AsyncCameraMotionResourceWithRawResponse ,
47- CameraMotionResourceWithStreamingResponse ,
48- AsyncCameraMotionResourceWithStreamingResponse ,
49- )
5042from ..._base_client import make_request_options
5143from ...types .generation import Generation
5244from ...types .generation_list_response import GenerationListResponse
5547
5648
5749class GenerationsResource (SyncAPIResource ):
58- @cached_property
59- def camera_motion (self ) -> CameraMotionResource :
60- return CameraMotionResource (self ._client )
61-
6250 @cached_property
6351 def image (self ) -> ImageResource :
6452 return ImageResource (self ._client )
@@ -91,6 +79,7 @@ def create(
9179 * ,
9280 aspect_ratio : Literal ["1:1" , "16:9" , "9:16" , "4:3" , "3:4" , "21:9" , "9:21" ] | NotGiven = NOT_GIVEN ,
9381 callback_url : str | NotGiven = NOT_GIVEN ,
82+ concepts : Iterable [generation_create_params .Concept ] | NotGiven = NOT_GIVEN ,
9483 duration : Union [Literal ["5s" , "9s" ], str ] | NotGiven = NOT_GIVEN ,
9584 generation_type : Literal ["video" ] | NotGiven = NOT_GIVEN ,
9685 keyframes : generation_create_params .Keyframes | NotGiven = NOT_GIVEN ,
@@ -115,6 +104,8 @@ def create(
115104 be sent to the callback URL when the generation is dreaming, completed, or
116105 failed
117106
107+ concepts: The concepts of the generation
108+
118109 duration: The duration of the generation
119110
120111 keyframes: The keyframes of the generation
@@ -141,6 +132,7 @@ def create(
141132 {
142133 "aspect_ratio" : aspect_ratio ,
143134 "callback_url" : callback_url ,
135+ "concepts" : concepts ,
144136 "duration" : duration ,
145137 "generation_type" : generation_type ,
146138 "keyframes" : keyframes ,
@@ -368,10 +360,6 @@ def upscale(
368360
369361
370362class AsyncGenerationsResource (AsyncAPIResource ):
371- @cached_property
372- def camera_motion (self ) -> AsyncCameraMotionResource :
373- return AsyncCameraMotionResource (self ._client )
374-
375363 @cached_property
376364 def image (self ) -> AsyncImageResource :
377365 return AsyncImageResource (self ._client )
@@ -404,6 +392,7 @@ async def create(
404392 * ,
405393 aspect_ratio : Literal ["1:1" , "16:9" , "9:16" , "4:3" , "3:4" , "21:9" , "9:21" ] | NotGiven = NOT_GIVEN ,
406394 callback_url : str | NotGiven = NOT_GIVEN ,
395+ concepts : Iterable [generation_create_params .Concept ] | NotGiven = NOT_GIVEN ,
407396 duration : Union [Literal ["5s" , "9s" ], str ] | NotGiven = NOT_GIVEN ,
408397 generation_type : Literal ["video" ] | NotGiven = NOT_GIVEN ,
409398 keyframes : generation_create_params .Keyframes | NotGiven = NOT_GIVEN ,
@@ -428,6 +417,8 @@ async def create(
428417 be sent to the callback URL when the generation is dreaming, completed, or
429418 failed
430419
420+ concepts: The concepts of the generation
421+
431422 duration: The duration of the generation
432423
433424 keyframes: The keyframes of the generation
@@ -454,6 +445,7 @@ async def create(
454445 {
455446 "aspect_ratio" : aspect_ratio ,
456447 "callback_url" : callback_url ,
448+ "concepts" : concepts ,
457449 "duration" : duration ,
458450 "generation_type" : generation_type ,
459451 "keyframes" : keyframes ,
@@ -703,10 +695,6 @@ def __init__(self, generations: GenerationsResource) -> None:
703695 generations .upscale ,
704696 )
705697
706- @cached_property
707- def camera_motion (self ) -> CameraMotionResourceWithRawResponse :
708- return CameraMotionResourceWithRawResponse (self ._generations .camera_motion )
709-
710698 @cached_property
711699 def image (self ) -> ImageResourceWithRawResponse :
712700 return ImageResourceWithRawResponse (self ._generations .image )
@@ -739,10 +727,6 @@ def __init__(self, generations: AsyncGenerationsResource) -> None:
739727 generations .upscale ,
740728 )
741729
742- @cached_property
743- def camera_motion (self ) -> AsyncCameraMotionResourceWithRawResponse :
744- return AsyncCameraMotionResourceWithRawResponse (self ._generations .camera_motion )
745-
746730 @cached_property
747731 def image (self ) -> AsyncImageResourceWithRawResponse :
748732 return AsyncImageResourceWithRawResponse (self ._generations .image )
@@ -775,10 +759,6 @@ def __init__(self, generations: GenerationsResource) -> None:
775759 generations .upscale ,
776760 )
777761
778- @cached_property
779- def camera_motion (self ) -> CameraMotionResourceWithStreamingResponse :
780- return CameraMotionResourceWithStreamingResponse (self ._generations .camera_motion )
781-
782762 @cached_property
783763 def image (self ) -> ImageResourceWithStreamingResponse :
784764 return ImageResourceWithStreamingResponse (self ._generations .image )
@@ -811,10 +791,6 @@ def __init__(self, generations: AsyncGenerationsResource) -> None:
811791 generations .upscale ,
812792 )
813793
814- @cached_property
815- def camera_motion (self ) -> AsyncCameraMotionResourceWithStreamingResponse :
816- return AsyncCameraMotionResourceWithStreamingResponse (self ._generations .camera_motion )
817-
818794 @cached_property
819795 def image (self ) -> AsyncImageResourceWithStreamingResponse :
820796 return AsyncImageResourceWithStreamingResponse (self ._generations .image )
0 commit comments