@runwayml/sdk 3.8.0 → 3.9.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 (86) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/client.d.mts +1 -1
  3. package/client.d.mts.map +1 -1
  4. package/client.d.ts +1 -1
  5. package/client.d.ts.map +1 -1
  6. package/lib/polling.d.mts +2 -2
  7. package/lib/polling.d.mts.map +1 -1
  8. package/lib/polling.d.ts +2 -2
  9. package/lib/polling.d.ts.map +1 -1
  10. package/lib/polling.js +1 -1
  11. package/lib/polling.js.map +1 -1
  12. package/lib/polling.mjs +1 -1
  13. package/lib/polling.mjs.map +1 -1
  14. package/package.json +1 -1
  15. package/resources/character-performance.d.mts +3 -0
  16. package/resources/character-performance.d.mts.map +1 -1
  17. package/resources/character-performance.d.ts +3 -0
  18. package/resources/character-performance.d.ts.map +1 -1
  19. package/resources/image-to-video.d.mts +3 -0
  20. package/resources/image-to-video.d.mts.map +1 -1
  21. package/resources/image-to-video.d.ts +3 -0
  22. package/resources/image-to-video.d.ts.map +1 -1
  23. package/resources/organization.d.mts +18 -489
  24. package/resources/organization.d.mts.map +1 -1
  25. package/resources/organization.d.ts +18 -489
  26. package/resources/organization.d.ts.map +1 -1
  27. package/resources/sound-effect.d.mts +3 -0
  28. package/resources/sound-effect.d.mts.map +1 -1
  29. package/resources/sound-effect.d.ts +3 -0
  30. package/resources/sound-effect.d.ts.map +1 -1
  31. package/resources/speech-to-speech.d.mts +3 -0
  32. package/resources/speech-to-speech.d.mts.map +1 -1
  33. package/resources/speech-to-speech.d.ts +3 -0
  34. package/resources/speech-to-speech.d.ts.map +1 -1
  35. package/resources/tasks.d.mts +94 -32
  36. package/resources/tasks.d.mts.map +1 -1
  37. package/resources/tasks.d.ts +94 -32
  38. package/resources/tasks.d.ts.map +1 -1
  39. package/resources/text-to-image.d.mts +54 -1
  40. package/resources/text-to-image.d.mts.map +1 -1
  41. package/resources/text-to-image.d.ts +54 -1
  42. package/resources/text-to-image.d.ts.map +1 -1
  43. package/resources/text-to-speech.d.mts +3 -0
  44. package/resources/text-to-speech.d.mts.map +1 -1
  45. package/resources/text-to-speech.d.ts +3 -0
  46. package/resources/text-to-speech.d.ts.map +1 -1
  47. package/resources/text-to-video.d.mts +3 -0
  48. package/resources/text-to-video.d.mts.map +1 -1
  49. package/resources/text-to-video.d.ts +3 -0
  50. package/resources/text-to-video.d.ts.map +1 -1
  51. package/resources/video-to-video.d.mts +3 -0
  52. package/resources/video-to-video.d.mts.map +1 -1
  53. package/resources/video-to-video.d.ts +3 -0
  54. package/resources/video-to-video.d.ts.map +1 -1
  55. package/resources/video-upscale.d.mts +3 -0
  56. package/resources/video-upscale.d.mts.map +1 -1
  57. package/resources/video-upscale.d.ts +3 -0
  58. package/resources/video-upscale.d.ts.map +1 -1
  59. package/resources/voice-dubbing.d.mts +3 -0
  60. package/resources/voice-dubbing.d.mts.map +1 -1
  61. package/resources/voice-dubbing.d.ts +3 -0
  62. package/resources/voice-dubbing.d.ts.map +1 -1
  63. package/resources/voice-isolation.d.mts +3 -0
  64. package/resources/voice-isolation.d.mts.map +1 -1
  65. package/resources/voice-isolation.d.ts +3 -0
  66. package/resources/voice-isolation.d.ts.map +1 -1
  67. package/src/client.ts +1 -1
  68. package/src/lib/polling.ts +4 -4
  69. package/src/resources/character-performance.ts +3 -0
  70. package/src/resources/image-to-video.ts +3 -0
  71. package/src/resources/organization.ts +33 -583
  72. package/src/resources/sound-effect.ts +3 -0
  73. package/src/resources/speech-to-speech.ts +3 -0
  74. package/src/resources/tasks.ts +116 -32
  75. package/src/resources/text-to-image.ts +91 -0
  76. package/src/resources/text-to-speech.ts +3 -0
  77. package/src/resources/text-to-video.ts +3 -0
  78. package/src/resources/video-to-video.ts +3 -0
  79. package/src/resources/video-upscale.ts +3 -0
  80. package/src/resources/voice-dubbing.ts +3 -0
  81. package/src/resources/voice-isolation.ts +3 -0
  82. package/src/version.ts +1 -1
  83. package/version.d.mts +1 -1
  84. package/version.d.ts +1 -1
  85. package/version.js +1 -1
  86. package/version.mjs +1 -1
@@ -35,56 +35,140 @@ export class Tasks extends APIResource {
35
35
  }
36
36
  }
37
37
 
38
- export interface TaskRetrieveResponse {
39
- /**
40
- * The ID of the task being returned.
41
- */
42
- id: string;
38
+ /**
39
+ * A pending task
40
+ */
41
+ export type TaskRetrieveResponse =
42
+ | TaskRetrieveResponse.Pending
43
+ | TaskRetrieveResponse.Throttled
44
+ | TaskRetrieveResponse.Cancelled
45
+ | TaskRetrieveResponse.Running
46
+ | TaskRetrieveResponse.Failed
47
+ | TaskRetrieveResponse.Succeeded;
43
48
 
49
+ export namespace TaskRetrieveResponse {
44
50
  /**
45
- * The timestamp that the task was submitted at.
51
+ * A pending task
46
52
  */
47
- createdAt: string;
53
+ export interface Pending {
54
+ /**
55
+ * The ID of the task being returned.
56
+ */
57
+ id: string;
58
+
59
+ /**
60
+ * The timestamp that the task was submitted at.
61
+ */
62
+ createdAt: string;
63
+
64
+ status: 'PENDING';
65
+ }
48
66
 
49
67
  /**
50
- * - `PENDING` tasks have been enqueued and are waiting to run.
51
- * - `THROTTLED` tasks are waiting to be enqueued until other jobs have finished
52
- * running.
53
- * - `RUNNING` tasks are currently being processed.
54
- * - `SUCCEEDED` tasks have completed successfully.
55
- * - `FAILED` tasks have failed.
56
- * - `CANCELLED` tasks have been aborted.
68
+ * A throttled task
57
69
  */
58
- status: 'RUNNING' | 'SUCCEEDED' | 'FAILED' | 'PENDING' | 'CANCELLED' | 'THROTTLED';
70
+ export interface Throttled {
71
+ /**
72
+ * The ID of the task being returned.
73
+ */
74
+ id: string;
75
+
76
+ /**
77
+ * The timestamp that the task was submitted at.
78
+ */
79
+ createdAt: string;
80
+
81
+ status: 'THROTTLED';
82
+ }
59
83
 
60
84
  /**
61
- * If the status is `FAILED`, this will contain a human-friendly reason for the
62
- * failure.
85
+ * A cancelled or deleted task
63
86
  */
64
- failure?: string;
87
+ export interface Cancelled {
88
+ /**
89
+ * The ID of the task being returned.
90
+ */
91
+ id: string;
92
+
93
+ /**
94
+ * The timestamp that the task was submitted at.
95
+ */
96
+ createdAt: string;
97
+
98
+ status: 'CANCELLED';
99
+ }
65
100
 
66
101
  /**
67
- * If the task has a status of `FAILED`, this contains a machine-readable error
68
- * code. This is a dot-separated string, with the leftmost segment being the most
69
- * generic and the rightmost segment being the most specific. For example,
70
- * `SAFETY.INPUT.TEXT` would indicate that the task failed due to a content
71
- * moderation error on the input text.
102
+ * A running task
72
103
  */
73
- failureCode?: string;
104
+ export interface Running {
105
+ /**
106
+ * The ID of the task being returned.
107
+ */
108
+ id: string;
109
+
110
+ /**
111
+ * The timestamp that the task was submitted at.
112
+ */
113
+ createdAt: string;
114
+
115
+ progress: number;
116
+
117
+ status: 'RUNNING';
118
+ }
74
119
 
75
120
  /**
76
- * If the status is `SUCCEEDED`, this will contain an array of strings. Each string
77
- * will be a URL that returns an output from the task. URLs expire within 24-48
78
- * hours; fetch the task again to get fresh URLs. It is expected that you download
79
- * the assets at these URLs and store them in your own storage system.
121
+ * A failed task
80
122
  */
81
- output?: Array<string>;
123
+ export interface Failed {
124
+ /**
125
+ * The ID of the task being returned.
126
+ */
127
+ id: string;
128
+
129
+ /**
130
+ * The timestamp that the task was submitted at.
131
+ */
132
+ createdAt: string;
133
+
134
+ /**
135
+ * A human-friendly reason for the failure. We do not recommend returning this to
136
+ * users directly without adding context.
137
+ */
138
+ failure: string;
139
+
140
+ status: 'FAILED';
141
+
142
+ /**
143
+ * A machine-readable error code for the failure. See
144
+ * https://docs.dev.runwayml.com/errors/task-failures/ for more information.
145
+ */
146
+ failureCode?: string;
147
+ }
82
148
 
83
149
  /**
84
- * If the task has a status of `RUNNING`, this will contain a floating point number
85
- * between 0 and 1 representing the progress of the generation.
150
+ * A succeeded task
86
151
  */
87
- progress?: number;
152
+ export interface Succeeded {
153
+ /**
154
+ * The ID of the task being returned.
155
+ */
156
+ id: string;
157
+
158
+ /**
159
+ * The timestamp that the task was submitted at.
160
+ */
161
+ createdAt: string;
162
+
163
+ /**
164
+ * An array of URLs that return the output of the task. These URLs will expire
165
+ * within 24-48 hours; fetch the task again to get fresh URLs. It is expected that
166
+ * you download the assets at these URLs and store them in your own storage system.
167
+ */
168
+ output: Array<string>;
169
+
170
+ status: 'SUCCEEDED';
171
+ }
88
172
  }
89
173
 
90
174
  export declare namespace Tasks {
@@ -19,12 +19,16 @@ export class TextToImage extends APIResource {
19
19
  }
20
20
 
21
21
  export interface TextToImageCreateResponse {
22
+ /**
23
+ * The ID of the task that was created. Use this to retrieve the task later.
24
+ */
22
25
  id: string;
23
26
  }
24
27
 
25
28
  export type TextToImageCreateParams =
26
29
  | TextToImageCreateParams.Gen4ImageTurbo
27
30
  | TextToImageCreateParams.Gen4Image
31
+ | TextToImageCreateParams.Gemini3Pro
28
32
  | TextToImageCreateParams.Gemini2_5Flash;
29
33
 
30
34
  export declare namespace TextToImageCreateParams {
@@ -84,6 +88,10 @@ export declare namespace TextToImageCreateParams {
84
88
  */
85
89
  uri: string;
86
90
 
91
+ /**
92
+ * A tag to identify the reference image. This is used to reference the image in
93
+ * prompt text.
94
+ */
87
95
  tag?: string;
88
96
  }
89
97
 
@@ -166,6 +174,85 @@ export declare namespace TextToImageCreateParams {
166
174
  */
167
175
  uri: string;
168
176
 
177
+ /**
178
+ * A tag to identify the reference image. This is used to reference the image in
179
+ * prompt text.
180
+ */
181
+ tag?: string;
182
+ }
183
+ }
184
+
185
+ export interface Gemini3Pro {
186
+ model: 'gemini_3_pro';
187
+
188
+ /**
189
+ * A non-empty string up to 1000 characters (measured in UTF-16 code units). This
190
+ * should describe in detail what should appear in the output.
191
+ */
192
+ promptText: string;
193
+
194
+ /**
195
+ * The resolution of the output image.
196
+ */
197
+ ratio:
198
+ | '1344:768'
199
+ | '768:1344'
200
+ | '1024:1024'
201
+ | '1184:864'
202
+ | '864:1184'
203
+ | '1536:672'
204
+ | '832:1248'
205
+ | '1248:832'
206
+ | '896:1152'
207
+ | '1152:896'
208
+ | '2048:2048'
209
+ | '1696:2528'
210
+ | '2528:1696'
211
+ | '1792:2400'
212
+ | '2400:1792'
213
+ | '1856:2304'
214
+ | '2304:1856'
215
+ | '1536:2752'
216
+ | '2752:1536'
217
+ | '3168:1344'
218
+ | '4096:4096'
219
+ | '3392:5056'
220
+ | '5056:3392'
221
+ | '3584:4800'
222
+ | '4800:3584'
223
+ | '3712:4608'
224
+ | '4608:3712'
225
+ | '3072:5504'
226
+ | '5504:3072'
227
+ | '6336:2688';
228
+
229
+ /**
230
+ * An array of up to 14 images to be used as references for the generated image
231
+ * output. Up to five of those images can pass `subject: "human"` to maintain
232
+ * character consistency, and up to nine of those images can pass
233
+ * `subject: "object"` with high-fidelity images of objects to include in the
234
+ * output.
235
+ */
236
+ referenceImages?: Array<Gemini3Pro.ReferenceImage>;
237
+ }
238
+
239
+ export namespace Gemini3Pro {
240
+ export interface ReferenceImage {
241
+ /**
242
+ * Whether this is a reference of a human subject (for character consistency) or an
243
+ * object that appears in the output.
244
+ */
245
+ subject: 'object' | 'human';
246
+
247
+ /**
248
+ * A HTTPS URL.
249
+ */
250
+ uri: string;
251
+
252
+ /**
253
+ * A tag to identify the reference image. This is used to reference the image in
254
+ * prompt text.
255
+ */
169
256
  tag?: string;
170
257
  }
171
258
  }
@@ -208,6 +295,10 @@ export declare namespace TextToImageCreateParams {
208
295
  */
209
296
  uri: string;
210
297
 
298
+ /**
299
+ * A tag to identify the reference image. This is used to reference the image in
300
+ * prompt text.
301
+ */
211
302
  tag?: string;
212
303
  }
213
304
  }
@@ -19,6 +19,9 @@ export class TextToSpeech extends APIResource {
19
19
  }
20
20
 
21
21
  export interface TextToSpeechCreateResponse {
22
+ /**
23
+ * The ID of the task that was created. Use this to retrieve the task later.
24
+ */
22
25
  id: string;
23
26
  }
24
27
 
@@ -19,6 +19,9 @@ export class TextToVideo extends APIResource {
19
19
  }
20
20
 
21
21
  export interface TextToVideoCreateResponse {
22
+ /**
23
+ * The ID of the task that was created. Use this to retrieve the task later.
24
+ */
22
25
  id: string;
23
26
  }
24
27
 
@@ -29,6 +29,9 @@ export class VideoToVideo extends APIResource {
29
29
  }
30
30
 
31
31
  export interface VideoToVideoCreateResponse {
32
+ /**
33
+ * The ID of the task that was created. Use this to retrieve the task later.
34
+ */
32
35
  id: string;
33
36
  }
34
37
 
@@ -28,6 +28,9 @@ export class VideoUpscale extends APIResource {
28
28
  }
29
29
 
30
30
  export interface VideoUpscaleCreateResponse {
31
+ /**
32
+ * The ID of the task that was created. Use this to retrieve the task later.
33
+ */
31
34
  id: string;
32
35
  }
33
36
 
@@ -28,6 +28,9 @@ export class VoiceDubbing extends APIResource {
28
28
  }
29
29
 
30
30
  export interface VoiceDubbingCreateResponse {
31
+ /**
32
+ * The ID of the task that was created. Use this to retrieve the task later.
33
+ */
31
34
  id: string;
32
35
  }
33
36
 
@@ -29,6 +29,9 @@ export class VoiceIsolation extends APIResource {
29
29
  }
30
30
 
31
31
  export interface VoiceIsolationCreateResponse {
32
+ /**
33
+ * The ID of the task that was created. Use this to retrieve the task later.
34
+ */
32
35
  id: string;
33
36
  }
34
37
 
package/src/version.ts CHANGED
@@ -1 +1 @@
1
- export const VERSION = '3.8.0'; // x-release-please-version
1
+ export const VERSION = '3.9.0'; // x-release-please-version
package/version.d.mts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "3.8.0";
1
+ export declare const VERSION = "3.9.0";
2
2
  //# sourceMappingURL=version.d.mts.map
package/version.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "3.8.0";
1
+ export declare const VERSION = "3.9.0";
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 = '3.8.0'; // x-release-please-version
4
+ exports.VERSION = '3.9.0'; // x-release-please-version
5
5
  //# sourceMappingURL=version.js.map
package/version.mjs CHANGED
@@ -1,2 +1,2 @@
1
- export const VERSION = '3.8.0'; // x-release-please-version
1
+ export const VERSION = '3.9.0'; // x-release-please-version
2
2
  //# sourceMappingURL=version.mjs.map