@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
@@ -1 +1 @@
1
- {"version":3,"file":"text-to-image.d.ts","sourceRoot":"","sources":["../src/resources/text-to-image.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,cAAc,EAAE;OAClB,EAAE,2BAA2B,EAA0B;AAE9D;;GAEG;AACH,qBAAa,WAAY,SAAQ,WAAW;IAC1C;;OAEG;IACH,MAAM,CACJ,IAAI,EAAE,uBAAuB,EAC7B,OAAO,CAAC,EAAE,cAAc,GACvB,2BAA2B,CAAC,yBAAyB,CAAC;CAK1D;AAED,MAAM,WAAW,yBAAyB;IACxC;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;CACZ;AAED,MAAM,MAAM,uBAAuB,GAC/B,uBAAuB,CAAC,cAAc,GACtC,uBAAuB,CAAC,SAAS,GACjC,uBAAuB,CAAC,cAAc,CAAC;AAE3C,MAAM,CAAC,OAAO,WAAW,uBAAuB,CAAC;IAC/C,UAAiB,cAAc;QAC7B,KAAK,EAAE,kBAAkB,CAAC;QAE1B;;;WAGG;QACH,UAAU,EAAE,MAAM,CAAC;QAEnB;;WAEG;QACH,KAAK,EACD,WAAW,GACX,WAAW,GACX,UAAU,GACV,UAAU,GACV,WAAW,GACX,WAAW,GACX,UAAU,GACV,WAAW,GACX,WAAW,GACX,UAAU,GACV,UAAU,GACV,UAAU,GACV,SAAS,GACT,SAAS,GACT,SAAS,GACT,UAAU,CAAC;QAEf;;;WAGG;QACH,eAAe,EAAE,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC,CAAC;QAEtD;;WAEG;QACH,iBAAiB,CAAC,EAAE,cAAc,CAAC,iBAAiB,CAAC;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,UAAU,GACV,UAAU,GACV,UAAU,GACV,UAAU,GACV,UAAU,CAAC;QAEf;;;WAGG;QACH,eAAe,CAAC,EAAE,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC,CAAC;KACxD;IAED,UAAiB,cAAc,CAAC;QAC9B,UAAiB,cAAc;YAC7B;;eAEG;YACH,GAAG,EAAE,MAAM,CAAC;YAEZ;;;eAGG;YACH,GAAG,CAAC,EAAE,MAAM,CAAC;SACd;KACF;CACF;AAED,MAAM,CAAC,OAAO,WAAW,WAAW,CAAC;IACnC,OAAO,EACL,KAAK,yBAAyB,IAAI,yBAAyB,EAC3D,KAAK,uBAAuB,IAAI,uBAAuB,GACxD,CAAC;CACH"}
1
+ {"version":3,"file":"text-to-image.d.ts","sourceRoot":"","sources":["../src/resources/text-to-image.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,cAAc,EAAE;OAClB,EAAE,2BAA2B,EAA0B;AAE9D;;GAEG;AACH,qBAAa,WAAY,SAAQ,WAAW;IAC1C;;OAEG;IACH,MAAM,CACJ,IAAI,EAAE,uBAAuB,EAC7B,OAAO,CAAC,EAAE,cAAc,GACvB,2BAA2B,CAAC,yBAAyB,CAAC;CAK1D;AAED,MAAM,WAAW,yBAAyB;IACxC;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;CACZ;AAED,MAAM,MAAM,uBAAuB,GAC/B,uBAAuB,CAAC,cAAc,GACtC,uBAAuB,CAAC,SAAS,GACjC,uBAAuB,CAAC,SAAS,GACjC,uBAAuB,CAAC,eAAe,GACvC,uBAAuB,CAAC,cAAc,CAAC;AAE3C,MAAM,CAAC,OAAO,WAAW,uBAAuB,CAAC;IAC/C,UAAiB,cAAc;QAC7B,KAAK,EAAE,kBAAkB,CAAC;QAE1B;;;WAGG;QACH,UAAU,EAAE,MAAM,CAAC;QAEnB;;WAEG;QACH,KAAK,EACD,WAAW,GACX,WAAW,GACX,UAAU,GACV,UAAU,GACV,WAAW,GACX,WAAW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
  }
19
- export type TextToVideoCreateParams = TextToVideoCreateParams.Gen4_5 | TextToVideoCreateParams.Veo3_1 | TextToVideoCreateParams.Veo3_1Fast | TextToVideoCreateParams.Seedance2 | TextToVideoCreateParams.Veo3;
19
+ export type TextToVideoCreateParams = TextToVideoCreateParams.Gen4_5 | TextToVideoCreateParams.Veo3_1 | TextToVideoCreateParams.Veo3_1Fast | TextToVideoCreateParams.Veo3;
20
20
  export declare namespace TextToVideoCreateParams {
21
21
  interface Gen4_5 {
22
22
  /**
@@ -97,30 +97,6 @@ export declare namespace TextToVideoCreateParams {
97
97
  */
98
98
  duration?: 4 | 6 | 8;
99
99
  }
100
- interface Seedance2 {
101
- model: 'seedance2';
102
- /**
103
- * A non-empty string up to 3500 characters (measured in UTF-16 code units). This
104
- * should describe in detail what should appear in the output.
105
- */
106
- promptText: string;
107
- /**
108
- * Whether to generate audio for the video. Audio inclusion affects pricing.
109
- */
110
- audio?: boolean;
111
- /**
112
- * The number of seconds of duration for the output video.
113
- */
114
- duration?: number;
115
- /**
116
- * The number of video generations to produce.
117
- */
118
- outputCount?: number;
119
- /**
120
- * The resolution of the output video.
121
- */
122
- ratio?: '992:432' | '864:496' | '752:560' | '640:640' | '560:752' | '496:864' | '1470:630' | '1280:720' | '1112:834' | '960:960' | '834:1112' | '720:1280';
123
- }
124
100
  interface Veo3 {
125
101
  /**
126
102
  * The number of seconds of duration for the output video.
@@ -1 +1 @@
1
- {"version":3,"file":"text-to-video.d.mts","sourceRoot":"","sources":["../src/resources/text-to-video.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,cAAc,EAAE;OAClB,EAAE,2BAA2B,EAA0B;AAE9D;;GAEG;AACH,qBAAa,WAAY,SAAQ,WAAW;IAC1C;;OAEG;IACH,MAAM,CACJ,IAAI,EAAE,uBAAuB,EAC7B,OAAO,CAAC,EAAE,cAAc,GACvB,2BAA2B,CAAC,yBAAyB,CAAC;CAK1D;AAED,MAAM,WAAW,yBAAyB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CAAC;QAEhB;;WAEG;QACH,QAAQ,CAAC,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;KACtB;IAED,UAAiB,SAAS;QACxB,KAAK,EAAE,WAAW,CAAC;QAEnB;;;WAGG;QACH,UAAU,EAAE,MAAM,CAAC;QAEnB;;WAEG;QACH,KAAK,CAAC,EAAE,OAAO,CAAC;QAEhB;;WAEG;QACH,QAAQ,CAAC,EAAE,MAAM,CAAC;QAElB;;WAEG;QACH,WAAW,CAAC,EAAE,MAAM,CAAC;QAErB;;WAEG;QACH,KAAK,CAAC,EACF,SAAS,GACT,SAAS,GACT,SAAS,GACT,SAAS,GACT,SAAS,GACT,SAAS,GACT,UAAU,GACV,UAAU,GACV,UAAU,GACV,SAAS,GACT,UAAU,GACV,UAAU,CAAC;KAChB;IAED,UAAiB,IAAI;QACnB;;WAEG;QACH,QAAQ,EAAE,CAAC,CAAC;QAEZ,KAAK,EAAE,MAAM,CAAC;QAEd;;;WAGG;QACH,UAAU,EAAE,MAAM,CAAC;QAEnB;;WAEG;QACH,KAAK,EAAE,UAAU,GAAG,UAAU,GAAG,WAAW,GAAG,WAAW,CAAC;KAC5D;CACF;AAED,MAAM,CAAC,OAAO,WAAW,WAAW,CAAC;IACnC,OAAO,EACL,KAAK,yBAAyB,IAAI,yBAAyB,EAC3D,KAAK,uBAAuB,IAAI,uBAAuB,GACxD,CAAC;CACH"}
1
+ {"version":3,"file":"text-to-video.d.mts","sourceRoot":"","sources":["../src/resources/text-to-video.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,cAAc,EAAE;OAClB,EAAE,2BAA2B,EAA0B;AAE9D;;GAEG;AACH,qBAAa,WAAY,SAAQ,WAAW;IAC1C;;OAEG;IACH,MAAM,CACJ,IAAI,EAAE,uBAAuB,EAC7B,OAAO,CAAC,EAAE,cAAc,GACvB,2BAA2B,CAAC,yBAAyB,CAAC;CAK1D;AAED,MAAM,WAAW,yBAAyB;IACxC;;OAEG;I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E,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;KACtB;IAED,UAAiB,IAAI;QACnB;;WAEG;QACH,QAAQ,EAAE,CAAC,CAAC;QAEZ,KAAK,EAAE,MAAM,CAAC;QAEd;;;WAGG;QACH,UAAU,EAAE,MAAM,CAAC;QAEnB;;WAEG;QACH,KAAK,EAAE,UAAU,GAAG,UAAU,GAAG,WAAW,GAAG,WAAW,CAAC;KAC5D;CACF;AAED,MAAM,CAAC,OAAO,WAAW,WAAW,CAAC;IACnC,OAAO,EACL,KAAK,yBAAyB,IAAI,yBAAyB,EAC3D,KAAK,uBAAuB,IAAI,uBAAuB,GACxD,CAAC;CACH"}
@@ -16,7 +16,7 @@ export interface TextToVideoCreateResponse {
16
16
  */
17
17
  id: string;
18
18
  }
19
- export type TextToVideoCreateParams = TextToVideoCreateParams.Gen4_5 | TextToVideoCreateParams.Veo3_1 | TextToVideoCreateParams.Veo3_1Fast | TextToVideoCreateParams.Seedance2 | TextToVideoCreateParams.Veo3;
19
+ export type TextToVideoCreateParams = TextToVideoCreateParams.Gen4_5 | TextToVideoCreateParams.Veo3_1 | TextToVideoCreateParams.Veo3_1Fast | TextToVideoCreateParams.Veo3;
20
20
  export declare namespace TextToVideoCreateParams {
21
21
  interface Gen4_5 {
22
22
  /**
@@ -97,30 +97,6 @@ export declare namespace TextToVideoCreateParams {
97
97
  */
98
98
  duration?: 4 | 6 | 8;
99
99
  }
100
- interface Seedance2 {
101
- model: 'seedance2';
102
- /**
103
- * A non-empty string up to 3500 characters (measured in UTF-16 code units). This
104
- * should describe in detail what should appear in the output.
105
- */
106
- promptText: string;
107
- /**
108
- * Whether to generate audio for the video. Audio inclusion affects pricing.
109
- */
110
- audio?: boolean;
111
- /**
112
- * The number of seconds of duration for the output video.
113
- */
114
- duration?: number;
115
- /**
116
- * The number of video generations to produce.
117
- */
118
- outputCount?: number;
119
- /**
120
- * The resolution of the output video.
121
- */
122
- ratio?: '992:432' | '864:496' | '752:560' | '640:640' | '560:752' | '496:864' | '1470:630' | '1280:720' | '1112:834' | '960:960' | '834:1112' | '720:1280';
123
- }
124
100
  interface Veo3 {
125
101
  /**
126
102
  * The number of seconds of duration for the output video.
@@ -1 +1 @@
1
- {"version":3,"file":"text-to-video.d.ts","sourceRoot":"","sources":["../src/resources/text-to-video.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,cAAc,EAAE;OAClB,EAAE,2BAA2B,EAA0B;AAE9D;;GAEG;AACH,qBAAa,WAAY,SAAQ,WAAW;IAC1C;;OAEG;IACH,MAAM,CACJ,IAAI,EAAE,uBAAuB,EAC7B,OAAO,CAAC,EAAE,cAAc,GACvB,2BAA2B,CAAC,yBAAyB,CAAC;CAK1D;AAED,MAAM,WAAW,yBAAyB;IACxC;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;CACZ;AAED,MAAM,MAAM,uBAAuB,GAC/B,uBAAuB,CAAC,MAAM,GAC9B,uBAAuB,CAAC,MAAM,GAC9B,uBAAuB,CAAC,UAAU,GAClC,uBAAuB,CAAC,SAAS,GACjC,uBAAuB,CAAC,IAAI,CAAC;AAEjC,MAAM,CAAC,OAAO,WAAW,uBAAuB,CAAC;IAC/C,UAAiB,MAAM;QACrB;;;WAGG;QACH,QAAQ,EAAE,MAAM,CAAC;QAEjB,KAAK,EAAE,QAAQ,CAAC;QAEhB;;;WAGG;QACH,UAAU,EAAE,MAAM,CAAC;QAEnB;;WAEG;QACH,KAAK,EAAE,UAAU,GAAG,UAAU,CAAC;QAE/B;;WAEG;QACH,iBAAiB,CAAC,EAAE,MAAM,CAAC,iBAAiB,CAAC;QAE7C;;;;WAIG;QACH,IAAI,CAAC,EAAE,MAAM,CAAC;KACf;IAED,UAAiB,MAAM,CAAC;QACtB;;WAEG;QACH,UAAiB,iBAAiB;YAChC;;;eAGG;YACH,qBAAqB,CAAC,EAAE,MAAM,GAAG,KAAK,CAAC;SACxC;KACF;IAED,UAAiB,MAAM;QACrB,KAAK,EAAE,QAA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MAAM,CAAC;QAEnB;;WAEG;QACH,KAAK,EAAE,UAAU,GAAG,UAAU,GAAG,WAAW,GAAG,WAAW,CAAC;QAE3D;;WAEG;QACH,KAAK,CAAC,EAAE,OAAO,CAAC;QAEhB;;WAEG;QACH,QAAQ,CAAC,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;KACtB;IAED,UAAiB,UAAU;QACzB,KAAK,EAAE,aAAa,CAAC;QAErB;;;WAGG;QACH,UAAU,EAAE,MAAM,CAAC;QAEnB;;WAEG;QACH,KAAK,EAAE,UAAU,GAAG,UAAU,GAAG,WAAW,GAAG,WAAW,CAAC;QAE3D;;WAEG;QACH,KAAK,CAAC,EAAE,OAAO,CAAC;QAEhB;;WAEG;QACH,QAAQ,CAAC,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;KACtB;IAED,UAAiB,IAAI;QACnB;;WAEG;QACH,QAAQ,EAAE,CAAC,CAAC;QAEZ,KAAK,EAAE,MAAM,CAAC;QAEd;;;WAGG;QACH,UAAU,EAAE,MAAM,CAAC;QAEnB;;WAEG;QACH,KAAK,EAAE,UAAU,GAAG,UAAU,GAAG,WAAW,GAAG,WAAW,CAAC;KAC5D;CACF;AAED,MAAM,CAAC,OAAO,WAAW,WAAW,CAAC;IACnC,OAAO,EACL,KAAK,yBAAyB,IAAI,yBAAyB,EAC3D,KAAK,uBAAuB,IAAI,uBAAuB,GACxD,CAAC;CACH"}
@@ -25,125 +25,59 @@ export interface VideoToVideoCreateResponse {
25
25
  */
26
26
  id: string;
27
27
  }
28
- export type VideoToVideoCreateParams = VideoToVideoCreateParams.Gen4Aleph | VideoToVideoCreateParams.Seedance2;
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
+ }
29
60
  export declare namespace VideoToVideoCreateParams {
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>;
55
- /**
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.
59
- */
60
- seed?: number;
61
- }
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
- }
61
+ /**
62
+ * Settings that affect the behavior of the content moderation system.
63
+ */
64
+ interface ContentModeration {
73
65
  /**
74
- * Passing an image reference allows the model to emulate the style or content of
75
- * the reference in the output.
66
+ * When set to `low`, the content moderation system will be less strict about
67
+ * preventing generations that include recognizable public figures.
76
68
  */
77
- interface Reference {
78
- type: 'image';
79
- /**
80
- * A HTTPS URL.
81
- */
82
- uri: string;
83
- }
69
+ publicFigureThreshold?: 'auto' | 'low';
84
70
  }
85
- interface Seedance2 {
86
- model: 'seedance2';
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';
87
77
  /**
88
78
  * A HTTPS URL.
89
79
  */
90
- promptVideo: string;
91
- /**
92
- * Whether to generate audio for the video. Audio inclusion affects pricing.
93
- */
94
- audio?: boolean;
95
- /**
96
- * The number of seconds of duration for the output video. Must be an integer from
97
- * 4 to 15.
98
- */
99
- duration?: number;
100
- /**
101
- * The number of video generations to produce.
102
- */
103
- outputCount?: number;
104
- /**
105
- * An optional text prompt up to 3500 characters describing what should appear in
106
- * the output video.
107
- */
108
- promptText?: string;
109
- /**
110
- * The resolution of the output video.
111
- */
112
- ratio?: '992:432' | '864:496' | '752:560' | '640:640' | '560:752' | '496:864' | '1470:630' | '1280:720' | '1112:834' | '960:960' | '834:1112' | '720:1280';
113
- /**
114
- * An optional array of image references (up to 9). See
115
- * [our docs](/assets/inputs#images) on image inputs for more information.
116
- */
117
- references?: string | Array<Seedance2.PromptImage>;
118
- /**
119
- * An optional array of up to 3 video references. See
120
- * [our docs](/assets/inputs#videos) on video inputs for more information.
121
- */
122
- referenceVideos?: Array<Seedance2.ReferenceVideo>;
123
- }
124
- namespace Seedance2 {
125
- interface PromptImage {
126
- /**
127
- * A HTTPS URL.
128
- */
129
- uri: string;
130
- /**
131
- * The position of the image in the output video. "first" will use the image as the
132
- * first frame, "last" as the last frame. Omit for a reference image.
133
- */
134
- position?: 'first' | 'last';
135
- }
136
- /**
137
- * A video reference allows the model to use the video as additional context for
138
- * the output.
139
- */
140
- interface ReferenceVideo {
141
- type: 'video';
142
- /**
143
- * A HTTPS URL.
144
- */
145
- uri: string;
146
- }
80
+ uri: string;
147
81
  }
148
82
  }
149
83
  export declare namespace VideoToVideo {
@@ -1 +1 @@
1
- {"version":3,"file":"video-to-video.d.mts","sourceRoot":"","sources":["../src/resources/video-to-video.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,cAAc,EAAE;OAClB,EAAE,2BAA2B,EAA0B;AAE9D;;GAEG;AACH,qBAAa,YAAa,SAAQ,WAAW;IAC3C;;;;;;;;;;;OAWG;IACH,MAAM,CACJ,IAAI,EAAE,wBAAwB,EAC9B,OAAO,CAAC,EAAE,cAAc,GACvB,2BAA2B,CAAC,0BAA0B,CAAC;CAK3D;AAED,MAAM,WAAW,0BAA0B;IACzC;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;CACZ;AAED,MAAM,MAAM,wBAAwB,GAChC,wBAAwB,CAAC,SAAS,GAClC,wBAAwB,CAAC,SAAS,CAAC;AAEvC,MAAM,CAAC,OAAO,WAAW,wBAAwB,CAAC;IAChD,UAAiB,SAAS;QACxB,KAAK,EAAE,YAAY,CAAC;QAEpB;;;WAGG;QACH,UAAU,EAAE,MAAM,CAAC;QAEnB;;WAEG;QACH,QAAQ,EAAE,MAAM,CAAC;QAEjB;;WAEG;QACH,iBAAiB,CAAC,EAAE,SAAS,CAAC,iBAAiB,CAAC;QAEhD;;;WAGG;QACH,KAAK,CAAC,EACF,UAAU,GACV,UAAU,GACV,UAAU,GACV,SAAS,GACT,UAAU,GACV,UAAU,GACV,SAAS,GACT,SAAS,CAAC;QAEd;;;WAGG;QACH,UAAU,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC,SAAS,CAAC,CAAC;QAExC;;;;WAIG;QACH,IAAI,CAAC,EAAE,MAAM,CAAC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WAAW,YAAY,CAAC;IACpC,OAAO,EACL,KAAK,0BAA0B,IAAI,0BAA0B,EAC7D,KAAK,wBAAwB,IAAI,wBAAwB,GAC1D,CAAC;CACH"}
@@ -25,125 +25,59 @@ export interface VideoToVideoCreateResponse {
25
25
  */
26
26
  id: string;
27
27
  }
28
- export type VideoToVideoCreateParams = VideoToVideoCreateParams.Gen4Aleph | VideoToVideoCreateParams.Seedance2;
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
+ }
29
60
  export declare namespace VideoToVideoCreateParams {
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>;
55
- /**
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.
59
- */
60
- seed?: number;
61
- }
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
- }
61
+ /**
62
+ * Settings that affect the behavior of the content moderation system.
63
+ */
64
+ interface ContentModeration {
73
65
  /**
74
- * Passing an image reference allows the model to emulate the style or content of
75
- * the reference in the output.
66
+ * When set to `low`, the content moderation system will be less strict about
67
+ * preventing generations that include recognizable public figures.
76
68
  */
77
- interface Reference {
78
- type: 'image';
79
- /**
80
- * A HTTPS URL.
81
- */
82
- uri: string;
83
- }
69
+ publicFigureThreshold?: 'auto' | 'low';
84
70
  }
85
- interface Seedance2 {
86
- model: 'seedance2';
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';
87
77
  /**
88
78
  * A HTTPS URL.
89
79
  */
90
- promptVideo: string;
91
- /**
92
- * Whether to generate audio for the video. Audio inclusion affects pricing.
93
- */
94
- audio?: boolean;
95
- /**
96
- * The number of seconds of duration for the output video. Must be an integer from
97
- * 4 to 15.
98
- */
99
- duration?: number;
100
- /**
101
- * The number of video generations to produce.
102
- */
103
- outputCount?: number;
104
- /**
105
- * An optional text prompt up to 3500 characters describing what should appear in
106
- * the output video.
107
- */
108
- promptText?: string;
109
- /**
110
- * The resolution of the output video.
111
- */
112
- ratio?: '992:432' | '864:496' | '752:560' | '640:640' | '560:752' | '496:864' | '1470:630' | '1280:720' | '1112:834' | '960:960' | '834:1112' | '720:1280';
113
- /**
114
- * An optional array of image references (up to 9). See
115
- * [our docs](/assets/inputs#images) on image inputs for more information.
116
- */
117
- references?: string | Array<Seedance2.PromptImage>;
118
- /**
119
- * An optional array of up to 3 video references. See
120
- * [our docs](/assets/inputs#videos) on video inputs for more information.
121
- */
122
- referenceVideos?: Array<Seedance2.ReferenceVideo>;
123
- }
124
- namespace Seedance2 {
125
- interface PromptImage {
126
- /**
127
- * A HTTPS URL.
128
- */
129
- uri: string;
130
- /**
131
- * The position of the image in the output video. "first" will use the image as the
132
- * first frame, "last" as the last frame. Omit for a reference image.
133
- */
134
- position?: 'first' | 'last';
135
- }
136
- /**
137
- * A video reference allows the model to use the video as additional context for
138
- * the output.
139
- */
140
- interface ReferenceVideo {
141
- type: 'video';
142
- /**
143
- * A HTTPS URL.
144
- */
145
- uri: string;
146
- }
80
+ uri: string;
147
81
  }
148
82
  }
149
83
  export declare namespace VideoToVideo {
@@ -1 +1 @@
1
- {"version":3,"file":"video-to-video.d.ts","sourceRoot":"","sources":["../src/resources/video-to-video.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,cAAc,EAAE;OAClB,EAAE,2BAA2B,EAA0B;AAE9D;;GAEG;AACH,qBAAa,YAAa,SAAQ,WAAW;IAC3C;;;;;;;;;;;OAWG;IACH,MAAM,CACJ,IAAI,EAAE,wBAAwB,EAC9B,OAAO,CAAC,EAAE,cAAc,GACvB,2BAA2B,CAAC,0BAA0B,CAAC;CAK3D;AAED,MAAM,WAAW,0BAA0B;IACzC;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;CACZ;AAED,MAAM,MAAM,wBAAwB,GAChC,wBAAwB,CAAC,SAAS,GAClC,wBAAwB,CAAC,SAAS,CAAC;AAEvC,MAAM,CAAC,OAAO,WAAW,wBAAwB,CAA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GAAG,UAAU,GAAG,UAAU,GAAG,SAAS,GAAG,SAAS,CAAC;IAE3G;;;OAGG;IACH,UAAU,CAAC,EAAE,KAAK,CAAC,wBAAwB,CAAC,SAAS,CAAC,CAAC;IAEvD;;;;OAIG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,yBAAiB,wBAAwB,CAAC;IACxC;;OAEG;IACH,UAAiB,iBAAiB;QAChC;;;WAGG;QACH,qBAAqB,CAAC,EAAE,MAAM,GAAG,KAAK,CAAC;KACxC;IAED;;;OAGG;IACH,UAAiB,SAAS;QACxB,IAAI,EAAE,OAAO,CAAC;QAEd;;WAEG;QACH,GAAG,EAAE,MAAM,CAAC;KACb;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
@@ -275,6 +275,18 @@ export class RunwayML {
275
275
  this.fetch = options.fetch ?? Shims.getDefaultFetch();
276
276
  this.#encoder = Opts.FallbackEncoder;
277
277
 
278
+ const customHeadersEnv = readEnv('RUNWAYML_CUSTOM_HEADERS');
279
+ if (customHeadersEnv) {
280
+ const parsed: Record<string, string> = {};
281
+ for (const line of customHeadersEnv.split('\n')) {
282
+ const colon = line.indexOf(':');
283
+ if (colon >= 0) {
284
+ parsed[line.substring(0, colon).trim()] = line.substring(colon + 1).trim();
285
+ }
286
+ }
287
+ options.defaultHeaders = { ...parsed, ...options.defaultHeaders };
288
+ }
289
+
278
290
  this._options = options;
279
291
 
280
292
  this.apiKey = apiKey;
@@ -40,7 +40,6 @@ type OverloadedParameters<T> =
40
40
  : T extends (...args: infer A) => unknown ? A
41
41
  : never;
42
42
 
43
- /* eslint-disable */
44
43
  /**
45
44
  * These imports attempt to get types from a parent package's dependencies.
46
45
  * Unresolved bare specifiers can trigger [automatic type acquisition][1] in some projects, which
@@ -63,19 +62,18 @@ type OverloadedParameters<T> =
63
62
  *
64
63
  * [1]: https://www.typescriptlang.org/tsconfig/#typeAcquisition
65
64
  */
66
- /** @ts-ignore For users with \@types/node */
65
+ /** @ts-ignore For users with \@types/node */ /* prettier-ignore */
67
66
  type UndiciTypesRequestInit = NotAny<import('../node_modules/undici-types/index.d.ts').RequestInit> | NotAny<import('../../node_modules/undici-types/index.d.ts').RequestInit> | NotAny<import('../../../node_modules/undici-types/index.d.ts').RequestInit> | NotAny<import('../../../../node_modules/undici-types/index.d.ts').RequestInit> | NotAny<import('../../../../../node_modules/undici-types/index.d.ts').RequestInit> | NotAny<import('../../../../../../node_modules/undici-types/index.d.ts').RequestInit> | NotAny<import('../../../../../../../node_modules/undici-types/index.d.ts').RequestInit> | NotAny<import('../../../../../../../../node_modules/undici-types/index.d.ts').RequestInit> | NotAny<import('../../../../../../../../../node_modules/undici-types/index.d.ts').RequestInit> | NotAny<import('../../../../../../../../../../node_modules/undici-types/index.d.ts').RequestInit>;
68
- /** @ts-ignore For users with undici */
67
+ /** @ts-ignore For users with undici */ /* prettier-ignore */
69
68
  type UndiciRequestInit = NotAny<import('../node_modules/undici/index.d.ts').RequestInit> | NotAny<import('../../node_modules/undici/index.d.ts').RequestInit> | NotAny<import('../../../node_modules/undici/index.d.ts').RequestInit> | NotAny<import('../../../../node_modules/undici/index.d.ts').RequestInit> | NotAny<import('../../../../../node_modules/undici/index.d.ts').RequestInit> | NotAny<import('../../../../../../node_modules/undici/index.d.ts').RequestInit> | NotAny<import('../../../../../../../node_modules/undici/index.d.ts').RequestInit> | NotAny<import('../../../../../../../../node_modules/undici/index.d.ts').RequestInit> | NotAny<import('../../../../../../../../../node_modules/undici/index.d.ts').RequestInit> | NotAny<import('../../../../../../../../../../node_modules/undici/index.d.ts').RequestInit>;
70
- /** @ts-ignore For users with \@types/bun */
69
+ /** @ts-ignore For users with \@types/bun */ /* prettier-ignore */
71
70
  type BunRequestInit = globalThis.FetchRequestInit;
72
- /** @ts-ignore For users with node-fetch@2 */
71
+ /** @ts-ignore For users with node-fetch@2 */ /* prettier-ignore */
73
72
  type NodeFetch2RequestInit = NotAny<import('../node_modules/@types/node-fetch/index.d.ts').RequestInit> | NotAny<import('../../node_modules/@types/node-fetch/index.d.ts').RequestInit> | NotAny<import('../../../node_modules/@types/node-fetch/index.d.ts').RequestInit> | NotAny<import('../../../../node_modules/@types/node-fetch/index.d.ts').RequestInit> | NotAny<import('../../../../../node_modules/@types/node-fetch/index.d.ts').RequestInit> | NotAny<import('../../../../../../node_modules/@types/node-fetch/index.d.ts').RequestInit> | NotAny<import('../../../../../../../node_modules/@types/node-fetch/index.d.ts').RequestInit> | NotAny<import('../../../../../../../../node_modules/@types/node-fetch/index.d.ts').RequestInit> | NotAny<import('../../../../../../../../../node_modules/@types/node-fetch/index.d.ts').RequestInit> | NotAny<import('../../../../../../../../../../node_modules/@types/node-fetch/index.d.ts').RequestInit>;
74
- /** @ts-ignore For users with node-fetch@3, doesn't need file extension because types are at ./@types/index.d.ts */
73
+ /** @ts-ignore For users with node-fetch@3, doesn't need file extension because types are at ./@types/index.d.ts */ /* prettier-ignore */
75
74
  type NodeFetch3RequestInit = NotAny<import('../node_modules/node-fetch').RequestInit> | NotAny<import('../../node_modules/node-fetch').RequestInit> | NotAny<import('../../../node_modules/node-fetch').RequestInit> | NotAny<import('../../../../node_modules/node-fetch').RequestInit> | NotAny<import('../../../../../node_modules/node-fetch').RequestInit> | NotAny<import('../../../../../../node_modules/node-fetch').RequestInit> | NotAny<import('../../../../../../../node_modules/node-fetch').RequestInit> | NotAny<import('../../../../../../../../node_modules/node-fetch').RequestInit> | NotAny<import('../../../../../../../../../node_modules/node-fetch').RequestInit> | NotAny<import('../../../../../../../../../../node_modules/node-fetch').RequestInit>;
76
- /** @ts-ignore For users who use Deno */
75
+ /** @ts-ignore For users who use Deno */ /* prettier-ignore */
77
76
  type FetchRequestInit = NonNullable<OverloadedParameters<typeof fetch>[1]>;
78
- /* eslint-enable */
79
77
 
80
78
  type RequestInits =
81
79
  | NotAny<UndiciTypesRequestInit>
@@ -107,6 +107,8 @@ export const formatRequestDetails = (details: {
107
107
  name,
108
108
  (
109
109
  name.toLowerCase() === 'authorization' ||
110
+ name.toLowerCase() === 'api-key' ||
111
+ name.toLowerCase() === 'x-api-key' ||
110
112
  name.toLowerCase() === 'cookie' ||
111
113
  name.toLowerCase() === 'set-cookie'
112
114
  ) ?