@runwayml/sdk 2.1.1 → 2.2.1

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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,21 @@
1
1
  # Changelog
2
2
 
3
+ ## 2.2.1 (2025-06-04)
4
+
5
+ Full Changelog: [v2.2.0...v2.2.1](https://github.com/runwayml/sdk-node/compare/v2.2.0...v2.2.1)
6
+
7
+ ### Chores
8
+
9
+ * **docs:** use top-level-await in example snippets ([263a894](https://github.com/runwayml/sdk-node/commit/263a894e998da45a6b92d3104c24720729dc3111))
10
+
11
+ ## 2.2.0 (2025-05-29)
12
+
13
+ Full Changelog: [v2.1.1...v2.2.0](https://github.com/runwayml/sdk-node/compare/v2.1.1...v2.2.0)
14
+
15
+ ### Features
16
+
17
+ * **api:** Add 720p t2i ratios ([3db19cc](https://github.com/runwayml/sdk-node/commit/3db19ccd769b6b56150dad4f0239e2e2edb22066))
18
+
3
19
  ## 2.1.1 (2025-05-28)
4
20
 
5
21
  Full Changelog: [v2.1.0...v2.1.1](https://github.com/runwayml/sdk-node/compare/v2.1.0...v2.1.1)
package/README.md CHANGED
@@ -26,18 +26,14 @@ const client = new RunwayML({
26
26
  apiKey: process.env['RUNWAYML_API_SECRET'], // This is the default and can be omitted
27
27
  });
28
28
 
29
- async function main() {
30
- const imageToVideo = await client.imageToVideo.create({
31
- model: 'gen4_turbo',
32
- promptImage: 'https://example.com/assets/bunny.jpg',
33
- ratio: '1280:720',
34
- promptText: 'The bunny is eating a carrot',
35
- });
36
-
37
- console.log(imageToVideo.id);
38
- }
29
+ const imageToVideo = await client.imageToVideo.create({
30
+ model: 'gen4_turbo',
31
+ promptImage: 'https://example.com/assets/bunny.jpg',
32
+ ratio: '1280:720',
33
+ promptText: 'The bunny is eating a carrot',
34
+ });
39
35
 
40
- main();
36
+ console.log(imageToVideo.id);
41
37
  ```
42
38
 
43
39
  ### Request & Response types
@@ -52,17 +48,13 @@ const client = new RunwayML({
52
48
  apiKey: process.env['RUNWAYML_API_SECRET'], // This is the default and can be omitted
53
49
  });
54
50
 
55
- async function main() {
56
- const params: RunwayML.ImageToVideoCreateParams = {
57
- model: 'gen4_turbo',
58
- promptImage: 'https://example.com/assets/bunny.jpg',
59
- ratio: '1280:720',
60
- promptText: 'The bunny is eating a carrot',
61
- };
62
- const imageToVideo: RunwayML.ImageToVideoCreateResponse = await client.imageToVideo.create(params);
63
- }
64
-
65
- main();
51
+ const params: RunwayML.ImageToVideoCreateParams = {
52
+ model: 'gen4_turbo',
53
+ promptImage: 'https://example.com/assets/bunny.jpg',
54
+ ratio: '1280:720',
55
+ promptText: 'The bunny is eating a carrot',
56
+ };
57
+ const imageToVideo: RunwayML.ImageToVideoCreateResponse = await client.imageToVideo.create(params);
66
58
  ```
67
59
 
68
60
  Documentation for each method, request param, and response field are available in docstrings and will appear on hover in most modern editors.
@@ -75,26 +67,22 @@ a subclass of `APIError` will be thrown:
75
67
 
76
68
  <!-- prettier-ignore -->
77
69
  ```ts
78
- async function main() {
79
- const imageToVideo = await client.imageToVideo
80
- .create({
81
- model: 'gen4_turbo',
82
- promptImage: 'https://example.com/assets/bunny.jpg',
83
- ratio: '1280:720',
84
- promptText: 'The bunny is eating a carrot',
85
- })
86
- .catch(async (err) => {
87
- if (err instanceof RunwayML.APIError) {
88
- console.log(err.status); // 400
89
- console.log(err.name); // BadRequestError
90
- console.log(err.headers); // {server: 'nginx', ...}
91
- } else {
92
- throw err;
93
- }
94
- });
95
- }
96
-
97
- main();
70
+ const imageToVideo = await client.imageToVideo
71
+ .create({
72
+ model: 'gen4_turbo',
73
+ promptImage: 'https://example.com/assets/bunny.jpg',
74
+ ratio: '1280:720',
75
+ promptText: 'The bunny is eating a carrot',
76
+ })
77
+ .catch(async (err) => {
78
+ if (err instanceof RunwayML.APIError) {
79
+ console.log(err.status); // 400
80
+ console.log(err.name); // BadRequestError
81
+ console.log(err.headers); // {server: 'nginx', ...}
82
+ } else {
83
+ throw err;
84
+ }
85
+ });
98
86
  ```
99
87
 
100
88
  Error codes are as follows:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@runwayml/sdk",
3
- "version": "2.1.1",
3
+ "version": "2.2.1",
4
4
  "description": "The official TypeScript library for the RunwayML API",
5
5
  "author": "RunwayML <dev-feedback@runwayml.com>",
6
6
  "types": "./index.d.ts",
@@ -25,7 +25,7 @@ export interface TextToImageCreateParams {
25
25
  /**
26
26
  * The resolution of the output image(s).
27
27
  */
28
- ratio: '1920:1080' | '1080:1920' | '1024:1024' | '1360:768' | '1080:1080' | '1168:880' | '1440:1080' | '1080:1440' | '1808:768' | '2112:912';
28
+ ratio: '1920:1080' | '1080:1920' | '1024:1024' | '1360:768' | '1080:1080' | '1168:880' | '1440:1080' | '1080:1440' | '1808:768' | '2112:912' | '1280:720' | '720:1280' | '720:720' | '960:720' | '720:960' | '1680:720';
29
29
  /**
30
30
  * Settings that affect the behavior of the content moderation system.
31
31
  */
@@ -1 +1 @@
1
- {"version":3,"file":"text-to-image.d.ts","sourceRoot":"","sources":["../src/resources/text-to-image.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC1C,OAAO,KAAK,IAAI,MAAM,SAAS,CAAC;AAEhC,qBAAa,WAAY,SAAQ,WAAW;IAC1C;;OAEG;IACH,MAAM,CACJ,IAAI,EAAE,uBAAuB,EAC7B,OAAO,CAAC,EAAE,IAAI,CAAC,cAAc,GAC5B,IAAI,CAAC,UAAU,CAAC,yBAAyB,CAAC;CAG9C;AAED,MAAM,WAAW,yBAAyB;IACxC;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;CACZ;AAED,MAAM,WAAW,uBAAuB;IACtC;;OAEG;IACH,KAAK,EAAE,YAAY,CAAC;IAEpB;;;OAGG;IACH,UAAU,EAAE,MAAM,CAAC;IAEnB;;OAEG;IACH,KAAK,EACD,WAAW,GACX,WAAW,GACX,WAAW,G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OAEG;IACH,KAAK,EACD,WAAW,GACX,WAAW,GACX,WAAW,GACX,UAAU,GACV,WAAW,GACX,UAAU,GACV,WAAW,GACX,WAAW,GACX,UAAU,GACV,UAAU,GACV,UAAU,GACV,UAAU,GACV,SAAS,GACT,SAAS,GACT,SAAS,GACT,UAAU,CAAC;IAEf;;OAEG;IACH,iBAAiB,CAAC,EAAE,uBAAuB,CAAC,iBAAiB,CAAC;IAE9D;;;OAGG;IACH,eAAe,CAAC,EAAE,KAAK,CAAC,uBAAuB,CAAC,cAAc,CAAC,CAAC;IAEhE;;;;OAIG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,yBAAiB,uBAAuB,CAAC;IACvC;;OAEG;IACH,UAAiB,iBAAiB;QAChC;;;WAGG;QACH,qBAAqB,CAAC,EAAE,MAAM,GAAG,KAAK,CAAC;KACxC;IAED,UAAiB,cAAc;QAC7B;;;;WAIG;QACH,GAAG,EAAE,MAAM,CAAC;QAEZ;;;;;WAKG;QACH,GAAG,CAAC,EAAE,MAAM,CAAC;KACd;CACF;AAED,MAAM,CAAC,OAAO,WAAW,WAAW,CAAC;IACnC,OAAO,EACL,KAAK,yBAAyB,IAAI,yBAAyB,EAC3D,KAAK,uBAAuB,IAAI,uBAAuB,GACxD,CAAC;CACH"}
@@ -47,7 +47,13 @@ export interface TextToImageCreateParams {
47
47
  | '1440:1080'
48
48
  | '1080:1440'
49
49
  | '1808:768'
50
- | '2112:912';
50
+ | '2112:912'
51
+ | '1280:720'
52
+ | '720:1280'
53
+ | '720:720'
54
+ | '960:720'
55
+ | '720:960'
56
+ | '1680:720';
51
57
 
52
58
  /**
53
59
  * Settings that affect the behavior of the content moderation system.
package/src/version.ts CHANGED
@@ -1 +1 @@
1
- export const VERSION = '2.1.1'; // x-release-please-version
1
+ export const VERSION = '2.2.1'; // x-release-please-version
package/version.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "2.1.1";
1
+ export declare const VERSION = "2.2.1";
2
2
  //# sourceMappingURL=version.d.ts.map
package/version.js CHANGED
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.VERSION = void 0;
4
- exports.VERSION = '2.1.1'; // x-release-please-version
4
+ exports.VERSION = '2.2.1'; // x-release-please-version
5
5
  //# sourceMappingURL=version.js.map
package/version.mjs CHANGED
@@ -1,2 +1,2 @@
1
- export const VERSION = '2.1.1'; // x-release-please-version
1
+ export const VERSION = '2.2.1'; // x-release-please-version
2
2
  //# sourceMappingURL=version.mjs.map