magic-hour 0.80.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 CHANGED
@@ -263,6 +263,7 @@ Valid values are: `none`, `error`, `warn`, `info`, `debug` (case insensitive). I
263
263
  ### [v1.aiVideoTranslator](src/resources/v1/ai-video-translator/README.md)
264
264
 
265
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
266
267
 
267
268
  ### [v1.aiVoiceCloner](src/resources/v1/ai-voice-cloner/README.md)
268
269
 
@@ -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.84.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.84.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
  /**
@@ -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",
@@ -104,6 +104,7 @@ export { V1BodySwapCreateBodyResolutionEnum } from "./v1-body-swap-create-body-r
104
104
  export { V1BodySwapCreateResponse } from "./v1-body-swap-create-response";
105
105
  export { V1CharacterReplaceCreateBody } from "./v1-character-replace-create-body";
106
106
  export { V1CharacterReplaceCreateBodyAssets } from "./v1-character-replace-create-body-assets";
107
+ export { V1CharacterReplaceCreateBodyModelEnum } from "./v1-character-replace-create-body-model-enum";
107
108
  export { V1CharacterReplaceCreateBodyResolutionEnum } from "./v1-character-replace-create-body-resolution-enum";
108
109
  export { V1CharacterReplaceCreateBodyStyle } from "./v1-character-replace-create-body-style";
109
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: 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,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";
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,4 +1,4 @@
1
1
  /**
2
- * Output video resolution. Defaults to 480p, the lowest resolution available on your plan.
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. Defaults to `auto`.
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. Defaults to `auto`.
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 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 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",
@@ -70,7 +70,7 @@ export type V1VideoProjectsGetResponse = {
70
70
  */
71
71
  totalFrameCost: number;
72
72
  /**
73
- * The type of the video project. Possible values are ANIMATION, AUTO_SUBTITLE, VIDEO_TO_VIDEO, FACE_SWAP, TEXT_TO_VIDEO, IMAGE_TO_VIDEO, LIP_SYNC, TALKING_PHOTO, AVATAR, VIDEO_UPSCALER, VIDEO_EDITOR, CHARACTER_REPLACE, VIDEO_COLORIZER, VIDEO_COLOR_GRADER, VIDEO_TRANSLATOR, MUSIC_VIDEO, EXTEND, AUDIO_TO_VIDEO, VIDEO_EXPANDER, UGC_AD
73
+ * The type of the video project. Possible values are ANIMATION, AUTO_SUBTITLE, VIDEO_TO_VIDEO, FACE_SWAP, TEXT_TO_VIDEO, IMAGE_TO_VIDEO, LIP_SYNC, TALKING_PHOTO, AVATAR, VIDEO_UPSCALER, VIDEO_EDITOR, CHARACTER_REPLACE, VIDEO_COLORIZER, VIDEO_WATERMARK_REMOVER, VIDEO_COLOR_GRADER, VIDEO_TRANSLATOR, MUSIC_VIDEO, EXTEND, AUDIO_TO_VIDEO, VIDEO_EXPANDER, UGC_AD
74
74
  */
75
75
  type: string;
76
76
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "magic-hour",
3
- "version": "0.80.0",
3
+ "version": "0.81.0",
4
4
  "main": "./dist/index.js",
5
5
  "types": "./dist/index.d.ts",
6
6
  "exports": {