@runwayml/sdk 3.14.3 → 3.15.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 +35 -0
- package/README.md +31 -0
- package/client.d.mts +52 -1
- package/client.d.mts.map +1 -1
- package/client.d.ts +52 -1
- package/client.d.ts.map +1 -1
- package/client.js +63 -17
- package/client.js.map +1 -1
- package/client.mjs +63 -17
- package/client.mjs.map +1 -1
- package/core/pagination.d.mts +54 -0
- package/core/pagination.d.mts.map +1 -0
- package/core/pagination.d.ts +54 -0
- package/core/pagination.d.ts.map +1 -0
- package/core/pagination.js +101 -0
- package/core/pagination.js.map +1 -0
- package/core/pagination.mjs +95 -0
- package/core/pagination.mjs.map +1 -0
- package/index.d.mts +1 -0
- package/index.d.mts.map +1 -1
- package/index.d.ts +1 -0
- package/index.d.ts.map +1 -1
- package/index.js +3 -1
- package/index.js.map +1 -1
- package/index.mjs +1 -0
- package/index.mjs.map +1 -1
- package/internal/tslib.js +17 -17
- package/internal/utils/query.d.mts +5 -0
- package/internal/utils/query.d.mts.map +1 -0
- package/internal/utils/query.d.ts +5 -0
- package/internal/utils/query.d.ts.map +1 -0
- package/internal/utils/query.js +23 -0
- package/internal/utils/query.js.map +1 -0
- package/internal/utils/query.mjs +20 -0
- package/internal/utils/query.mjs.map +1 -0
- package/internal/utils.d.mts +1 -0
- package/internal/utils.d.ts +1 -0
- package/internal/utils.js +1 -0
- package/internal/utils.js.map +1 -1
- package/internal/utils.mjs +1 -0
- package/package.json +22 -1
- package/pagination.d.mts +2 -0
- package/pagination.d.mts.map +1 -0
- package/pagination.d.ts +2 -0
- package/pagination.d.ts.map +1 -0
- package/pagination.js +6 -0
- package/pagination.js.map +1 -0
- package/pagination.mjs +2 -0
- package/pagination.mjs.map +1 -0
- package/resources/avatars.d.mts +1308 -0
- package/resources/avatars.d.mts.map +1 -0
- package/resources/avatars.d.ts +1308 -0
- package/resources/avatars.d.ts.map +1 -0
- package/resources/avatars.js +87 -0
- package/resources/avatars.js.map +1 -0
- package/resources/avatars.mjs +83 -0
- package/resources/avatars.mjs.map +1 -0
- package/resources/character-performance.d.mts +3 -0
- package/resources/character-performance.d.mts.map +1 -1
- package/resources/character-performance.d.ts +3 -0
- package/resources/character-performance.d.ts.map +1 -1
- package/resources/character-performance.js +3 -0
- package/resources/character-performance.js.map +1 -1
- package/resources/character-performance.mjs +3 -0
- package/resources/character-performance.mjs.map +1 -1
- package/resources/documents.d.mts +209 -0
- package/resources/documents.d.mts.map +1 -0
- package/resources/documents.d.ts +209 -0
- package/resources/documents.d.ts.map +1 -0
- package/resources/documents.js +75 -0
- package/resources/documents.js.map +1 -0
- package/resources/documents.mjs +71 -0
- package/resources/documents.mjs.map +1 -0
- package/resources/image-to-video.d.mts +3 -0
- package/resources/image-to-video.d.mts.map +1 -1
- package/resources/image-to-video.d.ts +3 -0
- package/resources/image-to-video.d.ts.map +1 -1
- package/resources/image-to-video.js +3 -0
- package/resources/image-to-video.js.map +1 -1
- package/resources/image-to-video.mjs +3 -0
- package/resources/image-to-video.mjs.map +1 -1
- package/resources/index.d.mts +4 -0
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +4 -0
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +9 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +4 -0
- package/resources/index.mjs.map +1 -1
- package/resources/organization.d.mts +2 -2
- package/resources/organization.d.mts.map +1 -1
- package/resources/organization.d.ts +2 -2
- package/resources/organization.d.ts.map +1 -1
- package/resources/realtime-sessions.d.mts +180 -0
- package/resources/realtime-sessions.d.mts.map +1 -0
- package/resources/realtime-sessions.d.ts +180 -0
- package/resources/realtime-sessions.d.ts.map +1 -0
- package/resources/realtime-sessions.js +32 -0
- package/resources/realtime-sessions.js.map +1 -0
- package/resources/realtime-sessions.mjs +28 -0
- package/resources/realtime-sessions.mjs.map +1 -0
- package/resources/sound-effect.d.mts +3 -0
- package/resources/sound-effect.d.mts.map +1 -1
- package/resources/sound-effect.d.ts +3 -0
- package/resources/sound-effect.d.ts.map +1 -1
- package/resources/sound-effect.js +3 -0
- package/resources/sound-effect.js.map +1 -1
- package/resources/sound-effect.mjs +3 -0
- package/resources/sound-effect.mjs.map +1 -1
- package/resources/speech-to-speech.d.mts +3 -0
- package/resources/speech-to-speech.d.mts.map +1 -1
- package/resources/speech-to-speech.d.ts +3 -0
- package/resources/speech-to-speech.d.ts.map +1 -1
- package/resources/speech-to-speech.js +3 -0
- package/resources/speech-to-speech.js.map +1 -1
- package/resources/speech-to-speech.mjs +3 -0
- package/resources/speech-to-speech.mjs.map +1 -1
- package/resources/tasks.d.mts +3 -0
- package/resources/tasks.d.mts.map +1 -1
- package/resources/tasks.d.ts +3 -0
- package/resources/tasks.d.ts.map +1 -1
- package/resources/tasks.js +3 -0
- package/resources/tasks.js.map +1 -1
- package/resources/tasks.mjs +3 -0
- package/resources/tasks.mjs.map +1 -1
- package/resources/text-to-image.d.mts +3 -0
- package/resources/text-to-image.d.mts.map +1 -1
- package/resources/text-to-image.d.ts +3 -0
- package/resources/text-to-image.d.ts.map +1 -1
- package/resources/text-to-image.js +3 -0
- package/resources/text-to-image.js.map +1 -1
- package/resources/text-to-image.mjs +3 -0
- package/resources/text-to-image.mjs.map +1 -1
- package/resources/text-to-speech.d.mts +3 -0
- package/resources/text-to-speech.d.mts.map +1 -1
- package/resources/text-to-speech.d.ts +3 -0
- package/resources/text-to-speech.d.ts.map +1 -1
- package/resources/text-to-speech.js +3 -0
- package/resources/text-to-speech.js.map +1 -1
- package/resources/text-to-speech.mjs +3 -0
- package/resources/text-to-speech.mjs.map +1 -1
- package/resources/text-to-video.d.mts +3 -0
- package/resources/text-to-video.d.mts.map +1 -1
- package/resources/text-to-video.d.ts +3 -0
- package/resources/text-to-video.d.ts.map +1 -1
- package/resources/text-to-video.js +3 -0
- package/resources/text-to-video.js.map +1 -1
- package/resources/text-to-video.mjs +3 -0
- package/resources/text-to-video.mjs.map +1 -1
- package/resources/video-to-video.d.mts +3 -0
- package/resources/video-to-video.d.mts.map +1 -1
- package/resources/video-to-video.d.ts +3 -0
- package/resources/video-to-video.d.ts.map +1 -1
- package/resources/video-to-video.js +3 -0
- package/resources/video-to-video.js.map +1 -1
- package/resources/video-to-video.mjs +3 -0
- package/resources/video-to-video.mjs.map +1 -1
- package/resources/voice-dubbing.d.mts +3 -0
- package/resources/voice-dubbing.d.mts.map +1 -1
- package/resources/voice-dubbing.d.ts +3 -0
- package/resources/voice-dubbing.d.ts.map +1 -1
- package/resources/voice-dubbing.js +3 -0
- package/resources/voice-dubbing.js.map +1 -1
- package/resources/voice-dubbing.mjs +3 -0
- package/resources/voice-dubbing.mjs.map +1 -1
- package/resources/voice-isolation.d.mts +3 -0
- package/resources/voice-isolation.d.mts.map +1 -1
- package/resources/voice-isolation.d.ts +3 -0
- package/resources/voice-isolation.d.ts.map +1 -1
- package/resources/voice-isolation.js +3 -0
- package/resources/voice-isolation.js.map +1 -1
- package/resources/voice-isolation.mjs +3 -0
- package/resources/voice-isolation.mjs.map +1 -1
- package/resources/voices.d.mts +257 -0
- package/resources/voices.d.mts.map +1 -0
- package/resources/voices.d.ts +257 -0
- package/resources/voices.d.ts.map +1 -0
- package/resources/voices.js +47 -0
- package/resources/voices.js.map +1 -0
- package/resources/voices.mjs +43 -0
- package/resources/voices.mjs.map +1 -0
- package/src/client.ts +159 -22
- package/src/core/pagination.ts +157 -0
- package/src/index.ts +1 -0
- package/src/internal/utils/query.ts +23 -0
- package/src/internal/utils.ts +1 -0
- package/src/pagination.ts +2 -0
- package/src/resources/avatars.ts +2049 -0
- package/src/resources/character-performance.ts +3 -0
- package/src/resources/documents.ts +270 -0
- package/src/resources/image-to-video.ts +3 -0
- package/src/resources/index.ts +37 -0
- package/src/resources/organization.ts +5 -1
- package/src/resources/realtime-sessions.ts +251 -0
- package/src/resources/sound-effect.ts +3 -0
- package/src/resources/speech-to-speech.ts +3 -0
- package/src/resources/tasks.ts +3 -0
- package/src/resources/text-to-image.ts +3 -0
- package/src/resources/text-to-speech.ts +3 -0
- package/src/resources/text-to-video.ts +3 -0
- package/src/resources/video-to-video.ts +3 -0
- package/src/resources/voice-dubbing.ts +3 -0
- package/src/resources/voice-isolation.ts +3 -0
- package/src/resources/voices.ts +345 -0
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
|
@@ -4,6 +4,9 @@ import { APIResource } from '../core/resource';
|
|
|
4
4
|
import { RequestOptions } from '../internal/request-options';
|
|
5
5
|
import { APIPromiseWithAwaitableTask, wrapAsWaitableResource } from '../lib/polling';
|
|
6
6
|
|
|
7
|
+
/**
|
|
8
|
+
* These endpoints all kick off tasks to create generations.
|
|
9
|
+
*/
|
|
7
10
|
export class CharacterPerformance extends APIResource {
|
|
8
11
|
/**
|
|
9
12
|
* This endpoint will start a new task to control a character's facial expressions
|
|
@@ -0,0 +1,270 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
import { APIResource } from '../core/resource';
|
|
4
|
+
import { APIPromise } from '../core/api-promise';
|
|
5
|
+
import { CursorPage, type CursorPageParams, PagePromise } from '../core/pagination';
|
|
6
|
+
import { buildHeaders } from '../internal/headers';
|
|
7
|
+
import { RequestOptions } from '../internal/request-options';
|
|
8
|
+
import { path } from '../internal/utils/path';
|
|
9
|
+
|
|
10
|
+
export class Documents extends APIResource {
|
|
11
|
+
/**
|
|
12
|
+
* Create a new knowledge document. Documents can be attached to avatars to provide
|
|
13
|
+
* additional context during conversations.
|
|
14
|
+
*
|
|
15
|
+
* @example
|
|
16
|
+
* ```ts
|
|
17
|
+
* const document = await client.documents.create({
|
|
18
|
+
* content:
|
|
19
|
+
* '# Product FAQ\n\n## What is your return policy?\n\nWe offer a 30-day return policy...',
|
|
20
|
+
* name: 'Product FAQ',
|
|
21
|
+
* });
|
|
22
|
+
* ```
|
|
23
|
+
*/
|
|
24
|
+
create(body: DocumentCreateParams, options?: RequestOptions): APIPromise<DocumentCreateResponse> {
|
|
25
|
+
return this._client.post('/v1/documents', { body, ...options });
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* Get details of a specific knowledge document.
|
|
30
|
+
*
|
|
31
|
+
* @example
|
|
32
|
+
* ```ts
|
|
33
|
+
* const document = await client.documents.retrieve(
|
|
34
|
+
* '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
|
|
35
|
+
* );
|
|
36
|
+
* ```
|
|
37
|
+
*/
|
|
38
|
+
retrieve(id: string, options?: RequestOptions): APIPromise<DocumentRetrieveResponse> {
|
|
39
|
+
return this._client.get(path`/v1/documents/${id}`, options);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* List knowledge documents for the authenticated user with cursor-based
|
|
44
|
+
* pagination.
|
|
45
|
+
*
|
|
46
|
+
* @example
|
|
47
|
+
* ```ts
|
|
48
|
+
* // Automatically fetches more pages as needed.
|
|
49
|
+
* for await (const documentListResponse of client.documents.list(
|
|
50
|
+
* { limit: 1 },
|
|
51
|
+
* )) {
|
|
52
|
+
* // ...
|
|
53
|
+
* }
|
|
54
|
+
* ```
|
|
55
|
+
*/
|
|
56
|
+
list(
|
|
57
|
+
query: DocumentListParams,
|
|
58
|
+
options?: RequestOptions,
|
|
59
|
+
): PagePromise<DocumentListResponsesCursorPage, DocumentListResponse> {
|
|
60
|
+
return this._client.getAPIList('/v1/documents', CursorPage<DocumentListResponse>, { query, ...options });
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
/**
|
|
64
|
+
* Delete a knowledge document. This also removes it from all avatars it was
|
|
65
|
+
* attached to.
|
|
66
|
+
*
|
|
67
|
+
* @example
|
|
68
|
+
* ```ts
|
|
69
|
+
* await client.documents.delete(
|
|
70
|
+
* '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
|
|
71
|
+
* );
|
|
72
|
+
* ```
|
|
73
|
+
*/
|
|
74
|
+
delete(id: string, options?: RequestOptions): APIPromise<void> {
|
|
75
|
+
return this._client.delete(path`/v1/documents/${id}`, {
|
|
76
|
+
...options,
|
|
77
|
+
headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
|
|
78
|
+
});
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
export type DocumentListResponsesCursorPage = CursorPage<DocumentListResponse>;
|
|
83
|
+
|
|
84
|
+
export interface DocumentCreateResponse {
|
|
85
|
+
/**
|
|
86
|
+
* The unique identifier of the document.
|
|
87
|
+
*/
|
|
88
|
+
id: string;
|
|
89
|
+
|
|
90
|
+
/**
|
|
91
|
+
* The full content of the document.
|
|
92
|
+
*/
|
|
93
|
+
content: string;
|
|
94
|
+
|
|
95
|
+
/**
|
|
96
|
+
* When the document was created.
|
|
97
|
+
*/
|
|
98
|
+
createdAt: string;
|
|
99
|
+
|
|
100
|
+
/**
|
|
101
|
+
* The name of the document.
|
|
102
|
+
*/
|
|
103
|
+
name: string;
|
|
104
|
+
|
|
105
|
+
/**
|
|
106
|
+
* The type of document.
|
|
107
|
+
*/
|
|
108
|
+
type: 'text' | 'file';
|
|
109
|
+
|
|
110
|
+
/**
|
|
111
|
+
* When the document was last updated.
|
|
112
|
+
*/
|
|
113
|
+
updatedAt: string;
|
|
114
|
+
|
|
115
|
+
/**
|
|
116
|
+
* Avatars that use this document. Always empty for newly created documents.
|
|
117
|
+
*/
|
|
118
|
+
usedBy: Array<DocumentCreateResponse.UsedBy>;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
export namespace DocumentCreateResponse {
|
|
122
|
+
export interface UsedBy {
|
|
123
|
+
/**
|
|
124
|
+
* The avatar ID.
|
|
125
|
+
*/
|
|
126
|
+
id: string;
|
|
127
|
+
|
|
128
|
+
/**
|
|
129
|
+
* URL to the avatar image, or null if not yet processed.
|
|
130
|
+
*/
|
|
131
|
+
imageUrl: string | null;
|
|
132
|
+
|
|
133
|
+
/**
|
|
134
|
+
* The avatar name.
|
|
135
|
+
*/
|
|
136
|
+
name: string;
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
export interface DocumentRetrieveResponse {
|
|
141
|
+
/**
|
|
142
|
+
* The unique identifier of the document.
|
|
143
|
+
*/
|
|
144
|
+
id: string;
|
|
145
|
+
|
|
146
|
+
/**
|
|
147
|
+
* The full content of the document.
|
|
148
|
+
*/
|
|
149
|
+
content: string;
|
|
150
|
+
|
|
151
|
+
/**
|
|
152
|
+
* When the document was created.
|
|
153
|
+
*/
|
|
154
|
+
createdAt: string;
|
|
155
|
+
|
|
156
|
+
/**
|
|
157
|
+
* The name of the document.
|
|
158
|
+
*/
|
|
159
|
+
name: string;
|
|
160
|
+
|
|
161
|
+
/**
|
|
162
|
+
* The type of document.
|
|
163
|
+
*/
|
|
164
|
+
type: 'text' | 'file';
|
|
165
|
+
|
|
166
|
+
/**
|
|
167
|
+
* When the document was last updated.
|
|
168
|
+
*/
|
|
169
|
+
updatedAt: string;
|
|
170
|
+
|
|
171
|
+
/**
|
|
172
|
+
* Avatars that use this document.
|
|
173
|
+
*/
|
|
174
|
+
usedBy: Array<DocumentRetrieveResponse.UsedBy>;
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
export namespace DocumentRetrieveResponse {
|
|
178
|
+
export interface UsedBy {
|
|
179
|
+
/**
|
|
180
|
+
* The avatar ID.
|
|
181
|
+
*/
|
|
182
|
+
id: string;
|
|
183
|
+
|
|
184
|
+
/**
|
|
185
|
+
* URL to the avatar image, or null if not yet processed.
|
|
186
|
+
*/
|
|
187
|
+
imageUrl: string | null;
|
|
188
|
+
|
|
189
|
+
/**
|
|
190
|
+
* The avatar name.
|
|
191
|
+
*/
|
|
192
|
+
name: string;
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
export interface DocumentListResponse {
|
|
197
|
+
/**
|
|
198
|
+
* The unique identifier of the document.
|
|
199
|
+
*/
|
|
200
|
+
id: string;
|
|
201
|
+
|
|
202
|
+
/**
|
|
203
|
+
* When the document was created.
|
|
204
|
+
*/
|
|
205
|
+
createdAt: string;
|
|
206
|
+
|
|
207
|
+
/**
|
|
208
|
+
* The name of the document.
|
|
209
|
+
*/
|
|
210
|
+
name: string;
|
|
211
|
+
|
|
212
|
+
/**
|
|
213
|
+
* The type of document.
|
|
214
|
+
*/
|
|
215
|
+
type: 'text' | 'file';
|
|
216
|
+
|
|
217
|
+
/**
|
|
218
|
+
* When the document was last updated.
|
|
219
|
+
*/
|
|
220
|
+
updatedAt: string;
|
|
221
|
+
|
|
222
|
+
/**
|
|
223
|
+
* Avatars that use this document.
|
|
224
|
+
*/
|
|
225
|
+
usedBy: Array<DocumentListResponse.UsedBy>;
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
export namespace DocumentListResponse {
|
|
229
|
+
export interface UsedBy {
|
|
230
|
+
/**
|
|
231
|
+
* The avatar ID.
|
|
232
|
+
*/
|
|
233
|
+
id: string;
|
|
234
|
+
|
|
235
|
+
/**
|
|
236
|
+
* URL to the avatar image, or null if not yet processed.
|
|
237
|
+
*/
|
|
238
|
+
imageUrl: string | null;
|
|
239
|
+
|
|
240
|
+
/**
|
|
241
|
+
* The avatar name.
|
|
242
|
+
*/
|
|
243
|
+
name: string;
|
|
244
|
+
}
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
export interface DocumentCreateParams {
|
|
248
|
+
/**
|
|
249
|
+
* The markdown or plain text content of the document.
|
|
250
|
+
*/
|
|
251
|
+
content: string;
|
|
252
|
+
|
|
253
|
+
/**
|
|
254
|
+
* A descriptive name for the document.
|
|
255
|
+
*/
|
|
256
|
+
name: string;
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
export interface DocumentListParams extends CursorPageParams {}
|
|
260
|
+
|
|
261
|
+
export declare namespace Documents {
|
|
262
|
+
export {
|
|
263
|
+
type DocumentCreateResponse as DocumentCreateResponse,
|
|
264
|
+
type DocumentRetrieveResponse as DocumentRetrieveResponse,
|
|
265
|
+
type DocumentListResponse as DocumentListResponse,
|
|
266
|
+
type DocumentListResponsesCursorPage as DocumentListResponsesCursorPage,
|
|
267
|
+
type DocumentCreateParams as DocumentCreateParams,
|
|
268
|
+
type DocumentListParams as DocumentListParams,
|
|
269
|
+
};
|
|
270
|
+
}
|
|
@@ -4,6 +4,9 @@ import { APIResource } from '../core/resource';
|
|
|
4
4
|
import { RequestOptions } from '../internal/request-options';
|
|
5
5
|
import { APIPromiseWithAwaitableTask, wrapAsWaitableResource } from '../lib/polling';
|
|
6
6
|
|
|
7
|
+
/**
|
|
8
|
+
* These endpoints all kick off tasks to create generations.
|
|
9
|
+
*/
|
|
7
10
|
export class ImageToVideo extends APIResource {
|
|
8
11
|
/**
|
|
9
12
|
* This endpoint will start a new task to generate a video from an image.
|
package/src/resources/index.ts
CHANGED
|
@@ -1,10 +1,30 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
|
|
3
|
+
export {
|
|
4
|
+
Avatars,
|
|
5
|
+
type AvatarCreateResponse,
|
|
6
|
+
type AvatarRetrieveResponse,
|
|
7
|
+
type AvatarUpdateResponse,
|
|
8
|
+
type AvatarListResponse,
|
|
9
|
+
type AvatarCreateParams,
|
|
10
|
+
type AvatarUpdateParams,
|
|
11
|
+
type AvatarListParams,
|
|
12
|
+
type AvatarListResponsesCursorPage,
|
|
13
|
+
} from './avatars';
|
|
3
14
|
export {
|
|
4
15
|
CharacterPerformance,
|
|
5
16
|
type CharacterPerformanceCreateResponse,
|
|
6
17
|
type CharacterPerformanceCreateParams,
|
|
7
18
|
} from './character-performance';
|
|
19
|
+
export {
|
|
20
|
+
Documents,
|
|
21
|
+
type DocumentCreateResponse,
|
|
22
|
+
type DocumentRetrieveResponse,
|
|
23
|
+
type DocumentListResponse,
|
|
24
|
+
type DocumentCreateParams,
|
|
25
|
+
type DocumentListParams,
|
|
26
|
+
type DocumentListResponsesCursorPage,
|
|
27
|
+
} from './documents';
|
|
8
28
|
export {
|
|
9
29
|
ImageToVideo,
|
|
10
30
|
type ImageToVideoCreateResponse,
|
|
@@ -16,6 +36,12 @@ export {
|
|
|
16
36
|
type OrganizationRetrieveUsageResponse,
|
|
17
37
|
type OrganizationRetrieveUsageParams,
|
|
18
38
|
} from './organization';
|
|
39
|
+
export {
|
|
40
|
+
RealtimeSessions,
|
|
41
|
+
type RealtimeSessionCreateResponse,
|
|
42
|
+
type RealtimeSessionRetrieveResponse,
|
|
43
|
+
type RealtimeSessionCreateParams,
|
|
44
|
+
} from './realtime-sessions';
|
|
19
45
|
export { SoundEffect, type SoundEffectCreateResponse, type SoundEffectCreateParams } from './sound-effect';
|
|
20
46
|
export {
|
|
21
47
|
SpeechToSpeech,
|
|
@@ -45,4 +71,15 @@ export {
|
|
|
45
71
|
type VoiceIsolationCreateResponse,
|
|
46
72
|
type VoiceIsolationCreateParams,
|
|
47
73
|
} from './voice-isolation';
|
|
74
|
+
export {
|
|
75
|
+
Voices,
|
|
76
|
+
type VoiceCreateResponse,
|
|
77
|
+
type VoiceRetrieveResponse,
|
|
78
|
+
type VoiceListResponse,
|
|
79
|
+
type VoicePreviewResponse,
|
|
80
|
+
type VoiceCreateParams,
|
|
81
|
+
type VoiceListParams,
|
|
82
|
+
type VoicePreviewParams,
|
|
83
|
+
type VoiceListResponsesCursorPage,
|
|
84
|
+
} from './voices';
|
|
48
85
|
export { Uploads, type UploadCreateEphemeralResponse, type UploadsCreateEphemeralParams } from './uploads';
|
|
@@ -117,6 +117,8 @@ export interface OrganizationRetrieveUsageResponse {
|
|
|
117
117
|
| 'eleven_voice_isolation'
|
|
118
118
|
| 'eleven_voice_dubbing'
|
|
119
119
|
| 'eleven_multilingual_sts_v2'
|
|
120
|
+
| 'gwm1_avatars'
|
|
121
|
+
| 'voice_processing'
|
|
120
122
|
>;
|
|
121
123
|
|
|
122
124
|
results: Array<OrganizationRetrieveUsageResponse.Result>;
|
|
@@ -162,7 +164,9 @@ export namespace OrganizationRetrieveUsageResponse {
|
|
|
162
164
|
| 'eleven_text_to_sound_v2'
|
|
163
165
|
| 'eleven_voice_isolation'
|
|
164
166
|
| 'eleven_voice_dubbing'
|
|
165
|
-
| 'eleven_multilingual_sts_v2'
|
|
167
|
+
| 'eleven_multilingual_sts_v2'
|
|
168
|
+
| 'gwm1_avatars'
|
|
169
|
+
| 'voice_processing';
|
|
166
170
|
}
|
|
167
171
|
}
|
|
168
172
|
}
|
|
@@ -0,0 +1,251 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
import { APIResource } from '../core/resource';
|
|
4
|
+
import { APIPromise } from '../core/api-promise';
|
|
5
|
+
import { buildHeaders } from '../internal/headers';
|
|
6
|
+
import { RequestOptions } from '../internal/request-options';
|
|
7
|
+
import { path } from '../internal/utils/path';
|
|
8
|
+
|
|
9
|
+
export class RealtimeSessions extends APIResource {
|
|
10
|
+
/**
|
|
11
|
+
* Create a new realtime session with the specified model configuration.
|
|
12
|
+
*/
|
|
13
|
+
create(
|
|
14
|
+
body: RealtimeSessionCreateParams,
|
|
15
|
+
options?: RequestOptions,
|
|
16
|
+
): APIPromise<RealtimeSessionCreateResponse> {
|
|
17
|
+
return this._client.post('/v1/realtime_sessions', { body, ...options });
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* Get the status of a realtime session.
|
|
22
|
+
*/
|
|
23
|
+
retrieve(id: string, options?: RequestOptions): APIPromise<RealtimeSessionRetrieveResponse> {
|
|
24
|
+
return this._client.get(path`/v1/realtime_sessions/${id}`, options);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* Cancel an active realtime session.
|
|
29
|
+
*/
|
|
30
|
+
delete(id: string, options?: RequestOptions): APIPromise<void> {
|
|
31
|
+
return this._client.delete(path`/v1/realtime_sessions/${id}`, {
|
|
32
|
+
...options,
|
|
33
|
+
headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
export interface RealtimeSessionCreateResponse {
|
|
39
|
+
/**
|
|
40
|
+
* The ID of the created realtime session.
|
|
41
|
+
*/
|
|
42
|
+
id: string;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* A session that is being provisioned.
|
|
47
|
+
*/
|
|
48
|
+
export type RealtimeSessionRetrieveResponse =
|
|
49
|
+
| RealtimeSessionRetrieveResponse.NotReady
|
|
50
|
+
| RealtimeSessionRetrieveResponse.Ready
|
|
51
|
+
| RealtimeSessionRetrieveResponse.Running
|
|
52
|
+
| RealtimeSessionRetrieveResponse.Completed
|
|
53
|
+
| RealtimeSessionRetrieveResponse.Failed
|
|
54
|
+
| RealtimeSessionRetrieveResponse.Cancelled;
|
|
55
|
+
|
|
56
|
+
export namespace RealtimeSessionRetrieveResponse {
|
|
57
|
+
/**
|
|
58
|
+
* A session that is being provisioned.
|
|
59
|
+
*/
|
|
60
|
+
export interface NotReady {
|
|
61
|
+
/**
|
|
62
|
+
* The realtime session ID.
|
|
63
|
+
*/
|
|
64
|
+
id: string;
|
|
65
|
+
|
|
66
|
+
/**
|
|
67
|
+
* When the session was created.
|
|
68
|
+
*/
|
|
69
|
+
createdAt: string;
|
|
70
|
+
|
|
71
|
+
status: 'NOT_READY';
|
|
72
|
+
|
|
73
|
+
/**
|
|
74
|
+
* When true, the session is waiting in a queue for available capacity. When false
|
|
75
|
+
* or absent, the session is actively being provisioned.
|
|
76
|
+
*/
|
|
77
|
+
queued?: boolean;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
/**
|
|
81
|
+
* A session that is ready to connect.
|
|
82
|
+
*/
|
|
83
|
+
export interface Ready {
|
|
84
|
+
/**
|
|
85
|
+
* The realtime session ID.
|
|
86
|
+
*/
|
|
87
|
+
id: string;
|
|
88
|
+
|
|
89
|
+
/**
|
|
90
|
+
* When the session was created.
|
|
91
|
+
*/
|
|
92
|
+
createdAt: string;
|
|
93
|
+
|
|
94
|
+
/**
|
|
95
|
+
* When the session credentials expire.
|
|
96
|
+
*/
|
|
97
|
+
expiresAt: string;
|
|
98
|
+
|
|
99
|
+
/**
|
|
100
|
+
* Session key for authenticating the /consume endpoint. Use as Bearer token.
|
|
101
|
+
*/
|
|
102
|
+
sessionKey: string;
|
|
103
|
+
|
|
104
|
+
status: 'READY';
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
/**
|
|
108
|
+
* A session with an active WebRTC connection.
|
|
109
|
+
*/
|
|
110
|
+
export interface Running {
|
|
111
|
+
/**
|
|
112
|
+
* The realtime session ID.
|
|
113
|
+
*/
|
|
114
|
+
id: string;
|
|
115
|
+
|
|
116
|
+
/**
|
|
117
|
+
* When the session was created.
|
|
118
|
+
*/
|
|
119
|
+
createdAt: string;
|
|
120
|
+
|
|
121
|
+
status: 'RUNNING';
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
/**
|
|
125
|
+
* A session that ended normally.
|
|
126
|
+
*/
|
|
127
|
+
export interface Completed {
|
|
128
|
+
/**
|
|
129
|
+
* The realtime session ID.
|
|
130
|
+
*/
|
|
131
|
+
id: string;
|
|
132
|
+
|
|
133
|
+
/**
|
|
134
|
+
* When the session was created.
|
|
135
|
+
*/
|
|
136
|
+
createdAt: string;
|
|
137
|
+
|
|
138
|
+
/**
|
|
139
|
+
* The session duration in seconds.
|
|
140
|
+
*/
|
|
141
|
+
duration: number;
|
|
142
|
+
|
|
143
|
+
status: 'COMPLETED';
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
/**
|
|
147
|
+
* A session that encountered an error.
|
|
148
|
+
*/
|
|
149
|
+
export interface Failed {
|
|
150
|
+
/**
|
|
151
|
+
* The realtime session ID.
|
|
152
|
+
*/
|
|
153
|
+
id: string;
|
|
154
|
+
|
|
155
|
+
/**
|
|
156
|
+
* When the session was created.
|
|
157
|
+
*/
|
|
158
|
+
createdAt: string;
|
|
159
|
+
|
|
160
|
+
/**
|
|
161
|
+
* A human-readable error message. This value is not stable and should not be
|
|
162
|
+
* matched against programmatically.
|
|
163
|
+
*/
|
|
164
|
+
failure: string;
|
|
165
|
+
|
|
166
|
+
/**
|
|
167
|
+
* A stable, machine-readable error code. See
|
|
168
|
+
* https://docs.dev.runwayml.com/errors/task-failures/ for more information.
|
|
169
|
+
*/
|
|
170
|
+
failureCode: string;
|
|
171
|
+
|
|
172
|
+
status: 'FAILED';
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
/**
|
|
176
|
+
* A session that was explicitly cancelled.
|
|
177
|
+
*/
|
|
178
|
+
export interface Cancelled {
|
|
179
|
+
/**
|
|
180
|
+
* The realtime session ID.
|
|
181
|
+
*/
|
|
182
|
+
id: string;
|
|
183
|
+
|
|
184
|
+
/**
|
|
185
|
+
* When the session was created.
|
|
186
|
+
*/
|
|
187
|
+
createdAt: string;
|
|
188
|
+
|
|
189
|
+
status: 'CANCELLED';
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
export interface RealtimeSessionCreateParams {
|
|
194
|
+
/**
|
|
195
|
+
* The avatar configuration for the session.
|
|
196
|
+
*/
|
|
197
|
+
avatar: RealtimeSessionCreateParams.RunwayPreset | RealtimeSessionCreateParams.Custom;
|
|
198
|
+
|
|
199
|
+
/**
|
|
200
|
+
* The realtime session model type.
|
|
201
|
+
*/
|
|
202
|
+
model: 'gwm1_avatars';
|
|
203
|
+
|
|
204
|
+
/**
|
|
205
|
+
* Maximum session duration in seconds.
|
|
206
|
+
*/
|
|
207
|
+
maxDuration?: number;
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
export namespace RealtimeSessionCreateParams {
|
|
211
|
+
/**
|
|
212
|
+
* A preset avatar from Runway.
|
|
213
|
+
*/
|
|
214
|
+
export interface RunwayPreset {
|
|
215
|
+
/**
|
|
216
|
+
* ID of a preset avatar.
|
|
217
|
+
*/
|
|
218
|
+
presetId:
|
|
219
|
+
| 'game-character'
|
|
220
|
+
| 'music-superstar'
|
|
221
|
+
| 'game-character-man'
|
|
222
|
+
| 'cat-character'
|
|
223
|
+
| 'influencer'
|
|
224
|
+
| 'tennis-coach'
|
|
225
|
+
| 'human-resource'
|
|
226
|
+
| 'fashion-designer'
|
|
227
|
+
| 'cooking-teacher';
|
|
228
|
+
|
|
229
|
+
type: 'runway-preset';
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
/**
|
|
233
|
+
* A user-created avatar.
|
|
234
|
+
*/
|
|
235
|
+
export interface Custom {
|
|
236
|
+
/**
|
|
237
|
+
* ID of a user-created avatar.
|
|
238
|
+
*/
|
|
239
|
+
avatarId: string;
|
|
240
|
+
|
|
241
|
+
type: 'custom';
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
export declare namespace RealtimeSessions {
|
|
246
|
+
export {
|
|
247
|
+
type RealtimeSessionCreateResponse as RealtimeSessionCreateResponse,
|
|
248
|
+
type RealtimeSessionRetrieveResponse as RealtimeSessionRetrieveResponse,
|
|
249
|
+
type RealtimeSessionCreateParams as RealtimeSessionCreateParams,
|
|
250
|
+
};
|
|
251
|
+
}
|
|
@@ -4,6 +4,9 @@ import { APIResource } from '../core/resource';
|
|
|
4
4
|
import { RequestOptions } from '../internal/request-options';
|
|
5
5
|
import { APIPromiseWithAwaitableTask, wrapAsWaitableResource } from '../lib/polling';
|
|
6
6
|
|
|
7
|
+
/**
|
|
8
|
+
* These endpoints all kick off tasks to create generations.
|
|
9
|
+
*/
|
|
7
10
|
export class SoundEffect extends APIResource {
|
|
8
11
|
/**
|
|
9
12
|
* This endpoint will start a new task to generate sound effects from a text
|
|
@@ -3,6 +3,9 @@ import { APIPromiseWithAwaitableTask, wrapAsWaitableResource } from '../lib/poll
|
|
|
3
3
|
import { APIResource } from '../core/resource';
|
|
4
4
|
import { RequestOptions } from '../internal/request-options';
|
|
5
5
|
|
|
6
|
+
/**
|
|
7
|
+
* These endpoints all kick off tasks to create generations.
|
|
8
|
+
*/
|
|
6
9
|
export class SpeechToSpeech extends APIResource {
|
|
7
10
|
/**
|
|
8
11
|
* This endpoint will start a new task to convert speech from one voice to another
|
package/src/resources/tasks.ts
CHANGED
|
@@ -7,6 +7,9 @@ import { RequestOptions } from '../internal/request-options';
|
|
|
7
7
|
import { path } from '../internal/utils/path';
|
|
8
8
|
import { APIPromiseWithAwaitableTask, wrapAsWaitableResource } from '../lib/polling';
|
|
9
9
|
|
|
10
|
+
/**
|
|
11
|
+
* Endpoints for managing tasks that have been submitted.
|
|
12
|
+
*/
|
|
10
13
|
export class Tasks extends APIResource {
|
|
11
14
|
/**
|
|
12
15
|
* Return details about a task. Consumers of this API should not expect updates
|
|
@@ -4,6 +4,9 @@ import { APIResource } from '../core/resource';
|
|
|
4
4
|
import { RequestOptions } from '../internal/request-options';
|
|
5
5
|
import { APIPromiseWithAwaitableTask, wrapAsWaitableResource } from '../lib/polling';
|
|
6
6
|
|
|
7
|
+
/**
|
|
8
|
+
* These endpoints all kick off tasks to create generations.
|
|
9
|
+
*/
|
|
7
10
|
export class TextToImage extends APIResource {
|
|
8
11
|
/**
|
|
9
12
|
* This endpoint will start a new task to generate images from text and/or image(s)
|
|
@@ -4,6 +4,9 @@ import { APIResource } from '../core/resource';
|
|
|
4
4
|
import { RequestOptions } from '../internal/request-options';
|
|
5
5
|
import { APIPromiseWithAwaitableTask, wrapAsWaitableResource } from '../lib/polling';
|
|
6
6
|
|
|
7
|
+
/**
|
|
8
|
+
* These endpoints all kick off tasks to create generations.
|
|
9
|
+
*/
|
|
7
10
|
export class TextToSpeech extends APIResource {
|
|
8
11
|
/**
|
|
9
12
|
* This endpoint will start a new task to generate speech from text.
|
|
@@ -4,6 +4,9 @@ import { APIResource } from '../core/resource';
|
|
|
4
4
|
import { RequestOptions } from '../internal/request-options';
|
|
5
5
|
import { APIPromiseWithAwaitableTask, wrapAsWaitableResource } from '../lib/polling';
|
|
6
6
|
|
|
7
|
+
/**
|
|
8
|
+
* These endpoints all kick off tasks to create generations.
|
|
9
|
+
*/
|
|
7
10
|
export class TextToVideo extends APIResource {
|
|
8
11
|
/**
|
|
9
12
|
* This endpoint will start a new task to generate a video from a text prompt.
|
|
@@ -4,6 +4,9 @@ import { APIResource } from '../core/resource';
|
|
|
4
4
|
import { RequestOptions } from '../internal/request-options';
|
|
5
5
|
import { APIPromiseWithAwaitableTask, wrapAsWaitableResource } from '../lib/polling';
|
|
6
6
|
|
|
7
|
+
/**
|
|
8
|
+
* These endpoints all kick off tasks to create generations.
|
|
9
|
+
*/
|
|
7
10
|
export class VideoToVideo extends APIResource {
|
|
8
11
|
/**
|
|
9
12
|
* This endpoint will start a new task to generate a video from a video.
|
|
@@ -4,6 +4,9 @@ import { APIResource } from '../core/resource';
|
|
|
4
4
|
import { RequestOptions } from '../internal/request-options';
|
|
5
5
|
import { APIPromiseWithAwaitableTask, wrapAsWaitableResource } from '../lib/polling';
|
|
6
6
|
|
|
7
|
+
/**
|
|
8
|
+
* These endpoints all kick off tasks to create generations.
|
|
9
|
+
*/
|
|
7
10
|
export class VoiceDubbing extends APIResource {
|
|
8
11
|
/**
|
|
9
12
|
* This endpoint will start a new task to dub audio content to a target language.
|