runwayml 3.3.0__py3-none-any.whl → 3.5.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/__init__.py +3 -0
- runwayml/_base_client.py +16 -2
- runwayml/_client.py +9 -1
- runwayml/_version.py +1 -1
- runwayml/lib/polling.py +127 -0
- runwayml/resources/__init__.py +14 -0
- runwayml/resources/image_to_video.py +20 -6
- runwayml/resources/tasks.py +17 -4
- runwayml/resources/text_to_image.py +10 -4
- runwayml/resources/video_upscale.py +201 -0
- runwayml/types/__init__.py +2 -0
- runwayml/types/image_to_video_create_params.py +13 -2
- runwayml/types/organization_retrieve_response.py +21 -0
- runwayml/types/video_upscale_create_params.py +22 -0
- runwayml/types/video_upscale_create_response.py +10 -0
- {runwayml-3.3.0.dist-info → runwayml-3.5.0.dist-info}/METADATA +1 -1
- {runwayml-3.3.0.dist-info → runwayml-3.5.0.dist-info}/RECORD +19 -15
- {runwayml-3.3.0.dist-info → runwayml-3.5.0.dist-info}/WHEEL +0 -0
- {runwayml-3.3.0.dist-info → runwayml-3.5.0.dist-info}/licenses/LICENSE +0 -0
runwayml/__init__.py
CHANGED
@@ -36,6 +36,7 @@ from ._exceptions import (
|
|
36
36
|
UnprocessableEntityError,
|
37
37
|
APIResponseValidationError,
|
38
38
|
)
|
39
|
+
from .lib.polling import TaskFailedError, TaskTimeoutError
|
39
40
|
from ._base_client import DefaultHttpxClient, DefaultAsyncHttpxClient
|
40
41
|
from ._utils._logs import setup_logging as _setup_logging
|
41
42
|
|
@@ -78,6 +79,8 @@ __all__ = [
|
|
78
79
|
"DEFAULT_CONNECTION_LIMITS",
|
79
80
|
"DefaultHttpxClient",
|
80
81
|
"DefaultAsyncHttpxClient",
|
82
|
+
"TaskFailedError",
|
83
|
+
"TaskTimeoutError",
|
81
84
|
]
|
82
85
|
|
83
86
|
if not _t.TYPE_CHECKING:
|
runwayml/_base_client.py
CHANGED
@@ -1071,7 +1071,14 @@ class SyncAPIClient(BaseClient[httpx.Client, Stream[Any]]):
|
|
1071
1071
|
) -> ResponseT:
|
1072
1072
|
origin = get_origin(cast_to) or cast_to
|
1073
1073
|
|
1074
|
-
if
|
1074
|
+
if (
|
1075
|
+
inspect.isclass(origin)
|
1076
|
+
and issubclass(origin, BaseAPIResponse)
|
1077
|
+
# we only want to actually return the custom BaseAPIResponse class if we're
|
1078
|
+
# returning the raw response, or if we're not streaming SSE, as if we're streaming
|
1079
|
+
# SSE then `cast_to` doesn't actively reflect the type we need to parse into
|
1080
|
+
and (not stream or bool(response.request.headers.get(RAW_RESPONSE_HEADER)))
|
1081
|
+
):
|
1075
1082
|
if not issubclass(origin, APIResponse):
|
1076
1083
|
raise TypeError(f"API Response types must subclass {APIResponse}; Received {origin}")
|
1077
1084
|
|
@@ -1574,7 +1581,14 @@ class AsyncAPIClient(BaseClient[httpx.AsyncClient, AsyncStream[Any]]):
|
|
1574
1581
|
) -> ResponseT:
|
1575
1582
|
origin = get_origin(cast_to) or cast_to
|
1576
1583
|
|
1577
|
-
if
|
1584
|
+
if (
|
1585
|
+
inspect.isclass(origin)
|
1586
|
+
and issubclass(origin, BaseAPIResponse)
|
1587
|
+
# we only want to actually return the custom BaseAPIResponse class if we're
|
1588
|
+
# returning the raw response, or if we're not streaming SSE, as if we're streaming
|
1589
|
+
# SSE then `cast_to` doesn't actively reflect the type we need to parse into
|
1590
|
+
and (not stream or bool(response.request.headers.get(RAW_RESPONSE_HEADER)))
|
1591
|
+
):
|
1578
1592
|
if not issubclass(origin, AsyncAPIResponse):
|
1579
1593
|
raise TypeError(f"API Response types must subclass {AsyncAPIResponse}; Received {origin}")
|
1580
1594
|
|
runwayml/_client.py
CHANGED
@@ -21,7 +21,7 @@ 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, image_to_video
|
24
|
+
from .resources import tasks, organization, text_to_image, video_upscale, image_to_video
|
25
25
|
from ._streaming import Stream as Stream, AsyncStream as AsyncStream
|
26
26
|
from ._exceptions import RunwayMLError, APIStatusError
|
27
27
|
from ._base_client import (
|
@@ -46,6 +46,7 @@ class RunwayML(SyncAPIClient):
|
|
46
46
|
tasks: tasks.TasksResource
|
47
47
|
image_to_video: image_to_video.ImageToVideoResource
|
48
48
|
text_to_image: text_to_image.TextToImageResource
|
49
|
+
video_upscale: video_upscale.VideoUpscaleResource
|
49
50
|
organization: organization.OrganizationResource
|
50
51
|
with_raw_response: RunwayMLWithRawResponse
|
51
52
|
with_streaming_response: RunwayMLWithStreamedResponse
|
@@ -113,6 +114,7 @@ class RunwayML(SyncAPIClient):
|
|
113
114
|
self.tasks = tasks.TasksResource(self)
|
114
115
|
self.image_to_video = image_to_video.ImageToVideoResource(self)
|
115
116
|
self.text_to_image = text_to_image.TextToImageResource(self)
|
117
|
+
self.video_upscale = video_upscale.VideoUpscaleResource(self)
|
116
118
|
self.organization = organization.OrganizationResource(self)
|
117
119
|
self.with_raw_response = RunwayMLWithRawResponse(self)
|
118
120
|
self.with_streaming_response = RunwayMLWithStreamedResponse(self)
|
@@ -229,6 +231,7 @@ class AsyncRunwayML(AsyncAPIClient):
|
|
229
231
|
tasks: tasks.AsyncTasksResource
|
230
232
|
image_to_video: image_to_video.AsyncImageToVideoResource
|
231
233
|
text_to_image: text_to_image.AsyncTextToImageResource
|
234
|
+
video_upscale: video_upscale.AsyncVideoUpscaleResource
|
232
235
|
organization: organization.AsyncOrganizationResource
|
233
236
|
with_raw_response: AsyncRunwayMLWithRawResponse
|
234
237
|
with_streaming_response: AsyncRunwayMLWithStreamedResponse
|
@@ -296,6 +299,7 @@ class AsyncRunwayML(AsyncAPIClient):
|
|
296
299
|
self.tasks = tasks.AsyncTasksResource(self)
|
297
300
|
self.image_to_video = image_to_video.AsyncImageToVideoResource(self)
|
298
301
|
self.text_to_image = text_to_image.AsyncTextToImageResource(self)
|
302
|
+
self.video_upscale = video_upscale.AsyncVideoUpscaleResource(self)
|
299
303
|
self.organization = organization.AsyncOrganizationResource(self)
|
300
304
|
self.with_raw_response = AsyncRunwayMLWithRawResponse(self)
|
301
305
|
self.with_streaming_response = AsyncRunwayMLWithStreamedResponse(self)
|
@@ -413,6 +417,7 @@ class RunwayMLWithRawResponse:
|
|
413
417
|
self.tasks = tasks.TasksResourceWithRawResponse(client.tasks)
|
414
418
|
self.image_to_video = image_to_video.ImageToVideoResourceWithRawResponse(client.image_to_video)
|
415
419
|
self.text_to_image = text_to_image.TextToImageResourceWithRawResponse(client.text_to_image)
|
420
|
+
self.video_upscale = video_upscale.VideoUpscaleResourceWithRawResponse(client.video_upscale)
|
416
421
|
self.organization = organization.OrganizationResourceWithRawResponse(client.organization)
|
417
422
|
|
418
423
|
|
@@ -421,6 +426,7 @@ class AsyncRunwayMLWithRawResponse:
|
|
421
426
|
self.tasks = tasks.AsyncTasksResourceWithRawResponse(client.tasks)
|
422
427
|
self.image_to_video = image_to_video.AsyncImageToVideoResourceWithRawResponse(client.image_to_video)
|
423
428
|
self.text_to_image = text_to_image.AsyncTextToImageResourceWithRawResponse(client.text_to_image)
|
429
|
+
self.video_upscale = video_upscale.AsyncVideoUpscaleResourceWithRawResponse(client.video_upscale)
|
424
430
|
self.organization = organization.AsyncOrganizationResourceWithRawResponse(client.organization)
|
425
431
|
|
426
432
|
|
@@ -429,6 +435,7 @@ class RunwayMLWithStreamedResponse:
|
|
429
435
|
self.tasks = tasks.TasksResourceWithStreamingResponse(client.tasks)
|
430
436
|
self.image_to_video = image_to_video.ImageToVideoResourceWithStreamingResponse(client.image_to_video)
|
431
437
|
self.text_to_image = text_to_image.TextToImageResourceWithStreamingResponse(client.text_to_image)
|
438
|
+
self.video_upscale = video_upscale.VideoUpscaleResourceWithStreamingResponse(client.video_upscale)
|
432
439
|
self.organization = organization.OrganizationResourceWithStreamingResponse(client.organization)
|
433
440
|
|
434
441
|
|
@@ -437,6 +444,7 @@ class AsyncRunwayMLWithStreamedResponse:
|
|
437
444
|
self.tasks = tasks.AsyncTasksResourceWithStreamingResponse(client.tasks)
|
438
445
|
self.image_to_video = image_to_video.AsyncImageToVideoResourceWithStreamingResponse(client.image_to_video)
|
439
446
|
self.text_to_image = text_to_image.AsyncTextToImageResourceWithStreamingResponse(client.text_to_image)
|
447
|
+
self.video_upscale = video_upscale.AsyncVideoUpscaleResourceWithStreamingResponse(client.video_upscale)
|
440
448
|
self.organization = organization.AsyncOrganizationResourceWithStreamingResponse(client.organization)
|
441
449
|
|
442
450
|
|
runwayml/_version.py
CHANGED
runwayml/lib/polling.py
ADDED
@@ -0,0 +1,127 @@
|
|
1
|
+
import time
|
2
|
+
import random
|
3
|
+
from typing import TYPE_CHECKING, Type, Union, TypeVar, cast
|
4
|
+
from typing_extensions import ParamSpec
|
5
|
+
|
6
|
+
import anyio
|
7
|
+
|
8
|
+
from .._models import BaseModel
|
9
|
+
from ..types.task_retrieve_response import TaskRetrieveResponse
|
10
|
+
|
11
|
+
if TYPE_CHECKING:
|
12
|
+
from .._client import RunwayML, AsyncRunwayML
|
13
|
+
|
14
|
+
P = ParamSpec("P")
|
15
|
+
T = TypeVar("T")
|
16
|
+
|
17
|
+
POLL_TIME = 6
|
18
|
+
POLL_JITTER = 3
|
19
|
+
|
20
|
+
|
21
|
+
class AwaitableTaskResponseMixin:
|
22
|
+
def wait_for_task_output(self, timeout: Union[float, None] = 60 * 10) -> TaskRetrieveResponse: # type: ignore[empty-body]
|
23
|
+
"""
|
24
|
+
When called, this will block until the task is complete.
|
25
|
+
|
26
|
+
If the task fails or is cancelled, a `TaskFailedError` will be raised.
|
27
|
+
|
28
|
+
Args:
|
29
|
+
timeout: The maximum amount of time to wait for the task to complete in seconds. If not
|
30
|
+
specified, the default timeout is 10 minutes. Will raise a `TaskTimeoutError` if the
|
31
|
+
task does not complete within the timeout.
|
32
|
+
|
33
|
+
Returns:
|
34
|
+
The task details, equivalent to calling `client.tasks.retrieve(task_id)`.
|
35
|
+
"""
|
36
|
+
...
|
37
|
+
|
38
|
+
|
39
|
+
class NewTaskCreatedResponse(AwaitableTaskResponseMixin, BaseModel):
|
40
|
+
id: str
|
41
|
+
|
42
|
+
|
43
|
+
class AwaitableTaskRetrieveResponse(AwaitableTaskResponseMixin, TaskRetrieveResponse):
|
44
|
+
pass
|
45
|
+
|
46
|
+
|
47
|
+
class AsyncAwaitableTaskResponseMixin:
|
48
|
+
async def wait_for_task_output(self, timeout: Union[float, None] = 60 * 10) -> TaskRetrieveResponse: # type: ignore[empty-body]
|
49
|
+
"""
|
50
|
+
When called, this will wait until the task is complete.
|
51
|
+
|
52
|
+
If the task fails or is cancelled, a `TaskFailedError` will be raised.
|
53
|
+
|
54
|
+
Args:
|
55
|
+
timeout: The maximum amount of time to wait for the task to complete in seconds. If not
|
56
|
+
specified, the default timeout is 10 minutes. Will raise a `TaskTimeoutError` if the
|
57
|
+
task does not complete within the timeout. Setting this to `None` will wait
|
58
|
+
indefinitely (disabling the timeout).
|
59
|
+
|
60
|
+
Returns:
|
61
|
+
The task details, equivalent to awaiting `client.tasks.retrieve(task_id)`.
|
62
|
+
"""
|
63
|
+
...
|
64
|
+
|
65
|
+
|
66
|
+
class AsyncNewTaskCreatedResponse(AsyncAwaitableTaskResponseMixin, BaseModel):
|
67
|
+
id: str
|
68
|
+
|
69
|
+
|
70
|
+
class AsyncAwaitableTaskRetrieveResponse(AsyncAwaitableTaskResponseMixin, TaskRetrieveResponse):
|
71
|
+
pass
|
72
|
+
|
73
|
+
|
74
|
+
def create_waitable_resource(base_class: Type[T], client: "RunwayML") -> Type[NewTaskCreatedResponse]:
|
75
|
+
class WithClient(base_class): # type: ignore[valid-type,misc]
|
76
|
+
id: str
|
77
|
+
|
78
|
+
def wait_for_task_output(self, timeout: Union[float, None] = 60 * 10) -> TaskRetrieveResponse:
|
79
|
+
start_time = time.time()
|
80
|
+
while True:
|
81
|
+
time.sleep(POLL_TIME + random.random() * POLL_JITTER - POLL_JITTER / 2)
|
82
|
+
task_details = client.tasks.retrieve(self.id)
|
83
|
+
if task_details.status == "SUCCEEDED":
|
84
|
+
return task_details
|
85
|
+
if task_details.status == "FAILED":
|
86
|
+
raise TaskFailedError(task_details)
|
87
|
+
if timeout is not None and time.time() - start_time > timeout:
|
88
|
+
raise TaskTimeoutError(task_details)
|
89
|
+
|
90
|
+
WithClient.__name__ = base_class.__name__
|
91
|
+
WithClient.__qualname__ = base_class.__qualname__
|
92
|
+
|
93
|
+
return cast(Type[NewTaskCreatedResponse], WithClient)
|
94
|
+
|
95
|
+
|
96
|
+
def create_async_waitable_resource(base_class: Type[T], client: "AsyncRunwayML") -> Type[AsyncNewTaskCreatedResponse]:
|
97
|
+
class WithClient(base_class): # type: ignore[valid-type,misc]
|
98
|
+
id: str
|
99
|
+
|
100
|
+
async def wait_for_task_output(self, timeout: Union[float, None] = 60 * 10) -> TaskRetrieveResponse:
|
101
|
+
start_time = anyio.current_time()
|
102
|
+
while True:
|
103
|
+
await anyio.sleep(POLL_TIME + random.random() * POLL_JITTER - POLL_JITTER / 2)
|
104
|
+
task_details = await client.tasks.retrieve(self.id)
|
105
|
+
if task_details.status == "SUCCEEDED":
|
106
|
+
return task_details
|
107
|
+
if task_details.status == "FAILED" or task_details.status == "CANCELLED":
|
108
|
+
raise TaskFailedError(task_details)
|
109
|
+
if timeout is not None and anyio.current_time() - start_time > timeout:
|
110
|
+
raise TaskTimeoutError(task_details)
|
111
|
+
|
112
|
+
WithClient.__name__ = base_class.__name__
|
113
|
+
WithClient.__qualname__ = base_class.__qualname__
|
114
|
+
|
115
|
+
return cast(Type[AsyncNewTaskCreatedResponse], WithClient)
|
116
|
+
|
117
|
+
|
118
|
+
class TaskFailedError(Exception):
|
119
|
+
def __init__(self, task_details: TaskRetrieveResponse):
|
120
|
+
self.task_details = task_details
|
121
|
+
super().__init__(f"Task failed")
|
122
|
+
|
123
|
+
|
124
|
+
class TaskTimeoutError(Exception):
|
125
|
+
def __init__(self, task_details: TaskRetrieveResponse):
|
126
|
+
self.task_details = task_details
|
127
|
+
super().__init__(f"Task timed out")
|
runwayml/resources/__init__.py
CHANGED
@@ -24,6 +24,14 @@ from .text_to_image import (
|
|
24
24
|
TextToImageResourceWithStreamingResponse,
|
25
25
|
AsyncTextToImageResourceWithStreamingResponse,
|
26
26
|
)
|
27
|
+
from .video_upscale import (
|
28
|
+
VideoUpscaleResource,
|
29
|
+
AsyncVideoUpscaleResource,
|
30
|
+
VideoUpscaleResourceWithRawResponse,
|
31
|
+
AsyncVideoUpscaleResourceWithRawResponse,
|
32
|
+
VideoUpscaleResourceWithStreamingResponse,
|
33
|
+
AsyncVideoUpscaleResourceWithStreamingResponse,
|
34
|
+
)
|
27
35
|
from .image_to_video import (
|
28
36
|
ImageToVideoResource,
|
29
37
|
AsyncImageToVideoResource,
|
@@ -52,6 +60,12 @@ __all__ = [
|
|
52
60
|
"AsyncTextToImageResourceWithRawResponse",
|
53
61
|
"TextToImageResourceWithStreamingResponse",
|
54
62
|
"AsyncTextToImageResourceWithStreamingResponse",
|
63
|
+
"VideoUpscaleResource",
|
64
|
+
"AsyncVideoUpscaleResource",
|
65
|
+
"VideoUpscaleResourceWithRawResponse",
|
66
|
+
"AsyncVideoUpscaleResourceWithRawResponse",
|
67
|
+
"VideoUpscaleResourceWithStreamingResponse",
|
68
|
+
"AsyncVideoUpscaleResourceWithStreamingResponse",
|
55
69
|
"OrganizationResource",
|
56
70
|
"AsyncOrganizationResource",
|
57
71
|
"OrganizationResourceWithRawResponse",
|
@@ -18,6 +18,12 @@ from .._response import (
|
|
18
18
|
async_to_raw_response_wrapper,
|
19
19
|
async_to_streamed_response_wrapper,
|
20
20
|
)
|
21
|
+
from ..lib.polling import (
|
22
|
+
NewTaskCreatedResponse,
|
23
|
+
AsyncNewTaskCreatedResponse,
|
24
|
+
create_waitable_resource,
|
25
|
+
create_async_waitable_resource,
|
26
|
+
)
|
21
27
|
from .._base_client import make_request_options
|
22
28
|
from ..types.image_to_video_create_response import ImageToVideoCreateResponse
|
23
29
|
|
@@ -47,9 +53,10 @@ class ImageToVideoResource(SyncAPIResource):
|
|
47
53
|
def create(
|
48
54
|
self,
|
49
55
|
*,
|
50
|
-
model: Literal["
|
56
|
+
model: Literal["gen3a_turbo", "gen4_turbo"],
|
51
57
|
prompt_image: Union[str, Iterable[image_to_video_create_params.PromptImagePromptImage]],
|
52
58
|
ratio: Literal["1280:720", "720:1280", "1104:832", "832:1104", "960:960", "1584:672", "1280:768", "768:1280"],
|
59
|
+
content_moderation: image_to_video_create_params.ContentModeration | NotGiven = NOT_GIVEN,
|
53
60
|
duration: Literal[5, 10] | NotGiven = NOT_GIVEN,
|
54
61
|
prompt_text: str | NotGiven = NOT_GIVEN,
|
55
62
|
seed: int | NotGiven = NOT_GIVEN,
|
@@ -59,7 +66,7 @@ class ImageToVideoResource(SyncAPIResource):
|
|
59
66
|
extra_query: Query | None = None,
|
60
67
|
extra_body: Body | None = None,
|
61
68
|
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
62
|
-
) ->
|
69
|
+
) -> NewTaskCreatedResponse:
|
63
70
|
"""
|
64
71
|
This endpoint will start a new task to generate a video from an image prompt.
|
65
72
|
|
@@ -86,6 +93,8 @@ class ImageToVideoResource(SyncAPIResource):
|
|
86
93
|
- `1280:768`
|
87
94
|
- `768:1280`
|
88
95
|
|
96
|
+
content_moderation: Settings that affect the behavior of the content moderation system.
|
97
|
+
|
89
98
|
duration: The number of seconds of duration for the output video.
|
90
99
|
|
91
100
|
prompt_text: A non-empty string up to 1000 characters (measured in UTF-16 code units). This
|
@@ -110,6 +119,7 @@ class ImageToVideoResource(SyncAPIResource):
|
|
110
119
|
"model": model,
|
111
120
|
"prompt_image": prompt_image,
|
112
121
|
"ratio": ratio,
|
122
|
+
"content_moderation": content_moderation,
|
113
123
|
"duration": duration,
|
114
124
|
"prompt_text": prompt_text,
|
115
125
|
"seed": seed,
|
@@ -119,7 +129,7 @@ class ImageToVideoResource(SyncAPIResource):
|
|
119
129
|
options=make_request_options(
|
120
130
|
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
121
131
|
),
|
122
|
-
cast_to=ImageToVideoCreateResponse,
|
132
|
+
cast_to=create_waitable_resource(ImageToVideoCreateResponse, self._client),
|
123
133
|
)
|
124
134
|
|
125
135
|
|
@@ -146,9 +156,10 @@ class AsyncImageToVideoResource(AsyncAPIResource):
|
|
146
156
|
async def create(
|
147
157
|
self,
|
148
158
|
*,
|
149
|
-
model: Literal["
|
159
|
+
model: Literal["gen3a_turbo", "gen4_turbo"],
|
150
160
|
prompt_image: Union[str, Iterable[image_to_video_create_params.PromptImagePromptImage]],
|
151
161
|
ratio: Literal["1280:720", "720:1280", "1104:832", "832:1104", "960:960", "1584:672", "1280:768", "768:1280"],
|
162
|
+
content_moderation: image_to_video_create_params.ContentModeration | NotGiven = NOT_GIVEN,
|
152
163
|
duration: Literal[5, 10] | NotGiven = NOT_GIVEN,
|
153
164
|
prompt_text: str | NotGiven = NOT_GIVEN,
|
154
165
|
seed: int | NotGiven = NOT_GIVEN,
|
@@ -158,7 +169,7 @@ class AsyncImageToVideoResource(AsyncAPIResource):
|
|
158
169
|
extra_query: Query | None = None,
|
159
170
|
extra_body: Body | None = None,
|
160
171
|
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
161
|
-
) ->
|
172
|
+
) -> AsyncNewTaskCreatedResponse:
|
162
173
|
"""
|
163
174
|
This endpoint will start a new task to generate a video from an image prompt.
|
164
175
|
|
@@ -185,6 +196,8 @@ class AsyncImageToVideoResource(AsyncAPIResource):
|
|
185
196
|
- `1280:768`
|
186
197
|
- `768:1280`
|
187
198
|
|
199
|
+
content_moderation: Settings that affect the behavior of the content moderation system.
|
200
|
+
|
188
201
|
duration: The number of seconds of duration for the output video.
|
189
202
|
|
190
203
|
prompt_text: A non-empty string up to 1000 characters (measured in UTF-16 code units). This
|
@@ -209,6 +222,7 @@ class AsyncImageToVideoResource(AsyncAPIResource):
|
|
209
222
|
"model": model,
|
210
223
|
"prompt_image": prompt_image,
|
211
224
|
"ratio": ratio,
|
225
|
+
"content_moderation": content_moderation,
|
212
226
|
"duration": duration,
|
213
227
|
"prompt_text": prompt_text,
|
214
228
|
"seed": seed,
|
@@ -218,7 +232,7 @@ class AsyncImageToVideoResource(AsyncAPIResource):
|
|
218
232
|
options=make_request_options(
|
219
233
|
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
220
234
|
),
|
221
|
-
cast_to=ImageToVideoCreateResponse,
|
235
|
+
cast_to=create_async_waitable_resource(ImageToVideoCreateResponse, self._client),
|
222
236
|
)
|
223
237
|
|
224
238
|
|
runwayml/resources/tasks.py
CHANGED
@@ -2,6 +2,8 @@
|
|
2
2
|
|
3
3
|
from __future__ import annotations
|
4
4
|
|
5
|
+
from typing import cast
|
6
|
+
|
5
7
|
import httpx
|
6
8
|
|
7
9
|
from .._types import NOT_GIVEN, Body, Query, Headers, NoneType, NotGiven
|
@@ -13,6 +15,12 @@ from .._response import (
|
|
13
15
|
async_to_raw_response_wrapper,
|
14
16
|
async_to_streamed_response_wrapper,
|
15
17
|
)
|
18
|
+
from ..lib.polling import (
|
19
|
+
AwaitableTaskRetrieveResponse,
|
20
|
+
AsyncAwaitableTaskRetrieveResponse,
|
21
|
+
create_waitable_resource,
|
22
|
+
create_async_waitable_resource,
|
23
|
+
)
|
16
24
|
from .._base_client import make_request_options
|
17
25
|
from ..types.task_retrieve_response import TaskRetrieveResponse
|
18
26
|
|
@@ -49,7 +57,7 @@ class TasksResource(SyncAPIResource):
|
|
49
57
|
extra_query: Query | None = None,
|
50
58
|
extra_body: Body | None = None,
|
51
59
|
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
52
|
-
) ->
|
60
|
+
) -> AwaitableTaskRetrieveResponse:
|
53
61
|
"""Return details about a task.
|
54
62
|
|
55
63
|
Consumers of this API should not expect updates
|
@@ -71,7 +79,9 @@ class TasksResource(SyncAPIResource):
|
|
71
79
|
options=make_request_options(
|
72
80
|
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
73
81
|
),
|
74
|
-
cast_to=
|
82
|
+
cast_to=cast(
|
83
|
+
type[AwaitableTaskRetrieveResponse], create_waitable_resource(TaskRetrieveResponse, self._client)
|
84
|
+
),
|
75
85
|
)
|
76
86
|
|
77
87
|
def delete(
|
@@ -144,7 +154,7 @@ class AsyncTasksResource(AsyncAPIResource):
|
|
144
154
|
extra_query: Query | None = None,
|
145
155
|
extra_body: Body | None = None,
|
146
156
|
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
147
|
-
) ->
|
157
|
+
) -> AsyncAwaitableTaskRetrieveResponse:
|
148
158
|
"""Return details about a task.
|
149
159
|
|
150
160
|
Consumers of this API should not expect updates
|
@@ -166,7 +176,10 @@ class AsyncTasksResource(AsyncAPIResource):
|
|
166
176
|
options=make_request_options(
|
167
177
|
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
168
178
|
),
|
169
|
-
cast_to=
|
179
|
+
cast_to=cast(
|
180
|
+
type[AsyncAwaitableTaskRetrieveResponse],
|
181
|
+
create_async_waitable_resource(TaskRetrieveResponse, self._client),
|
182
|
+
),
|
170
183
|
)
|
171
184
|
|
172
185
|
async def delete(
|
@@ -18,6 +18,12 @@ from .._response import (
|
|
18
18
|
async_to_raw_response_wrapper,
|
19
19
|
async_to_streamed_response_wrapper,
|
20
20
|
)
|
21
|
+
from ..lib.polling import (
|
22
|
+
NewTaskCreatedResponse,
|
23
|
+
AsyncNewTaskCreatedResponse,
|
24
|
+
create_waitable_resource,
|
25
|
+
create_async_waitable_resource,
|
26
|
+
)
|
21
27
|
from .._base_client import make_request_options
|
22
28
|
from ..types.text_to_image_create_response import TextToImageCreateResponse
|
23
29
|
|
@@ -76,7 +82,7 @@ class TextToImageResource(SyncAPIResource):
|
|
76
82
|
extra_query: Query | None = None,
|
77
83
|
extra_body: Body | None = None,
|
78
84
|
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
79
|
-
) ->
|
85
|
+
) -> NewTaskCreatedResponse:
|
80
86
|
"""
|
81
87
|
This endpoint will start a new task to generate images from text.
|
82
88
|
|
@@ -121,7 +127,7 @@ class TextToImageResource(SyncAPIResource):
|
|
121
127
|
options=make_request_options(
|
122
128
|
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
123
129
|
),
|
124
|
-
cast_to=TextToImageCreateResponse,
|
130
|
+
cast_to=create_waitable_resource(TextToImageCreateResponse, self._client),
|
125
131
|
)
|
126
132
|
|
127
133
|
|
@@ -177,7 +183,7 @@ class AsyncTextToImageResource(AsyncAPIResource):
|
|
177
183
|
extra_query: Query | None = None,
|
178
184
|
extra_body: Body | None = None,
|
179
185
|
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
180
|
-
) ->
|
186
|
+
) -> AsyncNewTaskCreatedResponse:
|
181
187
|
"""
|
182
188
|
This endpoint will start a new task to generate images from text.
|
183
189
|
|
@@ -222,7 +228,7 @@ class AsyncTextToImageResource(AsyncAPIResource):
|
|
222
228
|
options=make_request_options(
|
223
229
|
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
224
230
|
),
|
225
|
-
cast_to=TextToImageCreateResponse,
|
231
|
+
cast_to=create_async_waitable_resource(TextToImageCreateResponse, self._client),
|
226
232
|
)
|
227
233
|
|
228
234
|
|
@@ -0,0 +1,201 @@
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
2
|
+
|
3
|
+
from __future__ import annotations
|
4
|
+
|
5
|
+
from typing_extensions import Literal
|
6
|
+
|
7
|
+
import httpx
|
8
|
+
|
9
|
+
from ..types import video_upscale_create_params
|
10
|
+
from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven
|
11
|
+
from .._utils import maybe_transform, async_maybe_transform
|
12
|
+
from .._compat import cached_property
|
13
|
+
from .._resource import SyncAPIResource, AsyncAPIResource
|
14
|
+
from .._response import (
|
15
|
+
to_raw_response_wrapper,
|
16
|
+
to_streamed_response_wrapper,
|
17
|
+
async_to_raw_response_wrapper,
|
18
|
+
async_to_streamed_response_wrapper,
|
19
|
+
)
|
20
|
+
from ..lib.polling import (
|
21
|
+
NewTaskCreatedResponse,
|
22
|
+
AsyncNewTaskCreatedResponse,
|
23
|
+
create_waitable_resource,
|
24
|
+
create_async_waitable_resource,
|
25
|
+
)
|
26
|
+
from .._base_client import make_request_options
|
27
|
+
from ..types.video_upscale_create_response import VideoUpscaleCreateResponse
|
28
|
+
|
29
|
+
__all__ = ["VideoUpscaleResource", "AsyncVideoUpscaleResource"]
|
30
|
+
|
31
|
+
|
32
|
+
class VideoUpscaleResource(SyncAPIResource):
|
33
|
+
@cached_property
|
34
|
+
def with_raw_response(self) -> VideoUpscaleResourceWithRawResponse:
|
35
|
+
"""
|
36
|
+
This property can be used as a prefix for any HTTP method call to return
|
37
|
+
the raw response object instead of the parsed content.
|
38
|
+
|
39
|
+
For more information, see https://www.github.com/runwayml/sdk-python#accessing-raw-response-data-eg-headers
|
40
|
+
"""
|
41
|
+
return VideoUpscaleResourceWithRawResponse(self)
|
42
|
+
|
43
|
+
@cached_property
|
44
|
+
def with_streaming_response(self) -> VideoUpscaleResourceWithStreamingResponse:
|
45
|
+
"""
|
46
|
+
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
|
47
|
+
|
48
|
+
For more information, see https://www.github.com/runwayml/sdk-python#with_streaming_response
|
49
|
+
"""
|
50
|
+
return VideoUpscaleResourceWithStreamingResponse(self)
|
51
|
+
|
52
|
+
def create(
|
53
|
+
self,
|
54
|
+
*,
|
55
|
+
model: Literal["upscale_v1"],
|
56
|
+
video_uri: str,
|
57
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
58
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
59
|
+
extra_headers: Headers | None = None,
|
60
|
+
extra_query: Query | None = None,
|
61
|
+
extra_body: Body | None = None,
|
62
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
63
|
+
) -> NewTaskCreatedResponse:
|
64
|
+
"""This endpoint will start a new task to upscale a video.
|
65
|
+
|
66
|
+
Videos will be upscaled
|
67
|
+
by a factor of 4X, capped at a maximum of 4096px along each side.
|
68
|
+
|
69
|
+
Args:
|
70
|
+
model: The model variant to use.
|
71
|
+
|
72
|
+
video_uri: A HTTPS URL pointing to a video or a data URI containing a video. The video must
|
73
|
+
be less than 4096px on each side. The video duration may not exceed 40 seconds.
|
74
|
+
See [our docs](/assets/inputs#videos) on video inputs for more information.
|
75
|
+
|
76
|
+
extra_headers: Send extra headers
|
77
|
+
|
78
|
+
extra_query: Add additional query parameters to the request
|
79
|
+
|
80
|
+
extra_body: Add additional JSON properties to the request
|
81
|
+
|
82
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
83
|
+
"""
|
84
|
+
return self._post(
|
85
|
+
"/v1/video_upscale",
|
86
|
+
body=maybe_transform(
|
87
|
+
{
|
88
|
+
"model": model,
|
89
|
+
"video_uri": video_uri,
|
90
|
+
},
|
91
|
+
video_upscale_create_params.VideoUpscaleCreateParams,
|
92
|
+
),
|
93
|
+
options=make_request_options(
|
94
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
95
|
+
),
|
96
|
+
cast_to=create_waitable_resource(VideoUpscaleCreateResponse, self._client),
|
97
|
+
)
|
98
|
+
|
99
|
+
|
100
|
+
class AsyncVideoUpscaleResource(AsyncAPIResource):
|
101
|
+
@cached_property
|
102
|
+
def with_raw_response(self) -> AsyncVideoUpscaleResourceWithRawResponse:
|
103
|
+
"""
|
104
|
+
This property can be used as a prefix for any HTTP method call to return
|
105
|
+
the raw response object instead of the parsed content.
|
106
|
+
|
107
|
+
For more information, see https://www.github.com/runwayml/sdk-python#accessing-raw-response-data-eg-headers
|
108
|
+
"""
|
109
|
+
return AsyncVideoUpscaleResourceWithRawResponse(self)
|
110
|
+
|
111
|
+
@cached_property
|
112
|
+
def with_streaming_response(self) -> AsyncVideoUpscaleResourceWithStreamingResponse:
|
113
|
+
"""
|
114
|
+
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
|
115
|
+
|
116
|
+
For more information, see https://www.github.com/runwayml/sdk-python#with_streaming_response
|
117
|
+
"""
|
118
|
+
return AsyncVideoUpscaleResourceWithStreamingResponse(self)
|
119
|
+
|
120
|
+
async def create(
|
121
|
+
self,
|
122
|
+
*,
|
123
|
+
model: Literal["upscale_v1"],
|
124
|
+
video_uri: str,
|
125
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
126
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
127
|
+
extra_headers: Headers | None = None,
|
128
|
+
extra_query: Query | None = None,
|
129
|
+
extra_body: Body | None = None,
|
130
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
131
|
+
) -> AsyncNewTaskCreatedResponse:
|
132
|
+
"""This endpoint will start a new task to upscale a video.
|
133
|
+
|
134
|
+
Videos will be upscaled
|
135
|
+
by a factor of 4X, capped at a maximum of 4096px along each side.
|
136
|
+
|
137
|
+
Args:
|
138
|
+
model: The model variant to use.
|
139
|
+
|
140
|
+
video_uri: A HTTPS URL pointing to a video or a data URI containing a video. The video must
|
141
|
+
be less than 4096px on each side. The video duration may not exceed 40 seconds.
|
142
|
+
See [our docs](/assets/inputs#videos) on video inputs for more information.
|
143
|
+
|
144
|
+
extra_headers: Send extra headers
|
145
|
+
|
146
|
+
extra_query: Add additional query parameters to the request
|
147
|
+
|
148
|
+
extra_body: Add additional JSON properties to the request
|
149
|
+
|
150
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
151
|
+
"""
|
152
|
+
return await self._post(
|
153
|
+
"/v1/video_upscale",
|
154
|
+
body=await async_maybe_transform(
|
155
|
+
{
|
156
|
+
"model": model,
|
157
|
+
"video_uri": video_uri,
|
158
|
+
},
|
159
|
+
video_upscale_create_params.VideoUpscaleCreateParams,
|
160
|
+
),
|
161
|
+
options=make_request_options(
|
162
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
163
|
+
),
|
164
|
+
cast_to=create_async_waitable_resource(VideoUpscaleCreateResponse, self._client),
|
165
|
+
)
|
166
|
+
|
167
|
+
|
168
|
+
class VideoUpscaleResourceWithRawResponse:
|
169
|
+
def __init__(self, video_upscale: VideoUpscaleResource) -> None:
|
170
|
+
self._video_upscale = video_upscale
|
171
|
+
|
172
|
+
self.create = to_raw_response_wrapper(
|
173
|
+
video_upscale.create,
|
174
|
+
)
|
175
|
+
|
176
|
+
|
177
|
+
class AsyncVideoUpscaleResourceWithRawResponse:
|
178
|
+
def __init__(self, video_upscale: AsyncVideoUpscaleResource) -> None:
|
179
|
+
self._video_upscale = video_upscale
|
180
|
+
|
181
|
+
self.create = async_to_raw_response_wrapper(
|
182
|
+
video_upscale.create,
|
183
|
+
)
|
184
|
+
|
185
|
+
|
186
|
+
class VideoUpscaleResourceWithStreamingResponse:
|
187
|
+
def __init__(self, video_upscale: VideoUpscaleResource) -> None:
|
188
|
+
self._video_upscale = video_upscale
|
189
|
+
|
190
|
+
self.create = to_streamed_response_wrapper(
|
191
|
+
video_upscale.create,
|
192
|
+
)
|
193
|
+
|
194
|
+
|
195
|
+
class AsyncVideoUpscaleResourceWithStreamingResponse:
|
196
|
+
def __init__(self, video_upscale: AsyncVideoUpscaleResource) -> None:
|
197
|
+
self._video_upscale = video_upscale
|
198
|
+
|
199
|
+
self.create = async_to_streamed_response_wrapper(
|
200
|
+
video_upscale.create,
|
201
|
+
)
|
runwayml/types/__init__.py
CHANGED
@@ -4,7 +4,9 @@ from __future__ import annotations
|
|
4
4
|
|
5
5
|
from .task_retrieve_response import TaskRetrieveResponse as TaskRetrieveResponse
|
6
6
|
from .text_to_image_create_params import TextToImageCreateParams as TextToImageCreateParams
|
7
|
+
from .video_upscale_create_params import VideoUpscaleCreateParams as VideoUpscaleCreateParams
|
7
8
|
from .image_to_video_create_params import ImageToVideoCreateParams as ImageToVideoCreateParams
|
8
9
|
from .text_to_image_create_response import TextToImageCreateResponse as TextToImageCreateResponse
|
10
|
+
from .video_upscale_create_response import VideoUpscaleCreateResponse as VideoUpscaleCreateResponse
|
9
11
|
from .image_to_video_create_response import ImageToVideoCreateResponse as ImageToVideoCreateResponse
|
10
12
|
from .organization_retrieve_response import OrganizationRetrieveResponse as OrganizationRetrieveResponse
|
@@ -7,11 +7,11 @@ from typing_extensions import Literal, Required, Annotated, TypedDict
|
|
7
7
|
|
8
8
|
from .._utils import PropertyInfo
|
9
9
|
|
10
|
-
__all__ = ["ImageToVideoCreateParams", "PromptImagePromptImage"]
|
10
|
+
__all__ = ["ImageToVideoCreateParams", "PromptImagePromptImage", "ContentModeration"]
|
11
11
|
|
12
12
|
|
13
13
|
class ImageToVideoCreateParams(TypedDict, total=False):
|
14
|
-
model: Required[Literal["
|
14
|
+
model: Required[Literal["gen3a_turbo", "gen4_turbo"]]
|
15
15
|
"""The model variant to use."""
|
16
16
|
|
17
17
|
prompt_image: Required[Annotated[Union[str, Iterable[PromptImagePromptImage]], PropertyInfo(alias="promptImage")]]
|
@@ -41,6 +41,9 @@ class ImageToVideoCreateParams(TypedDict, total=False):
|
|
41
41
|
- `768:1280`
|
42
42
|
"""
|
43
43
|
|
44
|
+
content_moderation: Annotated[ContentModeration, PropertyInfo(alias="contentModeration")]
|
45
|
+
"""Settings that affect the behavior of the content moderation system."""
|
46
|
+
|
44
47
|
duration: Literal[5, 10]
|
45
48
|
"""The number of seconds of duration for the output video."""
|
46
49
|
|
@@ -74,3 +77,11 @@ class PromptImagePromptImage(TypedDict, total=False):
|
|
74
77
|
|
75
78
|
See [our docs](/assets/inputs#images) on image inputs for more information.
|
76
79
|
"""
|
80
|
+
|
81
|
+
|
82
|
+
class ContentModeration(TypedDict, total=False):
|
83
|
+
public_figure_threshold: Annotated[Literal["auto", "low"], PropertyInfo(alias="publicFigureThreshold")]
|
84
|
+
"""
|
85
|
+
When set to `low`, the content moderation system will be less strict about
|
86
|
+
preventing generations that include recognizable public figures.
|
87
|
+
"""
|
@@ -13,11 +13,13 @@ __all__ = [
|
|
13
13
|
"TierModelsGen3aTurbo",
|
14
14
|
"TierModelsGen4Image",
|
15
15
|
"TierModelsGen4Turbo",
|
16
|
+
"TierModelsUpscaleV1",
|
16
17
|
"Usage",
|
17
18
|
"UsageModels",
|
18
19
|
"UsageModelsGen3aTurbo",
|
19
20
|
"UsageModelsGen4Image",
|
20
21
|
"UsageModelsGen4Turbo",
|
22
|
+
"UsageModelsUpscaleV1",
|
21
23
|
]
|
22
24
|
|
23
25
|
|
@@ -45,6 +47,14 @@ class TierModelsGen4Turbo(BaseModel):
|
|
45
47
|
"""The maximum number of generations that can be created each day for this model."""
|
46
48
|
|
47
49
|
|
50
|
+
class TierModelsUpscaleV1(BaseModel):
|
51
|
+
max_concurrent_generations: int = FieldInfo(alias="maxConcurrentGenerations")
|
52
|
+
"""The maximum number of generations that can be run concurrently for this model."""
|
53
|
+
|
54
|
+
max_daily_generations: int = FieldInfo(alias="maxDailyGenerations")
|
55
|
+
"""The maximum number of generations that can be created each day for this model."""
|
56
|
+
|
57
|
+
|
48
58
|
class TierModels(BaseModel):
|
49
59
|
gen3a_turbo: Optional[TierModelsGen3aTurbo] = None
|
50
60
|
"""Limits associated with the gen3a_turbo model."""
|
@@ -55,6 +65,9 @@ class TierModels(BaseModel):
|
|
55
65
|
gen4_turbo: Optional[TierModelsGen4Turbo] = None
|
56
66
|
"""Limits associated with the gen4_turbo model."""
|
57
67
|
|
68
|
+
upscale_v1: Optional[TierModelsUpscaleV1] = None
|
69
|
+
"""Limits associated with the upscale_v1 model."""
|
70
|
+
|
58
71
|
|
59
72
|
class Tier(BaseModel):
|
60
73
|
max_monthly_credit_spend: int = FieldInfo(alias="maxMonthlyCreditSpend")
|
@@ -79,6 +92,11 @@ class UsageModelsGen4Turbo(BaseModel):
|
|
79
92
|
"""The number of generations that have been run for this model in the past day."""
|
80
93
|
|
81
94
|
|
95
|
+
class UsageModelsUpscaleV1(BaseModel):
|
96
|
+
daily_generations: int = FieldInfo(alias="dailyGenerations")
|
97
|
+
"""The number of generations that have been run for this model in the past day."""
|
98
|
+
|
99
|
+
|
82
100
|
class UsageModels(BaseModel):
|
83
101
|
gen3a_turbo: Optional[UsageModelsGen3aTurbo] = None
|
84
102
|
"""Usage data for the gen3a_turbo model."""
|
@@ -89,6 +107,9 @@ class UsageModels(BaseModel):
|
|
89
107
|
gen4_turbo: Optional[UsageModelsGen4Turbo] = None
|
90
108
|
"""Usage data for the gen4_turbo model."""
|
91
109
|
|
110
|
+
upscale_v1: Optional[UsageModelsUpscaleV1] = None
|
111
|
+
"""Usage data for the upscale_v1 model."""
|
112
|
+
|
92
113
|
|
93
114
|
class Usage(BaseModel):
|
94
115
|
models: UsageModels
|
@@ -0,0 +1,22 @@
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
2
|
+
|
3
|
+
from __future__ import annotations
|
4
|
+
|
5
|
+
from typing_extensions import Literal, Required, Annotated, TypedDict
|
6
|
+
|
7
|
+
from .._utils import PropertyInfo
|
8
|
+
|
9
|
+
__all__ = ["VideoUpscaleCreateParams"]
|
10
|
+
|
11
|
+
|
12
|
+
class VideoUpscaleCreateParams(TypedDict, total=False):
|
13
|
+
model: Required[Literal["upscale_v1"]]
|
14
|
+
"""The model variant to use."""
|
15
|
+
|
16
|
+
video_uri: Required[Annotated[str, PropertyInfo(alias="videoUri")]]
|
17
|
+
"""A HTTPS URL pointing to a video or a data URI containing a video.
|
18
|
+
|
19
|
+
The video must be less than 4096px on each side. The video duration may not
|
20
|
+
exceed 40 seconds. See [our docs](/assets/inputs#videos) on video inputs for
|
21
|
+
more information.
|
22
|
+
"""
|
@@ -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__ = ["VideoUpscaleCreateResponse"]
|
6
|
+
|
7
|
+
|
8
|
+
class VideoUpscaleCreateResponse(BaseModel):
|
9
|
+
id: str
|
10
|
+
"""The ID of the newly created task."""
|
@@ -1,6 +1,6 @@
|
|
1
|
-
runwayml/__init__.py,sha256=
|
2
|
-
runwayml/_base_client.py,sha256=
|
3
|
-
runwayml/_client.py,sha256=
|
1
|
+
runwayml/__init__.py,sha256=y_OizTn3A4yOML16rBpWDwOU4caMAtiu6Iz02DHETgA,2693
|
2
|
+
runwayml/_base_client.py,sha256=Ix0P9AvG5RoBrE4TOAyaAmMipKftcg4eZTPbuI4Ugio,65886
|
3
|
+
runwayml/_client.py,sha256=tEooz-jH6JGowMQwrTZE7CKcyqpILEHKfSFf7OevoIU,18513
|
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=
|
14
|
+
runwayml/_version.py,sha256=TTPBS3eF1AlhzcYEdnHx7EWU5BZA4Oj9bDtQQ7AX6Wo,160
|
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
|
@@ -24,19 +24,23 @@ runwayml/_utils/_transform.py,sha256=n7kskEWz6o__aoNvhFoGVyDoalNe6mJwp-g7BWkdj88
|
|
24
24
|
runwayml/_utils/_typing.py,sha256=D0DbbNu8GnYQTSICnTSHDGsYXj8TcAKyhejb0XcnjtY,4602
|
25
25
|
runwayml/_utils/_utils.py,sha256=ts4CiiuNpFiGB6YMdkQRh2SZvYvsl7mAF-JWHCcLDf4,12312
|
26
26
|
runwayml/lib/.keep,sha256=wuNrz-5SXo3jJaJOJgz4vFHM41YH_g20F5cRQo0vLes,224
|
27
|
-
runwayml/
|
28
|
-
runwayml/resources/
|
27
|
+
runwayml/lib/polling.py,sha256=4fF0gP-h4iR0jvxWifsqtR1iH9vRoKEgGykkaZNT9Ek,4743
|
28
|
+
runwayml/resources/__init__.py,sha256=5XJIeBB9D2GqQU-9Ub5AuzRVgLYp1QdLr8Fjh6DCDxM,2643
|
29
|
+
runwayml/resources/image_to_video.py,sha256=O6YbnD7QEE_YK5UeRDq8RzWwiuS5nTQSAkCl9RvZe74,10880
|
29
30
|
runwayml/resources/organization.py,sha256=XBg5nhkycPU3rllRvf9aaeHuZNtzGDKHlLPrPqDCAsw,5419
|
30
|
-
runwayml/resources/tasks.py,sha256
|
31
|
-
runwayml/resources/text_to_image.py,sha256=
|
32
|
-
runwayml/
|
33
|
-
runwayml/types/
|
31
|
+
runwayml/resources/tasks.py,sha256=mjdBqB1G4u9v3xB_9yn6aIdvsDmawxSNcTENkMpKSms,10146
|
32
|
+
runwayml/resources/text_to_image.py,sha256=OJ9oD1Fc5NBGqci6Ox_-M9lFvsYG31fSwSzsr0pwPak,10200
|
33
|
+
runwayml/resources/video_upscale.py,sha256=8Mz_g5Swxmgp14jfcfexurUYpPi73q_iU-9D1jOddt0,7691
|
34
|
+
runwayml/types/__init__.py,sha256=zXevA88F25dbdsjgpvdlKlvELiv9aamz1hS3xcLbe40,889
|
35
|
+
runwayml/types/image_to_video_create_params.py,sha256=6M_xJRx0ws8nQ0a3k3jEICDm-WXJUG9j-j1UIxAAg-s,2869
|
34
36
|
runwayml/types/image_to_video_create_response.py,sha256=WvZHbZxxJz8KerRNogzb1RYBrxa1x0iCPDi9-LCpHyE,345
|
35
|
-
runwayml/types/organization_retrieve_response.py,sha256=
|
37
|
+
runwayml/types/organization_retrieve_response.py,sha256=_7vny0YNmNmREe8jp58ldJbXDdzNAGzDT8V0kK9pbsA,4385
|
36
38
|
runwayml/types/task_retrieve_response.py,sha256=v8y2bLxsW6srzScW-B3Akv72q_PI_NQmduGrGRQMHds,2139
|
37
39
|
runwayml/types/text_to_image_create_params.py,sha256=I8Dr4UG6VnciQ87zN6qp03FKwlQNnrwyn6cacHLqw20,2794
|
38
40
|
runwayml/types/text_to_image_create_response.py,sha256=koMzUg82dYFQPp77wln3UR1z8WO2sHCNMWGgoQ9Id8M,262
|
39
|
-
runwayml
|
40
|
-
runwayml
|
41
|
-
runwayml-3.
|
42
|
-
runwayml-3.
|
41
|
+
runwayml/types/video_upscale_create_params.py,sha256=Ta3BNQy9aeTUBU5Ui-CMJtF32HeNRqbNpqjAAOKXyks,743
|
42
|
+
runwayml/types/video_upscale_create_response.py,sha256=zf-79HbJa68dUHltBiZjVtnW_U6HUI-htmkTm5URBSU,264
|
43
|
+
runwayml-3.5.0.dist-info/METADATA,sha256=XVkA49TYYef7Lo64G3DhqxZ_TnLk6sAD-syfEscSpE0,13986
|
44
|
+
runwayml-3.5.0.dist-info/WHEEL,sha256=C2FUgwZgiLbznR-k0b_5k3Ai_1aASOXDss3lzCUsUug,87
|
45
|
+
runwayml-3.5.0.dist-info/licenses/LICENSE,sha256=baeFj6izBWIm6A5_7N3-WAsy_VYpDF05Dd4zS1zsfZI,11338
|
46
|
+
runwayml-3.5.0.dist-info/RECORD,,
|
File without changes
|
File without changes
|