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.6.3"
".": "4.7.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: 14
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/runwayml%2Frunwayml-b3276a8508268090b14e297f5cb18448da7a763653c6d38c23f0eea0984d8008.yml
openapi_spec_hash: 95ae975f17217c8d144c4ba80846beca
config_hash: 803d5c0aa94eea0a7981b91728218d3f
configured_endpoints: 31
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/runwayml%2Frunwayml-4ddc8e3d83c8601fc378c702bbcb5af2976b481db513bd389a5f57645a20cd04.yml
openapi_spec_hash: 5795c6af9e9404765bda670e781fe500
config_hash: 3c88fcd4dd6f3a7d7f6e94b57b430243
13 changes: 13 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,18 @@
# Changelog

## 4.7.0 (2026-03-06)

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

### Features

* **api:** add avatar, voice, document, and realtime session endpoints ([18b1573](https://github.com/runwayml/sdk-python/commit/18b15733d52e1ddb60d1f9a847e4fd7a712b4701))


### Chores

* **test:** do not count install time for mock server timeout ([84988e1](https://github.com/runwayml/sdk-python/commit/84988e1eeaa6d25b265bfb77863ed6a4ce271201))

## 4.6.3 (2026-02-27)

Full Changelog: [v4.6.2...v4.6.3](https://github.com/runwayml/sdk-python/compare/v4.6.2...v4.6.3)
Expand Down
71 changes: 71 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,77 @@ 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`.

## Pagination

List methods in the RunwayML API are paginated.

This library provides auto-paginating iterators with each list response, so you do not have to request successive pages manually:

```python
from runwayml import RunwayML

client = RunwayML()

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

Or, asynchronously:

```python
import asyncio
from runwayml import AsyncRunwayML

client = AsyncRunwayML()


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


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(
limit=1,
)
if first_page.has_next_page():
print(f"will fetch next page using these details: {first_page.next_page_info()}")
next_page = await first_page.get_next_page()
print(f"number of items we just fetched: {len(next_page.data)}")

# Remove `await` for non-async usage.
```

Or just work directly with the returned data:

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

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

# Remove `await` for non-async usage.
```

## Nested params

Nested parameters are dictionaries, typed using `TypedDict`, for example:
Expand Down
71 changes: 71 additions & 0 deletions api.md
Original file line number Diff line number Diff line change
Expand Up @@ -143,3 +143,74 @@ Methods:

- <code title="get /v1/organization">client.organization.<a href="./src/runwayml/resources/organization.py">retrieve</a>() -> <a href="./src/runwayml/types/organization_retrieve_response.py">OrganizationRetrieveResponse</a></code>
- <code title="post /v1/organization/usage">client.organization.<a href="./src/runwayml/resources/organization.py">retrieve_usage</a>(\*\*<a href="src/runwayml/types/organization_retrieve_usage_params.py">params</a>) -> <a href="./src/runwayml/types/organization_retrieve_usage_response.py">OrganizationRetrieveUsageResponse</a></code>

# Avatars

Types:

```python
from runwayml.types import (
AvatarCreateResponse,
AvatarRetrieveResponse,
AvatarUpdateResponse,
AvatarListResponse,
)
```

Methods:

- <code title="post /v1/avatars">client.avatars.<a href="./src/runwayml/resources/avatars.py">create</a>(\*\*<a href="src/runwayml/types/avatar_create_params.py">params</a>) -> <a href="./src/runwayml/types/avatar_create_response.py">AvatarCreateResponse</a></code>
- <code title="get /v1/avatars/{id}">client.avatars.<a href="./src/runwayml/resources/avatars.py">retrieve</a>(id) -> <a href="./src/runwayml/types/avatar_retrieve_response.py">AvatarRetrieveResponse</a></code>
- <code title="patch /v1/avatars/{id}">client.avatars.<a href="./src/runwayml/resources/avatars.py">update</a>(id, \*\*<a href="src/runwayml/types/avatar_update_params.py">params</a>) -> <a href="./src/runwayml/types/avatar_update_response.py">AvatarUpdateResponse</a></code>
- <code title="get /v1/avatars">client.avatars.<a href="./src/runwayml/resources/avatars.py">list</a>(\*\*<a href="src/runwayml/types/avatar_list_params.py">params</a>) -> <a href="./src/runwayml/types/avatar_list_response.py">SyncCursorPage[AvatarListResponse]</a></code>
- <code title="delete /v1/avatars/{id}">client.avatars.<a href="./src/runwayml/resources/avatars.py">delete</a>(id) -> None</code>

# Documents

Types:

```python
from runwayml.types import DocumentCreateResponse, DocumentRetrieveResponse, DocumentListResponse
```

Methods:

- <code title="post /v1/documents">client.documents.<a href="./src/runwayml/resources/documents.py">create</a>(\*\*<a href="src/runwayml/types/document_create_params.py">params</a>) -> <a href="./src/runwayml/types/document_create_response.py">DocumentCreateResponse</a></code>
- <code title="get /v1/documents/{id}">client.documents.<a href="./src/runwayml/resources/documents.py">retrieve</a>(id) -> <a href="./src/runwayml/types/document_retrieve_response.py">DocumentRetrieveResponse</a></code>
- <code title="get /v1/documents">client.documents.<a href="./src/runwayml/resources/documents.py">list</a>(\*\*<a href="src/runwayml/types/document_list_params.py">params</a>) -> <a href="./src/runwayml/types/document_list_response.py">SyncCursorPage[DocumentListResponse]</a></code>
- <code title="delete /v1/documents/{id}">client.documents.<a href="./src/runwayml/resources/documents.py">delete</a>(id) -> None</code>

# RealtimeSessions

Types:

```python
from runwayml.types import RealtimeSessionCreateResponse, RealtimeSessionRetrieveResponse
```

Methods:

- <code title="post /v1/realtime_sessions">client.realtime_sessions.<a href="./src/runwayml/resources/realtime_sessions.py">create</a>(\*\*<a href="src/runwayml/types/realtime_session_create_params.py">params</a>) -> <a href="./src/runwayml/types/realtime_session_create_response.py">RealtimeSessionCreateResponse</a></code>
- <code title="get /v1/realtime_sessions/{id}">client.realtime_sessions.<a href="./src/runwayml/resources/realtime_sessions.py">retrieve</a>(id) -> <a href="./src/runwayml/types/realtime_session_retrieve_response.py">RealtimeSessionRetrieveResponse</a></code>
- <code title="delete /v1/realtime_sessions/{id}">client.realtime_sessions.<a href="./src/runwayml/resources/realtime_sessions.py">delete</a>(id) -> None</code>

# Voices

Types:

```python
from runwayml.types import (
VoiceCreateResponse,
VoiceRetrieveResponse,
VoiceListResponse,
VoicePreviewResponse,
)
```

Methods:

- <code title="post /v1/voices">client.voices.<a href="./src/runwayml/resources/voices.py">create</a>(\*\*<a href="src/runwayml/types/voice_create_params.py">params</a>) -> <a href="./src/runwayml/types/voice_create_response.py">VoiceCreateResponse</a></code>
- <code title="get /v1/voices/{id}">client.voices.<a href="./src/runwayml/resources/voices.py">retrieve</a>(id) -> <a href="./src/runwayml/types/voice_retrieve_response.py">VoiceRetrieveResponse</a></code>
- <code title="get /v1/voices">client.voices.<a href="./src/runwayml/resources/voices.py">list</a>(\*\*<a href="src/runwayml/types/voice_list_params.py">params</a>) -> <a href="./src/runwayml/types/voice_list_response.py">SyncCursorPage[VoiceListResponse]</a></code>
- <code title="delete /v1/voices/{id}">client.voices.<a href="./src/runwayml/resources/voices.py">delete</a>(id) -> None</code>
- <code title="post /v1/voices/preview">client.voices.<a href="./src/runwayml/resources/voices.py">preview</a>(\*\*<a href="src/runwayml/types/voice_preview_params.py">params</a>) -> <a href="./src/runwayml/types/voice_preview_response.py">VoicePreviewResponse</a></code>
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.6.3"
version = "4.7.0"
description = "The official Python library for the runwayml API"
dynamic = ["readme"]
license = "Apache-2.0"
Expand Down
13 changes: 12 additions & 1 deletion scripts/mock
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,22 @@ echo "==> Starting mock server with URL ${URL}"

# Run prism mock on the given spec
if [ "$1" == "--daemon" ]; then
# Pre-install the package so the download doesn't eat into the startup timeout
npm exec --package=@stainless-api/prism-cli@5.15.0 -- prism --version

npm exec --package=@stainless-api/prism-cli@5.15.0 -- prism mock "$URL" &> .prism.log &

# Wait for server to come online
# Wait for server to come online (max 30s)
echo -n "Waiting for server"
attempts=0
while ! grep -q "✖ fatal\|Prism is listening" ".prism.log" ; do
attempts=$((attempts + 1))
if [ "$attempts" -ge 300 ]; then
echo
echo "Timed out waiting for Prism server to start"
cat .prism.log
exit 1
fi
echo -n "."
sleep 0.1
done
Expand Down
Loading