@runwayml/sdk 3.21.1 → 3.22.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 (49) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/client.d.mts +6 -0
  3. package/client.d.mts.map +1 -1
  4. package/client.d.ts +6 -0
  5. package/client.d.ts.map +1 -1
  6. package/client.js +6 -0
  7. package/client.js.map +1 -1
  8. package/client.mjs +6 -0
  9. package/client.mjs.map +1 -1
  10. package/package.json +1 -1
  11. package/resources/image-upscale.d.mts +62 -0
  12. package/resources/image-upscale.d.mts.map +1 -0
  13. package/resources/image-upscale.d.ts +62 -0
  14. package/resources/image-upscale.d.ts.map +1 -0
  15. package/resources/image-upscale.js +30 -0
  16. package/resources/image-upscale.js.map +1 -0
  17. package/resources/image-upscale.mjs +26 -0
  18. package/resources/image-upscale.mjs.map +1 -0
  19. package/resources/index.d.mts +1 -0
  20. package/resources/index.d.mts.map +1 -1
  21. package/resources/index.d.ts +1 -0
  22. package/resources/index.d.ts.map +1 -1
  23. package/resources/index.js +3 -1
  24. package/resources/index.js.map +1 -1
  25. package/resources/index.mjs +1 -0
  26. package/resources/index.mjs.map +1 -1
  27. package/resources/organization.d.mts +2 -2
  28. package/resources/organization.d.mts.map +1 -1
  29. package/resources/organization.d.ts +2 -2
  30. package/resources/organization.d.ts.map +1 -1
  31. package/resources/text-to-image.d.mts +45 -1
  32. package/resources/text-to-image.d.mts.map +1 -1
  33. package/resources/text-to-image.d.ts +45 -1
  34. package/resources/text-to-image.d.ts.map +1 -1
  35. package/resources/video-to-video.d.mts +143 -46
  36. package/resources/video-to-video.d.mts.map +1 -1
  37. package/resources/video-to-video.d.ts +143 -46
  38. package/resources/video-to-video.d.ts.map +1 -1
  39. package/src/client.ts +16 -0
  40. package/src/resources/image-upscale.ts +83 -0
  41. package/src/resources/index.ts +5 -0
  42. package/src/resources/organization.ts +21 -1
  43. package/src/resources/text-to-image.ts +109 -0
  44. package/src/resources/video-to-video.ts +171 -47
  45. package/src/version.ts +1 -1
  46. package/version.d.mts +1 -1
  47. package/version.d.ts +1 -1
  48. package/version.js +1 -1
  49. package/version.mjs +1 -1
@@ -25,59 +25,156 @@ export interface VideoToVideoCreateResponse {
25
25
  */
26
26
  id: string;
27
27
  }
28
- export interface VideoToVideoCreateParams {
29
- model: 'gen4_aleph';
30
- /**
31
- * A non-empty string up to 1000 characters (measured in UTF-16 code units). This
32
- * should describe in detail what should appear in the output.
33
- */
34
- promptText: string;
35
- /**
36
- * A HTTPS URL.
37
- */
38
- videoUri: string;
39
- /**
40
- * Settings that affect the behavior of the content moderation system.
41
- */
42
- contentModeration?: VideoToVideoCreateParams.ContentModeration;
43
- /**
44
- * @deprecated Deprecated. This field is ignored. The resolution of the output
45
- * video is determined by the input video.
46
- */
47
- ratio?: '1280:720' | '720:1280' | '1104:832' | '960:960' | '832:1104' | '1584:672' | '848:480' | '640:480';
48
- /**
49
- * An array of references. Currently up to one reference is supported. See
50
- * [our docs](/assets/inputs#images) on image inputs for more information.
51
- */
52
- references?: Array<VideoToVideoCreateParams.Reference>;
53
- /**
54
- * If unspecified, a random number is chosen. Varying the seed integer is a way to
55
- * get different results for the same other request parameters. Using the same seed
56
- * integer for an identical request will produce similar results.
57
- */
58
- seed?: number;
59
- }
28
+ export type VideoToVideoCreateParams = VideoToVideoCreateParams.Gen4Aleph | VideoToVideoCreateParams.Aleph2;
60
29
  export declare namespace VideoToVideoCreateParams {
61
- /**
62
- * Settings that affect the behavior of the content moderation system.
63
- */
64
- interface ContentModeration {
30
+ interface Gen4Aleph {
31
+ model: 'gen4_aleph';
32
+ /**
33
+ * A non-empty string up to 1000 characters (measured in UTF-16 code units). This
34
+ * should describe in detail what should appear in the output.
35
+ */
36
+ promptText: string;
37
+ /**
38
+ * A HTTPS URL.
39
+ */
40
+ videoUri: string;
41
+ /**
42
+ * Settings that affect the behavior of the content moderation system.
43
+ */
44
+ contentModeration?: Gen4Aleph.ContentModeration;
45
+ /**
46
+ * @deprecated Deprecated. This field is ignored. The resolution of the output
47
+ * video is determined by the input video.
48
+ */
49
+ ratio?: '1280:720' | '720:1280' | '1104:832' | '960:960' | '832:1104' | '1584:672' | '848:480' | '640:480';
50
+ /**
51
+ * An array of references. Currently up to one reference is supported. See
52
+ * [our docs](/assets/inputs#images) on image inputs for more information.
53
+ */
54
+ references?: Array<Gen4Aleph.Reference>;
65
55
  /**
66
- * When set to `low`, the content moderation system will be less strict about
67
- * preventing generations that include recognizable public figures.
56
+ * If unspecified, a random number is chosen. Varying the seed integer is a way to
57
+ * get different results for the same other request parameters. Using the same seed
58
+ * integer for an identical request will produce similar results.
68
59
  */
69
- publicFigureThreshold?: 'auto' | 'low';
60
+ seed?: number;
70
61
  }
71
- /**
72
- * Passing an image reference allows the model to emulate the style or content of
73
- * the reference in the output.
74
- */
75
- interface Reference {
76
- type: 'image';
62
+ namespace Gen4Aleph {
63
+ /**
64
+ * Settings that affect the behavior of the content moderation system.
65
+ */
66
+ interface ContentModeration {
67
+ /**
68
+ * When set to `low`, the content moderation system will be less strict about
69
+ * preventing generations that include recognizable public figures.
70
+ */
71
+ publicFigureThreshold?: 'auto' | 'low';
72
+ }
73
+ /**
74
+ * Passing an image reference allows the model to emulate the style or content of
75
+ * the reference in the output.
76
+ */
77
+ interface Reference {
78
+ type: 'image';
79
+ /**
80
+ * A HTTPS URL.
81
+ */
82
+ uri: string;
83
+ }
84
+ }
85
+ interface Aleph2 {
86
+ model: 'aleph2';
87
+ /**
88
+ * A non-empty string up to 1000 characters describing what should appear in the
89
+ * output.
90
+ */
91
+ promptText: string;
77
92
  /**
78
93
  * A HTTPS URL.
79
94
  */
80
- uri: string;
95
+ videoUri: string;
96
+ /**
97
+ * Settings that affect the behavior of the content moderation system.
98
+ */
99
+ contentModeration?: Aleph2.ContentModeration;
100
+ /**
101
+ * Timed guidance images placed at specific points in the input video. Up to 5
102
+ * keyframes.
103
+ */
104
+ keyframes?: Array<Aleph2.UnionMember0 | Aleph2.UnionMember1>;
105
+ /**
106
+ * A list of up to 5 image keyframes for guiding the edit at specific points in the
107
+ * video.
108
+ */
109
+ promptImage?: Array<Aleph2.PromptImage>;
110
+ /**
111
+ * If unspecified, a random number is chosen. Varying the seed integer is a way to
112
+ * get different results for the same other request parameters. Using the same seed
113
+ * integer for an identical request will produce similar results.
114
+ */
115
+ seed?: number;
116
+ }
117
+ namespace Aleph2 {
118
+ /**
119
+ * Settings that affect the behavior of the content moderation system.
120
+ */
121
+ interface ContentModeration {
122
+ /**
123
+ * When set to `low`, the content moderation system will be less strict about
124
+ * preventing generations that include recognizable public figures.
125
+ */
126
+ publicFigureThreshold?: 'auto' | 'low';
127
+ }
128
+ interface UnionMember0 {
129
+ /**
130
+ * Absolute timestamp in seconds from the start of the input video when this
131
+ * guidance image should apply.
132
+ */
133
+ seconds: number;
134
+ /**
135
+ * A HTTPS URL.
136
+ */
137
+ uri: string;
138
+ }
139
+ interface UnionMember1 {
140
+ /**
141
+ * Position as a fraction [0.0, 1.0] of the input video duration when this guidance
142
+ * image should apply.
143
+ */
144
+ at: number;
145
+ /**
146
+ * A HTTPS URL.
147
+ */
148
+ uri: string;
149
+ }
150
+ interface PromptImage {
151
+ /**
152
+ * - `first` - Places the image at the start of the output video (timestamp 0).
153
+ * - `last` - Places the image at the end of the output video (timestamp =
154
+ * duration).
155
+ */
156
+ position: 'first' | 'last' | PromptImage.TimestampPosition | PromptImage.RelativePosition;
157
+ /**
158
+ * A HTTPS URL.
159
+ */
160
+ uri: string;
161
+ }
162
+ namespace PromptImage {
163
+ interface TimestampPosition {
164
+ /**
165
+ * Absolute timestamp in seconds from the start of the output video.
166
+ */
167
+ timestampSeconds: number;
168
+ type: 'timestamp';
169
+ }
170
+ interface RelativePosition {
171
+ /**
172
+ * Position as a fraction [0.0, 1.0] of the total video duration.
173
+ */
174
+ positionPercentage: number;
175
+ type: 'position';
176
+ }
177
+ }
81
178
  }
82
179
  }
83
180
  export declare namespace VideoToVideo {
@@ -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zB,IAAI,EAAE,WAAW,CAAC;aACnB;YAED,UAAiB,gBAAgB;gBAC/B;;mBAEG;gBACH,kBAAkB,EAAE,MAAM,CAAC;gBAE3B,IAAI,EAAE,UAAU,CAAC;aAClB;SACF;KACF;CACF;AAED,MAAM,CAAC,OAAO,WAAW,YAAY,CAAC;IACpC,OAAO,EACL,KAAK,0BAA0B,IAAI,0BAA0B,EAC7D,KAAK,wBAAwB,IAAI,wBAAwB,GAC1D,CAAC;CACH"}
package/src/client.ts CHANGED
@@ -51,6 +51,11 @@ import {
51
51
  ImageToVideoCreateParams,
52
52
  ImageToVideoCreateResponse,
53
53
  } from './resources/image-to-video';
54
+ import {
55
+ ImageUpscale,
56
+ ImageUpscaleCreateParams,
57
+ ImageUpscaleCreateResponse,
58
+ } from './resources/image-upscale';
54
59
  import {
55
60
  Organization,
56
61
  OrganizationRetrieveResponse,
@@ -908,6 +913,10 @@ export class RunwayML {
908
913
  * These endpoints all kick off tasks to create generations.
909
914
  */
910
915
  speechToSpeech: API.SpeechToSpeech = new API.SpeechToSpeech(this);
916
+ /**
917
+ * These endpoints all kick off tasks to create generations.
918
+ */
919
+ imageUpscale: API.ImageUpscale = new API.ImageUpscale(this);
911
920
  organization: API.Organization = new API.Organization(this);
912
921
  avatars: API.Avatars = new API.Avatars(this);
913
922
  avatarVideos: API.AvatarVideos = new API.AvatarVideos(this);
@@ -930,6 +939,7 @@ RunwayML.SoundEffect = SoundEffect;
930
939
  RunwayML.VoiceIsolation = VoiceIsolation;
931
940
  RunwayML.VoiceDubbing = VoiceDubbing;
932
941
  RunwayML.SpeechToSpeech = SpeechToSpeech;
942
+ RunwayML.ImageUpscale = ImageUpscale;
933
943
  RunwayML.Organization = Organization;
934
944
  RunwayML.Avatars = Avatars;
935
945
  RunwayML.AvatarVideos = AvatarVideos;
@@ -1008,6 +1018,12 @@ export declare namespace RunwayML {
1008
1018
  type SpeechToSpeechCreateParams as SpeechToSpeechCreateParams,
1009
1019
  };
1010
1020
 
1021
+ export {
1022
+ ImageUpscale as ImageUpscale,
1023
+ type ImageUpscaleCreateResponse as ImageUpscaleCreateResponse,
1024
+ type ImageUpscaleCreateParams as ImageUpscaleCreateParams,
1025
+ };
1026
+
1011
1027
  export {
1012
1028
  Organization as Organization,
1013
1029
  type OrganizationRetrieveResponse as OrganizationRetrieveResponse,
@@ -0,0 +1,83 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ import { APIResource } from '../core/resource';
4
+ import { RequestOptions } from '../internal/request-options';
5
+ import { APIPromiseWithAwaitableTask, wrapAsWaitableResource } from '../lib/polling';
6
+
7
+ /**
8
+ * These endpoints all kick off tasks to create generations.
9
+ */
10
+ export class ImageUpscale extends APIResource {
11
+ /**
12
+ * Upscale an image with Magnific precision upscaling. Each input dimension must be
13
+ * between 300px and 8000px. Output width and height are the input dimensions
14
+ * multiplied by `scaleFactor` (default 2). Output width times height cannot exceed
15
+ * 25,300,000 pixels (~25.3 million).
16
+ *
17
+ * @example
18
+ * ```ts
19
+ * const imageUpscale = await client.imageUpscale.create({
20
+ * imageUri: 'https://example.com/image.jpg',
21
+ * model: 'magnific_precision_upscaler_v2',
22
+ * });
23
+ * ```
24
+ */
25
+ create(
26
+ body: ImageUpscaleCreateParams,
27
+ options?: RequestOptions,
28
+ ): APIPromiseWithAwaitableTask<ImageUpscaleCreateResponse> {
29
+ return wrapAsWaitableResource<ImageUpscaleCreateResponse>(this._client)(
30
+ this._client.post('/v1/image_upscale', { body, ...options }),
31
+ );
32
+ }
33
+ }
34
+
35
+ export interface ImageUpscaleCreateResponse {
36
+ /**
37
+ * The ID of the task that was created. Use this to retrieve the task later.
38
+ */
39
+ id: string;
40
+ }
41
+
42
+ export interface ImageUpscaleCreateParams {
43
+ /**
44
+ * A HTTPS URL.
45
+ */
46
+ imageUri: string;
47
+
48
+ model: 'magnific_precision_upscaler_v2';
49
+
50
+ /**
51
+ * Optimization preset: `sublime` (illustration), `photo` (photographic), or
52
+ * `photo_denoiser` (noisy photos).
53
+ */
54
+ flavor?: 'sublime' | 'photo' | 'photo_denoiser';
55
+
56
+ /**
57
+ * Multiplies each input dimension to produce output width and height. Defaults
58
+ * to 2.
59
+ */
60
+ scaleFactor?: 2 | 4 | 8 | 16;
61
+
62
+ /**
63
+ * Sharpness intensity from 0 (none) to 100.
64
+ */
65
+ sharpen?: number;
66
+
67
+ /**
68
+ * Grain and texture enhancement from 0 to 100.
69
+ */
70
+ smartGrain?: number;
71
+
72
+ /**
73
+ * Fine detail enhancement from 0 to 100.
74
+ */
75
+ ultraDetail?: number;
76
+ }
77
+
78
+ export declare namespace ImageUpscale {
79
+ export {
80
+ type ImageUpscaleCreateResponse as ImageUpscaleCreateResponse,
81
+ type ImageUpscaleCreateParams as ImageUpscaleCreateParams,
82
+ };
83
+ }
@@ -32,6 +32,11 @@ export {
32
32
  type ImageToVideoCreateResponse,
33
33
  type ImageToVideoCreateParams,
34
34
  } from './image-to-video';
35
+ export {
36
+ ImageUpscale,
37
+ type ImageUpscaleCreateResponse,
38
+ type ImageUpscaleCreateParams,
39
+ } from './image-upscale';
35
40
  export {
36
41
  Organization,
37
42
  type OrganizationRetrieveResponse,
@@ -127,6 +127,16 @@ export interface OrganizationRetrieveUsageResponse {
127
127
  | 'gwm1_avatar_async_text_to_video'
128
128
  | 'voice_processing'
129
129
  | 'seedance2'
130
+ | 'magnific_precision_upscaler_v2'
131
+ | 'kling2.5_turbo_pro'
132
+ | 'kling3.0_pro'
133
+ | 'kling3.0_4k'
134
+ | 'kling3.0_standard'
135
+ | 'klingO3_pro'
136
+ | 'klingO3_standard'
137
+ | 'klingO3_4k'
138
+ | 'happyhorse_1_0'
139
+ | 'aleph2'
130
140
  >;
131
141
 
132
142
  results: Array<OrganizationRetrieveUsageResponse.Result>;
@@ -183,7 +193,17 @@ export namespace OrganizationRetrieveUsageResponse {
183
193
  | 'gwm1_avatar_async_audio_to_video'
184
194
  | 'gwm1_avatar_async_text_to_video'
185
195
  | 'voice_processing'
186
- | 'seedance2';
196
+ | 'seedance2'
197
+ | 'magnific_precision_upscaler_v2'
198
+ | 'kling2.5_turbo_pro'
199
+ | 'kling3.0_pro'
200
+ | 'kling3.0_4k'
201
+ | 'kling3.0_standard'
202
+ | 'klingO3_pro'
203
+ | 'klingO3_standard'
204
+ | 'klingO3_4k'
205
+ | 'happyhorse_1_0'
206
+ | 'aleph2';
187
207
  }
188
208
  }
189
209
  }
@@ -33,6 +33,7 @@ export type TextToImageCreateParams =
33
33
  | TextToImageCreateParams.Gen4Image
34
34
  | TextToImageCreateParams.GptImage2
35
35
  | TextToImageCreateParams.GeminiImage3Pro
36
+ | TextToImageCreateParams.GeminiImage3_1Flash
36
37
  | TextToImageCreateParams.Gemini2_5Flash;
37
38
 
38
39
  export declare namespace TextToImageCreateParams {
@@ -352,6 +353,114 @@ export declare namespace TextToImageCreateParams {
352
353
  }
353
354
  }
354
355
 
356
+ export interface GeminiImage3_1Flash {
357
+ model: 'gemini_image3.1_flash';
358
+
359
+ /**
360
+ * A non-empty string up to 1000 characters (measured in UTF-16 code units). This
361
+ * should describe in detail what should appear in the output.
362
+ */
363
+ promptText: string;
364
+
365
+ /**
366
+ * The resolution of the output image.
367
+ */
368
+ ratio:
369
+ | '512:512'
370
+ | '416:624'
371
+ | '624:416'
372
+ | '432:592'
373
+ | '592:432'
374
+ | '448:576'
375
+ | '576:448'
376
+ | '384:672'
377
+ | '672:384'
378
+ | '768:336'
379
+ | '256:1024'
380
+ | '1024:256'
381
+ | '176:1408'
382
+ | '1408:176'
383
+ | '1024:1024'
384
+ | '832:1248'
385
+ | '1248:832'
386
+ | '864:1184'
387
+ | '1184:864'
388
+ | '896:1152'
389
+ | '1152:896'
390
+ | '768:1344'
391
+ | '1344:768'
392
+ | '1536:672'
393
+ | '512:2048'
394
+ | '2048:512'
395
+ | '352:2816'
396
+ | '2816:352'
397
+ | '2048:2048'
398
+ | '1696:2528'
399
+ | '2528:1696'
400
+ | '1792:2400'
401
+ | '2400:1792'
402
+ | '1856:2304'
403
+ | '2304:1856'
404
+ | '1536:2752'
405
+ | '2752:1536'
406
+ | '3168:1344'
407
+ | '1024:4096'
408
+ | '4096:1024'
409
+ | '704:5632'
410
+ | '5632:704'
411
+ | '4096:4096'
412
+ | '3392:5056'
413
+ | '5056:3392'
414
+ | '3584:4800'
415
+ | '4800:3584'
416
+ | '3712:4608'
417
+ | '4608:3712'
418
+ | '3072:5504'
419
+ | '5504:3072'
420
+ | '6336:2688'
421
+ | '2048:8192'
422
+ | '8192:2048'
423
+ | '1408:11264'
424
+ | '11264:1408';
425
+
426
+ /**
427
+ * The number of images to generate. Increasing this number will affect the number
428
+ * of credits consumed by the generation. Up to four images can be generated at
429
+ * once.
430
+ */
431
+ outputCount?: 1 | 4;
432
+
433
+ /**
434
+ * An array of up to 14 images to be used as references for the generated image
435
+ * output. Up to five of those images can pass `subject: "human"` to maintain
436
+ * character consistency, and up to nine of those images can pass
437
+ * `subject: "object"` with high-fidelity images of objects to include in the
438
+ * output.
439
+ */
440
+ referenceImages?: Array<GeminiImage3_1Flash.ReferenceImage>;
441
+ }
442
+
443
+ export namespace GeminiImage3_1Flash {
444
+ export interface ReferenceImage {
445
+ /**
446
+ * A HTTPS URL.
447
+ */
448
+ uri: string;
449
+
450
+ /**
451
+ * Whether this is a reference of a human subject (for character consistency) or an
452
+ * object that appears in the output.
453
+ */
454
+ subject?: 'object' | 'human';
455
+
456
+ /**
457
+ * A tag to identify the reference image. This is used to reference the image in
458
+ * prompt text.
459
+ */
460
+ tag?: string;
461
+ }
462
+ }
463
+
355
464
  export interface Gemini2_5Flash {
356
465
  model: 'gemini_2.5_flash';
357
466