Skip to content

Commit

Permalink
Merge pull request #95 from lumalabs/release-please--branches--main--…
Browse files Browse the repository at this point in the history
…changes--next

release: 1.3.0
  • Loading branch information
karanganesan authored Jan 27, 2025
2 parents 19b3733 + 1db6689 commit 9828fac
Show file tree
Hide file tree
Showing 12 changed files with 101 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
".": "1.2.3"
".": "1.3.0"
}
2 changes: 1 addition & 1 deletion .stats.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
configured_endpoints: 8
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/luma-ai-karanganesan%2Fluma_ai-15f705a5789a4671a5cba160123f7325eff333b93dab4292e25ee92e2ef15a68.yml
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/luma-ai-karanganesan%2Fluma_ai-7514d44d25b8dd931de982d593ba0d03467acdda95fc8367ef2732e7ad2e8086.yml
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# Changelog

## 1.3.0 (2025-01-27)

Full Changelog: [v1.2.3...v1.3.0](https://github.com/lumalabs/lumaai-python/compare/v1.2.3...v1.3.0)

### Features

* **api:** api update ([#94](https://github.com/lumalabs/lumaai-python/issues/94)) ([8faa53d](https://github.com/lumalabs/lumaai-python/commit/8faa53dfdb2b7e6899fa2c08dd5a3bf7f15160be))

## 1.2.3 (2025-01-25)

Full Changelog: [v1.2.2...v1.2.3](https://github.com/lumalabs/lumaai-python/compare/v1.2.2...v1.2.3)
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "lumaai"
version = "1.2.3"
version = "1.3.0"
description = "The official Python library for the lumaai API"
dynamic = ["readme"]
license = "Apache-2.0"
Expand Down
2 changes: 1 addition & 1 deletion src/lumaai/_version.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

__title__ = "lumaai"
__version__ = "1.2.3" # x-release-please-version
__version__ = "1.3.0" # x-release-please-version
25 changes: 25 additions & 0 deletions src/lumaai/resources/generations/generations.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

from __future__ import annotations

from typing import Union
from typing_extensions import Literal

import httpx
Expand Down Expand Up @@ -88,10 +89,13 @@ 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,
duration: Union[Literal["5s", "9s"], str] | NotGiven = NOT_GIVEN,
generation_type: Literal["video"] | NotGiven = NOT_GIVEN,
keyframes: generation_create_params.Keyframes | NotGiven = NOT_GIVEN,
loop: bool | NotGiven = NOT_GIVEN,
model: Literal["ray-1-6", "ray-2"] | NotGiven = NOT_GIVEN,
prompt: str | NotGiven = NOT_GIVEN,
resolution: Union[Literal["540p", "720p"], str] | NotGiven = NOT_GIVEN,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
Expand All @@ -109,12 +113,18 @@ def create(
be sent to the callback URL when the generation is dreaming, completed, or
failed
duration: The duration of the generation
keyframes: The keyframes of the generation
loop: Whether to loop the video
model: The model used for the generation
prompt: The prompt of the generation
resolution: The resolution of the generation
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
Expand All @@ -129,10 +139,13 @@ def create(
{
"aspect_ratio": aspect_ratio,
"callback_url": callback_url,
"duration": duration,
"generation_type": generation_type,
"keyframes": keyframes,
"loop": loop,
"model": model,
"prompt": prompt,
"resolution": resolution,
},
generation_create_params.GenerationCreateParams,
),
Expand Down Expand Up @@ -289,10 +302,13 @@ 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,
duration: Union[Literal["5s", "9s"], str] | NotGiven = NOT_GIVEN,
generation_type: Literal["video"] | NotGiven = NOT_GIVEN,
keyframes: generation_create_params.Keyframes | NotGiven = NOT_GIVEN,
loop: bool | NotGiven = NOT_GIVEN,
model: Literal["ray-1-6", "ray-2"] | NotGiven = NOT_GIVEN,
prompt: str | NotGiven = NOT_GIVEN,
resolution: Union[Literal["540p", "720p"], str] | NotGiven = NOT_GIVEN,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
Expand All @@ -310,12 +326,18 @@ async def create(
be sent to the callback URL when the generation is dreaming, completed, or
failed
duration: The duration of the generation
keyframes: The keyframes of the generation
loop: Whether to loop the video
model: The model used for the generation
prompt: The prompt of the generation
resolution: The resolution of the generation
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
Expand All @@ -330,10 +352,13 @@ async def create(
{
"aspect_ratio": aspect_ratio,
"callback_url": callback_url,
"duration": duration,
"generation_type": generation_type,
"keyframes": keyframes,
"loop": loop,
"model": model,
"prompt": prompt,
"resolution": resolution,
},
generation_create_params.GenerationCreateParams,
),
Expand Down
25 changes: 25 additions & 0 deletions src/lumaai/resources/generations/video.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

from __future__ import annotations

from typing import Union
from typing_extensions import Literal

import httpx
Expand Down Expand Up @@ -51,10 +52,13 @@ 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,
duration: Union[Literal["5s", "9s"], str] | NotGiven = NOT_GIVEN,
generation_type: Literal["video"] | NotGiven = NOT_GIVEN,
keyframes: video_create_params.Keyframes | NotGiven = NOT_GIVEN,
loop: bool | NotGiven = NOT_GIVEN,
model: Literal["ray-1-6", "ray-2"] | NotGiven = NOT_GIVEN,
prompt: str | NotGiven = NOT_GIVEN,
resolution: Union[Literal["540p", "720p"], str] | NotGiven = NOT_GIVEN,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
Expand All @@ -72,12 +76,18 @@ def create(
be sent to the callback URL when the generation is dreaming, completed, or
failed
duration: The duration of the generation
keyframes: The keyframes of the generation
loop: Whether to loop the video
model: The model used for the generation
prompt: The prompt of the generation
resolution: The resolution of the generation
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
Expand All @@ -92,10 +102,13 @@ def create(
{
"aspect_ratio": aspect_ratio,
"callback_url": callback_url,
"duration": duration,
"generation_type": generation_type,
"keyframes": keyframes,
"loop": loop,
"model": model,
"prompt": prompt,
"resolution": resolution,
},
video_create_params.VideoCreateParams,
),
Expand Down Expand Up @@ -131,10 +144,13 @@ 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,
duration: Union[Literal["5s", "9s"], str] | NotGiven = NOT_GIVEN,
generation_type: Literal["video"] | NotGiven = NOT_GIVEN,
keyframes: video_create_params.Keyframes | NotGiven = NOT_GIVEN,
loop: bool | NotGiven = NOT_GIVEN,
model: Literal["ray-1-6", "ray-2"] | NotGiven = NOT_GIVEN,
prompt: str | NotGiven = NOT_GIVEN,
resolution: Union[Literal["540p", "720p"], str] | NotGiven = NOT_GIVEN,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
Expand All @@ -152,12 +168,18 @@ async def create(
be sent to the callback URL when the generation is dreaming, completed, or
failed
duration: The duration of the generation
keyframes: The keyframes of the generation
loop: Whether to loop the video
model: The model used for the generation
prompt: The prompt of the generation
resolution: The resolution of the generation
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
Expand All @@ -172,10 +194,13 @@ async def create(
{
"aspect_ratio": aspect_ratio,
"callback_url": callback_url,
"duration": duration,
"generation_type": generation_type,
"keyframes": keyframes,
"loop": loop,
"model": model,
"prompt": prompt,
"resolution": resolution,
},
video_create_params.VideoCreateParams,
),
Expand Down
9 changes: 9 additions & 0 deletions src/lumaai/types/generation.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,9 @@ class RequestGenerationRequest(BaseModel):
failed
"""

duration: Union[Literal["5s", "9s"], str, None] = None
"""The duration of the generation"""

generation_type: Optional[Literal["video"]] = None

keyframes: Optional[RequestGenerationRequestKeyframes] = None
Expand All @@ -109,9 +112,15 @@ class RequestGenerationRequest(BaseModel):
loop: Optional[bool] = None
"""Whether to loop the video"""

model: Optional[Literal["ray-1-6", "ray-2"]] = None
"""The model used for the generation"""

prompt: Optional[str] = None
"""The prompt of the generation"""

resolution: Union[Literal["540p", "720p"], str, None] = None
"""The resolution of the generation"""


class RequestImageGenerationRequestCharacterRefIdentity0(BaseModel):
images: Optional[List[str]] = None
Expand Down
9 changes: 9 additions & 0 deletions src/lumaai/types/generation_create_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ class GenerationCreateParams(TypedDict, total=False):
failed
"""

duration: Union[Literal["5s", "9s"], str]
"""The duration of the generation"""

generation_type: Literal["video"]

keyframes: Keyframes
Expand All @@ -36,9 +39,15 @@ class GenerationCreateParams(TypedDict, total=False):
loop: bool
"""Whether to loop the video"""

model: Literal["ray-1-6", "ray-2"]
"""The model used for the generation"""

prompt: str
"""The prompt of the generation"""

resolution: Union[Literal["540p", "720p"], str]
"""The resolution of the generation"""


class KeyframesFrame0GenerationReference(TypedDict, total=False):
id: Required[str]
Expand Down
9 changes: 9 additions & 0 deletions src/lumaai/types/generations/video_create_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ class VideoCreateParams(TypedDict, total=False):
failed
"""

duration: Union[Literal["5s", "9s"], str]
"""The duration of the generation"""

generation_type: Literal["video"]

keyframes: Keyframes
Expand All @@ -36,9 +39,15 @@ class VideoCreateParams(TypedDict, total=False):
loop: bool
"""Whether to loop the video"""

model: Literal["ray-1-6", "ray-2"]
"""The model used for the generation"""

prompt: str
"""The prompt of the generation"""

resolution: Union[Literal["540p", "720p"], str]
"""The resolution of the generation"""


class KeyframesFrame0GenerationReference(TypedDict, total=False):
id: Required[str]
Expand Down
6 changes: 6 additions & 0 deletions tests/api_resources/generations/test_video.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ def test_method_create_with_all_params(self, client: LumaAI) -> None:
video = client.generations.video.create(
aspect_ratio="1:1",
callback_url="https://example.com",
duration="5s",
generation_type="video",
keyframes={
"frame0": {
Expand All @@ -39,7 +40,9 @@ def test_method_create_with_all_params(self, client: LumaAI) -> None:
},
},
loop=True,
model="ray-1-6",
prompt="A serene lake surrounded by mountains at sunset",
resolution="540p",
)
assert_matches_type(Generation, video, path=["response"])

Expand Down Expand Up @@ -77,6 +80,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncLumaAI) ->
video = await async_client.generations.video.create(
aspect_ratio="1:1",
callback_url="https://example.com",
duration="5s",
generation_type="video",
keyframes={
"frame0": {
Expand All @@ -89,7 +93,9 @@ async def test_method_create_with_all_params(self, async_client: AsyncLumaAI) ->
},
},
loop=True,
model="ray-1-6",
prompt="A serene lake surrounded by mountains at sunset",
resolution="540p",
)
assert_matches_type(Generation, video, path=["response"])

Expand Down
6 changes: 6 additions & 0 deletions tests/api_resources/test_generations.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ def test_method_create_with_all_params(self, client: LumaAI) -> None:
generation = client.generations.create(
aspect_ratio="1:1",
callback_url="https://example.com",
duration="5s",
generation_type="video",
keyframes={
"frame0": {
Expand All @@ -39,7 +40,9 @@ def test_method_create_with_all_params(self, client: LumaAI) -> None:
},
},
loop=True,
model="ray-1-6",
prompt="A serene lake surrounded by mountains at sunset",
resolution="540p",
)
assert_matches_type(Generation, generation, path=["response"])

Expand Down Expand Up @@ -186,6 +189,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncLumaAI) ->
generation = await async_client.generations.create(
aspect_ratio="1:1",
callback_url="https://example.com",
duration="5s",
generation_type="video",
keyframes={
"frame0": {
Expand All @@ -198,7 +202,9 @@ async def test_method_create_with_all_params(self, async_client: AsyncLumaAI) ->
},
},
loop=True,
model="ray-1-6",
prompt="A serene lake surrounded by mountains at sunset",
resolution="540p",
)
assert_matches_type(Generation, generation, path=["response"])

Expand Down

0 comments on commit 9828fac

Please sign in to comment.