runwayml 3.0.3__py3-none-any.whl → 3.0.4__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/_version.py CHANGED
@@ -1,4 +1,4 @@
1
1
  # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
2
 
3
3
  __title__ = "runwayml"
4
- __version__ = "3.0.3" # x-release-please-version
4
+ __version__ = "3.0.4" # x-release-please-version
@@ -49,10 +49,9 @@ class ImageToVideoResource(SyncAPIResource):
49
49
  *,
50
50
  model: Literal["gen4_turbo", "gen3a_turbo"],
51
51
  prompt_image: Union[str, Iterable[image_to_video_create_params.PromptImagePromptImage]],
52
+ ratio: Literal["1280:720", "720:1280", "1104:832", "832:1104", "960:960", "1584:672", "1280:768", "768:1280"],
52
53
  duration: Literal[5, 10] | NotGiven = NOT_GIVEN,
53
54
  prompt_text: str | NotGiven = NOT_GIVEN,
54
- ratio: Literal["1280:720", "720:1280", "1104:832", "832:1104", "960:960", "1584:672", "1280:768", "768:1280"]
55
- | NotGiven = NOT_GIVEN,
56
55
  seed: int | NotGiven = NOT_GIVEN,
57
56
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
58
57
  # The extra values given here take precedence over values defined on the client or passed to this method.
@@ -71,11 +70,27 @@ class ImageToVideoResource(SyncAPIResource):
71
70
  frame of the generated video. See [our docs](/assets/inputs#images) on image
72
71
  inputs for more information.
73
72
 
74
- duration: The number of seconds of duration for the output video.
73
+ ratio: The resolution of the output video.
74
+
75
+ `gen4_turbo` supports the following values:
76
+
77
+ - `1280:720`
78
+ - `720:1280`
79
+ - `1104:832`
80
+ - `832:1104`
81
+ - `960:960`
82
+ - `1584:672`
83
+
84
+ `gen3a_turbo` supports the following values:
75
85
 
76
- prompt_text
86
+ - `1280:768`
87
+ - `768:1280`
77
88
 
78
- ratio
89
+ duration: The number of seconds of duration for the output video.
90
+
91
+ prompt_text: A non-empty string up to 1000 UTF-16 code points in length (that is,
92
+ `promptText.length === 1000` in JavaScript). This should describe in detail what
93
+ should appear in the output.
79
94
 
80
95
  seed: If unspecified, a random number is chosen. Varying the seed integer is a way to
81
96
  get different results for the same other request parameters. Using the same seed
@@ -95,9 +110,9 @@ class ImageToVideoResource(SyncAPIResource):
95
110
  {
96
111
  "model": model,
97
112
  "prompt_image": prompt_image,
113
+ "ratio": ratio,
98
114
  "duration": duration,
99
115
  "prompt_text": prompt_text,
100
- "ratio": ratio,
101
116
  "seed": seed,
102
117
  },
103
118
  image_to_video_create_params.ImageToVideoCreateParams,
@@ -134,10 +149,9 @@ class AsyncImageToVideoResource(AsyncAPIResource):
134
149
  *,
135
150
  model: Literal["gen4_turbo", "gen3a_turbo"],
136
151
  prompt_image: Union[str, Iterable[image_to_video_create_params.PromptImagePromptImage]],
152
+ ratio: Literal["1280:720", "720:1280", "1104:832", "832:1104", "960:960", "1584:672", "1280:768", "768:1280"],
137
153
  duration: Literal[5, 10] | NotGiven = NOT_GIVEN,
138
154
  prompt_text: str | NotGiven = NOT_GIVEN,
139
- ratio: Literal["1280:720", "720:1280", "1104:832", "832:1104", "960:960", "1584:672", "1280:768", "768:1280"]
140
- | NotGiven = NOT_GIVEN,
141
155
  seed: int | NotGiven = NOT_GIVEN,
142
156
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
143
157
  # The extra values given here take precedence over values defined on the client or passed to this method.
@@ -156,11 +170,27 @@ class AsyncImageToVideoResource(AsyncAPIResource):
156
170
  frame of the generated video. See [our docs](/assets/inputs#images) on image
157
171
  inputs for more information.
158
172
 
159
- duration: The number of seconds of duration for the output video.
173
+ ratio: The resolution of the output video.
174
+
175
+ `gen4_turbo` supports the following values:
176
+
177
+ - `1280:720`
178
+ - `720:1280`
179
+ - `1104:832`
180
+ - `832:1104`
181
+ - `960:960`
182
+ - `1584:672`
183
+
184
+ `gen3a_turbo` supports the following values:
160
185
 
161
- prompt_text
186
+ - `1280:768`
187
+ - `768:1280`
162
188
 
163
- ratio
189
+ duration: The number of seconds of duration for the output video.
190
+
191
+ prompt_text: A non-empty string up to 1000 UTF-16 code points in length (that is,
192
+ `promptText.length === 1000` in JavaScript). This should describe in detail what
193
+ should appear in the output.
164
194
 
165
195
  seed: If unspecified, a random number is chosen. Varying the seed integer is a way to
166
196
  get different results for the same other request parameters. Using the same seed
@@ -180,9 +210,9 @@ class AsyncImageToVideoResource(AsyncAPIResource):
180
210
  {
181
211
  "model": model,
182
212
  "prompt_image": prompt_image,
213
+ "ratio": ratio,
183
214
  "duration": duration,
184
215
  "prompt_text": prompt_text,
185
- "ratio": ratio,
186
216
  "seed": seed,
187
217
  },
188
218
  image_to_video_create_params.ImageToVideoCreateParams,
@@ -21,12 +21,35 @@ class ImageToVideoCreateParams(TypedDict, total=False):
21
21
  inputs for more information.
22
22
  """
23
23
 
24
+ ratio: Required[
25
+ Literal["1280:720", "720:1280", "1104:832", "832:1104", "960:960", "1584:672", "1280:768", "768:1280"]
26
+ ]
27
+ """The resolution of the output video.
28
+
29
+ `gen4_turbo` supports the following values:
30
+
31
+ - `1280:720`
32
+ - `720:1280`
33
+ - `1104:832`
34
+ - `832:1104`
35
+ - `960:960`
36
+ - `1584:672`
37
+
38
+ `gen3a_turbo` supports the following values:
39
+
40
+ - `1280:768`
41
+ - `768:1280`
42
+ """
43
+
24
44
  duration: Literal[5, 10]
25
45
  """The number of seconds of duration for the output video."""
26
46
 
27
47
  prompt_text: Annotated[str, PropertyInfo(alias="promptText")]
28
-
29
- ratio: Literal["1280:720", "720:1280", "1104:832", "832:1104", "960:960", "1584:672", "1280:768", "768:1280"]
48
+ """
49
+ A non-empty string up to 1000 UTF-16 code points in length (that is,
50
+ `promptText.length === 1000` in JavaScript). This should describe in detail what
51
+ should appear in the output.
52
+ """
30
53
 
31
54
  seed: int
32
55
  """If unspecified, a random number is chosen.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: runwayml
3
- Version: 3.0.3
3
+ Version: 3.0.4
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
@@ -65,6 +65,7 @@ client = RunwayML(
65
65
  image_to_video = client.image_to_video.create(
66
66
  model="gen4_turbo",
67
67
  prompt_image="https://example.com/assets/bunny.jpg",
68
+ ratio="1280:720",
68
69
  prompt_text="The bunny is eating a carrot",
69
70
  )
70
71
  print(image_to_video.id)
@@ -93,6 +94,7 @@ async def main() -> None:
93
94
  image_to_video = await client.image_to_video.create(
94
95
  model="gen4_turbo",
95
96
  prompt_image="https://example.com/assets/bunny.jpg",
97
+ ratio="1280:720",
96
98
  prompt_text="The bunny is eating a carrot",
97
99
  )
98
100
  print(image_to_video.id)
@@ -131,6 +133,7 @@ try:
131
133
  client.image_to_video.create(
132
134
  model="gen4_turbo",
133
135
  prompt_image="https://example.com/assets/bunny.jpg",
136
+ ratio="1280:720",
134
137
  prompt_text="The bunny is eating a carrot",
135
138
  )
136
139
  except runwayml.APIConnectionError as e:
@@ -178,6 +181,7 @@ client = RunwayML(
178
181
  client.with_options(max_retries=5).image_to_video.create(
179
182
  model="gen4_turbo",
180
183
  prompt_image="https://example.com/assets/bunny.jpg",
184
+ ratio="1280:720",
181
185
  prompt_text="The bunny is eating a carrot",
182
186
  )
183
187
  ```
@@ -205,6 +209,7 @@ client = RunwayML(
205
209
  client.with_options(timeout=5.0).image_to_video.create(
206
210
  model="gen4_turbo",
207
211
  prompt_image="https://example.com/assets/bunny.jpg",
212
+ ratio="1280:720",
208
213
  prompt_text="The bunny is eating a carrot",
209
214
  )
210
215
  ```
@@ -250,6 +255,7 @@ client = RunwayML()
250
255
  response = client.image_to_video.with_raw_response.create(
251
256
  model="gen4_turbo",
252
257
  prompt_image="https://example.com/assets/bunny.jpg",
258
+ ratio="1280:720",
253
259
  prompt_text="The bunny is eating a carrot",
254
260
  )
255
261
  print(response.headers.get('X-My-Header'))
@@ -272,6 +278,7 @@ To stream the response body, use `.with_streaming_response` instead, which requi
272
278
  with client.image_to_video.with_streaming_response.create(
273
279
  model="gen4_turbo",
274
280
  prompt_image="https://example.com/assets/bunny.jpg",
281
+ ratio="1280:720",
275
282
  prompt_text="The bunny is eating a carrot",
276
283
  ) as response:
277
284
  print(response.headers.get("X-My-Header"))
@@ -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=oHct1QQY_lI8bepCgfWDZm2N5VNi0e6o1iLeiTh4Y_0,6145
14
- runwayml/_version.py,sha256=pGXM62kJDoRlS4DF-R0nEBEHwvLS7qbmigH11wCxE_c,160
14
+ runwayml/_version.py,sha256=I7DDYKHiDZ1-sTsDqu6oLn4iFOzIOQRbwfX5CIDPRz0,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,15 +24,15 @@ runwayml/_utils/_typing.py,sha256=D0DbbNu8GnYQTSICnTSHDGsYXj8TcAKyhejb0XcnjtY,46
24
24
  runwayml/_utils/_utils.py,sha256=ts4CiiuNpFiGB6YMdkQRh2SZvYvsl7mAF-JWHCcLDf4,12312
25
25
  runwayml/lib/.keep,sha256=wuNrz-5SXo3jJaJOJgz4vFHM41YH_g20F5cRQo0vLes,224
26
26
  runwayml/resources/__init__.py,sha256=SqcC1MLwxPaz2c7gRRBlOn9-2pDPMKTXD2gFbG5FJ2E,1597
27
- runwayml/resources/image_to_video.py,sha256=tyYdfxytBufHIP-iOq24SfjZ5uqdIOxS9n7Q2qJfDHE,9128
27
+ runwayml/resources/image_to_video.py,sha256=n3xb3sm4qJK_yQlWK8dTF2BetoC6gA5p2V7jcuWy6Ik,10228
28
28
  runwayml/resources/organization.py,sha256=XBg5nhkycPU3rllRvf9aaeHuZNtzGDKHlLPrPqDCAsw,5419
29
29
  runwayml/resources/tasks.py,sha256=-VT3qetYcaqn4FskekxhN_fCTozMl1GqxGpGwxV8M60,9673
30
30
  runwayml/types/__init__.py,sha256=xfq4RirwNpSBy5xXra7CB8wa0029vKUH0DB6Zg02hFs,505
31
- runwayml/types/image_to_video_create_params.py,sha256=VNWGDEdqkhp-Br-19t8YYfaYMaXxHEmADwXZ1CUC4So,1882
31
+ runwayml/types/image_to_video_create_params.py,sha256=EtTTZJ4rWEcEknqRxFYDWtP3Zxox-_36NBj3fRGdP7o,2400
32
32
  runwayml/types/image_to_video_create_response.py,sha256=WvZHbZxxJz8KerRNogzb1RYBrxa1x0iCPDi9-LCpHyE,345
33
33
  runwayml/types/organization_retrieve_response.py,sha256=DV46yEIRjmL05uISc2-PpM5BGWu8gniA9TQ056abWLA,2721
34
34
  runwayml/types/task_retrieve_response.py,sha256=v8y2bLxsW6srzScW-B3Akv72q_PI_NQmduGrGRQMHds,2139
35
- runwayml-3.0.3.dist-info/METADATA,sha256=o1N-tQ-cwDdAQCLdVZsiOOb3PkzqdiMkiEr91tHzNnY,13516
36
- runwayml-3.0.3.dist-info/WHEEL,sha256=C2FUgwZgiLbznR-k0b_5k3Ai_1aASOXDss3lzCUsUug,87
37
- runwayml-3.0.3.dist-info/licenses/LICENSE,sha256=baeFj6izBWIm6A5_7N3-WAsy_VYpDF05Dd4zS1zsfZI,11338
38
- runwayml-3.0.3.dist-info/RECORD,,
35
+ runwayml-3.0.4.dist-info/METADATA,sha256=llLabRfzpWOknEB_54TUcpQyjFFAk5Pvowxwp4hUGBc,13678
36
+ runwayml-3.0.4.dist-info/WHEEL,sha256=C2FUgwZgiLbznR-k0b_5k3Ai_1aASOXDss3lzCUsUug,87
37
+ runwayml-3.0.4.dist-info/licenses/LICENSE,sha256=baeFj6izBWIm6A5_7N3-WAsy_VYpDF05Dd4zS1zsfZI,11338
38
+ runwayml-3.0.4.dist-info/RECORD,,