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

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
".": "4.11.0"
".": "4.12.0"
}
4 changes: 2 additions & 2 deletions .stats.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
configured_endpoints: 37
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/runwayml%2Frunwayml-ee023fb84f0e74914e23b019b4c0951108b7ff83b983563c91ae07986524b674.yml
openapi_spec_hash: 2472895eb74737ecef2cbee707e50cac
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/runwayml%2Frunwayml-87bdf413b984e6050236628a1fb9585a5f749c18671b15821f6f556ce4419c4b.yml
openapi_spec_hash: d4a8307f67a1539b1a4f14dac1b285c4
config_hash: 3063a17ad98d447287f6f7eab9d6d1d6
15 changes: 15 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,20 @@
# Changelog

## 4.12.0 (2026-04-15)

Full Changelog: [v4.11.0...v4.12.0](https://github.com/runwayml/sdk-python/compare/v4.11.0...v4.12.0)

### Features

* **api:** seedance2 ([5004f1d](https://github.com/runwayml/sdk-python/commit/5004f1d931a4bf5e53c8b67cefa098bc85fa4ef5))
* **client:** awaitable task support for seedance2 ([c3f73ee](https://github.com/runwayml/sdk-python/commit/c3f73ee879ed425e1ecb4917d11df32d3313f782))


### Bug Fixes

* **api:** remove spurious api param ([92173b3](https://github.com/runwayml/sdk-python/commit/92173b323f113a36d28386ec5ea096b4ee940be3))
* ensure file data are only sent as 1 parameter ([fc5a5ef](https://github.com/runwayml/sdk-python/commit/fc5a5efba2d71af553c8cd0c7b0024bd15db0a16))

## 4.11.0 (2026-04-10)

Full Changelog: [v4.10.0...v4.11.0](https://github.com/runwayml/sdk-python/compare/v4.10.0...v4.11.0)
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "runwayml"
version = "4.11.0"
version = "4.12.0"
description = "The official Python library for the runwayml API"
dynamic = ["readme"]
license = "Apache-2.0"
Expand Down
5 changes: 3 additions & 2 deletions src/runwayml/_utils/_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,9 @@ def _extract_items(
index += 1
if is_dict(obj):
try:
# We are at the last entry in the path so we must remove the field
if (len(path)) == index:
# Remove the field if there are no more dict keys in the path,
# only "<array>" traversal markers or end.
if all(p == "<array>" for p in path[index:]):
item = obj.pop(key)
else:
item = obj[key]
Expand Down
2 changes: 1 addition & 1 deletion src/runwayml/_version.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

__title__ = "runwayml"
__version__ = "4.11.0" # x-release-please-version
__version__ = "4.12.0" # x-release-please-version
18 changes: 18 additions & 0 deletions src/runwayml/resources/documents.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

from __future__ import annotations

from typing_extensions import Literal

import httpx

from ..types import document_list_params, document_create_params, document_update_params
Expand Down Expand Up @@ -175,6 +177,8 @@ def list(
self,
*,
limit: int,
order: Literal["asc", "desc"],
sort: Literal["createdAt", "updatedAt"],
cursor: str | 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.
Expand All @@ -190,6 +194,10 @@ def list(
Args:
limit: The maximum number of items to return per page.

order: Sort direction.

sort: Field to sort results by.

cursor: Cursor from a previous response for fetching the next page of results.

extra_headers: Send extra headers
Expand All @@ -211,6 +219,8 @@ def list(
query=maybe_transform(
{
"limit": limit,
"order": order,
"sort": sort,
"cursor": cursor,
},
document_list_params.DocumentListParams,
Expand Down Expand Up @@ -407,6 +417,8 @@ def list(
self,
*,
limit: int,
order: Literal["asc", "desc"],
sort: Literal["createdAt", "updatedAt"],
cursor: str | 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.
Expand All @@ -422,6 +434,10 @@ def list(
Args:
limit: The maximum number of items to return per page.

order: Sort direction.

sort: Field to sort results by.

cursor: Cursor from a previous response for fetching the next page of results.

extra_headers: Send extra headers
Expand All @@ -443,6 +459,8 @@ def list(
query=maybe_transform(
{
"limit": limit,
"order": order,
"sort": sort,
"cursor": cursor,
},
document_list_params.DocumentListParams,
Expand Down
158 changes: 158 additions & 0 deletions src/runwayml/resources/image_to_video.py
Original file line number Diff line number Diff line change
Expand Up @@ -282,6 +282,66 @@ def create(
"""
...

@overload
def create(
self,
*,
model: Literal["seedance2"],
prompt_image: Union[str, Iterable[image_to_video_create_params.Seedance2PromptImagePromptImage]],
audio: bool | Omit = omit,
duration: int | Omit = omit,
output_count: 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,
# 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. Audio inclusion affects pricing.

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

output_count: The number of video generations to produce.

prompt_text: An optional text prompt up to 3500 characters (measured in UTF-16 code units).
This should describe in detail what should appear in the output.

ratio: The resolution of the output video.

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,
Expand Down Expand Up @@ -325,6 +385,7 @@ def create(
["duration", "model", "prompt_image", "prompt_text", "ratio"],
["model", "prompt_image", "ratio"],
["model", "prompt_image", "prompt_text"],
["model", "prompt_image"],
["duration", "model", "prompt_image", "ratio"],
)
def create(
Expand All @@ -336,25 +397,42 @@ def create(
| Literal["gen3a_turbo"]
| Literal["veo3.1"]
| Literal["veo3.1_fast"]
| Literal["seedance2"]
| Literal["veo3"],
prompt_image: Union[str, Iterable[image_to_video_create_params.Gen4_5PromptImagePromptImage]]
| Union[str, Iterable[image_to_video_create_params.Gen4TurboPromptImagePromptImage]]
| Union[str, Iterable[image_to_video_create_params.Gen3aTurboPromptImagePromptImage]]
| Union[str, Iterable[image_to_video_create_params.Veo3_1PromptImagePromptImage]]
| Union[str, Iterable[image_to_video_create_params.Veo3_1FastPromptImagePromptImage]]
| Union[str, Iterable[image_to_video_create_params.Seedance2PromptImagePromptImage]]
| Union[str, Iterable[image_to_video_create_params.Veo3PromptImagePromptImage]],
prompt_text: str | Omit = omit,
ratio: Literal["1280:720", "720:1280", "1104:832", "960:960", "832:1104", "1584:672"]
| Literal["1280:720", "720:1280", "1104:832", "832:1104", "960:960", "1584:672"]
| Literal["768:1280", "1280:768"]
| Literal["1280:720", "720:1280", "1080:1920", "1920:1080"]
| 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,
content_moderation: image_to_video_create_params.Gen4_5ContentModeration
| image_to_video_create_params.Gen4TurboContentModeration
| image_to_video_create_params.Gen3aTurboContentModeration
| Omit = omit,
seed: int | Omit = omit,
audio: bool | Omit = omit,
output_count: 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.
extra_headers: Headers | None = None,
Expand All @@ -374,6 +452,7 @@ def create(
"content_moderation": content_moderation,
"seed": seed,
"audio": audio,
"output_count": output_count,
},
image_to_video_create_params.ImageToVideoCreateParams,
),
Expand Down Expand Up @@ -636,6 +715,66 @@ async def create(
"""
...

@overload
async def create(
self,
*,
model: Literal["seedance2"],
prompt_image: Union[str, Iterable[image_to_video_create_params.Seedance2PromptImagePromptImage]],
audio: bool | Omit = omit,
duration: int | Omit = omit,
output_count: 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,
# 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. Audio inclusion affects pricing.

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

output_count: The number of video generations to produce.

prompt_text: An optional text prompt up to 3500 characters (measured in UTF-16 code units).
This should describe in detail what should appear in the output.

ratio: The resolution of the output video.

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,
Expand Down Expand Up @@ -679,6 +818,7 @@ async def create(
["duration", "model", "prompt_image", "prompt_text", "ratio"],
["model", "prompt_image", "ratio"],
["model", "prompt_image", "prompt_text"],
["model", "prompt_image"],
["duration", "model", "prompt_image", "ratio"],
)
async def create(
Expand All @@ -690,25 +830,42 @@ async def create(
| Literal["gen3a_turbo"]
| Literal["veo3.1"]
| Literal["veo3.1_fast"]
| Literal["seedance2"]
| Literal["veo3"],
prompt_image: Union[str, Iterable[image_to_video_create_params.Gen4_5PromptImagePromptImage]]
| Union[str, Iterable[image_to_video_create_params.Gen4TurboPromptImagePromptImage]]
| Union[str, Iterable[image_to_video_create_params.Gen3aTurboPromptImagePromptImage]]
| Union[str, Iterable[image_to_video_create_params.Veo3_1PromptImagePromptImage]]
| Union[str, Iterable[image_to_video_create_params.Veo3_1FastPromptImagePromptImage]]
| Union[str, Iterable[image_to_video_create_params.Seedance2PromptImagePromptImage]]
| Union[str, Iterable[image_to_video_create_params.Veo3PromptImagePromptImage]],
prompt_text: str | Omit = omit,
ratio: Literal["1280:720", "720:1280", "1104:832", "960:960", "832:1104", "1584:672"]
| Literal["1280:720", "720:1280", "1104:832", "832:1104", "960:960", "1584:672"]
| Literal["768:1280", "1280:768"]
| Literal["1280:720", "720:1280", "1080:1920", "1920:1080"]
| 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,
content_moderation: image_to_video_create_params.Gen4_5ContentModeration
| image_to_video_create_params.Gen4TurboContentModeration
| image_to_video_create_params.Gen3aTurboContentModeration
| Omit = omit,
seed: int | Omit = omit,
audio: bool | Omit = omit,
output_count: 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.
extra_headers: Headers | None = None,
Expand All @@ -728,6 +885,7 @@ async def create(
"content_moderation": content_moderation,
"seed": seed,
"audio": audio,
"output_count": output_count,
},
image_to_video_create_params.ImageToVideoCreateParams,
),
Expand Down
Loading