@runwayml/sdk 3.20.0 → 3.21.0

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 (51) hide show
  1. package/CHANGELOG.md +25 -0
  2. package/client.d.mts.map +1 -1
  3. package/client.d.ts.map +1 -1
  4. package/client.js +11 -0
  5. package/client.js.map +1 -1
  6. package/client.mjs +11 -0
  7. package/client.mjs.map +1 -1
  8. package/internal/types.d.mts +6 -6
  9. package/internal/types.d.mts.map +1 -1
  10. package/internal/types.d.ts +6 -6
  11. package/internal/types.d.ts.map +1 -1
  12. package/internal/utils/log.d.mts.map +1 -1
  13. package/internal/utils/log.d.ts.map +1 -1
  14. package/internal/utils/log.js +2 -0
  15. package/internal/utils/log.js.map +1 -1
  16. package/internal/utils/log.mjs +2 -0
  17. package/internal/utils/log.mjs.map +1 -1
  18. package/package.json +1 -1
  19. package/resources/image-to-video.d.mts +41 -83
  20. package/resources/image-to-video.d.mts.map +1 -1
  21. package/resources/image-to-video.d.ts +41 -83
  22. package/resources/image-to-video.d.ts.map +1 -1
  23. package/resources/organization.d.mts +2 -2
  24. package/resources/organization.d.mts.map +1 -1
  25. package/resources/organization.d.ts +2 -2
  26. package/resources/organization.d.ts.map +1 -1
  27. package/resources/text-to-image.d.mts +89 -1
  28. package/resources/text-to-image.d.mts.map +1 -1
  29. package/resources/text-to-image.d.ts +89 -1
  30. package/resources/text-to-image.d.ts.map +1 -1
  31. package/resources/text-to-video.d.mts +1 -25
  32. package/resources/text-to-video.d.mts.map +1 -1
  33. package/resources/text-to-video.d.ts +1 -25
  34. package/resources/text-to-video.d.ts.map +1 -1
  35. package/resources/video-to-video.d.mts +46 -112
  36. package/resources/video-to-video.d.mts.map +1 -1
  37. package/resources/video-to-video.d.ts +46 -112
  38. package/resources/video-to-video.d.ts.map +1 -1
  39. package/src/client.ts +12 -0
  40. package/src/internal/types.ts +6 -8
  41. package/src/internal/utils/log.ts +2 -0
  42. package/src/resources/image-to-video.ts +48 -112
  43. package/src/resources/organization.ts +2 -0
  44. package/src/resources/text-to-image.ts +168 -0
  45. package/src/resources/text-to-video.ts +0 -43
  46. package/src/resources/video-to-video.ts +47 -149
  47. package/src/version.ts +1 -1
  48. package/version.d.mts +1 -1
  49. package/version.d.ts +1 -1
  50. package/version.js +1 -1
  51. package/version.mjs +1 -1
@@ -40,10 +40,9 @@ export interface ImageToVideoCreateResponse {
40
40
  export type ImageToVideoCreateParams =
41
41
  | ImageToVideoCreateParams.Gen4_5
42
42
  | ImageToVideoCreateParams.Gen4Turbo
43
- | ImageToVideoCreateParams.Gen3aTurbo
44
43
  | ImageToVideoCreateParams.Veo3_1
44
+ | ImageToVideoCreateParams.Gen3aTurbo
45
45
  | ImageToVideoCreateParams.Veo3_1Fast
46
- | ImageToVideoCreateParams.Seedance2
47
46
  | ImageToVideoCreateParams.Veo3;
48
47
 
49
48
  export declare namespace ImageToVideoCreateParams {
@@ -174,44 +173,39 @@ export declare namespace ImageToVideoCreateParams {
174
173
  }
175
174
  }
176
175
 
177
- export interface Gen3aTurbo {
178
- model: 'gen3a_turbo';
179
-
180
- /**
181
- * A HTTPS URL.
182
- */
183
- promptImage: string | Array<Gen3aTurbo.PromptImage>;
176
+ export interface Veo3_1 {
177
+ model: 'veo3.1';
184
178
 
185
179
  /**
186
- * A non-empty string up to 1000 characters (measured in UTF-16 code units). This
187
- * should describe in detail what should appear in the output.
180
+ * You may specify an image to use as the first frame of the output video, or an
181
+ * array with a first frame and optionally a last frame. This model does not
182
+ * support generating with only a last frame.
188
183
  */
189
- promptText: string;
184
+ promptImage: string | Array<Veo3_1.PromptImage>;
190
185
 
191
186
  /**
192
- * Settings that affect the behavior of the content moderation system.
187
+ * The resolution of the output video.
193
188
  */
194
- contentModeration?: Gen3aTurbo.ContentModeration;
189
+ ratio: '1280:720' | '720:1280' | '1080:1920' | '1920:1080';
195
190
 
196
191
  /**
197
- * The duration of the output video in seconds.
192
+ * Whether to generate audio for the video. Audio inclusion affects pricing.
198
193
  */
199
- duration?: 5 | 10;
194
+ audio?: boolean;
200
195
 
201
196
  /**
202
- * The resolution of the output video.
197
+ * The number of seconds of duration for the output video.
203
198
  */
204
- ratio?: '768:1280' | '1280:768';
199
+ duration?: 4 | 6 | 8;
205
200
 
206
201
  /**
207
- * If unspecified, a random number is chosen. Varying the seed integer is a way to
208
- * get different results for the same other request parameters. Using the same seed
209
- * integer for an identical request will produce similar results.
202
+ * A non-empty string up to 1000 characters (measured in UTF-16 code units). This
203
+ * should describe in detail what should appear in the output.
210
204
  */
211
- seed?: number;
205
+ promptText?: string;
212
206
  }
213
207
 
214
- export namespace Gen3aTurbo {
208
+ export namespace Veo3_1 {
215
209
  export interface PromptImage {
216
210
  /**
217
211
  * The position of the image in the output video. "first" will use the image as the
@@ -225,52 +219,46 @@ export declare namespace ImageToVideoCreateParams {
225
219
  */
226
220
  uri: string;
227
221
  }
222
+ }
223
+
224
+ export interface Gen3aTurbo {
225
+ model: 'gen3a_turbo';
228
226
 
229
227
  /**
230
- * Settings that affect the behavior of the content moderation system.
228
+ * A HTTPS URL.
231
229
  */
232
- export interface ContentModeration {
233
- /**
234
- * When set to `low`, the content moderation system will be less strict about
235
- * preventing generations that include recognizable public figures.
236
- */
237
- publicFigureThreshold?: 'auto' | 'low';
238
- }
239
- }
240
-
241
- export interface Veo3_1 {
242
- model: 'veo3.1';
230
+ promptImage: string | Array<Gen3aTurbo.PromptImage>;
243
231
 
244
232
  /**
245
- * You may specify an image to use as the first frame of the output video, or an
246
- * array with a first frame and optionally a last frame. This model does not
247
- * support generating with only a last frame.
233
+ * A non-empty string up to 1000 characters (measured in UTF-16 code units). This
234
+ * should describe in detail what should appear in the output.
248
235
  */
249
- promptImage: string | Array<Veo3_1.PromptImage>;
236
+ promptText: string;
250
237
 
251
238
  /**
252
- * The resolution of the output video.
239
+ * Settings that affect the behavior of the content moderation system.
253
240
  */
254
- ratio: '1280:720' | '720:1280' | '1080:1920' | '1920:1080';
241
+ contentModeration?: Gen3aTurbo.ContentModeration;
255
242
 
256
243
  /**
257
- * Whether to generate audio for the video. Audio inclusion affects pricing.
244
+ * The duration of the output video in seconds.
258
245
  */
259
- audio?: boolean;
246
+ duration?: 5 | 10;
260
247
 
261
248
  /**
262
- * The number of seconds of duration for the output video.
249
+ * The resolution of the output video.
263
250
  */
264
- duration?: 4 | 6 | 8;
251
+ ratio?: '768:1280' | '1280:768';
265
252
 
266
253
  /**
267
- * A non-empty string up to 1000 characters (measured in UTF-16 code units). This
268
- * should describe in detail what should appear in the output.
254
+ * If unspecified, a random number is chosen. Varying the seed integer is a way to
255
+ * get different results for the same other request parameters. Using the same seed
256
+ * integer for an identical request will produce similar results.
269
257
  */
270
- promptText?: string;
258
+ seed?: number;
271
259
  }
272
260
 
273
- export namespace Veo3_1 {
261
+ export namespace Gen3aTurbo {
274
262
  export interface PromptImage {
275
263
  /**
276
264
  * The position of the image in the output video. "first" will use the image as the
@@ -284,6 +272,17 @@ export declare namespace ImageToVideoCreateParams {
284
272
  */
285
273
  uri: string;
286
274
  }
275
+
276
+ /**
277
+ * Settings that affect the behavior of the content moderation system.
278
+ */
279
+ export interface ContentModeration {
280
+ /**
281
+ * When set to `low`, the content moderation system will be less strict about
282
+ * preventing generations that include recognizable public figures.
283
+ */
284
+ publicFigureThreshold?: 'auto' | 'low';
285
+ }
287
286
  }
288
287
 
289
288
  export interface Veo3_1Fast {
@@ -334,69 +333,6 @@ export declare namespace ImageToVideoCreateParams {
334
333
  }
335
334
  }
336
335
 
337
- export interface Seedance2 {
338
- model: 'seedance2';
339
-
340
- /**
341
- * An image or array of images. Use position `first`/`last` for keyframe mode, or
342
- * omit position for reference images. The two modes cannot be mixed.
343
- */
344
- promptImage: string | Array<Seedance2.PromptImage>;
345
-
346
- /**
347
- * Whether to generate audio for the video. Audio inclusion affects pricing.
348
- */
349
- audio?: boolean;
350
-
351
- /**
352
- * The number of seconds of duration for the output video.
353
- */
354
- duration?: number;
355
-
356
- /**
357
- * The number of video generations to produce.
358
- */
359
- outputCount?: number;
360
-
361
- /**
362
- * An optional text prompt up to 3500 characters (measured in UTF-16 code units).
363
- * This should describe in detail what should appear in the output.
364
- */
365
- promptText?: string;
366
-
367
- /**
368
- * The resolution of the output video.
369
- */
370
- ratio?:
371
- | '992:432'
372
- | '864:496'
373
- | '752:560'
374
- | '640:640'
375
- | '560:752'
376
- | '496:864'
377
- | '1470:630'
378
- | '1280:720'
379
- | '1112:834'
380
- | '960:960'
381
- | '834:1112'
382
- | '720:1280';
383
- }
384
-
385
- export namespace Seedance2 {
386
- export interface PromptImage {
387
- /**
388
- * A HTTPS URL.
389
- */
390
- uri: string;
391
-
392
- /**
393
- * The position of the image in the output video. "first" will use the image as the
394
- * first frame, "last" as the last frame. Omit for a reference image.
395
- */
396
- position?: 'first' | 'last';
397
- }
398
- }
399
-
400
336
  export interface Veo3 {
401
337
  /**
402
338
  * The number of seconds of duration for the output video.
@@ -106,6 +106,7 @@ export interface OrganizationRetrieveUsageResponse {
106
106
  | 'gen4_turbo'
107
107
  | 'gen4_image'
108
108
  | 'gen4_image_turbo'
109
+ | 'gpt_image_2'
109
110
  | 'act_two'
110
111
  | 'gen4_aleph'
111
112
  | 'veo3'
@@ -162,6 +163,7 @@ export namespace OrganizationRetrieveUsageResponse {
162
163
  | 'gen4_turbo'
163
164
  | 'gen4_image'
164
165
  | 'gen4_image_turbo'
166
+ | 'gpt_image_2'
165
167
  | 'act_two'
166
168
  | 'gen4_aleph'
167
169
  | 'veo3'
@@ -31,6 +31,8 @@ export interface TextToImageCreateResponse {
31
31
  export type TextToImageCreateParams =
32
32
  | TextToImageCreateParams.Gen4ImageTurbo
33
33
  | TextToImageCreateParams.Gen4Image
34
+ | TextToImageCreateParams.GptImage2
35
+ | TextToImageCreateParams.GeminiImage3Pro
34
36
  | TextToImageCreateParams.Gemini2_5Flash;
35
37
 
36
38
  export declare namespace TextToImageCreateParams {
@@ -184,6 +186,172 @@ export declare namespace TextToImageCreateParams {
184
186
  }
185
187
  }
186
188
 
189
+ export interface GptImage2 {
190
+ model: 'gpt_image_2';
191
+
192
+ /**
193
+ * A non-empty string up to 32,000 characters describing the desired image.
194
+ */
195
+ promptText: string;
196
+
197
+ /**
198
+ * The resolution of the output image, expressed as `<width>:<height>`. Use `auto`
199
+ * to let the model choose.
200
+ */
201
+ ratio:
202
+ | '2048:880'
203
+ | '1920:1088'
204
+ | '1920:1280'
205
+ | '1920:1440'
206
+ | '1920:1536'
207
+ | '1920:1920'
208
+ | '1536:1920'
209
+ | '1440:1920'
210
+ | '1280:1920'
211
+ | '1088:1920'
212
+ | '2912:1248'
213
+ | '2560:1440'
214
+ | '2560:1712'
215
+ | '2560:1920'
216
+ | '2560:2048'
217
+ | '2560:2560'
218
+ | '2048:2560'
219
+ | '1920:2560'
220
+ | '1712:2560'
221
+ | '1440:2560'
222
+ | '3840:1648'
223
+ | '3840:2160'
224
+ | '3504:2336'
225
+ | '3264:2448'
226
+ | '3200:2560'
227
+ | '2880:2880'
228
+ | '2560:3200'
229
+ | '2448:3264'
230
+ | '2336:3504'
231
+ | '2160:3840'
232
+ | 'auto';
233
+
234
+ /**
235
+ * Background treatment. Defaults to `auto`, which lets the model pick.
236
+ * `transparent` is not supported by this model.
237
+ */
238
+ background?: 'opaque' | 'auto';
239
+
240
+ /**
241
+ * The number of images to generate (1-10). Increasing this number will affect the
242
+ * number of credits consumed by the generation.
243
+ */
244
+ outputCount?: number;
245
+
246
+ /**
247
+ * Rendering quality. Higher qualities consume more credits. Defaults to `high`.
248
+ */
249
+ quality?: 'low' | 'medium' | 'high' | 'auto';
250
+
251
+ /**
252
+ * An array of up to 16 images to be used as references for the generated image
253
+ * output.
254
+ */
255
+ referenceImages?: Array<GptImage2.ReferenceImage>;
256
+ }
257
+
258
+ export namespace GptImage2 {
259
+ export interface ReferenceImage {
260
+ /**
261
+ * A HTTPS URL.
262
+ */
263
+ uri: string;
264
+
265
+ /**
266
+ * A tag to identify the reference image. This may be used to reference the image
267
+ * in prompt text.
268
+ */
269
+ tag?: string;
270
+ }
271
+ }
272
+
273
+ export interface GeminiImage3Pro {
274
+ model: 'gemini_image3_pro';
275
+
276
+ /**
277
+ * A non-empty string up to 5,500 characters (measured in UTF-16 code units). This
278
+ * should describe in detail what should appear in the output.
279
+ */
280
+ promptText: string;
281
+
282
+ /**
283
+ * The resolution of the output image.
284
+ */
285
+ ratio:
286
+ | '1344:768'
287
+ | '768:1344'
288
+ | '1024:1024'
289
+ | '1184:864'
290
+ | '864:1184'
291
+ | '1536:672'
292
+ | '832:1248'
293
+ | '1248:832'
294
+ | '896:1152'
295
+ | '1152:896'
296
+ | '2048:2048'
297
+ | '1696:2528'
298
+ | '2528:1696'
299
+ | '1792:2400'
300
+ | '2400:1792'
301
+ | '1856:2304'
302
+ | '2304:1856'
303
+ | '1536:2752'
304
+ | '2752:1536'
305
+ | '3168:1344'
306
+ | '4096:4096'
307
+ | '3392:5056'
308
+ | '5056:3392'
309
+ | '3584:4800'
310
+ | '4800:3584'
311
+ | '3712:4608'
312
+ | '4608:3712'
313
+ | '3072:5504'
314
+ | '5504:3072'
315
+ | '6336:2688';
316
+
317
+ /**
318
+ * The number of images to generate. Increasing this number will affect the number
319
+ * of credits consumed by the generation. Up to four images can be generated at
320
+ * once.
321
+ */
322
+ outputCount?: 1 | 4;
323
+
324
+ /**
325
+ * An array of up to 14 images to be used as references for the generated image
326
+ * output. Up to five of those images can pass `subject: "human"` to maintain
327
+ * character consistency, and up to nine of those images can pass
328
+ * `subject: "object"` with high-fidelity images of objects to include in the
329
+ * output.
330
+ */
331
+ referenceImages?: Array<GeminiImage3Pro.ReferenceImage>;
332
+ }
333
+
334
+ export namespace GeminiImage3Pro {
335
+ export interface ReferenceImage {
336
+ /**
337
+ * A HTTPS URL.
338
+ */
339
+ uri: string;
340
+
341
+ /**
342
+ * Whether this is a reference of a human subject (for character consistency) or an
343
+ * object that appears in the output.
344
+ */
345
+ subject?: 'object' | 'human';
346
+
347
+ /**
348
+ * A tag to identify the reference image. This is used to reference the image in
349
+ * prompt text.
350
+ */
351
+ tag?: string;
352
+ }
353
+ }
354
+
187
355
  export interface Gemini2_5Flash {
188
356
  model: 'gemini_2.5_flash';
189
357
 
@@ -32,7 +32,6 @@ export type TextToVideoCreateParams =
32
32
  | TextToVideoCreateParams.Gen4_5
33
33
  | TextToVideoCreateParams.Veo3_1
34
34
  | TextToVideoCreateParams.Veo3_1Fast
35
- | TextToVideoCreateParams.Seedance2
36
35
  | TextToVideoCreateParams.Veo3;
37
36
 
38
37
  export declare namespace TextToVideoCreateParams {
@@ -132,48 +131,6 @@ export declare namespace TextToVideoCreateParams {
132
131
  duration?: 4 | 6 | 8;
133
132
  }
134
133
 
135
- export interface Seedance2 {
136
- model: 'seedance2';
137
-
138
- /**
139
- * A non-empty string up to 3500 characters (measured in UTF-16 code units). This
140
- * should describe in detail what should appear in the output.
141
- */
142
- promptText: string;
143
-
144
- /**
145
- * Whether to generate audio for the video. Audio inclusion affects pricing.
146
- */
147
- audio?: boolean;
148
-
149
- /**
150
- * The number of seconds of duration for the output video.
151
- */
152
- duration?: number;
153
-
154
- /**
155
- * The number of video generations to produce.
156
- */
157
- outputCount?: number;
158
-
159
- /**
160
- * The resolution of the output video.
161
- */
162
- ratio?:
163
- | '992:432'
164
- | '864:496'
165
- | '752:560'
166
- | '640:640'
167
- | '560:752'
168
- | '496:864'
169
- | '1470:630'
170
- | '1280:720'
171
- | '1112:834'
172
- | '960:960'
173
- | '834:1112'
174
- | '720:1280';
175
- }
176
-
177
134
  export interface Veo3 {
178
135
  /**
179
136
  * The number of seconds of duration for the output video.