magic-hour 0.79.0 → 0.81.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 +5 -0
- package/dist/environment.d.ts +1 -1
- package/dist/environment.js +1 -1
- package/dist/resources/v1/ai-video-editor/request-types.d.ts +1 -1
- package/dist/resources/v1/ai-video-translator/index.d.ts +2 -0
- package/dist/resources/v1/ai-video-translator/index.js +5 -0
- package/dist/resources/v1/ai-video-translator/request-types.d.ts +48 -0
- package/dist/resources/v1/ai-video-translator/request-types.js +196 -0
- package/dist/resources/v1/ai-video-translator/resource-client.d.ts +43 -0
- package/dist/resources/v1/ai-video-translator/resource-client.js +84 -0
- package/dist/resources/v1/character-replace/request-types.d.ts +11 -3
- package/dist/resources/v1/character-replace/request-types.js +6 -2
- package/dist/resources/v1/image-to-video/request-types.d.ts +1 -5
- package/dist/resources/v1/index.d.ts +1 -0
- package/dist/resources/v1/index.js +2 -1
- package/dist/resources/v1/resource-client.d.ts +3 -0
- package/dist/resources/v1/resource-client.js +6 -0
- package/dist/resources/v1/text-to-video/request-types.d.ts +0 -5
- package/dist/types/index.d.ts +6 -0
- package/dist/types/v1-ai-video-editor-create-body.d.ts +1 -1
- package/dist/types/v1-ai-video-translator-create-body-assets.d.ts +27 -0
- package/dist/types/v1-ai-video-translator-create-body-assets.js +67 -0
- package/dist/types/v1-ai-video-translator-create-body-resolution-enum.d.ts +4 -0
- package/dist/types/v1-ai-video-translator-create-body-resolution-enum.js +2 -0
- package/dist/types/v1-ai-video-translator-create-body-target-language-enum.d.ts +4 -0
- package/dist/types/v1-ai-video-translator-create-body-target-language-enum.js +2 -0
- package/dist/types/v1-ai-video-translator-create-body.d.ts +48 -0
- package/dist/types/v1-ai-video-translator-create-body.js +196 -0
- package/dist/types/v1-ai-video-translator-create-response.d.ts +36 -0
- package/dist/types/v1-ai-video-translator-create-response.js +75 -0
- package/dist/types/v1-character-replace-create-body-model-enum.d.ts +7 -0
- package/dist/types/v1-character-replace-create-body-model-enum.js +2 -0
- package/dist/types/v1-character-replace-create-body-resolution-enum.d.ts +2 -2
- package/dist/types/v1-character-replace-create-body-style-selection-mode-enum.d.ts +1 -1
- package/dist/types/v1-character-replace-create-body-style.d.ts +2 -2
- package/dist/types/v1-character-replace-create-body.d.ts +11 -3
- package/dist/types/v1-character-replace-create-body.js +6 -2
- package/dist/types/v1-face-swap-create-body-assets-face-swap-mode-enum.d.ts +2 -2
- package/dist/types/v1-face-swap-create-body-assets.d.ts +2 -2
- package/dist/types/v1-face-swap-photo-create-body-assets-face-swap-mode-enum.d.ts +2 -2
- package/dist/types/v1-face-swap-photo-create-body-assets.d.ts +2 -2
- package/dist/types/v1-image-to-video-create-body-assets.d.ts +1 -2
- package/dist/types/v1-image-to-video-create-body-model-enum.d.ts +0 -1
- package/dist/types/v1-image-to-video-create-body-resolution-enum.d.ts +0 -1
- package/dist/types/v1-image-to-video-create-body.d.ts +1 -5
- package/dist/types/v1-text-to-video-create-body-aspect-ratio-enum.d.ts +0 -1
- package/dist/types/v1-text-to-video-create-body-model-enum.d.ts +0 -1
- package/dist/types/v1-text-to-video-create-body-resolution-enum.d.ts +0 -1
- package/dist/types/v1-text-to-video-create-body.d.ts +0 -5
- package/dist/types/v1-video-projects-get-response.d.ts +1 -1
- package/package.json +1 -1
package/dist/types/index.d.ts
CHANGED
|
@@ -62,6 +62,11 @@ export { V1AiVideoEditorCreateBodyModelEnum } from "./v1-ai-video-editor-create-
|
|
|
62
62
|
export { V1AiVideoEditorCreateBodyResolutionEnum } from "./v1-ai-video-editor-create-body-resolution-enum";
|
|
63
63
|
export { V1AiVideoEditorCreateBodyStyle } from "./v1-ai-video-editor-create-body-style";
|
|
64
64
|
export { V1AiVideoEditorCreateResponse } from "./v1-ai-video-editor-create-response";
|
|
65
|
+
export { V1AiVideoTranslatorCreateBody } from "./v1-ai-video-translator-create-body";
|
|
66
|
+
export { V1AiVideoTranslatorCreateBodyAssets } from "./v1-ai-video-translator-create-body-assets";
|
|
67
|
+
export { V1AiVideoTranslatorCreateBodyResolutionEnum } from "./v1-ai-video-translator-create-body-resolution-enum";
|
|
68
|
+
export { V1AiVideoTranslatorCreateBodyTargetLanguageEnum } from "./v1-ai-video-translator-create-body-target-language-enum";
|
|
69
|
+
export { V1AiVideoTranslatorCreateResponse } from "./v1-ai-video-translator-create-response";
|
|
65
70
|
export { V1AiVoiceClonerCreateBody } from "./v1-ai-voice-cloner-create-body";
|
|
66
71
|
export { V1AiVoiceClonerCreateBodyAssets } from "./v1-ai-voice-cloner-create-body-assets";
|
|
67
72
|
export { V1AiVoiceClonerCreateBodyStyle } from "./v1-ai-voice-cloner-create-body-style";
|
|
@@ -99,6 +104,7 @@ export { V1BodySwapCreateBodyResolutionEnum } from "./v1-body-swap-create-body-r
|
|
|
99
104
|
export { V1BodySwapCreateResponse } from "./v1-body-swap-create-response";
|
|
100
105
|
export { V1CharacterReplaceCreateBody } from "./v1-character-replace-create-body";
|
|
101
106
|
export { V1CharacterReplaceCreateBodyAssets } from "./v1-character-replace-create-body-assets";
|
|
107
|
+
export { V1CharacterReplaceCreateBodyModelEnum } from "./v1-character-replace-create-body-model-enum";
|
|
102
108
|
export { V1CharacterReplaceCreateBodyResolutionEnum } from "./v1-character-replace-create-body-resolution-enum";
|
|
103
109
|
export { V1CharacterReplaceCreateBodyStyle } from "./v1-character-replace-create-body-style";
|
|
104
110
|
export { V1CharacterReplaceCreateBodyStyleModeEnum } from "./v1-character-replace-create-body-style-mode-enum";
|
|
@@ -10,7 +10,7 @@ export type V1AiVideoEditorCreateBody = {
|
|
|
10
10
|
*/
|
|
11
11
|
assets: V1AiVideoEditorCreateBodyAssets;
|
|
12
12
|
/**
|
|
13
|
-
* End time of your clip in seconds. Must be greater than `start_seconds`. Minimum duration depends on model: `gemini-omni-1.1`: 3s, LTX 2.5: 0.5s. Maximum duration depends on model: `gemini-omni-1.1`: 10s, LTX 2.5:
|
|
13
|
+
* End time of your clip in seconds. Must be greater than `start_seconds`. Minimum duration depends on model: `gemini-omni-1.1`: 3s, LTX 2.5: 0.5s. Maximum duration depends on model: `gemini-omni-1.1`: 10s, LTX 2.5: 20s.
|
|
14
14
|
*/
|
|
15
15
|
endSeconds: number;
|
|
16
16
|
/**
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import * as z from "zod";
|
|
2
|
+
/**
|
|
3
|
+
* Source video for the translation job.
|
|
4
|
+
*/
|
|
5
|
+
export type V1AiVideoTranslatorCreateBodyAssets = {
|
|
6
|
+
/**
|
|
7
|
+
* Source video containing the speech to translate. This value is either
|
|
8
|
+
* - a direct URL to the video file
|
|
9
|
+
* - `file_path` field from the response of the [upload urls API](https://docs.magichour.ai/api-reference/files/generate-asset-upload-urls).
|
|
10
|
+
*
|
|
11
|
+
* See the [file upload guide](https://docs.magichour.ai/api-reference/files/generate-asset-upload-urls#input-file) for details.
|
|
12
|
+
*
|
|
13
|
+
*/
|
|
14
|
+
videoFilePath: string;
|
|
15
|
+
};
|
|
16
|
+
/**
|
|
17
|
+
* @internal
|
|
18
|
+
* V1AiVideoTranslatorCreateBodyAssets without any key transformation, this is what
|
|
19
|
+
* we expect to come in as network data
|
|
20
|
+
*/
|
|
21
|
+
export type External$V1AiVideoTranslatorCreateBodyAssets = {
|
|
22
|
+
video_file_path: string;
|
|
23
|
+
};
|
|
24
|
+
export declare const Schemas$V1AiVideoTranslatorCreateBodyAssets: {
|
|
25
|
+
in: z.ZodType<V1AiVideoTranslatorCreateBodyAssets, z.ZodTypeDef, unknown>;
|
|
26
|
+
out: z.ZodType<External$V1AiVideoTranslatorCreateBodyAssets, z.ZodTypeDef, V1AiVideoTranslatorCreateBodyAssets>;
|
|
27
|
+
};
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
+
exports.Schemas$V1AiVideoTranslatorCreateBodyAssets = void 0;
|
|
37
|
+
const make_api_request_js_1 = require("make-api-request-js");
|
|
38
|
+
const z = __importStar(require("zod"));
|
|
39
|
+
/**
|
|
40
|
+
* Takes network data, validates it, and transforms keys to match typescript object V1AiVideoTranslatorCreateBodyAssets
|
|
41
|
+
*/
|
|
42
|
+
const SchemaIn$V1AiVideoTranslatorCreateBodyAssets = z
|
|
43
|
+
.object({
|
|
44
|
+
video_file_path: z.string(),
|
|
45
|
+
})
|
|
46
|
+
.transform((obj) => {
|
|
47
|
+
return (0, make_api_request_js_1.zodTransform)(obj, {
|
|
48
|
+
video_file_path: "videoFilePath",
|
|
49
|
+
});
|
|
50
|
+
});
|
|
51
|
+
/**
|
|
52
|
+
* @internal
|
|
53
|
+
* Takes typescript data, validates it, and maps keys to match the expected external object External$V1AiVideoTranslatorCreateBodyAssets
|
|
54
|
+
*/
|
|
55
|
+
const SchemaOut$V1AiVideoTranslatorCreateBodyAssets = z
|
|
56
|
+
.object({
|
|
57
|
+
videoFilePath: z.string(),
|
|
58
|
+
})
|
|
59
|
+
.transform((obj) => {
|
|
60
|
+
return (0, make_api_request_js_1.zodTransform)(obj, {
|
|
61
|
+
videoFilePath: "video_file_path",
|
|
62
|
+
});
|
|
63
|
+
});
|
|
64
|
+
exports.Schemas$V1AiVideoTranslatorCreateBodyAssets = {
|
|
65
|
+
in: SchemaIn$V1AiVideoTranslatorCreateBodyAssets,
|
|
66
|
+
out: SchemaOut$V1AiVideoTranslatorCreateBodyAssets,
|
|
67
|
+
};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Language to translate the video's speech into.
|
|
3
|
+
*/
|
|
4
|
+
export type V1AiVideoTranslatorCreateBodyTargetLanguageEnum = "Afrikaans" | "Arabic" | "Bengali" | "Bulgarian" | "Catalan" | "Chinese (Simplified)" | "Chinese (Traditional)" | "Croatian" | "Czech" | "Danish" | "Dutch" | "English" | "Estonian" | "Finnish" | "French" | "German" | "Greek" | "Gujarati" | "Hebrew" | "Hindi" | "Hungarian" | "Indonesian" | "Italian" | "Japanese" | "Kannada" | "Kazakh" | "Korean" | "Latvian" | "Lithuanian" | "Malay" | "Malayalam" | "Marathi" | "Norwegian" | "Persian" | "Polish" | "Portuguese" | "Punjabi" | "Romanian" | "Russian" | "Serbian" | "Slovak" | "Slovenian" | "Spanish" | "Swahili" | "Swedish" | "Tamil" | "Telugu" | "Thai" | "Turkish" | "Ukrainian" | "Urdu" | "Vietnamese" | "Welsh";
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import * as z from "zod";
|
|
2
|
+
import { External$V1AiVideoTranslatorCreateBodyAssets, V1AiVideoTranslatorCreateBodyAssets } from "./v1-ai-video-translator-create-body-assets";
|
|
3
|
+
/**
|
|
4
|
+
* V1AiVideoTranslatorCreateBody
|
|
5
|
+
*/
|
|
6
|
+
export type V1AiVideoTranslatorCreateBody = {
|
|
7
|
+
/**
|
|
8
|
+
* Source video for the translation job.
|
|
9
|
+
*/
|
|
10
|
+
assets: V1AiVideoTranslatorCreateBodyAssets;
|
|
11
|
+
/**
|
|
12
|
+
* End time of your clip (seconds). Must be greater than start_seconds. The clip must be 1-30 seconds long.
|
|
13
|
+
*/
|
|
14
|
+
endSeconds: number;
|
|
15
|
+
/**
|
|
16
|
+
* Give your video a custom name for easy identification.
|
|
17
|
+
*/
|
|
18
|
+
name?: string | undefined;
|
|
19
|
+
/**
|
|
20
|
+
* Output video resolution. Defaults to 480p. 720p and 1080p require a paid plan.
|
|
21
|
+
*/
|
|
22
|
+
resolution?: ("1080p" | "480p" | "720p") | undefined;
|
|
23
|
+
/**
|
|
24
|
+
* Start time of your clip (seconds). Must be ≥ 0.
|
|
25
|
+
*/
|
|
26
|
+
startSeconds?: number | undefined;
|
|
27
|
+
/**
|
|
28
|
+
* Language to translate the video's speech into.
|
|
29
|
+
*/
|
|
30
|
+
targetLanguage: "Afrikaans" | "Arabic" | "Bengali" | "Bulgarian" | "Catalan" | "Chinese (Simplified)" | "Chinese (Traditional)" | "Croatian" | "Czech" | "Danish" | "Dutch" | "English" | "Estonian" | "Finnish" | "French" | "German" | "Greek" | "Gujarati" | "Hebrew" | "Hindi" | "Hungarian" | "Indonesian" | "Italian" | "Japanese" | "Kannada" | "Kazakh" | "Korean" | "Latvian" | "Lithuanian" | "Malay" | "Malayalam" | "Marathi" | "Norwegian" | "Persian" | "Polish" | "Portuguese" | "Punjabi" | "Romanian" | "Russian" | "Serbian" | "Slovak" | "Slovenian" | "Spanish" | "Swahili" | "Swedish" | "Tamil" | "Telugu" | "Thai" | "Turkish" | "Ukrainian" | "Urdu" | "Vietnamese" | "Welsh";
|
|
31
|
+
};
|
|
32
|
+
/**
|
|
33
|
+
* @internal
|
|
34
|
+
* V1AiVideoTranslatorCreateBody without any key transformation, this is what
|
|
35
|
+
* we expect to come in as network data
|
|
36
|
+
*/
|
|
37
|
+
export type External$V1AiVideoTranslatorCreateBody = {
|
|
38
|
+
assets: External$V1AiVideoTranslatorCreateBodyAssets;
|
|
39
|
+
end_seconds: number;
|
|
40
|
+
name?: string | undefined;
|
|
41
|
+
resolution?: ("1080p" | "480p" | "720p") | undefined;
|
|
42
|
+
start_seconds?: number | undefined;
|
|
43
|
+
target_language: "Afrikaans" | "Arabic" | "Bengali" | "Bulgarian" | "Catalan" | "Chinese (Simplified)" | "Chinese (Traditional)" | "Croatian" | "Czech" | "Danish" | "Dutch" | "English" | "Estonian" | "Finnish" | "French" | "German" | "Greek" | "Gujarati" | "Hebrew" | "Hindi" | "Hungarian" | "Indonesian" | "Italian" | "Japanese" | "Kannada" | "Kazakh" | "Korean" | "Latvian" | "Lithuanian" | "Malay" | "Malayalam" | "Marathi" | "Norwegian" | "Persian" | "Polish" | "Portuguese" | "Punjabi" | "Romanian" | "Russian" | "Serbian" | "Slovak" | "Slovenian" | "Spanish" | "Swahili" | "Swedish" | "Tamil" | "Telugu" | "Thai" | "Turkish" | "Ukrainian" | "Urdu" | "Vietnamese" | "Welsh";
|
|
44
|
+
};
|
|
45
|
+
export declare const Schemas$V1AiVideoTranslatorCreateBody: {
|
|
46
|
+
in: z.ZodType<V1AiVideoTranslatorCreateBody, z.ZodTypeDef, unknown>;
|
|
47
|
+
out: z.ZodType<External$V1AiVideoTranslatorCreateBody, z.ZodTypeDef, V1AiVideoTranslatorCreateBody>;
|
|
48
|
+
};
|
|
@@ -0,0 +1,196 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
+
exports.Schemas$V1AiVideoTranslatorCreateBody = void 0;
|
|
37
|
+
const make_api_request_js_1 = require("make-api-request-js");
|
|
38
|
+
const z = __importStar(require("zod"));
|
|
39
|
+
const v1_ai_video_translator_create_body_assets_1 = require("./v1-ai-video-translator-create-body-assets");
|
|
40
|
+
/**
|
|
41
|
+
* Takes network data, validates it, and transforms keys to match typescript object V1AiVideoTranslatorCreateBody
|
|
42
|
+
*/
|
|
43
|
+
const SchemaIn$V1AiVideoTranslatorCreateBody = z
|
|
44
|
+
.object({
|
|
45
|
+
assets: v1_ai_video_translator_create_body_assets_1.Schemas$V1AiVideoTranslatorCreateBodyAssets.in,
|
|
46
|
+
end_seconds: z.number(),
|
|
47
|
+
name: z.string().optional(),
|
|
48
|
+
resolution: z.enum(["1080p", "480p", "720p"]).optional(),
|
|
49
|
+
start_seconds: z.number().optional(),
|
|
50
|
+
target_language: z.enum([
|
|
51
|
+
"Afrikaans",
|
|
52
|
+
"Arabic",
|
|
53
|
+
"Bengali",
|
|
54
|
+
"Bulgarian",
|
|
55
|
+
"Catalan",
|
|
56
|
+
"Chinese (Simplified)",
|
|
57
|
+
"Chinese (Traditional)",
|
|
58
|
+
"Croatian",
|
|
59
|
+
"Czech",
|
|
60
|
+
"Danish",
|
|
61
|
+
"Dutch",
|
|
62
|
+
"English",
|
|
63
|
+
"Estonian",
|
|
64
|
+
"Finnish",
|
|
65
|
+
"French",
|
|
66
|
+
"German",
|
|
67
|
+
"Greek",
|
|
68
|
+
"Gujarati",
|
|
69
|
+
"Hebrew",
|
|
70
|
+
"Hindi",
|
|
71
|
+
"Hungarian",
|
|
72
|
+
"Indonesian",
|
|
73
|
+
"Italian",
|
|
74
|
+
"Japanese",
|
|
75
|
+
"Kannada",
|
|
76
|
+
"Kazakh",
|
|
77
|
+
"Korean",
|
|
78
|
+
"Latvian",
|
|
79
|
+
"Lithuanian",
|
|
80
|
+
"Malay",
|
|
81
|
+
"Malayalam",
|
|
82
|
+
"Marathi",
|
|
83
|
+
"Norwegian",
|
|
84
|
+
"Persian",
|
|
85
|
+
"Polish",
|
|
86
|
+
"Portuguese",
|
|
87
|
+
"Punjabi",
|
|
88
|
+
"Romanian",
|
|
89
|
+
"Russian",
|
|
90
|
+
"Serbian",
|
|
91
|
+
"Slovak",
|
|
92
|
+
"Slovenian",
|
|
93
|
+
"Spanish",
|
|
94
|
+
"Swahili",
|
|
95
|
+
"Swedish",
|
|
96
|
+
"Tamil",
|
|
97
|
+
"Telugu",
|
|
98
|
+
"Thai",
|
|
99
|
+
"Turkish",
|
|
100
|
+
"Ukrainian",
|
|
101
|
+
"Urdu",
|
|
102
|
+
"Vietnamese",
|
|
103
|
+
"Welsh",
|
|
104
|
+
]),
|
|
105
|
+
})
|
|
106
|
+
.transform((obj) => {
|
|
107
|
+
return (0, make_api_request_js_1.zodTransform)(obj, {
|
|
108
|
+
assets: "assets",
|
|
109
|
+
end_seconds: "endSeconds",
|
|
110
|
+
name: "name",
|
|
111
|
+
resolution: "resolution",
|
|
112
|
+
start_seconds: "startSeconds",
|
|
113
|
+
target_language: "targetLanguage",
|
|
114
|
+
});
|
|
115
|
+
});
|
|
116
|
+
/**
|
|
117
|
+
* @internal
|
|
118
|
+
* Takes typescript data, validates it, and maps keys to match the expected external object External$V1AiVideoTranslatorCreateBody
|
|
119
|
+
*/
|
|
120
|
+
const SchemaOut$V1AiVideoTranslatorCreateBody = z
|
|
121
|
+
.object({
|
|
122
|
+
assets: v1_ai_video_translator_create_body_assets_1.Schemas$V1AiVideoTranslatorCreateBodyAssets.out,
|
|
123
|
+
endSeconds: z.number(),
|
|
124
|
+
name: z.string().optional(),
|
|
125
|
+
resolution: z.enum(["1080p", "480p", "720p"]).optional(),
|
|
126
|
+
startSeconds: z.number().optional(),
|
|
127
|
+
targetLanguage: z.enum([
|
|
128
|
+
"Afrikaans",
|
|
129
|
+
"Arabic",
|
|
130
|
+
"Bengali",
|
|
131
|
+
"Bulgarian",
|
|
132
|
+
"Catalan",
|
|
133
|
+
"Chinese (Simplified)",
|
|
134
|
+
"Chinese (Traditional)",
|
|
135
|
+
"Croatian",
|
|
136
|
+
"Czech",
|
|
137
|
+
"Danish",
|
|
138
|
+
"Dutch",
|
|
139
|
+
"English",
|
|
140
|
+
"Estonian",
|
|
141
|
+
"Finnish",
|
|
142
|
+
"French",
|
|
143
|
+
"German",
|
|
144
|
+
"Greek",
|
|
145
|
+
"Gujarati",
|
|
146
|
+
"Hebrew",
|
|
147
|
+
"Hindi",
|
|
148
|
+
"Hungarian",
|
|
149
|
+
"Indonesian",
|
|
150
|
+
"Italian",
|
|
151
|
+
"Japanese",
|
|
152
|
+
"Kannada",
|
|
153
|
+
"Kazakh",
|
|
154
|
+
"Korean",
|
|
155
|
+
"Latvian",
|
|
156
|
+
"Lithuanian",
|
|
157
|
+
"Malay",
|
|
158
|
+
"Malayalam",
|
|
159
|
+
"Marathi",
|
|
160
|
+
"Norwegian",
|
|
161
|
+
"Persian",
|
|
162
|
+
"Polish",
|
|
163
|
+
"Portuguese",
|
|
164
|
+
"Punjabi",
|
|
165
|
+
"Romanian",
|
|
166
|
+
"Russian",
|
|
167
|
+
"Serbian",
|
|
168
|
+
"Slovak",
|
|
169
|
+
"Slovenian",
|
|
170
|
+
"Spanish",
|
|
171
|
+
"Swahili",
|
|
172
|
+
"Swedish",
|
|
173
|
+
"Tamil",
|
|
174
|
+
"Telugu",
|
|
175
|
+
"Thai",
|
|
176
|
+
"Turkish",
|
|
177
|
+
"Ukrainian",
|
|
178
|
+
"Urdu",
|
|
179
|
+
"Vietnamese",
|
|
180
|
+
"Welsh",
|
|
181
|
+
]),
|
|
182
|
+
})
|
|
183
|
+
.transform((obj) => {
|
|
184
|
+
return (0, make_api_request_js_1.zodTransform)(obj, {
|
|
185
|
+
assets: "assets",
|
|
186
|
+
endSeconds: "end_seconds",
|
|
187
|
+
name: "name",
|
|
188
|
+
resolution: "resolution",
|
|
189
|
+
startSeconds: "start_seconds",
|
|
190
|
+
targetLanguage: "target_language",
|
|
191
|
+
});
|
|
192
|
+
});
|
|
193
|
+
exports.Schemas$V1AiVideoTranslatorCreateBody = {
|
|
194
|
+
in: SchemaIn$V1AiVideoTranslatorCreateBody,
|
|
195
|
+
out: SchemaOut$V1AiVideoTranslatorCreateBody,
|
|
196
|
+
};
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import * as z from "zod";
|
|
2
|
+
/**
|
|
3
|
+
* Success
|
|
4
|
+
*/
|
|
5
|
+
export type V1AiVideoTranslatorCreateResponse = {
|
|
6
|
+
/**
|
|
7
|
+
* The amount of credits deducted from your account to generate the video. If the status is not 'complete', this value is an estimate and may be adjusted upon completion based on the actual FPS of the output video.
|
|
8
|
+
*
|
|
9
|
+
* If video generation fails, credits will be refunded, and this field will be updated to include the refund.
|
|
10
|
+
*/
|
|
11
|
+
creditsCharged: number;
|
|
12
|
+
/**
|
|
13
|
+
* Deprecated: Previously represented the number of frames (original name of our credit system) used for video generation. Use 'credits_charged' instead.
|
|
14
|
+
*
|
|
15
|
+
* The amount of frames used to generate the video. If the status is not 'complete', the cost is an estimate and will be adjusted when the video completes.
|
|
16
|
+
*/
|
|
17
|
+
estimatedFrameCost: number;
|
|
18
|
+
/**
|
|
19
|
+
* Unique ID of the video. Use it with the [Get video Project API](https://docs.magichour.ai/api-reference/video-projects/get-video-details) to fetch status and downloads.
|
|
20
|
+
*/
|
|
21
|
+
id: string;
|
|
22
|
+
};
|
|
23
|
+
/**
|
|
24
|
+
* @internal
|
|
25
|
+
* V1AiVideoTranslatorCreateResponse without any key transformation, this is what
|
|
26
|
+
* we expect to come in as network data
|
|
27
|
+
*/
|
|
28
|
+
export type External$V1AiVideoTranslatorCreateResponse = {
|
|
29
|
+
credits_charged: number;
|
|
30
|
+
estimated_frame_cost: number;
|
|
31
|
+
id: string;
|
|
32
|
+
};
|
|
33
|
+
export declare const Schemas$V1AiVideoTranslatorCreateResponse: {
|
|
34
|
+
in: z.ZodType<V1AiVideoTranslatorCreateResponse, z.ZodTypeDef, unknown>;
|
|
35
|
+
out: z.ZodType<External$V1AiVideoTranslatorCreateResponse, z.ZodTypeDef, V1AiVideoTranslatorCreateResponse>;
|
|
36
|
+
};
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
+
exports.Schemas$V1AiVideoTranslatorCreateResponse = void 0;
|
|
37
|
+
const make_api_request_js_1 = require("make-api-request-js");
|
|
38
|
+
const z = __importStar(require("zod"));
|
|
39
|
+
/**
|
|
40
|
+
* Takes network data, validates it, and transforms keys to match typescript object V1AiVideoTranslatorCreateResponse
|
|
41
|
+
*/
|
|
42
|
+
const SchemaIn$V1AiVideoTranslatorCreateResponse = z
|
|
43
|
+
.object({
|
|
44
|
+
credits_charged: z.number().int(),
|
|
45
|
+
estimated_frame_cost: z.number().int(),
|
|
46
|
+
id: z.string(),
|
|
47
|
+
})
|
|
48
|
+
.transform((obj) => {
|
|
49
|
+
return (0, make_api_request_js_1.zodTransform)(obj, {
|
|
50
|
+
credits_charged: "creditsCharged",
|
|
51
|
+
estimated_frame_cost: "estimatedFrameCost",
|
|
52
|
+
id: "id",
|
|
53
|
+
});
|
|
54
|
+
});
|
|
55
|
+
/**
|
|
56
|
+
* @internal
|
|
57
|
+
* Takes typescript data, validates it, and maps keys to match the expected external object External$V1AiVideoTranslatorCreateResponse
|
|
58
|
+
*/
|
|
59
|
+
const SchemaOut$V1AiVideoTranslatorCreateResponse = z
|
|
60
|
+
.object({
|
|
61
|
+
creditsCharged: z.number().int(),
|
|
62
|
+
estimatedFrameCost: z.number().int(),
|
|
63
|
+
id: z.string(),
|
|
64
|
+
})
|
|
65
|
+
.transform((obj) => {
|
|
66
|
+
return (0, make_api_request_js_1.zodTransform)(obj, {
|
|
67
|
+
creditsCharged: "credits_charged",
|
|
68
|
+
estimatedFrameCost: "estimated_frame_cost",
|
|
69
|
+
id: "id",
|
|
70
|
+
});
|
|
71
|
+
});
|
|
72
|
+
exports.Schemas$V1AiVideoTranslatorCreateResponse = {
|
|
73
|
+
in: SchemaIn$V1AiVideoTranslatorCreateResponse,
|
|
74
|
+
out: SchemaOut$V1AiVideoTranslatorCreateResponse,
|
|
75
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Model to use. Defaults to `wan-animate`.
|
|
3
|
+
*
|
|
4
|
+
* * **`wan-animate`**: 480p, 720p. Supports `points` subject selection.
|
|
5
|
+
* * **`kling-3.0`**: 720p, 1080p. Clips of 3–10 seconds in `replace` mode or 3–30 seconds in `animate` mode. Picks the main person automatically, so `points` are rejected.
|
|
6
|
+
*/
|
|
7
|
+
export type V1CharacterReplaceCreateBodyModelEnum = "kling-3.0" | "wan-animate";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Output video resolution. Defaults to
|
|
2
|
+
* Output video resolution. Must be supported by `model`. Defaults to the lowest resolution available on your plan for that model.
|
|
3
3
|
*/
|
|
4
|
-
export type V1CharacterReplaceCreateBodyResolutionEnum = "480p" | "720p";
|
|
4
|
+
export type V1CharacterReplaceCreateBodyResolutionEnum = "1080p" | "480p" | "720p";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* How to locate the subject in the source video. `auto` detects a person automatically. `point` uses your `points` to mark the subject
|
|
2
|
+
* How to locate the subject in the source video. `auto` detects a person automatically. `point` uses your `points` to mark the subject and is supported by `wan-animate`. Defaults to `auto`.
|
|
3
3
|
*/
|
|
4
4
|
export type V1CharacterReplaceCreateBodyStyleSelectionModeEnum = "auto" | "point";
|
|
@@ -9,11 +9,11 @@ export type V1CharacterReplaceCreateBodyStyle = {
|
|
|
9
9
|
*/
|
|
10
10
|
mode?: ("animate" | "replace") | undefined;
|
|
11
11
|
/**
|
|
12
|
-
* On-frame markers for manual subject selection. Required when `selection_mode` is `point`. Ignored when `selection_mode` is `auto` or omitted.
|
|
12
|
+
* On-frame markers for manual subject selection. Required when `selection_mode` is `point`. Ignored when `selection_mode` is `auto` or omitted. Rejected for models without subject selection (supported by `wan-animate`).
|
|
13
13
|
*/
|
|
14
14
|
points?: V1CharacterReplaceCreateBodyStylePointsItem[] | undefined;
|
|
15
15
|
/**
|
|
16
|
-
* How to locate the subject in the source video. `auto` detects a person automatically. `point` uses your `points` to mark the subject
|
|
16
|
+
* How to locate the subject in the source video. `auto` detects a person automatically. `point` uses your `points` to mark the subject and is supported by `wan-animate`. Defaults to `auto`.
|
|
17
17
|
*/
|
|
18
18
|
selectionMode?: ("auto" | "point") | undefined;
|
|
19
19
|
};
|
|
@@ -13,14 +13,21 @@ export type V1CharacterReplaceCreateBody = {
|
|
|
13
13
|
* End time of your clip (seconds). Must be greater than start_seconds.
|
|
14
14
|
*/
|
|
15
15
|
endSeconds: number;
|
|
16
|
+
/**
|
|
17
|
+
* Model to use. Defaults to `wan-animate`.
|
|
18
|
+
*
|
|
19
|
+
* * **`wan-animate`**: 480p, 720p. Supports `points` subject selection.
|
|
20
|
+
* * **`kling-3.0`**: 720p, 1080p. Clips of 3–10 seconds in `replace` mode or 3–30 seconds in `animate` mode. Picks the main person automatically, so `points` are rejected.
|
|
21
|
+
*/
|
|
22
|
+
model?: ("kling-3.0" | "wan-animate") | undefined;
|
|
16
23
|
/**
|
|
17
24
|
* Give your video a custom name for easy identification.
|
|
18
25
|
*/
|
|
19
26
|
name?: string | undefined;
|
|
20
27
|
/**
|
|
21
|
-
* Output video resolution. Defaults to
|
|
28
|
+
* Output video resolution. Must be supported by `model`. Defaults to the lowest resolution available on your plan for that model.
|
|
22
29
|
*/
|
|
23
|
-
resolution?: ("480p" | "720p") | undefined;
|
|
30
|
+
resolution?: ("1080p" | "480p" | "720p") | undefined;
|
|
24
31
|
/**
|
|
25
32
|
* Start time of your clip (seconds). Must be ≥ 0.
|
|
26
33
|
*/
|
|
@@ -38,8 +45,9 @@ export type V1CharacterReplaceCreateBody = {
|
|
|
38
45
|
export type External$V1CharacterReplaceCreateBody = {
|
|
39
46
|
assets: External$V1CharacterReplaceCreateBodyAssets;
|
|
40
47
|
end_seconds: number;
|
|
48
|
+
model?: ("kling-3.0" | "wan-animate") | undefined;
|
|
41
49
|
name?: string | undefined;
|
|
42
|
-
resolution?: ("480p" | "720p") | undefined;
|
|
50
|
+
resolution?: ("1080p" | "480p" | "720p") | undefined;
|
|
43
51
|
start_seconds?: number | undefined;
|
|
44
52
|
style?: External$V1CharacterReplaceCreateBodyStyle | undefined;
|
|
45
53
|
};
|
|
@@ -45,8 +45,9 @@ const SchemaIn$V1CharacterReplaceCreateBody = z
|
|
|
45
45
|
.object({
|
|
46
46
|
assets: v1_character_replace_create_body_assets_1.Schemas$V1CharacterReplaceCreateBodyAssets.in,
|
|
47
47
|
end_seconds: z.number(),
|
|
48
|
+
model: z.enum(["kling-3.0", "wan-animate"]).optional(),
|
|
48
49
|
name: z.string().optional(),
|
|
49
|
-
resolution: z.enum(["480p", "720p"]).optional(),
|
|
50
|
+
resolution: z.enum(["1080p", "480p", "720p"]).optional(),
|
|
50
51
|
start_seconds: z.number().optional(),
|
|
51
52
|
style: v1_character_replace_create_body_style_1.Schemas$V1CharacterReplaceCreateBodyStyle.in.optional(),
|
|
52
53
|
})
|
|
@@ -54,6 +55,7 @@ const SchemaIn$V1CharacterReplaceCreateBody = z
|
|
|
54
55
|
return (0, make_api_request_js_1.zodTransform)(obj, {
|
|
55
56
|
assets: "assets",
|
|
56
57
|
end_seconds: "endSeconds",
|
|
58
|
+
model: "model",
|
|
57
59
|
name: "name",
|
|
58
60
|
resolution: "resolution",
|
|
59
61
|
start_seconds: "startSeconds",
|
|
@@ -68,8 +70,9 @@ const SchemaOut$V1CharacterReplaceCreateBody = z
|
|
|
68
70
|
.object({
|
|
69
71
|
assets: v1_character_replace_create_body_assets_1.Schemas$V1CharacterReplaceCreateBodyAssets.out,
|
|
70
72
|
endSeconds: z.number(),
|
|
73
|
+
model: z.enum(["kling-3.0", "wan-animate"]).optional(),
|
|
71
74
|
name: z.string().optional(),
|
|
72
|
-
resolution: z.enum(["480p", "720p"]).optional(),
|
|
75
|
+
resolution: z.enum(["1080p", "480p", "720p"]).optional(),
|
|
73
76
|
startSeconds: z.number().optional(),
|
|
74
77
|
style: v1_character_replace_create_body_style_1.Schemas$V1CharacterReplaceCreateBodyStyle.out.optional(),
|
|
75
78
|
})
|
|
@@ -77,6 +80,7 @@ const SchemaOut$V1CharacterReplaceCreateBody = z
|
|
|
77
80
|
return (0, make_api_request_js_1.zodTransform)(obj, {
|
|
78
81
|
assets: "assets",
|
|
79
82
|
endSeconds: "end_seconds",
|
|
83
|
+
model: "model",
|
|
80
84
|
name: "name",
|
|
81
85
|
resolution: "resolution",
|
|
82
86
|
startSeconds: "start_seconds",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Choose how to swap faces:
|
|
3
|
-
* **all-faces** (recommended) — swap all detected faces using one source image (`source_file_path` required)
|
|
4
|
-
*
|
|
3
|
+
* - **all-faces** (recommended) — swap all detected faces using one source image (`source_file_path` required)
|
|
4
|
+
* - **individual-faces** — specify exact mappings using `face_mappings`
|
|
5
5
|
*/
|
|
6
6
|
export type V1FaceSwapCreateBodyAssetsFaceSwapModeEnum = "all-faces" | "individual-faces";
|
|
@@ -10,8 +10,8 @@ export type V1FaceSwapCreateBodyAssets = {
|
|
|
10
10
|
faceMappings?: V1FaceSwapCreateBodyAssetsFaceMappingsItem[] | undefined;
|
|
11
11
|
/**
|
|
12
12
|
* Choose how to swap faces:
|
|
13
|
-
* **all-faces** (recommended) — swap all detected faces using one source image (`source_file_path` required)
|
|
14
|
-
*
|
|
13
|
+
* - **all-faces** (recommended) — swap all detected faces using one source image (`source_file_path` required)
|
|
14
|
+
* - **individual-faces** — specify exact mappings using `face_mappings`
|
|
15
15
|
*/
|
|
16
16
|
faceSwapMode?: ("all-faces" | "individual-faces") | undefined;
|
|
17
17
|
/**
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Choose how to swap faces:
|
|
3
|
-
* **all-faces** (recommended) — swap all detected faces using one source image (`source_file_path` required)
|
|
4
|
-
*
|
|
3
|
+
* - **all-faces** (recommended) — swap all detected faces using one source image (`source_file_path` required)
|
|
4
|
+
* - **individual-faces** — specify exact mappings using `face_mappings`
|
|
5
5
|
*/
|
|
6
6
|
export type V1FaceSwapPhotoCreateBodyAssetsFaceSwapModeEnum = "all-faces" | "individual-faces";
|