runwayml 3.8.0__tar.gz → 3.9.0__tar.gz
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-3.9.0/.release-please-manifest.json +3 -0
- {runwayml-3.8.0 → runwayml-3.9.0}/CHANGELOG.md +8 -0
- {runwayml-3.8.0 → runwayml-3.9.0}/PKG-INFO +1 -1
- {runwayml-3.8.0 → runwayml-3.9.0}/api.md +12 -0
- {runwayml-3.8.0 → runwayml-3.9.0}/pyproject.toml +1 -1
- {runwayml-3.8.0 → runwayml-3.9.0}/src/runwayml/_client.py +17 -1
- {runwayml-3.8.0 → runwayml-3.9.0}/src/runwayml/_version.py +1 -1
- {runwayml-3.8.0 → runwayml-3.9.0}/src/runwayml/resources/__init__.py +14 -0
- {runwayml-3.8.0 → runwayml-3.9.0}/src/runwayml/resources/text_to_image.py +2 -2
- runwayml-3.9.0/src/runwayml/resources/video_to_video.py +244 -0
- {runwayml-3.8.0 → runwayml-3.9.0}/src/runwayml/types/__init__.py +2 -0
- {runwayml-3.8.0 → runwayml-3.9.0}/src/runwayml/types/organization_retrieve_response.py +21 -0
- {runwayml-3.8.0 → runwayml-3.9.0}/src/runwayml/types/organization_retrieve_usage_response.py +2 -2
- {runwayml-3.8.0 → runwayml-3.9.0}/src/runwayml/types/text_to_image_create_params.py +1 -1
- runwayml-3.9.0/src/runwayml/types/video_to_video_create_params.py +68 -0
- runwayml-3.9.0/src/runwayml/types/video_to_video_create_response.py +10 -0
- runwayml-3.9.0/tests/api_resources/test_video_to_video.py +140 -0
- runwayml-3.8.0/.release-please-manifest.json +0 -3
- {runwayml-3.8.0 → runwayml-3.9.0}/.gitignore +0 -0
- {runwayml-3.8.0 → runwayml-3.9.0}/CONTRIBUTING.md +0 -0
- {runwayml-3.8.0 → runwayml-3.9.0}/LICENSE +0 -0
- {runwayml-3.8.0 → runwayml-3.9.0}/README.md +0 -0
- {runwayml-3.8.0 → runwayml-3.9.0}/SECURITY.md +0 -0
- {runwayml-3.8.0 → runwayml-3.9.0}/bin/check-release-environment +0 -0
- {runwayml-3.8.0 → runwayml-3.9.0}/bin/publish-pypi +0 -0
- {runwayml-3.8.0 → runwayml-3.9.0}/examples/.keep +0 -0
- {runwayml-3.8.0 → runwayml-3.9.0}/examples/generate_image.py +0 -0
- {runwayml-3.8.0 → runwayml-3.9.0}/mypy.ini +0 -0
- {runwayml-3.8.0 → runwayml-3.9.0}/noxfile.py +0 -0
- {runwayml-3.8.0 → runwayml-3.9.0}/release-please-config.json +0 -0
- {runwayml-3.8.0 → runwayml-3.9.0}/requirements-dev.lock +0 -0
- {runwayml-3.8.0 → runwayml-3.9.0}/requirements.lock +0 -0
- {runwayml-3.8.0 → runwayml-3.9.0}/src/runwayml/__init__.py +0 -0
- {runwayml-3.8.0 → runwayml-3.9.0}/src/runwayml/_base_client.py +0 -0
- {runwayml-3.8.0 → runwayml-3.9.0}/src/runwayml/_compat.py +0 -0
- {runwayml-3.8.0 → runwayml-3.9.0}/src/runwayml/_constants.py +0 -0
- {runwayml-3.8.0 → runwayml-3.9.0}/src/runwayml/_exceptions.py +0 -0
- {runwayml-3.8.0 → runwayml-3.9.0}/src/runwayml/_files.py +0 -0
- {runwayml-3.8.0 → runwayml-3.9.0}/src/runwayml/_models.py +0 -0
- {runwayml-3.8.0 → runwayml-3.9.0}/src/runwayml/_qs.py +0 -0
- {runwayml-3.8.0 → runwayml-3.9.0}/src/runwayml/_resource.py +0 -0
- {runwayml-3.8.0 → runwayml-3.9.0}/src/runwayml/_response.py +0 -0
- {runwayml-3.8.0 → runwayml-3.9.0}/src/runwayml/_streaming.py +0 -0
- {runwayml-3.8.0 → runwayml-3.9.0}/src/runwayml/_types.py +0 -0
- {runwayml-3.8.0 → runwayml-3.9.0}/src/runwayml/_utils/__init__.py +0 -0
- {runwayml-3.8.0 → runwayml-3.9.0}/src/runwayml/_utils/_logs.py +0 -0
- {runwayml-3.8.0 → runwayml-3.9.0}/src/runwayml/_utils/_proxy.py +0 -0
- {runwayml-3.8.0 → runwayml-3.9.0}/src/runwayml/_utils/_reflection.py +0 -0
- {runwayml-3.8.0 → runwayml-3.9.0}/src/runwayml/_utils/_resources_proxy.py +0 -0
- {runwayml-3.8.0 → runwayml-3.9.0}/src/runwayml/_utils/_streams.py +0 -0
- {runwayml-3.8.0 → runwayml-3.9.0}/src/runwayml/_utils/_sync.py +0 -0
- {runwayml-3.8.0 → runwayml-3.9.0}/src/runwayml/_utils/_transform.py +0 -0
- {runwayml-3.8.0 → runwayml-3.9.0}/src/runwayml/_utils/_typing.py +0 -0
- {runwayml-3.8.0 → runwayml-3.9.0}/src/runwayml/_utils/_utils.py +0 -0
- {runwayml-3.8.0 → runwayml-3.9.0}/src/runwayml/lib/.keep +0 -0
- {runwayml-3.8.0 → runwayml-3.9.0}/src/runwayml/lib/polling.py +0 -0
- {runwayml-3.8.0 → runwayml-3.9.0}/src/runwayml/py.typed +0 -0
- {runwayml-3.8.0 → runwayml-3.9.0}/src/runwayml/resources/character_performance.py +0 -0
- {runwayml-3.8.0 → runwayml-3.9.0}/src/runwayml/resources/image_to_video.py +0 -0
- {runwayml-3.8.0 → runwayml-3.9.0}/src/runwayml/resources/organization.py +0 -0
- {runwayml-3.8.0 → runwayml-3.9.0}/src/runwayml/resources/tasks.py +0 -0
- {runwayml-3.8.0 → runwayml-3.9.0}/src/runwayml/resources/video_upscale.py +0 -0
- {runwayml-3.8.0 → runwayml-3.9.0}/src/runwayml/types/character_performance_create_params.py +0 -0
- {runwayml-3.8.0 → runwayml-3.9.0}/src/runwayml/types/character_performance_create_response.py +0 -0
- {runwayml-3.8.0 → runwayml-3.9.0}/src/runwayml/types/image_to_video_create_params.py +0 -0
- {runwayml-3.8.0 → runwayml-3.9.0}/src/runwayml/types/image_to_video_create_response.py +0 -0
- {runwayml-3.8.0 → runwayml-3.9.0}/src/runwayml/types/organization_retrieve_usage_params.py +0 -0
- {runwayml-3.8.0 → runwayml-3.9.0}/src/runwayml/types/task_retrieve_response.py +0 -0
- {runwayml-3.8.0 → runwayml-3.9.0}/src/runwayml/types/text_to_image_create_response.py +0 -0
- {runwayml-3.8.0 → runwayml-3.9.0}/src/runwayml/types/video_upscale_create_params.py +0 -0
- {runwayml-3.8.0 → runwayml-3.9.0}/src/runwayml/types/video_upscale_create_response.py +0 -0
- {runwayml-3.8.0 → runwayml-3.9.0}/tests/__init__.py +0 -0
- {runwayml-3.8.0 → runwayml-3.9.0}/tests/api_resources/__init__.py +0 -0
- {runwayml-3.8.0 → runwayml-3.9.0}/tests/api_resources/test_character_performance.py +0 -0
- {runwayml-3.8.0 → runwayml-3.9.0}/tests/api_resources/test_image_to_video.py +0 -0
- {runwayml-3.8.0 → runwayml-3.9.0}/tests/api_resources/test_organization.py +0 -0
- {runwayml-3.8.0 → runwayml-3.9.0}/tests/api_resources/test_tasks.py +0 -0
- {runwayml-3.8.0 → runwayml-3.9.0}/tests/api_resources/test_text_to_image.py +0 -0
- {runwayml-3.8.0 → runwayml-3.9.0}/tests/api_resources/test_video_upscale.py +0 -0
- {runwayml-3.8.0 → runwayml-3.9.0}/tests/conftest.py +0 -0
- {runwayml-3.8.0 → runwayml-3.9.0}/tests/sample_file.txt +0 -0
- {runwayml-3.8.0 → runwayml-3.9.0}/tests/test_client.py +0 -0
- {runwayml-3.8.0 → runwayml-3.9.0}/tests/test_deepcopy.py +0 -0
- {runwayml-3.8.0 → runwayml-3.9.0}/tests/test_extract_files.py +0 -0
- {runwayml-3.8.0 → runwayml-3.9.0}/tests/test_files.py +0 -0
- {runwayml-3.8.0 → runwayml-3.9.0}/tests/test_models.py +0 -0
- {runwayml-3.8.0 → runwayml-3.9.0}/tests/test_qs.py +0 -0
- {runwayml-3.8.0 → runwayml-3.9.0}/tests/test_required_args.py +0 -0
- {runwayml-3.8.0 → runwayml-3.9.0}/tests/test_response.py +0 -0
- {runwayml-3.8.0 → runwayml-3.9.0}/tests/test_streaming.py +0 -0
- {runwayml-3.8.0 → runwayml-3.9.0}/tests/test_transform.py +0 -0
- {runwayml-3.8.0 → runwayml-3.9.0}/tests/test_utils/test_proxy.py +0 -0
- {runwayml-3.8.0 → runwayml-3.9.0}/tests/test_utils/test_typing.py +0 -0
- {runwayml-3.8.0 → runwayml-3.9.0}/tests/utils.py +0 -0
@@ -1,5 +1,13 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
+
## 3.9.0 (2025-08-01)
|
4
|
+
|
5
|
+
Full Changelog: [v3.8.0...v3.9.0](https://github.com/runwayml/sdk-python/compare/v3.8.0...v3.9.0)
|
6
|
+
|
7
|
+
### Features
|
8
|
+
|
9
|
+
* **api:** Gen-4 Aleph ([b1cf4db](https://github.com/runwayml/sdk-python/commit/b1cf4db0265fa866abf31ac0ffaf6b1ee0b9140c))
|
10
|
+
|
3
11
|
## 3.8.0 (2025-07-31)
|
4
12
|
|
5
13
|
Full Changelog: [v3.7.2...v3.8.0](https://github.com/runwayml/sdk-python/compare/v3.7.2...v3.8.0)
|
@@ -23,6 +23,18 @@ Methods:
|
|
23
23
|
|
24
24
|
- <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>
|
25
25
|
|
26
|
+
# VideoToVideo
|
27
|
+
|
28
|
+
Types:
|
29
|
+
|
30
|
+
```python
|
31
|
+
from runwayml.types import VideoToVideoCreateResponse
|
32
|
+
```
|
33
|
+
|
34
|
+
Methods:
|
35
|
+
|
36
|
+
- <code title="post /v1/video_to_video">client.video_to_video.<a href="./src/runwayml/resources/video_to_video.py">create</a>(\*\*<a href="src/runwayml/types/video_to_video_create_params.py">params</a>) -> <a href="./src/runwayml/types/video_to_video_create_response.py">VideoToVideoCreateResponse</a></code>
|
37
|
+
|
26
38
|
# TextToImage
|
27
39
|
|
28
40
|
Types:
|
@@ -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
|
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(
|
@@ -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",
|
@@ -97,7 +97,7 @@ class TextToImageResource(SyncAPIResource):
|
|
97
97
|
content_moderation: Settings that affect the behavior of the content moderation system.
|
98
98
|
|
99
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
|
100
|
+
to three reference images can be provided for `gen4_image`.
|
101
101
|
|
102
102
|
seed: If unspecified, a random number is chosen. Varying the seed integer is a way to
|
103
103
|
get different results for the same other request parameters. Using the same seed
|
@@ -198,7 +198,7 @@ class AsyncTextToImageResource(AsyncAPIResource):
|
|
198
198
|
content_moderation: Settings that affect the behavior of the content moderation system.
|
199
199
|
|
200
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
|
201
|
+
to three reference images can be provided for `gen4_image`.
|
202
202
|
|
203
203
|
seed: If unspecified, a random number is chosen. Varying the seed integer is a way to
|
204
204
|
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,6 +12,7 @@ __all__ = [
|
|
12
12
|
"TierModels",
|
13
13
|
"TierModelsActTwo",
|
14
14
|
"TierModelsGen3aTurbo",
|
15
|
+
"TierModelsGen4Aleph",
|
15
16
|
"TierModelsGen4Image",
|
16
17
|
"TierModelsGen4Turbo",
|
17
18
|
"TierModelsUpscaleV1",
|
@@ -19,6 +20,7 @@ __all__ = [
|
|
19
20
|
"UsageModels",
|
20
21
|
"UsageModelsActTwo",
|
21
22
|
"UsageModelsGen3aTurbo",
|
23
|
+
"UsageModelsGen4Aleph",
|
22
24
|
"UsageModelsGen4Image",
|
23
25
|
"UsageModelsGen4Turbo",
|
24
26
|
"UsageModelsUpscaleV1",
|
@@ -41,6 +43,14 @@ class TierModelsGen3aTurbo(BaseModel):
|
|
41
43
|
"""The maximum number of generations that can be created each day for this model."""
|
42
44
|
|
43
45
|
|
46
|
+
class TierModelsGen4Aleph(BaseModel):
|
47
|
+
max_concurrent_generations: int = FieldInfo(alias="maxConcurrentGenerations")
|
48
|
+
"""The maximum number of generations that can be run concurrently for this model."""
|
49
|
+
|
50
|
+
max_daily_generations: int = FieldInfo(alias="maxDailyGenerations")
|
51
|
+
"""The maximum number of generations that can be created each day for this model."""
|
52
|
+
|
53
|
+
|
44
54
|
class TierModelsGen4Image(BaseModel):
|
45
55
|
max_concurrent_generations: int = FieldInfo(alias="maxConcurrentGenerations")
|
46
56
|
"""The maximum number of generations that can be run concurrently for this model."""
|
@@ -72,6 +82,9 @@ class TierModels(BaseModel):
|
|
72
82
|
gen3a_turbo: Optional[TierModelsGen3aTurbo] = None
|
73
83
|
"""Limits associated with the gen3a_turbo model."""
|
74
84
|
|
85
|
+
gen4_aleph: Optional[TierModelsGen4Aleph] = None
|
86
|
+
"""Limits associated with the gen4_aleph model."""
|
87
|
+
|
75
88
|
gen4_image: Optional[TierModelsGen4Image] = None
|
76
89
|
"""Limits associated with the gen4_image model."""
|
77
90
|
|
@@ -100,6 +113,11 @@ class UsageModelsGen3aTurbo(BaseModel):
|
|
100
113
|
"""The number of generations that have been run for this model in the past day."""
|
101
114
|
|
102
115
|
|
116
|
+
class UsageModelsGen4Aleph(BaseModel):
|
117
|
+
daily_generations: int = FieldInfo(alias="dailyGenerations")
|
118
|
+
"""The number of generations that have been run for this model in the past day."""
|
119
|
+
|
120
|
+
|
103
121
|
class UsageModelsGen4Image(BaseModel):
|
104
122
|
daily_generations: int = FieldInfo(alias="dailyGenerations")
|
105
123
|
"""The number of generations that have been run for this model in the past day."""
|
@@ -122,6 +140,9 @@ class UsageModels(BaseModel):
|
|
122
140
|
gen3a_turbo: Optional[UsageModelsGen3aTurbo] = None
|
123
141
|
"""Usage data for the gen3a_turbo model."""
|
124
142
|
|
143
|
+
gen4_aleph: Optional[UsageModelsGen4Aleph] = None
|
144
|
+
"""Usage data for the gen4_aleph model."""
|
145
|
+
|
125
146
|
gen4_image: Optional[UsageModelsGen4Image] = None
|
126
147
|
"""Usage data for the gen4_image model."""
|
127
148
|
|
{runwayml-3.8.0 → runwayml-3.9.0}/src/runwayml/types/organization_retrieve_usage_response.py
RENAMED
@@ -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"]
|
19
19
|
"""The model whose usage resulted in the credit usage."""
|
20
20
|
|
21
21
|
|
@@ -31,7 +31,7 @@ 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[Literal["upscale_v1", "act_two", "gen4_image", "gen3a_turbo", "gen4_turbo", "gen4_aleph"]]
|
35
35
|
"""The list of models with usage during the queried time range."""
|
36
36
|
|
37
37
|
results: List[Result]
|
@@ -48,7 +48,7 @@ class TextToImageCreateParams(TypedDict, total=False):
|
|
48
48
|
reference_images: Annotated[Iterable[ReferenceImage], PropertyInfo(alias="referenceImages")]
|
49
49
|
"""An array of images to be used as references for the generated image output.
|
50
50
|
|
51
|
-
Up to three reference images can be provided
|
51
|
+
Up to three reference images can be provided for `gen4_image`.
|
52
52
|
"""
|
53
53
|
|
54
54
|
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."""
|
@@ -0,0 +1,140 @@
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
2
|
+
|
3
|
+
from __future__ import annotations
|
4
|
+
|
5
|
+
import os
|
6
|
+
from typing import Any, cast
|
7
|
+
|
8
|
+
import pytest
|
9
|
+
|
10
|
+
from runwayml import RunwayML, AsyncRunwayML
|
11
|
+
from tests.utils import assert_matches_type
|
12
|
+
from runwayml.types import VideoToVideoCreateResponse
|
13
|
+
|
14
|
+
base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010")
|
15
|
+
|
16
|
+
|
17
|
+
class TestVideoToVideo:
|
18
|
+
parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"])
|
19
|
+
|
20
|
+
@parametrize
|
21
|
+
def test_method_create(self, client: RunwayML) -> None:
|
22
|
+
video_to_video = client.video_to_video.create(
|
23
|
+
model="gen4_aleph",
|
24
|
+
prompt_text="promptText",
|
25
|
+
ratio="1280:720",
|
26
|
+
video_uri="https://example.com",
|
27
|
+
)
|
28
|
+
assert_matches_type(VideoToVideoCreateResponse, video_to_video, path=["response"])
|
29
|
+
|
30
|
+
@parametrize
|
31
|
+
def test_method_create_with_all_params(self, client: RunwayML) -> None:
|
32
|
+
video_to_video = client.video_to_video.create(
|
33
|
+
model="gen4_aleph",
|
34
|
+
prompt_text="promptText",
|
35
|
+
ratio="1280:720",
|
36
|
+
video_uri="https://example.com",
|
37
|
+
content_moderation={"public_figure_threshold": "auto"},
|
38
|
+
references=[
|
39
|
+
{
|
40
|
+
"type": "image",
|
41
|
+
"uri": "https://example.com",
|
42
|
+
}
|
43
|
+
],
|
44
|
+
seed=0,
|
45
|
+
)
|
46
|
+
assert_matches_type(VideoToVideoCreateResponse, video_to_video, path=["response"])
|
47
|
+
|
48
|
+
@parametrize
|
49
|
+
def test_raw_response_create(self, client: RunwayML) -> None:
|
50
|
+
response = client.video_to_video.with_raw_response.create(
|
51
|
+
model="gen4_aleph",
|
52
|
+
prompt_text="promptText",
|
53
|
+
ratio="1280:720",
|
54
|
+
video_uri="https://example.com",
|
55
|
+
)
|
56
|
+
|
57
|
+
assert response.is_closed is True
|
58
|
+
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
|
59
|
+
video_to_video = response.parse()
|
60
|
+
assert_matches_type(VideoToVideoCreateResponse, video_to_video, path=["response"])
|
61
|
+
|
62
|
+
@parametrize
|
63
|
+
def test_streaming_response_create(self, client: RunwayML) -> None:
|
64
|
+
with client.video_to_video.with_streaming_response.create(
|
65
|
+
model="gen4_aleph",
|
66
|
+
prompt_text="promptText",
|
67
|
+
ratio="1280:720",
|
68
|
+
video_uri="https://example.com",
|
69
|
+
) as response:
|
70
|
+
assert not response.is_closed
|
71
|
+
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
|
72
|
+
|
73
|
+
video_to_video = response.parse()
|
74
|
+
assert_matches_type(VideoToVideoCreateResponse, video_to_video, path=["response"])
|
75
|
+
|
76
|
+
assert cast(Any, response.is_closed) is True
|
77
|
+
|
78
|
+
|
79
|
+
class TestAsyncVideoToVideo:
|
80
|
+
parametrize = pytest.mark.parametrize(
|
81
|
+
"async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
|
82
|
+
)
|
83
|
+
|
84
|
+
@parametrize
|
85
|
+
async def test_method_create(self, async_client: AsyncRunwayML) -> None:
|
86
|
+
video_to_video = await async_client.video_to_video.create(
|
87
|
+
model="gen4_aleph",
|
88
|
+
prompt_text="promptText",
|
89
|
+
ratio="1280:720",
|
90
|
+
video_uri="https://example.com",
|
91
|
+
)
|
92
|
+
assert_matches_type(VideoToVideoCreateResponse, video_to_video, path=["response"])
|
93
|
+
|
94
|
+
@parametrize
|
95
|
+
async def test_method_create_with_all_params(self, async_client: AsyncRunwayML) -> None:
|
96
|
+
video_to_video = await async_client.video_to_video.create(
|
97
|
+
model="gen4_aleph",
|
98
|
+
prompt_text="promptText",
|
99
|
+
ratio="1280:720",
|
100
|
+
video_uri="https://example.com",
|
101
|
+
content_moderation={"public_figure_threshold": "auto"},
|
102
|
+
references=[
|
103
|
+
{
|
104
|
+
"type": "image",
|
105
|
+
"uri": "https://example.com",
|
106
|
+
}
|
107
|
+
],
|
108
|
+
seed=0,
|
109
|
+
)
|
110
|
+
assert_matches_type(VideoToVideoCreateResponse, video_to_video, path=["response"])
|
111
|
+
|
112
|
+
@parametrize
|
113
|
+
async def test_raw_response_create(self, async_client: AsyncRunwayML) -> None:
|
114
|
+
response = await async_client.video_to_video.with_raw_response.create(
|
115
|
+
model="gen4_aleph",
|
116
|
+
prompt_text="promptText",
|
117
|
+
ratio="1280:720",
|
118
|
+
video_uri="https://example.com",
|
119
|
+
)
|
120
|
+
|
121
|
+
assert response.is_closed is True
|
122
|
+
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
|
123
|
+
video_to_video = await response.parse()
|
124
|
+
assert_matches_type(VideoToVideoCreateResponse, video_to_video, path=["response"])
|
125
|
+
|
126
|
+
@parametrize
|
127
|
+
async def test_streaming_response_create(self, async_client: AsyncRunwayML) -> None:
|
128
|
+
async with async_client.video_to_video.with_streaming_response.create(
|
129
|
+
model="gen4_aleph",
|
130
|
+
prompt_text="promptText",
|
131
|
+
ratio="1280:720",
|
132
|
+
video_uri="https://example.com",
|
133
|
+
) as response:
|
134
|
+
assert not response.is_closed
|
135
|
+
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
|
136
|
+
|
137
|
+
video_to_video = await response.parse()
|
138
|
+
assert_matches_type(VideoToVideoCreateResponse, video_to_video, path=["response"])
|
139
|
+
|
140
|
+
assert cast(Any, response.is_closed) is True
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{runwayml-3.8.0 → runwayml-3.9.0}/src/runwayml/types/character_performance_create_response.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|