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.11.0"
".": "5.12.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: 57
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/runwayml/runwayml-264e9b264bae2f906e06f33a5af492e19580bcd192f6094cfdb534fcbf70f5bc.yml
openapi_spec_hash: 30ac92dee6f88c19ea1cdc174b05a260
config_hash: 6bdea3c3109ee75952f779d566c229ea
configured_endpoints: 59
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/runwayml/runwayml-a31e62dafc005582320d354e7aed335c8df690338ca539c055aa4a5637b9ad3b.yml
openapi_spec_hash: ab95f9ae7163b960171e68f4ff95da4e
config_hash: 95e64e640428abd4184a48762d9fd5f8
19 changes: 19 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,24 @@
# Changelog

## 5.12.0 (2026-07-23)

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

### Features

* **api:** add Model Router image and audio generation ([e9f38d4](https://github.com/runwayml/sdk-python/commit/e9f38d40cf90be9e1e0775e50db76bef1aac1969))
* **api:** expose generate image and audio endpoints ([d19bc95](https://github.com/runwayml/sdk-python/commit/d19bc9510ae78e7be4c257703e0e06e068eef0a7))


### Bug Fixes

* **client:** make generate.image and generate.audio responses awaitable ([d4900ac](https://github.com/runwayml/sdk-python/commit/d4900aca61dbb0ee983331aba287ac0930e975ac))


### Chores

* **openapi:** keep generate.video SDK schema task-only ([4b6e6c4](https://github.com/runwayml/sdk-python/commit/4b6e6c4abf38ae0cad30ba73acbf7f03401e00ac))

## 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)
Expand Down
24 changes: 24 additions & 0 deletions api.md
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,30 @@ 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>

## Image

Types:

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

Methods:

- <code title="post /v1/generate/image">client.generate.image.<a href="./src/runwayml/resources/generate/image.py">create</a>(\*\*<a href="src/runwayml/types/generate/image_create_params.py">params</a>) -> <a href="./src/runwayml/types/generate/image_create_response.py">ImageCreateResponse</a></code>

## Audio

Types:

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

Methods:

- <code title="post /v1/generate/audio">client.generate.audio.<a href="./src/runwayml/resources/generate/audio.py">create</a>(\*\*<a href="src/runwayml/types/generate/audio_create_params.py">params</a>) -> <a href="./src/runwayml/types/generate/audio_create_response.py">AudioCreateResponse</a></code>

# Routers

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.11.0"
version = "5.12.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.11.0" # x-release-please-version
__version__ = "5.12.0" # x-release-please-version
28 changes: 28 additions & 0 deletions src/runwayml/resources/generate/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,21 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

from .audio import (
AudioResource,
AsyncAudioResource,
AudioResourceWithRawResponse,
AsyncAudioResourceWithRawResponse,
AudioResourceWithStreamingResponse,
AsyncAudioResourceWithStreamingResponse,
)
from .image import (
ImageResource,
AsyncImageResource,
ImageResourceWithRawResponse,
AsyncImageResourceWithRawResponse,
ImageResourceWithStreamingResponse,
AsyncImageResourceWithStreamingResponse,
)
from .video import (
VideoResource,
AsyncVideoResource,
Expand All @@ -24,6 +40,18 @@
"AsyncVideoResourceWithRawResponse",
"VideoResourceWithStreamingResponse",
"AsyncVideoResourceWithStreamingResponse",
"ImageResource",
"AsyncImageResource",
"ImageResourceWithRawResponse",
"AsyncImageResourceWithRawResponse",
"ImageResourceWithStreamingResponse",
"AsyncImageResourceWithStreamingResponse",
"AudioResource",
"AsyncAudioResource",
"AudioResourceWithRawResponse",
"AsyncAudioResourceWithRawResponse",
"AudioResourceWithStreamingResponse",
"AsyncAudioResourceWithStreamingResponse",
"GenerateResource",
"AsyncGenerateResource",
"GenerateResourceWithRawResponse",
Expand Down
198 changes: 198 additions & 0 deletions src/runwayml/resources/generate/audio.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,198 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

from __future__ import annotations

import httpx

from runwayml.lib.polling import (
NewTaskCreatedResponse,
AsyncNewTaskCreatedResponse,
create_waitable_resource,
create_async_waitable_resource,
)

from ..._types import Body, Query, Headers, NotGiven, not_given
from ..._utils import maybe_transform, async_maybe_transform
from ..._compat import cached_property
from ..._resource import SyncAPIResource, AsyncAPIResource
from ..._response import (
to_raw_response_wrapper,
to_streamed_response_wrapper,
async_to_raw_response_wrapper,
async_to_streamed_response_wrapper,
)
from ..._base_client import make_request_options
from ...types.generate import audio_create_params
from ...types.generate.audio_create_response import AudioCreateResponse

__all__ = ["AudioResource", "AsyncAudioResource"]


class AudioResource(SyncAPIResource):
@cached_property
def with_raw_response(self) -> AudioResourceWithRawResponse:
"""
This property can be used as a prefix for any HTTP method call to return
the raw response object instead of the parsed content.

For more information, see https://www.github.com/runwayml/sdk-python#accessing-raw-response-data-eg-headers
"""
return AudioResourceWithRawResponse(self)

@cached_property
def with_streaming_response(self) -> AudioResourceWithStreamingResponse:
"""
An alternative to `.with_raw_response` that doesn't eagerly read the response body.

For more information, see https://www.github.com/runwayml/sdk-python#with_streaming_response
"""
return AudioResourceWithStreamingResponse(self)

def create(
self,
*,
config_id: str,
input: audio_create_params.Input,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> NewTaskCreatedResponse:
"""
Start an audio generation task using a saved Model Router config instead of
naming a model. Set input.type to speech to speak promptText verbatim, or audio
to generate audio described by promptText.

Args:
config_id: The slug of a saved Model Router config to route this request with.

input: Model-agnostic audio generation input. The router selects a model and maps these
options to it.

extra_headers: Send extra headers

extra_query: Add additional query parameters to the request

extra_body: Add additional JSON properties to the request

timeout: Override the client-level default timeout for this request, in seconds
"""
return self._post(
"/v1/generate/audio",
body=maybe_transform(
{
"config_id": config_id,
"input": input,
},
audio_create_params.AudioCreateParams,
),
options=make_request_options(
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
),
cast_to=create_waitable_resource(AudioCreateResponse, self._client),
)


class AsyncAudioResource(AsyncAPIResource):
@cached_property
def with_raw_response(self) -> AsyncAudioResourceWithRawResponse:
"""
This property can be used as a prefix for any HTTP method call to return
the raw response object instead of the parsed content.

For more information, see https://www.github.com/runwayml/sdk-python#accessing-raw-response-data-eg-headers
"""
return AsyncAudioResourceWithRawResponse(self)

@cached_property
def with_streaming_response(self) -> AsyncAudioResourceWithStreamingResponse:
"""
An alternative to `.with_raw_response` that doesn't eagerly read the response body.

For more information, see https://www.github.com/runwayml/sdk-python#with_streaming_response
"""
return AsyncAudioResourceWithStreamingResponse(self)

async def create(
self,
*,
config_id: str,
input: audio_create_params.Input,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> AsyncNewTaskCreatedResponse:
"""
Start an audio generation task using a saved Model Router config instead of
naming a model. Set input.type to speech to speak promptText verbatim, or audio
to generate audio described by promptText.

Args:
config_id: The slug of a saved Model Router config to route this request with.

input: Model-agnostic audio generation input. The router selects a model and maps these
options to it.

extra_headers: Send extra headers

extra_query: Add additional query parameters to the request

extra_body: Add additional JSON properties to the request

timeout: Override the client-level default timeout for this request, in seconds
"""
return await self._post(
"/v1/generate/audio",
body=await async_maybe_transform(
{
"config_id": config_id,
"input": input,
},
audio_create_params.AudioCreateParams,
),
options=make_request_options(
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
),
cast_to=create_async_waitable_resource(AudioCreateResponse, self._client),
)


class AudioResourceWithRawResponse:
def __init__(self, audio: AudioResource) -> None:
self._audio = audio

self.create = to_raw_response_wrapper(
audio.create,
)


class AsyncAudioResourceWithRawResponse:
def __init__(self, audio: AsyncAudioResource) -> None:
self._audio = audio

self.create = async_to_raw_response_wrapper(
audio.create,
)


class AudioResourceWithStreamingResponse:
def __init__(self, audio: AudioResource) -> None:
self._audio = audio

self.create = to_streamed_response_wrapper(
audio.create,
)


class AsyncAudioResourceWithStreamingResponse:
def __init__(self, audio: AsyncAudioResource) -> None:
self._audio = audio

self.create = async_to_streamed_response_wrapper(
audio.create,
)
Loading