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.
Files changed (51) hide show
  1. package/README.md +5 -0
  2. package/dist/environment.d.ts +1 -1
  3. package/dist/environment.js +1 -1
  4. package/dist/resources/v1/ai-video-editor/request-types.d.ts +1 -1
  5. package/dist/resources/v1/ai-video-translator/index.d.ts +2 -0
  6. package/dist/resources/v1/ai-video-translator/index.js +5 -0
  7. package/dist/resources/v1/ai-video-translator/request-types.d.ts +48 -0
  8. package/dist/resources/v1/ai-video-translator/request-types.js +196 -0
  9. package/dist/resources/v1/ai-video-translator/resource-client.d.ts +43 -0
  10. package/dist/resources/v1/ai-video-translator/resource-client.js +84 -0
  11. package/dist/resources/v1/character-replace/request-types.d.ts +11 -3
  12. package/dist/resources/v1/character-replace/request-types.js +6 -2
  13. package/dist/resources/v1/image-to-video/request-types.d.ts +1 -5
  14. package/dist/resources/v1/index.d.ts +1 -0
  15. package/dist/resources/v1/index.js +2 -1
  16. package/dist/resources/v1/resource-client.d.ts +3 -0
  17. package/dist/resources/v1/resource-client.js +6 -0
  18. package/dist/resources/v1/text-to-video/request-types.d.ts +0 -5
  19. package/dist/types/index.d.ts +6 -0
  20. package/dist/types/v1-ai-video-editor-create-body.d.ts +1 -1
  21. package/dist/types/v1-ai-video-translator-create-body-assets.d.ts +27 -0
  22. package/dist/types/v1-ai-video-translator-create-body-assets.js +67 -0
  23. package/dist/types/v1-ai-video-translator-create-body-resolution-enum.d.ts +4 -0
  24. package/dist/types/v1-ai-video-translator-create-body-resolution-enum.js +2 -0
  25. package/dist/types/v1-ai-video-translator-create-body-target-language-enum.d.ts +4 -0
  26. package/dist/types/v1-ai-video-translator-create-body-target-language-enum.js +2 -0
  27. package/dist/types/v1-ai-video-translator-create-body.d.ts +48 -0
  28. package/dist/types/v1-ai-video-translator-create-body.js +196 -0
  29. package/dist/types/v1-ai-video-translator-create-response.d.ts +36 -0
  30. package/dist/types/v1-ai-video-translator-create-response.js +75 -0
  31. package/dist/types/v1-character-replace-create-body-model-enum.d.ts +7 -0
  32. package/dist/types/v1-character-replace-create-body-model-enum.js +2 -0
  33. package/dist/types/v1-character-replace-create-body-resolution-enum.d.ts +2 -2
  34. package/dist/types/v1-character-replace-create-body-style-selection-mode-enum.d.ts +1 -1
  35. package/dist/types/v1-character-replace-create-body-style.d.ts +2 -2
  36. package/dist/types/v1-character-replace-create-body.d.ts +11 -3
  37. package/dist/types/v1-character-replace-create-body.js +6 -2
  38. package/dist/types/v1-face-swap-create-body-assets-face-swap-mode-enum.d.ts +2 -2
  39. package/dist/types/v1-face-swap-create-body-assets.d.ts +2 -2
  40. package/dist/types/v1-face-swap-photo-create-body-assets-face-swap-mode-enum.d.ts +2 -2
  41. package/dist/types/v1-face-swap-photo-create-body-assets.d.ts +2 -2
  42. package/dist/types/v1-image-to-video-create-body-assets.d.ts +1 -2
  43. package/dist/types/v1-image-to-video-create-body-model-enum.d.ts +0 -1
  44. package/dist/types/v1-image-to-video-create-body-resolution-enum.d.ts +0 -1
  45. package/dist/types/v1-image-to-video-create-body.d.ts +1 -5
  46. package/dist/types/v1-text-to-video-create-body-aspect-ratio-enum.d.ts +0 -1
  47. package/dist/types/v1-text-to-video-create-body-model-enum.d.ts +0 -1
  48. package/dist/types/v1-text-to-video-create-body-resolution-enum.d.ts +0 -1
  49. package/dist/types/v1-text-to-video-create-body.d.ts +0 -5
  50. package/dist/types/v1-video-projects-get-response.d.ts +1 -1
  51. package/package.json +1 -1
package/README.md CHANGED
@@ -260,6 +260,11 @@ 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
+ - [generate](src/resources/v1/ai-video-translator/README.md#generate) - Generate video translation
267
+
263
268
  ### [v1.aiVoiceCloner](src/resources/v1/ai-voice-cloner/README.md)
264
269
 
265
270
  - [create](src/resources/v1/ai-voice-cloner/README.md#create) - AI Voice Cloner
@@ -1,4 +1,4 @@
1
1
  export declare enum Environment {
2
2
  Environment = "https://api.magichour.ai",
3
- MockServer = "https://api.sideko.dev/v1/mock/magichour/magic-hour/0.83.0"
3
+ MockServer = "https://api.sideko.dev/v1/mock/magichour/magic-hour/0.85.0"
4
4
  }
@@ -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.83.0";
7
+ Environment["MockServer"] = "https://api.sideko.dev/v1/mock/magichour/magic-hour/0.85.0";
8
8
  })(Environment || (exports.Environment = Environment = {}));
@@ -10,7 +10,7 @@ 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, LTX 2.5: 0.5s. Maximum duration depends on model: `gemini-omni-1.1`: 10s, LTX 2.5: 45s.
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,2 @@
1
+ export { CreateRequest } from "./request-types";
2
+ export { AiVideoTranslatorClient } from "./resource-client";
@@ -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;
@@ -13,14 +13,21 @@ export type CreateRequest = {
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 480p, the lowest resolution available on your plan.
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 CreateRequest = {
38
45
  export type External$CreateRequest = {
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$CreateRequest = 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$CreateRequest = 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$CreateRequest = 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$CreateRequest = 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",
@@ -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. Sora 2 only supports images with an aspect ratio of `9:16` or `16:9`.
9
+ * Provide the assets for image-to-video.
10
10
  */
11
11
  assets: V1ImageToVideoCreateBodyAssets;
12
12
  /**
@@ -22,7 +22,6 @@ export type CreateRequest = {
22
22
  * * **`seedance-2.0`**: Toggle-able: no additional credits for audio
23
23
  * * **`seedance-2.0-mini`**: Toggle-able: no additional credits for audio
24
24
  * * **`seedance-2.5`**: Toggle-able: no additional credits for audio
25
- * * **`sora-2`**: Toggle-able: no additional credits for audio
26
25
  * * **`veo3.1`**: Toggle-able: audio adds extra credits when enabled
27
26
  * * **`veo3.1-lite`**: Toggle-able: audio adds extra credits when enabled
28
27
  * * **`wan-2.2`**: Not supported
@@ -42,7 +41,6 @@ export type CreateRequest = {
42
41
  * * **`seedance-2.0`**: any integer from 4 to 15
43
42
  * * **`seedance-2.0-mini`**: any integer from 4 to 15
44
43
  * * **`seedance-2.5`**: any integer from 4 to 30
45
- * * **`sora-2`**: 4, 8, 12, 24, 36, 48, 60
46
44
  * * **`veo3.1`**: 4, 6, 8, 16, 24, 32, 40, 48, 56
47
45
  * * **`veo3.1-lite`**: 4, 6, 8, 16, 24, 32, 40, 48, 56
48
46
  * * **`wan-2.2`**: 3, 4, 5, 6, 7, 8, 9, 10, 15
@@ -69,7 +67,6 @@ export type CreateRequest = {
69
67
  * * `seedance-2.0`: Best for reference-led clips with precise subject control.
70
68
  * * `seedance-2.0-mini`: Faster reference-led clips with consistent motion and audio.
71
69
  * * `seedance-2.5`: Best for premium realism, detail, and natural motion.
72
- * * `sora-2`: Best for creative concepts and longer clips with audio.
73
70
  * * `veo3.1`: Best for romantic interactions and expressive action, with realistic detail.
74
71
  * * `veo3.1-lite`: Balanced realism and audio at a lower cost than Veo 3.1.
75
72
  * * `wan-2.2`: Best for physical motion, action, and camera movement.
@@ -94,7 +91,6 @@ export type CreateRequest = {
94
91
  * * **`seedance-2.0`**: Supports 480p, 720p, 1080p, 4k.
95
92
  * * **`seedance-2.0-mini`**: Supports 480p, 720p.
96
93
  * * **`seedance-2.5`**: Supports 480p, 720p, 1080p.
97
- * * **`sora-2`**: Supports 720p.
98
94
  * * **`veo3.1`**: Supports 720p, 1080p.
99
95
  * * **`veo3.1-lite`**: Supports 720p, 1080p.
100
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;
@@ -17,7 +17,6 @@ export type CreateRequest = {
17
17
  * * **`seedance-2.0`**: Supports 9:16, 16:9, 1:1.
18
18
  * * **`seedance-2.0-mini`**: Supports 9:16, 16:9, 1:1.
19
19
  * * **`seedance-2.5`**: Supports 9:16, 16:9, 1:1.
20
- * * **`sora-2`**: Supports 9:16, 16:9.
21
20
  * * **`veo3.1`**: Supports 9:16, 16:9.
22
21
  * * **`veo3.1-lite`**: Supports 9:16, 16:9.
23
22
  * * **`wan-2.2`**: Supports 9:16, 16:9, 1:1.
@@ -38,7 +37,6 @@ export type CreateRequest = {
38
37
  * * **`seedance-2.0`**: Toggle-able: no additional credits for audio
39
38
  * * **`seedance-2.0-mini`**: Toggle-able: no additional credits for audio
40
39
  * * **`seedance-2.5`**: Toggle-able: no additional credits for audio
41
- * * **`sora-2`**: Toggle-able: no additional credits for audio
42
40
  * * **`veo3.1`**: Toggle-able: audio adds extra credits when enabled
43
41
  * * **`veo3.1-lite`**: Toggle-able: audio adds extra credits when enabled
44
42
  * * **`wan-2.2`**: Not supported
@@ -58,7 +56,6 @@ export type CreateRequest = {
58
56
  * * **`seedance-2.0`**: any integer from 4 to 15
59
57
  * * **`seedance-2.0-mini`**: any integer from 4 to 15
60
58
  * * **`seedance-2.5`**: any integer from 4 to 30
61
- * * **`sora-2`**: 4, 8, 12, 24, 36, 48, 60
62
59
  * * **`veo3.1`**: 4, 6, 8, 16, 24, 32, 40, 48, 56
63
60
  * * **`veo3.1-lite`**: 4, 6, 8, 16, 24, 32, 40, 48, 56
64
61
  * * **`wan-2.2`**: 3, 4, 5, 6, 7, 8, 9, 10, 15
@@ -79,7 +76,6 @@ export type CreateRequest = {
79
76
  * * `seedance-2.0`: Best for reference-led clips with precise subject control.
80
77
  * * `seedance-2.0-mini`: Faster reference-led clips with consistent motion and audio.
81
78
  * * `seedance-2.5`: Best for premium realism, detail, and natural motion.
82
- * * `sora-2`: Best for creative concepts and longer clips with audio.
83
79
  * * `veo3.1`: Best for romantic interactions and expressive action, with realistic detail.
84
80
  * * `veo3.1-lite`: Balanced realism and audio at a lower cost than Veo 3.1.
85
81
  * * `wan-2.2`: Best for physical motion, action, and camera movement.
@@ -109,7 +105,6 @@ export type CreateRequest = {
109
105
  * * **`seedance-2.0`**: Supports 480p, 720p, 1080p, 4k.
110
106
  * * **`seedance-2.0-mini`**: Supports 480p, 720p.
111
107
  * * **`seedance-2.5`**: Supports 480p, 720p, 1080p.
112
- * * **`sora-2`**: Supports 720p.
113
108
  * * **`veo3.1`**: Supports 720p, 1080p.
114
109
  * * **`veo3.1-lite`**: Supports 720p, 1080p.
115
110
  * * **`wan-2.2`**: Supports 480p, 720p, 1080p.