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.7.0"
".": "5.8.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: 50
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/runwayml/runwayml-6891f36f2cfa06dc53ee188ca0ab127f30f849d15ac7cf45d4a1eb27c9ab3868.yml
openapi_spec_hash: e2e91001c6f699c4fbe971c44043950f
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/runwayml/runwayml-caa255c8f1c6fd2b54d331eeacc13de517b8dbaba491ef94745d107798b5eb7a.yml
openapi_spec_hash: d9f7b43604b06f389e2fc45376d0a519
config_hash: 955a0e451964a44778c5c0f54ca1c994
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# Changelog

## 5.8.0 (2026-07-06)

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

### Features

* **api:** add realtime session external integrations ([a4aeded](https://github.com/runwayml/sdk-python/commit/a4aedede3c8ad44811640c192a0044ddd2c2e31c))

## 5.7.0 (2026-07-06)

Full Changelog: [v5.6.0...v5.7.0](https://github.com/runwayml/sdk-python/compare/v5.6.0...v5.7.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 = "5.7.0"
version = "5.8.0"
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.7.0" # x-release-please-version
__version__ = "5.8.0" # x-release-please-version
18 changes: 18 additions & 0 deletions src/runwayml/resources/realtime_sessions.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@ def create(
*,
avatar: realtime_session_create_params.Avatar,
model: Literal["gwm1_avatars"],
integration: realtime_session_create_params.Integration | Omit = omit,
livekit: realtime_session_create_params.Livekit | Omit = omit,
max_duration: int | Omit = omit,
personality: str | Omit = omit,
start_script: str | Omit = omit,
Expand All @@ -72,6 +74,11 @@ def create(

model: The realtime session model type.

integration: External integration. Runway renders the avatar; the integration owns
conversation or audio.

livekit: Use integration with type "livekit" instead.

max_duration: Maximum session duration in seconds.

personality: Override the avatar personality for this session. If not provided, uses the
Expand All @@ -96,6 +103,8 @@ def create(
{
"avatar": avatar,
"model": model,
"integration": integration,
"livekit": livekit,
"max_duration": max_duration,
"personality": personality,
"start_script": start_script,
Expand Down Expand Up @@ -209,6 +218,8 @@ async def create(
*,
avatar: realtime_session_create_params.Avatar,
model: Literal["gwm1_avatars"],
integration: realtime_session_create_params.Integration | Omit = omit,
livekit: realtime_session_create_params.Livekit | Omit = omit,
max_duration: int | Omit = omit,
personality: str | Omit = omit,
start_script: str | Omit = omit,
Expand All @@ -231,6 +242,11 @@ async def create(

model: The realtime session model type.

integration: External integration. Runway renders the avatar; the integration owns
conversation or audio.

livekit: Use integration with type "livekit" instead.

max_duration: Maximum session duration in seconds.

personality: Override the avatar personality for this session. If not provided, uses the
Expand All @@ -255,6 +271,8 @@ async def create(
{
"avatar": avatar,
"model": model,
"integration": integration,
"livekit": livekit,
"max_duration": max_duration,
"personality": personality,
"start_script": start_script,
Expand Down
73 changes: 73 additions & 0 deletions src/runwayml/types/realtime_session_create_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@
"Avatar",
"AvatarRunwayPreset",
"AvatarCustom",
"Integration",
"IntegrationElevenlabs",
"IntegrationLivekit",
"Livekit",
"Tool",
"ToolClientEvent",
"ToolClientEventParameter",
Expand Down Expand Up @@ -42,6 +46,15 @@ class RealtimeSessionCreateParams(TypedDict, total=False):
model: Required[Literal["gwm1_avatars"]]
"""The realtime session model type."""

integration: Integration
"""External integration.

Runway renders the avatar; the integration owns conversation or audio.
"""

livekit: Livekit
"""Use integration with type "livekit" instead."""

max_duration: Annotated[int, PropertyInfo(alias="maxDuration")]
"""Maximum session duration in seconds."""

Expand Down Expand Up @@ -97,6 +110,66 @@ class AvatarCustom(TypedDict, total=False):
Avatar: TypeAlias = Union[AvatarRunwayPreset, AvatarCustom]


class IntegrationElevenlabs(TypedDict, total=False):
"""ElevenLabs handles conversation; Runway renders the avatar video."""

signed_url: Required[Annotated[str, PropertyInfo(alias="signedUrl")]]
"""ConvAI signed WebSocket URL (~15 min lifetime)."""

type: Required[Literal["elevenlabs"]]


class IntegrationLivekit(TypedDict, total=False):
"""
Join an external LiveKit room; Runway publishes video, your agent supplies audio.
"""

token: Required[str]
"""
LiveKit access token granting the avatar worker publish rights in the external
room.
"""

room_name: Required[Annotated[str, PropertyInfo(alias="roomName")]]
"""Name of the external LiveKit room."""

type: Required[Literal["livekit"]]

url: Required[str]
"""WebSocket URL of the external LiveKit server the avatar worker should join."""

agent_identity: Annotated[str, PropertyInfo(alias="agentIdentity")]
"""The participant identity of the customer agent already in the room.

When provided, the avatar worker trusts audio published by this identity.
"""


Integration: TypeAlias = Union[IntegrationElevenlabs, IntegrationLivekit]


class Livekit(TypedDict, total=False):
"""Use integration with type "livekit" instead."""

token: Required[str]
"""
LiveKit access token granting the avatar worker publish rights in the external
room.
"""

room_name: Required[Annotated[str, PropertyInfo(alias="roomName")]]
"""Name of the external LiveKit room."""

url: Required[str]
"""WebSocket URL of the external LiveKit server the avatar worker should join."""

agent_identity: Annotated[str, PropertyInfo(alias="agentIdentity")]
"""The participant identity of the customer agent already in the room.

When provided, the avatar worker trusts audio published by this identity.
"""


class ToolClientEventParameterString(TypedDict, total=False):
description: Required[str]
"""A description of the parameter."""
Expand Down
20 changes: 20 additions & 0 deletions tests/api_resources/test_realtime_sessions.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,16 @@ def test_method_create_with_all_params(self, client: RunwayML) -> None:
"type": "runway-preset",
},
model="gwm1_avatars",
integration={
"signed_url": "https://example.com",
"type": "elevenlabs",
},
livekit={
"token": "x",
"room_name": "x",
"url": "https://example.com",
"agent_identity": "x",
},
max_duration=10,
personality="x",
start_script="x",
Expand Down Expand Up @@ -194,6 +204,16 @@ async def test_method_create_with_all_params(self, async_client: AsyncRunwayML)
"type": "runway-preset",
},
model="gwm1_avatars",
integration={
"signed_url": "https://example.com",
"type": "elevenlabs",
},
livekit={
"token": "x",
"room_name": "x",
"url": "https://example.com",
"agent_identity": "x",
},
max_duration=10,
personality="x",
start_script="x",
Expand Down