@runwayml/sdk 3.21.1 → 3.23.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 +22 -0
- package/client.d.mts +6 -0
- package/client.d.mts.map +1 -1
- package/client.d.ts +6 -0
- package/client.d.ts.map +1 -1
- package/client.js +6 -0
- package/client.js.map +1 -1
- package/client.mjs +6 -0
- package/client.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/image-to-video.d.mts +88 -1
- package/resources/image-to-video.d.mts.map +1 -1
- package/resources/image-to-video.d.ts +88 -1
- package/resources/image-to-video.d.ts.map +1 -1
- package/resources/image-upscale.d.mts +62 -0
- package/resources/image-upscale.d.mts.map +1 -0
- package/resources/image-upscale.d.ts +62 -0
- package/resources/image-upscale.d.ts.map +1 -0
- package/resources/image-upscale.js +30 -0
- package/resources/image-upscale.js.map +1 -0
- package/resources/image-upscale.mjs +26 -0
- package/resources/image-upscale.mjs.map +1 -0
- 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 +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/text-to-image.d.mts +45 -1
- package/resources/text-to-image.d.mts.map +1 -1
- package/resources/text-to-image.d.ts +45 -1
- package/resources/text-to-image.d.ts.map +1 -1
- package/resources/text-to-video.d.mts +88 -1
- package/resources/text-to-video.d.mts.map +1 -1
- package/resources/text-to-video.d.ts +88 -1
- package/resources/text-to-video.d.ts.map +1 -1
- package/resources/video-to-video.d.mts +218 -46
- package/resources/video-to-video.d.mts.map +1 -1
- package/resources/video-to-video.d.ts +218 -46
- package/resources/video-to-video.d.ts.map +1 -1
- package/src/client.ts +16 -0
- package/src/resources/image-to-video.ts +125 -0
- package/src/resources/image-upscale.ts +83 -0
- package/src/resources/index.ts +5 -0
- package/src/resources/organization.ts +21 -1
- package/src/resources/text-to-image.ts +109 -0
- package/src/resources/text-to-video.ts +135 -0
- package/src/resources/video-to-video.ts +282 -47
- 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,231 @@ 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.Aleph2 | 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;
|
|
65
37
|
/**
|
|
66
|
-
*
|
|
67
|
-
* preventing generations that include recognizable public figures.
|
|
38
|
+
* A HTTPS URL.
|
|
68
39
|
*/
|
|
69
|
-
|
|
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>;
|
|
55
|
+
/**
|
|
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.
|
|
59
|
+
*/
|
|
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 Aleph2 {
|
|
86
|
+
model: 'aleph2';
|
|
87
|
+
/**
|
|
88
|
+
* A non-empty string up to 1000 characters describing what should appear in the
|
|
89
|
+
* output.
|
|
90
|
+
*/
|
|
91
|
+
promptText: string;
|
|
77
92
|
/**
|
|
78
93
|
* A HTTPS URL.
|
|
79
94
|
*/
|
|
80
|
-
|
|
95
|
+
videoUri: string;
|
|
96
|
+
/**
|
|
97
|
+
* Settings that affect the behavior of the content moderation system.
|
|
98
|
+
*/
|
|
99
|
+
contentModeration?: Aleph2.ContentModeration;
|
|
100
|
+
/**
|
|
101
|
+
* Timed guidance images placed at specific points in the input video. Up to 5
|
|
102
|
+
* keyframes.
|
|
103
|
+
*/
|
|
104
|
+
keyframes?: Array<Aleph2.UnionMember0 | Aleph2.UnionMember1>;
|
|
105
|
+
/**
|
|
106
|
+
* A list of up to 5 image keyframes for guiding the edit at specific points in the
|
|
107
|
+
* video.
|
|
108
|
+
*/
|
|
109
|
+
promptImage?: Array<Aleph2.PromptImage>;
|
|
110
|
+
/**
|
|
111
|
+
* If unspecified, a random number is chosen. Varying the seed integer is a way to
|
|
112
|
+
* get different results for the same other request parameters. Using the same seed
|
|
113
|
+
* integer for an identical request will produce similar results.
|
|
114
|
+
*/
|
|
115
|
+
seed?: number;
|
|
116
|
+
}
|
|
117
|
+
namespace Aleph2 {
|
|
118
|
+
/**
|
|
119
|
+
* Settings that affect the behavior of the content moderation system.
|
|
120
|
+
*/
|
|
121
|
+
interface ContentModeration {
|
|
122
|
+
/**
|
|
123
|
+
* When set to `low`, the content moderation system will be less strict about
|
|
124
|
+
* preventing generations that include recognizable public figures.
|
|
125
|
+
*/
|
|
126
|
+
publicFigureThreshold?: 'auto' | 'low';
|
|
127
|
+
}
|
|
128
|
+
interface UnionMember0 {
|
|
129
|
+
/**
|
|
130
|
+
* Absolute timestamp in seconds from the start of the input video when this
|
|
131
|
+
* guidance image should apply.
|
|
132
|
+
*/
|
|
133
|
+
seconds: number;
|
|
134
|
+
/**
|
|
135
|
+
* A HTTPS URL.
|
|
136
|
+
*/
|
|
137
|
+
uri: string;
|
|
138
|
+
}
|
|
139
|
+
interface UnionMember1 {
|
|
140
|
+
/**
|
|
141
|
+
* Position as a fraction [0.0, 1.0] of the input video duration when this guidance
|
|
142
|
+
* image should apply.
|
|
143
|
+
*/
|
|
144
|
+
at: number;
|
|
145
|
+
/**
|
|
146
|
+
* A HTTPS URL.
|
|
147
|
+
*/
|
|
148
|
+
uri: string;
|
|
149
|
+
}
|
|
150
|
+
interface PromptImage {
|
|
151
|
+
/**
|
|
152
|
+
* - `first` - Places the image at the start of the output video (timestamp 0).
|
|
153
|
+
* - `last` - Places the image at the end of the output video (timestamp =
|
|
154
|
+
* duration).
|
|
155
|
+
*/
|
|
156
|
+
position: 'first' | 'last' | PromptImage.TimestampPosition | PromptImage.RelativePosition;
|
|
157
|
+
/**
|
|
158
|
+
* A HTTPS URL.
|
|
159
|
+
*/
|
|
160
|
+
uri: string;
|
|
161
|
+
}
|
|
162
|
+
namespace PromptImage {
|
|
163
|
+
interface TimestampPosition {
|
|
164
|
+
/**
|
|
165
|
+
* Absolute timestamp in seconds from the start of the output video.
|
|
166
|
+
*/
|
|
167
|
+
timestampSeconds: number;
|
|
168
|
+
type: 'timestamp';
|
|
169
|
+
}
|
|
170
|
+
interface RelativePosition {
|
|
171
|
+
/**
|
|
172
|
+
* Position as a fraction [0.0, 1.0] of the total video duration.
|
|
173
|
+
*/
|
|
174
|
+
positionPercentage: number;
|
|
175
|
+
type: 'position';
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
interface Seedance2 {
|
|
180
|
+
model: 'seedance2';
|
|
181
|
+
/**
|
|
182
|
+
* A HTTPS URL.
|
|
183
|
+
*/
|
|
184
|
+
promptVideo: string;
|
|
185
|
+
/**
|
|
186
|
+
* Whether to generate audio for the video. Audio inclusion affects pricing.
|
|
187
|
+
*/
|
|
188
|
+
audio?: boolean;
|
|
189
|
+
/**
|
|
190
|
+
* The number of seconds of duration for the output video.
|
|
191
|
+
*/
|
|
192
|
+
duration?: number;
|
|
193
|
+
/**
|
|
194
|
+
* An optional text prompt up to 3500 characters describing what should appear in
|
|
195
|
+
* the output video.
|
|
196
|
+
*/
|
|
197
|
+
promptText?: string;
|
|
198
|
+
/**
|
|
199
|
+
* The resolution of the output video.
|
|
200
|
+
*/
|
|
201
|
+
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' | '2206:946' | '1920:1080' | '1664:1248' | '1440:1440' | '1248:1664' | '1080:1920';
|
|
202
|
+
/**
|
|
203
|
+
* An optional array of audio references. Audio references require a text prompt,
|
|
204
|
+
* and the total combined duration must not exceed 15 seconds.
|
|
205
|
+
*/
|
|
206
|
+
referenceAudio?: Array<Seedance2.ReferenceAudio>;
|
|
207
|
+
/**
|
|
208
|
+
* An optional array of image references (up to 9). See
|
|
209
|
+
* [our docs](/assets/inputs#images) on image inputs for more information.
|
|
210
|
+
*/
|
|
211
|
+
references?: Array<Seedance2.Reference>;
|
|
212
|
+
/**
|
|
213
|
+
* An optional array of video references. The combined duration across all video
|
|
214
|
+
* references must not exceed 15 seconds. See [our docs](/assets/inputs#videos) on
|
|
215
|
+
* video inputs for more information.
|
|
216
|
+
*/
|
|
217
|
+
referenceVideos?: Array<Seedance2.ReferenceVideo>;
|
|
218
|
+
}
|
|
219
|
+
namespace Seedance2 {
|
|
220
|
+
/**
|
|
221
|
+
* An audio reference allows the model to use the audio as additional context for
|
|
222
|
+
* the output.
|
|
223
|
+
*/
|
|
224
|
+
interface ReferenceAudio {
|
|
225
|
+
type: 'audio';
|
|
226
|
+
/**
|
|
227
|
+
* A HTTPS URL.
|
|
228
|
+
*/
|
|
229
|
+
uri: string;
|
|
230
|
+
}
|
|
231
|
+
interface Reference {
|
|
232
|
+
/**
|
|
233
|
+
* A HTTPS URL.
|
|
234
|
+
*/
|
|
235
|
+
uri: string;
|
|
236
|
+
/**
|
|
237
|
+
* The position of the image in the output video. "first" will use the image as the
|
|
238
|
+
* first frame, "last" as the last frame. Omit for a reference image.
|
|
239
|
+
*/
|
|
240
|
+
position?: 'first' | 'last';
|
|
241
|
+
}
|
|
242
|
+
/**
|
|
243
|
+
* A video reference allows the model to use the video as additional context for
|
|
244
|
+
* the output.
|
|
245
|
+
*/
|
|
246
|
+
interface ReferenceVideo {
|
|
247
|
+
type: 'video';
|
|
248
|
+
/**
|
|
249
|
+
* A HTTPS URL.
|
|
250
|
+
*/
|
|
251
|
+
uri: string;
|
|
252
|
+
}
|
|
81
253
|
}
|
|
82
254
|
}
|
|
83
255
|
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":"AAEA,OAAO,EAAE,WAAW,EAAE,4BAAyB;AAC/C,OAAO,EAAE,cAAc,EAAE,uCAAoC;AAC7D,OAAO,EAAE,2BAA2B,EAA0B,0BAAuB;AAErF;;GAEG;AACH,qBAAa,YAAa,SAAQ,WAAW;IAC3C;;;;;;;;;;;OA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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/src/client.ts
CHANGED
|
@@ -51,6 +51,11 @@ import {
|
|
|
51
51
|
ImageToVideoCreateParams,
|
|
52
52
|
ImageToVideoCreateResponse,
|
|
53
53
|
} from './resources/image-to-video';
|
|
54
|
+
import {
|
|
55
|
+
ImageUpscale,
|
|
56
|
+
ImageUpscaleCreateParams,
|
|
57
|
+
ImageUpscaleCreateResponse,
|
|
58
|
+
} from './resources/image-upscale';
|
|
54
59
|
import {
|
|
55
60
|
Organization,
|
|
56
61
|
OrganizationRetrieveResponse,
|
|
@@ -908,6 +913,10 @@ export class RunwayML {
|
|
|
908
913
|
* These endpoints all kick off tasks to create generations.
|
|
909
914
|
*/
|
|
910
915
|
speechToSpeech: API.SpeechToSpeech = new API.SpeechToSpeech(this);
|
|
916
|
+
/**
|
|
917
|
+
* These endpoints all kick off tasks to create generations.
|
|
918
|
+
*/
|
|
919
|
+
imageUpscale: API.ImageUpscale = new API.ImageUpscale(this);
|
|
911
920
|
organization: API.Organization = new API.Organization(this);
|
|
912
921
|
avatars: API.Avatars = new API.Avatars(this);
|
|
913
922
|
avatarVideos: API.AvatarVideos = new API.AvatarVideos(this);
|
|
@@ -930,6 +939,7 @@ RunwayML.SoundEffect = SoundEffect;
|
|
|
930
939
|
RunwayML.VoiceIsolation = VoiceIsolation;
|
|
931
940
|
RunwayML.VoiceDubbing = VoiceDubbing;
|
|
932
941
|
RunwayML.SpeechToSpeech = SpeechToSpeech;
|
|
942
|
+
RunwayML.ImageUpscale = ImageUpscale;
|
|
933
943
|
RunwayML.Organization = Organization;
|
|
934
944
|
RunwayML.Avatars = Avatars;
|
|
935
945
|
RunwayML.AvatarVideos = AvatarVideos;
|
|
@@ -1008,6 +1018,12 @@ export declare namespace RunwayML {
|
|
|
1008
1018
|
type SpeechToSpeechCreateParams as SpeechToSpeechCreateParams,
|
|
1009
1019
|
};
|
|
1010
1020
|
|
|
1021
|
+
export {
|
|
1022
|
+
ImageUpscale as ImageUpscale,
|
|
1023
|
+
type ImageUpscaleCreateResponse as ImageUpscaleCreateResponse,
|
|
1024
|
+
type ImageUpscaleCreateParams as ImageUpscaleCreateParams,
|
|
1025
|
+
};
|
|
1026
|
+
|
|
1011
1027
|
export {
|
|
1012
1028
|
Organization as Organization,
|
|
1013
1029
|
type OrganizationRetrieveResponse as OrganizationRetrieveResponse,
|
|
@@ -43,6 +43,8 @@ export type ImageToVideoCreateParams =
|
|
|
43
43
|
| ImageToVideoCreateParams.Veo3_1
|
|
44
44
|
| ImageToVideoCreateParams.Gen3aTurbo
|
|
45
45
|
| ImageToVideoCreateParams.Veo3_1Fast
|
|
46
|
+
| ImageToVideoCreateParams.Happyhorse1_0
|
|
47
|
+
| ImageToVideoCreateParams.Seedance2
|
|
46
48
|
| ImageToVideoCreateParams.Veo3;
|
|
47
49
|
|
|
48
50
|
export declare namespace ImageToVideoCreateParams {
|
|
@@ -333,6 +335,129 @@ export declare namespace ImageToVideoCreateParams {
|
|
|
333
335
|
}
|
|
334
336
|
}
|
|
335
337
|
|
|
338
|
+
export interface Happyhorse1_0 {
|
|
339
|
+
model: 'happyhorse_1_0';
|
|
340
|
+
|
|
341
|
+
/**
|
|
342
|
+
* A HTTPS URL.
|
|
343
|
+
*/
|
|
344
|
+
promptImage: string | Array<Happyhorse1_0.PromptImage>;
|
|
345
|
+
|
|
346
|
+
/**
|
|
347
|
+
* The number of seconds of duration for the output video.
|
|
348
|
+
*/
|
|
349
|
+
duration?: number;
|
|
350
|
+
|
|
351
|
+
/**
|
|
352
|
+
* A string up to 2500 characters (measured in UTF-16 code units) describing motion
|
|
353
|
+
* or changes in the output video.
|
|
354
|
+
*/
|
|
355
|
+
promptText?: string;
|
|
356
|
+
|
|
357
|
+
/**
|
|
358
|
+
* Output quality tier. Output aspect ratio follows the input image.
|
|
359
|
+
*/
|
|
360
|
+
resolution?: '720P' | '1080P';
|
|
361
|
+
}
|
|
362
|
+
|
|
363
|
+
export namespace Happyhorse1_0 {
|
|
364
|
+
export interface PromptImage {
|
|
365
|
+
/**
|
|
366
|
+
* The position of the image in the output video. "first" will use the image as the
|
|
367
|
+
* first frame of the video.
|
|
368
|
+
*/
|
|
369
|
+
position: 'first';
|
|
370
|
+
|
|
371
|
+
/**
|
|
372
|
+
* A HTTPS URL.
|
|
373
|
+
*/
|
|
374
|
+
uri: string;
|
|
375
|
+
}
|
|
376
|
+
}
|
|
377
|
+
|
|
378
|
+
export interface Seedance2 {
|
|
379
|
+
model: 'seedance2';
|
|
380
|
+
|
|
381
|
+
/**
|
|
382
|
+
* An image or array of images. Use position `first`/`last` for keyframe mode, or
|
|
383
|
+
* omit position for reference images. The two modes cannot be mixed.
|
|
384
|
+
*/
|
|
385
|
+
promptImage: string | Array<Seedance2.PromptImage>;
|
|
386
|
+
|
|
387
|
+
/**
|
|
388
|
+
* Whether to generate audio for the video. Audio inclusion affects pricing.
|
|
389
|
+
*/
|
|
390
|
+
audio?: boolean;
|
|
391
|
+
|
|
392
|
+
/**
|
|
393
|
+
* The number of seconds of duration for the output video.
|
|
394
|
+
*/
|
|
395
|
+
duration?: number;
|
|
396
|
+
|
|
397
|
+
/**
|
|
398
|
+
* An optional text prompt up to 3500 characters (measured in UTF-16 code units).
|
|
399
|
+
* This should describe in detail what should appear in the output.
|
|
400
|
+
*/
|
|
401
|
+
promptText?: string;
|
|
402
|
+
|
|
403
|
+
/**
|
|
404
|
+
* The resolution of the output video.
|
|
405
|
+
*/
|
|
406
|
+
ratio?:
|
|
407
|
+
| '992:432'
|
|
408
|
+
| '864:496'
|
|
409
|
+
| '752:560'
|
|
410
|
+
| '640:640'
|
|
411
|
+
| '560:752'
|
|
412
|
+
| '496:864'
|
|
413
|
+
| '1470:630'
|
|
414
|
+
| '1280:720'
|
|
415
|
+
| '1112:834'
|
|
416
|
+
| '960:960'
|
|
417
|
+
| '834:1112'
|
|
418
|
+
| '720:1280'
|
|
419
|
+
| '2206:946'
|
|
420
|
+
| '1920:1080'
|
|
421
|
+
| '1664:1248'
|
|
422
|
+
| '1440:1440'
|
|
423
|
+
| '1248:1664'
|
|
424
|
+
| '1080:1920';
|
|
425
|
+
|
|
426
|
+
/**
|
|
427
|
+
* An optional array of audio references. Audio references require a text prompt,
|
|
428
|
+
* and the total combined duration must not exceed 15 seconds.
|
|
429
|
+
*/
|
|
430
|
+
referenceAudio?: Array<Seedance2.ReferenceAudio>;
|
|
431
|
+
}
|
|
432
|
+
|
|
433
|
+
export namespace Seedance2 {
|
|
434
|
+
export interface PromptImage {
|
|
435
|
+
/**
|
|
436
|
+
* A HTTPS URL.
|
|
437
|
+
*/
|
|
438
|
+
uri: string;
|
|
439
|
+
|
|
440
|
+
/**
|
|
441
|
+
* The position of the image in the output video. "first" will use the image as the
|
|
442
|
+
* first frame, "last" as the last frame. Omit for a reference image.
|
|
443
|
+
*/
|
|
444
|
+
position?: 'first' | 'last';
|
|
445
|
+
}
|
|
446
|
+
|
|
447
|
+
/**
|
|
448
|
+
* An audio reference allows the model to use the audio as additional context for
|
|
449
|
+
* the output.
|
|
450
|
+
*/
|
|
451
|
+
export interface ReferenceAudio {
|
|
452
|
+
type: 'audio';
|
|
453
|
+
|
|
454
|
+
/**
|
|
455
|
+
* A HTTPS URL.
|
|
456
|
+
*/
|
|
457
|
+
uri: string;
|
|
458
|
+
}
|
|
459
|
+
}
|
|
460
|
+
|
|
336
461
|
export interface Veo3 {
|
|
337
462
|
/**
|
|
338
463
|
* The number of seconds of duration for the output video.
|
|
@@ -0,0 +1,83 @@
|
|
|
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
|
+
/**
|
|
8
|
+
* These endpoints all kick off tasks to create generations.
|
|
9
|
+
*/
|
|
10
|
+
export class ImageUpscale extends APIResource {
|
|
11
|
+
/**
|
|
12
|
+
* Upscale an image with Magnific precision upscaling. Each input dimension must be
|
|
13
|
+
* between 300px and 8000px. Output width and height are the input dimensions
|
|
14
|
+
* multiplied by `scaleFactor` (default 2). Output width times height cannot exceed
|
|
15
|
+
* 25,300,000 pixels (~25.3 million).
|
|
16
|
+
*
|
|
17
|
+
* @example
|
|
18
|
+
* ```ts
|
|
19
|
+
* const imageUpscale = await client.imageUpscale.create({
|
|
20
|
+
* imageUri: 'https://example.com/image.jpg',
|
|
21
|
+
* model: 'magnific_precision_upscaler_v2',
|
|
22
|
+
* });
|
|
23
|
+
* ```
|
|
24
|
+
*/
|
|
25
|
+
create(
|
|
26
|
+
body: ImageUpscaleCreateParams,
|
|
27
|
+
options?: RequestOptions,
|
|
28
|
+
): APIPromiseWithAwaitableTask<ImageUpscaleCreateResponse> {
|
|
29
|
+
return wrapAsWaitableResource<ImageUpscaleCreateResponse>(this._client)(
|
|
30
|
+
this._client.post('/v1/image_upscale', { body, ...options }),
|
|
31
|
+
);
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
export interface ImageUpscaleCreateResponse {
|
|
36
|
+
/**
|
|
37
|
+
* The ID of the task that was created. Use this to retrieve the task later.
|
|
38
|
+
*/
|
|
39
|
+
id: string;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
export interface ImageUpscaleCreateParams {
|
|
43
|
+
/**
|
|
44
|
+
* A HTTPS URL.
|
|
45
|
+
*/
|
|
46
|
+
imageUri: string;
|
|
47
|
+
|
|
48
|
+
model: 'magnific_precision_upscaler_v2';
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* Optimization preset: `sublime` (illustration), `photo` (photographic), or
|
|
52
|
+
* `photo_denoiser` (noisy photos).
|
|
53
|
+
*/
|
|
54
|
+
flavor?: 'sublime' | 'photo' | 'photo_denoiser';
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* Multiplies each input dimension to produce output width and height. Defaults
|
|
58
|
+
* to 2.
|
|
59
|
+
*/
|
|
60
|
+
scaleFactor?: 2 | 4 | 8 | 16;
|
|
61
|
+
|
|
62
|
+
/**
|
|
63
|
+
* Sharpness intensity from 0 (none) to 100.
|
|
64
|
+
*/
|
|
65
|
+
sharpen?: number;
|
|
66
|
+
|
|
67
|
+
/**
|
|
68
|
+
* Grain and texture enhancement from 0 to 100.
|
|
69
|
+
*/
|
|
70
|
+
smartGrain?: number;
|
|
71
|
+
|
|
72
|
+
/**
|
|
73
|
+
* Fine detail enhancement from 0 to 100.
|
|
74
|
+
*/
|
|
75
|
+
ultraDetail?: number;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
export declare namespace ImageUpscale {
|
|
79
|
+
export {
|
|
80
|
+
type ImageUpscaleCreateResponse as ImageUpscaleCreateResponse,
|
|
81
|
+
type ImageUpscaleCreateParams as ImageUpscaleCreateParams,
|
|
82
|
+
};
|
|
83
|
+
}
|
package/src/resources/index.ts
CHANGED
|
@@ -32,6 +32,11 @@ export {
|
|
|
32
32
|
type ImageToVideoCreateResponse,
|
|
33
33
|
type ImageToVideoCreateParams,
|
|
34
34
|
} from './image-to-video';
|
|
35
|
+
export {
|
|
36
|
+
ImageUpscale,
|
|
37
|
+
type ImageUpscaleCreateResponse,
|
|
38
|
+
type ImageUpscaleCreateParams,
|
|
39
|
+
} from './image-upscale';
|
|
35
40
|
export {
|
|
36
41
|
Organization,
|
|
37
42
|
type OrganizationRetrieveResponse,
|
|
@@ -127,6 +127,16 @@ export interface OrganizationRetrieveUsageResponse {
|
|
|
127
127
|
| 'gwm1_avatar_async_text_to_video'
|
|
128
128
|
| 'voice_processing'
|
|
129
129
|
| 'seedance2'
|
|
130
|
+
| 'magnific_precision_upscaler_v2'
|
|
131
|
+
| 'kling2.5_turbo_pro'
|
|
132
|
+
| 'kling3.0_pro'
|
|
133
|
+
| 'kling3.0_4k'
|
|
134
|
+
| 'kling3.0_standard'
|
|
135
|
+
| 'klingO3_pro'
|
|
136
|
+
| 'klingO3_standard'
|
|
137
|
+
| 'klingO3_4k'
|
|
138
|
+
| 'happyhorse_1_0'
|
|
139
|
+
| 'aleph2'
|
|
130
140
|
>;
|
|
131
141
|
|
|
132
142
|
results: Array<OrganizationRetrieveUsageResponse.Result>;
|
|
@@ -183,7 +193,17 @@ export namespace OrganizationRetrieveUsageResponse {
|
|
|
183
193
|
| 'gwm1_avatar_async_audio_to_video'
|
|
184
194
|
| 'gwm1_avatar_async_text_to_video'
|
|
185
195
|
| 'voice_processing'
|
|
186
|
-
| 'seedance2'
|
|
196
|
+
| 'seedance2'
|
|
197
|
+
| 'magnific_precision_upscaler_v2'
|
|
198
|
+
| 'kling2.5_turbo_pro'
|
|
199
|
+
| 'kling3.0_pro'
|
|
200
|
+
| 'kling3.0_4k'
|
|
201
|
+
| 'kling3.0_standard'
|
|
202
|
+
| 'klingO3_pro'
|
|
203
|
+
| 'klingO3_standard'
|
|
204
|
+
| 'klingO3_4k'
|
|
205
|
+
| 'happyhorse_1_0'
|
|
206
|
+
| 'aleph2';
|
|
187
207
|
}
|
|
188
208
|
}
|
|
189
209
|
}
|