From 9486ec19a5321ef555a498877cbc6811645ad205 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 15 Oct 2025 20:12:20 +0000 Subject: [PATCH 1/3] feat(api): Veo 3.1 and Veo 3.1 Fast --- .stats.yml | 4 +- src/runwayml/resources/image_to_video.py | 22 ++++++---- src/runwayml/resources/text_to_video.py | 18 ++++---- .../types/image_to_video_create_params.py | 14 ++++--- .../types/organization_retrieve_response.py | 42 +++++++++++++++++++ .../organization_retrieve_usage_response.py | 4 ++ .../types/text_to_video_create_params.py | 11 +++-- tests/api_resources/test_text_to_video.py | 32 +++++++------- 8 files changed, 104 insertions(+), 43 deletions(-) diff --git a/.stats.yml b/.stats.yml index c1e935b..4747953 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 14 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/runwayml%2Frunwayml-62779ce32ca8a091219b84d943b97a799daaccb6c5792a191b68be4cdd9117e1.yml -openapi_spec_hash: 42e41b0bec15ce4f46ff797748062484 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/runwayml%2Frunwayml-6972f5f3d7df03dcd210b4c4468c188fc5a341582880c6afabf15d90a27b6552.yml +openapi_spec_hash: 16742f1933274f7d02bcad48340283e9 config_hash: ef699c0a3936550275ab6d77894a2c72 diff --git a/src/runwayml/resources/image_to_video.py b/src/runwayml/resources/image_to_video.py index fad4a5d..666dfc2 100644 --- a/src/runwayml/resources/image_to_video.py +++ b/src/runwayml/resources/image_to_video.py @@ -53,7 +53,7 @@ def with_streaming_response(self) -> ImageToVideoResourceWithStreamingResponse: def create( self, *, - model: Literal["gen4_turbo", "gen3a_turbo", "veo3"], + model: Literal["gen4_turbo", "gen3a_turbo", "veo3.1", "veo3.1_fast", "veo3"], prompt_image: Union[str, Iterable[image_to_video_create_params.PromptImagePromptImage]], ratio: Literal["1280:720", "720:1280", "1104:832", "832:1104", "960:960", "1584:672", "1280:768", "768:1280"], content_moderation: image_to_video_create_params.ContentModeration | Omit = omit, @@ -93,10 +93,12 @@ def create( - `1280:768` - `768:1280` - `veo3` supports the following values: + `veo3`, `veo3.1`, `veo3.1_fast` support the following values: - `1280:720` - `720:1280` + - `1080:1920` + - `1920:1080` content_moderation: Settings that affect the behavior of the content moderation system. @@ -104,8 +106,9 @@ def create( `gen3a_turbo` duration: The number of seconds of duration for the output video. `veo3` requires a - duration of 8. `gen3a_turbo` requires a duration of 5 or 10. `gen4_turbo` must - specify a duration of 2-10 seconds. + duration of 8. `veo3.1` and `veo3.1_fast` require a duration of 4, 6, or 8. + `gen3a_turbo` requires a duration of 5 or 10. `gen4_turbo` must specify a + duration of 2-10 seconds. prompt_text: A non-empty string up to 1000 characters (measured in UTF-16 code units). This should describe in detail what should appear in the output. @@ -166,7 +169,7 @@ def with_streaming_response(self) -> AsyncImageToVideoResourceWithStreamingRespo async def create( self, *, - model: Literal["gen4_turbo", "gen3a_turbo", "veo3"], + model: Literal["gen4_turbo", "gen3a_turbo", "veo3.1", "veo3.1_fast", "veo3"], prompt_image: Union[str, Iterable[image_to_video_create_params.PromptImagePromptImage]], ratio: Literal["1280:720", "720:1280", "1104:832", "832:1104", "960:960", "1584:672", "1280:768", "768:1280"], content_moderation: image_to_video_create_params.ContentModeration | Omit = omit, @@ -206,10 +209,12 @@ async def create( - `1280:768` - `768:1280` - `veo3` supports the following values: + `veo3`, `veo3.1`, `veo3.1_fast` support the following values: - `1280:720` - `720:1280` + - `1080:1920` + - `1920:1080` content_moderation: Settings that affect the behavior of the content moderation system. @@ -217,8 +222,9 @@ async def create( `gen3a_turbo` duration: The number of seconds of duration for the output video. `veo3` requires a - duration of 8. `gen3a_turbo` requires a duration of 5 or 10. `gen4_turbo` must - specify a duration of 2-10 seconds. + duration of 8. `veo3.1` and `veo3.1_fast` require a duration of 4, 6, or 8. + `gen3a_turbo` requires a duration of 5 or 10. `gen4_turbo` must specify a + duration of 2-10 seconds. prompt_text: A non-empty string up to 1000 characters (measured in UTF-16 code units). This should describe in detail what should appear in the output. diff --git a/src/runwayml/resources/text_to_video.py b/src/runwayml/resources/text_to_video.py index aeabf36..c73f284 100644 --- a/src/runwayml/resources/text_to_video.py +++ b/src/runwayml/resources/text_to_video.py @@ -52,10 +52,10 @@ def with_streaming_response(self) -> TextToVideoResourceWithStreamingResponse: def create( self, *, - duration: Literal[8], - model: Literal["veo3"], + duration: Literal[4, 6, 8], + model: Literal["veo3.1", "veo3.1_fast", "veo3"], prompt_text: str, - ratio: Literal["1280:720", "720:1280"], + ratio: Literal["1280:720", "720:1280", "1080:1920", "1920:1080"], seed: int | Omit = omit, # 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. @@ -68,7 +68,8 @@ def create( This endpoint will start a new task to generate a video from a text prompt. Args: - duration: Veo 3 videos must be 8 seconds long. + duration: `veo3` videos must be 8 seconds long. `veo3.1` and `veo3.1_fast` videos must be + 4, 6, or 8 seconds long. model: The model variant to use. @@ -131,10 +132,10 @@ def with_streaming_response(self) -> AsyncTextToVideoResourceWithStreamingRespon async def create( self, *, - duration: Literal[8], - model: Literal["veo3"], + duration: Literal[4, 6, 8], + model: Literal["veo3.1", "veo3.1_fast", "veo3"], prompt_text: str, - ratio: Literal["1280:720", "720:1280"], + ratio: Literal["1280:720", "720:1280", "1080:1920", "1920:1080"], seed: int | Omit = omit, # 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. @@ -147,7 +148,8 @@ async def create( This endpoint will start a new task to generate a video from a text prompt. Args: - duration: Veo 3 videos must be 8 seconds long. + duration: `veo3` videos must be 8 seconds long. `veo3.1` and `veo3.1_fast` videos must be + 4, 6, or 8 seconds long. model: The model variant to use. diff --git a/src/runwayml/types/image_to_video_create_params.py b/src/runwayml/types/image_to_video_create_params.py index 065b80d..7da6eb3 100644 --- a/src/runwayml/types/image_to_video_create_params.py +++ b/src/runwayml/types/image_to_video_create_params.py @@ -11,7 +11,7 @@ class ImageToVideoCreateParams(TypedDict, total=False): - model: Required[Literal["gen4_turbo", "gen3a_turbo", "veo3"]] + model: Required[Literal["gen4_turbo", "gen3a_turbo", "veo3.1", "veo3.1_fast", "veo3"]] """The model variant to use.""" prompt_image: Required[Annotated[Union[str, Iterable[PromptImagePromptImage]], PropertyInfo(alias="promptImage")]] @@ -40,10 +40,12 @@ class ImageToVideoCreateParams(TypedDict, total=False): - `1280:768` - `768:1280` - `veo3` supports the following values: + `veo3`, `veo3.1`, `veo3.1_fast` support the following values: - `1280:720` - `720:1280` + - `1080:1920` + - `1920:1080` """ content_moderation: Annotated[ContentModeration, PropertyInfo(alias="contentModeration")] @@ -56,8 +58,9 @@ class ImageToVideoCreateParams(TypedDict, total=False): duration: Literal[2, 3, 4, 5, 6, 7, 8, 9, 10] """The number of seconds of duration for the output video. - `veo3` requires a duration of 8. `gen3a_turbo` requires a duration of 5 or 10. - `gen4_turbo` must specify a duration of 2-10 seconds. + `veo3` requires a duration of 8. `veo3.1` and `veo3.1_fast` require a duration + of 4, 6, or 8. `gen3a_turbo` requires a duration of 5 or 10. `gen4_turbo` must + specify a duration of 2-10 seconds. """ prompt_text: Annotated[str, PropertyInfo(alias="promptText")] @@ -82,7 +85,8 @@ class PromptImagePromptImage(TypedDict, total=False): "first" will use the image as the first frame of the video, "last" will use the image as the last frame of the video. - "last" is currently supported for `gen3a_turbo` only. + "last" is currently supported for `gen3a_turbo`, `veo3.1`, and `veo3.1_fast` + only. `veo3.1` and `veo3.1_fast` require a `first` frame to be provided. """ uri: Required[str] diff --git a/src/runwayml/types/organization_retrieve_response.py b/src/runwayml/types/organization_retrieve_response.py index 8669d39..f72f2b2 100644 --- a/src/runwayml/types/organization_retrieve_response.py +++ b/src/runwayml/types/organization_retrieve_response.py @@ -23,6 +23,8 @@ "TierModelsGen4Turbo", "TierModelsUpscaleV1", "TierModelsVeo3", + "TierModelsVeo3_1", + "TierModelsVeo3_1Fast", "Usage", "UsageModels", "UsageModelsActTwo", @@ -38,6 +40,8 @@ "UsageModelsGen4Turbo", "UsageModelsUpscaleV1", "UsageModelsVeo3", + "UsageModelsVeo3_1", + "UsageModelsVeo3_1Fast", ] @@ -145,6 +149,22 @@ class TierModelsVeo3(BaseModel): """The maximum number of generations that can be created each day for this model.""" +class TierModelsVeo3_1(BaseModel): + max_concurrent_generations: int = FieldInfo(alias="maxConcurrentGenerations") + """The maximum number of generations that can be run concurrently for this model.""" + + max_daily_generations: int = FieldInfo(alias="maxDailyGenerations") + """The maximum number of generations that can be created each day for this model.""" + + +class TierModelsVeo3_1Fast(BaseModel): + max_concurrent_generations: int = FieldInfo(alias="maxConcurrentGenerations") + """The maximum number of generations that can be run concurrently for this model.""" + + max_daily_generations: int = FieldInfo(alias="maxDailyGenerations") + """The maximum number of generations that can be created each day for this model.""" + + class TierModels(BaseModel): act_two: Optional[TierModelsActTwo] = None """Limits associated with the act_two model.""" @@ -185,6 +205,12 @@ class TierModels(BaseModel): veo3: Optional[TierModelsVeo3] = None """Limits associated with the veo3 model.""" + veo3_1: Optional[TierModelsVeo3_1] = FieldInfo(alias="veo3.1", default=None) + """Limits associated with the veo3.1 model.""" + + veo3_1_fast: Optional[TierModelsVeo3_1Fast] = FieldInfo(alias="veo3.1_fast", default=None) + """Limits associated with the veo3.1_fast model.""" + class Tier(BaseModel): max_monthly_credit_spend: int = FieldInfo(alias="maxMonthlyCreditSpend") @@ -259,6 +285,16 @@ class UsageModelsVeo3(BaseModel): """The number of generations that have been run for this model in the past day.""" +class UsageModelsVeo3_1(BaseModel): + daily_generations: int = FieldInfo(alias="dailyGenerations") + """The number of generations that have been run for this model in the past day.""" + + +class UsageModelsVeo3_1Fast(BaseModel): + daily_generations: int = FieldInfo(alias="dailyGenerations") + """The number of generations that have been run for this model in the past day.""" + + class UsageModels(BaseModel): act_two: Optional[UsageModelsActTwo] = None """Usage data for the act_two model.""" @@ -299,6 +335,12 @@ class UsageModels(BaseModel): veo3: Optional[UsageModelsVeo3] = None """Usage data for the veo3 model.""" + veo3_1: Optional[UsageModelsVeo3_1] = FieldInfo(alias="veo3.1", default=None) + """Usage data for the veo3.1 model.""" + + veo3_1_fast: Optional[UsageModelsVeo3_1Fast] = FieldInfo(alias="veo3.1_fast", default=None) + """Usage data for the veo3.1_fast model.""" + class Usage(BaseModel): models: UsageModels diff --git a/src/runwayml/types/organization_retrieve_usage_response.py b/src/runwayml/types/organization_retrieve_usage_response.py index 1fe8c45..5ed9713 100644 --- a/src/runwayml/types/organization_retrieve_usage_response.py +++ b/src/runwayml/types/organization_retrieve_usage_response.py @@ -29,6 +29,8 @@ class ResultUsedCredit(BaseModel): "gen4_turbo", "upscale_v1", "veo3", + "veo3.1", + "veo3.1_fast", ] """The model whose usage resulted in the credit usage.""" @@ -60,6 +62,8 @@ class OrganizationRetrieveUsageResponse(BaseModel): "gen4_turbo", "upscale_v1", "veo3", + "veo3.1", + "veo3.1_fast", ] ] """The list of models with usage during the queried time range.""" diff --git a/src/runwayml/types/text_to_video_create_params.py b/src/runwayml/types/text_to_video_create_params.py index 13f2c08..0a2fdc1 100644 --- a/src/runwayml/types/text_to_video_create_params.py +++ b/src/runwayml/types/text_to_video_create_params.py @@ -10,10 +10,13 @@ class TextToVideoCreateParams(TypedDict, total=False): - duration: Required[Literal[8]] - """Veo 3 videos must be 8 seconds long.""" + duration: Required[Literal[4, 6, 8]] + """`veo3` videos must be 8 seconds long. - model: Required[Literal["veo3"]] + `veo3.1` and `veo3.1_fast` videos must be 4, 6, or 8 seconds long. + """ + + model: Required[Literal["veo3.1", "veo3.1_fast", "veo3"]] """The model variant to use.""" prompt_text: Required[Annotated[str, PropertyInfo(alias="promptText")]] @@ -22,7 +25,7 @@ class TextToVideoCreateParams(TypedDict, total=False): This should describe in detail what should appear in the output. """ - ratio: Required[Literal["1280:720", "720:1280"]] + ratio: Required[Literal["1280:720", "720:1280", "1080:1920", "1920:1080"]] """A string representing the aspect ratio of the output video.""" seed: int diff --git a/tests/api_resources/test_text_to_video.py b/tests/api_resources/test_text_to_video.py index 1bc3f9f..ddd1c1e 100644 --- a/tests/api_resources/test_text_to_video.py +++ b/tests/api_resources/test_text_to_video.py @@ -20,8 +20,8 @@ class TestTextToVideo: @parametrize def test_method_create(self, client: RunwayML) -> None: text_to_video = client.text_to_video.create( - duration=8, - model="veo3", + duration=4, + model="veo3.1", prompt_text="promptText", ratio="1280:720", ) @@ -30,8 +30,8 @@ def test_method_create(self, client: RunwayML) -> None: @parametrize def test_method_create_with_all_params(self, client: RunwayML) -> None: text_to_video = client.text_to_video.create( - duration=8, - model="veo3", + duration=4, + model="veo3.1", prompt_text="promptText", ratio="1280:720", seed=0, @@ -41,8 +41,8 @@ def test_method_create_with_all_params(self, client: RunwayML) -> None: @parametrize def test_raw_response_create(self, client: RunwayML) -> None: response = client.text_to_video.with_raw_response.create( - duration=8, - model="veo3", + duration=4, + model="veo3.1", prompt_text="promptText", ratio="1280:720", ) @@ -55,8 +55,8 @@ def test_raw_response_create(self, client: RunwayML) -> None: @parametrize def test_streaming_response_create(self, client: RunwayML) -> None: with client.text_to_video.with_streaming_response.create( - duration=8, - model="veo3", + duration=4, + model="veo3.1", prompt_text="promptText", ratio="1280:720", ) as response: @@ -77,8 +77,8 @@ class TestAsyncTextToVideo: @parametrize async def test_method_create(self, async_client: AsyncRunwayML) -> None: text_to_video = await async_client.text_to_video.create( - duration=8, - model="veo3", + duration=4, + model="veo3.1", prompt_text="promptText", ratio="1280:720", ) @@ -87,8 +87,8 @@ async def test_method_create(self, async_client: AsyncRunwayML) -> None: @parametrize async def test_method_create_with_all_params(self, async_client: AsyncRunwayML) -> None: text_to_video = await async_client.text_to_video.create( - duration=8, - model="veo3", + duration=4, + model="veo3.1", prompt_text="promptText", ratio="1280:720", seed=0, @@ -98,8 +98,8 @@ async def test_method_create_with_all_params(self, async_client: AsyncRunwayML) @parametrize async def test_raw_response_create(self, async_client: AsyncRunwayML) -> None: response = await async_client.text_to_video.with_raw_response.create( - duration=8, - model="veo3", + duration=4, + model="veo3.1", prompt_text="promptText", ratio="1280:720", ) @@ -112,8 +112,8 @@ async def test_raw_response_create(self, async_client: AsyncRunwayML) -> None: @parametrize async def test_streaming_response_create(self, async_client: AsyncRunwayML) -> None: async with async_client.text_to_video.with_streaming_response.create( - duration=8, - model="veo3", + duration=4, + model="veo3.1", prompt_text="promptText", ratio="1280:720", ) as response: From 2c66c5a4d9cdb7c213c7454d2716ba0d81b7d6e8 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 15 Oct 2025 20:15:58 +0000 Subject: [PATCH 2/3] fix(api): Add missing 1080p sizes --- .stats.yml | 4 +-- src/runwayml/resources/image_to_video.py | 26 +++++++++++++++++-- .../types/image_to_video_create_params.py | 13 +++++++++- 3 files changed, 38 insertions(+), 5 deletions(-) diff --git a/.stats.yml b/.stats.yml index 4747953..a4a8b25 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 14 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/runwayml%2Frunwayml-6972f5f3d7df03dcd210b4c4468c188fc5a341582880c6afabf15d90a27b6552.yml -openapi_spec_hash: 16742f1933274f7d02bcad48340283e9 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/runwayml%2Frunwayml-2c2e099a7b5785af1882c1f8c3f28f560e478d8345b6443155342f152f036117.yml +openapi_spec_hash: b8e80b47d8ba09a28dedc562a3e79319 config_hash: ef699c0a3936550275ab6d77894a2c72 diff --git a/src/runwayml/resources/image_to_video.py b/src/runwayml/resources/image_to_video.py index 666dfc2..2337d12 100644 --- a/src/runwayml/resources/image_to_video.py +++ b/src/runwayml/resources/image_to_video.py @@ -55,7 +55,18 @@ def create( *, model: Literal["gen4_turbo", "gen3a_turbo", "veo3.1", "veo3.1_fast", "veo3"], prompt_image: Union[str, Iterable[image_to_video_create_params.PromptImagePromptImage]], - ratio: Literal["1280:720", "720:1280", "1104:832", "832:1104", "960:960", "1584:672", "1280:768", "768:1280"], + ratio: Literal[ + "1280:720", + "720:1280", + "1104:832", + "832:1104", + "960:960", + "1584:672", + "1280:768", + "768:1280", + "1080:1920", + "1920:1080", + ], content_moderation: image_to_video_create_params.ContentModeration | Omit = omit, duration: Literal[2, 3, 4, 5, 6, 7, 8, 9, 10] | Omit = omit, prompt_text: str | Omit = omit, @@ -171,7 +182,18 @@ async def create( *, model: Literal["gen4_turbo", "gen3a_turbo", "veo3.1", "veo3.1_fast", "veo3"], prompt_image: Union[str, Iterable[image_to_video_create_params.PromptImagePromptImage]], - ratio: Literal["1280:720", "720:1280", "1104:832", "832:1104", "960:960", "1584:672", "1280:768", "768:1280"], + ratio: Literal[ + "1280:720", + "720:1280", + "1104:832", + "832:1104", + "960:960", + "1584:672", + "1280:768", + "768:1280", + "1080:1920", + "1920:1080", + ], content_moderation: image_to_video_create_params.ContentModeration | Omit = omit, duration: Literal[2, 3, 4, 5, 6, 7, 8, 9, 10] | Omit = omit, prompt_text: str | Omit = omit, diff --git a/src/runwayml/types/image_to_video_create_params.py b/src/runwayml/types/image_to_video_create_params.py index 7da6eb3..9cb9e3a 100644 --- a/src/runwayml/types/image_to_video_create_params.py +++ b/src/runwayml/types/image_to_video_create_params.py @@ -22,7 +22,18 @@ class ImageToVideoCreateParams(TypedDict, total=False): """ ratio: Required[ - Literal["1280:720", "720:1280", "1104:832", "832:1104", "960:960", "1584:672", "1280:768", "768:1280"] + Literal[ + "1280:720", + "720:1280", + "1104:832", + "832:1104", + "960:960", + "1584:672", + "1280:768", + "768:1280", + "1080:1920", + "1920:1080", + ] ] """The resolution of the output video. From ddd0aca58ee63e29cdba6e42001877cbe53cfcd2 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 15 Oct 2025 20:16:18 +0000 Subject: [PATCH 3/3] release: 3.19.0 --- .release-please-manifest.json | 2 +- CHANGELOG.md | 13 +++++++++++++ pyproject.toml | 2 +- src/runwayml/_version.py | 2 +- 4 files changed, 16 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index df3292b..08ebb64 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "3.18.0" + ".": "3.19.0" } \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index 2debb98..14f7d0c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,18 @@ # Changelog +## 3.19.0 (2025-10-15) + +Full Changelog: [v3.18.0...v3.19.0](https://github.com/runwayml/sdk-python/compare/v3.18.0...v3.19.0) + +### Features + +* **api:** Veo 3.1 and Veo 3.1 Fast ([9486ec1](https://github.com/runwayml/sdk-python/commit/9486ec19a5321ef555a498877cbc6811645ad205)) + + +### Bug Fixes + +* **api:** Add missing 1080p sizes ([2c66c5a](https://github.com/runwayml/sdk-python/commit/2c66c5a4d9cdb7c213c7454d2716ba0d81b7d6e8)) + ## 3.18.0 (2025-10-14) Full Changelog: [v3.17.0...v3.18.0](https://github.com/runwayml/sdk-python/compare/v3.17.0...v3.18.0) diff --git a/pyproject.toml b/pyproject.toml index c22f641..2a334f7 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "runwayml" -version = "3.18.0" +version = "3.19.0" description = "The official Python library for the runwayml API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/runwayml/_version.py b/src/runwayml/_version.py index 5392b07..c15dd06 100644 --- a/src/runwayml/_version.py +++ b/src/runwayml/_version.py @@ -1,4 +1,4 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. __title__ = "runwayml" -__version__ = "3.18.0" # x-release-please-version +__version__ = "3.19.0" # x-release-please-version