@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 +16 -0
- package/README.md +30 -42
- package/package.json +1 -1
- package/resources/text-to-image.d.ts +1 -1
- package/resources/text-to-image.d.ts.map +1 -1
- package/src/resources/text-to-image.ts +7 -1
- package/src/version.ts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
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
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
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
|
-
|
|
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
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
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
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
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
|
@@ -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;AAC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,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
|
+
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
|
+
export declare const VERSION = "2.2.1";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
package/version.js
CHANGED
package/version.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export const VERSION = '2.
|
|
1
|
+
export const VERSION = '2.2.1'; // x-release-please-version
|
|
2
2
|
//# sourceMappingURL=version.mjs.map
|