Skip to content
Open
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.2.0"
".": "4.2.1"
}
13 changes: 13 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,18 @@
# Changelog

## 4.2.1 (2025-12-09)

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

### Bug Fixes

* **types:** allow pyright to infer TypedDict types within SequenceNotStr ([9d4f77c](https://github.com/runwayml/sdk-python/commit/9d4f77c847837f20ef333a10e5a0d1d9e6a25cf5))


### Chores

* add missing docstrings ([4c14222](https://github.com/runwayml/sdk-python/commit/4c142226410821c794e9e3bf43c7bf9a7d5bf6c1))

## 4.2.0 (2025-12-04)

Full Changelog: [v4.1.1...v4.2.0](https://github.com/runwayml/sdk-python/compare/v4.1.1...v4.2.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 = "4.2.0"
version = "4.2.1"
description = "The official Python library for the runwayml API"
dynamic = ["readme"]
license = "Apache-2.0"
Expand Down
5 changes: 3 additions & 2 deletions src/runwayml/_types.py
Original file line number Diff line number Diff line change
Expand Up @@ -243,6 +243,9 @@ class HttpxSendArgs(TypedDict, total=False):
if TYPE_CHECKING:
# This works because str.__contains__ does not accept object (either in typeshed or at runtime)
# https://github.com/hauntsaninja/useful_types/blob/5e9710f3875107d068e7679fd7fec9cfab0eff3b/useful_types/__init__.py#L285
#
# Note: index() and count() methods are intentionally omitted to allow pyright to properly
# infer TypedDict types when dict literals are used in lists assigned to SequenceNotStr.
class SequenceNotStr(Protocol[_T_co]):
@overload
def __getitem__(self, index: SupportsIndex, /) -> _T_co: ...
Expand All @@ -251,8 +254,6 @@ def __getitem__(self, index: slice, /) -> Sequence[_T_co]: ...
def __contains__(self, value: object, /) -> bool: ...
def __len__(self) -> int: ...
def __iter__(self) -> Iterator[_T_co]: ...
def index(self, value: Any, start: int = 0, stop: int = ..., /) -> int: ...
def count(self, value: Any, /) -> int: ...
def __reversed__(self) -> Iterator[_T_co]: ...
else:
# just point this to a normal `Sequence` at runtime to avoid having to special case
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__ = "4.2.0" # x-release-please-version
__version__ = "4.2.1" # x-release-please-version
16 changes: 16 additions & 0 deletions src/runwayml/types/character_performance_create_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,13 +62,23 @@ class CharacterPerformanceCreateParams(TypedDict, total=False):


class CharacterImage(TypedDict, total=False):
"""An image of your character.

In the output, the character will use the reference video performance in its original static environment.
"""

type: Required[Literal["image"]]

uri: Required[str]
"""A HTTPS URL."""


class CharacterVideo(TypedDict, total=False):
"""A video of your character.

In the output, the character will use the reference video performance in its original animated environment and some of the character's own movements.
"""

type: Required[Literal["video"]]

uri: Required[str]
Expand All @@ -79,13 +89,19 @@ class CharacterVideo(TypedDict, total=False):


class Reference(TypedDict, total=False):
"""
A video of a person performing in the manner that you would like your character to perform. The video must be between 3 and 30 seconds in duration.
"""

type: Required[Literal["video"]]

uri: Required[str]
"""A HTTPS URL."""


class ContentModeration(TypedDict, total=False):
"""Settings that affect the behavior of the content moderation system."""

public_figure_threshold: Annotated[Literal["auto", "low"], PropertyInfo(alias="publicFigureThreshold")]
"""
When set to `low`, the content moderation system will be less strict about
Expand Down
4 changes: 4 additions & 0 deletions src/runwayml/types/image_to_video_create_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,8 @@ class Gen4TurboPromptImagePromptImage(TypedDict, total=False):


class Gen4TurboContentModeration(TypedDict, total=False):
"""Settings that affect the behavior of the content moderation system."""

public_figure_threshold: Annotated[Literal["auto", "low"], PropertyInfo(alias="publicFigureThreshold")]
"""
When set to `low`, the content moderation system will be less strict about
Expand Down Expand Up @@ -160,6 +162,8 @@ class Gen3aTurboPromptImagePromptImage(TypedDict, total=False):


class Gen3aTurboContentModeration(TypedDict, total=False):
"""Settings that affect the behavior of the content moderation system."""

public_figure_threshold: Annotated[Literal["auto", "low"], PropertyInfo(alias="publicFigureThreshold")]
"""
When set to `low`, the content moderation system will be less strict about
Expand Down
8 changes: 8 additions & 0 deletions src/runwayml/types/organization_retrieve_response.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@


class TierModels(BaseModel):
"""Limits associated with the model."""

max_concurrent_generations: int = FieldInfo(alias="maxConcurrentGenerations")
"""The maximum number of generations that can be run concurrently for this model."""

Expand All @@ -18,6 +20,8 @@ class TierModels(BaseModel):


class Tier(BaseModel):
"""Limits associated with the organization's tier."""

max_monthly_credit_spend: int = FieldInfo(alias="maxMonthlyCreditSpend")
"""The maximum number of credits that can be purchased in a month."""

Expand All @@ -26,11 +30,15 @@ class Tier(BaseModel):


class UsageModels(BaseModel):
"""Usage data for the model."""

daily_generations: int = FieldInfo(alias="dailyGenerations")
"""The number of generations that have been run for this model in the past day."""


class Usage(BaseModel):
"""Usage data for the organization."""

models: Dict[str, UsageModels]


Expand Down
6 changes: 6 additions & 0 deletions src/runwayml/types/speech_to_speech_create_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,17 @@ class SpeechToSpeechCreateParams(TypedDict, total=False):


class MediaAudio(TypedDict, total=False):
"""An audio file containing dialogue to be processed."""

type: Required[Literal["audio"]]

uri: Required[str]
"""A HTTPS URL."""


class MediaVideo(TypedDict, total=False):
"""A video file containing dialogue to be processed."""

type: Required[Literal["video"]]

uri: Required[str]
Expand All @@ -41,6 +45,8 @@ class MediaVideo(TypedDict, total=False):


class Voice(TypedDict, total=False):
"""A voice preset from the RunwayML API."""

preset_id: Required[
Annotated[
Literal[
Expand Down
12 changes: 12 additions & 0 deletions src/runwayml/types/task_retrieve_response.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@


class Pending(BaseModel):
"""A pending task"""

id: str
"""The ID of the task being returned."""

Expand All @@ -23,6 +25,8 @@ class Pending(BaseModel):


class Throttled(BaseModel):
"""A throttled task"""

id: str
"""The ID of the task being returned."""

Expand All @@ -33,6 +37,8 @@ class Throttled(BaseModel):


class Cancelled(BaseModel):
"""A cancelled or deleted task"""

id: str
"""The ID of the task being returned."""

Expand All @@ -43,6 +49,8 @@ class Cancelled(BaseModel):


class Running(BaseModel):
"""A running task"""

id: str
"""The ID of the task being returned."""

Expand All @@ -55,6 +63,8 @@ class Running(BaseModel):


class Failed(BaseModel):
"""A failed task"""

id: str
"""The ID of the task being returned."""

Expand All @@ -77,6 +87,8 @@ class Failed(BaseModel):


class Succeeded(BaseModel):
"""A succeeded task"""

id: str
"""The ID of the task being returned."""

Expand Down
4 changes: 4 additions & 0 deletions src/runwayml/types/text_to_image_create_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,8 @@ class Gen4ImageTurboReferenceImage(TypedDict, total=False):


class Gen4ImageTurboContentModeration(TypedDict, total=False):
"""Settings that affect the behavior of the content moderation system."""

public_figure_threshold: Annotated[Literal["auto", "low"], PropertyInfo(alias="publicFigureThreshold")]
"""
When set to `low`, the content moderation system will be less strict about
Expand Down Expand Up @@ -138,6 +140,8 @@ class Gen4Image(TypedDict, total=False):


class Gen4ImageContentModeration(TypedDict, total=False):
"""Settings that affect the behavior of the content moderation system."""

public_figure_threshold: Annotated[Literal["auto", "low"], PropertyInfo(alias="publicFigureThreshold")]
"""
When set to `low`, the content moderation system will be less strict about
Expand Down
2 changes: 2 additions & 0 deletions src/runwayml/types/text_to_speech_create_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ class TextToSpeechCreateParams(TypedDict, total=False):


class Voice(TypedDict, total=False):
"""A voice preset from the RunwayML API."""

preset_id: Required[
Annotated[
Literal[
Expand Down
6 changes: 6 additions & 0 deletions src/runwayml/types/video_to_video_create_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@ class VideoToVideoCreateParams(TypedDict, total=False):


class ContentModeration(TypedDict, total=False):
"""Settings that affect the behavior of the content moderation system."""

public_figure_threshold: Annotated[Literal["auto", "low"], PropertyInfo(alias="publicFigureThreshold")]
"""
When set to `low`, the content moderation system will be less strict about
Expand All @@ -55,6 +57,10 @@ class ContentModeration(TypedDict, total=False):


class Reference(TypedDict, total=False):
"""
Passing an image reference allows the model to emulate the style or content of the reference in the output.
"""

type: Required[Literal["image"]]

uri: Required[str]
Expand Down