magic-hour 0.63.0 → 0.64.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/README.md +1 -1
- package/dist/environment.d.ts +1 -1
- package/dist/environment.js +1 -1
- package/dist/resources/v1/ai-image-upscaler/request-types.d.ts +3 -0
- package/dist/resources/v1/ai-talking-photo/request-types.d.ts +2 -2
- package/dist/resources/v1/audio-to-video/resource-client.js +1 -3
- package/dist/types/index.d.ts +1 -0
- package/dist/types/v1-ai-image-upscaler-create-body-style-mode-enum.d.ts +4 -0
- package/dist/types/v1-ai-image-upscaler-create-body-style-mode-enum.js +2 -0
- package/dist/types/v1-ai-image-upscaler-create-body-style.d.ts +8 -3
- package/dist/types/v1-ai-image-upscaler-create-body-style.js +6 -2
- package/dist/types/v1-ai-image-upscaler-create-body.d.ts +3 -0
- package/dist/types/v1-ai-talking-photo-create-body.d.ts +2 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -274,8 +274,8 @@ Valid values are: `none`, `error`, `warn`, `info`, `debug` (case insensitive). I
|
|
|
274
274
|
|
|
275
275
|
### [v1.audioToVideo](src/resources/v1/audio-to-video/README.md)
|
|
276
276
|
|
|
277
|
-
- [generate](src/resources/v1/audio-to-video/README.md#generate) - Audio To Video Generate Workflow
|
|
278
277
|
- [create](src/resources/v1/audio-to-video/README.md#create) - Audio-to-Video
|
|
278
|
+
- [generate](src/resources/v1/audio-to-video/README.md#generate) - Audio To Video Generate Workflow
|
|
279
279
|
|
|
280
280
|
### [v1.autoSubtitleGenerator](src/resources/v1/auto-subtitle-generator/README.md)
|
|
281
281
|
|
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.65.0";
|
|
8
8
|
})(Environment || (exports.Environment = Environment = {}));
|
|
@@ -19,6 +19,9 @@ export type CreateRequest = {
|
|
|
19
19
|
* Note: 4x upscale is only available on Creator, Pro, or Business tier.
|
|
20
20
|
*/
|
|
21
21
|
scaleFactor: number;
|
|
22
|
+
/**
|
|
23
|
+
* Style settings for the upscale. Use `mode` to select between `"pro"` (faster, no enhancement required) and `"creative"` (defaults to `"Balanced"` enhancement). Defaults to `"creative"`.
|
|
24
|
+
*/
|
|
22
25
|
style: V1AiImageUpscalerCreateBodyStyle;
|
|
23
26
|
};
|
|
24
27
|
/**
|
|
@@ -10,7 +10,7 @@ export type CreateRequest = {
|
|
|
10
10
|
*/
|
|
11
11
|
assets: V1AiTalkingPhotoCreateBodyAssets;
|
|
12
12
|
/**
|
|
13
|
-
* The end time of the input audio in seconds.
|
|
13
|
+
* The end time of the input audio in seconds. Maximum clip length depends on style.generation_mode: realistic 180s, prompted 45s.
|
|
14
14
|
*/
|
|
15
15
|
endSeconds: number;
|
|
16
16
|
/**
|
|
@@ -22,7 +22,7 @@ export type CreateRequest = {
|
|
|
22
22
|
*/
|
|
23
23
|
name?: string | undefined;
|
|
24
24
|
/**
|
|
25
|
-
* The start time of the input audio in seconds.
|
|
25
|
+
* The start time of the input audio in seconds. Maximum clip length depends on style.generation_mode: realistic 180s, prompted 45s.
|
|
26
26
|
*/
|
|
27
27
|
startSeconds: number;
|
|
28
28
|
/**
|
|
@@ -81,9 +81,7 @@ class AudioToVideoClient extends make_api_request_js_1.CoreResourceClient {
|
|
|
81
81
|
if (imageFilePath) {
|
|
82
82
|
(0, logger_1.getLogger)().info(`Uploaded file ${imageFilePath} to Magic Hour's storage as ${uploadedImageFilePath}`);
|
|
83
83
|
}
|
|
84
|
-
const createResponse = yield this.create(Object.assign(Object.assign({}, request), { assets: Object.assign(Object.assign({}, restAssets), { audioFilePath: uploadedAudioFilePath, imageFilePath: imageFilePath
|
|
85
|
-
? uploadedImageFilePath
|
|
86
|
-
: imageFilePath }) }), createOpts);
|
|
84
|
+
const createResponse = yield this.create(Object.assign(Object.assign({}, request), { assets: Object.assign(Object.assign({}, restAssets), { audioFilePath: uploadedAudioFilePath, imageFilePath: imageFilePath ? uploadedImageFilePath : imageFilePath }) }), createOpts);
|
|
87
85
|
(0, logger_1.getLogger)().info(`Created AudioToVideoClient project ${createResponse.id}`);
|
|
88
86
|
const projectsClient = new video_projects_1.VideoProjectsClient(this._client, this._opts);
|
|
89
87
|
(0, logger_1.getLogger)().debug(`Checking result for AudioToVideoClient project ${createResponse.id}`);
|
package/dist/types/index.d.ts
CHANGED
|
@@ -35,6 +35,7 @@ export { V1AiImageUpscalerCreateBody } from "./v1-ai-image-upscaler-create-body"
|
|
|
35
35
|
export { V1AiImageUpscalerCreateBodyAssets } from "./v1-ai-image-upscaler-create-body-assets";
|
|
36
36
|
export { V1AiImageUpscalerCreateBodyStyle } from "./v1-ai-image-upscaler-create-body-style";
|
|
37
37
|
export { V1AiImageUpscalerCreateBodyStyleEnhancementEnum } from "./v1-ai-image-upscaler-create-body-style-enhancement-enum";
|
|
38
|
+
export { V1AiImageUpscalerCreateBodyStyleModeEnum } from "./v1-ai-image-upscaler-create-body-style-mode-enum";
|
|
38
39
|
export { V1AiImageUpscalerCreateResponse } from "./v1-ai-image-upscaler-create-response";
|
|
39
40
|
export { V1AiMemeGeneratorCreateBody } from "./v1-ai-meme-generator-create-body";
|
|
40
41
|
export { V1AiMemeGeneratorCreateBodyStyle } from "./v1-ai-meme-generator-create-body-style";
|
|
@@ -1,9 +1,13 @@
|
|
|
1
1
|
import * as z from "zod";
|
|
2
2
|
/**
|
|
3
|
-
*
|
|
3
|
+
* Style settings for the upscale. Use `mode` to select between `"pro"` (faster, no enhancement required) and `"creative"` (defaults to `"Balanced"` enhancement). Defaults to `"creative"`.
|
|
4
4
|
*/
|
|
5
5
|
export type V1AiImageUpscalerCreateBodyStyle = {
|
|
6
|
-
enhancement
|
|
6
|
+
enhancement?: ("Balanced" | "Creative" | "Resemblance") | undefined;
|
|
7
|
+
/**
|
|
8
|
+
* The upscaling mode. `"pro"` is faster and does not require `enhancement`. `"creative"` requires `enhancement`. Defaults to `"creative"`.
|
|
9
|
+
*/
|
|
10
|
+
mode?: ("creative" | "pro") | undefined;
|
|
7
11
|
/**
|
|
8
12
|
* A prompt to guide the final image. This value is ignored if `enhancement` is not Creative
|
|
9
13
|
*/
|
|
@@ -15,7 +19,8 @@ export type V1AiImageUpscalerCreateBodyStyle = {
|
|
|
15
19
|
* we expect to come in as network data
|
|
16
20
|
*/
|
|
17
21
|
export type External$V1AiImageUpscalerCreateBodyStyle = {
|
|
18
|
-
enhancement
|
|
22
|
+
enhancement?: ("Balanced" | "Creative" | "Resemblance") | undefined;
|
|
23
|
+
mode?: ("creative" | "pro") | undefined;
|
|
19
24
|
prompt?: string | undefined;
|
|
20
25
|
};
|
|
21
26
|
export declare const Schemas$V1AiImageUpscalerCreateBodyStyle: {
|
|
@@ -41,12 +41,14 @@ const z = __importStar(require("zod"));
|
|
|
41
41
|
*/
|
|
42
42
|
const SchemaIn$V1AiImageUpscalerCreateBodyStyle = z
|
|
43
43
|
.object({
|
|
44
|
-
enhancement: z.enum(["Balanced", "Creative", "Resemblance"]),
|
|
44
|
+
enhancement: z.enum(["Balanced", "Creative", "Resemblance"]).optional(),
|
|
45
|
+
mode: z.enum(["creative", "pro"]).optional(),
|
|
45
46
|
prompt: z.string().optional(),
|
|
46
47
|
})
|
|
47
48
|
.transform((obj) => {
|
|
48
49
|
return (0, make_api_request_js_1.zodTransform)(obj, {
|
|
49
50
|
enhancement: "enhancement",
|
|
51
|
+
mode: "mode",
|
|
50
52
|
prompt: "prompt",
|
|
51
53
|
});
|
|
52
54
|
});
|
|
@@ -56,12 +58,14 @@ const SchemaIn$V1AiImageUpscalerCreateBodyStyle = z
|
|
|
56
58
|
*/
|
|
57
59
|
const SchemaOut$V1AiImageUpscalerCreateBodyStyle = z
|
|
58
60
|
.object({
|
|
59
|
-
enhancement: z.enum(["Balanced", "Creative", "Resemblance"]),
|
|
61
|
+
enhancement: z.enum(["Balanced", "Creative", "Resemblance"]).optional(),
|
|
62
|
+
mode: z.enum(["creative", "pro"]).optional(),
|
|
60
63
|
prompt: z.string().optional(),
|
|
61
64
|
})
|
|
62
65
|
.transform((obj) => {
|
|
63
66
|
return (0, make_api_request_js_1.zodTransform)(obj, {
|
|
64
67
|
enhancement: "enhancement",
|
|
68
|
+
mode: "mode",
|
|
65
69
|
prompt: "prompt",
|
|
66
70
|
});
|
|
67
71
|
});
|
|
@@ -19,6 +19,9 @@ export type V1AiImageUpscalerCreateBody = {
|
|
|
19
19
|
* Note: 4x upscale is only available on Creator, Pro, or Business tier.
|
|
20
20
|
*/
|
|
21
21
|
scaleFactor: number;
|
|
22
|
+
/**
|
|
23
|
+
* Style settings for the upscale. Use `mode` to select between `"pro"` (faster, no enhancement required) and `"creative"` (defaults to `"Balanced"` enhancement). Defaults to `"creative"`.
|
|
24
|
+
*/
|
|
22
25
|
style: V1AiImageUpscalerCreateBodyStyle;
|
|
23
26
|
};
|
|
24
27
|
/**
|
|
@@ -10,7 +10,7 @@ export type V1AiTalkingPhotoCreateBody = {
|
|
|
10
10
|
*/
|
|
11
11
|
assets: V1AiTalkingPhotoCreateBodyAssets;
|
|
12
12
|
/**
|
|
13
|
-
* The end time of the input audio in seconds.
|
|
13
|
+
* The end time of the input audio in seconds. Maximum clip length depends on style.generation_mode: realistic 180s, prompted 45s.
|
|
14
14
|
*/
|
|
15
15
|
endSeconds: number;
|
|
16
16
|
/**
|
|
@@ -22,7 +22,7 @@ export type V1AiTalkingPhotoCreateBody = {
|
|
|
22
22
|
*/
|
|
23
23
|
name?: string | undefined;
|
|
24
24
|
/**
|
|
25
|
-
* The start time of the input audio in seconds.
|
|
25
|
+
* The start time of the input audio in seconds. Maximum clip length depends on style.generation_mode: realistic 180s, prompted 45s.
|
|
26
26
|
*/
|
|
27
27
|
startSeconds: number;
|
|
28
28
|
/**
|