magic-hour 0.13.0 → 0.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/dist/environment.d.ts +1 -1
- package/dist/environment.js +1 -1
- package/dist/resources/v1/face-swap/request-types.d.ts +20 -6
- package/dist/resources/v1/face-swap/request-types.js +4 -4
- package/dist/resources/v1/image-to-video/request-types.d.ts +3 -0
- package/dist/types/index.d.ts +2 -0
- package/dist/types/v1-face-swap-create-body.d.ts +20 -6
- package/dist/types/v1-face-swap-create-body.js +4 -4
- package/dist/types/v1-image-projects-get-response.d.ts +1 -1
- package/dist/types/v1-image-to-video-create-body-style-quality-mode-enum.d.ts +5 -0
- package/dist/types/v1-image-to-video-create-body-style-quality-mode-enum.js +2 -0
- package/dist/types/v1-image-to-video-create-body-style.d.ts +10 -4
- package/dist/types/v1-image-to-video-create-body-style.js +6 -2
- package/dist/types/v1-image-to-video-create-body.d.ts +3 -0
- package/dist/types/v1-text-to-video-create-body-style-quality-mode-enum.d.ts +5 -0
- package/dist/types/v1-text-to-video-create-body-style-quality-mode-enum.js +2 -0
- package/dist/types/v1-text-to-video-create-body-style.d.ts +6 -0
- package/dist/types/v1-text-to-video-create-body-style.js +4 -0
- package/package.json +1 -1
package/dist/environment.d.ts
CHANGED
package/dist/environment.js
CHANGED
|
@@ -4,5 +4,5 @@ exports.Environment = void 0;
|
|
|
4
4
|
var Environment;
|
|
5
5
|
(function (Environment) {
|
|
6
6
|
Environment["Environment"] = "https://api.magichour.ai";
|
|
7
|
-
Environment["MockServer"] = "https://api.sideko.dev/v1/mock/magichour/magic-hour/0.
|
|
7
|
+
Environment["MockServer"] = "https://api.sideko.dev/v1/mock/magichour/magic-hour/0.15.0";
|
|
8
8
|
})(Environment || (exports.Environment = Environment = {}));
|
|
@@ -13,9 +13,16 @@ export type CreateRequest = {
|
|
|
13
13
|
*/
|
|
14
14
|
endSeconds: number;
|
|
15
15
|
/**
|
|
16
|
-
*
|
|
16
|
+
* Used to determine the dimensions of the output video.
|
|
17
|
+
*
|
|
18
|
+
* * If height is provided, width will also be required. The larger value between width and height will be used to determine the maximum output resolution while maintaining the original aspect ratio.
|
|
19
|
+
* * If both height and width are omitted, the video will be resized according to your subscription's maximum resolution, while preserving aspect ratio.
|
|
20
|
+
*
|
|
21
|
+
* Note: if the video's original resolution is less than the maximum, the video will not be resized.
|
|
22
|
+
*
|
|
23
|
+
* See our [pricing page](https://magichour.ai/pricing) for more details.
|
|
17
24
|
*/
|
|
18
|
-
height
|
|
25
|
+
height?: number | undefined;
|
|
19
26
|
/**
|
|
20
27
|
* The name of video
|
|
21
28
|
*/
|
|
@@ -25,9 +32,16 @@ export type CreateRequest = {
|
|
|
25
32
|
*/
|
|
26
33
|
startSeconds: number;
|
|
27
34
|
/**
|
|
28
|
-
*
|
|
35
|
+
* Used to determine the dimensions of the output video.
|
|
36
|
+
*
|
|
37
|
+
* * If width is provided, height will also be required. The larger value between width and height will be used to determine the maximum output resolution while maintaining the original aspect ratio.
|
|
38
|
+
* * If both height and width are omitted, the video will be resized according to your subscription's maximum resolution, while preserving aspect ratio.
|
|
39
|
+
*
|
|
40
|
+
* Note: if the video's original resolution is less than the maximum, the video will not be resized.
|
|
41
|
+
*
|
|
42
|
+
* See our [pricing page](https://magichour.ai/pricing) for more details.
|
|
29
43
|
*/
|
|
30
|
-
width
|
|
44
|
+
width?: number | undefined;
|
|
31
45
|
};
|
|
32
46
|
/**
|
|
33
47
|
* @internal
|
|
@@ -37,10 +51,10 @@ export type CreateRequest = {
|
|
|
37
51
|
export type External$CreateRequest = {
|
|
38
52
|
assets: External$V1FaceSwapCreateBodyAssets;
|
|
39
53
|
end_seconds: number;
|
|
40
|
-
height
|
|
54
|
+
height?: number | undefined;
|
|
41
55
|
name?: string | undefined;
|
|
42
56
|
start_seconds: number;
|
|
43
|
-
width
|
|
57
|
+
width?: number | undefined;
|
|
44
58
|
};
|
|
45
59
|
export declare const Schemas$CreateRequest: {
|
|
46
60
|
in: z.ZodType<CreateRequest, z.ZodTypeDef, unknown>;
|
|
@@ -44,10 +44,10 @@ const SchemaIn$CreateRequest = z
|
|
|
44
44
|
.object({
|
|
45
45
|
assets: v1_face_swap_create_body_assets_1.Schemas$V1FaceSwapCreateBodyAssets.in,
|
|
46
46
|
end_seconds: z.number(),
|
|
47
|
-
height: z.number().int(),
|
|
47
|
+
height: z.number().int().optional(),
|
|
48
48
|
name: z.string().optional(),
|
|
49
49
|
start_seconds: z.number(),
|
|
50
|
-
width: z.number().int(),
|
|
50
|
+
width: z.number().int().optional(),
|
|
51
51
|
})
|
|
52
52
|
.transform((obj) => {
|
|
53
53
|
return (0, core_1.zodTransform)(obj, {
|
|
@@ -67,10 +67,10 @@ const SchemaOut$CreateRequest = z
|
|
|
67
67
|
.object({
|
|
68
68
|
assets: v1_face_swap_create_body_assets_1.Schemas$V1FaceSwapCreateBodyAssets.out,
|
|
69
69
|
endSeconds: z.number(),
|
|
70
|
-
height: z.number().int(),
|
|
70
|
+
height: z.number().int().optional(),
|
|
71
71
|
name: z.string().optional(),
|
|
72
72
|
startSeconds: z.number(),
|
|
73
|
-
width: z.number().int(),
|
|
73
|
+
width: z.number().int().optional(),
|
|
74
74
|
})
|
|
75
75
|
.transform((obj) => {
|
|
76
76
|
return (0, core_1.zodTransform)(obj, {
|
|
@@ -21,6 +21,9 @@ export type CreateRequest = {
|
|
|
21
21
|
* The name of video
|
|
22
22
|
*/
|
|
23
23
|
name?: string | undefined;
|
|
24
|
+
/**
|
|
25
|
+
* Attributed used to dictate the style of the output
|
|
26
|
+
*/
|
|
24
27
|
style: V1ImageToVideoCreateBodyStyle;
|
|
25
28
|
/**
|
|
26
29
|
* The width of the input video. This value will help determine the final orientation of the output video. The output video resolution may not match the input.
|
package/dist/types/index.d.ts
CHANGED
|
@@ -147,6 +147,7 @@ export { V1ImageProjectsGetResponse404MessageEnum } from "./v1-image-projects-ge
|
|
|
147
147
|
export { V1ImageToVideoCreateBody } from "./v1-image-to-video-create-body";
|
|
148
148
|
export { V1ImageToVideoCreateBodyAssets } from "./v1-image-to-video-create-body-assets";
|
|
149
149
|
export { V1ImageToVideoCreateBodyStyle } from "./v1-image-to-video-create-body-style";
|
|
150
|
+
export { V1ImageToVideoCreateBodyStyleQualityModeEnum } from "./v1-image-to-video-create-body-style-quality-mode-enum";
|
|
150
151
|
export { V1ImageToVideoCreateResponse } from "./v1-image-to-video-create-response";
|
|
151
152
|
export { V1ImageToVideoCreateResponse400 } from "./v1-image-to-video-create-response400";
|
|
152
153
|
export { V1ImageToVideoCreateResponse401 } from "./v1-image-to-video-create-response401";
|
|
@@ -167,6 +168,7 @@ export { V1LipSyncCreateResponse422 } from "./v1-lip-sync-create-response422";
|
|
|
167
168
|
export { V1TextToVideoCreateBody } from "./v1-text-to-video-create-body";
|
|
168
169
|
export { V1TextToVideoCreateBodyOrientationEnum } from "./v1-text-to-video-create-body-orientation-enum";
|
|
169
170
|
export { V1TextToVideoCreateBodyStyle } from "./v1-text-to-video-create-body-style";
|
|
171
|
+
export { V1TextToVideoCreateBodyStyleQualityModeEnum } from "./v1-text-to-video-create-body-style-quality-mode-enum";
|
|
170
172
|
export { V1TextToVideoCreateResponse } from "./v1-text-to-video-create-response";
|
|
171
173
|
export { V1TextToVideoCreateResponse400 } from "./v1-text-to-video-create-response400";
|
|
172
174
|
export { V1TextToVideoCreateResponse401 } from "./v1-text-to-video-create-response401";
|
|
@@ -13,9 +13,16 @@ export type V1FaceSwapCreateBody = {
|
|
|
13
13
|
*/
|
|
14
14
|
endSeconds: number;
|
|
15
15
|
/**
|
|
16
|
-
*
|
|
16
|
+
* Used to determine the dimensions of the output video.
|
|
17
|
+
*
|
|
18
|
+
* * If height is provided, width will also be required. The larger value between width and height will be used to determine the maximum output resolution while maintaining the original aspect ratio.
|
|
19
|
+
* * If both height and width are omitted, the video will be resized according to your subscription's maximum resolution, while preserving aspect ratio.
|
|
20
|
+
*
|
|
21
|
+
* Note: if the video's original resolution is less than the maximum, the video will not be resized.
|
|
22
|
+
*
|
|
23
|
+
* See our [pricing page](https://magichour.ai/pricing) for more details.
|
|
17
24
|
*/
|
|
18
|
-
height
|
|
25
|
+
height?: number | undefined;
|
|
19
26
|
/**
|
|
20
27
|
* The name of video
|
|
21
28
|
*/
|
|
@@ -25,9 +32,16 @@ export type V1FaceSwapCreateBody = {
|
|
|
25
32
|
*/
|
|
26
33
|
startSeconds: number;
|
|
27
34
|
/**
|
|
28
|
-
*
|
|
35
|
+
* Used to determine the dimensions of the output video.
|
|
36
|
+
*
|
|
37
|
+
* * If width is provided, height will also be required. The larger value between width and height will be used to determine the maximum output resolution while maintaining the original aspect ratio.
|
|
38
|
+
* * If both height and width are omitted, the video will be resized according to your subscription's maximum resolution, while preserving aspect ratio.
|
|
39
|
+
*
|
|
40
|
+
* Note: if the video's original resolution is less than the maximum, the video will not be resized.
|
|
41
|
+
*
|
|
42
|
+
* See our [pricing page](https://magichour.ai/pricing) for more details.
|
|
29
43
|
*/
|
|
30
|
-
width
|
|
44
|
+
width?: number | undefined;
|
|
31
45
|
};
|
|
32
46
|
/**
|
|
33
47
|
* @internal
|
|
@@ -37,10 +51,10 @@ export type V1FaceSwapCreateBody = {
|
|
|
37
51
|
export type External$V1FaceSwapCreateBody = {
|
|
38
52
|
assets: External$V1FaceSwapCreateBodyAssets;
|
|
39
53
|
end_seconds: number;
|
|
40
|
-
height
|
|
54
|
+
height?: number | undefined;
|
|
41
55
|
name?: string | undefined;
|
|
42
56
|
start_seconds: number;
|
|
43
|
-
width
|
|
57
|
+
width?: number | undefined;
|
|
44
58
|
};
|
|
45
59
|
export declare const Schemas$V1FaceSwapCreateBody: {
|
|
46
60
|
in: z.ZodType<V1FaceSwapCreateBody, z.ZodTypeDef, unknown>;
|
|
@@ -44,10 +44,10 @@ const SchemaIn$V1FaceSwapCreateBody = z
|
|
|
44
44
|
.object({
|
|
45
45
|
assets: v1_face_swap_create_body_assets_1.Schemas$V1FaceSwapCreateBodyAssets.in,
|
|
46
46
|
end_seconds: z.number(),
|
|
47
|
-
height: z.number().int(),
|
|
47
|
+
height: z.number().int().optional(),
|
|
48
48
|
name: z.string().optional(),
|
|
49
49
|
start_seconds: z.number(),
|
|
50
|
-
width: z.number().int(),
|
|
50
|
+
width: z.number().int().optional(),
|
|
51
51
|
})
|
|
52
52
|
.transform((obj) => {
|
|
53
53
|
return (0, core_1.zodTransform)(obj, {
|
|
@@ -67,10 +67,10 @@ const SchemaOut$V1FaceSwapCreateBody = z
|
|
|
67
67
|
.object({
|
|
68
68
|
assets: v1_face_swap_create_body_assets_1.Schemas$V1FaceSwapCreateBodyAssets.out,
|
|
69
69
|
endSeconds: z.number(),
|
|
70
|
-
height: z.number().int(),
|
|
70
|
+
height: z.number().int().optional(),
|
|
71
71
|
name: z.string().optional(),
|
|
72
72
|
startSeconds: z.number(),
|
|
73
|
-
width: z.number().int(),
|
|
73
|
+
width: z.number().int().optional(),
|
|
74
74
|
})
|
|
75
75
|
.transform((obj) => {
|
|
76
76
|
return (0, core_1.zodTransform)(obj, {
|
|
@@ -36,7 +36,7 @@ export type V1ImageProjectsGetResponse = {
|
|
|
36
36
|
*/
|
|
37
37
|
totalFrameCost: number;
|
|
38
38
|
/**
|
|
39
|
-
* The type of the image project. Possible values are AI_HEADSHOT, AI_IMAGE, IMAGE_UPSCALER, FACE_SWAP, PHOTO_EDITOR, QR_CODE, BACKGROUND_REMOVER, CLOTHES_CHANGER, AI_MEME, FACE_EDITOR
|
|
39
|
+
* The type of the image project. Possible values are AI_HEADSHOT, AI_IMAGE, IMAGE_UPSCALER, FACE_SWAP, PHOTO_EDITOR, QR_CODE, BACKGROUND_REMOVER, CLOTHES_CHANGER, AI_MEME, FACE_EDITOR, PHOTO_COLORIZER
|
|
40
40
|
*/
|
|
41
41
|
type: string;
|
|
42
42
|
};
|
|
@@ -1,16 +1,21 @@
|
|
|
1
1
|
import * as z from "zod";
|
|
2
2
|
/**
|
|
3
|
-
*
|
|
3
|
+
* Attributed used to dictate the style of the output
|
|
4
4
|
*/
|
|
5
5
|
export type V1ImageToVideoCreateBodyStyle = {
|
|
6
6
|
/**
|
|
7
|
-
*
|
|
7
|
+
* Deprecated: Please use `quality_mode` instead. For backward compatibility, setting `high_quality: true` and `quality_mode: quick` will map to `quality_mode: studio`. Note: `quality_mode: studio` offers the same quality as `high_quality: true`.
|
|
8
8
|
*/
|
|
9
9
|
highQuality?: boolean | undefined;
|
|
10
10
|
/**
|
|
11
11
|
* The prompt used for the video.
|
|
12
12
|
*/
|
|
13
|
-
prompt
|
|
13
|
+
prompt?: string | undefined;
|
|
14
|
+
/**
|
|
15
|
+
* * `quick` - Fastest option for rapid results. Takes ~3 minutes per 5s of video.
|
|
16
|
+
* * `studio` - Polished visuals with longer runtime. Takes ~8.5 minutes per 5s of video.
|
|
17
|
+
*/
|
|
18
|
+
qualityMode?: ("quick" | "studio") | undefined;
|
|
14
19
|
};
|
|
15
20
|
/**
|
|
16
21
|
* @internal
|
|
@@ -19,7 +24,8 @@ export type V1ImageToVideoCreateBodyStyle = {
|
|
|
19
24
|
*/
|
|
20
25
|
export type External$V1ImageToVideoCreateBodyStyle = {
|
|
21
26
|
high_quality?: boolean | undefined;
|
|
22
|
-
prompt
|
|
27
|
+
prompt?: string | undefined;
|
|
28
|
+
quality_mode?: ("quick" | "studio") | undefined;
|
|
23
29
|
};
|
|
24
30
|
export declare const Schemas$V1ImageToVideoCreateBodyStyle: {
|
|
25
31
|
in: z.ZodType<V1ImageToVideoCreateBodyStyle, z.ZodTypeDef, unknown>;
|
|
@@ -42,12 +42,14 @@ const z = __importStar(require("zod"));
|
|
|
42
42
|
const SchemaIn$V1ImageToVideoCreateBodyStyle = z
|
|
43
43
|
.object({
|
|
44
44
|
high_quality: z.boolean().optional(),
|
|
45
|
-
prompt: z.string().
|
|
45
|
+
prompt: z.string().optional(),
|
|
46
|
+
quality_mode: z.enum(["quick", "studio"]).optional(),
|
|
46
47
|
})
|
|
47
48
|
.transform((obj) => {
|
|
48
49
|
return (0, core_1.zodTransform)(obj, {
|
|
49
50
|
high_quality: "highQuality",
|
|
50
51
|
prompt: "prompt",
|
|
52
|
+
quality_mode: "qualityMode",
|
|
51
53
|
});
|
|
52
54
|
});
|
|
53
55
|
/**
|
|
@@ -57,12 +59,14 @@ const SchemaIn$V1ImageToVideoCreateBodyStyle = z
|
|
|
57
59
|
const SchemaOut$V1ImageToVideoCreateBodyStyle = z
|
|
58
60
|
.object({
|
|
59
61
|
highQuality: z.boolean().optional(),
|
|
60
|
-
prompt: z.string().
|
|
62
|
+
prompt: z.string().optional(),
|
|
63
|
+
qualityMode: z.enum(["quick", "studio"]).optional(),
|
|
61
64
|
})
|
|
62
65
|
.transform((obj) => {
|
|
63
66
|
return (0, core_1.zodTransform)(obj, {
|
|
64
67
|
highQuality: "high_quality",
|
|
65
68
|
prompt: "prompt",
|
|
69
|
+
qualityMode: "quality_mode",
|
|
66
70
|
});
|
|
67
71
|
});
|
|
68
72
|
exports.Schemas$V1ImageToVideoCreateBodyStyle = {
|
|
@@ -21,6 +21,9 @@ export type V1ImageToVideoCreateBody = {
|
|
|
21
21
|
* The name of video
|
|
22
22
|
*/
|
|
23
23
|
name?: string | undefined;
|
|
24
|
+
/**
|
|
25
|
+
* Attributed used to dictate the style of the output
|
|
26
|
+
*/
|
|
24
27
|
style: V1ImageToVideoCreateBodyStyle;
|
|
25
28
|
/**
|
|
26
29
|
* The width of the input video. This value will help determine the final orientation of the output video. The output video resolution may not match the input.
|
|
@@ -7,6 +7,11 @@ export type V1TextToVideoCreateBodyStyle = {
|
|
|
7
7
|
* The prompt used for the video.
|
|
8
8
|
*/
|
|
9
9
|
prompt: string;
|
|
10
|
+
/**
|
|
11
|
+
* * `quick` - Fastest option for rapid results. Takes ~3 minutes per 5s of video.
|
|
12
|
+
* * `studio` - Polished visuals with longer runtime. Takes ~8.5 minutes per 5s of video.
|
|
13
|
+
*/
|
|
14
|
+
qualityMode?: ("quick" | "studio") | undefined;
|
|
10
15
|
};
|
|
11
16
|
/**
|
|
12
17
|
* @internal
|
|
@@ -15,6 +20,7 @@ export type V1TextToVideoCreateBodyStyle = {
|
|
|
15
20
|
*/
|
|
16
21
|
export type External$V1TextToVideoCreateBodyStyle = {
|
|
17
22
|
prompt: string;
|
|
23
|
+
quality_mode?: ("quick" | "studio") | undefined;
|
|
18
24
|
};
|
|
19
25
|
export declare const Schemas$V1TextToVideoCreateBodyStyle: {
|
|
20
26
|
in: z.ZodType<V1TextToVideoCreateBodyStyle, z.ZodTypeDef, unknown>;
|
|
@@ -42,10 +42,12 @@ const z = __importStar(require("zod"));
|
|
|
42
42
|
const SchemaIn$V1TextToVideoCreateBodyStyle = z
|
|
43
43
|
.object({
|
|
44
44
|
prompt: z.string(),
|
|
45
|
+
quality_mode: z.enum(["quick", "studio"]).optional(),
|
|
45
46
|
})
|
|
46
47
|
.transform((obj) => {
|
|
47
48
|
return (0, core_1.zodTransform)(obj, {
|
|
48
49
|
prompt: "prompt",
|
|
50
|
+
quality_mode: "qualityMode",
|
|
49
51
|
});
|
|
50
52
|
});
|
|
51
53
|
/**
|
|
@@ -55,10 +57,12 @@ const SchemaIn$V1TextToVideoCreateBodyStyle = z
|
|
|
55
57
|
const SchemaOut$V1TextToVideoCreateBodyStyle = z
|
|
56
58
|
.object({
|
|
57
59
|
prompt: z.string(),
|
|
60
|
+
qualityMode: z.enum(["quick", "studio"]).optional(),
|
|
58
61
|
})
|
|
59
62
|
.transform((obj) => {
|
|
60
63
|
return (0, core_1.zodTransform)(obj, {
|
|
61
64
|
prompt: "prompt",
|
|
65
|
+
qualityMode: "quality_mode",
|
|
62
66
|
});
|
|
63
67
|
});
|
|
64
68
|
exports.Schemas$V1TextToVideoCreateBodyStyle = {
|