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
2 changes: 1 addition & 1 deletion .stats.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
configured_endpoints: 3
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/runwayml%2Frunwayml-00c8db8bba8ad66c20debdbe1bb3e56123c3e9162f9310c49f1f5d748a40b96b.yml
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/runwayml%2Frunwayml-e9db3689e5377f05e22b2dd594ac7eea68b859b98ba4d18103ed7376dbd43a4f.yml
16 changes: 16 additions & 0 deletions src/runwayml/resources/image_to_video.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,9 @@ def create(
*,
model: Literal["gen3a_turbo"],
prompt_image: str,
duration: Literal[5, 10] | NotGiven = NOT_GIVEN,
prompt_text: str | NotGiven = NOT_GIVEN,
ratio: Literal["16:9", "9:16"] | NotGiven = NOT_GIVEN,
seed: int | NotGiven = NOT_GIVEN,
watermark: bool | NotGiven = NOT_GIVEN,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
Expand All @@ -70,8 +72,12 @@ def create(
prompt_image: A HTTPS URL pointing to an image. Images must be JPEG, PNG, or WebP and are
limited to 16MB. Responses must include a valid `Content-Length` header.

duration: The number of seconds of duration for the output video.

prompt_text

ratio: The aspect ratio of the output video.

seed: If unspecified, a random number is chosen. Varying the seed integer is a way to
get different results for the same other request parameters. Using the same seed
integer for an identical request will produce similar results.
Expand All @@ -93,7 +99,9 @@ def create(
{
"model": model,
"prompt_image": prompt_image,
"duration": duration,
"prompt_text": prompt_text,
"ratio": ratio,
"seed": seed,
"watermark": watermark,
},
Expand Down Expand Up @@ -131,7 +139,9 @@ async def create(
*,
model: Literal["gen3a_turbo"],
prompt_image: str,
duration: Literal[5, 10] | NotGiven = NOT_GIVEN,
prompt_text: str | NotGiven = NOT_GIVEN,
ratio: Literal["16:9", "9:16"] | NotGiven = NOT_GIVEN,
seed: int | NotGiven = NOT_GIVEN,
watermark: bool | NotGiven = NOT_GIVEN,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
Expand All @@ -150,8 +160,12 @@ async def create(
prompt_image: A HTTPS URL pointing to an image. Images must be JPEG, PNG, or WebP and are
limited to 16MB. Responses must include a valid `Content-Length` header.

duration: The number of seconds of duration for the output video.

prompt_text

ratio: The aspect ratio of the output video.

seed: If unspecified, a random number is chosen. Varying the seed integer is a way to
get different results for the same other request parameters. Using the same seed
integer for an identical request will produce similar results.
Expand All @@ -173,7 +187,9 @@ async def create(
{
"model": model,
"prompt_image": prompt_image,
"duration": duration,
"prompt_text": prompt_text,
"ratio": ratio,
"seed": seed,
"watermark": watermark,
},
Expand Down
6 changes: 6 additions & 0 deletions src/runwayml/types/image_to_video_create_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,14 @@ class ImageToVideoCreateParams(TypedDict, total=False):
include a valid `Content-Length` header.
"""

duration: Literal[5, 10]
"""The number of seconds of duration for the output video."""

prompt_text: Annotated[str, PropertyInfo(alias="promptText")]

ratio: Literal["16:9", "9:16"]
"""The aspect ratio of the output video."""

seed: int
"""If unspecified, a random number is chosen.

Expand Down
4 changes: 4 additions & 0 deletions tests/api_resources/test_image_to_video.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,9 @@ def test_method_create_with_all_params(self, client: RunwayML) -> None:
image_to_video = client.image_to_video.create(
model="gen3a_turbo",
prompt_image="https://example.com",
duration=5,
prompt_text="promptText",
ratio="16:9",
seed=0,
watermark=True,
)
Expand Down Expand Up @@ -79,7 +81,9 @@ async def test_method_create_with_all_params(self, async_client: AsyncRunwayML)
image_to_video = await async_client.image_to_video.create(
model="gen3a_turbo",
prompt_image="https://example.com",
duration=5,
prompt_text="promptText",
ratio="16:9",
seed=0,
watermark=True,
)
Expand Down