Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .stats.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
configured_endpoints: 7
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/luma-ai-karanganesan%2Fluma_ai-c049b1d1d24d247cd7e9b74156881bfe326d561f17fa7afde9a8af255e3afa3a.yml
configured_endpoints: 8
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/luma-ai-karanganesan%2Fluma_ai-50c12769a17f0d41c6eb0bda802f752d0fe0fcb4ff1a7d09abe65d0764fa72cb.yml
12 changes: 12 additions & 0 deletions api.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,18 @@ Methods:

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

## Image

Methods:

- <code title="post /generations/image">client.generations.image.<a href="./src/lumaai/resources/generations/image.py">create</a>(\*\*<a href="src/lumaai/types/generations/image_create_params.py">params</a>) -> <a href="./src/lumaai/types/generation.py">Generation</a></code>

## Video

Methods:

- <code title="post /generations">client.generations.video.<a href="./src/lumaai/resources/generations/video.py">create</a>(\*\*<a href="src/lumaai/types/generations/video_create_params.py">params</a>) -> <a href="./src/lumaai/types/generation.py">Generation</a></code>

# Ping

Types:
Expand Down
28 changes: 28 additions & 0 deletions src/lumaai/resources/generations/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,21 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

from .image import (
ImageResource,
AsyncImageResource,
ImageResourceWithRawResponse,
AsyncImageResourceWithRawResponse,
ImageResourceWithStreamingResponse,
AsyncImageResourceWithStreamingResponse,
)
from .video import (
VideoResource,
AsyncVideoResource,
VideoResourceWithRawResponse,
AsyncVideoResourceWithRawResponse,
VideoResourceWithStreamingResponse,
AsyncVideoResourceWithStreamingResponse,
)
from .generations import (
GenerationsResource,
AsyncGenerationsResource,
Expand All @@ -24,6 +40,18 @@
"AsyncCameraMotionResourceWithRawResponse",
"CameraMotionResourceWithStreamingResponse",
"AsyncCameraMotionResourceWithStreamingResponse",
"ImageResource",
"AsyncImageResource",
"ImageResourceWithRawResponse",
"AsyncImageResourceWithRawResponse",
"ImageResourceWithStreamingResponse",
"AsyncImageResourceWithStreamingResponse",
"VideoResource",
"AsyncVideoResource",
"VideoResourceWithRawResponse",
"AsyncVideoResourceWithRawResponse",
"VideoResourceWithStreamingResponse",
"AsyncVideoResourceWithStreamingResponse",
"GenerationsResource",
"AsyncGenerationsResource",
"GenerationsResourceWithRawResponse",
Expand Down
68 changes: 68 additions & 0 deletions src/lumaai/resources/generations/generations.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,22 @@

import httpx

from .image import (
ImageResource,
AsyncImageResource,
ImageResourceWithRawResponse,
AsyncImageResourceWithRawResponse,
ImageResourceWithStreamingResponse,
AsyncImageResourceWithStreamingResponse,
)
from .video import (
VideoResource,
AsyncVideoResource,
VideoResourceWithRawResponse,
AsyncVideoResourceWithRawResponse,
VideoResourceWithStreamingResponse,
AsyncVideoResourceWithStreamingResponse,
)
from ...types import generation_list_params, generation_create_params
from ..._types import NOT_GIVEN, Body, Query, Headers, NoneType, NotGiven
from ..._utils import (
Expand Down Expand Up @@ -40,6 +56,14 @@ class GenerationsResource(SyncAPIResource):
def camera_motion(self) -> CameraMotionResource:
return CameraMotionResource(self._client)

@cached_property
def image(self) -> ImageResource:
return ImageResource(self._client)

@cached_property
def video(self) -> VideoResource:
return VideoResource(self._client)

@cached_property
def with_raw_response(self) -> GenerationsResourceWithRawResponse:
"""
Expand All @@ -64,6 +88,7 @@ def create(
*,
aspect_ratio: Literal["1:1", "16:9", "9:16", "4:3", "3:4", "21:9", "9:21"] | NotGiven = NOT_GIVEN,
callback_url: str | NotGiven = NOT_GIVEN,
generation_type: Literal["video"] | NotGiven = NOT_GIVEN,
keyframes: generation_create_params.Keyframes | NotGiven = NOT_GIVEN,
loop: bool | NotGiven = NOT_GIVEN,
prompt: str | NotGiven = NOT_GIVEN,
Expand Down Expand Up @@ -104,6 +129,7 @@ def create(
{
"aspect_ratio": aspect_ratio,
"callback_url": callback_url,
"generation_type": generation_type,
"keyframes": keyframes,
"loop": loop,
"prompt": prompt,
Expand Down Expand Up @@ -231,6 +257,14 @@ class AsyncGenerationsResource(AsyncAPIResource):
def camera_motion(self) -> AsyncCameraMotionResource:
return AsyncCameraMotionResource(self._client)

@cached_property
def image(self) -> AsyncImageResource:
return AsyncImageResource(self._client)

@cached_property
def video(self) -> AsyncVideoResource:
return AsyncVideoResource(self._client)

@cached_property
def with_raw_response(self) -> AsyncGenerationsResourceWithRawResponse:
"""
Expand All @@ -255,6 +289,7 @@ async def create(
*,
aspect_ratio: Literal["1:1", "16:9", "9:16", "4:3", "3:4", "21:9", "9:21"] | NotGiven = NOT_GIVEN,
callback_url: str | NotGiven = NOT_GIVEN,
generation_type: Literal["video"] | NotGiven = NOT_GIVEN,
keyframes: generation_create_params.Keyframes | NotGiven = NOT_GIVEN,
loop: bool | NotGiven = NOT_GIVEN,
prompt: str | NotGiven = NOT_GIVEN,
Expand Down Expand Up @@ -295,6 +330,7 @@ async def create(
{
"aspect_ratio": aspect_ratio,
"callback_url": callback_url,
"generation_type": generation_type,
"keyframes": keyframes,
"loop": loop,
"prompt": prompt,
Expand Down Expand Up @@ -438,6 +474,14 @@ def __init__(self, generations: GenerationsResource) -> None:
def camera_motion(self) -> CameraMotionResourceWithRawResponse:
return CameraMotionResourceWithRawResponse(self._generations.camera_motion)

@cached_property
def image(self) -> ImageResourceWithRawResponse:
return ImageResourceWithRawResponse(self._generations.image)

@cached_property
def video(self) -> VideoResourceWithRawResponse:
return VideoResourceWithRawResponse(self._generations.video)


class AsyncGenerationsResourceWithRawResponse:
def __init__(self, generations: AsyncGenerationsResource) -> None:
Expand All @@ -460,6 +504,14 @@ def __init__(self, generations: AsyncGenerationsResource) -> None:
def camera_motion(self) -> AsyncCameraMotionResourceWithRawResponse:
return AsyncCameraMotionResourceWithRawResponse(self._generations.camera_motion)

@cached_property
def image(self) -> AsyncImageResourceWithRawResponse:
return AsyncImageResourceWithRawResponse(self._generations.image)

@cached_property
def video(self) -> AsyncVideoResourceWithRawResponse:
return AsyncVideoResourceWithRawResponse(self._generations.video)


class GenerationsResourceWithStreamingResponse:
def __init__(self, generations: GenerationsResource) -> None:
Expand All @@ -482,6 +534,14 @@ def __init__(self, generations: GenerationsResource) -> None:
def camera_motion(self) -> CameraMotionResourceWithStreamingResponse:
return CameraMotionResourceWithStreamingResponse(self._generations.camera_motion)

@cached_property
def image(self) -> ImageResourceWithStreamingResponse:
return ImageResourceWithStreamingResponse(self._generations.image)

@cached_property
def video(self) -> VideoResourceWithStreamingResponse:
return VideoResourceWithStreamingResponse(self._generations.video)


class AsyncGenerationsResourceWithStreamingResponse:
def __init__(self, generations: AsyncGenerationsResource) -> None:
Expand All @@ -503,3 +563,11 @@ def __init__(self, generations: AsyncGenerationsResource) -> None:
@cached_property
def camera_motion(self) -> AsyncCameraMotionResourceWithStreamingResponse:
return AsyncCameraMotionResourceWithStreamingResponse(self._generations.camera_motion)

@cached_property
def image(self) -> AsyncImageResourceWithStreamingResponse:
return AsyncImageResourceWithStreamingResponse(self._generations.image)

@cached_property
def video(self) -> AsyncVideoResourceWithStreamingResponse:
return AsyncVideoResourceWithStreamingResponse(self._generations.video)
Loading