@runwayml/sdk 4.28.0 → 4.30.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 (132) hide show
  1. package/CHANGELOG.md +26 -0
  2. package/README.md +2 -2
  3. package/package.json +1 -1
  4. package/resources/avatar-conversations.d.mts +1 -1
  5. package/resources/avatar-conversations.d.mts.map +1 -1
  6. package/resources/avatar-conversations.d.ts +1 -1
  7. package/resources/avatar-conversations.d.ts.map +1 -1
  8. package/resources/avatar-conversations.js +1 -1
  9. package/resources/avatar-conversations.js.map +1 -1
  10. package/resources/avatar-conversations.mjs +1 -1
  11. package/resources/avatar-conversations.mjs.map +1 -1
  12. package/resources/avatars.d.mts +2 -4
  13. package/resources/avatars.d.mts.map +1 -1
  14. package/resources/avatars.d.ts +2 -4
  15. package/resources/avatars.d.ts.map +1 -1
  16. package/resources/avatars.js +2 -4
  17. package/resources/avatars.js.map +1 -1
  18. package/resources/avatars.mjs +2 -4
  19. package/resources/avatars.mjs.map +1 -1
  20. package/resources/documents.d.mts +4 -10
  21. package/resources/documents.d.mts.map +1 -1
  22. package/resources/documents.d.ts +4 -10
  23. package/resources/documents.d.ts.map +1 -1
  24. package/resources/documents.js +2 -8
  25. package/resources/documents.js.map +1 -1
  26. package/resources/documents.mjs +2 -8
  27. package/resources/documents.mjs.map +1 -1
  28. package/resources/generate/image.d.mts +2 -2
  29. package/resources/generate/image.d.ts +2 -2
  30. package/resources/generate/video.d.mts +5 -0
  31. package/resources/generate/video.d.mts.map +1 -1
  32. package/resources/generate/video.d.ts +5 -0
  33. package/resources/generate/video.d.ts.map +1 -1
  34. package/resources/image-to-video.d.mts +78 -2
  35. package/resources/image-to-video.d.mts.map +1 -1
  36. package/resources/image-to-video.d.ts +78 -2
  37. package/resources/image-to-video.d.ts.map +1 -1
  38. package/resources/organization/index.d.mts +1 -1
  39. package/resources/organization/index.d.mts.map +1 -1
  40. package/resources/organization/index.d.ts +1 -1
  41. package/resources/organization/index.d.ts.map +1 -1
  42. package/resources/organization/index.js.map +1 -1
  43. package/resources/organization/index.mjs.map +1 -1
  44. package/resources/organization/organization.d.mts +54 -5
  45. package/resources/organization/organization.d.mts.map +1 -1
  46. package/resources/organization/organization.d.ts +54 -5
  47. package/resources/organization/organization.d.ts.map +1 -1
  48. package/resources/organization/organization.js +1 -1
  49. package/resources/organization/organization.js.map +1 -1
  50. package/resources/organization/organization.mjs +1 -1
  51. package/resources/organization/organization.mjs.map +1 -1
  52. package/resources/organization/webapp/audit-logs.d.mts +64 -12
  53. package/resources/organization/webapp/audit-logs.d.mts.map +1 -1
  54. package/resources/organization/webapp/audit-logs.d.ts +64 -12
  55. package/resources/organization/webapp/audit-logs.d.ts.map +1 -1
  56. package/resources/organization/webapp/audit-logs.js +1 -1
  57. package/resources/organization/webapp/audit-logs.js.map +1 -1
  58. package/resources/organization/webapp/audit-logs.mjs +1 -1
  59. package/resources/organization/webapp/audit-logs.mjs.map +1 -1
  60. package/resources/organization/webapp/index.d.mts +1 -1
  61. package/resources/organization/webapp/index.d.mts.map +1 -1
  62. package/resources/organization/webapp/index.d.ts +1 -1
  63. package/resources/organization/webapp/index.d.ts.map +1 -1
  64. package/resources/organization/webapp/index.js.map +1 -1
  65. package/resources/organization/webapp/index.mjs.map +1 -1
  66. package/resources/organization/webapp/webapp.d.mts +95 -2
  67. package/resources/organization/webapp/webapp.d.mts.map +1 -1
  68. package/resources/organization/webapp/webapp.d.ts +95 -2
  69. package/resources/organization/webapp/webapp.d.ts.map +1 -1
  70. package/resources/organization/webapp/webapp.js +12 -0
  71. package/resources/organization/webapp/webapp.js.map +1 -1
  72. package/resources/organization/webapp/webapp.mjs +12 -0
  73. package/resources/organization/webapp/webapp.mjs.map +1 -1
  74. package/resources/routers.d.mts +32 -26
  75. package/resources/routers.d.mts.map +1 -1
  76. package/resources/routers.d.ts +32 -26
  77. package/resources/routers.d.ts.map +1 -1
  78. package/resources/routers.js +2 -2
  79. package/resources/routers.js.map +1 -1
  80. package/resources/routers.mjs +2 -2
  81. package/resources/routers.mjs.map +1 -1
  82. package/resources/tasks.d.mts +25 -2
  83. package/resources/tasks.d.mts.map +1 -1
  84. package/resources/tasks.d.ts +25 -2
  85. package/resources/tasks.d.ts.map +1 -1
  86. package/resources/text-to-image.d.mts +204 -1
  87. package/resources/text-to-image.d.mts.map +1 -1
  88. package/resources/text-to-image.d.ts +204 -1
  89. package/resources/text-to-image.d.ts.map +1 -1
  90. package/resources/text-to-speech.d.mts +77 -1
  91. package/resources/text-to-speech.d.mts.map +1 -1
  92. package/resources/text-to-speech.d.ts +77 -1
  93. package/resources/text-to-speech.d.ts.map +1 -1
  94. package/resources/text-to-video.d.mts +94 -3
  95. package/resources/text-to-video.d.mts.map +1 -1
  96. package/resources/text-to-video.d.ts +94 -3
  97. package/resources/text-to-video.d.ts.map +1 -1
  98. package/resources/video-to-video.d.mts +107 -3
  99. package/resources/video-to-video.d.mts.map +1 -1
  100. package/resources/video-to-video.d.ts +107 -3
  101. package/resources/video-to-video.d.ts.map +1 -1
  102. package/resources/voices.d.mts +1 -1
  103. package/resources/voices.d.mts.map +1 -1
  104. package/resources/voices.d.ts +1 -1
  105. package/resources/voices.d.ts.map +1 -1
  106. package/resources/voices.js +1 -1
  107. package/resources/voices.js.map +1 -1
  108. package/resources/voices.mjs +1 -1
  109. package/resources/voices.mjs.map +1 -1
  110. package/src/resources/avatar-conversations.ts +1 -1
  111. package/src/resources/avatars.ts +2 -4
  112. package/src/resources/documents.ts +4 -10
  113. package/src/resources/generate/image.ts +2 -2
  114. package/src/resources/generate/video.ts +6 -0
  115. package/src/resources/image-to-video.ts +105 -2
  116. package/src/resources/organization/index.ts +3 -0
  117. package/src/resources/organization/organization.ts +82 -3
  118. package/src/resources/organization/webapp/audit-logs.ts +144 -10
  119. package/src/resources/organization/webapp/index.ts +3 -0
  120. package/src/resources/organization/webapp/webapp.ts +122 -1
  121. package/src/resources/routers.ts +38 -26
  122. package/src/resources/tasks.ts +33 -2
  123. package/src/resources/text-to-image.ts +350 -1
  124. package/src/resources/text-to-speech.ts +143 -1
  125. package/src/resources/text-to-video.ts +128 -3
  126. package/src/resources/video-to-video.ts +143 -3
  127. package/src/resources/voices.ts +1 -1
  128. package/src/version.ts +1 -1
  129. package/version.d.mts +1 -1
  130. package/version.d.ts +1 -1
  131. package/version.js +1 -1
  132. package/version.mjs +1 -1
@@ -16,6 +16,22 @@ import { RequestOptions } from '../../../internal/request-options';
16
16
  export class Webapp extends APIResource {
17
17
  auditLogs: AuditLogsAPI.AuditLogs = new AuditLogsAPI.AuditLogs(this._client);
18
18
 
19
+ /**
20
+ * List the members of the linked Runway workspaces you administer, one row per
21
+ * member per workspace, including pending invites and members who were removed.
22
+ * Ordered by `membershipId`. Authorized via the account link between this API
23
+ * project and the workspace.
24
+ */
25
+ listMembers(
26
+ query: WebappListMembersParams | null | undefined = {},
27
+ options?: RequestOptions,
28
+ ): PagePromise<WebappListMembersResponsesCursorPage, WebappListMembersResponse> {
29
+ return this._client.getAPIList('/v1/organization/webapp/members', CursorPage<WebappListMembersResponse>, {
30
+ query,
31
+ ...options,
32
+ });
33
+ }
34
+
19
35
  /**
20
36
  * List per-generation credit-usage rows for the linked Runway workspaces you
21
37
  * administer, newest first. Unlike `/v1/organization/usage` (this API project's
@@ -33,8 +49,77 @@ export class Webapp extends APIResource {
33
49
  }
34
50
  }
35
51
 
52
+ export type WebappListMembersResponsesCursorPage = CursorPage<WebappListMembersResponse>;
53
+
36
54
  export type WebappListUsageResponsesCursorPage = CursorPage<WebappListUsageResponse>;
37
55
 
56
+ export interface WebappListMembersResponse {
57
+ /**
58
+ * Why the membership is `deactivated`. `removed`: the member was removed from the
59
+ * workspace. `invite_ended`: the invite was declined or revoked, which are
60
+ * recorded the same way. `suspended`: the user is suspended. `null` unless
61
+ * `status` is `deactivated`.
62
+ */
63
+ deactivationReason: 'removed' | 'invite_ended' | 'suspended' | null;
64
+
65
+ /**
66
+ * Approximately when the member was removed, or the invite was declined or
67
+ * revoked: the membership's last change. `null` when the membership was not ended,
68
+ * including for a suspended user.
69
+ */
70
+ deprovisionedAt: string | null;
71
+
72
+ /**
73
+ * Email of the member, or the email the invite was sent to.
74
+ */
75
+ email: string;
76
+
77
+ /**
78
+ * Last UTC date the member used Runway, on the web or mobile app and in any
79
+ * workspace. `null` when they never accepted the invite or have no recorded
80
+ * activity.
81
+ */
82
+ lastActiveDate: string | null;
83
+
84
+ /**
85
+ * Unique ID of the membership. Stable across requests, so use it to update a
86
+ * member's row between pulls.
87
+ */
88
+ membershipId: number;
89
+
90
+ /**
91
+ * When the member was added, or when the invite was sent.
92
+ */
93
+ provisionedAt: string;
94
+
95
+ /**
96
+ * Role in the workspace. `non-generating-admin` is a Billing Admin.
97
+ */
98
+ role: 'viewer' | 'editor' | 'admin' | 'non-generating-admin';
99
+
100
+ /**
101
+ * `active`: a member of the workspace. `invited`: invited, and the invite is not
102
+ * accepted yet. `deactivated`: no longer a member; `deactivationReason` says why.
103
+ */
104
+ status: 'active' | 'invited' | 'deactivated';
105
+
106
+ /**
107
+ * ID of the member's Runway user. It doesn't change when their email does. `null`
108
+ * for an invite to an email with no Runway account yet.
109
+ */
110
+ userId: number | null;
111
+
112
+ /**
113
+ * ID of the workspace.
114
+ */
115
+ workspaceId: number;
116
+
117
+ /**
118
+ * Name of the workspace.
119
+ */
120
+ workspaceName: string;
121
+ }
122
+
38
123
  export interface WebappListUsageResponse {
39
124
  /**
40
125
  * Credits charged for this generation.
@@ -74,6 +159,21 @@ export interface WebappListUsageResponse {
74
159
  | 'splat'
75
160
  | null;
76
161
 
162
+ /**
163
+ * ID of the Runway web app project the generation was made in (not this API
164
+ * project). `null` when no project is recorded for it, which includes generations
165
+ * made outside a project, generations made before project tracking was rolled out
166
+ * (late May to mid-August 2026), and rows with a null `taskId`.
167
+ */
168
+ projectId: string | null;
169
+
170
+ /**
171
+ * Current name of that project, so it changes when the project is renamed (group
172
+ * by `projectId`). Still returned after the project is archived or deleted. `null`
173
+ * when `projectId` is null.
174
+ */
175
+ projectName: string | null;
176
+
77
177
  /**
78
178
  * Current status of the generation when you request it, so it can change between
79
179
  * pulls (upsert on `transactionId`). A refund row doesn't mean the generation
@@ -130,6 +230,22 @@ export interface WebappListUsageResponse {
130
230
  workspaceName: string;
131
231
  }
132
232
 
233
+ export interface WebappListMembersParams extends CursorPageParams {
234
+ /**
235
+ * Organization to report on. Optional when this API project is linked to a single
236
+ * organization; required when it is linked to more than one. If it is missing
237
+ * then, the 400 response lists the IDs and names of the linked organizations in
238
+ * `details.organizations`.
239
+ */
240
+ organizationId?: string;
241
+
242
+ /**
243
+ * Restrict results to these workspace IDs, as a comma-separated list of up to 50
244
+ * IDs. Defaults to every workspace you administer in the organization.
245
+ */
246
+ workspaceIds?: string;
247
+ }
248
+
133
249
  export interface WebappListUsageParams extends CursorPageParams {
134
250
  /**
135
251
  * Start of the time window (inclusive), ISO-8601 datetime or date. A date means
@@ -146,7 +262,9 @@ export interface WebappListUsageParams extends CursorPageParams {
146
262
 
147
263
  /**
148
264
  * Organization to report on. Optional when this API project is linked to a single
149
- * organization; required when it is linked to more than one.
265
+ * organization; required when it is linked to more than one. If it is missing
266
+ * then, the 400 response lists the IDs and names of the linked organizations in
267
+ * `details.organizations`.
150
268
  */
151
269
  organizationId?: string;
152
270
 
@@ -161,8 +279,11 @@ Webapp.AuditLogs = AuditLogs;
161
279
 
162
280
  export declare namespace Webapp {
163
281
  export {
282
+ type WebappListMembersResponse as WebappListMembersResponse,
164
283
  type WebappListUsageResponse as WebappListUsageResponse,
284
+ type WebappListMembersResponsesCursorPage as WebappListMembersResponsesCursorPage,
165
285
  type WebappListUsageResponsesCursorPage as WebappListUsageResponsesCursorPage,
286
+ type WebappListMembersParams as WebappListMembersParams,
166
287
  type WebappListUsageParams as WebappListUsageParams,
167
288
  };
168
289
 
@@ -40,7 +40,7 @@ export class Routers extends APIResource {
40
40
  * cursor-based pagination.
41
41
  */
42
42
  list(
43
- query: RouterListParams,
43
+ query: RouterListParams | null | undefined = {},
44
44
  options?: RequestOptions,
45
45
  ): PagePromise<RouterListResponsesCursorPage, RouterListResponse> {
46
46
  return this._client.getAPIList('/v1/routers', CursorPage<RouterListResponse>, { query, ...options });
@@ -63,7 +63,7 @@ export class Routers extends APIResource {
63
63
  */
64
64
  listRequests(
65
65
  id: string,
66
- query: RouterListRequestsParams,
66
+ query: RouterListRequestsParams | null | undefined = {},
67
67
  options?: RequestOptions,
68
68
  ): PagePromise<RouterListRequestsResponsesCursorPage, RouterListRequestsResponse> {
69
69
  return this._client.getAPIList(path`/v1/routers/${id}/requests`, CursorPage<RouterListRequestsResponse>, {
@@ -142,8 +142,8 @@ export namespace RouterCreateResponse {
142
142
 
143
143
  /**
144
144
  * When mode is allow_new_except, ids are excluded; when allowlist_only, ids are
145
- * the only allowed values. Each id must be a known public video or image model
146
- * name (unknown ids are rejected on create/update).
145
+ * the only allowed values. Each id must be a known public video, image, audio, or
146
+ * mesh model name (unknown ids are rejected on create/update).
147
147
  */
148
148
  models?: Settings.Models;
149
149
 
@@ -177,13 +177,15 @@ export namespace RouterCreateResponse {
177
177
 
178
178
  image?: number;
179
179
 
180
+ mesh?: number;
181
+
180
182
  video?: number;
181
183
  }
182
184
 
183
185
  /**
184
186
  * When mode is allow_new_except, ids are excluded; when allowlist_only, ids are
185
- * the only allowed values. Each id must be a known public video or image model
186
- * name (unknown ids are rejected on create/update).
187
+ * the only allowed values. Each id must be a known public video, image, audio, or
188
+ * mesh model name (unknown ids are rejected on create/update).
187
189
  */
188
190
  export interface Models {
189
191
  ids: Array<string>;
@@ -258,8 +260,8 @@ export namespace RouterRetrieveResponse {
258
260
 
259
261
  /**
260
262
  * When mode is allow_new_except, ids are excluded; when allowlist_only, ids are
261
- * the only allowed values. Each id must be a known public video or image model
262
- * name (unknown ids are rejected on create/update).
263
+ * the only allowed values. Each id must be a known public video, image, audio, or
264
+ * mesh model name (unknown ids are rejected on create/update).
263
265
  */
264
266
  models?: Settings.Models;
265
267
 
@@ -293,13 +295,15 @@ export namespace RouterRetrieveResponse {
293
295
 
294
296
  image?: number;
295
297
 
298
+ mesh?: number;
299
+
296
300
  video?: number;
297
301
  }
298
302
 
299
303
  /**
300
304
  * When mode is allow_new_except, ids are excluded; when allowlist_only, ids are
301
- * the only allowed values. Each id must be a known public video or image model
302
- * name (unknown ids are rejected on create/update).
305
+ * the only allowed values. Each id must be a known public video, image, audio, or
306
+ * mesh model name (unknown ids are rejected on create/update).
303
307
  */
304
308
  export interface Models {
305
309
  ids: Array<string>;
@@ -374,8 +378,8 @@ export namespace RouterUpdateResponse {
374
378
 
375
379
  /**
376
380
  * When mode is allow_new_except, ids are excluded; when allowlist_only, ids are
377
- * the only allowed values. Each id must be a known public video or image model
378
- * name (unknown ids are rejected on create/update).
381
+ * the only allowed values. Each id must be a known public video, image, audio, or
382
+ * mesh model name (unknown ids are rejected on create/update).
379
383
  */
380
384
  models?: Settings.Models;
381
385
 
@@ -409,13 +413,15 @@ export namespace RouterUpdateResponse {
409
413
 
410
414
  image?: number;
411
415
 
416
+ mesh?: number;
417
+
412
418
  video?: number;
413
419
  }
414
420
 
415
421
  /**
416
422
  * When mode is allow_new_except, ids are excluded; when allowlist_only, ids are
417
- * the only allowed values. Each id must be a known public video or image model
418
- * name (unknown ids are rejected on create/update).
423
+ * the only allowed values. Each id must be a known public video, image, audio, or
424
+ * mesh model name (unknown ids are rejected on create/update).
419
425
  */
420
426
  export interface Models {
421
427
  ids: Array<string>;
@@ -493,8 +499,8 @@ export namespace RouterListResponse {
493
499
 
494
500
  /**
495
501
  * When mode is allow_new_except, ids are excluded; when allowlist_only, ids are
496
- * the only allowed values. Each id must be a known public video or image model
497
- * name (unknown ids are rejected on create/update).
502
+ * the only allowed values. Each id must be a known public video, image, audio, or
503
+ * mesh model name (unknown ids are rejected on create/update).
498
504
  */
499
505
  models?: Settings.Models;
500
506
 
@@ -528,13 +534,15 @@ export namespace RouterListResponse {
528
534
 
529
535
  image?: number;
530
536
 
537
+ mesh?: number;
538
+
531
539
  video?: number;
532
540
  }
533
541
 
534
542
  /**
535
543
  * When mode is allow_new_except, ids are excluded; when allowlist_only, ids are
536
- * the only allowed values. Each id must be a known public video or image model
537
- * name (unknown ids are rejected on create/update).
544
+ * the only allowed values. Each id must be a known public video, image, audio, or
545
+ * mesh model name (unknown ids are rejected on create/update).
538
546
  */
539
547
  export interface Models {
540
548
  ids: Array<string>;
@@ -697,8 +705,8 @@ export namespace RouterCreateParams {
697
705
 
698
706
  /**
699
707
  * When mode is allow_new_except, ids are excluded; when allowlist_only, ids are
700
- * the only allowed values. Each id must be a known public video or image model
701
- * name (unknown ids are rejected on create/update).
708
+ * the only allowed values. Each id must be a known public video, image, audio, or
709
+ * mesh model name (unknown ids are rejected on create/update).
702
710
  */
703
711
  models?: Settings.Models;
704
712
 
@@ -738,13 +746,15 @@ export namespace RouterCreateParams {
738
746
 
739
747
  image?: number;
740
748
 
749
+ mesh?: number;
750
+
741
751
  video?: number;
742
752
  }
743
753
 
744
754
  /**
745
755
  * When mode is allow_new_except, ids are excluded; when allowlist_only, ids are
746
- * the only allowed values. Each id must be a known public video or image model
747
- * name (unknown ids are rejected on create/update).
756
+ * the only allowed values. Each id must be a known public video, image, audio, or
757
+ * mesh model name (unknown ids are rejected on create/update).
748
758
  */
749
759
  export interface Models {
750
760
  ids: Array<string>;
@@ -795,8 +805,8 @@ export namespace RouterUpdateParams {
795
805
 
796
806
  /**
797
807
  * When mode is allow_new_except, ids are excluded; when allowlist_only, ids are
798
- * the only allowed values. Each id must be a known public video or image model
799
- * name (unknown ids are rejected on create/update).
808
+ * the only allowed values. Each id must be a known public video, image, audio, or
809
+ * mesh model name (unknown ids are rejected on create/update).
800
810
  */
801
811
  models?: Settings.Models;
802
812
 
@@ -836,13 +846,15 @@ export namespace RouterUpdateParams {
836
846
 
837
847
  image?: number | null;
838
848
 
849
+ mesh?: number | null;
850
+
839
851
  video?: number | null;
840
852
  }
841
853
 
842
854
  /**
843
855
  * When mode is allow_new_except, ids are excluded; when allowlist_only, ids are
844
- * the only allowed values. Each id must be a known public video or image model
845
- * name (unknown ids are rejected on create/update).
856
+ * the only allowed values. Each id must be a known public video, image, audio, or
857
+ * mesh model name (unknown ids are rejected on create/update).
846
858
  */
847
859
  export interface Models {
848
860
  ids: Array<string>;
@@ -275,8 +275,14 @@ export namespace TaskRetrieveResponse {
275
275
  status: 'SUCCEEDED';
276
276
 
277
277
  /**
278
- * Layer details for successful Seedream layer decomposition tasks. Each URI
279
- * matches the output URL at the same index.
278
+ * The ads an ad generation task made. Each URI matches the output URL at the same
279
+ * index.
280
+ */
281
+ ads?: Array<Succeeded.Ad>;
282
+
283
+ /**
284
+ * Layer details for successful layer decomposition tasks. Each URI matches the
285
+ * output URL at the same index.
280
286
  */
281
287
  layers?: Array<Succeeded.Layer>;
282
288
  }
@@ -293,6 +299,31 @@ export namespace TaskRetrieveResponse {
293
299
  credits: number;
294
300
  }
295
301
 
302
+ export interface Ad {
303
+ /**
304
+ * Which version this is, such as "9:16, Spanish".
305
+ */
306
+ label: string;
307
+
308
+ mediaType: 'image' | 'video';
309
+
310
+ /**
311
+ * An ephemeral URL for this ad, matching output at the same index.
312
+ */
313
+ uri: string;
314
+
315
+ durationSeconds?: number;
316
+
317
+ height?: number;
318
+
319
+ /**
320
+ * The post copy to run with the ad, when there is any.
321
+ */
322
+ postText?: string;
323
+
324
+ width?: number;
325
+ }
326
+
296
327
  export interface Layer {
297
328
  /**
298
329
  * An ephemeral URL for this layer, matching output at the same index.