magic-hour 0.25.0 → 0.26.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/ai-gif-generator/resource-client.d.ts +1 -1
- package/dist/resources/v1/ai-gif-generator/resource-client.js +1 -1
- package/dist/resources/v1/image-to-video/request-types.d.ts +10 -0
- package/dist/resources/v1/image-to-video/request-types.js +4 -0
- package/dist/resources/v1/text-to-video/request-types.d.ts +10 -0
- package/dist/resources/v1/text-to-video/request-types.js +4 -0
- package/dist/types/index.d.ts +2 -0
- package/dist/types/v1-image-to-video-create-body-resolution-enum.d.ts +9 -0
- package/dist/types/v1-image-to-video-create-body-resolution-enum.js +2 -0
- package/dist/types/v1-image-to-video-create-body-style-quality-mode-enum.d.ts +5 -2
- package/dist/types/v1-image-to-video-create-body-style.d.ts +10 -3
- package/dist/types/v1-image-to-video-create-body.d.ts +10 -0
- package/dist/types/v1-image-to-video-create-body.js +4 -0
- package/dist/types/v1-text-to-video-create-body-resolution-enum.d.ts +9 -0
- package/dist/types/v1-text-to-video-create-body-resolution-enum.js +2 -0
- package/dist/types/v1-text-to-video-create-body-style-quality-mode-enum.d.ts +5 -2
- package/dist/types/v1-text-to-video-create-body-style.d.ts +5 -2
- package/dist/types/v1-text-to-video-create-body.d.ts +10 -0
- package/dist/types/v1-text-to-video-create-body.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.27.0";
|
|
8
8
|
})(Environment || (exports.Environment = Environment = {}));
|
|
@@ -23,6 +23,15 @@ export type CreateRequest = {
|
|
|
23
23
|
* The name of video
|
|
24
24
|
*/
|
|
25
25
|
name?: string | undefined;
|
|
26
|
+
/**
|
|
27
|
+
* Controls the output video resolution. Defaults to `720p` if not specified.
|
|
28
|
+
*
|
|
29
|
+
* **Options:**
|
|
30
|
+
* - `480p` - Supports only 5 or 10 second videos. Output: 24fps. Cost: 120 credits per 5 seconds.
|
|
31
|
+
* - `720p` - Supports videos between 5-60 seconds. Output: 30fps. Cost: 300 credits per 5 seconds.
|
|
32
|
+
* - `1080p` - Supports videos between 5-60 seconds. Output: 30fps. Cost: 600 credits per 5 seconds. **Requires** `pro` or `business` tier.
|
|
33
|
+
*/
|
|
34
|
+
resolution?: ("1080p" | "480p" | "720p") | undefined;
|
|
26
35
|
/**
|
|
27
36
|
* Attributed used to dictate the style of the output
|
|
28
37
|
*/
|
|
@@ -44,6 +53,7 @@ export type External$CreateRequest = {
|
|
|
44
53
|
end_seconds: number;
|
|
45
54
|
height?: number | undefined;
|
|
46
55
|
name?: string | undefined;
|
|
56
|
+
resolution?: ("1080p" | "480p" | "720p") | undefined;
|
|
47
57
|
style: External$V1ImageToVideoCreateBodyStyle;
|
|
48
58
|
width?: number | undefined;
|
|
49
59
|
};
|
|
@@ -47,6 +47,7 @@ const SchemaIn$CreateRequest = z
|
|
|
47
47
|
end_seconds: z.number(),
|
|
48
48
|
height: z.number().int().optional(),
|
|
49
49
|
name: z.string().optional(),
|
|
50
|
+
resolution: z.enum(["1080p", "480p", "720p"]).optional(),
|
|
50
51
|
style: v1_image_to_video_create_body_style_1.Schemas$V1ImageToVideoCreateBodyStyle.in,
|
|
51
52
|
width: z.number().int().optional(),
|
|
52
53
|
})
|
|
@@ -56,6 +57,7 @@ const SchemaIn$CreateRequest = z
|
|
|
56
57
|
end_seconds: "endSeconds",
|
|
57
58
|
height: "height",
|
|
58
59
|
name: "name",
|
|
60
|
+
resolution: "resolution",
|
|
59
61
|
style: "style",
|
|
60
62
|
width: "width",
|
|
61
63
|
});
|
|
@@ -70,6 +72,7 @@ const SchemaOut$CreateRequest = z
|
|
|
70
72
|
endSeconds: z.number(),
|
|
71
73
|
height: z.number().int().optional(),
|
|
72
74
|
name: z.string().optional(),
|
|
75
|
+
resolution: z.enum(["1080p", "480p", "720p"]).optional(),
|
|
73
76
|
style: v1_image_to_video_create_body_style_1.Schemas$V1ImageToVideoCreateBodyStyle.out,
|
|
74
77
|
width: z.number().int().optional(),
|
|
75
78
|
})
|
|
@@ -79,6 +82,7 @@ const SchemaOut$CreateRequest = z
|
|
|
79
82
|
endSeconds: "end_seconds",
|
|
80
83
|
height: "height",
|
|
81
84
|
name: "name",
|
|
85
|
+
resolution: "resolution",
|
|
82
86
|
style: "style",
|
|
83
87
|
width: "width",
|
|
84
88
|
});
|
|
@@ -16,6 +16,15 @@ export type CreateRequest = {
|
|
|
16
16
|
* Determines the orientation of the output video
|
|
17
17
|
*/
|
|
18
18
|
orientation: "landscape" | "portrait" | "square";
|
|
19
|
+
/**
|
|
20
|
+
* Controls the output video resolution. Defaults to `720p` if not specified.
|
|
21
|
+
*
|
|
22
|
+
* **Options:**
|
|
23
|
+
* - `480p` - Supports only 5 or 10 second videos. Output: 24fps. Cost: 120 credits per 5 seconds.
|
|
24
|
+
* - `720p` - Supports videos between 5-60 seconds. Output: 30fps. Cost: 300 credits per 5 seconds.
|
|
25
|
+
* - `1080p` - Supports videos between 5-60 seconds. Output: 30fps. Cost: 600 credits per 5 seconds. **Requires** `pro` or `business` tier.
|
|
26
|
+
*/
|
|
27
|
+
resolution?: ("1080p" | "480p" | "720p") | undefined;
|
|
19
28
|
style: V1TextToVideoCreateBodyStyle;
|
|
20
29
|
};
|
|
21
30
|
/**
|
|
@@ -27,6 +36,7 @@ export type External$CreateRequest = {
|
|
|
27
36
|
end_seconds: number;
|
|
28
37
|
name?: string | undefined;
|
|
29
38
|
orientation: "landscape" | "portrait" | "square";
|
|
39
|
+
resolution?: ("1080p" | "480p" | "720p") | undefined;
|
|
30
40
|
style: External$V1TextToVideoCreateBodyStyle;
|
|
31
41
|
};
|
|
32
42
|
export declare const Schemas$CreateRequest: {
|
|
@@ -45,6 +45,7 @@ const SchemaIn$CreateRequest = z
|
|
|
45
45
|
end_seconds: z.number(),
|
|
46
46
|
name: z.string().optional(),
|
|
47
47
|
orientation: z.enum(["landscape", "portrait", "square"]),
|
|
48
|
+
resolution: z.enum(["1080p", "480p", "720p"]).optional(),
|
|
48
49
|
style: v1_text_to_video_create_body_style_1.Schemas$V1TextToVideoCreateBodyStyle.in,
|
|
49
50
|
})
|
|
50
51
|
.transform((obj) => {
|
|
@@ -52,6 +53,7 @@ const SchemaIn$CreateRequest = z
|
|
|
52
53
|
end_seconds: "endSeconds",
|
|
53
54
|
name: "name",
|
|
54
55
|
orientation: "orientation",
|
|
56
|
+
resolution: "resolution",
|
|
55
57
|
style: "style",
|
|
56
58
|
});
|
|
57
59
|
});
|
|
@@ -64,6 +66,7 @@ const SchemaOut$CreateRequest = z
|
|
|
64
66
|
endSeconds: z.number(),
|
|
65
67
|
name: z.string().optional(),
|
|
66
68
|
orientation: z.enum(["landscape", "portrait", "square"]),
|
|
69
|
+
resolution: z.enum(["1080p", "480p", "720p"]).optional(),
|
|
67
70
|
style: v1_text_to_video_create_body_style_1.Schemas$V1TextToVideoCreateBodyStyle.out,
|
|
68
71
|
})
|
|
69
72
|
.transform((obj) => {
|
|
@@ -71,6 +74,7 @@ const SchemaOut$CreateRequest = z
|
|
|
71
74
|
endSeconds: "end_seconds",
|
|
72
75
|
name: "name",
|
|
73
76
|
orientation: "orientation",
|
|
77
|
+
resolution: "resolution",
|
|
74
78
|
style: "style",
|
|
75
79
|
});
|
|
76
80
|
});
|
package/dist/types/index.d.ts
CHANGED
|
@@ -178,6 +178,7 @@ export { V1ImageProjectsGetResponse404 } from "./v1-image-projects-get-response4
|
|
|
178
178
|
export { V1ImageProjectsGetResponse404MessageEnum } from "./v1-image-projects-get-response404-message-enum";
|
|
179
179
|
export { V1ImageToVideoCreateBody } from "./v1-image-to-video-create-body";
|
|
180
180
|
export { V1ImageToVideoCreateBodyAssets } from "./v1-image-to-video-create-body-assets";
|
|
181
|
+
export { V1ImageToVideoCreateBodyResolutionEnum } from "./v1-image-to-video-create-body-resolution-enum";
|
|
181
182
|
export { V1ImageToVideoCreateBodyStyle } from "./v1-image-to-video-create-body-style";
|
|
182
183
|
export { V1ImageToVideoCreateBodyStyleQualityModeEnum } from "./v1-image-to-video-create-body-style-quality-mode-enum";
|
|
183
184
|
export { V1ImageToVideoCreateResponse } from "./v1-image-to-video-create-response";
|
|
@@ -208,6 +209,7 @@ export { V1PhotoColorizerCreateResponse404MessageEnum } from "./v1-photo-coloriz
|
|
|
208
209
|
export { V1PhotoColorizerCreateResponse422 } from "./v1-photo-colorizer-create-response422";
|
|
209
210
|
export { V1TextToVideoCreateBody } from "./v1-text-to-video-create-body";
|
|
210
211
|
export { V1TextToVideoCreateBodyOrientationEnum } from "./v1-text-to-video-create-body-orientation-enum";
|
|
212
|
+
export { V1TextToVideoCreateBodyResolutionEnum } from "./v1-text-to-video-create-body-resolution-enum";
|
|
211
213
|
export { V1TextToVideoCreateBodyStyle } from "./v1-text-to-video-create-body-style";
|
|
212
214
|
export { V1TextToVideoCreateBodyStyleQualityModeEnum } from "./v1-text-to-video-create-body-style-quality-mode-enum";
|
|
213
215
|
export { V1TextToVideoCreateResponse } from "./v1-text-to-video-create-response";
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Controls the output video resolution. Defaults to `720p` if not specified.
|
|
3
|
+
*
|
|
4
|
+
* **Options:**
|
|
5
|
+
* - `480p` - Supports only 5 or 10 second videos. Output: 24fps. Cost: 120 credits per 5 seconds.
|
|
6
|
+
* - `720p` - Supports videos between 5-60 seconds. Output: 30fps. Cost: 300 credits per 5 seconds.
|
|
7
|
+
* - `1080p` - Supports videos between 5-60 seconds. Output: 30fps. Cost: 600 credits per 5 seconds. **Requires** `pro` or `business` tier.
|
|
8
|
+
*/
|
|
9
|
+
export type V1ImageToVideoCreateBodyResolutionEnum = "1080p" | "480p" | "720p";
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
3
|
-
* *
|
|
2
|
+
* DEPRECATED: Please use `resolution` field instead. For backward compatibility:
|
|
3
|
+
* * `quick` maps to 720p resolution
|
|
4
|
+
* * `studio` maps to 1080p resolution
|
|
5
|
+
*
|
|
6
|
+
* This field will be removed in a future version. Use the `resolution` field to directly to specify the resolution.
|
|
4
7
|
*/
|
|
5
8
|
export type V1ImageToVideoCreateBodyStyleQualityModeEnum = "quick" | "studio";
|
|
@@ -4,7 +4,11 @@ import * as z from "zod";
|
|
|
4
4
|
*/
|
|
5
5
|
export type V1ImageToVideoCreateBodyStyle = {
|
|
6
6
|
/**
|
|
7
|
-
* Deprecated: Please use `
|
|
7
|
+
* Deprecated: Please use `resolution` instead. For backward compatibility,
|
|
8
|
+
* * `false` maps to 720p resolution
|
|
9
|
+
* * `true` maps to 1080p resolution
|
|
10
|
+
*
|
|
11
|
+
* This field will be removed in a future version. Use the `resolution` field to directly specify the resolution.
|
|
8
12
|
*/
|
|
9
13
|
highQuality?: boolean | undefined;
|
|
10
14
|
/**
|
|
@@ -12,8 +16,11 @@ export type V1ImageToVideoCreateBodyStyle = {
|
|
|
12
16
|
*/
|
|
13
17
|
prompt?: string | undefined;
|
|
14
18
|
/**
|
|
15
|
-
*
|
|
16
|
-
* *
|
|
19
|
+
* DEPRECATED: Please use `resolution` field instead. For backward compatibility:
|
|
20
|
+
* * `quick` maps to 720p resolution
|
|
21
|
+
* * `studio` maps to 1080p resolution
|
|
22
|
+
*
|
|
23
|
+
* This field will be removed in a future version. Use the `resolution` field to directly to specify the resolution.
|
|
17
24
|
*/
|
|
18
25
|
qualityMode?: ("quick" | "studio") | undefined;
|
|
19
26
|
};
|
|
@@ -23,6 +23,15 @@ export type V1ImageToVideoCreateBody = {
|
|
|
23
23
|
* The name of video
|
|
24
24
|
*/
|
|
25
25
|
name?: string | undefined;
|
|
26
|
+
/**
|
|
27
|
+
* Controls the output video resolution. Defaults to `720p` if not specified.
|
|
28
|
+
*
|
|
29
|
+
* **Options:**
|
|
30
|
+
* - `480p` - Supports only 5 or 10 second videos. Output: 24fps. Cost: 120 credits per 5 seconds.
|
|
31
|
+
* - `720p` - Supports videos between 5-60 seconds. Output: 30fps. Cost: 300 credits per 5 seconds.
|
|
32
|
+
* - `1080p` - Supports videos between 5-60 seconds. Output: 30fps. Cost: 600 credits per 5 seconds. **Requires** `pro` or `business` tier.
|
|
33
|
+
*/
|
|
34
|
+
resolution?: ("1080p" | "480p" | "720p") | undefined;
|
|
26
35
|
/**
|
|
27
36
|
* Attributed used to dictate the style of the output
|
|
28
37
|
*/
|
|
@@ -44,6 +53,7 @@ export type External$V1ImageToVideoCreateBody = {
|
|
|
44
53
|
end_seconds: number;
|
|
45
54
|
height?: number | undefined;
|
|
46
55
|
name?: string | undefined;
|
|
56
|
+
resolution?: ("1080p" | "480p" | "720p") | undefined;
|
|
47
57
|
style: External$V1ImageToVideoCreateBodyStyle;
|
|
48
58
|
width?: number | undefined;
|
|
49
59
|
};
|
|
@@ -47,6 +47,7 @@ const SchemaIn$V1ImageToVideoCreateBody = z
|
|
|
47
47
|
end_seconds: z.number(),
|
|
48
48
|
height: z.number().int().optional(),
|
|
49
49
|
name: z.string().optional(),
|
|
50
|
+
resolution: z.enum(["1080p", "480p", "720p"]).optional(),
|
|
50
51
|
style: v1_image_to_video_create_body_style_1.Schemas$V1ImageToVideoCreateBodyStyle.in,
|
|
51
52
|
width: z.number().int().optional(),
|
|
52
53
|
})
|
|
@@ -56,6 +57,7 @@ const SchemaIn$V1ImageToVideoCreateBody = z
|
|
|
56
57
|
end_seconds: "endSeconds",
|
|
57
58
|
height: "height",
|
|
58
59
|
name: "name",
|
|
60
|
+
resolution: "resolution",
|
|
59
61
|
style: "style",
|
|
60
62
|
width: "width",
|
|
61
63
|
});
|
|
@@ -70,6 +72,7 @@ const SchemaOut$V1ImageToVideoCreateBody = z
|
|
|
70
72
|
endSeconds: z.number(),
|
|
71
73
|
height: z.number().int().optional(),
|
|
72
74
|
name: z.string().optional(),
|
|
75
|
+
resolution: z.enum(["1080p", "480p", "720p"]).optional(),
|
|
73
76
|
style: v1_image_to_video_create_body_style_1.Schemas$V1ImageToVideoCreateBodyStyle.out,
|
|
74
77
|
width: z.number().int().optional(),
|
|
75
78
|
})
|
|
@@ -79,6 +82,7 @@ const SchemaOut$V1ImageToVideoCreateBody = z
|
|
|
79
82
|
endSeconds: "end_seconds",
|
|
80
83
|
height: "height",
|
|
81
84
|
name: "name",
|
|
85
|
+
resolution: "resolution",
|
|
82
86
|
style: "style",
|
|
83
87
|
width: "width",
|
|
84
88
|
});
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Controls the output video resolution. Defaults to `720p` if not specified.
|
|
3
|
+
*
|
|
4
|
+
* **Options:**
|
|
5
|
+
* - `480p` - Supports only 5 or 10 second videos. Output: 24fps. Cost: 120 credits per 5 seconds.
|
|
6
|
+
* - `720p` - Supports videos between 5-60 seconds. Output: 30fps. Cost: 300 credits per 5 seconds.
|
|
7
|
+
* - `1080p` - Supports videos between 5-60 seconds. Output: 30fps. Cost: 600 credits per 5 seconds. **Requires** `pro` or `business` tier.
|
|
8
|
+
*/
|
|
9
|
+
export type V1TextToVideoCreateBodyResolutionEnum = "1080p" | "480p" | "720p";
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
3
|
-
* *
|
|
2
|
+
* DEPRECATED: Please use `resolution` field instead. For backward compatibility:
|
|
3
|
+
* * `quick` maps to 720p resolution
|
|
4
|
+
* * `studio` maps to 1080p resolution
|
|
5
|
+
*
|
|
6
|
+
* This field will be removed in a future version. Use the `resolution` field to directly to specify the resolution.
|
|
4
7
|
*/
|
|
5
8
|
export type V1TextToVideoCreateBodyStyleQualityModeEnum = "quick" | "studio";
|
|
@@ -8,8 +8,11 @@ export type V1TextToVideoCreateBodyStyle = {
|
|
|
8
8
|
*/
|
|
9
9
|
prompt: string;
|
|
10
10
|
/**
|
|
11
|
-
*
|
|
12
|
-
* *
|
|
11
|
+
* DEPRECATED: Please use `resolution` field instead. For backward compatibility:
|
|
12
|
+
* * `quick` maps to 720p resolution
|
|
13
|
+
* * `studio` maps to 1080p resolution
|
|
14
|
+
*
|
|
15
|
+
* This field will be removed in a future version. Use the `resolution` field to directly to specify the resolution.
|
|
13
16
|
*/
|
|
14
17
|
qualityMode?: ("quick" | "studio") | undefined;
|
|
15
18
|
};
|
|
@@ -16,6 +16,15 @@ export type V1TextToVideoCreateBody = {
|
|
|
16
16
|
* Determines the orientation of the output video
|
|
17
17
|
*/
|
|
18
18
|
orientation: "landscape" | "portrait" | "square";
|
|
19
|
+
/**
|
|
20
|
+
* Controls the output video resolution. Defaults to `720p` if not specified.
|
|
21
|
+
*
|
|
22
|
+
* **Options:**
|
|
23
|
+
* - `480p` - Supports only 5 or 10 second videos. Output: 24fps. Cost: 120 credits per 5 seconds.
|
|
24
|
+
* - `720p` - Supports videos between 5-60 seconds. Output: 30fps. Cost: 300 credits per 5 seconds.
|
|
25
|
+
* - `1080p` - Supports videos between 5-60 seconds. Output: 30fps. Cost: 600 credits per 5 seconds. **Requires** `pro` or `business` tier.
|
|
26
|
+
*/
|
|
27
|
+
resolution?: ("1080p" | "480p" | "720p") | undefined;
|
|
19
28
|
style: V1TextToVideoCreateBodyStyle;
|
|
20
29
|
};
|
|
21
30
|
/**
|
|
@@ -27,6 +36,7 @@ export type External$V1TextToVideoCreateBody = {
|
|
|
27
36
|
end_seconds: number;
|
|
28
37
|
name?: string | undefined;
|
|
29
38
|
orientation: "landscape" | "portrait" | "square";
|
|
39
|
+
resolution?: ("1080p" | "480p" | "720p") | undefined;
|
|
30
40
|
style: External$V1TextToVideoCreateBodyStyle;
|
|
31
41
|
};
|
|
32
42
|
export declare const Schemas$V1TextToVideoCreateBody: {
|
|
@@ -45,6 +45,7 @@ const SchemaIn$V1TextToVideoCreateBody = z
|
|
|
45
45
|
end_seconds: z.number(),
|
|
46
46
|
name: z.string().optional(),
|
|
47
47
|
orientation: z.enum(["landscape", "portrait", "square"]),
|
|
48
|
+
resolution: z.enum(["1080p", "480p", "720p"]).optional(),
|
|
48
49
|
style: v1_text_to_video_create_body_style_1.Schemas$V1TextToVideoCreateBodyStyle.in,
|
|
49
50
|
})
|
|
50
51
|
.transform((obj) => {
|
|
@@ -52,6 +53,7 @@ const SchemaIn$V1TextToVideoCreateBody = z
|
|
|
52
53
|
end_seconds: "endSeconds",
|
|
53
54
|
name: "name",
|
|
54
55
|
orientation: "orientation",
|
|
56
|
+
resolution: "resolution",
|
|
55
57
|
style: "style",
|
|
56
58
|
});
|
|
57
59
|
});
|
|
@@ -64,6 +66,7 @@ const SchemaOut$V1TextToVideoCreateBody = z
|
|
|
64
66
|
endSeconds: z.number(),
|
|
65
67
|
name: z.string().optional(),
|
|
66
68
|
orientation: z.enum(["landscape", "portrait", "square"]),
|
|
69
|
+
resolution: z.enum(["1080p", "480p", "720p"]).optional(),
|
|
67
70
|
style: v1_text_to_video_create_body_style_1.Schemas$V1TextToVideoCreateBodyStyle.out,
|
|
68
71
|
})
|
|
69
72
|
.transform((obj) => {
|
|
@@ -71,6 +74,7 @@ const SchemaOut$V1TextToVideoCreateBody = z
|
|
|
71
74
|
endSeconds: "end_seconds",
|
|
72
75
|
name: "name",
|
|
73
76
|
orientation: "orientation",
|
|
77
|
+
resolution: "resolution",
|
|
74
78
|
style: "style",
|
|
75
79
|
});
|
|
76
80
|
});
|