magic-hour 0.78.0 → 0.80.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 +4 -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 +5 -5
- package/dist/resources/v1/ai-video-editor/request-types.js +6 -2
- 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/image-to-video/request-types.d.ts +10 -18
- 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 +12 -19
- package/dist/resources/v1/text-to-video/request-types.js +9 -0
- package/dist/types/index.d.ts +6 -0
- package/dist/types/v1-ai-video-editor-create-body-model-enum.d.ts +2 -2
- package/dist/types/v1-ai-video-editor-create-body-resolution-enum.d.ts +1 -1
- package/dist/types/v1-ai-video-editor-create-body.d.ts +5 -5
- package/dist/types/v1-ai-video-editor-create-body.js +6 -2
- 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-ai-voice-generator-create-body-style-voice-name-enum.d.ts +2 -2
- package/dist/types/v1-ai-voice-generator-create-body-style.d.ts +3 -3
- package/dist/types/v1-ai-voice-generator-create-body-style.js +0 -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 +2 -4
- package/dist/types/v1-image-to-video-create-body-model-enum.d.ts +0 -2
- package/dist/types/v1-image-to-video-create-body-resolution-enum.d.ts +1 -3
- package/dist/types/v1-image-to-video-create-body.d.ts +10 -18
- package/dist/types/v1-lip-sync-create-body-style-generation-mode-enum.d.ts +1 -1
- package/dist/types/v1-lip-sync-create-body-style.d.ts +1 -1
- package/dist/types/v1-text-to-video-create-body-aspect-ratio-enum.d.ts +0 -2
- package/dist/types/v1-text-to-video-create-body-model-enum.d.ts +0 -2
- package/dist/types/v1-text-to-video-create-body-references-item.d.ts +21 -0
- package/dist/types/v1-text-to-video-create-body-references-item.js +71 -0
- package/dist/types/v1-text-to-video-create-body-resolution-enum.d.ts +1 -3
- package/dist/types/v1-text-to-video-create-body.d.ts +12 -19
- package/dist/types/v1-text-to-video-create-body.js +9 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -260,6 +260,10 @@ Valid values are: `none`, `error`, `warn`, `info`, `debug` (case insensitive). I
|
|
|
260
260
|
- [create](src/resources/v1/ai-video-editor/README.md#create) - AI Video Editor
|
|
261
261
|
- [generate](src/resources/v1/ai-video-editor/README.md#generate) - AI Video Editor Generate Workflow
|
|
262
262
|
|
|
263
|
+
### [v1.aiVideoTranslator](src/resources/v1/ai-video-translator/README.md)
|
|
264
|
+
|
|
265
|
+
- [create](src/resources/v1/ai-video-translator/README.md#create) - AI Video Translator
|
|
266
|
+
|
|
263
267
|
### [v1.aiVoiceCloner](src/resources/v1/ai-voice-cloner/README.md)
|
|
264
268
|
|
|
265
269
|
- [create](src/resources/v1/ai-voice-cloner/README.md#create) - AI Voice Cloner
|
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.84.0";
|
|
8
8
|
})(Environment || (exports.Environment = Environment = {}));
|
|
@@ -10,19 +10,19 @@ export type CreateRequest = {
|
|
|
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,
|
|
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: 45s.
|
|
14
14
|
*/
|
|
15
15
|
endSeconds: number;
|
|
16
16
|
/**
|
|
17
|
-
* Editing model. Defaults to
|
|
17
|
+
* Editing model. Defaults to LTX 2.5 for free tier and `gemini-omni-1.1` for paid. `gemini-omni` is deprecated; use `gemini-omni-1.1` instead.
|
|
18
18
|
*/
|
|
19
|
-
model?: ("gemini-omni" | "gemini-omni-1.1" | "ltx-2.3") | undefined;
|
|
19
|
+
model?: ("gemini-omni" | "gemini-omni-1.1" | "ltx-2.3" | "ltx-2.5") | undefined;
|
|
20
20
|
/**
|
|
21
21
|
* Give your video a custom name for easy identification.
|
|
22
22
|
*/
|
|
23
23
|
name?: string | undefined;
|
|
24
24
|
/**
|
|
25
|
-
* Output resolution. Defaults to `480p` for free tier and `720p` for paid. `gemini-omni-1.1` and deprecated `gemini-omni` support 720p and 1080p; LTX
|
|
25
|
+
* Output resolution. Defaults to `480p` for free tier and `720p` for paid. `gemini-omni-1.1` and deprecated `gemini-omni` support 720p and 1080p; LTX 2.5 supports 480p, 720p, and 1080p.
|
|
26
26
|
*/
|
|
27
27
|
resolution?: ("1080p" | "480p" | "720p") | undefined;
|
|
28
28
|
/**
|
|
@@ -39,7 +39,7 @@ export type CreateRequest = {
|
|
|
39
39
|
export type External$CreateRequest = {
|
|
40
40
|
assets: External$V1AiVideoEditorCreateBodyAssets;
|
|
41
41
|
end_seconds: number;
|
|
42
|
-
model?: ("gemini-omni" | "gemini-omni-1.1" | "ltx-2.3") | undefined;
|
|
42
|
+
model?: ("gemini-omni" | "gemini-omni-1.1" | "ltx-2.3" | "ltx-2.5") | undefined;
|
|
43
43
|
name?: string | undefined;
|
|
44
44
|
resolution?: ("1080p" | "480p" | "720p") | undefined;
|
|
45
45
|
start_seconds?: number | undefined;
|
|
@@ -45,7 +45,9 @@ const SchemaIn$CreateRequest = z
|
|
|
45
45
|
.object({
|
|
46
46
|
assets: v1_ai_video_editor_create_body_assets_1.Schemas$V1AiVideoEditorCreateBodyAssets.in,
|
|
47
47
|
end_seconds: z.number(),
|
|
48
|
-
model: z
|
|
48
|
+
model: z
|
|
49
|
+
.enum(["gemini-omni", "gemini-omni-1.1", "ltx-2.3", "ltx-2.5"])
|
|
50
|
+
.optional(),
|
|
49
51
|
name: z.string().optional(),
|
|
50
52
|
resolution: z.enum(["1080p", "480p", "720p"]).optional(),
|
|
51
53
|
start_seconds: z.number().optional(),
|
|
@@ -70,7 +72,9 @@ const SchemaOut$CreateRequest = z
|
|
|
70
72
|
.object({
|
|
71
73
|
assets: v1_ai_video_editor_create_body_assets_1.Schemas$V1AiVideoEditorCreateBodyAssets.out,
|
|
72
74
|
endSeconds: z.number(),
|
|
73
|
-
model: z
|
|
75
|
+
model: z
|
|
76
|
+
.enum(["gemini-omni", "gemini-omni-1.1", "ltx-2.3", "ltx-2.5"])
|
|
77
|
+
.optional(),
|
|
74
78
|
name: z.string().optional(),
|
|
75
79
|
resolution: z.enum(["1080p", "480p", "720p"]).optional(),
|
|
76
80
|
startSeconds: z.number().optional(),
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.AiVideoTranslatorClient = void 0;
|
|
4
|
+
var resource_client_1 = require("./resource-client");
|
|
5
|
+
Object.defineProperty(exports, "AiVideoTranslatorClient", { enumerable: true, get: function () { return resource_client_1.AiVideoTranslatorClient; } });
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import * as z from "zod";
|
|
2
|
+
import { External$V1AiVideoTranslatorCreateBodyAssets, V1AiVideoTranslatorCreateBodyAssets } from "../../../types/v1-ai-video-translator-create-body-assets";
|
|
3
|
+
/**
|
|
4
|
+
* CreateRequest
|
|
5
|
+
*/
|
|
6
|
+
export type CreateRequest = {
|
|
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
|
+
* CreateRequest without any key transformation, this is what
|
|
35
|
+
* we expect to come in as network data
|
|
36
|
+
*/
|
|
37
|
+
export type External$CreateRequest = {
|
|
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$CreateRequest: {
|
|
46
|
+
in: z.ZodType<CreateRequest, z.ZodTypeDef, unknown>;
|
|
47
|
+
out: z.ZodType<External$CreateRequest, z.ZodTypeDef, CreateRequest>;
|
|
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$CreateRequest = 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("../../../types/v1-ai-video-translator-create-body-assets");
|
|
40
|
+
/**
|
|
41
|
+
* Takes network data, validates it, and transforms keys to match typescript object CreateRequest
|
|
42
|
+
*/
|
|
43
|
+
const SchemaIn$CreateRequest = 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$CreateRequest
|
|
119
|
+
*/
|
|
120
|
+
const SchemaOut$CreateRequest = 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$CreateRequest = {
|
|
194
|
+
in: SchemaIn$CreateRequest,
|
|
195
|
+
out: SchemaOut$CreateRequest,
|
|
196
|
+
};
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { ApiPromise, CoreClient, CoreResourceClient, RequestOptions, ResourceClientOptions } from "make-api-request-js";
|
|
2
|
+
import { GenerateOptions, GenerateRequestType } from "../../../helpers/generate-type";
|
|
3
|
+
import * as requests from "../../../resources/v1/ai-video-translator/request-types";
|
|
4
|
+
import * as types from "../../../types";
|
|
5
|
+
type GenerateRequest = GenerateRequestType<requests.CreateRequest, {
|
|
6
|
+
/** Local file path, direct URL, or previously uploaded `api-assets` path. */
|
|
7
|
+
videoFilePath: string;
|
|
8
|
+
}>;
|
|
9
|
+
export declare class AiVideoTranslatorClient extends CoreResourceClient {
|
|
10
|
+
constructor(coreClient: CoreClient, opts: ResourceClientOptions);
|
|
11
|
+
/** Upload a video, create a translation job, and optionally wait and download. */
|
|
12
|
+
generate(request: GenerateRequest, opts?: GenerateOptions): Promise<import("../video-projects/resource-client").V1VideoProjectsGetResponseWithDownloads>;
|
|
13
|
+
/**
|
|
14
|
+
* AI Video Translator
|
|
15
|
+
*
|
|
16
|
+
* **What this API does**
|
|
17
|
+
*
|
|
18
|
+
* Create the same Video Translator you can make in the browser, but programmatically, so you can automate it, run it at scale, or connect it to your own app or workflow.
|
|
19
|
+
*
|
|
20
|
+
* **Good for**
|
|
21
|
+
* - Automation and batch processing
|
|
22
|
+
* - Adding video translator into apps, pipelines, or tools
|
|
23
|
+
*
|
|
24
|
+
* **How it works (3 steps)**
|
|
25
|
+
* 1) Upload your inputs (video, image, or audio) with [Generate Upload URLs](https://docs.magichour.ai/api-reference/files/generate-asset-upload-urls) and copy the `file_path`.
|
|
26
|
+
* 2) Send a request to create a video translator job with the basic fields.
|
|
27
|
+
* 3) Check the job status until it's `complete`, then download the result from `downloads`.
|
|
28
|
+
*
|
|
29
|
+
* **Key options**
|
|
30
|
+
* - Inputs: usually a file, sometimes a YouTube link, depending on project type
|
|
31
|
+
* - Resolution: free users are limited to 576px; higher plans unlock HD and larger sizes
|
|
32
|
+
* - Extra fields: e.g. `face_swap_mode`, `start_seconds`/`end_seconds`, or a text prompt
|
|
33
|
+
*
|
|
34
|
+
* **Cost**
|
|
35
|
+
* Credits are only charged for the frames that actually render. You'll see an estimate when the job is queued, and the final total after it's done.
|
|
36
|
+
*
|
|
37
|
+
* For detailed examples, see the [product page](https://magichour.ai/products/ai-video-translator).
|
|
38
|
+
*
|
|
39
|
+
* POST /v1/ai-video-translator
|
|
40
|
+
*/
|
|
41
|
+
create(request: requests.CreateRequest, opts?: RequestOptions): ApiPromise<types.V1AiVideoTranslatorCreateResponse>;
|
|
42
|
+
}
|
|
43
|
+
export {};
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
12
|
+
var t = {};
|
|
13
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
14
|
+
t[p] = s[p];
|
|
15
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
16
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
17
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
18
|
+
t[p[i]] = s[p[i]];
|
|
19
|
+
}
|
|
20
|
+
return t;
|
|
21
|
+
};
|
|
22
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
23
|
+
exports.AiVideoTranslatorClient = void 0;
|
|
24
|
+
const make_api_request_js_1 = require("make-api-request-js");
|
|
25
|
+
const logger_1 = require("../../../logger");
|
|
26
|
+
const files_1 = require("../../../resources/v1/files");
|
|
27
|
+
const video_projects_1 = require("../../../resources/v1/video-projects");
|
|
28
|
+
const v1_ai_video_translator_create_body_1 = require("../../../types/v1-ai-video-translator-create-body");
|
|
29
|
+
const v1_ai_video_translator_create_response_1 = require("../../../types/v1-ai-video-translator-create-response");
|
|
30
|
+
class AiVideoTranslatorClient extends make_api_request_js_1.CoreResourceClient {
|
|
31
|
+
constructor(coreClient, opts) {
|
|
32
|
+
super(coreClient, opts);
|
|
33
|
+
}
|
|
34
|
+
/** Upload a video, create a translation job, and optionally wait and download. */
|
|
35
|
+
generate(request_1) {
|
|
36
|
+
return __awaiter(this, arguments, void 0, function* (request, opts = {}) {
|
|
37
|
+
const { waitForCompletion = true, downloadOutputs = true, downloadDirectory = undefined } = opts, createOpts = __rest(opts, ["waitForCompletion", "downloadOutputs", "downloadDirectory"]);
|
|
38
|
+
const videoFilePath = yield new files_1.FilesClient(this._client, this._opts).uploadFile(request.assets.videoFilePath);
|
|
39
|
+
const createResponse = yield this.create(Object.assign(Object.assign({}, request), { assets: Object.assign(Object.assign({}, request.assets), { videoFilePath }) }), createOpts);
|
|
40
|
+
(0, logger_1.getLogger)().info(`Created AiVideoTranslatorClient project ${createResponse.id}`);
|
|
41
|
+
return new video_projects_1.VideoProjectsClient(this._client, this._opts).checkResult({ id: createResponse.id }, Object.assign({ waitForCompletion, downloadOutputs, downloadDirectory }, createOpts));
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* AI Video Translator
|
|
46
|
+
*
|
|
47
|
+
* **What this API does**
|
|
48
|
+
*
|
|
49
|
+
* Create the same Video Translator you can make in the browser, but programmatically, so you can automate it, run it at scale, or connect it to your own app or workflow.
|
|
50
|
+
*
|
|
51
|
+
* **Good for**
|
|
52
|
+
* - Automation and batch processing
|
|
53
|
+
* - Adding video translator into apps, pipelines, or tools
|
|
54
|
+
*
|
|
55
|
+
* **How it works (3 steps)**
|
|
56
|
+
* 1) Upload your inputs (video, image, or audio) with [Generate Upload URLs](https://docs.magichour.ai/api-reference/files/generate-asset-upload-urls) and copy the `file_path`.
|
|
57
|
+
* 2) Send a request to create a video translator job with the basic fields.
|
|
58
|
+
* 3) Check the job status until it's `complete`, then download the result from `downloads`.
|
|
59
|
+
*
|
|
60
|
+
* **Key options**
|
|
61
|
+
* - Inputs: usually a file, sometimes a YouTube link, depending on project type
|
|
62
|
+
* - Resolution: free users are limited to 576px; higher plans unlock HD and larger sizes
|
|
63
|
+
* - Extra fields: e.g. `face_swap_mode`, `start_seconds`/`end_seconds`, or a text prompt
|
|
64
|
+
*
|
|
65
|
+
* **Cost**
|
|
66
|
+
* Credits are only charged for the frames that actually render. You'll see an estimate when the job is queued, and the final total after it's done.
|
|
67
|
+
*
|
|
68
|
+
* For detailed examples, see the [product page](https://magichour.ai/products/ai-video-translator).
|
|
69
|
+
*
|
|
70
|
+
* POST /v1/ai-video-translator
|
|
71
|
+
*/
|
|
72
|
+
create(request, opts) {
|
|
73
|
+
return this._client.makeRequest({
|
|
74
|
+
method: "post",
|
|
75
|
+
path: "/v1/ai-video-translator",
|
|
76
|
+
auth: ["bearerAuth"],
|
|
77
|
+
contentType: "application/json",
|
|
78
|
+
body: v1_ai_video_translator_create_body_1.Schemas$V1AiVideoTranslatorCreateBody.out.parse(request),
|
|
79
|
+
responseSchema: v1_ai_video_translator_create_response_1.Schemas$V1AiVideoTranslatorCreateResponse.in,
|
|
80
|
+
opts,
|
|
81
|
+
});
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
exports.AiVideoTranslatorClient = AiVideoTranslatorClient;
|
|
@@ -6,7 +6,7 @@ import { External$V1ImageToVideoCreateBodyStyle, V1ImageToVideoCreateBodyStyle }
|
|
|
6
6
|
*/
|
|
7
7
|
export type CreateRequest = {
|
|
8
8
|
/**
|
|
9
|
-
* Provide the assets for image-to-video.
|
|
9
|
+
* Provide the assets for image-to-video.
|
|
10
10
|
*/
|
|
11
11
|
assets: V1ImageToVideoCreateBodyAssets;
|
|
12
12
|
/**
|
|
@@ -16,14 +16,12 @@ export type CreateRequest = {
|
|
|
16
16
|
* * **`gemini-omni-1.1`**: Not supported
|
|
17
17
|
* * **`kling-2.6`**: Not supported
|
|
18
18
|
* * **`kling-3.0`**: Toggle-able: audio adds extra credits when enabled
|
|
19
|
-
* * **`ltx-2.3`**: Toggle-able: no additional credits for audio
|
|
20
19
|
* * **`ltx-2.5`**: Toggle-able: no additional credits for audio
|
|
21
20
|
* * **`minimax-h3`**: Toggle-able: no additional credits for audio
|
|
22
21
|
* * **`seedance-1.5`**: Toggle-able: audio adds extra credits when enabled
|
|
23
22
|
* * **`seedance-2.0`**: Toggle-able: no additional credits for audio
|
|
24
23
|
* * **`seedance-2.0-mini`**: Toggle-able: no additional credits for audio
|
|
25
24
|
* * **`seedance-2.5`**: Toggle-able: no additional credits for audio
|
|
26
|
-
* * **`sora-2`**: Toggle-able: no additional credits for audio
|
|
27
25
|
* * **`veo3.1`**: Toggle-able: audio adds extra credits when enabled
|
|
28
26
|
* * **`veo3.1-lite`**: Toggle-able: audio adds extra credits when enabled
|
|
29
27
|
* * **`wan-2.2`**: Not supported
|
|
@@ -34,17 +32,15 @@ export type CreateRequest = {
|
|
|
34
32
|
/**
|
|
35
33
|
* The total duration of the output video in seconds. Supported durations depend on the chosen model:
|
|
36
34
|
*
|
|
37
|
-
* * **`gemini-omni-1.1`**:
|
|
35
|
+
* * **`gemini-omni-1.1`**: any integer from 3 to 10
|
|
38
36
|
* * **`kling-2.6`**: 5, 10
|
|
39
|
-
* * **`kling-3.0`**:
|
|
40
|
-
* * **`ltx-2.
|
|
41
|
-
* * **`
|
|
42
|
-
* * **`
|
|
43
|
-
* * **`seedance-
|
|
44
|
-
* * **`seedance-2.0`**:
|
|
45
|
-
* * **`seedance-2.
|
|
46
|
-
* * **`seedance-2.5`**: 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30
|
|
47
|
-
* * **`sora-2`**: 4, 8, 12, 24, 36, 48, 60
|
|
37
|
+
* * **`kling-3.0`**: any integer from 3 to 15
|
|
38
|
+
* * **`ltx-2.5`**: any integer from 1 to 60
|
|
39
|
+
* * **`minimax-h3`**: any integer from 1 to 30
|
|
40
|
+
* * **`seedance-1.5`**: any integer from 4 to 12
|
|
41
|
+
* * **`seedance-2.0`**: any integer from 4 to 15
|
|
42
|
+
* * **`seedance-2.0-mini`**: any integer from 4 to 15
|
|
43
|
+
* * **`seedance-2.5`**: any integer from 4 to 30
|
|
48
44
|
* * **`veo3.1`**: 4, 6, 8, 16, 24, 32, 40, 48, 56
|
|
49
45
|
* * **`veo3.1-lite`**: 4, 6, 8, 16, 24, 32, 40, 48, 56
|
|
50
46
|
* * **`wan-2.2`**: 3, 4, 5, 6, 7, 8, 9, 10, 15
|
|
@@ -65,14 +61,12 @@ export type CreateRequest = {
|
|
|
65
61
|
* * `gemini-omni-1.1`: Best for precise short clips, first/last frames, and high-resolution output.
|
|
66
62
|
* * `kling-2.6`: Best for action, motion blur, and controlled camera moves.
|
|
67
63
|
* * `kling-3.0`: Best for cinematic stories, references, and optional audio.
|
|
68
|
-
* * `ltx-2.3`: Fastest for general scenes, long clips, audio, and rapid iteration.
|
|
69
64
|
* * `ltx-2.5`: Fastest for general scenes, long clips, audio, and rapid iteration.
|
|
70
65
|
* * `minimax-h3`: Great for reference-driven clips with native audio and longer durations.
|
|
71
66
|
* * `seedance-1.5`: Best for smooth, consistent motion with an end frame.
|
|
72
67
|
* * `seedance-2.0`: Best for reference-led clips with precise subject control.
|
|
73
68
|
* * `seedance-2.0-mini`: Faster reference-led clips with consistent motion and audio.
|
|
74
69
|
* * `seedance-2.5`: Best for premium realism, detail, and natural motion.
|
|
75
|
-
* * `sora-2`: Best for creative concepts and longer clips with audio.
|
|
76
70
|
* * `veo3.1`: Best for romantic interactions and expressive action, with realistic detail.
|
|
77
71
|
* * `veo3.1-lite`: Balanced realism and audio at a lower cost than Veo 3.1.
|
|
78
72
|
* * `wan-2.2`: Best for physical motion, action, and camera movement.
|
|
@@ -91,14 +85,12 @@ export type CreateRequest = {
|
|
|
91
85
|
* * **`gemini-omni-1.1`**: Supports 360p, 720p, 1080p, 4k.
|
|
92
86
|
* * **`kling-2.6`**: Supports 720p, 1080p.
|
|
93
87
|
* * **`kling-3.0`**: Supports 720p, 1080p, 4k.
|
|
94
|
-
* * **`ltx-2.3`**: Supports 480p, 720p, 1080p.
|
|
95
88
|
* * **`ltx-2.5`**: Supports 480p, 720p, 1080p.
|
|
96
89
|
* * **`minimax-h3`**: Supports 480p, 720p, 1080p.
|
|
97
90
|
* * **`seedance-1.5`**: Supports 480p, 720p, 1080p.
|
|
98
91
|
* * **`seedance-2.0`**: Supports 480p, 720p, 1080p, 4k.
|
|
99
92
|
* * **`seedance-2.0-mini`**: Supports 480p, 720p.
|
|
100
|
-
* * **`seedance-2.5`**: Supports 480p, 720p.
|
|
101
|
-
* * **`sora-2`**: Supports 720p.
|
|
93
|
+
* * **`seedance-2.5`**: Supports 480p, 720p, 1080p.
|
|
102
94
|
* * **`veo3.1`**: Supports 720p, 1080p.
|
|
103
95
|
* * **`veo3.1-lite`**: Supports 720p, 1080p.
|
|
104
96
|
* * **`wan-2.2`**: Supports 480p, 720p, 1080p.
|
|
@@ -10,6 +10,7 @@ export * as aiMemeGenerator from "./ai-meme-generator";
|
|
|
10
10
|
export * as aiQrCodeGenerator from "./ai-qr-code-generator";
|
|
11
11
|
export * as aiTalkingPhoto from "./ai-talking-photo";
|
|
12
12
|
export * as aiVideoEditor from "./ai-video-editor";
|
|
13
|
+
export * as aiVideoTranslator from "./ai-video-translator";
|
|
13
14
|
export * as aiVoiceCloner from "./ai-voice-cloner";
|
|
14
15
|
export * as aiVoiceGenerator from "./ai-voice-generator";
|
|
15
16
|
export * as animation from "./animation";
|
|
@@ -33,7 +33,7 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
33
33
|
};
|
|
34
34
|
})();
|
|
35
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
-
exports.videoToVideo = exports.videoProjects = exports.textToVideo = exports.savedItems = exports.V1Client = exports.photoColorizer = exports.lipSync = exports.imageToVideo = exports.imageProjects = exports.imageBackgroundRemover = exports.headSwap = exports.files = exports.faceSwapPhoto = exports.faceSwap = exports.faceDetection = exports.characterReplace = exports.bodySwap = exports.autoSubtitleGenerator = exports.audioToVideo = exports.audioProjects = exports.animation = exports.aiVoiceGenerator = exports.aiVoiceCloner = exports.aiVideoEditor = exports.aiTalkingPhoto = exports.aiQrCodeGenerator = exports.aiMemeGenerator = exports.aiImageUpscaler = exports.aiImageGenerator = exports.aiImageEditor = exports.aiHeadshotGenerator = exports.aiGifGenerator = exports.aiFaceEditor = exports.aiClothesChanger = exports.account = void 0;
|
|
36
|
+
exports.videoToVideo = exports.videoProjects = exports.textToVideo = exports.savedItems = exports.V1Client = exports.photoColorizer = exports.lipSync = exports.imageToVideo = exports.imageProjects = exports.imageBackgroundRemover = exports.headSwap = exports.files = exports.faceSwapPhoto = exports.faceSwap = exports.faceDetection = exports.characterReplace = exports.bodySwap = exports.autoSubtitleGenerator = exports.audioToVideo = exports.audioProjects = exports.animation = exports.aiVoiceGenerator = exports.aiVoiceCloner = exports.aiVideoTranslator = exports.aiVideoEditor = exports.aiTalkingPhoto = exports.aiQrCodeGenerator = exports.aiMemeGenerator = exports.aiImageUpscaler = exports.aiImageGenerator = exports.aiImageEditor = exports.aiHeadshotGenerator = exports.aiGifGenerator = exports.aiFaceEditor = exports.aiClothesChanger = exports.account = void 0;
|
|
37
37
|
exports.account = __importStar(require("./account"));
|
|
38
38
|
exports.aiClothesChanger = __importStar(require("./ai-clothes-changer"));
|
|
39
39
|
exports.aiFaceEditor = __importStar(require("./ai-face-editor"));
|
|
@@ -46,6 +46,7 @@ exports.aiMemeGenerator = __importStar(require("./ai-meme-generator"));
|
|
|
46
46
|
exports.aiQrCodeGenerator = __importStar(require("./ai-qr-code-generator"));
|
|
47
47
|
exports.aiTalkingPhoto = __importStar(require("./ai-talking-photo"));
|
|
48
48
|
exports.aiVideoEditor = __importStar(require("./ai-video-editor"));
|
|
49
|
+
exports.aiVideoTranslator = __importStar(require("./ai-video-translator"));
|
|
49
50
|
exports.aiVoiceCloner = __importStar(require("./ai-voice-cloner"));
|
|
50
51
|
exports.aiVoiceGenerator = __importStar(require("./ai-voice-generator"));
|
|
51
52
|
exports.animation = __importStar(require("./animation"));
|
|
@@ -11,6 +11,7 @@ import { AiMemeGeneratorClient } from "../../resources/v1/ai-meme-generator";
|
|
|
11
11
|
import { AiQrCodeGeneratorClient } from "../../resources/v1/ai-qr-code-generator";
|
|
12
12
|
import { AiTalkingPhotoClient } from "../../resources/v1/ai-talking-photo";
|
|
13
13
|
import { AiVideoEditorClient } from "../../resources/v1/ai-video-editor";
|
|
14
|
+
import { AiVideoTranslatorClient } from "../../resources/v1/ai-video-translator";
|
|
14
15
|
import { AiVoiceClonerClient } from "../../resources/v1/ai-voice-cloner";
|
|
15
16
|
import { AiVoiceGeneratorClient } from "../../resources/v1/ai-voice-generator";
|
|
16
17
|
import { AnimationClient } from "../../resources/v1/animation";
|
|
@@ -34,6 +35,7 @@ import { TextToVideoClient } from "../../resources/v1/text-to-video";
|
|
|
34
35
|
import { VideoProjectsClient } from "../../resources/v1/video-projects";
|
|
35
36
|
import { VideoToVideoClient } from "../../resources/v1/video-to-video";
|
|
36
37
|
export declare class V1Client extends CoreResourceClient {
|
|
38
|
+
private _aiVideoTranslatorLazy?;
|
|
37
39
|
private _savedItemsLazy?;
|
|
38
40
|
private _accountLazy?;
|
|
39
41
|
private _characterReplaceLazy?;
|
|
@@ -103,4 +105,5 @@ export declare class V1Client extends CoreResourceClient {
|
|
|
103
105
|
get characterReplace(): CharacterReplaceClient;
|
|
104
106
|
get account(): AccountClient;
|
|
105
107
|
get savedItems(): SavedItemsClient;
|
|
108
|
+
get aiVideoTranslator(): AiVideoTranslatorClient;
|
|
106
109
|
}
|
|
@@ -18,6 +18,7 @@ class V1Client extends make_api_request_js_1.CoreResourceClient {
|
|
|
18
18
|
this.aiQrCodeGenerator;
|
|
19
19
|
this.aiTalkingPhoto;
|
|
20
20
|
this.aiVideoEditor;
|
|
21
|
+
this.aiVideoTranslator;
|
|
21
22
|
this.aiVoiceCloner;
|
|
22
23
|
this.aiVoiceGenerator;
|
|
23
24
|
this.animation;
|
|
@@ -204,5 +205,10 @@ class V1Client extends make_api_request_js_1.CoreResourceClient {
|
|
|
204
205
|
var _a;
|
|
205
206
|
return ((_a = this._savedItemsLazy) !== null && _a !== void 0 ? _a : (this._savedItemsLazy = new (require("./saved-items").SavedItemsClient)(this._client, this._opts)));
|
|
206
207
|
}
|
|
208
|
+
get aiVideoTranslator() {
|
|
209
|
+
var _a;
|
|
210
|
+
return ((_a = this._aiVideoTranslatorLazy) !== null && _a !== void 0 ? _a : (this._aiVideoTranslatorLazy =
|
|
211
|
+
new (require("./ai-video-translator").AiVideoTranslatorClient)(this._client, this._opts)));
|
|
212
|
+
}
|
|
207
213
|
}
|
|
208
214
|
exports.V1Client = V1Client;
|