Skip to content

Commit f09aaeb

Browse files
authored
Merge pull request #144 from runwayml/release-please--branches--main--changes--next
release: 3.1.0
2 parents 0355c3b + 8403998 commit f09aaeb

18 files changed

+573
-19
lines changed

.release-please-manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
".": "3.0.6"
2+
".": "3.1.0"
33
}

.stats.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
configured_endpoints: 4
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/runwayml%2Frunwayml-34491bc11ee43039ff5f1828a4caf68847a7346ab283bbefe88d1690951dd4d6.yml
3-
openapi_spec_hash: 4fc80b2e354cf70ebc85e0ef4e7e6f51
4-
config_hash: 77ce816c37172a537f337abfaf2d65a9
1+
configured_endpoints: 5
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/runwayml%2Frunwayml-8c239934c53125f00aa8829b9f767de17aececb19c088d29446008c186831e2d.yml
3+
openapi_spec_hash: a9b0529ceb1d668bae7a35c40d6a4f2d
4+
config_hash: d16736214512e2116d5b40a9b18a8f71

CHANGELOG.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,18 @@
11
# Changelog
22

3+
## 3.1.0 (2025-05-16)
4+
5+
Full Changelog: [v3.0.6...v3.1.0](https://github.com/runwayml/sdk-python/compare/v3.0.6...v3.1.0)
6+
7+
### Features
8+
9+
* **api:** Gen-4 Image (text-to-image) support ([8adcf96](https://github.com/runwayml/sdk-python/commit/8adcf96fa228c8694272175317587bf3c7b9e2fe))
10+
11+
12+
### Chores
13+
14+
* **ci:** fix installation instructions ([a04350d](https://github.com/runwayml/sdk-python/commit/a04350dd31c9551695c1856a7f6d700d69960807))
15+
316
## 3.0.6 (2025-05-15)
417

518
Full Changelog: [v3.0.5...v3.0.6](https://github.com/runwayml/sdk-python/compare/v3.0.5...v3.0.6)

README.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,24 @@ Nested request parameters are [TypedDicts](https://docs.python.org/3/library/typ
8383

8484
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`.
8585

86+
## Nested params
87+
88+
Nested parameters are dictionaries, typed using `TypedDict`, for example:
89+
90+
```python
91+
from runwayml import RunwayML
92+
93+
client = RunwayML()
94+
95+
text_to_image = client.text_to_image.create(
96+
model="gen4_image",
97+
prompt_text="promptText",
98+
ratio="1920:1080",
99+
content_moderation={"public_figure_threshold": "auto"},
100+
)
101+
print(text_to_image.content_moderation)
102+
```
103+
86104
## Handling errors
87105

88106
When the library is unable to connect to the API (for example, due to network connection problems or a timeout), a subclass of `runwayml.APIConnectionError` is raised.

api.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,18 @@ Methods:
2323

2424
- <code title="post /v1/image_to_video">client.image_to_video.<a href="./src/runwayml/resources/image_to_video.py">create</a>(\*\*<a href="src/runwayml/types/image_to_video_create_params.py">params</a>) -> <a href="./src/runwayml/types/image_to_video_create_response.py">ImageToVideoCreateResponse</a></code>
2525

26+
# TextToImage
27+
28+
Types:
29+
30+
```python
31+
from runwayml.types import TextToImageCreateResponse
32+
```
33+
34+
Methods:
35+
36+
- <code title="post /v1/text_to_image">client.text_to_image.<a href="./src/runwayml/resources/text_to_image.py">create</a>(\*\*<a href="src/runwayml/types/text_to_image_create_params.py">params</a>) -> <a href="./src/runwayml/types/text_to_image_create_response.py">TextToImageCreateResponse</a></code>
37+
2638
# Organization
2739

2840
Types:

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "runwayml"
3-
version = "3.0.6"
3+
version = "3.1.0"
44
description = "The official Python library for the runwayml API"
55
dynamic = ["readme"]
66
license = "Apache-2.0"

scripts/utils/upload-artifact.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ UPLOAD_RESPONSE=$(tar -cz . | curl -v -X PUT \
1818

1919
if echo "$UPLOAD_RESPONSE" | grep -q "HTTP/[0-9.]* 200"; then
2020
echo -e "\033[32mUploaded build to Stainless storage.\033[0m"
21-
echo -e "\033[32mInstallation: npm install 'https://pkg.stainless.com/s/runwayml-python/$SHA'\033[0m"
21+
echo -e "\033[32mInstallation: pip install 'https://pkg.stainless.com/s/runwayml-python/$SHA'\033[0m"
2222
else
2323
echo -e "\033[31mFailed to upload artifact.\033[0m"
2424
exit 1

src/runwayml/_client.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
)
2222
from ._utils import is_given, get_async_library
2323
from ._version import __version__
24-
from .resources import tasks, organization, image_to_video
24+
from .resources import tasks, organization, text_to_image, image_to_video
2525
from ._streaming import Stream as Stream, AsyncStream as AsyncStream
2626
from ._exceptions import RunwayMLError, APIStatusError
2727
from ._base_client import (
@@ -45,6 +45,7 @@
4545
class RunwayML(SyncAPIClient):
4646
tasks: tasks.TasksResource
4747
image_to_video: image_to_video.ImageToVideoResource
48+
text_to_image: text_to_image.TextToImageResource
4849
organization: organization.OrganizationResource
4950
with_raw_response: RunwayMLWithRawResponse
5051
with_streaming_response: RunwayMLWithStreamedResponse
@@ -111,6 +112,7 @@ def __init__(
111112

112113
self.tasks = tasks.TasksResource(self)
113114
self.image_to_video = image_to_video.ImageToVideoResource(self)
115+
self.text_to_image = text_to_image.TextToImageResource(self)
114116
self.organization = organization.OrganizationResource(self)
115117
self.with_raw_response = RunwayMLWithRawResponse(self)
116118
self.with_streaming_response = RunwayMLWithStreamedResponse(self)
@@ -226,6 +228,7 @@ def _make_status_error(
226228
class AsyncRunwayML(AsyncAPIClient):
227229
tasks: tasks.AsyncTasksResource
228230
image_to_video: image_to_video.AsyncImageToVideoResource
231+
text_to_image: text_to_image.AsyncTextToImageResource
229232
organization: organization.AsyncOrganizationResource
230233
with_raw_response: AsyncRunwayMLWithRawResponse
231234
with_streaming_response: AsyncRunwayMLWithStreamedResponse
@@ -292,6 +295,7 @@ def __init__(
292295

293296
self.tasks = tasks.AsyncTasksResource(self)
294297
self.image_to_video = image_to_video.AsyncImageToVideoResource(self)
298+
self.text_to_image = text_to_image.AsyncTextToImageResource(self)
295299
self.organization = organization.AsyncOrganizationResource(self)
296300
self.with_raw_response = AsyncRunwayMLWithRawResponse(self)
297301
self.with_streaming_response = AsyncRunwayMLWithStreamedResponse(self)
@@ -408,27 +412,31 @@ class RunwayMLWithRawResponse:
408412
def __init__(self, client: RunwayML) -> None:
409413
self.tasks = tasks.TasksResourceWithRawResponse(client.tasks)
410414
self.image_to_video = image_to_video.ImageToVideoResourceWithRawResponse(client.image_to_video)
415+
self.text_to_image = text_to_image.TextToImageResourceWithRawResponse(client.text_to_image)
411416
self.organization = organization.OrganizationResourceWithRawResponse(client.organization)
412417

413418

414419
class AsyncRunwayMLWithRawResponse:
415420
def __init__(self, client: AsyncRunwayML) -> None:
416421
self.tasks = tasks.AsyncTasksResourceWithRawResponse(client.tasks)
417422
self.image_to_video = image_to_video.AsyncImageToVideoResourceWithRawResponse(client.image_to_video)
423+
self.text_to_image = text_to_image.AsyncTextToImageResourceWithRawResponse(client.text_to_image)
418424
self.organization = organization.AsyncOrganizationResourceWithRawResponse(client.organization)
419425

420426

421427
class RunwayMLWithStreamedResponse:
422428
def __init__(self, client: RunwayML) -> None:
423429
self.tasks = tasks.TasksResourceWithStreamingResponse(client.tasks)
424430
self.image_to_video = image_to_video.ImageToVideoResourceWithStreamingResponse(client.image_to_video)
431+
self.text_to_image = text_to_image.TextToImageResourceWithStreamingResponse(client.text_to_image)
425432
self.organization = organization.OrganizationResourceWithStreamingResponse(client.organization)
426433

427434

428435
class AsyncRunwayMLWithStreamedResponse:
429436
def __init__(self, client: AsyncRunwayML) -> None:
430437
self.tasks = tasks.AsyncTasksResourceWithStreamingResponse(client.tasks)
431438
self.image_to_video = image_to_video.AsyncImageToVideoResourceWithStreamingResponse(client.image_to_video)
439+
self.text_to_image = text_to_image.AsyncTextToImageResourceWithStreamingResponse(client.text_to_image)
432440
self.organization = organization.AsyncOrganizationResourceWithStreamingResponse(client.organization)
433441

434442

src/runwayml/_version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
22

33
__title__ = "runwayml"
4-
__version__ = "3.0.6" # x-release-please-version
4+
__version__ = "3.1.0" # x-release-please-version

src/runwayml/resources/__init__.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,14 @@
1616
OrganizationResourceWithStreamingResponse,
1717
AsyncOrganizationResourceWithStreamingResponse,
1818
)
19+
from .text_to_image import (
20+
TextToImageResource,
21+
AsyncTextToImageResource,
22+
TextToImageResourceWithRawResponse,
23+
AsyncTextToImageResourceWithRawResponse,
24+
TextToImageResourceWithStreamingResponse,
25+
AsyncTextToImageResourceWithStreamingResponse,
26+
)
1927
from .image_to_video import (
2028
ImageToVideoResource,
2129
AsyncImageToVideoResource,
@@ -38,6 +46,12 @@
3846
"AsyncImageToVideoResourceWithRawResponse",
3947
"ImageToVideoResourceWithStreamingResponse",
4048
"AsyncImageToVideoResourceWithStreamingResponse",
49+
"TextToImageResource",
50+
"AsyncTextToImageResource",
51+
"TextToImageResourceWithRawResponse",
52+
"AsyncTextToImageResourceWithRawResponse",
53+
"TextToImageResourceWithStreamingResponse",
54+
"AsyncTextToImageResourceWithStreamingResponse",
4155
"OrganizationResource",
4256
"AsyncOrganizationResource",
4357
"OrganizationResourceWithRawResponse",

src/runwayml/resources/image_to_video.py

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -88,9 +88,8 @@ def create(
8888
8989
duration: The number of seconds of duration for the output video.
9090
91-
prompt_text: A non-empty string up to 1000 UTF-16 code points in length (that is,
92-
`promptText.length === 1000` in JavaScript). This should describe in detail what
93-
should appear in the output.
91+
prompt_text: A non-empty string up to 1000 characters (measured in UTF-16 code units). This
92+
should describe in detail what should appear in the output.
9493
9594
seed: If unspecified, a random number is chosen. Varying the seed integer is a way to
9695
get different results for the same other request parameters. Using the same seed
@@ -188,9 +187,8 @@ async def create(
188187
189188
duration: The number of seconds of duration for the output video.
190189
191-
prompt_text: A non-empty string up to 1000 UTF-16 code points in length (that is,
192-
`promptText.length === 1000` in JavaScript). This should describe in detail what
193-
should appear in the output.
190+
prompt_text: A non-empty string up to 1000 characters (measured in UTF-16 code units). This
191+
should describe in detail what should appear in the output.
194192
195193
seed: If unspecified, a random number is chosen. Varying the seed integer is a way to
196194
get different results for the same other request parameters. Using the same seed

0 commit comments

Comments
 (0)