@runwayml/sdk 2.2.0 → 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 +8 -0
- package/README.md +30 -42
- package/package.json +1 -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,13 @@
|
|
|
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
|
+
|
|
3
11
|
## 2.2.0 (2025-05-29)
|
|
4
12
|
|
|
5
13
|
Full Changelog: [v2.1.1...v2.2.0](https://github.com/runwayml/sdk-node/compare/v2.1.1...v2.2.0)
|
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
package/src/version.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const VERSION = '2.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.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.2.
|
|
1
|
+
export const VERSION = '2.2.1'; // x-release-please-version
|
|
2
2
|
//# sourceMappingURL=version.mjs.map
|