runwayml 3.8.0__py3-none-any.whl → 3.10.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
runwayml/_client.py CHANGED
@@ -21,7 +21,15 @@ from ._types import (
21
21
  )
22
22
  from ._utils import is_given, get_async_library
23
23
  from ._version import __version__
24
- from .resources import tasks, organization, text_to_image, video_upscale, image_to_video, character_performance
24
+ from .resources import (
25
+ tasks,
26
+ organization,
27
+ text_to_image,
28
+ video_upscale,
29
+ image_to_video,
30
+ video_to_video,
31
+ character_performance,
32
+ )
25
33
  from ._streaming import Stream as Stream, AsyncStream as AsyncStream
26
34
  from ._exceptions import RunwayMLError, APIStatusError
27
35
  from ._base_client import (
@@ -45,6 +53,7 @@ __all__ = [
45
53
  class RunwayML(SyncAPIClient):
46
54
  tasks: tasks.TasksResource
47
55
  image_to_video: image_to_video.ImageToVideoResource
56
+ video_to_video: video_to_video.VideoToVideoResource
48
57
  text_to_image: text_to_image.TextToImageResource
49
58
  video_upscale: video_upscale.VideoUpscaleResource
50
59
  character_performance: character_performance.CharacterPerformanceResource
@@ -114,6 +123,7 @@ class RunwayML(SyncAPIClient):
114
123
 
115
124
  self.tasks = tasks.TasksResource(self)
116
125
  self.image_to_video = image_to_video.ImageToVideoResource(self)
126
+ self.video_to_video = video_to_video.VideoToVideoResource(self)
117
127
  self.text_to_image = text_to_image.TextToImageResource(self)
118
128
  self.video_upscale = video_upscale.VideoUpscaleResource(self)
119
129
  self.character_performance = character_performance.CharacterPerformanceResource(self)
@@ -232,6 +242,7 @@ class RunwayML(SyncAPIClient):
232
242
  class AsyncRunwayML(AsyncAPIClient):
233
243
  tasks: tasks.AsyncTasksResource
234
244
  image_to_video: image_to_video.AsyncImageToVideoResource
245
+ video_to_video: video_to_video.AsyncVideoToVideoResource
235
246
  text_to_image: text_to_image.AsyncTextToImageResource
236
247
  video_upscale: video_upscale.AsyncVideoUpscaleResource
237
248
  character_performance: character_performance.AsyncCharacterPerformanceResource
@@ -301,6 +312,7 @@ class AsyncRunwayML(AsyncAPIClient):
301
312
 
302
313
  self.tasks = tasks.AsyncTasksResource(self)
303
314
  self.image_to_video = image_to_video.AsyncImageToVideoResource(self)
315
+ self.video_to_video = video_to_video.AsyncVideoToVideoResource(self)
304
316
  self.text_to_image = text_to_image.AsyncTextToImageResource(self)
305
317
  self.video_upscale = video_upscale.AsyncVideoUpscaleResource(self)
306
318
  self.character_performance = character_performance.AsyncCharacterPerformanceResource(self)
@@ -420,6 +432,7 @@ class RunwayMLWithRawResponse:
420
432
  def __init__(self, client: RunwayML) -> None:
421
433
  self.tasks = tasks.TasksResourceWithRawResponse(client.tasks)
422
434
  self.image_to_video = image_to_video.ImageToVideoResourceWithRawResponse(client.image_to_video)
435
+ self.video_to_video = video_to_video.VideoToVideoResourceWithRawResponse(client.video_to_video)
423
436
  self.text_to_image = text_to_image.TextToImageResourceWithRawResponse(client.text_to_image)
424
437
  self.video_upscale = video_upscale.VideoUpscaleResourceWithRawResponse(client.video_upscale)
425
438
  self.character_performance = character_performance.CharacterPerformanceResourceWithRawResponse(
@@ -432,6 +445,7 @@ class AsyncRunwayMLWithRawResponse:
432
445
  def __init__(self, client: AsyncRunwayML) -> None:
433
446
  self.tasks = tasks.AsyncTasksResourceWithRawResponse(client.tasks)
434
447
  self.image_to_video = image_to_video.AsyncImageToVideoResourceWithRawResponse(client.image_to_video)
448
+ self.video_to_video = video_to_video.AsyncVideoToVideoResourceWithRawResponse(client.video_to_video)
435
449
  self.text_to_image = text_to_image.AsyncTextToImageResourceWithRawResponse(client.text_to_image)
436
450
  self.video_upscale = video_upscale.AsyncVideoUpscaleResourceWithRawResponse(client.video_upscale)
437
451
  self.character_performance = character_performance.AsyncCharacterPerformanceResourceWithRawResponse(
@@ -444,6 +458,7 @@ class RunwayMLWithStreamedResponse:
444
458
  def __init__(self, client: RunwayML) -> None:
445
459
  self.tasks = tasks.TasksResourceWithStreamingResponse(client.tasks)
446
460
  self.image_to_video = image_to_video.ImageToVideoResourceWithStreamingResponse(client.image_to_video)
461
+ self.video_to_video = video_to_video.VideoToVideoResourceWithStreamingResponse(client.video_to_video)
447
462
  self.text_to_image = text_to_image.TextToImageResourceWithStreamingResponse(client.text_to_image)
448
463
  self.video_upscale = video_upscale.VideoUpscaleResourceWithStreamingResponse(client.video_upscale)
449
464
  self.character_performance = character_performance.CharacterPerformanceResourceWithStreamingResponse(
@@ -456,6 +471,7 @@ class AsyncRunwayMLWithStreamedResponse:
456
471
  def __init__(self, client: AsyncRunwayML) -> None:
457
472
  self.tasks = tasks.AsyncTasksResourceWithStreamingResponse(client.tasks)
458
473
  self.image_to_video = image_to_video.AsyncImageToVideoResourceWithStreamingResponse(client.image_to_video)
474
+ self.video_to_video = video_to_video.AsyncVideoToVideoResourceWithStreamingResponse(client.video_to_video)
459
475
  self.text_to_image = text_to_image.AsyncTextToImageResourceWithStreamingResponse(client.text_to_image)
460
476
  self.video_upscale = video_upscale.AsyncVideoUpscaleResourceWithStreamingResponse(client.video_upscale)
461
477
  self.character_performance = character_performance.AsyncCharacterPerformanceResourceWithStreamingResponse(
runwayml/_version.py CHANGED
@@ -1,4 +1,4 @@
1
1
  # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
2
 
3
3
  __title__ = "runwayml"
4
- __version__ = "3.8.0" # x-release-please-version
4
+ __version__ = "3.10.0" # x-release-please-version
@@ -40,6 +40,14 @@ from .image_to_video import (
40
40
  ImageToVideoResourceWithStreamingResponse,
41
41
  AsyncImageToVideoResourceWithStreamingResponse,
42
42
  )
43
+ from .video_to_video import (
44
+ VideoToVideoResource,
45
+ AsyncVideoToVideoResource,
46
+ VideoToVideoResourceWithRawResponse,
47
+ AsyncVideoToVideoResourceWithRawResponse,
48
+ VideoToVideoResourceWithStreamingResponse,
49
+ AsyncVideoToVideoResourceWithStreamingResponse,
50
+ )
43
51
  from .character_performance import (
44
52
  CharacterPerformanceResource,
45
53
  AsyncCharacterPerformanceResource,
@@ -62,6 +70,12 @@ __all__ = [
62
70
  "AsyncImageToVideoResourceWithRawResponse",
63
71
  "ImageToVideoResourceWithStreamingResponse",
64
72
  "AsyncImageToVideoResourceWithStreamingResponse",
73
+ "VideoToVideoResource",
74
+ "AsyncVideoToVideoResource",
75
+ "VideoToVideoResourceWithRawResponse",
76
+ "AsyncVideoToVideoResourceWithRawResponse",
77
+ "VideoToVideoResourceWithStreamingResponse",
78
+ "AsyncVideoToVideoResourceWithStreamingResponse",
65
79
  "TextToImageResource",
66
80
  "AsyncTextToImageResource",
67
81
  "TextToImageResourceWithRawResponse",
@@ -53,7 +53,7 @@ class TextToImageResource(SyncAPIResource):
53
53
  def create(
54
54
  self,
55
55
  *,
56
- model: Literal["gen4_image"],
56
+ model: Literal["gen4_image", "gen4_image_turbo"],
57
57
  prompt_text: str,
58
58
  ratio: Literal[
59
59
  "1920:1080",
@@ -96,8 +96,10 @@ class TextToImageResource(SyncAPIResource):
96
96
 
97
97
  content_moderation: Settings that affect the behavior of the content moderation system.
98
98
 
99
- reference_images: An array of images to be used as references for the generated image output. Up
100
- to three reference images can be provided.
99
+ reference_images: An array of up to three images to be used as references for the generated image
100
+ output.
101
+
102
+ For `gen4_image_turbo`, _at least one_ reference image is required.
101
103
 
102
104
  seed: If unspecified, a random number is chosen. Varying the seed integer is a way to
103
105
  get different results for the same other request parameters. Using the same seed
@@ -154,7 +156,7 @@ class AsyncTextToImageResource(AsyncAPIResource):
154
156
  async def create(
155
157
  self,
156
158
  *,
157
- model: Literal["gen4_image"],
159
+ model: Literal["gen4_image", "gen4_image_turbo"],
158
160
  prompt_text: str,
159
161
  ratio: Literal[
160
162
  "1920:1080",
@@ -197,8 +199,10 @@ class AsyncTextToImageResource(AsyncAPIResource):
197
199
 
198
200
  content_moderation: Settings that affect the behavior of the content moderation system.
199
201
 
200
- reference_images: An array of images to be used as references for the generated image output. Up
201
- to three reference images can be provided.
202
+ reference_images: An array of up to three images to be used as references for the generated image
203
+ output.
204
+
205
+ For `gen4_image_turbo`, _at least one_ reference image is required.
202
206
 
203
207
  seed: If unspecified, a random number is chosen. Varying the seed integer is a way to
204
208
  get different results for the same other request parameters. Using the same seed
@@ -0,0 +1,244 @@
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from __future__ import annotations
4
+
5
+ from typing import Iterable
6
+ from typing_extensions import Literal
7
+
8
+ import httpx
9
+
10
+ from ..types import video_to_video_create_params
11
+ from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven
12
+ from .._utils import maybe_transform, async_maybe_transform
13
+ from .._compat import cached_property
14
+ from .._resource import SyncAPIResource, AsyncAPIResource
15
+ from .._response import (
16
+ to_raw_response_wrapper,
17
+ to_streamed_response_wrapper,
18
+ async_to_raw_response_wrapper,
19
+ async_to_streamed_response_wrapper,
20
+ )
21
+ from ..lib.polling import (
22
+ NewTaskCreatedResponse,
23
+ AsyncNewTaskCreatedResponse,
24
+ create_waitable_resource,
25
+ create_async_waitable_resource,
26
+ )
27
+ from .._base_client import make_request_options
28
+ from ..types.video_to_video_create_response import VideoToVideoCreateResponse
29
+
30
+ __all__ = ["VideoToVideoResource", "AsyncVideoToVideoResource"]
31
+
32
+
33
+ class VideoToVideoResource(SyncAPIResource):
34
+ @cached_property
35
+ def with_raw_response(self) -> VideoToVideoResourceWithRawResponse:
36
+ """
37
+ This property can be used as a prefix for any HTTP method call to return
38
+ the raw response object instead of the parsed content.
39
+
40
+ For more information, see https://www.github.com/runwayml/sdk-python#accessing-raw-response-data-eg-headers
41
+ """
42
+ return VideoToVideoResourceWithRawResponse(self)
43
+
44
+ @cached_property
45
+ def with_streaming_response(self) -> VideoToVideoResourceWithStreamingResponse:
46
+ """
47
+ An alternative to `.with_raw_response` that doesn't eagerly read the response body.
48
+
49
+ For more information, see https://www.github.com/runwayml/sdk-python#with_streaming_response
50
+ """
51
+ return VideoToVideoResourceWithStreamingResponse(self)
52
+
53
+ def create(
54
+ self,
55
+ *,
56
+ model: Literal["gen4_aleph"],
57
+ prompt_text: str,
58
+ ratio: Literal["1280:720", "720:1280", "1104:832", "960:960", "832:1104", "1584:672", "848:480", "640:480"],
59
+ video_uri: str,
60
+ content_moderation: video_to_video_create_params.ContentModeration | NotGiven = NOT_GIVEN,
61
+ references: Iterable[video_to_video_create_params.Reference] | NotGiven = NOT_GIVEN,
62
+ seed: int | NotGiven = NOT_GIVEN,
63
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
64
+ # The extra values given here take precedence over values defined on the client or passed to this method.
65
+ extra_headers: Headers | None = None,
66
+ extra_query: Query | None = None,
67
+ extra_body: Body | None = None,
68
+ timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
69
+ ) -> NewTaskCreatedResponse:
70
+ """
71
+ This endpoint will start a new task to generate a video from a video.
72
+
73
+ Args:
74
+ model: The model variant to use.
75
+
76
+ prompt_text: A non-empty string up to 1000 characters (measured in UTF-16 code units). This
77
+ should describe in detail what should appear in the output.
78
+
79
+ ratio: The resolution of the output video.
80
+
81
+ video_uri: A HTTPS URL pointing to a video or a data URI containing a video. See
82
+ [our docs](/assets/inputs#videos) on video inputs for more information.
83
+
84
+ content_moderation: Settings that affect the behavior of the content moderation system.
85
+
86
+ references: An array of references. Currently up to one reference is supported. See
87
+ [our docs](/assets/inputs#images) on image inputs for more information.
88
+
89
+ seed: If unspecified, a random number is chosen. Varying the seed integer is a way to
90
+ get different results for the same other request parameters. Using the same seed
91
+ integer for an identical request will produce similar results.
92
+
93
+ extra_headers: Send extra headers
94
+
95
+ extra_query: Add additional query parameters to the request
96
+
97
+ extra_body: Add additional JSON properties to the request
98
+
99
+ timeout: Override the client-level default timeout for this request, in seconds
100
+ """
101
+ return self._post(
102
+ "/v1/video_to_video",
103
+ body=maybe_transform(
104
+ {
105
+ "model": model,
106
+ "prompt_text": prompt_text,
107
+ "ratio": ratio,
108
+ "video_uri": video_uri,
109
+ "content_moderation": content_moderation,
110
+ "references": references,
111
+ "seed": seed,
112
+ },
113
+ video_to_video_create_params.VideoToVideoCreateParams,
114
+ ),
115
+ options=make_request_options(
116
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
117
+ ),
118
+ cast_to=create_waitable_resource(VideoToVideoCreateResponse, self._client),
119
+ )
120
+
121
+
122
+ class AsyncVideoToVideoResource(AsyncAPIResource):
123
+ @cached_property
124
+ def with_raw_response(self) -> AsyncVideoToVideoResourceWithRawResponse:
125
+ """
126
+ This property can be used as a prefix for any HTTP method call to return
127
+ the raw response object instead of the parsed content.
128
+
129
+ For more information, see https://www.github.com/runwayml/sdk-python#accessing-raw-response-data-eg-headers
130
+ """
131
+ return AsyncVideoToVideoResourceWithRawResponse(self)
132
+
133
+ @cached_property
134
+ def with_streaming_response(self) -> AsyncVideoToVideoResourceWithStreamingResponse:
135
+ """
136
+ An alternative to `.with_raw_response` that doesn't eagerly read the response body.
137
+
138
+ For more information, see https://www.github.com/runwayml/sdk-python#with_streaming_response
139
+ """
140
+ return AsyncVideoToVideoResourceWithStreamingResponse(self)
141
+
142
+ async def create(
143
+ self,
144
+ *,
145
+ model: Literal["gen4_aleph"],
146
+ prompt_text: str,
147
+ ratio: Literal["1280:720", "720:1280", "1104:832", "960:960", "832:1104", "1584:672", "848:480", "640:480"],
148
+ video_uri: str,
149
+ content_moderation: video_to_video_create_params.ContentModeration | NotGiven = NOT_GIVEN,
150
+ references: Iterable[video_to_video_create_params.Reference] | NotGiven = NOT_GIVEN,
151
+ seed: int | NotGiven = NOT_GIVEN,
152
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
153
+ # The extra values given here take precedence over values defined on the client or passed to this method.
154
+ extra_headers: Headers | None = None,
155
+ extra_query: Query | None = None,
156
+ extra_body: Body | None = None,
157
+ timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
158
+ ) -> AsyncNewTaskCreatedResponse:
159
+ """
160
+ This endpoint will start a new task to generate a video from a video.
161
+
162
+ Args:
163
+ model: The model variant to use.
164
+
165
+ prompt_text: A non-empty string up to 1000 characters (measured in UTF-16 code units). This
166
+ should describe in detail what should appear in the output.
167
+
168
+ ratio: The resolution of the output video.
169
+
170
+ video_uri: A HTTPS URL pointing to a video or a data URI containing a video. See
171
+ [our docs](/assets/inputs#videos) on video inputs for more information.
172
+
173
+ content_moderation: Settings that affect the behavior of the content moderation system.
174
+
175
+ references: An array of references. Currently up to one reference is supported. See
176
+ [our docs](/assets/inputs#images) on image inputs for more information.
177
+
178
+ seed: If unspecified, a random number is chosen. Varying the seed integer is a way to
179
+ get different results for the same other request parameters. Using the same seed
180
+ integer for an identical request will produce similar results.
181
+
182
+ extra_headers: Send extra headers
183
+
184
+ extra_query: Add additional query parameters to the request
185
+
186
+ extra_body: Add additional JSON properties to the request
187
+
188
+ timeout: Override the client-level default timeout for this request, in seconds
189
+ """
190
+ return await self._post(
191
+ "/v1/video_to_video",
192
+ body=await async_maybe_transform(
193
+ {
194
+ "model": model,
195
+ "prompt_text": prompt_text,
196
+ "ratio": ratio,
197
+ "video_uri": video_uri,
198
+ "content_moderation": content_moderation,
199
+ "references": references,
200
+ "seed": seed,
201
+ },
202
+ video_to_video_create_params.VideoToVideoCreateParams,
203
+ ),
204
+ options=make_request_options(
205
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
206
+ ),
207
+ cast_to=create_async_waitable_resource(VideoToVideoCreateResponse, self._client),
208
+ )
209
+
210
+
211
+ class VideoToVideoResourceWithRawResponse:
212
+ def __init__(self, video_to_video: VideoToVideoResource) -> None:
213
+ self._video_to_video = video_to_video
214
+
215
+ self.create = to_raw_response_wrapper(
216
+ video_to_video.create,
217
+ )
218
+
219
+
220
+ class AsyncVideoToVideoResourceWithRawResponse:
221
+ def __init__(self, video_to_video: AsyncVideoToVideoResource) -> None:
222
+ self._video_to_video = video_to_video
223
+
224
+ self.create = async_to_raw_response_wrapper(
225
+ video_to_video.create,
226
+ )
227
+
228
+
229
+ class VideoToVideoResourceWithStreamingResponse:
230
+ def __init__(self, video_to_video: VideoToVideoResource) -> None:
231
+ self._video_to_video = video_to_video
232
+
233
+ self.create = to_streamed_response_wrapper(
234
+ video_to_video.create,
235
+ )
236
+
237
+
238
+ class AsyncVideoToVideoResourceWithStreamingResponse:
239
+ def __init__(self, video_to_video: AsyncVideoToVideoResource) -> None:
240
+ self._video_to_video = video_to_video
241
+
242
+ self.create = async_to_streamed_response_wrapper(
243
+ video_to_video.create,
244
+ )
@@ -6,10 +6,12 @@ from .task_retrieve_response import TaskRetrieveResponse as TaskRetrieveResponse
6
6
  from .text_to_image_create_params import TextToImageCreateParams as TextToImageCreateParams
7
7
  from .video_upscale_create_params import VideoUpscaleCreateParams as VideoUpscaleCreateParams
8
8
  from .image_to_video_create_params import ImageToVideoCreateParams as ImageToVideoCreateParams
9
+ from .video_to_video_create_params import VideoToVideoCreateParams as VideoToVideoCreateParams
9
10
  from .text_to_image_create_response import TextToImageCreateResponse as TextToImageCreateResponse
10
11
  from .video_upscale_create_response import VideoUpscaleCreateResponse as VideoUpscaleCreateResponse
11
12
  from .image_to_video_create_response import ImageToVideoCreateResponse as ImageToVideoCreateResponse
12
13
  from .organization_retrieve_response import OrganizationRetrieveResponse as OrganizationRetrieveResponse
14
+ from .video_to_video_create_response import VideoToVideoCreateResponse as VideoToVideoCreateResponse
13
15
  from .organization_retrieve_usage_params import OrganizationRetrieveUsageParams as OrganizationRetrieveUsageParams
14
16
  from .character_performance_create_params import CharacterPerformanceCreateParams as CharacterPerformanceCreateParams
15
17
  from .organization_retrieve_usage_response import OrganizationRetrieveUsageResponse as OrganizationRetrieveUsageResponse
@@ -12,14 +12,18 @@ __all__ = [
12
12
  "TierModels",
13
13
  "TierModelsActTwo",
14
14
  "TierModelsGen3aTurbo",
15
+ "TierModelsGen4Aleph",
15
16
  "TierModelsGen4Image",
17
+ "TierModelsGen4ImageTurbo",
16
18
  "TierModelsGen4Turbo",
17
19
  "TierModelsUpscaleV1",
18
20
  "Usage",
19
21
  "UsageModels",
20
22
  "UsageModelsActTwo",
21
23
  "UsageModelsGen3aTurbo",
24
+ "UsageModelsGen4Aleph",
22
25
  "UsageModelsGen4Image",
26
+ "UsageModelsGen4ImageTurbo",
23
27
  "UsageModelsGen4Turbo",
24
28
  "UsageModelsUpscaleV1",
25
29
  ]
@@ -41,6 +45,14 @@ class TierModelsGen3aTurbo(BaseModel):
41
45
  """The maximum number of generations that can be created each day for this model."""
42
46
 
43
47
 
48
+ class TierModelsGen4Aleph(BaseModel):
49
+ max_concurrent_generations: int = FieldInfo(alias="maxConcurrentGenerations")
50
+ """The maximum number of generations that can be run concurrently for this model."""
51
+
52
+ max_daily_generations: int = FieldInfo(alias="maxDailyGenerations")
53
+ """The maximum number of generations that can be created each day for this model."""
54
+
55
+
44
56
  class TierModelsGen4Image(BaseModel):
45
57
  max_concurrent_generations: int = FieldInfo(alias="maxConcurrentGenerations")
46
58
  """The maximum number of generations that can be run concurrently for this model."""
@@ -49,6 +61,14 @@ class TierModelsGen4Image(BaseModel):
49
61
  """The maximum number of generations that can be created each day for this model."""
50
62
 
51
63
 
64
+ class TierModelsGen4ImageTurbo(BaseModel):
65
+ max_concurrent_generations: int = FieldInfo(alias="maxConcurrentGenerations")
66
+ """The maximum number of generations that can be run concurrently for this model."""
67
+
68
+ max_daily_generations: int = FieldInfo(alias="maxDailyGenerations")
69
+ """The maximum number of generations that can be created each day for this model."""
70
+
71
+
52
72
  class TierModelsGen4Turbo(BaseModel):
53
73
  max_concurrent_generations: int = FieldInfo(alias="maxConcurrentGenerations")
54
74
  """The maximum number of generations that can be run concurrently for this model."""
@@ -72,9 +92,15 @@ class TierModels(BaseModel):
72
92
  gen3a_turbo: Optional[TierModelsGen3aTurbo] = None
73
93
  """Limits associated with the gen3a_turbo model."""
74
94
 
95
+ gen4_aleph: Optional[TierModelsGen4Aleph] = None
96
+ """Limits associated with the gen4_aleph model."""
97
+
75
98
  gen4_image: Optional[TierModelsGen4Image] = None
76
99
  """Limits associated with the gen4_image model."""
77
100
 
101
+ gen4_image_turbo: Optional[TierModelsGen4ImageTurbo] = None
102
+ """Limits associated with the gen4_image_turbo model."""
103
+
78
104
  gen4_turbo: Optional[TierModelsGen4Turbo] = None
79
105
  """Limits associated with the gen4_turbo model."""
80
106
 
@@ -100,11 +126,21 @@ class UsageModelsGen3aTurbo(BaseModel):
100
126
  """The number of generations that have been run for this model in the past day."""
101
127
 
102
128
 
129
+ class UsageModelsGen4Aleph(BaseModel):
130
+ daily_generations: int = FieldInfo(alias="dailyGenerations")
131
+ """The number of generations that have been run for this model in the past day."""
132
+
133
+
103
134
  class UsageModelsGen4Image(BaseModel):
104
135
  daily_generations: int = FieldInfo(alias="dailyGenerations")
105
136
  """The number of generations that have been run for this model in the past day."""
106
137
 
107
138
 
139
+ class UsageModelsGen4ImageTurbo(BaseModel):
140
+ daily_generations: int = FieldInfo(alias="dailyGenerations")
141
+ """The number of generations that have been run for this model in the past day."""
142
+
143
+
108
144
  class UsageModelsGen4Turbo(BaseModel):
109
145
  daily_generations: int = FieldInfo(alias="dailyGenerations")
110
146
  """The number of generations that have been run for this model in the past day."""
@@ -122,9 +158,15 @@ class UsageModels(BaseModel):
122
158
  gen3a_turbo: Optional[UsageModelsGen3aTurbo] = None
123
159
  """Usage data for the gen3a_turbo model."""
124
160
 
161
+ gen4_aleph: Optional[UsageModelsGen4Aleph] = None
162
+ """Usage data for the gen4_aleph model."""
163
+
125
164
  gen4_image: Optional[UsageModelsGen4Image] = None
126
165
  """Usage data for the gen4_image model."""
127
166
 
167
+ gen4_image_turbo: Optional[UsageModelsGen4ImageTurbo] = None
168
+ """Usage data for the gen4_image_turbo model."""
169
+
128
170
  gen4_turbo: Optional[UsageModelsGen4Turbo] = None
129
171
  """Usage data for the gen4_turbo model."""
130
172
 
@@ -15,7 +15,7 @@ class ResultUsedCredit(BaseModel):
15
15
  amount: int
16
16
  """The number of credits used for the model."""
17
17
 
18
- model: Literal["upscale_v1", "act_two", "gen4_image", "gen3a_turbo", "gen4_turbo"]
18
+ model: Literal["upscale_v1", "act_two", "gen4_image", "gen3a_turbo", "gen4_turbo", "gen4_aleph", "gen4_image_turbo"]
19
19
  """The model whose usage resulted in the credit usage."""
20
20
 
21
21
 
@@ -31,7 +31,9 @@ class Result(BaseModel):
31
31
 
32
32
 
33
33
  class OrganizationRetrieveUsageResponse(BaseModel):
34
- models: List[Literal["upscale_v1", "act_two", "gen4_image", "gen3a_turbo", "gen4_turbo"]]
34
+ models: List[
35
+ Literal["upscale_v1", "act_two", "gen4_image", "gen3a_turbo", "gen4_turbo", "gen4_aleph", "gen4_image_turbo"]
36
+ ]
35
37
  """The list of models with usage during the queried time range."""
36
38
 
37
39
  results: List[Result]
@@ -11,7 +11,7 @@ __all__ = ["TextToImageCreateParams", "ContentModeration", "ReferenceImage"]
11
11
 
12
12
 
13
13
  class TextToImageCreateParams(TypedDict, total=False):
14
- model: Required[Literal["gen4_image"]]
14
+ model: Required[Literal["gen4_image", "gen4_image_turbo"]]
15
15
  """The model variant to use."""
16
16
 
17
17
  prompt_text: Required[Annotated[str, PropertyInfo(alias="promptText")]]
@@ -46,9 +46,11 @@ class TextToImageCreateParams(TypedDict, total=False):
46
46
  """Settings that affect the behavior of the content moderation system."""
47
47
 
48
48
  reference_images: Annotated[Iterable[ReferenceImage], PropertyInfo(alias="referenceImages")]
49
- """An array of images to be used as references for the generated image output.
49
+ """
50
+ An array of up to three images to be used as references for the generated image
51
+ output.
50
52
 
51
- Up to three reference images can be provided.
53
+ For `gen4_image_turbo`, _at least one_ reference image is required.
52
54
  """
53
55
 
54
56
  seed: int
@@ -0,0 +1,68 @@
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from __future__ import annotations
4
+
5
+ from typing import Iterable
6
+ from typing_extensions import Literal, Required, Annotated, TypedDict
7
+
8
+ from .._utils import PropertyInfo
9
+
10
+ __all__ = ["VideoToVideoCreateParams", "ContentModeration", "Reference"]
11
+
12
+
13
+ class VideoToVideoCreateParams(TypedDict, total=False):
14
+ model: Required[Literal["gen4_aleph"]]
15
+ """The model variant to use."""
16
+
17
+ prompt_text: Required[Annotated[str, PropertyInfo(alias="promptText")]]
18
+ """A non-empty string up to 1000 characters (measured in UTF-16 code units).
19
+
20
+ This should describe in detail what should appear in the output.
21
+ """
22
+
23
+ ratio: Required[
24
+ Literal["1280:720", "720:1280", "1104:832", "960:960", "832:1104", "1584:672", "848:480", "640:480"]
25
+ ]
26
+ """The resolution of the output video."""
27
+
28
+ video_uri: Required[Annotated[str, PropertyInfo(alias="videoUri")]]
29
+ """A HTTPS URL pointing to a video or a data URI containing a video.
30
+
31
+ See [our docs](/assets/inputs#videos) on video inputs for more information.
32
+ """
33
+
34
+ content_moderation: Annotated[ContentModeration, PropertyInfo(alias="contentModeration")]
35
+ """Settings that affect the behavior of the content moderation system."""
36
+
37
+ references: Iterable[Reference]
38
+ """An array of references.
39
+
40
+ Currently up to one reference is supported. See
41
+ [our docs](/assets/inputs#images) on image inputs for more information.
42
+ """
43
+
44
+ seed: int
45
+ """If unspecified, a random number is chosen.
46
+
47
+ Varying the seed integer is a way to get different results for the same other
48
+ request parameters. Using the same seed integer for an identical request will
49
+ produce similar results.
50
+ """
51
+
52
+
53
+ class ContentModeration(TypedDict, total=False):
54
+ public_figure_threshold: Annotated[Literal["auto", "low"], PropertyInfo(alias="publicFigureThreshold")]
55
+ """
56
+ When set to `low`, the content moderation system will be less strict about
57
+ preventing generations that include recognizable public figures.
58
+ """
59
+
60
+
61
+ class Reference(TypedDict, total=False):
62
+ type: Required[Literal["image"]]
63
+
64
+ uri: Required[str]
65
+ """A HTTPS URL pointing to an image or a data URI containing an image.
66
+
67
+ See [our docs](/assets/inputs#images) on image inputs for more information.
68
+ """
@@ -0,0 +1,10 @@
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from .._models import BaseModel
4
+
5
+ __all__ = ["VideoToVideoCreateResponse"]
6
+
7
+
8
+ class VideoToVideoCreateResponse(BaseModel):
9
+ id: str
10
+ """The ID of the newly created task."""
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: runwayml
3
- Version: 3.8.0
3
+ Version: 3.10.0
4
4
  Summary: The official Python library for the runwayml API
5
5
  Project-URL: Homepage, https://github.com/runwayml/sdk-python
6
6
  Project-URL: Repository, https://github.com/runwayml/sdk-python
@@ -1,6 +1,6 @@
1
1
  runwayml/__init__.py,sha256=tr-n2Y4sH_wBv8t2F_jk7ku_rLT2erU3j61ONZJWUVs,2743
2
2
  runwayml/_base_client.py,sha256=gazXywnP1B_K-uIiHyatCzG0ZbkBPgEs2ogVl45Y6EU,67037
3
- runwayml/_client.py,sha256=Zn4rh2kWC5LhgqSx5QgsQfPyeqRscyZ-RWtI1PDMZYg,19532
3
+ runwayml/_client.py,sha256=f5_2h1VDkVIpczg2a_FqhZL82qOS_qvEYmpe4dhuK-Q,20285
4
4
  runwayml/_compat.py,sha256=VWemUKbj6DDkQ-O4baSpHVLJafotzeXmCQGJugfVTIw,6580
5
5
  runwayml/_constants.py,sha256=S14PFzyN9-I31wiV7SmIlL5Ga0MLHxdvegInGdXH7tM,462
6
6
  runwayml/_exceptions.py,sha256=p2Q8kywHCVQzArLQL4Ht-HetTBhAvevU6yDvEq7PpIE,3224
@@ -11,7 +11,7 @@ runwayml/_resource.py,sha256=BF-j3xY5eRTKmuTxg8eDhLtLP4MLB1phDh_B6BKipKA,1112
11
11
  runwayml/_response.py,sha256=WxjSEXX-j01ZhlSxYyMCVSEKxo20pgy40RA7iyski8M,28800
12
12
  runwayml/_streaming.py,sha256=NSVuAgknVQWU1cgZEjQn01IdZKKynb5rOeYp5Lo-OEQ,10108
13
13
  runwayml/_types.py,sha256=YL6SdhLq5SHlT644GjzDwOJ_Slyr8QDRCoacOp4trhI,6199
14
- runwayml/_version.py,sha256=ZmXurOZWw33srzuBkN_1Vm74acZopKdlQ5UgKrzsuns,160
14
+ runwayml/_version.py,sha256=tk9OhNdDJbN18lTFKpTnA5ldmKrwrS-eujAOE8SeuJE,161
15
15
  runwayml/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
16
16
  runwayml/_utils/__init__.py,sha256=PNZ_QJuzZEgyYXqkO1HVhGkj5IU9bglVUcw7H-Knjzw,2062
17
17
  runwayml/_utils/_logs.py,sha256=ZfS5W59hdqEBVV86lNrk28PhvUxtHOzs9JqiLhSu0pI,780
@@ -25,27 +25,30 @@ runwayml/_utils/_typing.py,sha256=D0DbbNu8GnYQTSICnTSHDGsYXj8TcAKyhejb0XcnjtY,46
25
25
  runwayml/_utils/_utils.py,sha256=ts4CiiuNpFiGB6YMdkQRh2SZvYvsl7mAF-JWHCcLDf4,12312
26
26
  runwayml/lib/.keep,sha256=wuNrz-5SXo3jJaJOJgz4vFHM41YH_g20F5cRQo0vLes,224
27
27
  runwayml/lib/polling.py,sha256=4fF0gP-h4iR0jvxWifsqtR1iH9vRoKEgGykkaZNT9Ek,4743
28
- runwayml/resources/__init__.py,sha256=I2-16xL8gL5dSItMXI1YX9F1rWIqongQ4c-fE_B2EhQ,3276
28
+ runwayml/resources/__init__.py,sha256=eDf9c_7y8W_cwo5E5_L3_tOxWmt0k6GfjupfkLE_Zdo,3806
29
29
  runwayml/resources/character_performance.py,sha256=8KBZQuht5CKDeqk89UCIWw7EMqt6iB-It0iIFejOJ-M,10905
30
30
  runwayml/resources/image_to_video.py,sha256=O6YbnD7QEE_YK5UeRDq8RzWwiuS5nTQSAkCl9RvZe74,10880
31
31
  runwayml/resources/organization.py,sha256=iPwFFz8nltHXea0uFJd-700657xgJdnEJiWAwXVNDqY,10581
32
32
  runwayml/resources/tasks.py,sha256=mjdBqB1G4u9v3xB_9yn6aIdvsDmawxSNcTENkMpKSms,10146
33
- runwayml/resources/text_to_image.py,sha256=OJ9oD1Fc5NBGqci6Ox_-M9lFvsYG31fSwSzsr0pwPak,10200
33
+ runwayml/resources/text_to_image.py,sha256=p3Gq7GyoSuziFuoGmQ1VILVMeBGqwAJn6-er3C3YsMI,10338
34
+ runwayml/resources/video_to_video.py,sha256=Obl7vrfwgcRC9bWUylVWVYc3r99aJt0I7NHhuhPvPus,10121
34
35
  runwayml/resources/video_upscale.py,sha256=8Mz_g5Swxmgp14jfcfexurUYpPi73q_iU-9D1jOddt0,7691
35
- runwayml/types/__init__.py,sha256=I0XH9jsRrNXfBNLsFRzfjfyh8I8frTslCfeN7-xyxJg,1376
36
+ runwayml/types/__init__.py,sha256=ve_d68f-Qs6UW9hflrdvex1pyi7yvo3afYNsqq__6sY,1572
36
37
  runwayml/types/character_performance_create_params.py,sha256=TYmR-YCK8_4fomSoqtC8dT1iIR7z2gMQvtu9u-FatQ4,3266
37
38
  runwayml/types/character_performance_create_response.py,sha256=QIJUfqWraZTJmX67zu3VQevBoFxDPmUh74C-_EelHy8,280
38
39
  runwayml/types/image_to_video_create_params.py,sha256=6M_xJRx0ws8nQ0a3k3jEICDm-WXJUG9j-j1UIxAAg-s,2869
39
40
  runwayml/types/image_to_video_create_response.py,sha256=WvZHbZxxJz8KerRNogzb1RYBrxa1x0iCPDi9-LCpHyE,345
40
- runwayml/types/organization_retrieve_response.py,sha256=h0FbMJ2mpq9sHy3QkN4JfcSqW11ef39XD82z_zLRwB8,5187
41
+ runwayml/types/organization_retrieve_response.py,sha256=lq6QVzkOl77unf-TFOAoUxclSAW-7QC-Bu3NlvwXjz4,6905
41
42
  runwayml/types/organization_retrieve_usage_params.py,sha256=vF5GUqaDqY1x6W2RzJ923jspuZyoNgCUaoLI3mW25zg,999
42
- runwayml/types/organization_retrieve_usage_response.py,sha256=QNtePn2bXt1WCL--BueXC5rb_uZ0aMDeTp0LFUr_7kg,1104
43
+ runwayml/types/organization_retrieve_usage_response.py,sha256=yHqBM1EknT2Sb_04eCBRnLoHgZeo8wph4t6Dy6aZYMs,1186
43
44
  runwayml/types/task_retrieve_response.py,sha256=v8y2bLxsW6srzScW-B3Akv72q_PI_NQmduGrGRQMHds,2139
44
- runwayml/types/text_to_image_create_params.py,sha256=I8Dr4UG6VnciQ87zN6qp03FKwlQNnrwyn6cacHLqw20,2794
45
+ runwayml/types/text_to_image_create_params.py,sha256=Uk3-aCu8LhlmsYpFXBfw5wUAzNFDbjBVnLWoRTu2esQ,2857
45
46
  runwayml/types/text_to_image_create_response.py,sha256=koMzUg82dYFQPp77wln3UR1z8WO2sHCNMWGgoQ9Id8M,262
47
+ runwayml/types/video_to_video_create_params.py,sha256=0qfsIDlcTpqn9eiY-7X0J1NuDQMYzsLu-e_fmKhNljU,2357
48
+ runwayml/types/video_to_video_create_response.py,sha256=CXgAUmnPIZOxCW_macIBPOC8MZYQpq9a5_jteSkeBt8,264
46
49
  runwayml/types/video_upscale_create_params.py,sha256=Ta3BNQy9aeTUBU5Ui-CMJtF32HeNRqbNpqjAAOKXyks,743
47
50
  runwayml/types/video_upscale_create_response.py,sha256=zf-79HbJa68dUHltBiZjVtnW_U6HUI-htmkTm5URBSU,264
48
- runwayml-3.8.0.dist-info/METADATA,sha256=v5PFmYLPefDwHNs_HNHkToTg1FZyIgzOPmSpXmgpP2c,15157
49
- runwayml-3.8.0.dist-info/WHEEL,sha256=C2FUgwZgiLbznR-k0b_5k3Ai_1aASOXDss3lzCUsUug,87
50
- runwayml-3.8.0.dist-info/licenses/LICENSE,sha256=baeFj6izBWIm6A5_7N3-WAsy_VYpDF05Dd4zS1zsfZI,11338
51
- runwayml-3.8.0.dist-info/RECORD,,
51
+ runwayml-3.10.0.dist-info/METADATA,sha256=QZGLvNGJEsi9Vn22F2U0BSvx9xgmEsYoEVa7aWrCa88,15158
52
+ runwayml-3.10.0.dist-info/WHEEL,sha256=C2FUgwZgiLbznR-k0b_5k3Ai_1aASOXDss3lzCUsUug,87
53
+ runwayml-3.10.0.dist-info/licenses/LICENSE,sha256=baeFj6izBWIm6A5_7N3-WAsy_VYpDF05Dd4zS1zsfZI,11338
54
+ runwayml-3.10.0.dist-info/RECORD,,