magic-hour 0.78.0 → 0.79.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 (29) hide show
  1. package/dist/environment.d.ts +1 -1
  2. package/dist/environment.js +1 -1
  3. package/dist/resources/v1/ai-video-editor/request-types.d.ts +5 -5
  4. package/dist/resources/v1/ai-video-editor/request-types.js +6 -2
  5. package/dist/resources/v1/image-to-video/request-types.d.ts +9 -13
  6. package/dist/resources/v1/text-to-video/request-types.d.ts +12 -14
  7. package/dist/resources/v1/text-to-video/request-types.js +9 -0
  8. package/dist/types/index.d.ts +1 -0
  9. package/dist/types/v1-ai-video-editor-create-body-model-enum.d.ts +2 -2
  10. package/dist/types/v1-ai-video-editor-create-body-resolution-enum.d.ts +1 -1
  11. package/dist/types/v1-ai-video-editor-create-body.d.ts +5 -5
  12. package/dist/types/v1-ai-video-editor-create-body.js +6 -2
  13. package/dist/types/v1-ai-voice-generator-create-body-style-voice-name-enum.d.ts +2 -2
  14. package/dist/types/v1-ai-voice-generator-create-body-style.d.ts +3 -3
  15. package/dist/types/v1-ai-voice-generator-create-body-style.js +0 -2
  16. package/dist/types/v1-image-to-video-create-body-assets.d.ts +1 -2
  17. package/dist/types/v1-image-to-video-create-body-model-enum.d.ts +0 -1
  18. package/dist/types/v1-image-to-video-create-body-resolution-enum.d.ts +1 -2
  19. package/dist/types/v1-image-to-video-create-body.d.ts +9 -13
  20. package/dist/types/v1-lip-sync-create-body-style-generation-mode-enum.d.ts +1 -1
  21. package/dist/types/v1-lip-sync-create-body-style.d.ts +1 -1
  22. package/dist/types/v1-text-to-video-create-body-aspect-ratio-enum.d.ts +0 -1
  23. package/dist/types/v1-text-to-video-create-body-model-enum.d.ts +0 -1
  24. package/dist/types/v1-text-to-video-create-body-references-item.d.ts +21 -0
  25. package/dist/types/v1-text-to-video-create-body-references-item.js +71 -0
  26. package/dist/types/v1-text-to-video-create-body-resolution-enum.d.ts +1 -2
  27. package/dist/types/v1-text-to-video-create-body.d.ts +12 -14
  28. package/dist/types/v1-text-to-video-create-body.js +9 -0
  29. package/package.json +1 -1
@@ -0,0 +1,71 @@
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$V1TextToVideoCreateBodyReferencesItem = 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 V1TextToVideoCreateBodyReferencesItem
41
+ */
42
+ const SchemaIn$V1TextToVideoCreateBodyReferencesItem = z
43
+ .object({
44
+ file_path: z.string(),
45
+ name: z.string(),
46
+ })
47
+ .transform((obj) => {
48
+ return (0, make_api_request_js_1.zodTransform)(obj, {
49
+ file_path: "filePath",
50
+ name: "name",
51
+ });
52
+ });
53
+ /**
54
+ * @internal
55
+ * Takes typescript data, validates it, and maps keys to match the expected external object External$V1TextToVideoCreateBodyReferencesItem
56
+ */
57
+ const SchemaOut$V1TextToVideoCreateBodyReferencesItem = z
58
+ .object({
59
+ filePath: z.string(),
60
+ name: z.string(),
61
+ })
62
+ .transform((obj) => {
63
+ return (0, make_api_request_js_1.zodTransform)(obj, {
64
+ filePath: "file_path",
65
+ name: "name",
66
+ });
67
+ });
68
+ exports.Schemas$V1TextToVideoCreateBodyReferencesItem = {
69
+ in: SchemaIn$V1TextToVideoCreateBodyReferencesItem,
70
+ out: SchemaOut$V1TextToVideoCreateBodyReferencesItem,
71
+ };
@@ -4,13 +4,12 @@
4
4
  * * **`gemini-omni-1.1`**: Supports 360p, 720p, 1080p, 4k.
5
5
  * * **`kling-2.6`**: Supports 720p, 1080p.
6
6
  * * **`kling-3.0`**: Supports 720p, 1080p, 4k.
7
- * * **`ltx-2.3`**: Supports 480p, 720p, 1080p.
8
7
  * * **`ltx-2.5`**: Supports 480p, 720p, 1080p.
9
8
  * * **`minimax-h3`**: Supports 480p, 720p, 1080p.
10
9
  * * **`seedance-1.5`**: Supports 480p, 720p, 1080p.
11
10
  * * **`seedance-2.0`**: Supports 480p, 720p, 1080p, 4k.
12
11
  * * **`seedance-2.0-mini`**: Supports 480p, 720p.
13
- * * **`seedance-2.5`**: Supports 480p, 720p.
12
+ * * **`seedance-2.5`**: Supports 480p, 720p, 1080p.
14
13
  * * **`sora-2`**: Supports 720p.
15
14
  * * **`veo3.1`**: Supports 720p, 1080p.
16
15
  * * **`veo3.1-lite`**: Supports 720p, 1080p.
@@ -1,4 +1,5 @@
1
1
  import * as z from "zod";
2
+ import { External$V1TextToVideoCreateBodyReferencesItem, V1TextToVideoCreateBodyReferencesItem } from "./v1-text-to-video-create-body-references-item";
2
3
  import { External$V1TextToVideoCreateBodyStyle, V1TextToVideoCreateBodyStyle } from "./v1-text-to-video-create-body-style";
3
4
  /**
4
5
  * V1TextToVideoCreateBody
@@ -10,7 +11,6 @@ export type V1TextToVideoCreateBody = {
10
11
  * * **`gemini-omni-1.1`**: Supports 16:9, 9:16.
11
12
  * * **`kling-2.6`**: Supports 9:16, 16:9, 1:1.
12
13
  * * **`kling-3.0`**: Supports 9:16, 16:9, 1:1.
13
- * * **`ltx-2.3`**: Supports 9:16, 16:9, 1:1.
14
14
  * * **`ltx-2.5`**: Supports 9:16, 16:9, 1:1.
15
15
  * * **`minimax-h3`**: Supports 16:9, 9:16, 1:1.
16
16
  * * **`seedance-1.5`**: Supports 9:16, 16:9, 1:1.
@@ -32,7 +32,6 @@ export type V1TextToVideoCreateBody = {
32
32
  * * **`gemini-omni-1.1`**: Not supported
33
33
  * * **`kling-2.6`**: Not supported
34
34
  * * **`kling-3.0`**: Toggle-able: audio adds extra credits when enabled
35
- * * **`ltx-2.3`**: Toggle-able: no additional credits for audio
36
35
  * * **`ltx-2.5`**: Toggle-able: no additional credits for audio
37
36
  * * **`minimax-h3`**: Toggle-able: no additional credits for audio
38
37
  * * **`seedance-1.5`**: Toggle-able: audio adds extra credits when enabled
@@ -50,16 +49,15 @@ export type V1TextToVideoCreateBody = {
50
49
  /**
51
50
  * The total duration of the output video in seconds. Supported durations depend on the chosen model:
52
51
  *
53
- * * **`gemini-omni-1.1`**: 3, 4, 5, 6, 7, 8, 9, 10
52
+ * * **`gemini-omni-1.1`**: any integer from 3 to 10
54
53
  * * **`kling-2.6`**: 5, 10
55
- * * **`kling-3.0`**: 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15
56
- * * **`ltx-2.3`**: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 15, 20, 25, 30
57
- * * **`ltx-2.5`**: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 15, 20, 25, 30, 35, 40, 45, 50, 55, 60
58
- * * **`minimax-h3`**: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 15, 20, 25, 30
59
- * * **`seedance-1.5`**: 4, 5, 6, 7, 8, 9, 10, 11, 12
60
- * * **`seedance-2.0`**: 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15
61
- * * **`seedance-2.0-mini`**: 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15
62
- * * **`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
54
+ * * **`kling-3.0`**: any integer from 3 to 15
55
+ * * **`ltx-2.5`**: any integer from 1 to 60
56
+ * * **`minimax-h3`**: any integer from 1 to 30
57
+ * * **`seedance-1.5`**: any integer from 4 to 12
58
+ * * **`seedance-2.0`**: any integer from 4 to 15
59
+ * * **`seedance-2.0-mini`**: any integer from 4 to 15
60
+ * * **`seedance-2.5`**: any integer from 4 to 30
63
61
  * * **`sora-2`**: 4, 8, 12, 24, 36, 48, 60
64
62
  * * **`veo3.1`**: 4, 6, 8, 16, 24, 32, 40, 48, 56
65
63
  * * **`veo3.1-lite`**: 4, 6, 8, 16, 24, 32, 40, 48, 56
@@ -75,7 +73,6 @@ export type V1TextToVideoCreateBody = {
75
73
  * * `gemini-omni-1.1`: Best for precise short clips, first/last frames, and high-resolution output.
76
74
  * * `kling-2.6`: Best for action, motion blur, and controlled camera moves.
77
75
  * * `kling-3.0`: Best for cinematic stories, references, and optional audio.
78
- * * `ltx-2.3`: Fastest for general scenes, long clips, audio, and rapid iteration.
79
76
  * * `ltx-2.5`: Fastest for general scenes, long clips, audio, and rapid iteration.
80
77
  * * `minimax-h3`: Great for reference-driven clips with native audio and longer durations.
81
78
  * * `seedance-1.5`: Best for smooth, consistent motion with an end frame.
@@ -99,19 +96,19 @@ export type V1TextToVideoCreateBody = {
99
96
  * Deprecated. Use `aspect_ratio` instead.
100
97
  */
101
98
  orientation?: ("landscape" | "portrait" | "square") | undefined;
99
+ references?: V1TextToVideoCreateBodyReferencesItem[] | undefined;
102
100
  /**
103
101
  * Controls the output video resolution. Defaults to `720p` on paid tiers and `480p` on free tiers.
104
102
  *
105
103
  * * **`gemini-omni-1.1`**: Supports 360p, 720p, 1080p, 4k.
106
104
  * * **`kling-2.6`**: Supports 720p, 1080p.
107
105
  * * **`kling-3.0`**: Supports 720p, 1080p, 4k.
108
- * * **`ltx-2.3`**: Supports 480p, 720p, 1080p.
109
106
  * * **`ltx-2.5`**: Supports 480p, 720p, 1080p.
110
107
  * * **`minimax-h3`**: Supports 480p, 720p, 1080p.
111
108
  * * **`seedance-1.5`**: Supports 480p, 720p, 1080p.
112
109
  * * **`seedance-2.0`**: Supports 480p, 720p, 1080p, 4k.
113
110
  * * **`seedance-2.0-mini`**: Supports 480p, 720p.
114
- * * **`seedance-2.5`**: Supports 480p, 720p.
111
+ * * **`seedance-2.5`**: Supports 480p, 720p, 1080p.
115
112
  * * **`sora-2`**: Supports 720p.
116
113
  * * **`veo3.1`**: Supports 720p, 1080p.
117
114
  * * **`veo3.1-lite`**: Supports 720p, 1080p.
@@ -134,6 +131,7 @@ export type External$V1TextToVideoCreateBody = {
134
131
  model?: ("default" | "gemini-omni-1.1" | "kling-1.6" | "kling-2.5" | "kling-2.5-audio" | "kling-2.6" | "kling-3.0" | "ltx-2" | "ltx-2.3" | "ltx-2.5" | "minimax-h3" | "seedance" | "seedance-1.5" | "seedance-2.0" | "seedance-2.0-mini" | "seedance-2.5" | "sora-2" | "veo3.1" | "veo3.1-audio" | "veo3.1-lite" | "wan-2.2" | "wan-3.0") | undefined;
135
132
  name?: string | undefined;
136
133
  orientation?: ("landscape" | "portrait" | "square") | undefined;
134
+ references?: External$V1TextToVideoCreateBodyReferencesItem[] | undefined;
137
135
  resolution?: ("1080p" | "360p" | "480p" | "4k" | "720p") | undefined;
138
136
  style: External$V1TextToVideoCreateBodyStyle;
139
137
  };
@@ -36,6 +36,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
36
36
  exports.Schemas$V1TextToVideoCreateBody = void 0;
37
37
  const make_api_request_js_1 = require("make-api-request-js");
38
38
  const z = __importStar(require("zod"));
39
+ const v1_text_to_video_create_body_references_item_1 = require("./v1-text-to-video-create-body-references-item");
39
40
  const v1_text_to_video_create_body_style_1 = require("./v1-text-to-video-create-body-style");
40
41
  /**
41
42
  * Takes network data, validates it, and transforms keys to match typescript object V1TextToVideoCreateBody
@@ -73,6 +74,9 @@ const SchemaIn$V1TextToVideoCreateBody = z
73
74
  .optional(),
74
75
  name: z.string().optional(),
75
76
  orientation: z.enum(["landscape", "portrait", "square"]).optional(),
77
+ references: z
78
+ .array(v1_text_to_video_create_body_references_item_1.Schemas$V1TextToVideoCreateBodyReferencesItem.in)
79
+ .optional(),
76
80
  resolution: z.enum(["1080p", "360p", "480p", "4k", "720p"]).optional(),
77
81
  style: v1_text_to_video_create_body_style_1.Schemas$V1TextToVideoCreateBodyStyle.in,
78
82
  })
@@ -84,6 +88,7 @@ const SchemaIn$V1TextToVideoCreateBody = z
84
88
  model: "model",
85
89
  name: "name",
86
90
  orientation: "orientation",
91
+ references: "references",
87
92
  resolution: "resolution",
88
93
  style: "style",
89
94
  });
@@ -125,6 +130,9 @@ const SchemaOut$V1TextToVideoCreateBody = z
125
130
  .optional(),
126
131
  name: z.string().optional(),
127
132
  orientation: z.enum(["landscape", "portrait", "square"]).optional(),
133
+ references: z
134
+ .array(v1_text_to_video_create_body_references_item_1.Schemas$V1TextToVideoCreateBodyReferencesItem.out)
135
+ .optional(),
128
136
  resolution: z.enum(["1080p", "360p", "480p", "4k", "720p"]).optional(),
129
137
  style: v1_text_to_video_create_body_style_1.Schemas$V1TextToVideoCreateBodyStyle.out,
130
138
  })
@@ -136,6 +144,7 @@ const SchemaOut$V1TextToVideoCreateBody = z
136
144
  model: "model",
137
145
  name: "name",
138
146
  orientation: "orientation",
147
+ references: "references",
139
148
  resolution: "resolution",
140
149
  style: "style",
141
150
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "magic-hour",
3
- "version": "0.78.0",
3
+ "version": "0.79.0",
4
4
  "main": "./dist/index.js",
5
5
  "types": "./dist/index.d.ts",
6
6
  "exports": {