From a4aedede3c8ad44811640c192a0044ddd2c2e31c Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 6 Jul 2026 19:05:15 +0000 Subject: [PATCH 1/2] feat(api): add realtime session external integrations Document integration on POST /v1/realtime_sessions for ElevenLabs and external LiveKit integrations. Replaces deprecated livekit object with integration.type "livekit". --- .stats.yml | 4 +- src/runwayml/resources/realtime_sessions.py | 18 +++++ .../types/realtime_session_create_params.py | 73 +++++++++++++++++++ tests/api_resources/test_realtime_sessions.py | 20 +++++ 4 files changed, 113 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 732af71..f6fb8cf 100644 --- a/.stats.yml +++ b/.stats.yml @@ -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 diff --git a/src/runwayml/resources/realtime_sessions.py b/src/runwayml/resources/realtime_sessions.py index 0dfa3d1..de564fd 100644 --- a/src/runwayml/resources/realtime_sessions.py +++ b/src/runwayml/resources/realtime_sessions.py @@ -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, @@ -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 @@ -96,6 +103,8 @@ def create( { "avatar": avatar, "model": model, + "integration": integration, + "livekit": livekit, "max_duration": max_duration, "personality": personality, "start_script": start_script, @@ -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, @@ -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 @@ -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, diff --git a/src/runwayml/types/realtime_session_create_params.py b/src/runwayml/types/realtime_session_create_params.py index 668775f..cd736b9 100644 --- a/src/runwayml/types/realtime_session_create_params.py +++ b/src/runwayml/types/realtime_session_create_params.py @@ -13,6 +13,10 @@ "Avatar", "AvatarRunwayPreset", "AvatarCustom", + "Integration", + "IntegrationElevenlabs", + "IntegrationLivekit", + "Livekit", "Tool", "ToolClientEvent", "ToolClientEventParameter", @@ -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.""" @@ -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.""" diff --git a/tests/api_resources/test_realtime_sessions.py b/tests/api_resources/test_realtime_sessions.py index 2dc4294..0df4040 100644 --- a/tests/api_resources/test_realtime_sessions.py +++ b/tests/api_resources/test_realtime_sessions.py @@ -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", @@ -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", From 957c85254ea0dcb7d9c5a665853ecd8a977cfabc Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 6 Jul 2026 19:05:39 +0000 Subject: [PATCH 2/2] release: 5.8.0 --- .release-please-manifest.json | 2 +- CHANGELOG.md | 8 ++++++++ pyproject.toml | 2 +- src/runwayml/_version.py | 2 +- 4 files changed, 11 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 4a0511b..8375aa0 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "5.7.0" + ".": "5.8.0" } \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index 11350b9..9416654 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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) diff --git a/pyproject.toml b/pyproject.toml index 763c78a..2d62054 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -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" diff --git a/src/runwayml/_version.py b/src/runwayml/_version.py index 0b3d514..9b4ea71 100644 --- a/src/runwayml/_version.py +++ b/src/runwayml/_version.py @@ -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