magic-hour 0.54.1 → 0.56.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-image-editor/request-types.d.ts +12 -0
- package/dist/resources/v1/ai-image-editor/request-types.js +4 -0
- package/dist/resources/v1/ai-image-generator/request-types.d.ts +2 -2
- package/dist/resources/v1/face-swap-photo/resource-client.d.ts +1 -1
- package/dist/resources/v1/face-swap-photo/resource-client.js +1 -1
- package/dist/types/index.d.ts +1 -0
- package/dist/types/v1-ai-image-editor-create-body-resolution-enum.d.ts +11 -0
- package/dist/types/v1-ai-image-editor-create-body-resolution-enum.js +2 -0
- package/dist/types/v1-ai-image-editor-create-body.d.ts +12 -0
- package/dist/types/v1-ai-image-editor-create-body.js +4 -0
- package/dist/types/v1-ai-image-generator-create-body-model-enum.d.ts +2 -2
- package/dist/types/v1-ai-image-generator-create-body.d.ts +2 -2
- package/dist/types/v1-image-to-video-create-body-assets.d.ts +15 -0
- package/dist/types/v1-image-to-video-create-body-assets.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.57.0";
|
|
8
8
|
})(Environment || (exports.Environment = Environment = {}));
|
|
@@ -53,6 +53,17 @@ export type CreateRequest = {
|
|
|
53
53
|
* Give your image a custom name for easy identification.
|
|
54
54
|
*/
|
|
55
55
|
name?: string | undefined;
|
|
56
|
+
/**
|
|
57
|
+
* Maximum resolution for the generated image.
|
|
58
|
+
*
|
|
59
|
+
* **Options:**
|
|
60
|
+
* - `auto` - Automatic resolution (all tiers, default)
|
|
61
|
+
* - `2k` - Up to 2048px (requires Pro or Business tier)
|
|
62
|
+
* - `4k` - Up to 4096px (requires Business tier)
|
|
63
|
+
*
|
|
64
|
+
* Note: Resolution availability depends on your subscription tier. Defaults to `auto` if not specified.
|
|
65
|
+
*/
|
|
66
|
+
resolution?: ("2k" | "4k" | "auto") | undefined;
|
|
56
67
|
style: V1AiImageEditorCreateBodyStyle;
|
|
57
68
|
};
|
|
58
69
|
/**
|
|
@@ -66,6 +77,7 @@ export type External$CreateRequest = {
|
|
|
66
77
|
image_count?: number | undefined;
|
|
67
78
|
model?: ("default" | "nano-banana" | "nano-banana-2" | "nano-banana-pro" | "qwen-edit" | "seedream-v4" | "seedream-v4.5") | undefined;
|
|
68
79
|
name?: string | undefined;
|
|
80
|
+
resolution?: ("2k" | "4k" | "auto") | undefined;
|
|
69
81
|
style: External$V1AiImageEditorCreateBodyStyle;
|
|
70
82
|
};
|
|
71
83
|
export declare const Schemas$CreateRequest: {
|
|
@@ -60,6 +60,7 @@ const SchemaIn$CreateRequest = z
|
|
|
60
60
|
])
|
|
61
61
|
.optional(),
|
|
62
62
|
name: z.string().optional(),
|
|
63
|
+
resolution: z.enum(["2k", "4k", "auto"]).optional(),
|
|
63
64
|
style: v1_ai_image_editor_create_body_style_1.Schemas$V1AiImageEditorCreateBodyStyle.in,
|
|
64
65
|
})
|
|
65
66
|
.transform((obj) => {
|
|
@@ -69,6 +70,7 @@ const SchemaIn$CreateRequest = z
|
|
|
69
70
|
image_count: "imageCount",
|
|
70
71
|
model: "model",
|
|
71
72
|
name: "name",
|
|
73
|
+
resolution: "resolution",
|
|
72
74
|
style: "style",
|
|
73
75
|
});
|
|
74
76
|
});
|
|
@@ -95,6 +97,7 @@ const SchemaOut$CreateRequest = z
|
|
|
95
97
|
])
|
|
96
98
|
.optional(),
|
|
97
99
|
name: z.string().optional(),
|
|
100
|
+
resolution: z.enum(["2k", "4k", "auto"]).optional(),
|
|
98
101
|
style: v1_ai_image_editor_create_body_style_1.Schemas$V1AiImageEditorCreateBodyStyle.out,
|
|
99
102
|
})
|
|
100
103
|
.transform((obj) => {
|
|
@@ -104,6 +107,7 @@ const SchemaOut$CreateRequest = z
|
|
|
104
107
|
imageCount: "image_count",
|
|
105
108
|
model: "model",
|
|
106
109
|
name: "name",
|
|
110
|
+
resolution: "resolution",
|
|
107
111
|
style: "style",
|
|
108
112
|
});
|
|
109
113
|
});
|
|
@@ -34,11 +34,11 @@ export type CreateRequest = {
|
|
|
34
34
|
* - Available for tiers: free, creator, pro, business
|
|
35
35
|
* - Image count allowed: 1, 2, 3, 4
|
|
36
36
|
* - `nano-banana-2` - 100 credits/image
|
|
37
|
-
* - Supported resolutions: auto
|
|
37
|
+
* - Supported resolutions: auto, 2k, 4k
|
|
38
38
|
* - Available for tiers: free, creator, pro, business
|
|
39
39
|
* - Image count allowed: 1, 2, 3, 4
|
|
40
40
|
* - `nano-banana-pro` - 150 credits/image
|
|
41
|
-
* - Supported resolutions: auto
|
|
41
|
+
* - Supported resolutions: auto, 2k, 4k
|
|
42
42
|
* - Available for tiers: creator, pro, business
|
|
43
43
|
* - Image count allowed: 1, 4, 9, 16
|
|
44
44
|
*
|
|
@@ -78,7 +78,7 @@ export declare class FaceSwapPhotoClient extends CoreResourceClient {
|
|
|
78
78
|
/**
|
|
79
79
|
* Face Swap Photo
|
|
80
80
|
*
|
|
81
|
-
* Create a face swap photo. Each photo costs
|
|
81
|
+
* Create a face swap photo. Each photo costs 10 credits. The height/width of the output image depends on your subscription. Please refer to our [pricing](https://magichour.ai/pricing) page for more details
|
|
82
82
|
*
|
|
83
83
|
* POST /v1/face-swap-photo
|
|
84
84
|
*/
|
|
@@ -128,7 +128,7 @@ class FaceSwapPhotoClient extends make_api_request_js_1.CoreResourceClient {
|
|
|
128
128
|
/**
|
|
129
129
|
* Face Swap Photo
|
|
130
130
|
*
|
|
131
|
-
* Create a face swap photo. Each photo costs
|
|
131
|
+
* Create a face swap photo. Each photo costs 10 credits. The height/width of the output image depends on your subscription. Please refer to our [pricing](https://magichour.ai/pricing) page for more details
|
|
132
132
|
*
|
|
133
133
|
* POST /v1/face-swap-photo
|
|
134
134
|
*/
|
package/dist/types/index.d.ts
CHANGED
|
@@ -18,6 +18,7 @@ export { V1AiImageEditorCreateBody } from "./v1-ai-image-editor-create-body";
|
|
|
18
18
|
export { V1AiImageEditorCreateBodyAspectRatioEnum } from "./v1-ai-image-editor-create-body-aspect-ratio-enum";
|
|
19
19
|
export { V1AiImageEditorCreateBodyAssets } from "./v1-ai-image-editor-create-body-assets";
|
|
20
20
|
export { V1AiImageEditorCreateBodyModelEnum } from "./v1-ai-image-editor-create-body-model-enum";
|
|
21
|
+
export { V1AiImageEditorCreateBodyResolutionEnum } from "./v1-ai-image-editor-create-body-resolution-enum";
|
|
21
22
|
export { V1AiImageEditorCreateBodyStyle } from "./v1-ai-image-editor-create-body-style";
|
|
22
23
|
export { V1AiImageEditorCreateBodyStyleModelEnum } from "./v1-ai-image-editor-create-body-style-model-enum";
|
|
23
24
|
export { V1AiImageEditorCreateResponse } from "./v1-ai-image-editor-create-response";
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Maximum resolution for the generated image.
|
|
3
|
+
*
|
|
4
|
+
* **Options:**
|
|
5
|
+
* - `auto` - Automatic resolution (all tiers, default)
|
|
6
|
+
* - `2k` - Up to 2048px (requires Pro or Business tier)
|
|
7
|
+
* - `4k` - Up to 4096px (requires Business tier)
|
|
8
|
+
*
|
|
9
|
+
* Note: Resolution availability depends on your subscription tier. Defaults to `auto` if not specified.
|
|
10
|
+
*/
|
|
11
|
+
export type V1AiImageEditorCreateBodyResolutionEnum = "2k" | "4k" | "auto";
|
|
@@ -53,6 +53,17 @@ export type V1AiImageEditorCreateBody = {
|
|
|
53
53
|
* Give your image a custom name for easy identification.
|
|
54
54
|
*/
|
|
55
55
|
name?: string | undefined;
|
|
56
|
+
/**
|
|
57
|
+
* Maximum resolution for the generated image.
|
|
58
|
+
*
|
|
59
|
+
* **Options:**
|
|
60
|
+
* - `auto` - Automatic resolution (all tiers, default)
|
|
61
|
+
* - `2k` - Up to 2048px (requires Pro or Business tier)
|
|
62
|
+
* - `4k` - Up to 4096px (requires Business tier)
|
|
63
|
+
*
|
|
64
|
+
* Note: Resolution availability depends on your subscription tier. Defaults to `auto` if not specified.
|
|
65
|
+
*/
|
|
66
|
+
resolution?: ("2k" | "4k" | "auto") | undefined;
|
|
56
67
|
style: V1AiImageEditorCreateBodyStyle;
|
|
57
68
|
};
|
|
58
69
|
/**
|
|
@@ -66,6 +77,7 @@ export type External$V1AiImageEditorCreateBody = {
|
|
|
66
77
|
image_count?: number | undefined;
|
|
67
78
|
model?: ("default" | "nano-banana" | "nano-banana-2" | "nano-banana-pro" | "qwen-edit" | "seedream-v4" | "seedream-v4.5") | undefined;
|
|
68
79
|
name?: string | undefined;
|
|
80
|
+
resolution?: ("2k" | "4k" | "auto") | undefined;
|
|
69
81
|
style: External$V1AiImageEditorCreateBodyStyle;
|
|
70
82
|
};
|
|
71
83
|
export declare const Schemas$V1AiImageEditorCreateBody: {
|
|
@@ -60,6 +60,7 @@ const SchemaIn$V1AiImageEditorCreateBody = z
|
|
|
60
60
|
])
|
|
61
61
|
.optional(),
|
|
62
62
|
name: z.string().optional(),
|
|
63
|
+
resolution: z.enum(["2k", "4k", "auto"]).optional(),
|
|
63
64
|
style: v1_ai_image_editor_create_body_style_1.Schemas$V1AiImageEditorCreateBodyStyle.in,
|
|
64
65
|
})
|
|
65
66
|
.transform((obj) => {
|
|
@@ -69,6 +70,7 @@ const SchemaIn$V1AiImageEditorCreateBody = z
|
|
|
69
70
|
image_count: "imageCount",
|
|
70
71
|
model: "model",
|
|
71
72
|
name: "name",
|
|
73
|
+
resolution: "resolution",
|
|
72
74
|
style: "style",
|
|
73
75
|
});
|
|
74
76
|
});
|
|
@@ -95,6 +97,7 @@ const SchemaOut$V1AiImageEditorCreateBody = z
|
|
|
95
97
|
])
|
|
96
98
|
.optional(),
|
|
97
99
|
name: z.string().optional(),
|
|
100
|
+
resolution: z.enum(["2k", "4k", "auto"]).optional(),
|
|
98
101
|
style: v1_ai_image_editor_create_body_style_1.Schemas$V1AiImageEditorCreateBodyStyle.out,
|
|
99
102
|
})
|
|
100
103
|
.transform((obj) => {
|
|
@@ -104,6 +107,7 @@ const SchemaOut$V1AiImageEditorCreateBody = z
|
|
|
104
107
|
imageCount: "image_count",
|
|
105
108
|
model: "model",
|
|
106
109
|
name: "name",
|
|
110
|
+
resolution: "resolution",
|
|
107
111
|
style: "style",
|
|
108
112
|
});
|
|
109
113
|
});
|
|
@@ -20,11 +20,11 @@
|
|
|
20
20
|
* - Available for tiers: free, creator, pro, business
|
|
21
21
|
* - Image count allowed: 1, 2, 3, 4
|
|
22
22
|
* - `nano-banana-2` - 100 credits/image
|
|
23
|
-
* - Supported resolutions: auto
|
|
23
|
+
* - Supported resolutions: auto, 2k, 4k
|
|
24
24
|
* - Available for tiers: free, creator, pro, business
|
|
25
25
|
* - Image count allowed: 1, 2, 3, 4
|
|
26
26
|
* - `nano-banana-pro` - 150 credits/image
|
|
27
|
-
* - Supported resolutions: auto
|
|
27
|
+
* - Supported resolutions: auto, 2k, 4k
|
|
28
28
|
* - Available for tiers: creator, pro, business
|
|
29
29
|
* - Image count allowed: 1, 4, 9, 16
|
|
30
30
|
*
|
|
@@ -34,11 +34,11 @@ export type V1AiImageGeneratorCreateBody = {
|
|
|
34
34
|
* - Available for tiers: free, creator, pro, business
|
|
35
35
|
* - Image count allowed: 1, 2, 3, 4
|
|
36
36
|
* - `nano-banana-2` - 100 credits/image
|
|
37
|
-
* - Supported resolutions: auto
|
|
37
|
+
* - Supported resolutions: auto, 2k, 4k
|
|
38
38
|
* - Available for tiers: free, creator, pro, business
|
|
39
39
|
* - Image count allowed: 1, 2, 3, 4
|
|
40
40
|
* - `nano-banana-pro` - 150 credits/image
|
|
41
|
-
* - Supported resolutions: auto
|
|
41
|
+
* - Supported resolutions: auto, 2k, 4k
|
|
42
42
|
* - Available for tiers: creator, pro, business
|
|
43
43
|
* - Image count allowed: 1, 4, 9, 16
|
|
44
44
|
*
|
|
@@ -3,6 +3,20 @@ import * as z from "zod";
|
|
|
3
3
|
* Provide the assets for image-to-video. Sora 2 only supports images with an aspect ratio of `9:16` or `16:9`.
|
|
4
4
|
*/
|
|
5
5
|
export type V1ImageToVideoCreateBodyAssets = {
|
|
6
|
+
/**
|
|
7
|
+
* The image to use as the last frame of the video.
|
|
8
|
+
*
|
|
9
|
+
* * **`ltx-2`**: Not supported
|
|
10
|
+
* * **`seedance`**: Supports 480p, 720p, 1080p.
|
|
11
|
+
* * **`kling-2.5`**: Supports 1080p.
|
|
12
|
+
* * **`kling-3.0`**: Supports 1080p.
|
|
13
|
+
* * **`sora-2`**: Not supported
|
|
14
|
+
* * **`veo3.1`**: Not supported
|
|
15
|
+
*
|
|
16
|
+
* Legacy models:
|
|
17
|
+
* * **`kling-1.6`**: Not supported
|
|
18
|
+
*/
|
|
19
|
+
endImageFilePath?: string | undefined;
|
|
6
20
|
/**
|
|
7
21
|
* The path of the image file. This value is either
|
|
8
22
|
* - a direct URL to the video file
|
|
@@ -19,6 +33,7 @@ export type V1ImageToVideoCreateBodyAssets = {
|
|
|
19
33
|
* we expect to come in as network data
|
|
20
34
|
*/
|
|
21
35
|
export type External$V1ImageToVideoCreateBodyAssets = {
|
|
36
|
+
end_image_file_path?: string | undefined;
|
|
22
37
|
image_file_path: string;
|
|
23
38
|
};
|
|
24
39
|
export declare const Schemas$V1ImageToVideoCreateBodyAssets: {
|
|
@@ -41,10 +41,12 @@ const z = __importStar(require("zod"));
|
|
|
41
41
|
*/
|
|
42
42
|
const SchemaIn$V1ImageToVideoCreateBodyAssets = z
|
|
43
43
|
.object({
|
|
44
|
+
end_image_file_path: z.string().optional(),
|
|
44
45
|
image_file_path: z.string(),
|
|
45
46
|
})
|
|
46
47
|
.transform((obj) => {
|
|
47
48
|
return (0, make_api_request_js_1.zodTransform)(obj, {
|
|
49
|
+
end_image_file_path: "endImageFilePath",
|
|
48
50
|
image_file_path: "imageFilePath",
|
|
49
51
|
});
|
|
50
52
|
});
|
|
@@ -54,10 +56,12 @@ const SchemaIn$V1ImageToVideoCreateBodyAssets = z
|
|
|
54
56
|
*/
|
|
55
57
|
const SchemaOut$V1ImageToVideoCreateBodyAssets = z
|
|
56
58
|
.object({
|
|
59
|
+
endImageFilePath: z.string().optional(),
|
|
57
60
|
imageFilePath: z.string(),
|
|
58
61
|
})
|
|
59
62
|
.transform((obj) => {
|
|
60
63
|
return (0, make_api_request_js_1.zodTransform)(obj, {
|
|
64
|
+
endImageFilePath: "end_image_file_path",
|
|
61
65
|
imageFilePath: "image_file_path",
|
|
62
66
|
});
|
|
63
67
|
});
|