Skip to content

Commit db3cff7

Browse files
feat(api): api update
1 parent de64b0d commit db3cff7

File tree

17 files changed

+87
-282
lines changed

17 files changed

+87
-282
lines changed

.stats.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
configured_endpoints: 10
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/luma-ai-karanganesan%2Fluma_ai-40360b5fde0fe57b8078d35565a402c5dc9af5cafa897fba042fdceff9d32617.yml
3-
openapi_spec_hash: 1ef811d56d6913d8f5c7f3bcdab0610c
4-
config_hash: f8dc17c4f411a28d1002067bbc0d4b5f
1+
configured_endpoints: 9
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/luma-ai-karanganesan%2Fluma_ai-77915e19d91e49806410e1f72c98350af91b90cc9757cc502214e532d51016fe.yml
3+
openapi_spec_hash: 5a8e2fe22b4400e78b88621090f145d8
4+
config_hash: 340ab81846cdf3a6dd774f425fd612aa

api.md

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -15,18 +15,6 @@ Methods:
1515
- <code title="get /generations/{id}">client.generations.<a href="./src/lumaai/resources/generations/generations.py">get</a>(id) -> <a href="./src/lumaai/types/generation.py">Generation</a></code>
1616
- <code title="post /generations/{id}/upscale">client.generations.<a href="./src/lumaai/resources/generations/generations.py">upscale</a>(id, \*\*<a href="src/lumaai/types/generation_upscale_params.py">params</a>) -> <a href="./src/lumaai/types/generation.py">Generation</a></code>
1717

18-
## CameraMotion
19-
20-
Types:
21-
22-
```python
23-
from lumaai.types.generations import CameraMotionListResponse
24-
```
25-
26-
Methods:
27-
28-
- <code title="get /generations/camera_motion/list">client.generations.camera_motion.<a href="./src/lumaai/resources/generations/camera_motion.py">list</a>() -> <a href="./src/lumaai/types/generations/camera_motion_list_response.py">CameraMotionListResponse</a></code>
29-
3018
## Image
3119

3220
Methods:

src/lumaai/resources/generations/__init__.py

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -24,22 +24,8 @@
2424
GenerationsResourceWithStreamingResponse,
2525
AsyncGenerationsResourceWithStreamingResponse,
2626
)
27-
from .camera_motion import (
28-
CameraMotionResource,
29-
AsyncCameraMotionResource,
30-
CameraMotionResourceWithRawResponse,
31-
AsyncCameraMotionResourceWithRawResponse,
32-
CameraMotionResourceWithStreamingResponse,
33-
AsyncCameraMotionResourceWithStreamingResponse,
34-
)
3527

3628
__all__ = [
37-
"CameraMotionResource",
38-
"AsyncCameraMotionResource",
39-
"CameraMotionResourceWithRawResponse",
40-
"AsyncCameraMotionResourceWithRawResponse",
41-
"CameraMotionResourceWithStreamingResponse",
42-
"AsyncCameraMotionResourceWithStreamingResponse",
4329
"ImageResource",
4430
"AsyncImageResource",
4531
"ImageResourceWithRawResponse",

src/lumaai/resources/generations/camera_motion.py

Lines changed: 0 additions & 135 deletions
This file was deleted.

src/lumaai/resources/generations/generations.py

Lines changed: 9 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
from __future__ import annotations
44

5-
from typing import Union
5+
from typing import Union, Iterable
66
from typing_extensions import Literal
77

88
import httpx
@@ -39,14 +39,6 @@
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-
)
5042
from ..._base_client import make_request_options
5143
from ...types.generation import Generation
5244
from ...types.generation_list_response import GenerationListResponse
@@ -55,10 +47,6 @@
5547

5648

5749
class 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

370362
class 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)

src/lumaai/resources/generations/image.py

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,8 @@ def create(
5656
modify_image_ref: image_create_params.ModifyImageRef | NotGiven = NOT_GIVEN,
5757
prompt: str | NotGiven = NOT_GIVEN,
5858
style_ref: Iterable[image_create_params.StyleRef] | NotGiven = NOT_GIVEN,
59+
sync: bool | NotGiven = NOT_GIVEN,
60+
sync_timeout: float | NotGiven = NOT_GIVEN,
5961
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
6062
# The extra values given here take precedence over values defined on the client or passed to this method.
6163
extra_headers: Headers | None = None,
@@ -77,6 +79,10 @@ def create(
7779
7880
prompt: The prompt of the generation
7981
82+
sync: Create image in synchronous mode and return complated image
83+
84+
sync_timeout: The timeout for the synchronous image generation
85+
8086
extra_headers: Send extra headers
8187
8288
extra_query: Add additional query parameters to the request
@@ -98,6 +104,8 @@ def create(
98104
"modify_image_ref": modify_image_ref,
99105
"prompt": prompt,
100106
"style_ref": style_ref,
107+
"sync": sync,
108+
"sync_timeout": sync_timeout,
101109
},
102110
image_create_params.ImageCreateParams,
103111
),
@@ -140,6 +148,8 @@ async def create(
140148
modify_image_ref: image_create_params.ModifyImageRef | NotGiven = NOT_GIVEN,
141149
prompt: str | NotGiven = NOT_GIVEN,
142150
style_ref: Iterable[image_create_params.StyleRef] | NotGiven = NOT_GIVEN,
151+
sync: bool | NotGiven = NOT_GIVEN,
152+
sync_timeout: float | NotGiven = NOT_GIVEN,
143153
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
144154
# The extra values given here take precedence over values defined on the client or passed to this method.
145155
extra_headers: Headers | None = None,
@@ -161,6 +171,10 @@ async def create(
161171
162172
prompt: The prompt of the generation
163173
174+
sync: Create image in synchronous mode and return complated image
175+
176+
sync_timeout: The timeout for the synchronous image generation
177+
164178
extra_headers: Send extra headers
165179
166180
extra_query: Add additional query parameters to the request
@@ -182,6 +196,8 @@ async def create(
182196
"modify_image_ref": modify_image_ref,
183197
"prompt": prompt,
184198
"style_ref": style_ref,
199+
"sync": sync,
200+
"sync_timeout": sync_timeout,
185201
},
186202
image_create_params.ImageCreateParams,
187203
),

0 commit comments

Comments
 (0)