@runwayml/sdk 3.11.0 → 3.14.3
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 +95 -0
- package/LICENSE +1 -1
- package/README.md +12 -2
- package/client.d.mts +1 -3
- package/client.d.mts.map +1 -1
- package/client.d.ts +1 -3
- package/client.d.ts.map +1 -1
- package/client.js +15 -5
- package/client.js.map +1 -1
- package/client.mjs +15 -5
- package/client.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/package.json +1 -1
- package/resources/image-to-video.d.mts +55 -1
- package/resources/image-to-video.d.mts.map +1 -1
- package/resources/image-to-video.d.ts +55 -1
- package/resources/image-to-video.d.ts.map +1 -1
- package/resources/index.d.mts +0 -1
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +0 -1
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +1 -3
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +0 -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/text-to-video.d.mts +40 -1
- package/resources/text-to-video.d.mts.map +1 -1
- package/resources/text-to-video.d.ts +40 -1
- package/resources/text-to-video.d.ts.map +1 -1
- package/resources/video-to-video.d.mts +5 -5
- package/resources/video-to-video.d.mts.map +1 -1
- package/resources/video-to-video.d.ts +5 -5
- package/resources/video-to-video.d.ts.map +1 -1
- package/resources/video-to-video.js +0 -1
- package/resources/video-to-video.js.map +1 -1
- package/resources/video-to-video.mjs +0 -1
- package/resources/video-to-video.mjs.map +1 -1
- package/src/client.ts +18 -16
- package/src/internal/parse.ts +6 -0
- package/src/resources/image-to-video.ts +65 -0
- package/src/resources/index.ts +0 -5
- package/src/resources/organization.ts +2 -2
- package/src/resources/text-to-video.ts +47 -0
- package/src/resources/video-to-video.ts +6 -6
- 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
package/src/client.ts
CHANGED
|
@@ -51,11 +51,6 @@ import {
|
|
|
51
51
|
VideoToVideoCreateParams,
|
|
52
52
|
VideoToVideoCreateResponse,
|
|
53
53
|
} from './resources/video-to-video';
|
|
54
|
-
import {
|
|
55
|
-
VideoUpscale,
|
|
56
|
-
VideoUpscaleCreateParams,
|
|
57
|
-
VideoUpscaleCreateResponse,
|
|
58
|
-
} from './resources/video-upscale';
|
|
59
54
|
import {
|
|
60
55
|
VoiceDubbing,
|
|
61
56
|
VoiceDubbingCreateParams,
|
|
@@ -513,7 +508,7 @@ export class RunwayML {
|
|
|
513
508
|
loggerFor(this).info(`${responseInfo} - ${retryMessage}`);
|
|
514
509
|
|
|
515
510
|
const errText = await response.text().catch((err: any) => castToError(err).message);
|
|
516
|
-
const errJSON = safeJSON(errText);
|
|
511
|
+
const errJSON = safeJSON(errText) as any;
|
|
517
512
|
const errMessage = errJSON ? undefined : errText;
|
|
518
513
|
|
|
519
514
|
loggerFor(this).debug(
|
|
@@ -554,9 +549,10 @@ export class RunwayML {
|
|
|
554
549
|
controller: AbortController,
|
|
555
550
|
): Promise<Response> {
|
|
556
551
|
const { signal, method, ...options } = init || {};
|
|
557
|
-
|
|
552
|
+
const abort = this._makeAbort(controller);
|
|
553
|
+
if (signal) signal.addEventListener('abort', abort, { once: true });
|
|
558
554
|
|
|
559
|
-
const timeout = setTimeout(
|
|
555
|
+
const timeout = setTimeout(abort, ms);
|
|
560
556
|
|
|
561
557
|
const isReadableBody =
|
|
562
558
|
((globalThis as any).ReadableStream && options.body instanceof (globalThis as any).ReadableStream) ||
|
|
@@ -724,6 +720,12 @@ export class RunwayML {
|
|
|
724
720
|
return headers.values;
|
|
725
721
|
}
|
|
726
722
|
|
|
723
|
+
private _makeAbort(controller: AbortController) {
|
|
724
|
+
// note: we can't just inline this method inside `fetchWithTimeout()` because then the closure
|
|
725
|
+
// would capture all request options, and cause a memory leak.
|
|
726
|
+
return () => controller.abort();
|
|
727
|
+
}
|
|
728
|
+
|
|
727
729
|
private buildBody({ options: { body, headers: rawHeaders } }: { options: FinalRequestOptions }): {
|
|
728
730
|
bodyHeaders: HeadersLike;
|
|
729
731
|
body: BodyInit | undefined;
|
|
@@ -756,6 +758,14 @@ export class RunwayML {
|
|
|
756
758
|
(Symbol.iterator in body && 'next' in body && typeof body.next === 'function'))
|
|
757
759
|
) {
|
|
758
760
|
return { bodyHeaders: undefined, body: Shims.ReadableStreamFrom(body as AsyncIterable<Uint8Array>) };
|
|
761
|
+
} else if (
|
|
762
|
+
typeof body === 'object' &&
|
|
763
|
+
headers.values.get('content-type') === 'application/x-www-form-urlencoded'
|
|
764
|
+
) {
|
|
765
|
+
return {
|
|
766
|
+
bodyHeaders: { 'content-type': 'application/x-www-form-urlencoded' },
|
|
767
|
+
body: this.stringifyQuery(body as Record<string, unknown>),
|
|
768
|
+
};
|
|
759
769
|
} else {
|
|
760
770
|
return this.#encoder({ body, headers });
|
|
761
771
|
}
|
|
@@ -785,7 +795,6 @@ export class RunwayML {
|
|
|
785
795
|
videoToVideo: API.VideoToVideo = new API.VideoToVideo(this);
|
|
786
796
|
textToVideo: API.TextToVideo = new API.TextToVideo(this);
|
|
787
797
|
textToImage: API.TextToImage = new API.TextToImage(this);
|
|
788
|
-
videoUpscale: API.VideoUpscale = new API.VideoUpscale(this);
|
|
789
798
|
characterPerformance: API.CharacterPerformance = new API.CharacterPerformance(this);
|
|
790
799
|
textToSpeech: API.TextToSpeech = new API.TextToSpeech(this);
|
|
791
800
|
soundEffect: API.SoundEffect = new API.SoundEffect(this);
|
|
@@ -801,7 +810,6 @@ RunwayML.ImageToVideo = ImageToVideo;
|
|
|
801
810
|
RunwayML.VideoToVideo = VideoToVideo;
|
|
802
811
|
RunwayML.TextToVideo = TextToVideo;
|
|
803
812
|
RunwayML.TextToImage = TextToImage;
|
|
804
|
-
RunwayML.VideoUpscale = VideoUpscale;
|
|
805
813
|
RunwayML.CharacterPerformance = CharacterPerformance;
|
|
806
814
|
RunwayML.TextToSpeech = TextToSpeech;
|
|
807
815
|
RunwayML.SoundEffect = SoundEffect;
|
|
@@ -840,12 +848,6 @@ export declare namespace RunwayML {
|
|
|
840
848
|
type TextToImageCreateParams as TextToImageCreateParams,
|
|
841
849
|
};
|
|
842
850
|
|
|
843
|
-
export {
|
|
844
|
-
VideoUpscale as VideoUpscale,
|
|
845
|
-
type VideoUpscaleCreateResponse as VideoUpscaleCreateResponse,
|
|
846
|
-
type VideoUpscaleCreateParams as VideoUpscaleCreateParams,
|
|
847
|
-
};
|
|
848
|
-
|
|
849
851
|
export {
|
|
850
852
|
CharacterPerformance as CharacterPerformance,
|
|
851
853
|
type CharacterPerformanceCreateResponse as CharacterPerformanceCreateResponse,
|
package/src/internal/parse.ts
CHANGED
|
@@ -29,6 +29,12 @@ export async function defaultParseResponse<T>(client: RunwayML, props: APIRespon
|
|
|
29
29
|
const mediaType = contentType?.split(';')[0]?.trim();
|
|
30
30
|
const isJSON = mediaType?.includes('application/json') || mediaType?.endsWith('+json');
|
|
31
31
|
if (isJSON) {
|
|
32
|
+
const contentLength = response.headers.get('content-length');
|
|
33
|
+
if (contentLength === '0') {
|
|
34
|
+
// if there is no content we can't do anything
|
|
35
|
+
return undefined as T;
|
|
36
|
+
}
|
|
37
|
+
|
|
32
38
|
const json = await response.json();
|
|
33
39
|
return json as T;
|
|
34
40
|
}
|
|
@@ -35,6 +35,7 @@ export interface ImageToVideoCreateResponse {
|
|
|
35
35
|
}
|
|
36
36
|
|
|
37
37
|
export type ImageToVideoCreateParams =
|
|
38
|
+
| ImageToVideoCreateParams.Gen4_5
|
|
38
39
|
| ImageToVideoCreateParams.Gen4Turbo
|
|
39
40
|
| ImageToVideoCreateParams.Veo3_1
|
|
40
41
|
| ImageToVideoCreateParams.Gen3aTurbo
|
|
@@ -42,6 +43,70 @@ export type ImageToVideoCreateParams =
|
|
|
42
43
|
| ImageToVideoCreateParams.Veo3;
|
|
43
44
|
|
|
44
45
|
export declare namespace ImageToVideoCreateParams {
|
|
46
|
+
export interface Gen4_5 {
|
|
47
|
+
/**
|
|
48
|
+
* The number of seconds of duration for the output video. Must be an integer from
|
|
49
|
+
* 2 to 10.
|
|
50
|
+
*/
|
|
51
|
+
duration: number;
|
|
52
|
+
|
|
53
|
+
model: 'gen4.5';
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* A HTTPS URL.
|
|
57
|
+
*/
|
|
58
|
+
promptImage: string | Array<Gen4_5.PromptImage>;
|
|
59
|
+
|
|
60
|
+
/**
|
|
61
|
+
* A non-empty string up to 1000 characters (measured in UTF-16 code units). This
|
|
62
|
+
* should describe in detail what should appear in the output.
|
|
63
|
+
*/
|
|
64
|
+
promptText: string;
|
|
65
|
+
|
|
66
|
+
/**
|
|
67
|
+
* The resolution of the output video.
|
|
68
|
+
*/
|
|
69
|
+
ratio: '1280:720' | '720:1280' | '1104:832' | '960:960' | '832:1104' | '1584:672';
|
|
70
|
+
|
|
71
|
+
/**
|
|
72
|
+
* Settings that affect the behavior of the content moderation system.
|
|
73
|
+
*/
|
|
74
|
+
contentModeration?: Gen4_5.ContentModeration;
|
|
75
|
+
|
|
76
|
+
/**
|
|
77
|
+
* If unspecified, a random number is chosen. Varying the seed integer is a way to
|
|
78
|
+
* get different results for the same other request parameters. Using the same seed
|
|
79
|
+
* integer for an identical request will produce similar results.
|
|
80
|
+
*/
|
|
81
|
+
seed?: number;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
export namespace Gen4_5 {
|
|
85
|
+
export interface PromptImage {
|
|
86
|
+
/**
|
|
87
|
+
* The position of the image in the output video. "first" will use the image as the
|
|
88
|
+
* first frame of the video.
|
|
89
|
+
*/
|
|
90
|
+
position: 'first';
|
|
91
|
+
|
|
92
|
+
/**
|
|
93
|
+
* A HTTPS URL.
|
|
94
|
+
*/
|
|
95
|
+
uri: string;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
/**
|
|
99
|
+
* Settings that affect the behavior of the content moderation system.
|
|
100
|
+
*/
|
|
101
|
+
export interface ContentModeration {
|
|
102
|
+
/**
|
|
103
|
+
* When set to `low`, the content moderation system will be less strict about
|
|
104
|
+
* preventing generations that include recognizable public figures.
|
|
105
|
+
*/
|
|
106
|
+
publicFigureThreshold?: 'auto' | 'low';
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
|
|
45
110
|
export interface Gen4Turbo {
|
|
46
111
|
model: 'gen4_turbo';
|
|
47
112
|
|
package/src/resources/index.ts
CHANGED
|
@@ -35,11 +35,6 @@ export {
|
|
|
35
35
|
type VideoToVideoCreateResponse,
|
|
36
36
|
type VideoToVideoCreateParams,
|
|
37
37
|
} from './video-to-video';
|
|
38
|
-
export {
|
|
39
|
-
VideoUpscale,
|
|
40
|
-
type VideoUpscaleCreateResponse,
|
|
41
|
-
type VideoUpscaleCreateParams,
|
|
42
|
-
} from './video-upscale';
|
|
43
38
|
export {
|
|
44
39
|
VoiceDubbing,
|
|
45
40
|
type VoiceDubbingCreateResponse,
|
|
@@ -101,11 +101,11 @@ export interface OrganizationRetrieveUsageResponse {
|
|
|
101
101
|
* The list of models with usage during the queried time range.
|
|
102
102
|
*/
|
|
103
103
|
models: Array<
|
|
104
|
+
| 'gen4.5'
|
|
104
105
|
| 'gen3a_turbo'
|
|
105
106
|
| 'gen4_turbo'
|
|
106
107
|
| 'gen4_image'
|
|
107
108
|
| 'gen4_image_turbo'
|
|
108
|
-
| 'upscale_v1'
|
|
109
109
|
| 'act_two'
|
|
110
110
|
| 'gen4_aleph'
|
|
111
111
|
| 'veo3'
|
|
@@ -147,11 +147,11 @@ export namespace OrganizationRetrieveUsageResponse {
|
|
|
147
147
|
* The model that credits were spent on.
|
|
148
148
|
*/
|
|
149
149
|
model:
|
|
150
|
+
| 'gen4.5'
|
|
150
151
|
| 'gen3a_turbo'
|
|
151
152
|
| 'gen4_turbo'
|
|
152
153
|
| 'gen4_image'
|
|
153
154
|
| 'gen4_image_turbo'
|
|
154
|
-
| 'upscale_v1'
|
|
155
155
|
| 'act_two'
|
|
156
156
|
| 'gen4_aleph'
|
|
157
157
|
| 'veo3'
|
|
@@ -26,11 +26,58 @@ export interface TextToVideoCreateResponse {
|
|
|
26
26
|
}
|
|
27
27
|
|
|
28
28
|
export type TextToVideoCreateParams =
|
|
29
|
+
| TextToVideoCreateParams.Gen4_5
|
|
29
30
|
| TextToVideoCreateParams.Veo3_1
|
|
30
31
|
| TextToVideoCreateParams.Veo3_1Fast
|
|
31
32
|
| TextToVideoCreateParams.Veo3;
|
|
32
33
|
|
|
33
34
|
export declare namespace TextToVideoCreateParams {
|
|
35
|
+
export interface Gen4_5 {
|
|
36
|
+
/**
|
|
37
|
+
* The number of seconds of duration for the output video. Must be an integer from
|
|
38
|
+
* 2 to 10.
|
|
39
|
+
*/
|
|
40
|
+
duration: number;
|
|
41
|
+
|
|
42
|
+
model: 'gen4.5';
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* A non-empty string up to 1000 characters (measured in UTF-16 code units). This
|
|
46
|
+
* should describe in detail what should appear in the output.
|
|
47
|
+
*/
|
|
48
|
+
promptText: string;
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* The resolution of the output video.
|
|
52
|
+
*/
|
|
53
|
+
ratio: '1280:720' | '720:1280';
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* Settings that affect the behavior of the content moderation system.
|
|
57
|
+
*/
|
|
58
|
+
contentModeration?: Gen4_5.ContentModeration;
|
|
59
|
+
|
|
60
|
+
/**
|
|
61
|
+
* If unspecified, a random number is chosen. Varying the seed integer is a way to
|
|
62
|
+
* get different results for the same other request parameters. Using the same seed
|
|
63
|
+
* integer for an identical request will produce similar results.
|
|
64
|
+
*/
|
|
65
|
+
seed?: number;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
export namespace Gen4_5 {
|
|
69
|
+
/**
|
|
70
|
+
* Settings that affect the behavior of the content moderation system.
|
|
71
|
+
*/
|
|
72
|
+
export interface ContentModeration {
|
|
73
|
+
/**
|
|
74
|
+
* When set to `low`, the content moderation system will be less strict about
|
|
75
|
+
* preventing generations that include recognizable public figures.
|
|
76
|
+
*/
|
|
77
|
+
publicFigureThreshold?: 'auto' | 'low';
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
|
|
34
81
|
export interface Veo3_1 {
|
|
35
82
|
model: 'veo3.1';
|
|
36
83
|
|
|
@@ -13,7 +13,6 @@ export class VideoToVideo extends APIResource {
|
|
|
13
13
|
* const videoToVideo = await client.videoToVideo.create({
|
|
14
14
|
* model: 'gen4_aleph',
|
|
15
15
|
* promptText: 'x',
|
|
16
|
-
* ratio: '1280:720',
|
|
17
16
|
* videoUri: 'https://example.com/video.mp4',
|
|
18
17
|
* });
|
|
19
18
|
* ```
|
|
@@ -44,11 +43,6 @@ export interface VideoToVideoCreateParams {
|
|
|
44
43
|
*/
|
|
45
44
|
promptText: string;
|
|
46
45
|
|
|
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
46
|
/**
|
|
53
47
|
* A HTTPS URL.
|
|
54
48
|
*/
|
|
@@ -59,6 +53,12 @@ export interface VideoToVideoCreateParams {
|
|
|
59
53
|
*/
|
|
60
54
|
contentModeration?: VideoToVideoCreateParams.ContentModeration;
|
|
61
55
|
|
|
56
|
+
/**
|
|
57
|
+
* @deprecated Deprecated. This field is ignored. The resolution of the output
|
|
58
|
+
* video is determined by the input video.
|
|
59
|
+
*/
|
|
60
|
+
ratio?: '1280:720' | '720:1280' | '1104:832' | '960:960' | '832:1104' | '1584:672' | '848:480' | '640:480';
|
|
61
|
+
|
|
62
62
|
/**
|
|
63
63
|
* An array of references. Currently up to one reference is supported. See
|
|
64
64
|
* [our docs](/assets/inputs#images) on image inputs for more information.
|
package/src/version.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const VERSION = '3.
|
|
1
|
+
export const VERSION = '3.14.3'; // x-release-please-version
|
package/version.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "3.
|
|
1
|
+
export declare const VERSION = "3.14.3";
|
|
2
2
|
//# sourceMappingURL=version.d.mts.map
|
package/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "3.
|
|
1
|
+
export declare const VERSION = "3.14.3";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
package/version.js
CHANGED
package/version.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export const VERSION = '3.
|
|
1
|
+
export const VERSION = '3.14.3'; // x-release-please-version
|
|
2
2
|
//# sourceMappingURL=version.mjs.map
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import { APIResource } from "../core/resource.mjs";
|
|
2
|
-
import { RequestOptions } from "../internal/request-options.mjs";
|
|
3
|
-
import { APIPromiseWithAwaitableTask } from "../lib/polling.mjs";
|
|
4
|
-
export declare class VideoUpscale extends APIResource {
|
|
5
|
-
/**
|
|
6
|
-
* This endpoint will start a new task to upscale a video. Videos will be upscaled
|
|
7
|
-
* by a factor of 4X, capped at a maximum of 4096px along each side.
|
|
8
|
-
*
|
|
9
|
-
* @example
|
|
10
|
-
* ```ts
|
|
11
|
-
* const videoUpscale = await client.videoUpscale.create({
|
|
12
|
-
* model: 'upscale_v1',
|
|
13
|
-
* videoUri: 'https://example.com/video.mp4',
|
|
14
|
-
* });
|
|
15
|
-
* ```
|
|
16
|
-
*/
|
|
17
|
-
create(body: VideoUpscaleCreateParams, options?: RequestOptions): APIPromiseWithAwaitableTask<VideoUpscaleCreateResponse>;
|
|
18
|
-
}
|
|
19
|
-
export interface VideoUpscaleCreateResponse {
|
|
20
|
-
/**
|
|
21
|
-
* The ID of the task that was created. Use this to retrieve the task later.
|
|
22
|
-
*/
|
|
23
|
-
id: string;
|
|
24
|
-
}
|
|
25
|
-
export interface VideoUpscaleCreateParams {
|
|
26
|
-
model: 'upscale_v1';
|
|
27
|
-
/**
|
|
28
|
-
* A HTTPS URL.
|
|
29
|
-
*/
|
|
30
|
-
videoUri: string;
|
|
31
|
-
}
|
|
32
|
-
export declare namespace VideoUpscale {
|
|
33
|
-
export { type VideoUpscaleCreateResponse as VideoUpscaleCreateResponse, type VideoUpscaleCreateParams as VideoUpscaleCreateParams, };
|
|
34
|
-
}
|
|
35
|
-
//# sourceMappingURL=video-upscale.d.mts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"video-upscale.d.mts","sourceRoot":"","sources":["../src/resources/video-upscale.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,cAAc,EAAE;OAClB,EAAE,2BAA2B,EAA0B;AAE9D,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;IACvC,KAAK,EAAE,YAAY,CAAC;IAEpB;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,CAAC,OAAO,WAAW,YAAY,CAAC;IACpC,OAAO,EACL,KAAK,0BAA0B,IAAI,0BAA0B,EAC7D,KAAK,wBAAwB,IAAI,wBAAwB,GAC1D,CAAC;CACH"}
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import { APIResource } from "../core/resource.js";
|
|
2
|
-
import { RequestOptions } from "../internal/request-options.js";
|
|
3
|
-
import { APIPromiseWithAwaitableTask } from "../lib/polling.js";
|
|
4
|
-
export declare class VideoUpscale extends APIResource {
|
|
5
|
-
/**
|
|
6
|
-
* This endpoint will start a new task to upscale a video. Videos will be upscaled
|
|
7
|
-
* by a factor of 4X, capped at a maximum of 4096px along each side.
|
|
8
|
-
*
|
|
9
|
-
* @example
|
|
10
|
-
* ```ts
|
|
11
|
-
* const videoUpscale = await client.videoUpscale.create({
|
|
12
|
-
* model: 'upscale_v1',
|
|
13
|
-
* videoUri: 'https://example.com/video.mp4',
|
|
14
|
-
* });
|
|
15
|
-
* ```
|
|
16
|
-
*/
|
|
17
|
-
create(body: VideoUpscaleCreateParams, options?: RequestOptions): APIPromiseWithAwaitableTask<VideoUpscaleCreateResponse>;
|
|
18
|
-
}
|
|
19
|
-
export interface VideoUpscaleCreateResponse {
|
|
20
|
-
/**
|
|
21
|
-
* The ID of the task that was created. Use this to retrieve the task later.
|
|
22
|
-
*/
|
|
23
|
-
id: string;
|
|
24
|
-
}
|
|
25
|
-
export interface VideoUpscaleCreateParams {
|
|
26
|
-
model: 'upscale_v1';
|
|
27
|
-
/**
|
|
28
|
-
* A HTTPS URL.
|
|
29
|
-
*/
|
|
30
|
-
videoUri: string;
|
|
31
|
-
}
|
|
32
|
-
export declare namespace VideoUpscale {
|
|
33
|
-
export { type VideoUpscaleCreateResponse as VideoUpscaleCreateResponse, type VideoUpscaleCreateParams as VideoUpscaleCreateParams, };
|
|
34
|
-
}
|
|
35
|
-
//# sourceMappingURL=video-upscale.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"video-upscale.d.ts","sourceRoot":"","sources":["../src/resources/video-upscale.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,cAAc,EAAE;OAClB,EAAE,2BAA2B,EAA0B;AAE9D,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;IACvC,KAAK,EAAE,YAAY,CAAC;IAEpB;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,CAAC,OAAO,WAAW,YAAY,CAAC;IACpC,OAAO,EACL,KAAK,0BAA0B,IAAI,0BAA0B,EAC7D,KAAK,wBAAwB,IAAI,wBAAwB,GAC1D,CAAC;CACH"}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
3
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.VideoUpscale = void 0;
|
|
5
|
-
const resource_1 = require("../core/resource.js");
|
|
6
|
-
const polling_1 = require("../lib/polling.js");
|
|
7
|
-
class VideoUpscale extends resource_1.APIResource {
|
|
8
|
-
/**
|
|
9
|
-
* This endpoint will start a new task to upscale a video. Videos will be upscaled
|
|
10
|
-
* by a factor of 4X, capped at a maximum of 4096px along each side.
|
|
11
|
-
*
|
|
12
|
-
* @example
|
|
13
|
-
* ```ts
|
|
14
|
-
* const videoUpscale = await client.videoUpscale.create({
|
|
15
|
-
* model: 'upscale_v1',
|
|
16
|
-
* videoUri: 'https://example.com/video.mp4',
|
|
17
|
-
* });
|
|
18
|
-
* ```
|
|
19
|
-
*/
|
|
20
|
-
create(body, options) {
|
|
21
|
-
return (0, polling_1.wrapAsWaitableResource)(this._client)(this._client.post('/v1/video_upscale', { body, ...options }));
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
exports.VideoUpscale = VideoUpscale;
|
|
25
|
-
//# sourceMappingURL=video-upscale.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"video-upscale.js","sourceRoot":"","sources":["../src/resources/video-upscale.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,kDAA+C;AAE/C,+CAAqF;AAErF,MAAa,YAAa,SAAQ,sBAAW;IAC3C;;;;;;;;;;;OAWG;IACH,MAAM,CACJ,IAA8B,EAC9B,OAAwB;QAExB,OAAO,IAAA,gCAAsB,EAA6B,IAAI,CAAC,OAAO,CAAC,CACrE,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,mBAAmB,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAC7D,CAAC;IACJ,CAAC;CACF;AArBD,oCAqBC"}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
-
import { APIResource } from "../core/resource.mjs";
|
|
3
|
-
import { wrapAsWaitableResource } from "../lib/polling.mjs";
|
|
4
|
-
export class VideoUpscale extends APIResource {
|
|
5
|
-
/**
|
|
6
|
-
* This endpoint will start a new task to upscale a video. Videos will be upscaled
|
|
7
|
-
* by a factor of 4X, capped at a maximum of 4096px along each side.
|
|
8
|
-
*
|
|
9
|
-
* @example
|
|
10
|
-
* ```ts
|
|
11
|
-
* const videoUpscale = await client.videoUpscale.create({
|
|
12
|
-
* model: 'upscale_v1',
|
|
13
|
-
* videoUri: 'https://example.com/video.mp4',
|
|
14
|
-
* });
|
|
15
|
-
* ```
|
|
16
|
-
*/
|
|
17
|
-
create(body, options) {
|
|
18
|
-
return wrapAsWaitableResource(this._client)(this._client.post('/v1/video_upscale', { body, ...options }));
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
//# sourceMappingURL=video-upscale.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"video-upscale.mjs","sourceRoot":"","sources":["../src/resources/video-upscale.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OAEf,EAA+B,sBAAsB,EAAE;AAE9D,MAAM,OAAO,YAAa,SAAQ,WAAW;IAC3C;;;;;;;;;;;OAWG;IACH,MAAM,CACJ,IAA8B,EAC9B,OAAwB;QAExB,OAAO,sBAAsB,CAA6B,IAAI,CAAC,OAAO,CAAC,CACrE,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,mBAAmB,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAC7D,CAAC;IACJ,CAAC;CACF"}
|
|
@@ -1,51 +0,0 @@
|
|
|
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 VideoUpscale extends APIResource {
|
|
8
|
-
/**
|
|
9
|
-
* This endpoint will start a new task to upscale a video. Videos will be upscaled
|
|
10
|
-
* by a factor of 4X, capped at a maximum of 4096px along each side.
|
|
11
|
-
*
|
|
12
|
-
* @example
|
|
13
|
-
* ```ts
|
|
14
|
-
* const videoUpscale = await client.videoUpscale.create({
|
|
15
|
-
* model: 'upscale_v1',
|
|
16
|
-
* videoUri: 'https://example.com/video.mp4',
|
|
17
|
-
* });
|
|
18
|
-
* ```
|
|
19
|
-
*/
|
|
20
|
-
create(
|
|
21
|
-
body: VideoUpscaleCreateParams,
|
|
22
|
-
options?: RequestOptions,
|
|
23
|
-
): APIPromiseWithAwaitableTask<VideoUpscaleCreateResponse> {
|
|
24
|
-
return wrapAsWaitableResource<VideoUpscaleCreateResponse>(this._client)(
|
|
25
|
-
this._client.post('/v1/video_upscale', { body, ...options }),
|
|
26
|
-
);
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
export interface VideoUpscaleCreateResponse {
|
|
31
|
-
/**
|
|
32
|
-
* The ID of the task that was created. Use this to retrieve the task later.
|
|
33
|
-
*/
|
|
34
|
-
id: string;
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
export interface VideoUpscaleCreateParams {
|
|
38
|
-
model: 'upscale_v1';
|
|
39
|
-
|
|
40
|
-
/**
|
|
41
|
-
* A HTTPS URL.
|
|
42
|
-
*/
|
|
43
|
-
videoUri: string;
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
export declare namespace VideoUpscale {
|
|
47
|
-
export {
|
|
48
|
-
type VideoUpscaleCreateResponse as VideoUpscaleCreateResponse,
|
|
49
|
-
type VideoUpscaleCreateParams as VideoUpscaleCreateParams,
|
|
50
|
-
};
|
|
51
|
-
}
|