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
6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
lint:
timeout-minutes: 10
name: lint
runs-on: ${{ github.repository == 'stainless-sdks/runwayml-python' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }}
runs-on: ${{ startsWith(github.repository, 'stainless-sdks/') && 'depot-ubuntu-24.04' || 'ubuntu-latest' }}
if: (github.event_name == 'push' || github.event.pull_request.head.repo.fork) && (github.event_name != 'push' || github.event.head_commit.message != 'codegen metadata')
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
Expand All @@ -44,7 +44,7 @@ jobs:
permissions:
contents: read
id-token: write
runs-on: ${{ github.repository == 'stainless-sdks/runwayml-python' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }}
runs-on: ${{ startsWith(github.repository, 'stainless-sdks/') && 'depot-ubuntu-24.04' || 'ubuntu-latest' }}
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2

Expand Down Expand Up @@ -84,7 +84,7 @@ jobs:
test:
timeout-minutes: 10
name: test
runs-on: ${{ github.repository == 'stainless-sdks/runwayml-python' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }}
runs-on: ${{ startsWith(github.repository, 'stainless-sdks/') && 'depot-ubuntu-24.04' || 'ubuntu-latest' }}
if: github.event_name == 'push' || github.event.pull_request.head.repo.fork
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
Expand Down
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.10.0"
".": "5.11.0"
}
8 changes: 4 additions & 4 deletions .stats.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
configured_endpoints: 51
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/runwayml/runwayml-391d899ffd246491c8d2a02adec62eb5fc1b00044e6704a7886d8e8e09d72484.yml
openapi_spec_hash: 475451c27bcc5721a02ee92c1898000e
config_hash: 7caf94f26186e1ee432efcaa0b590bab
configured_endpoints: 57
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/runwayml/runwayml-264e9b264bae2f906e06f33a5af492e19580bcd192f6094cfdb534fcbf70f5bc.yml
openapi_spec_hash: 30ac92dee6f88c19ea1cdc174b05a260
config_hash: 6bdea3c3109ee75952f779d566c229ea
14 changes: 14 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,19 @@
# Changelog

## 5.11.0 (2026-07-21)

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

### Features

* **api:** add Model Router CRUD and routed video generation ([05df606](https://github.com/runwayml/sdk-python/commit/05df606fe356a89e7cfa2765f77a1cddbdf06d71))
* **stlc:** configurable CI runner and private-production-repo support in workflow templates ([d83d189](https://github.com/runwayml/sdk-python/commit/d83d1895c3ef26cb6c803db36dacab1b43350fd7))


### Bug Fixes

* **client:** make generate.video responses awaitable ([9c4e62a](https://github.com/runwayml/sdk-python/commit/9c4e62a8c13e96ec733f6efe7cfa3fd7f7589357))

## 5.10.0 (2026-07-13)

Full Changelog: [v5.9.0...v5.10.0](https://github.com/runwayml/sdk-python/compare/v5.9.0...v5.10.0)
Expand Down
26 changes: 13 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -132,14 +132,14 @@ from runwayml import RunwayML

client = RunwayML()

all_avatars = []
all_routers = []
# Automatically fetches more pages as needed.
for avatar in client.avatars.list(
for router in client.routers.list(
limit=1,
):
# Do something with avatar here
all_avatars.append(avatar)
print(all_avatars)
# Do something with router here
all_routers.append(router)
print(all_routers)
```

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


async def main() -> None:
all_avatars = []
all_routers = []
# Iterate through items across all pages, issuing requests as needed.
async for avatar in client.avatars.list(
async for router in client.routers.list(
limit=1,
):
all_avatars.append(avatar)
print(all_avatars)
all_routers.append(router)
print(all_routers)


asyncio.run(main())
Expand All @@ -167,7 +167,7 @@ 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.avatars.list(
first_page = await client.routers.list(
limit=1,
)
if first_page.has_next_page():
Expand All @@ -181,13 +181,13 @@ if first_page.has_next_page():
Or just work directly with the returned data:

```python
first_page = await client.avatars.list(
first_page = await client.routers.list(
limit=1,
)

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

# Remove `await` for non-async usage.
```
Expand Down
35 changes: 35 additions & 0 deletions api.md
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,41 @@ Methods:

- <code title="post /v1/video_upscale">client.video_upscale.<a href="./src/runwayml/resources/video_upscale.py">create</a>(\*\*<a href="src/runwayml/types/video_upscale_create_params.py">params</a>) -> <a href="./src/runwayml/types/video_upscale_create_response.py">VideoUpscaleCreateResponse</a></code>

# Generate

## Video

Types:

```python
from runwayml.types.generate import VideoCreateResponse
```

Methods:

- <code title="post /v1/generate/video">client.generate.video.<a href="./src/runwayml/resources/generate/video.py">create</a>(\*\*<a href="src/runwayml/types/generate/video_create_params.py">params</a>) -> <a href="./src/runwayml/types/generate/video_create_response.py">VideoCreateResponse</a></code>

# Routers

Types:

```python
from runwayml.types import (
RouterCreateResponse,
RouterRetrieveResponse,
RouterUpdateResponse,
RouterListResponse,
)
```

Methods:

- <code title="post /v1/routers">client.routers.<a href="./src/runwayml/resources/routers.py">create</a>(\*\*<a href="src/runwayml/types/router_create_params.py">params</a>) -> <a href="./src/runwayml/types/router_create_response.py">RouterCreateResponse</a></code>
- <code title="get /v1/routers/{id}">client.routers.<a href="./src/runwayml/resources/routers.py">retrieve</a>(id) -> <a href="./src/runwayml/types/router_retrieve_response.py">RouterRetrieveResponse</a></code>
- <code title="patch /v1/routers/{id}">client.routers.<a href="./src/runwayml/resources/routers.py">update</a>(id, \*\*<a href="src/runwayml/types/router_update_params.py">params</a>) -> <a href="./src/runwayml/types/router_update_response.py">RouterUpdateResponse</a></code>
- <code title="get /v1/routers">client.routers.<a href="./src/runwayml/resources/routers.py">list</a>(\*\*<a href="src/runwayml/types/router_list_params.py">params</a>) -> <a href="./src/runwayml/types/router_list_response.py">SyncCursorPage[RouterListResponse]</a></code>
- <code title="delete /v1/routers/{id}">client.routers.<a href="./src/runwayml/resources/routers.py">delete</a>(id) -> None</code>

# Organization

Types:
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.10.0"
version = "5.11.0"
description = "The official Python library for the runwayml API"
dynamic = ["readme"]
license = "Apache-2.0"
Expand Down
76 changes: 76 additions & 0 deletions src/runwayml/_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,9 @@
voices,
avatars,
recipes,
routers,
uploads,
generate,
documents,
workflows,
organization,
Expand All @@ -65,6 +67,7 @@
from .resources.voices import VoicesResource, AsyncVoicesResource
from .resources.avatars import AvatarsResource, AsyncAvatarsResource
from .resources.recipes import RecipesResource, AsyncRecipesResource
from .resources.routers import RoutersResource, AsyncRoutersResource
from .resources.uploads import UploadsResource, AsyncUploadsResource
from .resources.documents import DocumentsResource, AsyncDocumentsResource
from .resources.workflows import WorkflowsResource, AsyncWorkflowsResource
Expand All @@ -81,6 +84,7 @@
from .resources.video_to_video import VideoToVideoResource, AsyncVideoToVideoResource
from .resources.voice_isolation import VoiceIsolationResource, AsyncVoiceIsolationResource
from .resources.speech_to_speech import SpeechToSpeechResource, AsyncSpeechToSpeechResource
from .resources.generate.generate import GenerateResource, AsyncGenerateResource
from .resources.realtime_sessions import RealtimeSessionsResource, AsyncRealtimeSessionsResource
from .resources.avatar_conversations import AvatarConversationsResource, AsyncAvatarConversationsResource
from .resources.workflow_invocations import WorkflowInvocationsResource, AsyncWorkflowInvocationsResource
Expand Down Expand Up @@ -265,6 +269,18 @@ def video_upscale(self) -> VideoUpscaleResource:

return VideoUpscaleResource(self)

@cached_property
def generate(self) -> GenerateResource:
from .resources.generate import GenerateResource

return GenerateResource(self)

@cached_property
def routers(self) -> RoutersResource:
from .resources.routers import RoutersResource

return RoutersResource(self)

@cached_property
def organization(self) -> OrganizationResource:
from .resources.organization import OrganizationResource
Expand Down Expand Up @@ -608,6 +624,18 @@ def video_upscale(self) -> AsyncVideoUpscaleResource:

return AsyncVideoUpscaleResource(self)

@cached_property
def generate(self) -> AsyncGenerateResource:
from .resources.generate import AsyncGenerateResource

return AsyncGenerateResource(self)

@cached_property
def routers(self) -> AsyncRoutersResource:
from .resources.routers import AsyncRoutersResource

return AsyncRoutersResource(self)

@cached_property
def organization(self) -> AsyncOrganizationResource:
from .resources.organization import AsyncOrganizationResource
Expand Down Expand Up @@ -887,6 +915,18 @@ def video_upscale(self) -> video_upscale.VideoUpscaleResourceWithRawResponse:

return VideoUpscaleResourceWithRawResponse(self._client.video_upscale)

@cached_property
def generate(self) -> generate.GenerateResourceWithRawResponse:
from .resources.generate import GenerateResourceWithRawResponse

return GenerateResourceWithRawResponse(self._client.generate)

@cached_property
def routers(self) -> routers.RoutersResourceWithRawResponse:
from .resources.routers import RoutersResourceWithRawResponse

return RoutersResourceWithRawResponse(self._client.routers)

@cached_property
def organization(self) -> organization.OrganizationResourceWithRawResponse:
from .resources.organization import OrganizationResourceWithRawResponse
Expand Down Expand Up @@ -1051,6 +1091,18 @@ def video_upscale(self) -> video_upscale.AsyncVideoUpscaleResourceWithRawRespons

return AsyncVideoUpscaleResourceWithRawResponse(self._client.video_upscale)

@cached_property
def generate(self) -> generate.AsyncGenerateResourceWithRawResponse:
from .resources.generate import AsyncGenerateResourceWithRawResponse

return AsyncGenerateResourceWithRawResponse(self._client.generate)

@cached_property
def routers(self) -> routers.AsyncRoutersResourceWithRawResponse:
from .resources.routers import AsyncRoutersResourceWithRawResponse

return AsyncRoutersResourceWithRawResponse(self._client.routers)

@cached_property
def organization(self) -> organization.AsyncOrganizationResourceWithRawResponse:
from .resources.organization import AsyncOrganizationResourceWithRawResponse
Expand Down Expand Up @@ -1215,6 +1267,18 @@ def video_upscale(self) -> video_upscale.VideoUpscaleResourceWithStreamingRespon

return VideoUpscaleResourceWithStreamingResponse(self._client.video_upscale)

@cached_property
def generate(self) -> generate.GenerateResourceWithStreamingResponse:
from .resources.generate import GenerateResourceWithStreamingResponse

return GenerateResourceWithStreamingResponse(self._client.generate)

@cached_property
def routers(self) -> routers.RoutersResourceWithStreamingResponse:
from .resources.routers import RoutersResourceWithStreamingResponse

return RoutersResourceWithStreamingResponse(self._client.routers)

@cached_property
def organization(self) -> organization.OrganizationResourceWithStreamingResponse:
from .resources.organization import OrganizationResourceWithStreamingResponse
Expand Down Expand Up @@ -1379,6 +1443,18 @@ def video_upscale(self) -> video_upscale.AsyncVideoUpscaleResourceWithStreamingR

return AsyncVideoUpscaleResourceWithStreamingResponse(self._client.video_upscale)

@cached_property
def generate(self) -> generate.AsyncGenerateResourceWithStreamingResponse:
from .resources.generate import AsyncGenerateResourceWithStreamingResponse

return AsyncGenerateResourceWithStreamingResponse(self._client.generate)

@cached_property
def routers(self) -> routers.AsyncRoutersResourceWithStreamingResponse:
from .resources.routers import AsyncRoutersResourceWithStreamingResponse

return AsyncRoutersResourceWithStreamingResponse(self._client.routers)

@cached_property
def organization(self) -> organization.AsyncOrganizationResourceWithStreamingResponse:
from .resources.organization import AsyncOrganizationResourceWithStreamingResponse
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.10.0" # x-release-please-version
__version__ = "5.11.0" # x-release-please-version
28 changes: 28 additions & 0 deletions src/runwayml/resources/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,14 @@
RecipesResourceWithStreamingResponse,
AsyncRecipesResourceWithStreamingResponse,
)
from .routers import (
RoutersResource,
AsyncRoutersResource,
RoutersResourceWithRawResponse,
AsyncRoutersResourceWithRawResponse,
RoutersResourceWithStreamingResponse,
AsyncRoutersResourceWithStreamingResponse,
)
from .uploads import (
UploadsResource,
AsyncUploadsResource,
Expand All @@ -40,6 +48,14 @@
UploadsResourceWithStreamingResponse,
AsyncUploadsResourceWithStreamingResponse,
)
from .generate import (
GenerateResource,
AsyncGenerateResource,
GenerateResourceWithRawResponse,
AsyncGenerateResourceWithRawResponse,
GenerateResourceWithStreamingResponse,
AsyncGenerateResourceWithStreamingResponse,
)
from .documents import (
DocumentsResource,
AsyncDocumentsResource,
Expand Down Expand Up @@ -272,6 +288,18 @@
"AsyncVideoUpscaleResourceWithRawResponse",
"VideoUpscaleResourceWithStreamingResponse",
"AsyncVideoUpscaleResourceWithStreamingResponse",
"GenerateResource",
"AsyncGenerateResource",
"GenerateResourceWithRawResponse",
"AsyncGenerateResourceWithRawResponse",
"GenerateResourceWithStreamingResponse",
"AsyncGenerateResourceWithStreamingResponse",
"RoutersResource",
"AsyncRoutersResource",
"RoutersResourceWithRawResponse",
"AsyncRoutersResourceWithRawResponse",
"RoutersResourceWithStreamingResponse",
"AsyncRoutersResourceWithStreamingResponse",
"OrganizationResource",
"AsyncOrganizationResource",
"OrganizationResourceWithRawResponse",
Expand Down
Loading