@runwayml/sdk 3.18.0 → 3.20.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 +33 -0
- package/client.d.mts +3 -0
- package/client.d.mts.map +1 -1
- package/client.d.ts +3 -0
- package/client.d.ts.map +1 -1
- package/client.js +3 -0
- package/client.js.map +1 -1
- package/client.mjs +3 -0
- package/client.mjs.map +1 -1
- package/internal/utils/env.js +2 -2
- package/internal/utils/env.js.map +1 -1
- package/internal/utils/env.mjs +2 -2
- package/internal/utils/env.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/avatar-videos.d.mts +101 -0
- package/resources/avatar-videos.d.mts.map +1 -0
- package/resources/avatar-videos.d.ts +101 -0
- package/resources/avatar-videos.d.ts.map +1 -0
- package/resources/avatar-videos.js +19 -0
- package/resources/avatar-videos.js.map +1 -0
- package/resources/avatar-videos.mjs +15 -0
- package/resources/avatar-videos.mjs.map +1 -0
- package/resources/documents.d.mts +13 -1
- package/resources/documents.d.mts.map +1 -1
- package/resources/documents.d.ts +13 -1
- package/resources/documents.d.ts.map +1 -1
- package/resources/documents.js +5 -1
- package/resources/documents.js.map +1 -1
- package/resources/documents.mjs +5 -1
- package/resources/documents.mjs.map +1 -1
- package/resources/image-to-video.d.mts +43 -1
- package/resources/image-to-video.d.mts.map +1 -1
- package/resources/image-to-video.d.ts +43 -1
- package/resources/image-to-video.d.ts.map +1 -1
- package/resources/index.d.mts +1 -0
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +1 -0
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +3 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +1 -0
- package/resources/index.mjs.map +1 -1
- package/resources/organization.d.mts +4 -3
- package/resources/organization.d.mts.map +1 -1
- package/resources/organization.d.ts +4 -3
- package/resources/organization.d.ts.map +1 -1
- package/resources/realtime-sessions.d.mts +19 -9
- package/resources/realtime-sessions.d.mts.map +1 -1
- package/resources/realtime-sessions.d.ts +19 -9
- package/resources/realtime-sessions.d.ts.map +1 -1
- package/resources/realtime-sessions.js +5 -2
- package/resources/realtime-sessions.js.map +1 -1
- package/resources/realtime-sessions.mjs +5 -2
- package/resources/realtime-sessions.mjs.map +1 -1
- package/resources/text-to-video.d.mts +25 -1
- package/resources/text-to-video.d.mts.map +1 -1
- package/resources/text-to-video.d.ts +25 -1
- package/resources/text-to-video.d.ts.map +1 -1
- package/resources/video-to-video.d.mts +112 -46
- package/resources/video-to-video.d.mts.map +1 -1
- package/resources/video-to-video.d.ts +112 -46
- package/resources/video-to-video.d.ts.map +1 -1
- package/resources/voices.d.mts +17 -13
- package/resources/voices.d.mts.map +1 -1
- package/resources/voices.d.ts +17 -13
- package/resources/voices.d.ts.map +1 -1
- package/resources/voices.js +2 -1
- package/resources/voices.js.map +1 -1
- package/resources/voices.mjs +2 -1
- package/resources/voices.mjs.map +1 -1
- package/src/client.ts +9 -0
- package/src/internal/utils/env.ts +2 -2
- package/src/resources/avatar-videos.ts +170 -0
- package/src/resources/documents.ts +16 -2
- package/src/resources/image-to-video.ts +64 -0
- package/src/resources/index.ts +1 -0
- package/src/resources/organization.ts +15 -2
- package/src/resources/realtime-sessions.ts +19 -9
- package/src/resources/text-to-video.ts +43 -0
- package/src/resources/video-to-video.ts +149 -47
- package/src/resources/voices.ts +19 -13
- 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
|
@@ -25,59 +25,125 @@ export interface VideoToVideoCreateResponse {
|
|
|
25
25
|
*/
|
|
26
26
|
id: string;
|
|
27
27
|
}
|
|
28
|
-
export
|
|
29
|
-
model: 'gen4_aleph';
|
|
30
|
-
/**
|
|
31
|
-
* A non-empty string up to 1000 characters (measured in UTF-16 code units). This
|
|
32
|
-
* should describe in detail what should appear in the output.
|
|
33
|
-
*/
|
|
34
|
-
promptText: string;
|
|
35
|
-
/**
|
|
36
|
-
* A HTTPS URL.
|
|
37
|
-
*/
|
|
38
|
-
videoUri: string;
|
|
39
|
-
/**
|
|
40
|
-
* Settings that affect the behavior of the content moderation system.
|
|
41
|
-
*/
|
|
42
|
-
contentModeration?: VideoToVideoCreateParams.ContentModeration;
|
|
43
|
-
/**
|
|
44
|
-
* @deprecated Deprecated. This field is ignored. The resolution of the output
|
|
45
|
-
* video is determined by the input video.
|
|
46
|
-
*/
|
|
47
|
-
ratio?: '1280:720' | '720:1280' | '1104:832' | '960:960' | '832:1104' | '1584:672' | '848:480' | '640:480';
|
|
48
|
-
/**
|
|
49
|
-
* An array of references. Currently up to one reference is supported. See
|
|
50
|
-
* [our docs](/assets/inputs#images) on image inputs for more information.
|
|
51
|
-
*/
|
|
52
|
-
references?: Array<VideoToVideoCreateParams.Reference>;
|
|
53
|
-
/**
|
|
54
|
-
* If unspecified, a random number is chosen. Varying the seed integer is a way to
|
|
55
|
-
* get different results for the same other request parameters. Using the same seed
|
|
56
|
-
* integer for an identical request will produce similar results.
|
|
57
|
-
*/
|
|
58
|
-
seed?: number;
|
|
59
|
-
}
|
|
28
|
+
export type VideoToVideoCreateParams = VideoToVideoCreateParams.Gen4Aleph | VideoToVideoCreateParams.Seedance2;
|
|
60
29
|
export declare namespace VideoToVideoCreateParams {
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
30
|
+
interface Gen4Aleph {
|
|
31
|
+
model: 'gen4_aleph';
|
|
32
|
+
/**
|
|
33
|
+
* A non-empty string up to 1000 characters (measured in UTF-16 code units). This
|
|
34
|
+
* should describe in detail what should appear in the output.
|
|
35
|
+
*/
|
|
36
|
+
promptText: string;
|
|
37
|
+
/**
|
|
38
|
+
* A HTTPS URL.
|
|
39
|
+
*/
|
|
40
|
+
videoUri: string;
|
|
41
|
+
/**
|
|
42
|
+
* Settings that affect the behavior of the content moderation system.
|
|
43
|
+
*/
|
|
44
|
+
contentModeration?: Gen4Aleph.ContentModeration;
|
|
45
|
+
/**
|
|
46
|
+
* @deprecated Deprecated. This field is ignored. The resolution of the output
|
|
47
|
+
* video is determined by the input video.
|
|
48
|
+
*/
|
|
49
|
+
ratio?: '1280:720' | '720:1280' | '1104:832' | '960:960' | '832:1104' | '1584:672' | '848:480' | '640:480';
|
|
50
|
+
/**
|
|
51
|
+
* An array of references. Currently up to one reference is supported. See
|
|
52
|
+
* [our docs](/assets/inputs#images) on image inputs for more information.
|
|
53
|
+
*/
|
|
54
|
+
references?: Array<Gen4Aleph.Reference>;
|
|
65
55
|
/**
|
|
66
|
-
*
|
|
67
|
-
*
|
|
56
|
+
* If unspecified, a random number is chosen. Varying the seed integer is a way to
|
|
57
|
+
* get different results for the same other request parameters. Using the same seed
|
|
58
|
+
* integer for an identical request will produce similar results.
|
|
68
59
|
*/
|
|
69
|
-
|
|
60
|
+
seed?: number;
|
|
70
61
|
}
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
62
|
+
namespace Gen4Aleph {
|
|
63
|
+
/**
|
|
64
|
+
* Settings that affect the behavior of the content moderation system.
|
|
65
|
+
*/
|
|
66
|
+
interface ContentModeration {
|
|
67
|
+
/**
|
|
68
|
+
* When set to `low`, the content moderation system will be less strict about
|
|
69
|
+
* preventing generations that include recognizable public figures.
|
|
70
|
+
*/
|
|
71
|
+
publicFigureThreshold?: 'auto' | 'low';
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
* Passing an image reference allows the model to emulate the style or content of
|
|
75
|
+
* the reference in the output.
|
|
76
|
+
*/
|
|
77
|
+
interface Reference {
|
|
78
|
+
type: 'image';
|
|
79
|
+
/**
|
|
80
|
+
* A HTTPS URL.
|
|
81
|
+
*/
|
|
82
|
+
uri: string;
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
interface Seedance2 {
|
|
86
|
+
model: 'seedance2';
|
|
77
87
|
/**
|
|
78
88
|
* A HTTPS URL.
|
|
79
89
|
*/
|
|
80
|
-
|
|
90
|
+
promptVideo: string;
|
|
91
|
+
/**
|
|
92
|
+
* Whether to generate audio for the video. Audio inclusion affects pricing.
|
|
93
|
+
*/
|
|
94
|
+
audio?: boolean;
|
|
95
|
+
/**
|
|
96
|
+
* The number of seconds of duration for the output video. Must be an integer from
|
|
97
|
+
* 4 to 15.
|
|
98
|
+
*/
|
|
99
|
+
duration?: number;
|
|
100
|
+
/**
|
|
101
|
+
* The number of video generations to produce.
|
|
102
|
+
*/
|
|
103
|
+
outputCount?: number;
|
|
104
|
+
/**
|
|
105
|
+
* An optional text prompt up to 3500 characters describing what should appear in
|
|
106
|
+
* the output video.
|
|
107
|
+
*/
|
|
108
|
+
promptText?: string;
|
|
109
|
+
/**
|
|
110
|
+
* The resolution of the output video.
|
|
111
|
+
*/
|
|
112
|
+
ratio?: '992:432' | '864:496' | '752:560' | '640:640' | '560:752' | '496:864' | '1470:630' | '1280:720' | '1112:834' | '960:960' | '834:1112' | '720:1280';
|
|
113
|
+
/**
|
|
114
|
+
* An optional array of image references (up to 9). See
|
|
115
|
+
* [our docs](/assets/inputs#images) on image inputs for more information.
|
|
116
|
+
*/
|
|
117
|
+
references?: string | Array<Seedance2.PromptImage>;
|
|
118
|
+
/**
|
|
119
|
+
* An optional array of up to 3 video references. See
|
|
120
|
+
* [our docs](/assets/inputs#videos) on video inputs for more information.
|
|
121
|
+
*/
|
|
122
|
+
referenceVideos?: Array<Seedance2.ReferenceVideo>;
|
|
123
|
+
}
|
|
124
|
+
namespace Seedance2 {
|
|
125
|
+
interface PromptImage {
|
|
126
|
+
/**
|
|
127
|
+
* A HTTPS URL.
|
|
128
|
+
*/
|
|
129
|
+
uri: string;
|
|
130
|
+
/**
|
|
131
|
+
* The position of the image in the output video. "first" will use the image as the
|
|
132
|
+
* first frame, "last" as the last frame. Omit for a reference image.
|
|
133
|
+
*/
|
|
134
|
+
position?: 'first' | 'last';
|
|
135
|
+
}
|
|
136
|
+
/**
|
|
137
|
+
* A video reference allows the model to use the video as additional context for
|
|
138
|
+
* the output.
|
|
139
|
+
*/
|
|
140
|
+
interface ReferenceVideo {
|
|
141
|
+
type: 'video';
|
|
142
|
+
/**
|
|
143
|
+
* A HTTPS URL.
|
|
144
|
+
*/
|
|
145
|
+
uri: string;
|
|
146
|
+
}
|
|
81
147
|
}
|
|
82
148
|
}
|
|
83
149
|
export declare namespace VideoToVideo {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"video-to-video.d.ts","sourceRoot":"","sources":["../src/resources/video-to-video.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,cAAc,EAAE;OAClB,EAAE,2BAA2B,EAA0B;AAE9D;;GAEG;AACH,qBAAa,YAAa,SAAQ,WAAW;IAC3C;;;;;;;;;;;OAWG;IACH,MAAM,CACJ,IAAI,EAAE,wBAAwB,EAC9B,OAAO,CAAC,EAAE,cAAc,GACvB,2BAA2B,CAAC,0BAA0B,CAAC;CAK3D;AAED,MAAM,WAAW,0BAA0B;IACzC;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;CACZ;AAED,MAAM,WAAW,wBAAwB;
|
|
1
|
+
{"version":3,"file":"video-to-video.d.ts","sourceRoot":"","sources":["../src/resources/video-to-video.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,cAAc,EAAE;OAClB,EAAE,2BAA2B,EAA0B;AAE9D;;GAEG;AACH,qBAAa,YAAa,SAAQ,WAAW;IAC3C;;;;;;;;;;;OAWG;IACH,MAAM,CACJ,IAAI,EAAE,wBAAwB,EAC9B,OAAO,CAAC,EAAE,cAAc,GACvB,2BAA2B,CAAC,0BAA0B,CAAC;CAK3D;AAED,MAAM,WAAW,0BAA0B;IACzC;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;CACZ;AAED,MAAM,MAAM,wBAAwB,GAChC,wBAAwB,CAAC,SAAS,GAClC,wBAAwB,CAAC,SAAS,CAAC;AAEvC,MAAM,CAAC,OAAO,WAAW,wBAAwB,C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S,CAAC,WAAW,CAAC,CAAC;QAEnD;;;WAGG;QACH,eAAe,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC,cAAc,CAAC,CAAC;KACnD;IAED,UAAiB,SAAS,CAAC;QACzB,UAAiB,WAAW;YAC1B;;eAEG;YACH,GAAG,EAAE,MAAM,CAAC;YAEZ;;;eAGG;YACH,QAAQ,CAAC,EAAE,OAAO,GAAG,MAAM,CAAC;SAC7B;QAED;;;WAGG;QACH,UAAiB,cAAc;YAC7B,IAAI,EAAE,OAAO,CAAC;YAEd;;eAEG;YACH,GAAG,EAAE,MAAM,CAAC;SACb;KACF;CACF;AAED,MAAM,CAAC,OAAO,WAAW,YAAY,CAAC;IACpC,OAAO,EACL,KAAK,0BAA0B,IAAI,0BAA0B,EAC7D,KAAK,wBAAwB,IAAI,wBAAwB,GAC1D,CAAC;CACH"}
|
package/resources/voices.d.mts
CHANGED
|
@@ -4,7 +4,8 @@ import { CursorPage, type CursorPageParams, PagePromise } from "../core/paginati
|
|
|
4
4
|
import { RequestOptions } from "../internal/request-options.mjs";
|
|
5
5
|
export declare class Voices extends APIResource {
|
|
6
6
|
/**
|
|
7
|
-
* Create a custom voice from a text description
|
|
7
|
+
* Create a custom voice from a text description, or clone a voice from an audio
|
|
8
|
+
* sample.
|
|
8
9
|
*/
|
|
9
10
|
create(body: VoiceCreateParams, options?: RequestOptions): APIPromise<VoiceCreateResponse>;
|
|
10
11
|
/**
|
|
@@ -208,10 +209,7 @@ export interface VoicePreviewResponse {
|
|
|
208
209
|
url: string;
|
|
209
210
|
}
|
|
210
211
|
export interface VoiceCreateParams {
|
|
211
|
-
|
|
212
|
-
* The source configuration for creating the voice.
|
|
213
|
-
*/
|
|
214
|
-
from: VoiceCreateParams.From;
|
|
212
|
+
from: VoiceCreateParams.Audio | VoiceCreateParams.Text;
|
|
215
213
|
/**
|
|
216
214
|
* A name for the voice.
|
|
217
215
|
*/
|
|
@@ -222,14 +220,19 @@ export interface VoiceCreateParams {
|
|
|
222
220
|
description?: string | null;
|
|
223
221
|
}
|
|
224
222
|
export declare namespace VoiceCreateParams {
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
223
|
+
interface Audio {
|
|
224
|
+
/**
|
|
225
|
+
* A HTTPS URL.
|
|
226
|
+
*/
|
|
227
|
+
audio: string;
|
|
228
|
+
type: 'audio';
|
|
229
|
+
}
|
|
230
|
+
interface Text {
|
|
229
231
|
/**
|
|
230
|
-
* The voice design model to use.
|
|
232
|
+
* The voice design model to use. Prefer eleven_ttv_v3 (latest);
|
|
233
|
+
* eleven_multilingual_ttv_v2 is the previous generation.
|
|
231
234
|
*/
|
|
232
|
-
model: '
|
|
235
|
+
model: 'eleven_ttv_v3' | 'eleven_multilingual_ttv_v2';
|
|
233
236
|
/**
|
|
234
237
|
* A text description of the desired voice characteristics. Must be at least 20
|
|
235
238
|
* characters.
|
|
@@ -242,9 +245,10 @@ export interface VoiceListParams extends CursorPageParams {
|
|
|
242
245
|
}
|
|
243
246
|
export interface VoicePreviewParams {
|
|
244
247
|
/**
|
|
245
|
-
* The voice design model to use.
|
|
248
|
+
* The voice design model to use. Prefer eleven_ttv_v3 (latest);
|
|
249
|
+
* eleven_multilingual_ttv_v2 is the previous generation.
|
|
246
250
|
*/
|
|
247
|
-
model: '
|
|
251
|
+
model: 'eleven_ttv_v3' | 'eleven_multilingual_ttv_v2';
|
|
248
252
|
/**
|
|
249
253
|
* A text description of the desired voice characteristics. Must be at least 20
|
|
250
254
|
* characters.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"voices.d.mts","sourceRoot":"","sources":["../src/resources/voices.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,UAAU,EAAE;OACd,EAAE,UAAU,EAAE,KAAK,gBAAgB,EAAE,WAAW,EAAE;OAElD,EAAE,cAAc,EAAE;AAGzB,qBAAa,MAAO,SAAQ,WAAW;IACrC
|
|
1
|
+
{"version":3,"file":"voices.d.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G;IACH,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,CAAC,OAAO,WAAW,MAAM,CAAC;IAC9B,OAAO,EACL,KAAK,mBAAmB,IAAI,mBAAmB,EAC/C,KAAK,qBAAqB,IAAI,qBAAqB,EACnD,KAAK,iBAAiB,IAAI,iBAAiB,EAC3C,KAAK,oBAAoB,IAAI,oBAAoB,EACjD,KAAK,4BAA4B,IAAI,4BAA4B,EACjE,KAAK,iBAAiB,IAAI,iBAAiB,EAC3C,KAAK,eAAe,IAAI,eAAe,EACvC,KAAK,kBAAkB,IAAI,kBAAkB,GAC9C,CAAC;CACH"}
|
package/resources/voices.d.ts
CHANGED
|
@@ -4,7 +4,8 @@ import { CursorPage, type CursorPageParams, PagePromise } from "../core/paginati
|
|
|
4
4
|
import { RequestOptions } from "../internal/request-options.js";
|
|
5
5
|
export declare class Voices extends APIResource {
|
|
6
6
|
/**
|
|
7
|
-
* Create a custom voice from a text description
|
|
7
|
+
* Create a custom voice from a text description, or clone a voice from an audio
|
|
8
|
+
* sample.
|
|
8
9
|
*/
|
|
9
10
|
create(body: VoiceCreateParams, options?: RequestOptions): APIPromise<VoiceCreateResponse>;
|
|
10
11
|
/**
|
|
@@ -208,10 +209,7 @@ export interface VoicePreviewResponse {
|
|
|
208
209
|
url: string;
|
|
209
210
|
}
|
|
210
211
|
export interface VoiceCreateParams {
|
|
211
|
-
|
|
212
|
-
* The source configuration for creating the voice.
|
|
213
|
-
*/
|
|
214
|
-
from: VoiceCreateParams.From;
|
|
212
|
+
from: VoiceCreateParams.Audio | VoiceCreateParams.Text;
|
|
215
213
|
/**
|
|
216
214
|
* A name for the voice.
|
|
217
215
|
*/
|
|
@@ -222,14 +220,19 @@ export interface VoiceCreateParams {
|
|
|
222
220
|
description?: string | null;
|
|
223
221
|
}
|
|
224
222
|
export declare namespace VoiceCreateParams {
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
223
|
+
interface Audio {
|
|
224
|
+
/**
|
|
225
|
+
* A HTTPS URL.
|
|
226
|
+
*/
|
|
227
|
+
audio: string;
|
|
228
|
+
type: 'audio';
|
|
229
|
+
}
|
|
230
|
+
interface Text {
|
|
229
231
|
/**
|
|
230
|
-
* The voice design model to use.
|
|
232
|
+
* The voice design model to use. Prefer eleven_ttv_v3 (latest);
|
|
233
|
+
* eleven_multilingual_ttv_v2 is the previous generation.
|
|
231
234
|
*/
|
|
232
|
-
model: '
|
|
235
|
+
model: 'eleven_ttv_v3' | 'eleven_multilingual_ttv_v2';
|
|
233
236
|
/**
|
|
234
237
|
* A text description of the desired voice characteristics. Must be at least 20
|
|
235
238
|
* characters.
|
|
@@ -242,9 +245,10 @@ export interface VoiceListParams extends CursorPageParams {
|
|
|
242
245
|
}
|
|
243
246
|
export interface VoicePreviewParams {
|
|
244
247
|
/**
|
|
245
|
-
* The voice design model to use.
|
|
248
|
+
* The voice design model to use. Prefer eleven_ttv_v3 (latest);
|
|
249
|
+
* eleven_multilingual_ttv_v2 is the previous generation.
|
|
246
250
|
*/
|
|
247
|
-
model: '
|
|
251
|
+
model: 'eleven_ttv_v3' | 'eleven_multilingual_ttv_v2';
|
|
248
252
|
/**
|
|
249
253
|
* A text description of the desired voice characteristics. Must be at least 20
|
|
250
254
|
* characters.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"voices.d.ts","sourceRoot":"","sources":["../src/resources/voices.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,UAAU,EAAE;OACd,EAAE,UAAU,EAAE,KAAK,gBAAgB,EAAE,WAAW,EAAE;OAElD,EAAE,cAAc,EAAE;AAGzB,qBAAa,MAAO,SAAQ,WAAW;IACrC
|
|
1
|
+
{"version":3,"file":"voices.d.ts","sourceRoot":"","sources":["../src/resources/voices.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,UAAU,EAAE;OACd,EAAE,UAAU,EAAE,KAAK,gBAAgB,EAAE,WAAW,EA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IAAI,qBAAqB,EACnD,KAAK,iBAAiB,IAAI,iBAAiB,EAC3C,KAAK,oBAAoB,IAAI,oBAAoB,EACjD,KAAK,4BAA4B,IAAI,4BAA4B,EACjE,KAAK,iBAAiB,IAAI,iBAAiB,EAC3C,KAAK,eAAe,IAAI,eAAe,EACvC,KAAK,kBAAkB,IAAI,kBAAkB,GAC9C,CAAC;CACH"}
|
package/resources/voices.js
CHANGED
|
@@ -8,7 +8,8 @@ const headers_1 = require("../internal/headers.js");
|
|
|
8
8
|
const path_1 = require("../internal/utils/path.js");
|
|
9
9
|
class Voices extends resource_1.APIResource {
|
|
10
10
|
/**
|
|
11
|
-
* Create a custom voice from a text description
|
|
11
|
+
* Create a custom voice from a text description, or clone a voice from an audio
|
|
12
|
+
* sample.
|
|
12
13
|
*/
|
|
13
14
|
create(body, options) {
|
|
14
15
|
return this._client.post('/v1/voices', { body, ...options });
|
package/resources/voices.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"voices.js","sourceRoot":"","sources":["../src/resources/voices.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,kDAA+C;AAE/C,sDAAoF;AACpF,oDAAmD;AAEnD,oDAA8C;AAE9C,MAAa,MAAO,SAAQ,sBAAW;IACrC
|
|
1
|
+
{"version":3,"file":"voices.js","sourceRoot":"","sources":["../src/resources/voices.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,kDAA+C;AAE/C,sDAAoF;AACpF,oDAAmD;AAEnD,oDAA8C;AAE9C,MAAa,MAAO,SAAQ,sBAAW;IACrC;;;OAGG;IACH,MAAM,CAAC,IAAuB,EAAE,OAAwB;QACtD,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,YAAY,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC/D,CAAC;IAED;;OAEG;IACH,QAAQ,CAAC,EAAU,EAAE,OAAwB;QAC3C,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAA,WAAI,EAAA,cAAc,EAAE,EAAE,EAAE,OAAO,CAAC,CAAC;IAC3D,CAAC;IAED;;;OAGG;IACH,IAAI,CACF,KAAsB,EACtB,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,YAAY,EAAE,CAAA,uBAA6B,CAAA,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACrG,CAAC;IAED;;OAEG;IACH,MAAM,CAAC,EAAU,EAAE,OAAwB;QACzC,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,IAAA,WAAI,EAAA,cAAc,EAAE,EAAE,EAAE;YACjD,GAAG,OAAO;YACV,OAAO,EAAE,IAAA,sBAAY,EAAC,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;SAC7D,CAAC,CAAC;IACL,CAAC;IAED;;;OAGG;IACH,OAAO,CAAC,IAAwB,EAAE,OAAwB;QACxD,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,oBAAoB,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACvE,CAAC;CACF;AA5CD,wBA4CC"}
|
package/resources/voices.mjs
CHANGED
|
@@ -5,7 +5,8 @@ import { buildHeaders } from "../internal/headers.mjs";
|
|
|
5
5
|
import { path } from "../internal/utils/path.mjs";
|
|
6
6
|
export class Voices extends APIResource {
|
|
7
7
|
/**
|
|
8
|
-
* Create a custom voice from a text description
|
|
8
|
+
* Create a custom voice from a text description, or clone a voice from an audio
|
|
9
|
+
* sample.
|
|
9
10
|
*/
|
|
10
11
|
create(body, options) {
|
|
11
12
|
return this._client.post('/v1/voices', { body, ...options });
|
package/resources/voices.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"voices.mjs","sourceRoot":"","sources":["../src/resources/voices.ts"],"names":[],"mappings":"AAAA,sFAAs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,OAAwB;QACxD,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,oBAAoB,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACvE,CAAC;CACF"}
|
package/src/client.ts
CHANGED
|
@@ -19,6 +19,7 @@ import { AbstractPage, type CursorPageParams, CursorPageResponse } from './core/
|
|
|
19
19
|
import * as UploadsCore from './core/uploads';
|
|
20
20
|
import * as API from './resources/index';
|
|
21
21
|
import { APIPromise } from './core/api-promise';
|
|
22
|
+
import { AvatarVideoCreateParams, AvatarVideoCreateResponse, AvatarVideos } from './resources/avatar-videos';
|
|
22
23
|
import {
|
|
23
24
|
AvatarCreateParams,
|
|
24
25
|
AvatarCreateResponse,
|
|
@@ -897,6 +898,7 @@ export class RunwayML {
|
|
|
897
898
|
speechToSpeech: API.SpeechToSpeech = new API.SpeechToSpeech(this);
|
|
898
899
|
organization: API.Organization = new API.Organization(this);
|
|
899
900
|
avatars: API.Avatars = new API.Avatars(this);
|
|
901
|
+
avatarVideos: API.AvatarVideos = new API.AvatarVideos(this);
|
|
900
902
|
documents: API.Documents = new API.Documents(this);
|
|
901
903
|
realtimeSessions: API.RealtimeSessions = new API.RealtimeSessions(this);
|
|
902
904
|
voices: API.Voices = new API.Voices(this);
|
|
@@ -918,6 +920,7 @@ RunwayML.VoiceDubbing = VoiceDubbing;
|
|
|
918
920
|
RunwayML.SpeechToSpeech = SpeechToSpeech;
|
|
919
921
|
RunwayML.Organization = Organization;
|
|
920
922
|
RunwayML.Avatars = Avatars;
|
|
923
|
+
RunwayML.AvatarVideos = AvatarVideos;
|
|
921
924
|
RunwayML.Documents = Documents;
|
|
922
925
|
RunwayML.RealtimeSessions = RealtimeSessions;
|
|
923
926
|
RunwayML.Voices = Voices;
|
|
@@ -1012,6 +1015,12 @@ export declare namespace RunwayML {
|
|
|
1012
1015
|
type AvatarListParams as AvatarListParams,
|
|
1013
1016
|
};
|
|
1014
1017
|
|
|
1018
|
+
export {
|
|
1019
|
+
AvatarVideos as AvatarVideos,
|
|
1020
|
+
type AvatarVideoCreateResponse as AvatarVideoCreateResponse,
|
|
1021
|
+
type AvatarVideoCreateParams as AvatarVideoCreateParams,
|
|
1022
|
+
};
|
|
1023
|
+
|
|
1015
1024
|
export {
|
|
1016
1025
|
Documents as Documents,
|
|
1017
1026
|
type DocumentCreateResponse as DocumentCreateResponse,
|
|
@@ -9,10 +9,10 @@
|
|
|
9
9
|
*/
|
|
10
10
|
export const readEnv = (env: string): string | undefined => {
|
|
11
11
|
if (typeof (globalThis as any).process !== 'undefined') {
|
|
12
|
-
return (globalThis as any).process.env?.[env]?.trim()
|
|
12
|
+
return (globalThis as any).process.env?.[env]?.trim() || undefined;
|
|
13
13
|
}
|
|
14
14
|
if (typeof (globalThis as any).Deno !== 'undefined') {
|
|
15
|
-
return (globalThis as any).Deno.env?.get?.(env)?.trim();
|
|
15
|
+
return (globalThis as any).Deno.env?.get?.(env)?.trim() || undefined;
|
|
16
16
|
}
|
|
17
17
|
return undefined;
|
|
18
18
|
};
|
|
@@ -0,0 +1,170 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
import { APIResource } from '../core/resource';
|
|
4
|
+
import { RequestOptions } from '../internal/request-options';
|
|
5
|
+
import { APIPromiseWithAwaitableTask, wrapAsWaitableResource } from '../lib/polling';
|
|
6
|
+
|
|
7
|
+
export class AvatarVideos extends APIResource {
|
|
8
|
+
/**
|
|
9
|
+
* Start an asynchronous task to generate a video of an avatar speaking. Provide
|
|
10
|
+
* `speech` with `type: "audio"` (audio file) or `type: "text"` (text script for
|
|
11
|
+
* TTS). Poll `GET /v1/tasks/:id` to check progress and retrieve the output video
|
|
12
|
+
* URL once complete.
|
|
13
|
+
*/
|
|
14
|
+
create(
|
|
15
|
+
body: AvatarVideoCreateParams,
|
|
16
|
+
options?: RequestOptions,
|
|
17
|
+
): APIPromiseWithAwaitableTask<AvatarVideoCreateResponse> {
|
|
18
|
+
return wrapAsWaitableResource<AvatarVideoCreateResponse>(this._client)(
|
|
19
|
+
this._client.post('/v1/avatar_videos', { body, ...options }),
|
|
20
|
+
);
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export interface AvatarVideoCreateResponse {
|
|
25
|
+
/**
|
|
26
|
+
* The ID of the avatar video task. Use `GET /v1/tasks/:id` to poll for status and
|
|
27
|
+
* output.
|
|
28
|
+
*/
|
|
29
|
+
id: string;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
export interface AvatarVideoCreateParams {
|
|
33
|
+
/**
|
|
34
|
+
* The avatar configuration for the session.
|
|
35
|
+
*/
|
|
36
|
+
avatar: AvatarVideoCreateParams.RunwayPreset | AvatarVideoCreateParams.Custom;
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* The model to use for avatar video generation.
|
|
40
|
+
*/
|
|
41
|
+
model: 'gwm1_avatars';
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* The speech source for avatar video generation. Either an audio file or text
|
|
45
|
+
* script.
|
|
46
|
+
*/
|
|
47
|
+
speech: AvatarVideoCreateParams.Audio | AvatarVideoCreateParams.Text;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
export namespace AvatarVideoCreateParams {
|
|
51
|
+
/**
|
|
52
|
+
* A preset avatar from Runway.
|
|
53
|
+
*/
|
|
54
|
+
export interface RunwayPreset {
|
|
55
|
+
/**
|
|
56
|
+
* ID of a preset avatar.
|
|
57
|
+
*/
|
|
58
|
+
presetId:
|
|
59
|
+
| 'game-character'
|
|
60
|
+
| 'music-superstar'
|
|
61
|
+
| 'game-character-man'
|
|
62
|
+
| 'cat-character'
|
|
63
|
+
| 'influencer'
|
|
64
|
+
| 'tennis-coach'
|
|
65
|
+
| 'human-resource'
|
|
66
|
+
| 'fashion-designer'
|
|
67
|
+
| 'cooking-teacher';
|
|
68
|
+
|
|
69
|
+
type: 'runway-preset';
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
/**
|
|
73
|
+
* A user-created avatar.
|
|
74
|
+
*/
|
|
75
|
+
export interface Custom {
|
|
76
|
+
/**
|
|
77
|
+
* ID of a user-created avatar.
|
|
78
|
+
*/
|
|
79
|
+
avatarId: string;
|
|
80
|
+
|
|
81
|
+
type: 'custom';
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
/**
|
|
85
|
+
* Provide an audio file for the avatar to speak.
|
|
86
|
+
*/
|
|
87
|
+
export interface Audio {
|
|
88
|
+
/**
|
|
89
|
+
* A HTTPS URL.
|
|
90
|
+
*/
|
|
91
|
+
audio: string;
|
|
92
|
+
|
|
93
|
+
type: 'audio';
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
/**
|
|
97
|
+
* Provide text for the avatar to speak via TTS.
|
|
98
|
+
*/
|
|
99
|
+
export interface Text {
|
|
100
|
+
/**
|
|
101
|
+
* Text script for speech-driven video generation.
|
|
102
|
+
*/
|
|
103
|
+
text: string;
|
|
104
|
+
|
|
105
|
+
type: 'text';
|
|
106
|
+
|
|
107
|
+
/**
|
|
108
|
+
* Optional voice override for TTS. If not provided, the avatar's configured voice
|
|
109
|
+
* is used.
|
|
110
|
+
*/
|
|
111
|
+
voice?: Text.Preset | Text.Custom;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
export namespace Text {
|
|
115
|
+
/**
|
|
116
|
+
* A preset voice from the Runway API.
|
|
117
|
+
*/
|
|
118
|
+
export interface Preset {
|
|
119
|
+
presetId:
|
|
120
|
+
| 'victoria'
|
|
121
|
+
| 'vincent'
|
|
122
|
+
| 'clara'
|
|
123
|
+
| 'drew'
|
|
124
|
+
| 'skye'
|
|
125
|
+
| 'max'
|
|
126
|
+
| 'morgan'
|
|
127
|
+
| 'felix'
|
|
128
|
+
| 'mia'
|
|
129
|
+
| 'marcus'
|
|
130
|
+
| 'summer'
|
|
131
|
+
| 'ruby'
|
|
132
|
+
| 'aurora'
|
|
133
|
+
| 'jasper'
|
|
134
|
+
| 'leo'
|
|
135
|
+
| 'adrian'
|
|
136
|
+
| 'nina'
|
|
137
|
+
| 'emma'
|
|
138
|
+
| 'blake'
|
|
139
|
+
| 'david'
|
|
140
|
+
| 'maya'
|
|
141
|
+
| 'nathan'
|
|
142
|
+
| 'sam'
|
|
143
|
+
| 'georgia'
|
|
144
|
+
| 'petra'
|
|
145
|
+
| 'adam'
|
|
146
|
+
| 'zach'
|
|
147
|
+
| 'violet'
|
|
148
|
+
| 'roman'
|
|
149
|
+
| 'luna';
|
|
150
|
+
|
|
151
|
+
type: 'preset';
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
/**
|
|
155
|
+
* A custom voice created via the Voices API.
|
|
156
|
+
*/
|
|
157
|
+
export interface Custom {
|
|
158
|
+
id: string;
|
|
159
|
+
|
|
160
|
+
type: 'custom';
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
export declare namespace AvatarVideos {
|
|
166
|
+
export {
|
|
167
|
+
type AvatarVideoCreateResponse as AvatarVideoCreateResponse,
|
|
168
|
+
type AvatarVideoCreateParams as AvatarVideoCreateParams,
|
|
169
|
+
};
|
|
170
|
+
}
|
|
@@ -70,7 +70,11 @@ export class Documents extends APIResource {
|
|
|
70
70
|
* ```ts
|
|
71
71
|
* // Automatically fetches more pages as needed.
|
|
72
72
|
* for await (const documentListResponse of client.documents.list(
|
|
73
|
-
* {
|
|
73
|
+
* {
|
|
74
|
+
* limit: 1,
|
|
75
|
+
* order: 'asc',
|
|
76
|
+
* sort: 'createdAt',
|
|
77
|
+
* },
|
|
74
78
|
* )) {
|
|
75
79
|
* // ...
|
|
76
80
|
* }
|
|
@@ -291,7 +295,17 @@ export interface DocumentUpdateParams {
|
|
|
291
295
|
name?: string;
|
|
292
296
|
}
|
|
293
297
|
|
|
294
|
-
export interface DocumentListParams extends CursorPageParams {
|
|
298
|
+
export interface DocumentListParams extends CursorPageParams {
|
|
299
|
+
/**
|
|
300
|
+
* Sort direction.
|
|
301
|
+
*/
|
|
302
|
+
order: 'asc' | 'desc';
|
|
303
|
+
|
|
304
|
+
/**
|
|
305
|
+
* Field to sort results by.
|
|
306
|
+
*/
|
|
307
|
+
sort: 'createdAt' | 'updatedAt';
|
|
308
|
+
}
|
|
295
309
|
|
|
296
310
|
export declare namespace Documents {
|
|
297
311
|
export {
|