runwayml 3.12.0__tar.gz → 3.13.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.
Files changed (101) hide show
  1. runwayml-3.13.0/.release-please-manifest.json +3 -0
  2. {runwayml-3.12.0 → runwayml-3.13.0}/CHANGELOG.md +19 -0
  3. {runwayml-3.12.0 → runwayml-3.13.0}/PKG-INFO +1 -1
  4. {runwayml-3.12.0 → runwayml-3.13.0}/api.md +12 -0
  5. {runwayml-3.12.0 → runwayml-3.13.0}/pyproject.toml +53 -2
  6. {runwayml-3.12.0 → runwayml-3.13.0}/requirements-dev.lock +0 -1
  7. {runwayml-3.12.0 → runwayml-3.13.0}/src/runwayml/_client.py +9 -0
  8. {runwayml-3.12.0 → runwayml-3.13.0}/src/runwayml/_version.py +1 -1
  9. {runwayml-3.12.0 → runwayml-3.13.0}/src/runwayml/resources/__init__.py +14 -0
  10. {runwayml-3.12.0 → runwayml-3.13.0}/src/runwayml/resources/image_to_video.py +28 -6
  11. {runwayml-3.12.0 → runwayml-3.13.0}/src/runwayml/resources/text_to_image.py +2 -2
  12. runwayml-3.13.0/src/runwayml/resources/text_to_video.py +223 -0
  13. {runwayml-3.12.0 → runwayml-3.13.0}/src/runwayml/types/__init__.py +2 -0
  14. {runwayml-3.12.0 → runwayml-3.13.0}/src/runwayml/types/image_to_video_create_params.py +19 -4
  15. {runwayml-3.12.0 → runwayml-3.13.0}/src/runwayml/types/organization_retrieve_response.py +21 -0
  16. {runwayml-3.12.0 → runwayml-3.13.0}/src/runwayml/types/organization_retrieve_usage_response.py +6 -2
  17. {runwayml-3.12.0 → runwayml-3.13.0}/src/runwayml/types/text_to_image_create_params.py +1 -1
  18. runwayml-3.13.0/src/runwayml/types/text_to_video_create_params.py +34 -0
  19. runwayml-3.13.0/src/runwayml/types/text_to_video_create_response.py +10 -0
  20. {runwayml-3.12.0 → runwayml-3.13.0}/tests/api_resources/test_image_to_video.py +8 -8
  21. {runwayml-3.12.0 → runwayml-3.13.0}/tests/api_resources/test_text_to_image.py +8 -8
  22. runwayml-3.13.0/tests/api_resources/test_text_to_video.py +126 -0
  23. {runwayml-3.12.0 → runwayml-3.13.0}/tests/test_client.py +16 -57
  24. runwayml-3.12.0/.release-please-manifest.json +0 -3
  25. runwayml-3.12.0/mypy.ini +0 -50
  26. {runwayml-3.12.0 → runwayml-3.13.0}/.gitignore +0 -0
  27. {runwayml-3.12.0 → runwayml-3.13.0}/CONTRIBUTING.md +0 -0
  28. {runwayml-3.12.0 → runwayml-3.13.0}/LICENSE +0 -0
  29. {runwayml-3.12.0 → runwayml-3.13.0}/README.md +0 -0
  30. {runwayml-3.12.0 → runwayml-3.13.0}/SECURITY.md +0 -0
  31. {runwayml-3.12.0 → runwayml-3.13.0}/bin/check-release-environment +0 -0
  32. {runwayml-3.12.0 → runwayml-3.13.0}/bin/publish-pypi +0 -0
  33. {runwayml-3.12.0 → runwayml-3.13.0}/examples/.keep +0 -0
  34. {runwayml-3.12.0 → runwayml-3.13.0}/examples/generate_image.py +0 -0
  35. {runwayml-3.12.0 → runwayml-3.13.0}/noxfile.py +0 -0
  36. {runwayml-3.12.0 → runwayml-3.13.0}/release-please-config.json +0 -0
  37. {runwayml-3.12.0 → runwayml-3.13.0}/requirements.lock +0 -0
  38. {runwayml-3.12.0 → runwayml-3.13.0}/src/runwayml/__init__.py +0 -0
  39. {runwayml-3.12.0 → runwayml-3.13.0}/src/runwayml/_base_client.py +0 -0
  40. {runwayml-3.12.0 → runwayml-3.13.0}/src/runwayml/_compat.py +0 -0
  41. {runwayml-3.12.0 → runwayml-3.13.0}/src/runwayml/_constants.py +0 -0
  42. {runwayml-3.12.0 → runwayml-3.13.0}/src/runwayml/_exceptions.py +0 -0
  43. {runwayml-3.12.0 → runwayml-3.13.0}/src/runwayml/_files.py +0 -0
  44. {runwayml-3.12.0 → runwayml-3.13.0}/src/runwayml/_models.py +0 -0
  45. {runwayml-3.12.0 → runwayml-3.13.0}/src/runwayml/_qs.py +0 -0
  46. {runwayml-3.12.0 → runwayml-3.13.0}/src/runwayml/_resource.py +0 -0
  47. {runwayml-3.12.0 → runwayml-3.13.0}/src/runwayml/_response.py +0 -0
  48. {runwayml-3.12.0 → runwayml-3.13.0}/src/runwayml/_streaming.py +0 -0
  49. {runwayml-3.12.0 → runwayml-3.13.0}/src/runwayml/_types.py +0 -0
  50. {runwayml-3.12.0 → runwayml-3.13.0}/src/runwayml/_utils/__init__.py +0 -0
  51. {runwayml-3.12.0 → runwayml-3.13.0}/src/runwayml/_utils/_compat.py +0 -0
  52. {runwayml-3.12.0 → runwayml-3.13.0}/src/runwayml/_utils/_datetime_parse.py +0 -0
  53. {runwayml-3.12.0 → runwayml-3.13.0}/src/runwayml/_utils/_logs.py +0 -0
  54. {runwayml-3.12.0 → runwayml-3.13.0}/src/runwayml/_utils/_proxy.py +0 -0
  55. {runwayml-3.12.0 → runwayml-3.13.0}/src/runwayml/_utils/_reflection.py +0 -0
  56. {runwayml-3.12.0 → runwayml-3.13.0}/src/runwayml/_utils/_resources_proxy.py +0 -0
  57. {runwayml-3.12.0 → runwayml-3.13.0}/src/runwayml/_utils/_streams.py +0 -0
  58. {runwayml-3.12.0 → runwayml-3.13.0}/src/runwayml/_utils/_sync.py +0 -0
  59. {runwayml-3.12.0 → runwayml-3.13.0}/src/runwayml/_utils/_transform.py +0 -0
  60. {runwayml-3.12.0 → runwayml-3.13.0}/src/runwayml/_utils/_typing.py +0 -0
  61. {runwayml-3.12.0 → runwayml-3.13.0}/src/runwayml/_utils/_utils.py +0 -0
  62. {runwayml-3.12.0 → runwayml-3.13.0}/src/runwayml/lib/.keep +0 -0
  63. {runwayml-3.12.0 → runwayml-3.13.0}/src/runwayml/lib/polling.py +0 -0
  64. {runwayml-3.12.0 → runwayml-3.13.0}/src/runwayml/py.typed +0 -0
  65. {runwayml-3.12.0 → runwayml-3.13.0}/src/runwayml/resources/character_performance.py +0 -0
  66. {runwayml-3.12.0 → runwayml-3.13.0}/src/runwayml/resources/organization.py +0 -0
  67. {runwayml-3.12.0 → runwayml-3.13.0}/src/runwayml/resources/tasks.py +0 -0
  68. {runwayml-3.12.0 → runwayml-3.13.0}/src/runwayml/resources/video_to_video.py +0 -0
  69. {runwayml-3.12.0 → runwayml-3.13.0}/src/runwayml/resources/video_upscale.py +0 -0
  70. {runwayml-3.12.0 → runwayml-3.13.0}/src/runwayml/types/character_performance_create_params.py +0 -0
  71. {runwayml-3.12.0 → runwayml-3.13.0}/src/runwayml/types/character_performance_create_response.py +0 -0
  72. {runwayml-3.12.0 → runwayml-3.13.0}/src/runwayml/types/image_to_video_create_response.py +0 -0
  73. {runwayml-3.12.0 → runwayml-3.13.0}/src/runwayml/types/organization_retrieve_usage_params.py +0 -0
  74. {runwayml-3.12.0 → runwayml-3.13.0}/src/runwayml/types/task_retrieve_response.py +0 -0
  75. {runwayml-3.12.0 → runwayml-3.13.0}/src/runwayml/types/text_to_image_create_response.py +0 -0
  76. {runwayml-3.12.0 → runwayml-3.13.0}/src/runwayml/types/video_to_video_create_params.py +0 -0
  77. {runwayml-3.12.0 → runwayml-3.13.0}/src/runwayml/types/video_to_video_create_response.py +0 -0
  78. {runwayml-3.12.0 → runwayml-3.13.0}/src/runwayml/types/video_upscale_create_params.py +0 -0
  79. {runwayml-3.12.0 → runwayml-3.13.0}/src/runwayml/types/video_upscale_create_response.py +0 -0
  80. {runwayml-3.12.0 → runwayml-3.13.0}/tests/__init__.py +0 -0
  81. {runwayml-3.12.0 → runwayml-3.13.0}/tests/api_resources/__init__.py +0 -0
  82. {runwayml-3.12.0 → runwayml-3.13.0}/tests/api_resources/test_character_performance.py +0 -0
  83. {runwayml-3.12.0 → runwayml-3.13.0}/tests/api_resources/test_organization.py +0 -0
  84. {runwayml-3.12.0 → runwayml-3.13.0}/tests/api_resources/test_tasks.py +0 -0
  85. {runwayml-3.12.0 → runwayml-3.13.0}/tests/api_resources/test_video_to_video.py +0 -0
  86. {runwayml-3.12.0 → runwayml-3.13.0}/tests/api_resources/test_video_upscale.py +0 -0
  87. {runwayml-3.12.0 → runwayml-3.13.0}/tests/conftest.py +0 -0
  88. {runwayml-3.12.0 → runwayml-3.13.0}/tests/sample_file.txt +0 -0
  89. {runwayml-3.12.0 → runwayml-3.13.0}/tests/test_deepcopy.py +0 -0
  90. {runwayml-3.12.0 → runwayml-3.13.0}/tests/test_extract_files.py +0 -0
  91. {runwayml-3.12.0 → runwayml-3.13.0}/tests/test_files.py +0 -0
  92. {runwayml-3.12.0 → runwayml-3.13.0}/tests/test_models.py +0 -0
  93. {runwayml-3.12.0 → runwayml-3.13.0}/tests/test_qs.py +0 -0
  94. {runwayml-3.12.0 → runwayml-3.13.0}/tests/test_required_args.py +0 -0
  95. {runwayml-3.12.0 → runwayml-3.13.0}/tests/test_response.py +0 -0
  96. {runwayml-3.12.0 → runwayml-3.13.0}/tests/test_streaming.py +0 -0
  97. {runwayml-3.12.0 → runwayml-3.13.0}/tests/test_transform.py +0 -0
  98. {runwayml-3.12.0 → runwayml-3.13.0}/tests/test_utils/test_datetime_parse.py +0 -0
  99. {runwayml-3.12.0 → runwayml-3.13.0}/tests/test_utils/test_proxy.py +0 -0
  100. {runwayml-3.12.0 → runwayml-3.13.0}/tests/test_utils/test_typing.py +0 -0
  101. {runwayml-3.12.0 → runwayml-3.13.0}/tests/utils.py +0 -0
@@ -0,0 +1,3 @@
1
+ {
2
+ ".": "3.13.0"
3
+ }
@@ -1,5 +1,24 @@
1
1
  # Changelog
2
2
 
3
+ ## 3.13.0 (2025-09-10)
4
+
5
+ Full Changelog: [v3.12.1...v3.13.0](https://github.com/runwayml/sdk-python/compare/v3.12.1...v3.13.0)
6
+
7
+ ### Features
8
+
9
+ * **api:** Update t2v parameters ([7163db8](https://github.com/runwayml/sdk-python/commit/7163db8841a5dca89b546e8d445105aeffe07d10))
10
+ * **api:** Veo3 integration ([37e7224](https://github.com/runwayml/sdk-python/commit/37e7224b1e0de5450b69bb42a1dc6a9039e435af))
11
+ * **client:** Make t2v waitable ([d21c4e4](https://github.com/runwayml/sdk-python/commit/d21c4e4da2c8760aceaf07579051ab1e486c08b2))
12
+
13
+ ## 3.12.1 (2025-09-06)
14
+
15
+ Full Changelog: [v3.12.0...v3.12.1](https://github.com/runwayml/sdk-python/compare/v3.12.0...v3.12.1)
16
+
17
+ ### Chores
18
+
19
+ * **internal:** move mypy configurations to `pyproject.toml` file ([0ff4ea5](https://github.com/runwayml/sdk-python/commit/0ff4ea5666ec784f6a5d72fa8df1daff3af86fbf))
20
+ * **tests:** simplify `get_platform` test ([5b651b2](https://github.com/runwayml/sdk-python/commit/5b651b2b45dc7550e29fc970705bbb4806701433))
21
+
3
22
  ## 3.12.0 (2025-09-04)
4
23
 
5
24
  Full Changelog: [v3.11.0...v3.12.0](https://github.com/runwayml/sdk-python/compare/v3.11.0...v3.12.0)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: runwayml
3
- Version: 3.12.0
3
+ Version: 3.13.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
@@ -35,6 +35,18 @@ Methods:
35
35
 
36
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
37
 
38
+ # TextToVideo
39
+
40
+ Types:
41
+
42
+ ```python
43
+ from runwayml.types import TextToVideoCreateResponse
44
+ ```
45
+
46
+ Methods:
47
+
48
+ - <code title="post /v1/text_to_video">client.text_to_video.<a href="./src/runwayml/resources/text_to_video.py">create</a>(\*\*<a href="src/runwayml/types/text_to_video_create_params.py">params</a>) -> <a href="./src/runwayml/types/text_to_video_create_response.py">TextToVideoCreateResponse</a></code>
49
+
38
50
  # TextToImage
39
51
 
40
52
  Types:
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "runwayml"
3
- version = "3.12.0"
3
+ version = "3.13.0"
4
4
  description = "The official Python library for the runwayml API"
5
5
  dynamic = ["readme"]
6
6
  license = "Apache-2.0"
@@ -56,7 +56,6 @@ dev-dependencies = [
56
56
  "dirty-equals>=0.6.0",
57
57
  "importlib-metadata>=6.7.0",
58
58
  "rich>=13.7.1",
59
- "nest_asyncio==1.6.0",
60
59
  "pytest-xdist>=3.6.1",
61
60
  ]
62
61
 
@@ -157,6 +156,58 @@ reportOverlappingOverload = false
157
156
  reportImportCycles = false
158
157
  reportPrivateUsage = false
159
158
 
159
+ [tool.mypy]
160
+ pretty = true
161
+ show_error_codes = true
162
+
163
+ # Exclude _files.py because mypy isn't smart enough to apply
164
+ # the correct type narrowing and as this is an internal module
165
+ # it's fine to just use Pyright.
166
+ #
167
+ # We also exclude our `tests` as mypy doesn't always infer
168
+ # types correctly and Pyright will still catch any type errors.
169
+ exclude = ['src/runwayml/_files.py', '_dev/.*.py', 'tests/.*']
170
+
171
+ strict_equality = true
172
+ implicit_reexport = true
173
+ check_untyped_defs = true
174
+ no_implicit_optional = true
175
+
176
+ warn_return_any = true
177
+ warn_unreachable = true
178
+ warn_unused_configs = true
179
+
180
+ # Turn these options off as it could cause conflicts
181
+ # with the Pyright options.
182
+ warn_unused_ignores = false
183
+ warn_redundant_casts = false
184
+
185
+ disallow_any_generics = true
186
+ disallow_untyped_defs = true
187
+ disallow_untyped_calls = true
188
+ disallow_subclassing_any = true
189
+ disallow_incomplete_defs = true
190
+ disallow_untyped_decorators = true
191
+ cache_fine_grained = true
192
+
193
+ # By default, mypy reports an error if you assign a value to the result
194
+ # of a function call that doesn't return anything. We do this in our test
195
+ # cases:
196
+ # ```
197
+ # result = ...
198
+ # assert result is None
199
+ # ```
200
+ # Changing this codegen to make mypy happy would increase complexity
201
+ # and would not be worth it.
202
+ disable_error_code = "func-returns-value,overload-cannot-match"
203
+
204
+ # https://github.com/python/mypy/issues/12162
205
+ [[tool.mypy.overrides]]
206
+ module = "black.files.*"
207
+ ignore_errors = true
208
+ ignore_missing_imports = true
209
+
210
+
160
211
  [tool.ruff]
161
212
  line-length = 120
162
213
  output-format = "grouped"
@@ -75,7 +75,6 @@ multidict==6.4.4
75
75
  mypy==1.14.1
76
76
  mypy-extensions==1.0.0
77
77
  # via mypy
78
- nest-asyncio==1.6.0
79
78
  nodeenv==1.8.0
80
79
  # via pyright
81
80
  nox==2023.4.22
@@ -25,6 +25,7 @@ from .resources import (
25
25
  tasks,
26
26
  organization,
27
27
  text_to_image,
28
+ text_to_video,
28
29
  video_upscale,
29
30
  image_to_video,
30
31
  video_to_video,
@@ -54,6 +55,7 @@ class RunwayML(SyncAPIClient):
54
55
  tasks: tasks.TasksResource
55
56
  image_to_video: image_to_video.ImageToVideoResource
56
57
  video_to_video: video_to_video.VideoToVideoResource
58
+ text_to_video: text_to_video.TextToVideoResource
57
59
  text_to_image: text_to_image.TextToImageResource
58
60
  video_upscale: video_upscale.VideoUpscaleResource
59
61
  character_performance: character_performance.CharacterPerformanceResource
@@ -124,6 +126,7 @@ class RunwayML(SyncAPIClient):
124
126
  self.tasks = tasks.TasksResource(self)
125
127
  self.image_to_video = image_to_video.ImageToVideoResource(self)
126
128
  self.video_to_video = video_to_video.VideoToVideoResource(self)
129
+ self.text_to_video = text_to_video.TextToVideoResource(self)
127
130
  self.text_to_image = text_to_image.TextToImageResource(self)
128
131
  self.video_upscale = video_upscale.VideoUpscaleResource(self)
129
132
  self.character_performance = character_performance.CharacterPerformanceResource(self)
@@ -243,6 +246,7 @@ class AsyncRunwayML(AsyncAPIClient):
243
246
  tasks: tasks.AsyncTasksResource
244
247
  image_to_video: image_to_video.AsyncImageToVideoResource
245
248
  video_to_video: video_to_video.AsyncVideoToVideoResource
249
+ text_to_video: text_to_video.AsyncTextToVideoResource
246
250
  text_to_image: text_to_image.AsyncTextToImageResource
247
251
  video_upscale: video_upscale.AsyncVideoUpscaleResource
248
252
  character_performance: character_performance.AsyncCharacterPerformanceResource
@@ -313,6 +317,7 @@ class AsyncRunwayML(AsyncAPIClient):
313
317
  self.tasks = tasks.AsyncTasksResource(self)
314
318
  self.image_to_video = image_to_video.AsyncImageToVideoResource(self)
315
319
  self.video_to_video = video_to_video.AsyncVideoToVideoResource(self)
320
+ self.text_to_video = text_to_video.AsyncTextToVideoResource(self)
316
321
  self.text_to_image = text_to_image.AsyncTextToImageResource(self)
317
322
  self.video_upscale = video_upscale.AsyncVideoUpscaleResource(self)
318
323
  self.character_performance = character_performance.AsyncCharacterPerformanceResource(self)
@@ -433,6 +438,7 @@ class RunwayMLWithRawResponse:
433
438
  self.tasks = tasks.TasksResourceWithRawResponse(client.tasks)
434
439
  self.image_to_video = image_to_video.ImageToVideoResourceWithRawResponse(client.image_to_video)
435
440
  self.video_to_video = video_to_video.VideoToVideoResourceWithRawResponse(client.video_to_video)
441
+ self.text_to_video = text_to_video.TextToVideoResourceWithRawResponse(client.text_to_video)
436
442
  self.text_to_image = text_to_image.TextToImageResourceWithRawResponse(client.text_to_image)
437
443
  self.video_upscale = video_upscale.VideoUpscaleResourceWithRawResponse(client.video_upscale)
438
444
  self.character_performance = character_performance.CharacterPerformanceResourceWithRawResponse(
@@ -446,6 +452,7 @@ class AsyncRunwayMLWithRawResponse:
446
452
  self.tasks = tasks.AsyncTasksResourceWithRawResponse(client.tasks)
447
453
  self.image_to_video = image_to_video.AsyncImageToVideoResourceWithRawResponse(client.image_to_video)
448
454
  self.video_to_video = video_to_video.AsyncVideoToVideoResourceWithRawResponse(client.video_to_video)
455
+ self.text_to_video = text_to_video.AsyncTextToVideoResourceWithRawResponse(client.text_to_video)
449
456
  self.text_to_image = text_to_image.AsyncTextToImageResourceWithRawResponse(client.text_to_image)
450
457
  self.video_upscale = video_upscale.AsyncVideoUpscaleResourceWithRawResponse(client.video_upscale)
451
458
  self.character_performance = character_performance.AsyncCharacterPerformanceResourceWithRawResponse(
@@ -459,6 +466,7 @@ class RunwayMLWithStreamedResponse:
459
466
  self.tasks = tasks.TasksResourceWithStreamingResponse(client.tasks)
460
467
  self.image_to_video = image_to_video.ImageToVideoResourceWithStreamingResponse(client.image_to_video)
461
468
  self.video_to_video = video_to_video.VideoToVideoResourceWithStreamingResponse(client.video_to_video)
469
+ self.text_to_video = text_to_video.TextToVideoResourceWithStreamingResponse(client.text_to_video)
462
470
  self.text_to_image = text_to_image.TextToImageResourceWithStreamingResponse(client.text_to_image)
463
471
  self.video_upscale = video_upscale.VideoUpscaleResourceWithStreamingResponse(client.video_upscale)
464
472
  self.character_performance = character_performance.CharacterPerformanceResourceWithStreamingResponse(
@@ -472,6 +480,7 @@ class AsyncRunwayMLWithStreamedResponse:
472
480
  self.tasks = tasks.AsyncTasksResourceWithStreamingResponse(client.tasks)
473
481
  self.image_to_video = image_to_video.AsyncImageToVideoResourceWithStreamingResponse(client.image_to_video)
474
482
  self.video_to_video = video_to_video.AsyncVideoToVideoResourceWithStreamingResponse(client.video_to_video)
483
+ self.text_to_video = text_to_video.AsyncTextToVideoResourceWithStreamingResponse(client.text_to_video)
475
484
  self.text_to_image = text_to_image.AsyncTextToImageResourceWithStreamingResponse(client.text_to_image)
476
485
  self.video_upscale = video_upscale.AsyncVideoUpscaleResourceWithStreamingResponse(client.video_upscale)
477
486
  self.character_performance = character_performance.AsyncCharacterPerformanceResourceWithStreamingResponse(
@@ -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.12.0" # x-release-please-version
4
+ __version__ = "3.13.0" # x-release-please-version
@@ -24,6 +24,14 @@ from .text_to_image import (
24
24
  TextToImageResourceWithStreamingResponse,
25
25
  AsyncTextToImageResourceWithStreamingResponse,
26
26
  )
27
+ from .text_to_video import (
28
+ TextToVideoResource,
29
+ AsyncTextToVideoResource,
30
+ TextToVideoResourceWithRawResponse,
31
+ AsyncTextToVideoResourceWithRawResponse,
32
+ TextToVideoResourceWithStreamingResponse,
33
+ AsyncTextToVideoResourceWithStreamingResponse,
34
+ )
27
35
  from .video_upscale import (
28
36
  VideoUpscaleResource,
29
37
  AsyncVideoUpscaleResource,
@@ -76,6 +84,12 @@ __all__ = [
76
84
  "AsyncVideoToVideoResourceWithRawResponse",
77
85
  "VideoToVideoResourceWithStreamingResponse",
78
86
  "AsyncVideoToVideoResourceWithStreamingResponse",
87
+ "TextToVideoResource",
88
+ "AsyncTextToVideoResource",
89
+ "TextToVideoResourceWithRawResponse",
90
+ "AsyncTextToVideoResourceWithRawResponse",
91
+ "TextToVideoResourceWithStreamingResponse",
92
+ "AsyncTextToVideoResourceWithStreamingResponse",
79
93
  "TextToImageResource",
80
94
  "AsyncTextToImageResource",
81
95
  "TextToImageResourceWithRawResponse",
@@ -53,11 +53,11 @@ class ImageToVideoResource(SyncAPIResource):
53
53
  def create(
54
54
  self,
55
55
  *,
56
- model: Literal["gen3a_turbo", "gen4_turbo"],
56
+ model: Literal["gen4_turbo", "gen3a_turbo", "veo3"],
57
57
  prompt_image: Union[str, Iterable[image_to_video_create_params.PromptImagePromptImage]],
58
58
  ratio: Literal["1280:720", "720:1280", "1104:832", "832:1104", "960:960", "1584:672", "1280:768", "768:1280"],
59
59
  content_moderation: image_to_video_create_params.ContentModeration | NotGiven = NOT_GIVEN,
60
- duration: Literal[5, 10] | NotGiven = NOT_GIVEN,
60
+ duration: Literal[5, 8, 10] | NotGiven = NOT_GIVEN,
61
61
  prompt_text: str | NotGiven = NOT_GIVEN,
62
62
  seed: int | NotGiven = NOT_GIVEN,
63
63
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
@@ -93,9 +93,20 @@ class ImageToVideoResource(SyncAPIResource):
93
93
  - `1280:768`
94
94
  - `768:1280`
95
95
 
96
+ `veo3` supports the following values:
97
+
98
+ - `1280:720`
99
+ - `720:1280`
100
+
96
101
  content_moderation: Settings that affect the behavior of the content moderation system.
97
102
 
98
- duration: The number of seconds of duration for the output video.
103
+ `veo3` does not support this parameter.
104
+
105
+ This field is allowed for the following model variants: `gen4_turbo`,
106
+ `gen3a_turbo`
107
+
108
+ duration: The number of seconds of duration for the output video. `veo3` requires a
109
+ duration of 8. gen4_turbo, gen3a_turbo must specify a duration of 5 or 10.
99
110
 
100
111
  prompt_text: A non-empty string up to 1000 characters (measured in UTF-16 code units). This
101
112
  should describe in detail what should appear in the output.
@@ -156,11 +167,11 @@ class AsyncImageToVideoResource(AsyncAPIResource):
156
167
  async def create(
157
168
  self,
158
169
  *,
159
- model: Literal["gen3a_turbo", "gen4_turbo"],
170
+ model: Literal["gen4_turbo", "gen3a_turbo", "veo3"],
160
171
  prompt_image: Union[str, Iterable[image_to_video_create_params.PromptImagePromptImage]],
161
172
  ratio: Literal["1280:720", "720:1280", "1104:832", "832:1104", "960:960", "1584:672", "1280:768", "768:1280"],
162
173
  content_moderation: image_to_video_create_params.ContentModeration | NotGiven = NOT_GIVEN,
163
- duration: Literal[5, 10] | NotGiven = NOT_GIVEN,
174
+ duration: Literal[5, 8, 10] | NotGiven = NOT_GIVEN,
164
175
  prompt_text: str | NotGiven = NOT_GIVEN,
165
176
  seed: int | NotGiven = NOT_GIVEN,
166
177
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
@@ -196,9 +207,20 @@ class AsyncImageToVideoResource(AsyncAPIResource):
196
207
  - `1280:768`
197
208
  - `768:1280`
198
209
 
210
+ `veo3` supports the following values:
211
+
212
+ - `1280:720`
213
+ - `720:1280`
214
+
199
215
  content_moderation: Settings that affect the behavior of the content moderation system.
200
216
 
201
- duration: The number of seconds of duration for the output video.
217
+ `veo3` does not support this parameter.
218
+
219
+ This field is allowed for the following model variants: `gen4_turbo`,
220
+ `gen3a_turbo`
221
+
222
+ duration: The number of seconds of duration for the output video. `veo3` requires a
223
+ duration of 8. gen4_turbo, gen3a_turbo must specify a duration of 5 or 10.
202
224
 
203
225
  prompt_text: A non-empty string up to 1000 characters (measured in UTF-16 code units). This
204
226
  should describe in detail what should appear in the output.
@@ -53,7 +53,7 @@ class TextToImageResource(SyncAPIResource):
53
53
  def create(
54
54
  self,
55
55
  *,
56
- model: Literal["gen4_image", "gen4_image_turbo"],
56
+ model: Literal["gen4_image_turbo", "gen4_image"],
57
57
  prompt_text: str,
58
58
  ratio: Literal[
59
59
  "1920:1080",
@@ -156,7 +156,7 @@ class AsyncTextToImageResource(AsyncAPIResource):
156
156
  async def create(
157
157
  self,
158
158
  *,
159
- model: Literal["gen4_image", "gen4_image_turbo"],
159
+ model: Literal["gen4_image_turbo", "gen4_image"],
160
160
  prompt_text: str,
161
161
  ratio: Literal[
162
162
  "1920:1080",
@@ -0,0 +1,223 @@
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 text_to_video_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.text_to_video_create_response import TextToVideoCreateResponse
28
+
29
+ __all__ = ["TextToVideoResource", "AsyncTextToVideoResource"]
30
+
31
+
32
+ class TextToVideoResource(SyncAPIResource):
33
+ @cached_property
34
+ def with_raw_response(self) -> TextToVideoResourceWithRawResponse:
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 TextToVideoResourceWithRawResponse(self)
42
+
43
+ @cached_property
44
+ def with_streaming_response(self) -> TextToVideoResourceWithStreamingResponse:
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 TextToVideoResourceWithStreamingResponse(self)
51
+
52
+ def create(
53
+ self,
54
+ *,
55
+ duration: Literal[8],
56
+ model: Literal["veo3"],
57
+ prompt_text: str,
58
+ ratio: Literal["1280:720", "720:1280"],
59
+ seed: int | NotGiven = NOT_GIVEN,
60
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
61
+ # The extra values given here take precedence over values defined on the client or passed to this method.
62
+ extra_headers: Headers | None = None,
63
+ extra_query: Query | None = None,
64
+ extra_body: Body | None = None,
65
+ timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
66
+ ) -> NewTaskCreatedResponse:
67
+ """
68
+ This endpoint will start a new task to generate a video from a text prompt.
69
+
70
+ Args:
71
+ duration: Veo 3 videos must be 8 seconds long.
72
+
73
+ model: The model variant to use.
74
+
75
+ prompt_text: A non-empty string up to 1000 characters (measured in UTF-16 code units). This
76
+ should describe in detail what should appear in the output.
77
+
78
+ ratio: A string representing the aspect ratio of the output video.
79
+
80
+ seed: If unspecified, a random number is chosen. Varying the seed integer is a way to
81
+ get different results for the same other request parameters. Using the same seed
82
+ integer for an identical request will produce similar results.
83
+
84
+ extra_headers: Send extra headers
85
+
86
+ extra_query: Add additional query parameters to the request
87
+
88
+ extra_body: Add additional JSON properties to the request
89
+
90
+ timeout: Override the client-level default timeout for this request, in seconds
91
+ """
92
+ return self._post(
93
+ "/v1/text_to_video",
94
+ body=maybe_transform(
95
+ {
96
+ "duration": duration,
97
+ "model": model,
98
+ "prompt_text": prompt_text,
99
+ "ratio": ratio,
100
+ "seed": seed,
101
+ },
102
+ text_to_video_create_params.TextToVideoCreateParams,
103
+ ),
104
+ options=make_request_options(
105
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
106
+ ),
107
+ cast_to=create_waitable_resource(TextToVideoCreateResponse, self._client),
108
+ )
109
+
110
+
111
+ class AsyncTextToVideoResource(AsyncAPIResource):
112
+ @cached_property
113
+ def with_raw_response(self) -> AsyncTextToVideoResourceWithRawResponse:
114
+ """
115
+ This property can be used as a prefix for any HTTP method call to return
116
+ the raw response object instead of the parsed content.
117
+
118
+ For more information, see https://www.github.com/runwayml/sdk-python#accessing-raw-response-data-eg-headers
119
+ """
120
+ return AsyncTextToVideoResourceWithRawResponse(self)
121
+
122
+ @cached_property
123
+ def with_streaming_response(self) -> AsyncTextToVideoResourceWithStreamingResponse:
124
+ """
125
+ An alternative to `.with_raw_response` that doesn't eagerly read the response body.
126
+
127
+ For more information, see https://www.github.com/runwayml/sdk-python#with_streaming_response
128
+ """
129
+ return AsyncTextToVideoResourceWithStreamingResponse(self)
130
+
131
+ async def create(
132
+ self,
133
+ *,
134
+ duration: Literal[8],
135
+ model: Literal["veo3"],
136
+ prompt_text: str,
137
+ ratio: Literal["1280:720", "720:1280"],
138
+ seed: int | NotGiven = NOT_GIVEN,
139
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
140
+ # The extra values given here take precedence over values defined on the client or passed to this method.
141
+ extra_headers: Headers | None = None,
142
+ extra_query: Query | None = None,
143
+ extra_body: Body | None = None,
144
+ timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
145
+ ) -> AsyncNewTaskCreatedResponse:
146
+ """
147
+ This endpoint will start a new task to generate a video from a text prompt.
148
+
149
+ Args:
150
+ duration: Veo 3 videos must be 8 seconds long.
151
+
152
+ model: The model variant to use.
153
+
154
+ prompt_text: A non-empty string up to 1000 characters (measured in UTF-16 code units). This
155
+ should describe in detail what should appear in the output.
156
+
157
+ ratio: A string representing the aspect ratio of the output video.
158
+
159
+ seed: If unspecified, a random number is chosen. Varying the seed integer is a way to
160
+ get different results for the same other request parameters. Using the same seed
161
+ integer for an identical request will produce similar results.
162
+
163
+ extra_headers: Send extra headers
164
+
165
+ extra_query: Add additional query parameters to the request
166
+
167
+ extra_body: Add additional JSON properties to the request
168
+
169
+ timeout: Override the client-level default timeout for this request, in seconds
170
+ """
171
+ return await self._post(
172
+ "/v1/text_to_video",
173
+ body=await async_maybe_transform(
174
+ {
175
+ "duration": duration,
176
+ "model": model,
177
+ "prompt_text": prompt_text,
178
+ "ratio": ratio,
179
+ "seed": seed,
180
+ },
181
+ text_to_video_create_params.TextToVideoCreateParams,
182
+ ),
183
+ options=make_request_options(
184
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
185
+ ),
186
+ cast_to=create_async_waitable_resource(TextToVideoCreateResponse, self._client),
187
+ )
188
+
189
+
190
+ class TextToVideoResourceWithRawResponse:
191
+ def __init__(self, text_to_video: TextToVideoResource) -> None:
192
+ self._text_to_video = text_to_video
193
+
194
+ self.create = to_raw_response_wrapper(
195
+ text_to_video.create,
196
+ )
197
+
198
+
199
+ class AsyncTextToVideoResourceWithRawResponse:
200
+ def __init__(self, text_to_video: AsyncTextToVideoResource) -> None:
201
+ self._text_to_video = text_to_video
202
+
203
+ self.create = async_to_raw_response_wrapper(
204
+ text_to_video.create,
205
+ )
206
+
207
+
208
+ class TextToVideoResourceWithStreamingResponse:
209
+ def __init__(self, text_to_video: TextToVideoResource) -> None:
210
+ self._text_to_video = text_to_video
211
+
212
+ self.create = to_streamed_response_wrapper(
213
+ text_to_video.create,
214
+ )
215
+
216
+
217
+ class AsyncTextToVideoResourceWithStreamingResponse:
218
+ def __init__(self, text_to_video: AsyncTextToVideoResource) -> None:
219
+ self._text_to_video = text_to_video
220
+
221
+ self.create = async_to_streamed_response_wrapper(
222
+ text_to_video.create,
223
+ )
@@ -4,10 +4,12 @@ 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 .text_to_video_create_params import TextToVideoCreateParams as TextToVideoCreateParams
7
8
  from .video_upscale_create_params import VideoUpscaleCreateParams as VideoUpscaleCreateParams
8
9
  from .image_to_video_create_params import ImageToVideoCreateParams as ImageToVideoCreateParams
9
10
  from .video_to_video_create_params import VideoToVideoCreateParams as VideoToVideoCreateParams
10
11
  from .text_to_image_create_response import TextToImageCreateResponse as TextToImageCreateResponse
12
+ from .text_to_video_create_response import TextToVideoCreateResponse as TextToVideoCreateResponse
11
13
  from .video_upscale_create_response import VideoUpscaleCreateResponse as VideoUpscaleCreateResponse
12
14
  from .image_to_video_create_response import ImageToVideoCreateResponse as ImageToVideoCreateResponse
13
15
  from .organization_retrieve_response import OrganizationRetrieveResponse as OrganizationRetrieveResponse
@@ -11,7 +11,7 @@ __all__ = ["ImageToVideoCreateParams", "PromptImagePromptImage", "ContentModerat
11
11
 
12
12
 
13
13
  class ImageToVideoCreateParams(TypedDict, total=False):
14
- model: Required[Literal["gen3a_turbo", "gen4_turbo"]]
14
+ model: Required[Literal["gen4_turbo", "gen3a_turbo", "veo3"]]
15
15
  """The model variant to use."""
16
16
 
17
17
  prompt_image: Required[Annotated[Union[str, Iterable[PromptImagePromptImage]], PropertyInfo(alias="promptImage")]]
@@ -39,13 +39,28 @@ class ImageToVideoCreateParams(TypedDict, total=False):
39
39
 
40
40
  - `1280:768`
41
41
  - `768:1280`
42
+
43
+ `veo3` supports the following values:
44
+
45
+ - `1280:720`
46
+ - `720:1280`
42
47
  """
43
48
 
44
49
  content_moderation: Annotated[ContentModeration, PropertyInfo(alias="contentModeration")]
45
- """Settings that affect the behavior of the content moderation system."""
50
+ """Settings that affect the behavior of the content moderation system.
51
+
52
+ `veo3` does not support this parameter.
46
53
 
47
- duration: Literal[5, 10]
48
- """The number of seconds of duration for the output video."""
54
+ This field is allowed for the following model variants: `gen4_turbo`,
55
+ `gen3a_turbo`
56
+ """
57
+
58
+ duration: Literal[5, 8, 10]
59
+ """The number of seconds of duration for the output video.
60
+
61
+ `veo3` requires a duration of 8. gen4_turbo, gen3a_turbo must specify a duration
62
+ of 5 or 10.
63
+ """
49
64
 
50
65
  prompt_text: Annotated[str, PropertyInfo(alias="promptText")]
51
66
  """A non-empty string up to 1000 characters (measured in UTF-16 code units).