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 @@
{
".": "5.16.0"
".": "5.16.1"
}
3 changes: 0 additions & 3 deletions .stats.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1 @@
configured_endpoints: 64
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/runwayml/runwayml-72678a32f9ad57c2bed47a9c300c735e91b9f6e0a0583ea9cc549a066e343f82.yml
openapi_spec_hash: 79e4633b48de45cb04aeb086b8b08818
config_hash: e22d747d6682946b15b39a0d286ed0a8
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# Changelog

## 5.16.1 (2026-08-25)

Full Changelog: [v5.16.0...v5.16.1](https://github.com/runwayml/sdk-python/compare/v5.16.0...v5.16.1)

### Bug Fixes

* **client:** restore waitable wraps and uploads after stlc cutover ([e4d247f](https://github.com/runwayml/sdk-python/commit/e4d247fd81c4c73ca29fc2eb1f442d3259a815f6))

## 5.16.0 (2026-08-25)

Full Changelog: [v5.15.0...v5.16.0](https://github.com/runwayml/sdk-python/compare/v5.15.0...v5.16.0)
Expand Down
36 changes: 13 additions & 23 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -121,8 +121,6 @@ Nested request parameters are [TypedDicts](https://docs.python.org/3/library/typ

Typed requests and responses provide autocomplete and documentation within your editor. If you would like to see type errors in VS Code to help catch bugs earlier, set `python.analysis.typeCheckingMode` to `basic`.

from datetime import datetime

## Pagination

List methods in the RunwayML API are paginated.
Expand All @@ -134,16 +132,14 @@ from runwayml import RunwayML

client = RunwayML()

all_webapps = []
all_routers = []
# Automatically fetches more pages as needed.
for webapp in client.organization.webapp.list_usage(
from_=datetime.fromisoformat("2019-12-27T18:11:19.117"),
for router in client.routers.list(
limit=1,
to=datetime.fromisoformat("2019-12-27T18:11:19.117"),
):
# Do something with webapp here
all_webapps.append(webapp)
print(all_webapps)
# Do something with router here
all_routers.append(router)
print(all_routers)
```

Or, asynchronously:
Expand All @@ -156,15 +152,13 @@ client = AsyncRunwayML()


async def main() -> None:
all_webapps = []
all_routers = []
# Iterate through items across all pages, issuing requests as needed.
async for webapp in client.organization.webapp.list_usage(
from_=datetime.fromisoformat("2019-12-27T18:11:19.117"),
async for router in client.routers.list(
limit=1,
to=datetime.fromisoformat("2019-12-27T18:11:19.117"),
):
all_webapps.append(webapp)
print(all_webapps)
all_routers.append(router)
print(all_routers)


asyncio.run(main())
Expand All @@ -173,10 +167,8 @@ asyncio.run(main())
Alternatively, you can use the `.has_next_page()`, `.next_page_info()`, or `.get_next_page()` methods for more granular control working with pages:

```python
first_page = await client.organization.webapp.list_usage(
from_=datetime.fromisoformat("2019-12-27T18:11:19.117"),
first_page = await client.routers.list(
limit=1,
to=datetime.fromisoformat("2019-12-27T18:11:19.117"),
)
if first_page.has_next_page():
print(f"will fetch next page using these details: {first_page.next_page_info()}")
Expand All @@ -189,15 +181,13 @@ if first_page.has_next_page():
Or just work directly with the returned data:

```python
first_page = await client.organization.webapp.list_usage(
from_=datetime.fromisoformat("2019-12-27T18:11:19.117"),
first_page = await client.routers.list(
limit=1,
to=datetime.fromisoformat("2019-12-27T18:11:19.117"),
)

print(f"next page cursor: {first_page.next_cursor}") # => "next page cursor: ..."
for webapp in first_page.data:
print(webapp.credits)
for router in first_page.data:
print(router.id)

# Remove `await` for non-async usage.
```
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 = "5.16.0"
version = "5.16.1"
description = "The official Python library for the runwayml API"
dynamic = ["readme"]
license = "Apache-2.0"
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__ = "5.16.0" # x-release-please-version
__version__ = "5.16.1" # x-release-please-version
2 changes: 2 additions & 0 deletions src/runwayml/types/generate/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,6 @@
from .video_create_params import VideoCreateParams as VideoCreateParams
from .audio_create_response import AudioCreateResponse as AudioCreateResponse
from .image_create_response import ImageCreateResponse as ImageCreateResponse
from .reference_audio_param import ReferenceAudioParam as ReferenceAudioParam
from .reference_voice_param import ReferenceVoiceParam as ReferenceVoiceParam
from .video_create_response import VideoCreateResponse as VideoCreateResponse
90 changes: 90 additions & 0 deletions tests/api_resources/test_image_to_video.py
Original file line number Diff line number Diff line change
Expand Up @@ -578,6 +578,51 @@ def test_streaming_response_create_overload_11(self, client: RunwayML) -> None:

assert cast(Any, response.is_closed) is True

@parametrize
def test_method_create_overload_12(self, client: RunwayML) -> None:
image_to_video = client.image_to_video.create(
model="grok_imagine_1_5",
prompt_image="https://example.com/image.jpg",
)
assert_matches_type(ImageToVideoCreateResponse, image_to_video, path=["response"])

@parametrize
def test_method_create_with_all_params_overload_12(self, client: RunwayML) -> None:
image_to_video = client.image_to_video.create(
model="grok_imagine_1_5",
prompt_image="https://example.com/image.jpg",
duration=1,
prompt_text="x",
resolution="480p",
)
assert_matches_type(ImageToVideoCreateResponse, image_to_video, path=["response"])

@parametrize
def test_raw_response_create_overload_12(self, client: RunwayML) -> None:
response = client.image_to_video.with_raw_response.create(
model="grok_imagine_1_5",
prompt_image="https://example.com/image.jpg",
)

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_12(self, client: RunwayML) -> None:
with client.image_to_video.with_streaming_response.create(
model="grok_imagine_1_5",
prompt_image="https://example.com/image.jpg",
) 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


class TestAsyncImageToVideo:
parametrize = pytest.mark.parametrize(
Expand Down Expand Up @@ -1144,3 +1189,48 @@ async def test_streaming_response_create_overload_11(self, async_client: AsyncRu
assert_matches_type(ImageToVideoCreateResponse, image_to_video, path=["response"])

assert cast(Any, response.is_closed) is True

@parametrize
async def test_method_create_overload_12(self, async_client: AsyncRunwayML) -> None:
image_to_video = await async_client.image_to_video.create(
model="grok_imagine_1_5",
prompt_image="https://example.com/image.jpg",
)
assert_matches_type(ImageToVideoCreateResponse, image_to_video, path=["response"])

@parametrize
async def test_method_create_with_all_params_overload_12(self, async_client: AsyncRunwayML) -> None:
image_to_video = await async_client.image_to_video.create(
model="grok_imagine_1_5",
prompt_image="https://example.com/image.jpg",
duration=1,
prompt_text="x",
resolution="480p",
)
assert_matches_type(ImageToVideoCreateResponse, image_to_video, path=["response"])

@parametrize
async def test_raw_response_create_overload_12(self, async_client: AsyncRunwayML) -> None:
response = await async_client.image_to_video.with_raw_response.create(
model="grok_imagine_1_5",
prompt_image="https://example.com/image.jpg",
)

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_12(self, async_client: AsyncRunwayML) -> None:
async with async_client.image_to_video.with_streaming_response.create(
model="grok_imagine_1_5",
prompt_image="https://example.com/image.jpg",
) 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
104 changes: 104 additions & 0 deletions tests/api_resources/test_text_to_video.py
Original file line number Diff line number Diff line change
Expand Up @@ -544,6 +544,58 @@ def test_streaming_response_create_overload_10(self, client: RunwayML) -> None:

assert cast(Any, response.is_closed) is True

@parametrize
def test_method_create_overload_11(self, client: RunwayML) -> None:
text_to_video = client.text_to_video.create(
model="grok_imagine_1_5",
prompt_text="x",
)
assert_matches_type(TextToVideoCreateResponse, text_to_video, path=["response"])

@parametrize
def test_method_create_with_all_params_overload_11(self, client: RunwayML) -> None:
text_to_video = client.text_to_video.create(
model="grok_imagine_1_5",
prompt_text="x",
duration=1,
ratio="1:1",
reference_audio=[
{
"type": "audio",
"uri": "https://example.com/audio.mp3",
}
],
references=[{"uri": "https://example.com/image.jpg"}],
resolution="480p",
)
assert_matches_type(TextToVideoCreateResponse, text_to_video, path=["response"])

@parametrize
def test_raw_response_create_overload_11(self, client: RunwayML) -> None:
response = client.text_to_video.with_raw_response.create(
model="grok_imagine_1_5",
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_11(self, client: RunwayML) -> None:
with client.text_to_video.with_streaming_response.create(
model="grok_imagine_1_5",
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


class TestAsyncTextToVideo:
parametrize = pytest.mark.parametrize(
Expand Down Expand Up @@ -1076,3 +1128,55 @@ async def test_streaming_response_create_overload_10(self, async_client: AsyncRu
assert_matches_type(TextToVideoCreateResponse, text_to_video, path=["response"])

assert cast(Any, response.is_closed) is True

@parametrize
async def test_method_create_overload_11(self, async_client: AsyncRunwayML) -> None:
text_to_video = await async_client.text_to_video.create(
model="grok_imagine_1_5",
prompt_text="x",
)
assert_matches_type(TextToVideoCreateResponse, text_to_video, path=["response"])

@parametrize
async def test_method_create_with_all_params_overload_11(self, async_client: AsyncRunwayML) -> None:
text_to_video = await async_client.text_to_video.create(
model="grok_imagine_1_5",
prompt_text="x",
duration=1,
ratio="1:1",
reference_audio=[
{
"type": "audio",
"uri": "https://example.com/audio.mp3",
}
],
references=[{"uri": "https://example.com/image.jpg"}],
resolution="480p",
)
assert_matches_type(TextToVideoCreateResponse, text_to_video, path=["response"])

@parametrize
async def test_raw_response_create_overload_11(self, async_client: AsyncRunwayML) -> None:
response = await async_client.text_to_video.with_raw_response.create(
model="grok_imagine_1_5",
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_11(self, async_client: AsyncRunwayML) -> None:
async with async_client.text_to_video.with_streaming_response.create(
model="grok_imagine_1_5",
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
4 changes: 2 additions & 2 deletions tests/api_resources/test_workflows.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ def test_method_run_with_all_params(self, client: RunwayML) -> None:
workflow = client.workflows.run(
id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
node_outputs={
"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e": {
"foo": {
"foo": {
"type": "primitive",
"value": "string",
Expand Down Expand Up @@ -214,7 +214,7 @@ async def test_method_run_with_all_params(self, async_client: AsyncRunwayML) ->
workflow = await async_client.workflows.run(
id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
node_outputs={
"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e": {
"foo": {
"foo": {
"type": "primitive",
"value": "string",
Expand Down