@runwayml/sdk 3.11.0 → 3.15.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.
- package/CHANGELOG.md +115 -0
- package/LICENSE +1 -1
- package/README.md +43 -2
- package/client.d.mts +53 -4
- package/client.d.mts.map +1 -1
- package/client.d.ts +53 -4
- package/client.d.ts.map +1 -1
- package/client.js +75 -20
- package/client.js.map +1 -1
- package/client.mjs +75 -20
- 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/parse.d.mts.map +1 -1
- package/internal/parse.d.ts.map +1 -1
- package/internal/parse.js +5 -0
- package/internal/parse.js.map +1 -1
- package/internal/parse.mjs +5 -0
- package/internal/parse.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 +11 -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 +58 -1
- package/resources/image-to-video.d.mts.map +1 -1
- package/resources/image-to-video.d.ts +58 -1
- 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 -1
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +4 -1
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +9 -3
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +4 -1
- 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 +43 -1
- package/resources/text-to-video.d.mts.map +1 -1
- package/resources/text-to-video.d.ts +43 -1
- 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 +8 -5
- package/resources/video-to-video.d.mts.map +1 -1
- package/resources/video-to-video.d.ts +8 -5
- package/resources/video-to-video.d.ts.map +1 -1
- package/resources/video-to-video.js +3 -1
- package/resources/video-to-video.js.map +1 -1
- package/resources/video-to-video.mjs +3 -1
- 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 +173 -35
- package/src/core/pagination.ts +157 -0
- package/src/index.ts +1 -0
- package/src/internal/parse.ts +6 -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 +68 -0
- package/src/resources/index.ts +37 -5
- package/src/resources/organization.ts +7 -3
- 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 +50 -0
- package/src/resources/video-to-video.ts +9 -6
- 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
- package/resources/video-upscale.d.mts +0 -35
- package/resources/video-upscale.d.mts.map +0 -1
- package/resources/video-upscale.d.ts +0 -35
- package/resources/video-upscale.d.ts.map +0 -1
- package/resources/video-upscale.js +0 -25
- package/resources/video-upscale.js.map +0 -1
- package/resources/video-upscale.mjs +0 -21
- package/resources/video-upscale.mjs.map +0 -1
- package/src/resources/video-upscale.ts +0 -51
|
@@ -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.
|
|
@@ -26,11 +29,58 @@ export interface TextToVideoCreateResponse {
|
|
|
26
29
|
}
|
|
27
30
|
|
|
28
31
|
export type TextToVideoCreateParams =
|
|
32
|
+
| TextToVideoCreateParams.Gen4_5
|
|
29
33
|
| TextToVideoCreateParams.Veo3_1
|
|
30
34
|
| TextToVideoCreateParams.Veo3_1Fast
|
|
31
35
|
| TextToVideoCreateParams.Veo3;
|
|
32
36
|
|
|
33
37
|
export declare namespace TextToVideoCreateParams {
|
|
38
|
+
export interface Gen4_5 {
|
|
39
|
+
/**
|
|
40
|
+
* The number of seconds of duration for the output video. Must be an integer from
|
|
41
|
+
* 2 to 10.
|
|
42
|
+
*/
|
|
43
|
+
duration: number;
|
|
44
|
+
|
|
45
|
+
model: 'gen4.5';
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* A non-empty string up to 1000 characters (measured in UTF-16 code units). This
|
|
49
|
+
* should describe in detail what should appear in the output.
|
|
50
|
+
*/
|
|
51
|
+
promptText: string;
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* The resolution of the output video.
|
|
55
|
+
*/
|
|
56
|
+
ratio: '1280:720' | '720:1280';
|
|
57
|
+
|
|
58
|
+
/**
|
|
59
|
+
* Settings that affect the behavior of the content moderation system.
|
|
60
|
+
*/
|
|
61
|
+
contentModeration?: Gen4_5.ContentModeration;
|
|
62
|
+
|
|
63
|
+
/**
|
|
64
|
+
* If unspecified, a random number is chosen. Varying the seed integer is a way to
|
|
65
|
+
* get different results for the same other request parameters. Using the same seed
|
|
66
|
+
* integer for an identical request will produce similar results.
|
|
67
|
+
*/
|
|
68
|
+
seed?: number;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
export namespace Gen4_5 {
|
|
72
|
+
/**
|
|
73
|
+
* Settings that affect the behavior of the content moderation system.
|
|
74
|
+
*/
|
|
75
|
+
export interface ContentModeration {
|
|
76
|
+
/**
|
|
77
|
+
* When set to `low`, the content moderation system will be less strict about
|
|
78
|
+
* preventing generations that include recognizable public figures.
|
|
79
|
+
*/
|
|
80
|
+
publicFigureThreshold?: 'auto' | 'low';
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
|
|
34
84
|
export interface Veo3_1 {
|
|
35
85
|
model: 'veo3.1';
|
|
36
86
|
|
|
@@ -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.
|
|
@@ -13,7 +16,6 @@ export class VideoToVideo extends APIResource {
|
|
|
13
16
|
* const videoToVideo = await client.videoToVideo.create({
|
|
14
17
|
* model: 'gen4_aleph',
|
|
15
18
|
* promptText: 'x',
|
|
16
|
-
* ratio: '1280:720',
|
|
17
19
|
* videoUri: 'https://example.com/video.mp4',
|
|
18
20
|
* });
|
|
19
21
|
* ```
|
|
@@ -44,11 +46,6 @@ export interface VideoToVideoCreateParams {
|
|
|
44
46
|
*/
|
|
45
47
|
promptText: string;
|
|
46
48
|
|
|
47
|
-
/**
|
|
48
|
-
* The resolution of the output video.
|
|
49
|
-
*/
|
|
50
|
-
ratio: '1280:720' | '720:1280' | '1104:832' | '960:960' | '832:1104' | '1584:672' | '848:480' | '640:480';
|
|
51
|
-
|
|
52
49
|
/**
|
|
53
50
|
* A HTTPS URL.
|
|
54
51
|
*/
|
|
@@ -59,6 +56,12 @@ export interface VideoToVideoCreateParams {
|
|
|
59
56
|
*/
|
|
60
57
|
contentModeration?: VideoToVideoCreateParams.ContentModeration;
|
|
61
58
|
|
|
59
|
+
/**
|
|
60
|
+
* @deprecated Deprecated. This field is ignored. The resolution of the output
|
|
61
|
+
* video is determined by the input video.
|
|
62
|
+
*/
|
|
63
|
+
ratio?: '1280:720' | '720:1280' | '1104:832' | '960:960' | '832:1104' | '1584:672' | '848:480' | '640:480';
|
|
64
|
+
|
|
62
65
|
/**
|
|
63
66
|
* An array of references. Currently up to one reference is supported. See
|
|
64
67
|
* [our docs](/assets/inputs#images) on image inputs for more information.
|
|
@@ -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.
|
|
@@ -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 VoiceIsolation extends APIResource {
|
|
8
11
|
/**
|
|
9
12
|
* This endpoint will start a new task to isolate the voice from the background
|