diff --git a/.release-please-manifest.json b/.release-please-manifest.json index f425d97..8d05042 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "5.5.0" + ".": "5.6.0" } \ No newline at end of file diff --git a/.stats.yml b/.stats.yml index 02f9be2..9ce5d4b 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 50 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/runwayml/runwayml-23ffd494704e138fa0661fe69710c8cb20ba5881471ab1e13cdbf1461c2d6f49.yml -openapi_spec_hash: 26b75f2481835a63237b29404c3b56f1 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/runwayml/runwayml-a3fa61e8bca261af3c51886ce551ccb5442a8c34758a00433e0002acace60acd.yml +openapi_spec_hash: 930007b00f9d434127cba847bd5c4a8e config_hash: 955a0e451964a44778c5c0f54ca1c994 diff --git a/CHANGELOG.md b/CHANGELOG.md index 94c206f..5a9a997 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## 5.6.0 (2026-07-06) + +Full Changelog: [v5.5.0...v5.6.0](https://github.com/runwayml/sdk-python/compare/v5.5.0...v5.6.0) + +### Features + +* **api:** add seedance2_mini and gemini_omni_flash models ([24c83da](https://github.com/runwayml/sdk-python/commit/24c83da8a91d2b22610dcb16a82b0814f6b9cfc8)) + ## 5.5.0 (2026-07-06) Full Changelog: [v5.4.0...v5.5.0](https://github.com/runwayml/sdk-python/compare/v5.4.0...v5.5.0) diff --git a/pyproject.toml b/pyproject.toml index b4dd874..d112ec5 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "runwayml" -version = "5.5.0" +version = "5.6.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 6cba8f7..1df66e6 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__ = "5.5.0" # x-release-please-version +__version__ = "5.6.0" # x-release-please-version diff --git a/src/runwayml/resources/image_to_video.py b/src/runwayml/resources/image_to_video.py index fed95b6..d3cb1ff 100644 --- a/src/runwayml/resources/image_to_video.py +++ b/src/runwayml/resources/image_to_video.py @@ -325,7 +325,7 @@ def create( prompt_image: An image or array of images. Use position `first`/`last` for keyframe mode, or omit position for reference images. The two modes cannot be mixed. - audio: Whether to generate audio for the video. Audio inclusion affects pricing. + audio: Whether to generate audio for the video. duration: The number of seconds of duration for the output video. @@ -386,7 +386,7 @@ def create( prompt_image: An image or array of images. Use position `first`/`last` for keyframe mode, or omit position for reference images. The two modes cannot be mixed. - audio: Whether to generate audio for the video. Audio inclusion affects pricing. + audio: Whether to generate audio for the video. duration: The number of seconds of duration for the output video. @@ -409,6 +409,109 @@ def create( """ ... + @overload + def create( + self, + *, + model: Literal["seedance2_mini"], + prompt_image: Union[str, Iterable[image_to_video_create_params.Seedance2MiniPromptImagePromptImage]], + audio: bool | Omit = omit, + duration: int | Omit = omit, + prompt_text: str | Omit = omit, + ratio: Literal[ + "992:432", + "864:496", + "752:560", + "640:640", + "560:752", + "496:864", + "1470:630", + "1280:720", + "1112:834", + "960:960", + "834:1112", + "720:1280", + ] + | Omit = omit, + reference_audio: Iterable[image_to_video_create_params.Seedance2MiniReferenceAudio] | 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. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = not_given, + ) -> NewTaskCreatedResponse: + """ + This endpoint will start a new task to generate a video from an image. + + Args: + prompt_image: An image or array of images. Use position `first`/`last` for keyframe mode, or + omit position for reference images. The two modes cannot be mixed. + + audio: Whether to generate audio for the video. + + duration: The number of seconds of duration for the output video. + + prompt_text: An optional text prompt up to 3500 characters describing what should appear in + the output. + + ratio: The resolution of the output video. Seedance 2.0 Mini supports 480p and 720p + only. + + reference_audio: An optional array of audio references. Audio references require a text prompt, + and the total combined duration must not exceed 15 seconds. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + ... + + @overload + def create( + self, + *, + model: Literal["gemini_omni_flash"], + prompt_image: Union[str, Iterable[image_to_video_create_params.GeminiOmniFlashPromptImagePromptImage]], + duration: int | Omit = omit, + prompt_text: str | Omit = omit, + ratio: Literal["1280:720", "720:1280"] | 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. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = not_given, + ) -> NewTaskCreatedResponse: + """ + This endpoint will start a new task to generate a video from an image. + + Args: + prompt_image: An image to use as the first frame of the output video. Gemini Omni Flash only + supports a first frame. + + duration: The duration of the output video in seconds, as a whole number from 3 to 10. + + prompt_text: An optional text prompt describing how the video should evolve from the first + frame. + + ratio: The aspect ratio of the output video: `1280:720` (landscape) or `720:1280` + (portrait). + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + ... + @overload def create( self, @@ -465,6 +568,8 @@ def create( | Literal["happyhorse_1_0"] | Literal["seedance2"] | Literal["seedance2_fast"] + | Literal["seedance2_mini"] + | Literal["gemini_omni_flash"] | Literal["veo3"], prompt_image: Union[str, Iterable[image_to_video_create_params.Gen4_5PromptImagePromptImage]] | Union[str, Iterable[image_to_video_create_params.Gen4TurboPromptImagePromptImage]] @@ -516,6 +621,7 @@ def create( "834:1112", "720:1280", ] + | Literal["1280:720", "720:1280"] | Omit = omit, content_moderation: image_to_video_create_params.Gen4_5ContentModeration | image_to_video_create_params.Gen4TurboContentModeration @@ -525,6 +631,7 @@ def create( resolution: Literal["720P", "1080P"] | Omit = omit, reference_audio: Iterable[image_to_video_create_params.Seedance2ReferenceAudio] | Iterable[image_to_video_create_params.Seedance2FastReferenceAudio] + | Iterable[image_to_video_create_params.Seedance2MiniReferenceAudio] | 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. @@ -852,7 +959,7 @@ async def create( prompt_image: An image or array of images. Use position `first`/`last` for keyframe mode, or omit position for reference images. The two modes cannot be mixed. - audio: Whether to generate audio for the video. Audio inclusion affects pricing. + audio: Whether to generate audio for the video. duration: The number of seconds of duration for the output video. @@ -913,7 +1020,7 @@ async def create( prompt_image: An image or array of images. Use position `first`/`last` for keyframe mode, or omit position for reference images. The two modes cannot be mixed. - audio: Whether to generate audio for the video. Audio inclusion affects pricing. + audio: Whether to generate audio for the video. duration: The number of seconds of duration for the output video. @@ -936,6 +1043,109 @@ async def create( """ ... + @overload + async def create( + self, + *, + model: Literal["seedance2_mini"], + prompt_image: Union[str, Iterable[image_to_video_create_params.Seedance2MiniPromptImagePromptImage]], + audio: bool | Omit = omit, + duration: int | Omit = omit, + prompt_text: str | Omit = omit, + ratio: Literal[ + "992:432", + "864:496", + "752:560", + "640:640", + "560:752", + "496:864", + "1470:630", + "1280:720", + "1112:834", + "960:960", + "834:1112", + "720:1280", + ] + | Omit = omit, + reference_audio: Iterable[image_to_video_create_params.Seedance2MiniReferenceAudio] | 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. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = not_given, + ) -> AsyncNewTaskCreatedResponse: + """ + This endpoint will start a new task to generate a video from an image. + + Args: + prompt_image: An image or array of images. Use position `first`/`last` for keyframe mode, or + omit position for reference images. The two modes cannot be mixed. + + audio: Whether to generate audio for the video. + + duration: The number of seconds of duration for the output video. + + prompt_text: An optional text prompt up to 3500 characters describing what should appear in + the output. + + ratio: The resolution of the output video. Seedance 2.0 Mini supports 480p and 720p + only. + + reference_audio: An optional array of audio references. Audio references require a text prompt, + and the total combined duration must not exceed 15 seconds. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + ... + + @overload + async def create( + self, + *, + model: Literal["gemini_omni_flash"], + prompt_image: Union[str, Iterable[image_to_video_create_params.GeminiOmniFlashPromptImagePromptImage]], + duration: int | Omit = omit, + prompt_text: str | Omit = omit, + ratio: Literal["1280:720", "720:1280"] | 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. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = not_given, + ) -> AsyncNewTaskCreatedResponse: + """ + This endpoint will start a new task to generate a video from an image. + + Args: + prompt_image: An image to use as the first frame of the output video. Gemini Omni Flash only + supports a first frame. + + duration: The duration of the output video in seconds, as a whole number from 3 to 10. + + prompt_text: An optional text prompt describing how the video should evolve from the first + frame. + + ratio: The aspect ratio of the output video: `1280:720` (landscape) or `720:1280` + (portrait). + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + ... + @overload async def create( self, @@ -992,6 +1202,8 @@ async def create( | Literal["happyhorse_1_0"] | Literal["seedance2"] | Literal["seedance2_fast"] + | Literal["seedance2_mini"] + | Literal["gemini_omni_flash"] | Literal["veo3"], prompt_image: Union[str, Iterable[image_to_video_create_params.Gen4_5PromptImagePromptImage]] | Union[str, Iterable[image_to_video_create_params.Gen4TurboPromptImagePromptImage]] @@ -1043,6 +1255,7 @@ async def create( "834:1112", "720:1280", ] + | Literal["1280:720", "720:1280"] | Omit = omit, content_moderation: image_to_video_create_params.Gen4_5ContentModeration | image_to_video_create_params.Gen4TurboContentModeration @@ -1052,6 +1265,7 @@ async def create( resolution: Literal["720P", "1080P"] | Omit = omit, reference_audio: Iterable[image_to_video_create_params.Seedance2ReferenceAudio] | Iterable[image_to_video_create_params.Seedance2FastReferenceAudio] + | Iterable[image_to_video_create_params.Seedance2MiniReferenceAudio] | 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. diff --git a/src/runwayml/resources/text_to_video.py b/src/runwayml/resources/text_to_video.py index a3be537..bbe8422 100644 --- a/src/runwayml/resources/text_to_video.py +++ b/src/runwayml/resources/text_to_video.py @@ -275,7 +275,7 @@ def create( prompt_text: A non-empty text prompt up to 3500 characters describing what should appear in the output. - audio: Whether to generate audio for the video. Audio inclusion affects pricing. + audio: Whether to generate audio for the video. duration: The number of seconds of duration for the output video. @@ -341,7 +341,7 @@ def create( prompt_text: A non-empty text prompt up to 3500 characters describing what should appear in the output. - audio: Whether to generate audio for the video. Audio inclusion affects pricing. + audio: Whether to generate audio for the video. duration: The number of seconds of duration for the output video. @@ -368,6 +368,109 @@ def create( """ ... + @overload + def create( + self, + *, + model: Literal["seedance2_mini"], + prompt_text: str, + audio: bool | Omit = omit, + duration: int | Omit = omit, + ratio: Literal[ + "992:432", + "864:496", + "752:560", + "640:640", + "560:752", + "496:864", + "1470:630", + "1280:720", + "1112:834", + "960:960", + "834:1112", + "720:1280", + ] + | Omit = omit, + reference_audio: Iterable[text_to_video_create_params.Seedance2MiniReferenceAudio] | Omit = omit, + references: Iterable[text_to_video_create_params.Seedance2MiniReference] | Omit = omit, + reference_videos: Iterable[text_to_video_create_params.Seedance2MiniReferenceVideo] | 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. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = not_given, + ) -> NewTaskCreatedResponse: + """ + This endpoint will start a new task to generate a video from a text prompt. + + Args: + prompt_text: A non-empty text prompt up to 3500 characters describing what should appear in + the output. + + audio: Whether to generate audio for the video. + + duration: The number of seconds of duration for the output video. + + ratio: The resolution of the output video. Seedance 2.0 Mini supports 480p and 720p + only. + + reference_audio: An optional array of audio references. Audio references require a text prompt, + and the total combined duration must not exceed 15 seconds. + + references: An optional array of image references (up to 9). See + [our docs](/assets/inputs#images) on image inputs for more information. + + reference_videos: An optional array of video references. The combined duration across all video + references must not exceed 15 seconds. See [our docs](/assets/inputs#videos) on + video inputs for more information. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + ... + + @overload + def create( + self, + *, + model: Literal["gemini_omni_flash"], + prompt_text: str, + duration: int | Omit = omit, + ratio: Literal["1280:720", "720:1280"] | 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. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = not_given, + ) -> NewTaskCreatedResponse: + """ + This endpoint will start a new task to generate a video from a text prompt. + + Args: + prompt_text: A non-empty text prompt describing the video to generate. + + duration: The duration of the output video in seconds, as a whole number from 3 to 10. + + ratio: The aspect ratio of the output video: `1280:720` (landscape) or `720:1280` + (portrait). + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + ... + @overload def create( self, @@ -417,6 +520,8 @@ def create( | Literal["happyhorse_1_0"] | Literal["seedance2"] | Literal["seedance2_fast"] + | Literal["seedance2_mini"] + | Literal["gemini_omni_flash"] | Literal["veo3"], prompt_text: str, ratio: Literal["1280:720", "720:1280"] @@ -479,12 +584,15 @@ def create( audio: bool | Omit = omit, reference_audio: Iterable[text_to_video_create_params.Seedance2ReferenceAudio] | Iterable[text_to_video_create_params.Seedance2FastReferenceAudio] + | Iterable[text_to_video_create_params.Seedance2MiniReferenceAudio] | Omit = omit, references: Iterable[text_to_video_create_params.Seedance2Reference] | Iterable[text_to_video_create_params.Seedance2FastReference] + | Iterable[text_to_video_create_params.Seedance2MiniReference] | Omit = omit, reference_videos: Iterable[text_to_video_create_params.Seedance2ReferenceVideo] | Iterable[text_to_video_create_params.Seedance2FastReferenceVideo] + | Iterable[text_to_video_create_params.Seedance2MiniReferenceVideo] | 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. @@ -762,7 +870,7 @@ async def create( prompt_text: A non-empty text prompt up to 3500 characters describing what should appear in the output. - audio: Whether to generate audio for the video. Audio inclusion affects pricing. + audio: Whether to generate audio for the video. duration: The number of seconds of duration for the output video. @@ -828,7 +936,7 @@ async def create( prompt_text: A non-empty text prompt up to 3500 characters describing what should appear in the output. - audio: Whether to generate audio for the video. Audio inclusion affects pricing. + audio: Whether to generate audio for the video. duration: The number of seconds of duration for the output video. @@ -855,6 +963,109 @@ async def create( """ ... + @overload + async def create( + self, + *, + model: Literal["seedance2_mini"], + prompt_text: str, + audio: bool | Omit = omit, + duration: int | Omit = omit, + ratio: Literal[ + "992:432", + "864:496", + "752:560", + "640:640", + "560:752", + "496:864", + "1470:630", + "1280:720", + "1112:834", + "960:960", + "834:1112", + "720:1280", + ] + | Omit = omit, + reference_audio: Iterable[text_to_video_create_params.Seedance2MiniReferenceAudio] | Omit = omit, + references: Iterable[text_to_video_create_params.Seedance2MiniReference] | Omit = omit, + reference_videos: Iterable[text_to_video_create_params.Seedance2MiniReferenceVideo] | 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. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = not_given, + ) -> AsyncNewTaskCreatedResponse: + """ + This endpoint will start a new task to generate a video from a text prompt. + + Args: + prompt_text: A non-empty text prompt up to 3500 characters describing what should appear in + the output. + + audio: Whether to generate audio for the video. + + duration: The number of seconds of duration for the output video. + + ratio: The resolution of the output video. Seedance 2.0 Mini supports 480p and 720p + only. + + reference_audio: An optional array of audio references. Audio references require a text prompt, + and the total combined duration must not exceed 15 seconds. + + references: An optional array of image references (up to 9). See + [our docs](/assets/inputs#images) on image inputs for more information. + + reference_videos: An optional array of video references. The combined duration across all video + references must not exceed 15 seconds. See [our docs](/assets/inputs#videos) on + video inputs for more information. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + ... + + @overload + async def create( + self, + *, + model: Literal["gemini_omni_flash"], + prompt_text: str, + duration: int | Omit = omit, + ratio: Literal["1280:720", "720:1280"] | 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. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = not_given, + ) -> AsyncNewTaskCreatedResponse: + """ + This endpoint will start a new task to generate a video from a text prompt. + + Args: + prompt_text: A non-empty text prompt describing the video to generate. + + duration: The duration of the output video in seconds, as a whole number from 3 to 10. + + ratio: The aspect ratio of the output video: `1280:720` (landscape) or `720:1280` + (portrait). + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + ... + @overload async def create( self, @@ -904,6 +1115,8 @@ async def create( | Literal["happyhorse_1_0"] | Literal["seedance2"] | Literal["seedance2_fast"] + | Literal["seedance2_mini"] + | Literal["gemini_omni_flash"] | Literal["veo3"], prompt_text: str, ratio: Literal["1280:720", "720:1280"] @@ -966,12 +1179,15 @@ async def create( audio: bool | Omit = omit, reference_audio: Iterable[text_to_video_create_params.Seedance2ReferenceAudio] | Iterable[text_to_video_create_params.Seedance2FastReferenceAudio] + | Iterable[text_to_video_create_params.Seedance2MiniReferenceAudio] | Omit = omit, references: Iterable[text_to_video_create_params.Seedance2Reference] | Iterable[text_to_video_create_params.Seedance2FastReference] + | Iterable[text_to_video_create_params.Seedance2MiniReference] | Omit = omit, reference_videos: Iterable[text_to_video_create_params.Seedance2ReferenceVideo] | Iterable[text_to_video_create_params.Seedance2FastReferenceVideo] + | Iterable[text_to_video_create_params.Seedance2MiniReferenceVideo] | 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. diff --git a/src/runwayml/resources/video_to_video.py b/src/runwayml/resources/video_to_video.py index 1c8a4dd..3de0e88 100644 --- a/src/runwayml/resources/video_to_video.py +++ b/src/runwayml/resources/video_to_video.py @@ -153,7 +153,7 @@ def create( Args: prompt_video: A HTTPS URL. - audio: Whether to generate audio for the video. Audio inclusion affects pricing. + audio: Whether to generate audio for the video. duration: The number of seconds of duration for the output video. @@ -222,7 +222,7 @@ def create( Args: prompt_video: A HTTPS URL. - audio: Whether to generate audio for the video. Audio inclusion affects pricing. + audio: Whether to generate audio for the video. duration: The number of seconds of duration for the output video. @@ -252,11 +252,120 @@ def create( """ ... - @required_args(["model", "video_uri"], ["model", "prompt_video"]) + @overload + def create( + self, + *, + model: Literal["seedance2_mini"], + prompt_video: str, + audio: bool | Omit = omit, + duration: int | Omit = omit, + prompt_text: str | Omit = omit, + ratio: Literal[ + "992:432", + "864:496", + "752:560", + "640:640", + "560:752", + "496:864", + "1470:630", + "1280:720", + "1112:834", + "960:960", + "834:1112", + "720:1280", + ] + | Omit = omit, + reference_audio: Iterable[video_to_video_create_params.Seedance2MiniReferenceAudio] | Omit = omit, + references: Iterable[video_to_video_create_params.Seedance2MiniReference] | Omit = omit, + reference_videos: Iterable[video_to_video_create_params.Seedance2MiniReferenceVideo] | 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. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = not_given, + ) -> NewTaskCreatedResponse: + """ + This endpoint will start a new task to generate a video from a video. + + Args: + prompt_video: A HTTPS URL. + + audio: Whether to generate audio for the video. + + duration: The number of seconds of duration for the output video. + + prompt_text: An optional text prompt up to 3500 characters describing what should appear in + the output. + + ratio: The resolution of the output video. Seedance 2.0 Mini supports 480p and 720p + only. + + reference_audio: An optional array of audio references. Audio references require a text prompt, + and the total combined duration must not exceed 15 seconds. + + references: An optional array of image references (up to 9). See + [our docs](/assets/inputs#images) on image inputs for more information. + + reference_videos: An optional array of video references. The combined duration across all video + references must not exceed 15 seconds. See [our docs](/assets/inputs#videos) on + video inputs for more information. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + ... + + @overload + def create( + self, + *, + model: Literal["gemini_omni_flash"], + prompt_text: str, + video_uri: str, + references: Iterable[video_to_video_create_params.GeminiOmniFlashReference] | 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. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = not_given, + ) -> NewTaskCreatedResponse: + """ + This endpoint will start a new task to generate a video from a video. + + Args: + prompt_text: A non-empty instruction describing the edit to apply. + + video_uri: A HTTPS URL. + + references: An optional array of image references to guide the edit. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + ... + + @required_args(["model", "video_uri"], ["model", "prompt_video"], ["model", "prompt_text", "video_uri"]) def create( self, *, - model: Literal["aleph2"] | Literal["seedance2"] | Literal["seedance2_fast"], + model: Literal["aleph2"] + | Literal["seedance2"] + | Literal["seedance2_fast"] + | Literal["seedance2_mini"] + | Literal["gemini_omni_flash"], video_uri: str | Omit = omit, content_moderation: video_to_video_create_params.Variant0ContentModeration | Omit = omit, keyframes: Iterable[video_to_video_create_params.Variant0Keyframe] | Omit = omit, @@ -310,12 +419,16 @@ def create( duration: int | Omit = omit, reference_audio: Iterable[video_to_video_create_params.Seedance2ReferenceAudio] | Iterable[video_to_video_create_params.Seedance2FastReferenceAudio] + | Iterable[video_to_video_create_params.Seedance2MiniReferenceAudio] | Omit = omit, references: Iterable[video_to_video_create_params.Seedance2Reference] | Iterable[video_to_video_create_params.Seedance2FastReference] + | Iterable[video_to_video_create_params.Seedance2MiniReference] + | Iterable[video_to_video_create_params.GeminiOmniFlashReference] | Omit = omit, reference_videos: Iterable[video_to_video_create_params.Seedance2ReferenceVideo] | Iterable[video_to_video_create_params.Seedance2FastReferenceVideo] + | Iterable[video_to_video_create_params.Seedance2MiniReferenceVideo] | 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. @@ -475,7 +588,7 @@ async def create( Args: prompt_video: A HTTPS URL. - audio: Whether to generate audio for the video. Audio inclusion affects pricing. + audio: Whether to generate audio for the video. duration: The number of seconds of duration for the output video. @@ -544,7 +657,7 @@ async def create( Args: prompt_video: A HTTPS URL. - audio: Whether to generate audio for the video. Audio inclusion affects pricing. + audio: Whether to generate audio for the video. duration: The number of seconds of duration for the output video. @@ -574,11 +687,120 @@ async def create( """ ... - @required_args(["model", "video_uri"], ["model", "prompt_video"]) + @overload + async def create( + self, + *, + model: Literal["seedance2_mini"], + prompt_video: str, + audio: bool | Omit = omit, + duration: int | Omit = omit, + prompt_text: str | Omit = omit, + ratio: Literal[ + "992:432", + "864:496", + "752:560", + "640:640", + "560:752", + "496:864", + "1470:630", + "1280:720", + "1112:834", + "960:960", + "834:1112", + "720:1280", + ] + | Omit = omit, + reference_audio: Iterable[video_to_video_create_params.Seedance2MiniReferenceAudio] | Omit = omit, + references: Iterable[video_to_video_create_params.Seedance2MiniReference] | Omit = omit, + reference_videos: Iterable[video_to_video_create_params.Seedance2MiniReferenceVideo] | 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. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = not_given, + ) -> AsyncNewTaskCreatedResponse: + """ + This endpoint will start a new task to generate a video from a video. + + Args: + prompt_video: A HTTPS URL. + + audio: Whether to generate audio for the video. + + duration: The number of seconds of duration for the output video. + + prompt_text: An optional text prompt up to 3500 characters describing what should appear in + the output. + + ratio: The resolution of the output video. Seedance 2.0 Mini supports 480p and 720p + only. + + reference_audio: An optional array of audio references. Audio references require a text prompt, + and the total combined duration must not exceed 15 seconds. + + references: An optional array of image references (up to 9). See + [our docs](/assets/inputs#images) on image inputs for more information. + + reference_videos: An optional array of video references. The combined duration across all video + references must not exceed 15 seconds. See [our docs](/assets/inputs#videos) on + video inputs for more information. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + ... + + @overload + async def create( + self, + *, + model: Literal["gemini_omni_flash"], + prompt_text: str, + video_uri: str, + references: Iterable[video_to_video_create_params.GeminiOmniFlashReference] | 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. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = not_given, + ) -> AsyncNewTaskCreatedResponse: + """ + This endpoint will start a new task to generate a video from a video. + + Args: + prompt_text: A non-empty instruction describing the edit to apply. + + video_uri: A HTTPS URL. + + references: An optional array of image references to guide the edit. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + ... + + @required_args(["model", "video_uri"], ["model", "prompt_video"], ["model", "prompt_text", "video_uri"]) async def create( self, *, - model: Literal["aleph2"] | Literal["seedance2"] | Literal["seedance2_fast"], + model: Literal["aleph2"] + | Literal["seedance2"] + | Literal["seedance2_fast"] + | Literal["seedance2_mini"] + | Literal["gemini_omni_flash"], video_uri: str | Omit = omit, content_moderation: video_to_video_create_params.Variant0ContentModeration | Omit = omit, keyframes: Iterable[video_to_video_create_params.Variant0Keyframe] | Omit = omit, @@ -632,12 +854,16 @@ async def create( duration: int | Omit = omit, reference_audio: Iterable[video_to_video_create_params.Seedance2ReferenceAudio] | Iterable[video_to_video_create_params.Seedance2FastReferenceAudio] + | Iterable[video_to_video_create_params.Seedance2MiniReferenceAudio] | Omit = omit, references: Iterable[video_to_video_create_params.Seedance2Reference] | Iterable[video_to_video_create_params.Seedance2FastReference] + | Iterable[video_to_video_create_params.Seedance2MiniReference] + | Iterable[video_to_video_create_params.GeminiOmniFlashReference] | Omit = omit, reference_videos: Iterable[video_to_video_create_params.Seedance2ReferenceVideo] | Iterable[video_to_video_create_params.Seedance2FastReferenceVideo] + | Iterable[video_to_video_create_params.Seedance2MiniReferenceVideo] | 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. diff --git a/src/runwayml/types/image_to_video_create_params.py b/src/runwayml/types/image_to_video_create_params.py index 9fb609a..8ad6bdd 100644 --- a/src/runwayml/types/image_to_video_create_params.py +++ b/src/runwayml/types/image_to_video_create_params.py @@ -27,6 +27,11 @@ "Seedance2Fast", "Seedance2FastPromptImagePromptImage", "Seedance2FastReferenceAudio", + "Seedance2Mini", + "Seedance2MiniPromptImagePromptImage", + "Seedance2MiniReferenceAudio", + "GeminiOmniFlash", + "GeminiOmniFlashPromptImagePromptImage", "Veo3", "Veo3PromptImagePromptImage", ] @@ -266,7 +271,7 @@ class Seedance2(TypedDict, total=False): """ audio: bool - """Whether to generate audio for the video. Audio inclusion affects pricing.""" + """Whether to generate audio for the video.""" duration: int """The number of seconds of duration for the output video.""" @@ -349,7 +354,7 @@ class Seedance2Fast(TypedDict, total=False): """ audio: bool - """Whether to generate audio for the video. Audio inclusion affects pricing.""" + """Whether to generate audio for the video.""" duration: int """The number of seconds of duration for the output video.""" @@ -410,6 +415,118 @@ class Seedance2FastReferenceAudio(TypedDict, total=False): """A HTTPS URL.""" +class Seedance2Mini(TypedDict, total=False): + model: Required[Literal["seedance2_mini"]] + + prompt_image: Required[ + Annotated[Union[str, Iterable[Seedance2MiniPromptImagePromptImage]], PropertyInfo(alias="promptImage")] + ] + """An image or array of images. + + Use position `first`/`last` for keyframe mode, or omit position for reference + images. The two modes cannot be mixed. + """ + + audio: bool + """Whether to generate audio for the video.""" + + duration: int + """The number of seconds of duration for the output video.""" + + prompt_text: Annotated[str, PropertyInfo(alias="promptText")] + """ + An optional text prompt up to 3500 characters describing what should appear in + the output. + """ + + ratio: Literal[ + "992:432", + "864:496", + "752:560", + "640:640", + "560:752", + "496:864", + "1470:630", + "1280:720", + "1112:834", + "960:960", + "834:1112", + "720:1280", + ] + """The resolution of the output video. + + Seedance 2.0 Mini supports 480p and 720p only. + """ + + reference_audio: Annotated[Iterable[Seedance2MiniReferenceAudio], PropertyInfo(alias="referenceAudio")] + """An optional array of audio references. + + Audio references require a text prompt, and the total combined duration must not + exceed 15 seconds. + """ + + +class Seedance2MiniPromptImagePromptImage(TypedDict, total=False): + uri: Required[str] + """A HTTPS URL.""" + + position: Literal["first", "last"] + """The position of the image in the output video. + + "first" will use the image as the first frame, "last" as the last frame. Omit + for a reference image. + """ + + +class Seedance2MiniReferenceAudio(TypedDict, total=False): + """ + An audio reference allows the model to use the audio as additional context for the output. + """ + + type: Required[Literal["audio"]] + + uri: Required[str] + """A HTTPS URL.""" + + +class GeminiOmniFlash(TypedDict, total=False): + model: Required[Literal["gemini_omni_flash"]] + + prompt_image: Required[ + Annotated[Union[str, Iterable[GeminiOmniFlashPromptImagePromptImage]], PropertyInfo(alias="promptImage")] + ] + """An image to use as the first frame of the output video. + + Gemini Omni Flash only supports a first frame. + """ + + duration: int + """The duration of the output video in seconds, as a whole number from 3 to 10.""" + + prompt_text: Annotated[str, PropertyInfo(alias="promptText")] + """ + An optional text prompt describing how the video should evolve from the first + frame. + """ + + ratio: Literal["1280:720", "720:1280"] + """ + The aspect ratio of the output video: `1280:720` (landscape) or `720:1280` + (portrait). + """ + + +class GeminiOmniFlashPromptImagePromptImage(TypedDict, total=False): + position: Required[Literal["first"]] + """The position of the image in the output video. + + "first" will use the image as the first frame of the video. + """ + + uri: Required[str] + """A HTTPS URL.""" + + class Veo3(TypedDict, total=False): duration: Required[Literal[8]] """The number of seconds of duration for the output video.""" @@ -443,5 +560,5 @@ class Veo3PromptImagePromptImage(TypedDict, total=False): ImageToVideoCreateParams: TypeAlias = Union[ - Gen4_5, Gen4Turbo, Veo3_1, Veo3_1Fast, Happyhorse1_0, Seedance2, Seedance2Fast, Veo3 + Gen4_5, Gen4Turbo, Veo3_1, Veo3_1Fast, Happyhorse1_0, Seedance2, Seedance2Fast, Seedance2Mini, GeminiOmniFlash, Veo3 ] diff --git a/src/runwayml/types/text_to_video_create_params.py b/src/runwayml/types/text_to_video_create_params.py index d294de1..ff810b6 100644 --- a/src/runwayml/types/text_to_video_create_params.py +++ b/src/runwayml/types/text_to_video_create_params.py @@ -22,6 +22,11 @@ "Seedance2FastReferenceAudio", "Seedance2FastReference", "Seedance2FastReferenceVideo", + "Seedance2Mini", + "Seedance2MiniReferenceAudio", + "Seedance2MiniReference", + "Seedance2MiniReferenceVideo", + "GeminiOmniFlash", "Veo3", ] @@ -141,7 +146,7 @@ class Seedance2(TypedDict, total=False): """ audio: bool - """Whether to generate audio for the video. Audio inclusion affects pricing.""" + """Whether to generate audio for the video.""" duration: int """The number of seconds of duration for the output video.""" @@ -232,7 +237,7 @@ class Seedance2Fast(TypedDict, total=False): """ audio: bool - """Whether to generate audio for the video. Audio inclusion affects pricing.""" + """Whether to generate audio for the video.""" duration: int """The number of seconds of duration for the output video.""" @@ -304,6 +309,104 @@ class Seedance2FastReferenceVideo(TypedDict, total=False): """A HTTPS URL.""" +class Seedance2Mini(TypedDict, total=False): + model: Required[Literal["seedance2_mini"]] + + prompt_text: Required[Annotated[str, PropertyInfo(alias="promptText")]] + """ + A non-empty text prompt up to 3500 characters describing what should appear in + the output. + """ + + audio: bool + """Whether to generate audio for the video.""" + + duration: int + """The number of seconds of duration for the output video.""" + + ratio: Literal[ + "992:432", + "864:496", + "752:560", + "640:640", + "560:752", + "496:864", + "1470:630", + "1280:720", + "1112:834", + "960:960", + "834:1112", + "720:1280", + ] + """The resolution of the output video. + + Seedance 2.0 Mini supports 480p and 720p only. + """ + + reference_audio: Annotated[Iterable[Seedance2MiniReferenceAudio], PropertyInfo(alias="referenceAudio")] + """An optional array of audio references. + + Audio references require a text prompt, and the total combined duration must not + exceed 15 seconds. + """ + + references: Iterable[Seedance2MiniReference] + """An optional array of image references (up to 9). + + See [our docs](/assets/inputs#images) on image inputs for more information. + """ + + reference_videos: Annotated[Iterable[Seedance2MiniReferenceVideo], PropertyInfo(alias="referenceVideos")] + """An optional array of video references. + + The combined duration across all video references must not exceed 15 seconds. + See [our docs](/assets/inputs#videos) on video inputs for more information. + """ + + +class Seedance2MiniReferenceAudio(TypedDict, total=False): + """ + An audio reference allows the model to use the audio as additional context for the output. + """ + + type: Required[Literal["audio"]] + + uri: Required[str] + """A HTTPS URL.""" + + +class Seedance2MiniReference(TypedDict, total=False): + uri: Required[str] + """A HTTPS URL.""" + + +class Seedance2MiniReferenceVideo(TypedDict, total=False): + """ + A video reference allows the model to use the video as additional context for the output. + """ + + type: Required[Literal["video"]] + + uri: Required[str] + """A HTTPS URL.""" + + +class GeminiOmniFlash(TypedDict, total=False): + model: Required[Literal["gemini_omni_flash"]] + + prompt_text: Required[Annotated[str, PropertyInfo(alias="promptText")]] + """A non-empty text prompt describing the video to generate.""" + + duration: int + """The duration of the output video in seconds, as a whole number from 3 to 10.""" + + ratio: Literal["1280:720", "720:1280"] + """ + The aspect ratio of the output video: `1280:720` (landscape) or `720:1280` + (portrait). + """ + + class Veo3(TypedDict, total=False): duration: Required[Literal[8]] """The number of seconds of duration for the output video.""" @@ -320,4 +423,6 @@ class Veo3(TypedDict, total=False): """The resolution of the output video.""" -TextToVideoCreateParams: TypeAlias = Union[Gen4_5, Veo3_1, Veo3_1Fast, Happyhorse1_0, Seedance2, Seedance2Fast, Veo3] +TextToVideoCreateParams: TypeAlias = Union[ + Gen4_5, Veo3_1, Veo3_1Fast, Happyhorse1_0, Seedance2, Seedance2Fast, Seedance2Mini, GeminiOmniFlash, Veo3 +] diff --git a/src/runwayml/types/video_to_video_create_params.py b/src/runwayml/types/video_to_video_create_params.py index c345785..d1906c6 100644 --- a/src/runwayml/types/video_to_video_create_params.py +++ b/src/runwayml/types/video_to_video_create_params.py @@ -13,7 +13,9 @@ "Variant0ContentModeration", "Variant0Keyframe", "Variant0KeyframeUnionMember0", + "Variant0KeyframeUnionMember0Range", "Variant0KeyframeUnionMember1", + "Variant0KeyframeUnionMember1Range", "Seedance2", "Seedance2ReferenceAudio", "Seedance2Reference", @@ -22,6 +24,12 @@ "Seedance2FastReferenceAudio", "Seedance2FastReference", "Seedance2FastReferenceVideo", + "Seedance2Mini", + "Seedance2MiniReferenceAudio", + "Seedance2MiniReference", + "Seedance2MiniReferenceVideo", + "GeminiOmniFlash", + "GeminiOmniFlashReference", ] @@ -72,6 +80,22 @@ class Variant0ContentModeration(TypedDict, total=False): """ +class Variant0KeyframeUnionMember0Range(TypedDict, total=False): + """Optional edit window. + + When set, the edit applies only to this time range and the keyframe timestamp must fall within it. All keyframes must either set a range or none may. + """ + + end_seconds: Required[int] + """ + End of the edit window (exclusive) in whole seconds from the start of the input + video. + """ + + start_seconds: Required[int] + """Start of the edit window in whole seconds from the start of the input video.""" + + class Variant0KeyframeUnionMember0(TypedDict, total=False): seconds: Required[float] """ @@ -82,6 +106,29 @@ class Variant0KeyframeUnionMember0(TypedDict, total=False): uri: Required[str] """A HTTPS URL.""" + range: Variant0KeyframeUnionMember0Range + """Optional edit window. + + When set, the edit applies only to this time range and the keyframe timestamp + must fall within it. All keyframes must either set a range or none may. + """ + + +class Variant0KeyframeUnionMember1Range(TypedDict, total=False): + """Optional edit window. + + When set, the edit applies only to this time range and the keyframe timestamp must fall within it. All keyframes must either set a range or none may. + """ + + end_seconds: Required[int] + """ + End of the edit window (exclusive) in whole seconds from the start of the input + video. + """ + + start_seconds: Required[int] + """Start of the edit window in whole seconds from the start of the input video.""" + class Variant0KeyframeUnionMember1(TypedDict, total=False): at: Required[float] @@ -93,6 +140,13 @@ class Variant0KeyframeUnionMember1(TypedDict, total=False): uri: Required[str] """A HTTPS URL.""" + range: Variant0KeyframeUnionMember1Range + """Optional edit window. + + When set, the edit applies only to this time range and the keyframe timestamp + must fall within it. All keyframes must either set a range or none may. + """ + Variant0Keyframe: TypeAlias = Union[Variant0KeyframeUnionMember0, Variant0KeyframeUnionMember1] @@ -104,7 +158,7 @@ class Seedance2(TypedDict, total=False): """A HTTPS URL.""" audio: bool - """Whether to generate audio for the video. Audio inclusion affects pricing.""" + """Whether to generate audio for the video.""" duration: int """The number of seconds of duration for the output video.""" @@ -198,7 +252,7 @@ class Seedance2Fast(TypedDict, total=False): """A HTTPS URL.""" audio: bool - """Whether to generate audio for the video. Audio inclusion affects pricing.""" + """Whether to generate audio for the video.""" duration: int """The number of seconds of duration for the output video.""" @@ -276,4 +330,107 @@ class Seedance2FastReferenceVideo(TypedDict, total=False): """A HTTPS URL.""" -VideoToVideoCreateParams: TypeAlias = Union[Variant0, Seedance2, Seedance2Fast] +class Seedance2Mini(TypedDict, total=False): + model: Required[Literal["seedance2_mini"]] + + prompt_video: Required[Annotated[str, PropertyInfo(alias="promptVideo")]] + """A HTTPS URL.""" + + audio: bool + """Whether to generate audio for the video.""" + + duration: int + """The number of seconds of duration for the output video.""" + + prompt_text: Annotated[str, PropertyInfo(alias="promptText")] + """ + An optional text prompt up to 3500 characters describing what should appear in + the output. + """ + + ratio: Literal[ + "992:432", + "864:496", + "752:560", + "640:640", + "560:752", + "496:864", + "1470:630", + "1280:720", + "1112:834", + "960:960", + "834:1112", + "720:1280", + ] + """The resolution of the output video. + + Seedance 2.0 Mini supports 480p and 720p only. + """ + + reference_audio: Annotated[Iterable[Seedance2MiniReferenceAudio], PropertyInfo(alias="referenceAudio")] + """An optional array of audio references. + + Audio references require a text prompt, and the total combined duration must not + exceed 15 seconds. + """ + + references: Iterable[Seedance2MiniReference] + """An optional array of image references (up to 9). + + See [our docs](/assets/inputs#images) on image inputs for more information. + """ + + reference_videos: Annotated[Iterable[Seedance2MiniReferenceVideo], PropertyInfo(alias="referenceVideos")] + """An optional array of video references. + + The combined duration across all video references must not exceed 15 seconds. + See [our docs](/assets/inputs#videos) on video inputs for more information. + """ + + +class Seedance2MiniReferenceAudio(TypedDict, total=False): + """ + An audio reference allows the model to use the audio as additional context for the output. + """ + + type: Required[Literal["audio"]] + + uri: Required[str] + """A HTTPS URL.""" + + +class Seedance2MiniReference(TypedDict, total=False): + uri: Required[str] + """A HTTPS URL.""" + + +class Seedance2MiniReferenceVideo(TypedDict, total=False): + """ + A video reference allows the model to use the video as additional context for the output. + """ + + type: Required[Literal["video"]] + + uri: Required[str] + """A HTTPS URL.""" + + +class GeminiOmniFlash(TypedDict, total=False): + model: Required[Literal["gemini_omni_flash"]] + + prompt_text: Required[Annotated[str, PropertyInfo(alias="promptText")]] + """A non-empty instruction describing the edit to apply.""" + + video_uri: Required[Annotated[str, PropertyInfo(alias="videoUri")]] + """A HTTPS URL.""" + + references: Iterable[GeminiOmniFlashReference] + """An optional array of image references to guide the edit.""" + + +class GeminiOmniFlashReference(TypedDict, total=False): + uri: Required[str] + """A HTTPS URL.""" + + +VideoToVideoCreateParams: TypeAlias = Union[Variant0, Seedance2, Seedance2Fast, Seedance2Mini, GeminiOmniFlash] diff --git a/tests/api_resources/test_image_to_video.py b/tests/api_resources/test_image_to_video.py index 7b32f2c..85c1107 100644 --- a/tests/api_resources/test_image_to_video.py +++ b/tests/api_resources/test_image_to_video.py @@ -372,6 +372,103 @@ def test_streaming_response_create_overload_7(self, client: RunwayML) -> None: @parametrize def test_method_create_overload_8(self, client: RunwayML) -> None: + image_to_video = client.image_to_video.create( + model="seedance2_mini", + prompt_image="https://example.com/file", + ) + assert_matches_type(ImageToVideoCreateResponse, image_to_video, path=["response"]) + + @parametrize + def test_method_create_with_all_params_overload_8(self, client: RunwayML) -> None: + image_to_video = client.image_to_video.create( + model="seedance2_mini", + prompt_image="https://example.com/file", + audio=True, + duration=4, + prompt_text="x", + ratio="992:432", + reference_audio=[ + { + "type": "audio", + "uri": "https://example.com/file", + } + ], + ) + assert_matches_type(ImageToVideoCreateResponse, image_to_video, path=["response"]) + + @parametrize + def test_raw_response_create_overload_8(self, client: RunwayML) -> None: + response = client.image_to_video.with_raw_response.create( + model="seedance2_mini", + prompt_image="https://example.com/file", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + image_to_video = response.parse() + assert_matches_type(ImageToVideoCreateResponse, image_to_video, path=["response"]) + + @parametrize + def test_streaming_response_create_overload_8(self, client: RunwayML) -> None: + with client.image_to_video.with_streaming_response.create( + model="seedance2_mini", + prompt_image="https://example.com/file", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + image_to_video = response.parse() + assert_matches_type(ImageToVideoCreateResponse, image_to_video, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + def test_method_create_overload_9(self, client: RunwayML) -> None: + image_to_video = client.image_to_video.create( + model="gemini_omni_flash", + prompt_image="https://example.com/file", + ) + assert_matches_type(ImageToVideoCreateResponse, image_to_video, path=["response"]) + + @parametrize + def test_method_create_with_all_params_overload_9(self, client: RunwayML) -> None: + image_to_video = client.image_to_video.create( + model="gemini_omni_flash", + prompt_image="https://example.com/file", + duration=3, + prompt_text="x", + ratio="1280:720", + ) + assert_matches_type(ImageToVideoCreateResponse, image_to_video, path=["response"]) + + @parametrize + def test_raw_response_create_overload_9(self, client: RunwayML) -> None: + response = client.image_to_video.with_raw_response.create( + model="gemini_omni_flash", + prompt_image="https://example.com/file", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + image_to_video = response.parse() + assert_matches_type(ImageToVideoCreateResponse, image_to_video, path=["response"]) + + @parametrize + def test_streaming_response_create_overload_9(self, client: RunwayML) -> None: + with client.image_to_video.with_streaming_response.create( + model="gemini_omni_flash", + prompt_image="https://example.com/file", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + image_to_video = response.parse() + assert_matches_type(ImageToVideoCreateResponse, image_to_video, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + def test_method_create_overload_10(self, client: RunwayML) -> None: image_to_video = client.image_to_video.create( duration=8, model="veo3", @@ -381,7 +478,7 @@ def test_method_create_overload_8(self, client: RunwayML) -> None: assert_matches_type(ImageToVideoCreateResponse, image_to_video, path=["response"]) @parametrize - def test_method_create_with_all_params_overload_8(self, client: RunwayML) -> None: + def test_method_create_with_all_params_overload_10(self, client: RunwayML) -> None: image_to_video = client.image_to_video.create( duration=8, model="veo3", @@ -392,7 +489,7 @@ def test_method_create_with_all_params_overload_8(self, client: RunwayML) -> Non assert_matches_type(ImageToVideoCreateResponse, image_to_video, path=["response"]) @parametrize - def test_raw_response_create_overload_8(self, client: RunwayML) -> None: + def test_raw_response_create_overload_10(self, client: RunwayML) -> None: response = client.image_to_video.with_raw_response.create( duration=8, model="veo3", @@ -406,7 +503,7 @@ def test_raw_response_create_overload_8(self, client: RunwayML) -> None: assert_matches_type(ImageToVideoCreateResponse, image_to_video, path=["response"]) @parametrize - def test_streaming_response_create_overload_8(self, client: RunwayML) -> None: + def test_streaming_response_create_overload_10(self, client: RunwayML) -> None: with client.image_to_video.with_streaming_response.create( duration=8, model="veo3", @@ -782,6 +879,103 @@ async def test_streaming_response_create_overload_7(self, async_client: AsyncRun @parametrize async def test_method_create_overload_8(self, async_client: AsyncRunwayML) -> None: + image_to_video = await async_client.image_to_video.create( + model="seedance2_mini", + prompt_image="https://example.com/file", + ) + assert_matches_type(ImageToVideoCreateResponse, image_to_video, path=["response"]) + + @parametrize + async def test_method_create_with_all_params_overload_8(self, async_client: AsyncRunwayML) -> None: + image_to_video = await async_client.image_to_video.create( + model="seedance2_mini", + prompt_image="https://example.com/file", + audio=True, + duration=4, + prompt_text="x", + ratio="992:432", + reference_audio=[ + { + "type": "audio", + "uri": "https://example.com/file", + } + ], + ) + assert_matches_type(ImageToVideoCreateResponse, image_to_video, path=["response"]) + + @parametrize + async def test_raw_response_create_overload_8(self, async_client: AsyncRunwayML) -> None: + response = await async_client.image_to_video.with_raw_response.create( + model="seedance2_mini", + prompt_image="https://example.com/file", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + image_to_video = await response.parse() + assert_matches_type(ImageToVideoCreateResponse, image_to_video, path=["response"]) + + @parametrize + async def test_streaming_response_create_overload_8(self, async_client: AsyncRunwayML) -> None: + async with async_client.image_to_video.with_streaming_response.create( + model="seedance2_mini", + prompt_image="https://example.com/file", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + image_to_video = await response.parse() + assert_matches_type(ImageToVideoCreateResponse, image_to_video, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + async def test_method_create_overload_9(self, async_client: AsyncRunwayML) -> None: + image_to_video = await async_client.image_to_video.create( + model="gemini_omni_flash", + prompt_image="https://example.com/file", + ) + assert_matches_type(ImageToVideoCreateResponse, image_to_video, path=["response"]) + + @parametrize + async def test_method_create_with_all_params_overload_9(self, async_client: AsyncRunwayML) -> None: + image_to_video = await async_client.image_to_video.create( + model="gemini_omni_flash", + prompt_image="https://example.com/file", + duration=3, + prompt_text="x", + ratio="1280:720", + ) + assert_matches_type(ImageToVideoCreateResponse, image_to_video, path=["response"]) + + @parametrize + async def test_raw_response_create_overload_9(self, async_client: AsyncRunwayML) -> None: + response = await async_client.image_to_video.with_raw_response.create( + model="gemini_omni_flash", + prompt_image="https://example.com/file", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + image_to_video = await response.parse() + assert_matches_type(ImageToVideoCreateResponse, image_to_video, path=["response"]) + + @parametrize + async def test_streaming_response_create_overload_9(self, async_client: AsyncRunwayML) -> None: + async with async_client.image_to_video.with_streaming_response.create( + model="gemini_omni_flash", + prompt_image="https://example.com/file", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + image_to_video = await response.parse() + assert_matches_type(ImageToVideoCreateResponse, image_to_video, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + async def test_method_create_overload_10(self, async_client: AsyncRunwayML) -> None: image_to_video = await async_client.image_to_video.create( duration=8, model="veo3", @@ -791,7 +985,7 @@ async def test_method_create_overload_8(self, async_client: AsyncRunwayML) -> No assert_matches_type(ImageToVideoCreateResponse, image_to_video, path=["response"]) @parametrize - async def test_method_create_with_all_params_overload_8(self, async_client: AsyncRunwayML) -> None: + async def test_method_create_with_all_params_overload_10(self, async_client: AsyncRunwayML) -> None: image_to_video = await async_client.image_to_video.create( duration=8, model="veo3", @@ -802,7 +996,7 @@ async def test_method_create_with_all_params_overload_8(self, async_client: Asyn assert_matches_type(ImageToVideoCreateResponse, image_to_video, path=["response"]) @parametrize - async def test_raw_response_create_overload_8(self, async_client: AsyncRunwayML) -> None: + async def test_raw_response_create_overload_10(self, async_client: AsyncRunwayML) -> None: response = await async_client.image_to_video.with_raw_response.create( duration=8, model="veo3", @@ -816,7 +1010,7 @@ async def test_raw_response_create_overload_8(self, async_client: AsyncRunwayML) assert_matches_type(ImageToVideoCreateResponse, image_to_video, path=["response"]) @parametrize - async def test_streaming_response_create_overload_8(self, async_client: AsyncRunwayML) -> None: + async def test_streaming_response_create_overload_10(self, async_client: AsyncRunwayML) -> None: async with async_client.image_to_video.with_streaming_response.create( duration=8, model="veo3", diff --git a/tests/api_resources/test_text_to_video.py b/tests/api_resources/test_text_to_video.py index 45257ca..fdf5ed8 100644 --- a/tests/api_resources/test_text_to_video.py +++ b/tests/api_resources/test_text_to_video.py @@ -327,6 +327,108 @@ def test_streaming_response_create_overload_6(self, client: RunwayML) -> None: @parametrize def test_method_create_overload_7(self, client: RunwayML) -> None: + text_to_video = client.text_to_video.create( + model="seedance2_mini", + prompt_text="x", + ) + assert_matches_type(TextToVideoCreateResponse, text_to_video, path=["response"]) + + @parametrize + def test_method_create_with_all_params_overload_7(self, client: RunwayML) -> None: + text_to_video = client.text_to_video.create( + model="seedance2_mini", + prompt_text="x", + audio=True, + duration=4, + ratio="992:432", + reference_audio=[ + { + "type": "audio", + "uri": "https://example.com/file", + } + ], + references=[{"uri": "https://example.com/file"}], + reference_videos=[ + { + "type": "video", + "uri": "https://example.com/file", + } + ], + ) + assert_matches_type(TextToVideoCreateResponse, text_to_video, path=["response"]) + + @parametrize + def test_raw_response_create_overload_7(self, client: RunwayML) -> None: + response = client.text_to_video.with_raw_response.create( + model="seedance2_mini", + prompt_text="x", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + text_to_video = response.parse() + assert_matches_type(TextToVideoCreateResponse, text_to_video, path=["response"]) + + @parametrize + def test_streaming_response_create_overload_7(self, client: RunwayML) -> None: + with client.text_to_video.with_streaming_response.create( + model="seedance2_mini", + prompt_text="x", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + text_to_video = response.parse() + assert_matches_type(TextToVideoCreateResponse, text_to_video, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + def test_method_create_overload_8(self, client: RunwayML) -> None: + text_to_video = client.text_to_video.create( + model="gemini_omni_flash", + prompt_text="x", + ) + assert_matches_type(TextToVideoCreateResponse, text_to_video, path=["response"]) + + @parametrize + def test_method_create_with_all_params_overload_8(self, client: RunwayML) -> None: + text_to_video = client.text_to_video.create( + model="gemini_omni_flash", + prompt_text="x", + duration=3, + ratio="1280:720", + ) + assert_matches_type(TextToVideoCreateResponse, text_to_video, path=["response"]) + + @parametrize + def test_raw_response_create_overload_8(self, client: RunwayML) -> None: + response = client.text_to_video.with_raw_response.create( + model="gemini_omni_flash", + prompt_text="x", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + text_to_video = response.parse() + assert_matches_type(TextToVideoCreateResponse, text_to_video, path=["response"]) + + @parametrize + def test_streaming_response_create_overload_8(self, client: RunwayML) -> None: + with client.text_to_video.with_streaming_response.create( + model="gemini_omni_flash", + prompt_text="x", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + text_to_video = response.parse() + assert_matches_type(TextToVideoCreateResponse, text_to_video, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + def test_method_create_overload_9(self, client: RunwayML) -> None: text_to_video = client.text_to_video.create( duration=8, model="veo3", @@ -336,7 +438,7 @@ def test_method_create_overload_7(self, client: RunwayML) -> None: assert_matches_type(TextToVideoCreateResponse, text_to_video, path=["response"]) @parametrize - def test_raw_response_create_overload_7(self, client: RunwayML) -> None: + def test_raw_response_create_overload_9(self, client: RunwayML) -> None: response = client.text_to_video.with_raw_response.create( duration=8, model="veo3", @@ -350,7 +452,7 @@ def test_raw_response_create_overload_7(self, client: RunwayML) -> None: assert_matches_type(TextToVideoCreateResponse, text_to_video, path=["response"]) @parametrize - def test_streaming_response_create_overload_7(self, client: RunwayML) -> None: + def test_streaming_response_create_overload_9(self, client: RunwayML) -> None: with client.text_to_video.with_streaming_response.create( duration=8, model="veo3", @@ -681,6 +783,108 @@ async def test_streaming_response_create_overload_6(self, async_client: AsyncRun @parametrize async def test_method_create_overload_7(self, async_client: AsyncRunwayML) -> None: + text_to_video = await async_client.text_to_video.create( + model="seedance2_mini", + prompt_text="x", + ) + assert_matches_type(TextToVideoCreateResponse, text_to_video, path=["response"]) + + @parametrize + async def test_method_create_with_all_params_overload_7(self, async_client: AsyncRunwayML) -> None: + text_to_video = await async_client.text_to_video.create( + model="seedance2_mini", + prompt_text="x", + audio=True, + duration=4, + ratio="992:432", + reference_audio=[ + { + "type": "audio", + "uri": "https://example.com/file", + } + ], + references=[{"uri": "https://example.com/file"}], + reference_videos=[ + { + "type": "video", + "uri": "https://example.com/file", + } + ], + ) + assert_matches_type(TextToVideoCreateResponse, text_to_video, path=["response"]) + + @parametrize + async def test_raw_response_create_overload_7(self, async_client: AsyncRunwayML) -> None: + response = await async_client.text_to_video.with_raw_response.create( + model="seedance2_mini", + prompt_text="x", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + text_to_video = await response.parse() + assert_matches_type(TextToVideoCreateResponse, text_to_video, path=["response"]) + + @parametrize + async def test_streaming_response_create_overload_7(self, async_client: AsyncRunwayML) -> None: + async with async_client.text_to_video.with_streaming_response.create( + model="seedance2_mini", + prompt_text="x", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + text_to_video = await response.parse() + assert_matches_type(TextToVideoCreateResponse, text_to_video, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + async def test_method_create_overload_8(self, async_client: AsyncRunwayML) -> None: + text_to_video = await async_client.text_to_video.create( + model="gemini_omni_flash", + prompt_text="x", + ) + assert_matches_type(TextToVideoCreateResponse, text_to_video, path=["response"]) + + @parametrize + async def test_method_create_with_all_params_overload_8(self, async_client: AsyncRunwayML) -> None: + text_to_video = await async_client.text_to_video.create( + model="gemini_omni_flash", + prompt_text="x", + duration=3, + ratio="1280:720", + ) + assert_matches_type(TextToVideoCreateResponse, text_to_video, path=["response"]) + + @parametrize + async def test_raw_response_create_overload_8(self, async_client: AsyncRunwayML) -> None: + response = await async_client.text_to_video.with_raw_response.create( + model="gemini_omni_flash", + prompt_text="x", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + text_to_video = await response.parse() + assert_matches_type(TextToVideoCreateResponse, text_to_video, path=["response"]) + + @parametrize + async def test_streaming_response_create_overload_8(self, async_client: AsyncRunwayML) -> None: + async with async_client.text_to_video.with_streaming_response.create( + model="gemini_omni_flash", + prompt_text="x", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + text_to_video = await response.parse() + assert_matches_type(TextToVideoCreateResponse, text_to_video, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + async def test_method_create_overload_9(self, async_client: AsyncRunwayML) -> None: text_to_video = await async_client.text_to_video.create( duration=8, model="veo3", @@ -690,7 +894,7 @@ async def test_method_create_overload_7(self, async_client: AsyncRunwayML) -> No assert_matches_type(TextToVideoCreateResponse, text_to_video, path=["response"]) @parametrize - async def test_raw_response_create_overload_7(self, async_client: AsyncRunwayML) -> None: + async def test_raw_response_create_overload_9(self, async_client: AsyncRunwayML) -> None: response = await async_client.text_to_video.with_raw_response.create( duration=8, model="veo3", @@ -704,7 +908,7 @@ async def test_raw_response_create_overload_7(self, async_client: AsyncRunwayML) assert_matches_type(TextToVideoCreateResponse, text_to_video, path=["response"]) @parametrize - async def test_streaming_response_create_overload_7(self, async_client: AsyncRunwayML) -> None: + async def test_streaming_response_create_overload_9(self, async_client: AsyncRunwayML) -> None: async with async_client.text_to_video.with_streaming_response.create( duration=8, model="veo3", diff --git a/tests/api_resources/test_video_to_video.py b/tests/api_resources/test_video_to_video.py index 4710c50..de0355b 100644 --- a/tests/api_resources/test_video_to_video.py +++ b/tests/api_resources/test_video_to_video.py @@ -35,6 +35,10 @@ def test_method_create_with_all_params_overload_1(self, client: RunwayML) -> Non { "seconds": 0, "uri": "https://example.com/file", + "range": { + "end_seconds": 1, + "start_seconds": 0, + }, } ], prompt_text="x", @@ -188,6 +192,112 @@ def test_streaming_response_create_overload_3(self, client: RunwayML) -> None: assert cast(Any, response.is_closed) is True + @parametrize + def test_method_create_overload_4(self, client: RunwayML) -> None: + video_to_video = client.video_to_video.create( + model="seedance2_mini", + prompt_video="https://example.com/video.mp4", + ) + assert_matches_type(VideoToVideoCreateResponse, video_to_video, path=["response"]) + + @parametrize + def test_method_create_with_all_params_overload_4(self, client: RunwayML) -> None: + video_to_video = client.video_to_video.create( + model="seedance2_mini", + prompt_video="https://example.com/video.mp4", + audio=True, + duration=4, + prompt_text="x", + ratio="992:432", + reference_audio=[ + { + "type": "audio", + "uri": "https://example.com/file", + } + ], + references=[{"uri": "https://example.com/file"}], + reference_videos=[ + { + "type": "video", + "uri": "https://example.com/file", + } + ], + ) + assert_matches_type(VideoToVideoCreateResponse, video_to_video, path=["response"]) + + @parametrize + def test_raw_response_create_overload_4(self, client: RunwayML) -> None: + response = client.video_to_video.with_raw_response.create( + model="seedance2_mini", + prompt_video="https://example.com/video.mp4", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + video_to_video = response.parse() + assert_matches_type(VideoToVideoCreateResponse, video_to_video, path=["response"]) + + @parametrize + def test_streaming_response_create_overload_4(self, client: RunwayML) -> None: + with client.video_to_video.with_streaming_response.create( + model="seedance2_mini", + prompt_video="https://example.com/video.mp4", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + video_to_video = response.parse() + assert_matches_type(VideoToVideoCreateResponse, video_to_video, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + def test_method_create_overload_5(self, client: RunwayML) -> None: + video_to_video = client.video_to_video.create( + model="gemini_omni_flash", + prompt_text="x", + video_uri="https://example.com/video.mp4", + ) + assert_matches_type(VideoToVideoCreateResponse, video_to_video, path=["response"]) + + @parametrize + def test_method_create_with_all_params_overload_5(self, client: RunwayML) -> None: + video_to_video = client.video_to_video.create( + model="gemini_omni_flash", + prompt_text="x", + video_uri="https://example.com/video.mp4", + references=[{"uri": "https://example.com/file"}], + ) + assert_matches_type(VideoToVideoCreateResponse, video_to_video, path=["response"]) + + @parametrize + def test_raw_response_create_overload_5(self, client: RunwayML) -> None: + response = client.video_to_video.with_raw_response.create( + model="gemini_omni_flash", + prompt_text="x", + video_uri="https://example.com/video.mp4", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + video_to_video = response.parse() + assert_matches_type(VideoToVideoCreateResponse, video_to_video, path=["response"]) + + @parametrize + def test_streaming_response_create_overload_5(self, client: RunwayML) -> None: + with client.video_to_video.with_streaming_response.create( + model="gemini_omni_flash", + prompt_text="x", + video_uri="https://example.com/video.mp4", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + video_to_video = response.parse() + assert_matches_type(VideoToVideoCreateResponse, video_to_video, path=["response"]) + + assert cast(Any, response.is_closed) is True + class TestAsyncVideoToVideo: parametrize = pytest.mark.parametrize( @@ -212,6 +322,10 @@ async def test_method_create_with_all_params_overload_1(self, async_client: Asyn { "seconds": 0, "uri": "https://example.com/file", + "range": { + "end_seconds": 1, + "start_seconds": 0, + }, } ], prompt_text="x", @@ -364,3 +478,109 @@ async def test_streaming_response_create_overload_3(self, async_client: AsyncRun assert_matches_type(VideoToVideoCreateResponse, video_to_video, path=["response"]) assert cast(Any, response.is_closed) is True + + @parametrize + async def test_method_create_overload_4(self, async_client: AsyncRunwayML) -> None: + video_to_video = await async_client.video_to_video.create( + model="seedance2_mini", + prompt_video="https://example.com/video.mp4", + ) + assert_matches_type(VideoToVideoCreateResponse, video_to_video, path=["response"]) + + @parametrize + async def test_method_create_with_all_params_overload_4(self, async_client: AsyncRunwayML) -> None: + video_to_video = await async_client.video_to_video.create( + model="seedance2_mini", + prompt_video="https://example.com/video.mp4", + audio=True, + duration=4, + prompt_text="x", + ratio="992:432", + reference_audio=[ + { + "type": "audio", + "uri": "https://example.com/file", + } + ], + references=[{"uri": "https://example.com/file"}], + reference_videos=[ + { + "type": "video", + "uri": "https://example.com/file", + } + ], + ) + assert_matches_type(VideoToVideoCreateResponse, video_to_video, path=["response"]) + + @parametrize + async def test_raw_response_create_overload_4(self, async_client: AsyncRunwayML) -> None: + response = await async_client.video_to_video.with_raw_response.create( + model="seedance2_mini", + prompt_video="https://example.com/video.mp4", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + video_to_video = await response.parse() + assert_matches_type(VideoToVideoCreateResponse, video_to_video, path=["response"]) + + @parametrize + async def test_streaming_response_create_overload_4(self, async_client: AsyncRunwayML) -> None: + async with async_client.video_to_video.with_streaming_response.create( + model="seedance2_mini", + prompt_video="https://example.com/video.mp4", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + video_to_video = await response.parse() + assert_matches_type(VideoToVideoCreateResponse, video_to_video, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + async def test_method_create_overload_5(self, async_client: AsyncRunwayML) -> None: + video_to_video = await async_client.video_to_video.create( + model="gemini_omni_flash", + prompt_text="x", + video_uri="https://example.com/video.mp4", + ) + assert_matches_type(VideoToVideoCreateResponse, video_to_video, path=["response"]) + + @parametrize + async def test_method_create_with_all_params_overload_5(self, async_client: AsyncRunwayML) -> None: + video_to_video = await async_client.video_to_video.create( + model="gemini_omni_flash", + prompt_text="x", + video_uri="https://example.com/video.mp4", + references=[{"uri": "https://example.com/file"}], + ) + assert_matches_type(VideoToVideoCreateResponse, video_to_video, path=["response"]) + + @parametrize + async def test_raw_response_create_overload_5(self, async_client: AsyncRunwayML) -> None: + response = await async_client.video_to_video.with_raw_response.create( + model="gemini_omni_flash", + prompt_text="x", + video_uri="https://example.com/video.mp4", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + video_to_video = await response.parse() + assert_matches_type(VideoToVideoCreateResponse, video_to_video, path=["response"]) + + @parametrize + async def test_streaming_response_create_overload_5(self, async_client: AsyncRunwayML) -> None: + async with async_client.video_to_video.with_streaming_response.create( + model="gemini_omni_flash", + prompt_text="x", + video_uri="https://example.com/video.mp4", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + video_to_video = await response.parse() + assert_matches_type(VideoToVideoCreateResponse, video_to_video, path=["response"]) + + assert cast(Any, response.is_closed) is True