magic-hour 0.83.0 → 0.84.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 (76) hide show
  1. package/README.md +27 -0
  2. package/dist/environment.d.ts +1 -1
  3. package/dist/environment.js +1 -1
  4. package/dist/helpers/download-error.d.ts +16 -0
  5. package/dist/helpers/download-error.js +15 -0
  6. package/dist/helpers/download.js +22 -2
  7. package/dist/resources/v1/ai-talking-photo/request-types.d.ts +10 -1
  8. package/dist/resources/v1/ai-talking-photo/request-types.js +4 -0
  9. package/dist/resources/v1/ai-ugc-ad/index.d.ts +2 -0
  10. package/dist/resources/v1/ai-ugc-ad/index.js +5 -0
  11. package/dist/resources/v1/ai-ugc-ad/request-types.d.ts +50 -0
  12. package/dist/resources/v1/ai-ugc-ad/request-types.js +86 -0
  13. package/dist/resources/v1/ai-ugc-ad/resource-client.d.ts +41 -0
  14. package/dist/resources/v1/ai-ugc-ad/resource-client.js +81 -0
  15. package/dist/resources/v1/ai-video-editor/resource-client.d.ts +1 -1
  16. package/dist/resources/v1/ai-video-editor/resource-client.js +1 -1
  17. package/dist/resources/v1/ai-video-translator/resource-client.d.ts +1 -1
  18. package/dist/resources/v1/ai-video-translator/resource-client.js +1 -1
  19. package/dist/resources/v1/audio-projects/resource-client.d.ts +5 -0
  20. package/dist/resources/v1/audio-projects/resource-client.js +14 -2
  21. package/dist/resources/v1/audio-to-video/resource-client.d.ts +1 -1
  22. package/dist/resources/v1/audio-to-video/resource-client.js +1 -1
  23. package/dist/resources/v1/character-replace/resource-client.d.ts +1 -1
  24. package/dist/resources/v1/character-replace/resource-client.js +1 -1
  25. package/dist/resources/v1/face-detection/resource-client.d.ts +5 -0
  26. package/dist/resources/v1/face-detection/resource-client.js +17 -5
  27. package/dist/resources/v1/face-swap/resource-client.d.ts +1 -1
  28. package/dist/resources/v1/face-swap/resource-client.js +1 -1
  29. package/dist/resources/v1/image-projects/resource-client.d.ts +5 -0
  30. package/dist/resources/v1/image-projects/resource-client.js +14 -2
  31. package/dist/resources/v1/image-to-video/request-types.d.ts +6 -2
  32. package/dist/resources/v1/image-to-video/request-types.js +2 -0
  33. package/dist/resources/v1/image-to-video/resource-client.d.ts +1 -1
  34. package/dist/resources/v1/image-to-video/resource-client.js +1 -1
  35. package/dist/resources/v1/index.d.ts +1 -0
  36. package/dist/resources/v1/index.js +2 -1
  37. package/dist/resources/v1/lip-sync/resource-client.d.ts +1 -1
  38. package/dist/resources/v1/lip-sync/resource-client.js +1 -1
  39. package/dist/resources/v1/resource-client.d.ts +3 -0
  40. package/dist/resources/v1/resource-client.js +5 -0
  41. package/dist/resources/v1/text-to-video/request-types.d.ts +22 -3
  42. package/dist/resources/v1/text-to-video/request-types.js +2 -0
  43. package/dist/resources/v1/text-to-video/resource-client.d.ts +1 -1
  44. package/dist/resources/v1/text-to-video/resource-client.js +1 -1
  45. package/dist/resources/v1/video-projects/resource-client.d.ts +5 -0
  46. package/dist/resources/v1/video-projects/resource-client.js +14 -2
  47. package/dist/resources/v1/video-to-video/resource-client.d.ts +1 -1
  48. package/dist/resources/v1/video-to-video/resource-client.js +1 -1
  49. package/dist/types/index.d.ts +6 -0
  50. package/dist/types/v1-ai-talking-photo-create-body-resolution-enum.d.ts +4 -0
  51. package/dist/types/v1-ai-talking-photo-create-body-resolution-enum.js +2 -0
  52. package/dist/types/v1-ai-talking-photo-create-body.d.ts +10 -1
  53. package/dist/types/v1-ai-talking-photo-create-body.js +4 -0
  54. package/dist/types/v1-ai-ugc-ad-create-body-assets.d.ts +29 -0
  55. package/dist/types/v1-ai-ugc-ad-create-body-assets.js +69 -0
  56. package/dist/types/v1-ai-ugc-ad-create-body-model-enum.d.ts +4 -0
  57. package/dist/types/v1-ai-ugc-ad-create-body-model-enum.js +2 -0
  58. package/dist/types/v1-ai-ugc-ad-create-body-resolution-enum.d.ts +4 -0
  59. package/dist/types/v1-ai-ugc-ad-create-body-resolution-enum.js +2 -0
  60. package/dist/types/v1-ai-ugc-ad-create-body.d.ts +50 -0
  61. package/dist/types/v1-ai-ugc-ad-create-body.js +86 -0
  62. package/dist/types/v1-ai-ugc-ad-create-response.d.ts +36 -0
  63. package/dist/types/v1-ai-ugc-ad-create-response.js +75 -0
  64. package/dist/types/v1-image-to-video-create-body-assets.d.ts +2 -1
  65. package/dist/types/v1-image-to-video-create-body-model-enum.d.ts +2 -1
  66. package/dist/types/v1-image-to-video-create-body-resolution-enum.d.ts +1 -0
  67. package/dist/types/v1-image-to-video-create-body.d.ts +6 -2
  68. package/dist/types/v1-image-to-video-create-body.js +2 -0
  69. package/dist/types/v1-text-to-video-create-body-aspect-ratio-enum.d.ts +2 -1
  70. package/dist/types/v1-text-to-video-create-body-model-enum.d.ts +2 -1
  71. package/dist/types/v1-text-to-video-create-body-resolution-enum.d.ts +1 -0
  72. package/dist/types/v1-text-to-video-create-body.d.ts +22 -3
  73. package/dist/types/v1-text-to-video-create-body.js +2 -0
  74. package/dist/types/v1-video-to-video-create-body-style-version-enum.d.ts +1 -1
  75. package/dist/types/v1-video-to-video-create-body-style.d.ts +1 -1
  76. package/package.json +4 -3
@@ -0,0 +1,69 @@
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$V1AiUgcAdCreateBodyAssets = 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 V1AiUgcAdCreateBodyAssets
41
+ */
42
+ const SchemaIn$V1AiUgcAdCreateBodyAssets = z
43
+ .object({
44
+ image_file_path: z.string(),
45
+ })
46
+ .catchall(make_api_request_js_1.zodRequiredAny)
47
+ .transform((obj) => {
48
+ return (0, make_api_request_js_1.zodTransform)(obj, {
49
+ image_file_path: "imageFilePath",
50
+ });
51
+ });
52
+ /**
53
+ * @internal
54
+ * Takes typescript data, validates it, and maps keys to match the expected external object External$V1AiUgcAdCreateBodyAssets
55
+ */
56
+ const SchemaOut$V1AiUgcAdCreateBodyAssets = z
57
+ .object({
58
+ imageFilePath: z.string(),
59
+ })
60
+ .catchall(make_api_request_js_1.zodRequiredAny)
61
+ .transform((obj) => {
62
+ return (0, make_api_request_js_1.zodTransform)(obj, {
63
+ imageFilePath: "image_file_path",
64
+ });
65
+ });
66
+ exports.Schemas$V1AiUgcAdCreateBodyAssets = {
67
+ in: SchemaIn$V1AiUgcAdCreateBodyAssets,
68
+ out: SchemaOut$V1AiUgcAdCreateBodyAssets,
69
+ };
@@ -0,0 +1,4 @@
1
+ /**
2
+ * Defaults to kling-3.0 on paid plans and ltx-2.5 on free plans.
3
+ */
4
+ export type V1AiUgcAdCreateBodyModelEnum = "kling-3.0" | "ltx-2.5" | "veo3.1";
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,4 @@
1
+ /**
2
+ * Defaults to 720p on paid plans and 480p on free plans. Unsupported model/resolution combinations and resolutions unavailable for your plan are rejected.
3
+ */
4
+ export type V1AiUgcAdCreateBodyResolutionEnum = "1080p" | "480p" | "720p";
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,50 @@
1
+ import * as z from "zod";
2
+ import { External$V1AiUgcAdCreateBodyAssets, V1AiUgcAdCreateBodyAssets } from "./v1-ai-ugc-ad-create-body-assets";
3
+ /**
4
+ * V1AiUgcAdCreateBody
5
+ */
6
+ export type V1AiUgcAdCreateBody = {
7
+ assets: V1AiUgcAdCreateBodyAssets;
8
+ /**
9
+ * Video duration in seconds. Supported values by model:
10
+ * * kling-3.0: 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 seconds.
11
+ * * ltx-2.5: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 15, 20, 25, 30, 35, 40, 45, 50, 55, 60 seconds.
12
+ * * veo3.1: 4, 6, 8, 15, 22, 29, 36, 43, 50, 57, 64, 71, 78, 85, 92, 99, 106, 113, 120, 127, 134, 141 seconds.
13
+ * Free plans are limited to 5 seconds unless a credit pack has been purchased.
14
+ */
15
+ endSeconds: number;
16
+ /**
17
+ * Defaults to kling-3.0 on paid plans and ltx-2.5 on free plans.
18
+ */
19
+ model?: ("kling-3.0" | "ltx-2.5" | "veo3.1") | undefined;
20
+ /**
21
+ * Defaults to 720p on paid plans and 480p on free plans. Unsupported model/resolution combinations and resolutions unavailable for your plan are rejected.
22
+ */
23
+ resolution?: ("1080p" | "480p" | "720p") | undefined;
24
+ /**
25
+ * The words the actor should speak. Character limits apply after trimming:
26
+ * * kling-3.0: 2500 characters.
27
+ * * ltx-2.5: 1804 characters.
28
+ * * veo3.1: 2500 characters.
29
+ * LTX's dialogue wrapper counts toward its model prompt limit.
30
+ */
31
+ script: string;
32
+ [additionalProperty: string]: V1AiUgcAdCreateBodyAssets | number | (("kling-3.0" | "ltx-2.5" | "veo3.1") | undefined) | (("1080p" | "480p" | "720p") | undefined) | string | any | null | undefined;
33
+ };
34
+ /**
35
+ * @internal
36
+ * V1AiUgcAdCreateBody without any key transformation, this is what
37
+ * we expect to come in as network data
38
+ */
39
+ export type External$V1AiUgcAdCreateBody = {
40
+ assets: External$V1AiUgcAdCreateBodyAssets;
41
+ end_seconds: number;
42
+ model?: ("kling-3.0" | "ltx-2.5" | "veo3.1") | undefined;
43
+ resolution?: ("1080p" | "480p" | "720p") | undefined;
44
+ script: string;
45
+ [additionalProperty: string]: External$V1AiUgcAdCreateBodyAssets | number | (("kling-3.0" | "ltx-2.5" | "veo3.1") | undefined) | (("1080p" | "480p" | "720p") | undefined) | string | External$V1AiUgcAdCreateBody | null | undefined;
46
+ };
47
+ export declare const Schemas$V1AiUgcAdCreateBody: {
48
+ in: z.ZodType<V1AiUgcAdCreateBody, z.ZodTypeDef, unknown>;
49
+ out: z.ZodType<External$V1AiUgcAdCreateBody, z.ZodTypeDef, V1AiUgcAdCreateBody>;
50
+ };
@@ -0,0 +1,86 @@
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$V1AiUgcAdCreateBody = void 0;
37
+ const make_api_request_js_1 = require("make-api-request-js");
38
+ const z = __importStar(require("zod"));
39
+ const v1_ai_ugc_ad_create_body_assets_1 = require("./v1-ai-ugc-ad-create-body-assets");
40
+ /**
41
+ * Takes network data, validates it, and transforms keys to match typescript object V1AiUgcAdCreateBody
42
+ */
43
+ const SchemaIn$V1AiUgcAdCreateBody = z
44
+ .object({
45
+ assets: v1_ai_ugc_ad_create_body_assets_1.Schemas$V1AiUgcAdCreateBodyAssets.in,
46
+ end_seconds: z.number(),
47
+ model: z.enum(["kling-3.0", "ltx-2.5", "veo3.1"]).optional(),
48
+ resolution: z.enum(["1080p", "480p", "720p"]).optional(),
49
+ script: z.string(),
50
+ })
51
+ .catchall(make_api_request_js_1.zodRequiredAny)
52
+ .transform((obj) => {
53
+ return (0, make_api_request_js_1.zodTransform)(obj, {
54
+ assets: "assets",
55
+ end_seconds: "endSeconds",
56
+ model: "model",
57
+ resolution: "resolution",
58
+ script: "script",
59
+ });
60
+ });
61
+ /**
62
+ * @internal
63
+ * Takes typescript data, validates it, and maps keys to match the expected external object External$V1AiUgcAdCreateBody
64
+ */
65
+ const SchemaOut$V1AiUgcAdCreateBody = z
66
+ .object({
67
+ assets: v1_ai_ugc_ad_create_body_assets_1.Schemas$V1AiUgcAdCreateBodyAssets.out,
68
+ endSeconds: z.number(),
69
+ model: z.enum(["kling-3.0", "ltx-2.5", "veo3.1"]).optional(),
70
+ resolution: z.enum(["1080p", "480p", "720p"]).optional(),
71
+ script: z.string(),
72
+ })
73
+ .catchall(make_api_request_js_1.zodRequiredAny)
74
+ .transform((obj) => {
75
+ return (0, make_api_request_js_1.zodTransform)(obj, {
76
+ assets: "assets",
77
+ endSeconds: "end_seconds",
78
+ model: "model",
79
+ resolution: "resolution",
80
+ script: "script",
81
+ });
82
+ });
83
+ exports.Schemas$V1AiUgcAdCreateBody = {
84
+ in: SchemaIn$V1AiUgcAdCreateBody,
85
+ out: SchemaOut$V1AiUgcAdCreateBody,
86
+ };
@@ -0,0 +1,36 @@
1
+ import * as z from "zod";
2
+ /**
3
+ * Success
4
+ */
5
+ export type V1AiUgcAdCreateResponse = {
6
+ /**
7
+ * The amount of credits deducted from your account to generate the video. If the status is not 'complete', this value is an estimate and may be adjusted upon completion based on the actual FPS of the output video.
8
+ *
9
+ * If video generation fails, credits will be refunded, and this field will be updated to include the refund.
10
+ */
11
+ creditsCharged: number;
12
+ /**
13
+ * Deprecated: Previously represented the number of frames (original name of our credit system) used for video generation. Use 'credits_charged' instead.
14
+ *
15
+ * The amount of frames used to generate the video. If the status is not 'complete', the cost is an estimate and will be adjusted when the video completes.
16
+ */
17
+ estimatedFrameCost: number;
18
+ /**
19
+ * Unique ID of the video. Use it with the [Get video Project API](https://docs.magichour.ai/api-reference/video-projects/get-video-details) to fetch status and downloads.
20
+ */
21
+ id: string;
22
+ };
23
+ /**
24
+ * @internal
25
+ * V1AiUgcAdCreateResponse without any key transformation, this is what
26
+ * we expect to come in as network data
27
+ */
28
+ export type External$V1AiUgcAdCreateResponse = {
29
+ credits_charged: number;
30
+ estimated_frame_cost: number;
31
+ id: string;
32
+ };
33
+ export declare const Schemas$V1AiUgcAdCreateResponse: {
34
+ in: z.ZodType<V1AiUgcAdCreateResponse, z.ZodTypeDef, unknown>;
35
+ out: z.ZodType<External$V1AiUgcAdCreateResponse, z.ZodTypeDef, V1AiUgcAdCreateResponse>;
36
+ };
@@ -0,0 +1,75 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || (function () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
24
+ };
25
+ return ownKeys(o);
26
+ };
27
+ return function (mod) {
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
33
+ };
34
+ })();
35
+ Object.defineProperty(exports, "__esModule", { value: true });
36
+ exports.Schemas$V1AiUgcAdCreateResponse = 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 V1AiUgcAdCreateResponse
41
+ */
42
+ const SchemaIn$V1AiUgcAdCreateResponse = z
43
+ .object({
44
+ credits_charged: z.number().int(),
45
+ estimated_frame_cost: z.number().int(),
46
+ id: z.string(),
47
+ })
48
+ .transform((obj) => {
49
+ return (0, make_api_request_js_1.zodTransform)(obj, {
50
+ credits_charged: "creditsCharged",
51
+ estimated_frame_cost: "estimatedFrameCost",
52
+ id: "id",
53
+ });
54
+ });
55
+ /**
56
+ * @internal
57
+ * Takes typescript data, validates it, and maps keys to match the expected external object External$V1AiUgcAdCreateResponse
58
+ */
59
+ const SchemaOut$V1AiUgcAdCreateResponse = z
60
+ .object({
61
+ creditsCharged: z.number().int(),
62
+ estimatedFrameCost: z.number().int(),
63
+ id: z.string(),
64
+ })
65
+ .transform((obj) => {
66
+ return (0, make_api_request_js_1.zodTransform)(obj, {
67
+ creditsCharged: "credits_charged",
68
+ estimatedFrameCost: "estimated_frame_cost",
69
+ id: "id",
70
+ });
71
+ });
72
+ exports.Schemas$V1AiUgcAdCreateResponse = {
73
+ in: SchemaIn$V1AiUgcAdCreateResponse,
74
+ out: SchemaOut$V1AiUgcAdCreateResponse,
75
+ };
@@ -10,9 +10,10 @@ export type V1ImageToVideoCreateBodyAssets = {
10
10
  * * **`kling-2.6`**: Supports 1080p.
11
11
  * * **`kling-3.0`**: Supports 720p, 1080p, 4k.
12
12
  * * **`ltx-2.5`**: Supports 480p, 720p, 1080p.
13
- * * **`minimax-h3`**: Not supported
13
+ * * **`minimax-h3`**: Supports 480p, 720p, 1080p.
14
14
  * * **`seedance-1.5`**: Supports 480p, 720p, 1080p.
15
15
  * * **`seedance-2.0`**: Supports 480p, 720p, 1080p, 4k.
16
+ * * **`seedance-2.0-fast`**: Supports 480p, 720p.
16
17
  * * **`seedance-2.0-mini`**: Supports 480p, 720p.
17
18
  * * **`seedance-2.5`**: Supports 480p, 720p, 1080p.
18
19
  * * **`veo3.1`**: Supports 720p, 1080p. Requires a duration of 8 seconds or less.
@@ -9,6 +9,7 @@
9
9
  * * `minimax-h3`: Great for reference-driven clips with native audio and longer durations.
10
10
  * * `seedance-1.5`: Best for smooth, consistent motion with an end frame.
11
11
  * * `seedance-2.0`: Best for reference-led clips with precise subject control.
12
+ * * `seedance-2.0-fast`: Fast reference-led clips with consistent motion and audio.
12
13
  * * `seedance-2.0-mini`: Faster reference-led clips with consistent motion and audio.
13
14
  * * `seedance-2.5`: Best for premium realism, detail, and natural motion.
14
15
  * * `veo3.1`: Best for romantic interactions and expressive action, with realistic detail.
@@ -18,4 +19,4 @@
18
19
  *
19
20
  * If you specify the deprecated model value that includes the `-audio` suffix, this will be the same as included `audio` as `true`.
20
21
  */
21
- export type V1ImageToVideoCreateBodyModelEnum = "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";
22
+ export type V1ImageToVideoCreateBodyModelEnum = "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-fast" | "seedance-2.0-mini" | "seedance-2.5" | "sora-2" | "veo3.1" | "veo3.1-audio" | "veo3.1-lite" | "wan-2.2" | "wan-3.0";
@@ -8,6 +8,7 @@
8
8
  * * **`minimax-h3`**: Supports 480p, 720p, 1080p.
9
9
  * * **`seedance-1.5`**: Supports 480p, 720p, 1080p.
10
10
  * * **`seedance-2.0`**: Supports 480p, 720p, 1080p, 4k.
11
+ * * **`seedance-2.0-fast`**: Supports 480p, 720p.
11
12
  * * **`seedance-2.0-mini`**: Supports 480p, 720p.
12
13
  * * **`seedance-2.5`**: Supports 480p, 720p, 1080p.
13
14
  * * **`veo3.1`**: Supports 720p, 1080p.
@@ -20,6 +20,7 @@ export type V1ImageToVideoCreateBody = {
20
20
  * * **`minimax-h3`**: Toggle-able: no additional credits for audio
21
21
  * * **`seedance-1.5`**: Toggle-able: audio adds extra credits when enabled
22
22
  * * **`seedance-2.0`**: Toggle-able: no additional credits for audio
23
+ * * **`seedance-2.0-fast`**: Toggle-able: no additional credits for audio
23
24
  * * **`seedance-2.0-mini`**: Toggle-able: no additional credits for audio
24
25
  * * **`seedance-2.5`**: Toggle-able: no additional credits for audio
25
26
  * * **`veo3.1`**: Toggle-able: audio adds extra credits when enabled
@@ -39,6 +40,7 @@ export type V1ImageToVideoCreateBody = {
39
40
  * * **`minimax-h3`**: any integer from 1 to 30
40
41
  * * **`seedance-1.5`**: any integer from 4 to 12
41
42
  * * **`seedance-2.0`**: any integer from 4 to 15
43
+ * * **`seedance-2.0-fast`**: any integer from 4 to 15
42
44
  * * **`seedance-2.0-mini`**: any integer from 4 to 15
43
45
  * * **`seedance-2.5`**: any integer from 4 to 30
44
46
  * * **`veo3.1`**: 4, 6, 8, 16, 24, 32, 40, 48, 56
@@ -65,6 +67,7 @@ export type V1ImageToVideoCreateBody = {
65
67
  * * `minimax-h3`: Great for reference-driven clips with native audio and longer durations.
66
68
  * * `seedance-1.5`: Best for smooth, consistent motion with an end frame.
67
69
  * * `seedance-2.0`: Best for reference-led clips with precise subject control.
70
+ * * `seedance-2.0-fast`: Fast reference-led clips with consistent motion and audio.
68
71
  * * `seedance-2.0-mini`: Faster reference-led clips with consistent motion and audio.
69
72
  * * `seedance-2.5`: Best for premium realism, detail, and natural motion.
70
73
  * * `veo3.1`: Best for romantic interactions and expressive action, with realistic detail.
@@ -74,7 +77,7 @@ export type V1ImageToVideoCreateBody = {
74
77
  *
75
78
  * If you specify the deprecated model value that includes the `-audio` suffix, this will be the same as included `audio` as `true`.
76
79
  */
77
- 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;
80
+ 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-fast" | "seedance-2.0-mini" | "seedance-2.5" | "sora-2" | "veo3.1" | "veo3.1-audio" | "veo3.1-lite" | "wan-2.2" | "wan-3.0") | undefined;
78
81
  /**
79
82
  * Give your video a custom name for easy identification.
80
83
  */
@@ -89,6 +92,7 @@ export type V1ImageToVideoCreateBody = {
89
92
  * * **`minimax-h3`**: Supports 480p, 720p, 1080p.
90
93
  * * **`seedance-1.5`**: Supports 480p, 720p, 1080p.
91
94
  * * **`seedance-2.0`**: Supports 480p, 720p, 1080p, 4k.
95
+ * * **`seedance-2.0-fast`**: Supports 480p, 720p.
92
96
  * * **`seedance-2.0-mini`**: Supports 480p, 720p.
93
97
  * * **`seedance-2.5`**: Supports 480p, 720p, 1080p.
94
98
  * * **`veo3.1`**: Supports 720p, 1080p.
@@ -119,7 +123,7 @@ export type External$V1ImageToVideoCreateBody = {
119
123
  audio?: boolean | undefined;
120
124
  end_seconds: number;
121
125
  height?: number | null | undefined;
122
- 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;
126
+ 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-fast" | "seedance-2.0-mini" | "seedance-2.5" | "sora-2" | "veo3.1" | "veo3.1-audio" | "veo3.1-lite" | "wan-2.2" | "wan-3.0") | undefined;
123
127
  name?: string | undefined;
124
128
  resolution?: ("1080p" | "360p" | "480p" | "4k" | "720p") | undefined;
125
129
  style?: External$V1ImageToVideoCreateBodyStyle | undefined;
@@ -63,6 +63,7 @@ const SchemaIn$V1ImageToVideoCreateBody = z
63
63
  "seedance",
64
64
  "seedance-1.5",
65
65
  "seedance-2.0",
66
+ "seedance-2.0-fast",
66
67
  "seedance-2.0-mini",
67
68
  "seedance-2.5",
68
69
  "sora-2",
@@ -117,6 +118,7 @@ const SchemaOut$V1ImageToVideoCreateBody = z
117
118
  "seedance",
118
119
  "seedance-1.5",
119
120
  "seedance-2.0",
121
+ "seedance-2.0-fast",
120
122
  "seedance-2.0-mini",
121
123
  "seedance-2.5",
122
124
  "sora-2",
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Determines the aspect ratio of the output video.
2
+ * Provide `aspect_ratio` to set the video’s aspect ratio. Determines the aspect ratio of the output video.
3
3
  *
4
4
  * * **`gemini-omni-1.1`**: Supports 16:9, 9:16.
5
5
  * * **`kling-2.6`**: Supports 9:16, 16:9, 1:1.
@@ -8,6 +8,7 @@
8
8
  * * **`minimax-h3`**: Supports 16:9, 9:16, 1:1.
9
9
  * * **`seedance-1.5`**: Supports 9:16, 16:9, 1:1.
10
10
  * * **`seedance-2.0`**: Supports 9:16, 16:9, 1:1.
11
+ * * **`seedance-2.0-fast`**: Supports 9:16, 16:9, 1:1.
11
12
  * * **`seedance-2.0-mini`**: Supports 9:16, 16:9, 1:1.
12
13
  * * **`seedance-2.5`**: Supports 9:16, 16:9, 1:1.
13
14
  * * **`veo3.1`**: Supports 9:16, 16:9.
@@ -9,6 +9,7 @@
9
9
  * * `minimax-h3`: Great for reference-driven clips with native audio and longer durations.
10
10
  * * `seedance-1.5`: Best for smooth, consistent motion with an end frame.
11
11
  * * `seedance-2.0`: Best for reference-led clips with precise subject control.
12
+ * * `seedance-2.0-fast`: Fast reference-led clips with consistent motion and audio.
12
13
  * * `seedance-2.0-mini`: Faster reference-led clips with consistent motion and audio.
13
14
  * * `seedance-2.5`: Best for premium realism, detail, and natural motion.
14
15
  * * `veo3.1`: Best for romantic interactions and expressive action, with realistic detail.
@@ -18,4 +19,4 @@
18
19
  *
19
20
  * If you specify the deprecated model value that includes the `-audio` suffix, this will be the same as included `audio` as `true`.
20
21
  */
21
- export type V1TextToVideoCreateBodyModelEnum = "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";
22
+ export type V1TextToVideoCreateBodyModelEnum = "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-fast" | "seedance-2.0-mini" | "seedance-2.5" | "sora-2" | "veo3.1" | "veo3.1-audio" | "veo3.1-lite" | "wan-2.2" | "wan-3.0";
@@ -8,6 +8,7 @@
8
8
  * * **`minimax-h3`**: Supports 480p, 720p, 1080p.
9
9
  * * **`seedance-1.5`**: Supports 480p, 720p, 1080p.
10
10
  * * **`seedance-2.0`**: Supports 480p, 720p, 1080p, 4k.
11
+ * * **`seedance-2.0-fast`**: Supports 480p, 720p.
11
12
  * * **`seedance-2.0-mini`**: Supports 480p, 720p.
12
13
  * * **`seedance-2.5`**: Supports 480p, 720p, 1080p.
13
14
  * * **`veo3.1`**: Supports 720p, 1080p.
@@ -6,7 +6,7 @@ import { External$V1TextToVideoCreateBodyStyle, V1TextToVideoCreateBodyStyle } f
6
6
  */
7
7
  export type V1TextToVideoCreateBody = {
8
8
  /**
9
- * Determines the aspect ratio of the output video.
9
+ * Provide `aspect_ratio` to set the video’s aspect ratio. Determines the aspect ratio of the output video.
10
10
  *
11
11
  * * **`gemini-omni-1.1`**: Supports 16:9, 9:16.
12
12
  * * **`kling-2.6`**: Supports 9:16, 16:9, 1:1.
@@ -15,6 +15,7 @@ export type V1TextToVideoCreateBody = {
15
15
  * * **`minimax-h3`**: Supports 16:9, 9:16, 1:1.
16
16
  * * **`seedance-1.5`**: Supports 9:16, 16:9, 1:1.
17
17
  * * **`seedance-2.0`**: Supports 9:16, 16:9, 1:1.
18
+ * * **`seedance-2.0-fast`**: Supports 9:16, 16:9, 1:1.
18
19
  * * **`seedance-2.0-mini`**: Supports 9:16, 16:9, 1:1.
19
20
  * * **`seedance-2.5`**: Supports 9:16, 16:9, 1:1.
20
21
  * * **`veo3.1`**: Supports 9:16, 16:9.
@@ -35,6 +36,7 @@ export type V1TextToVideoCreateBody = {
35
36
  * * **`minimax-h3`**: Toggle-able: no additional credits for audio
36
37
  * * **`seedance-1.5`**: Toggle-able: audio adds extra credits when enabled
37
38
  * * **`seedance-2.0`**: Toggle-able: no additional credits for audio
39
+ * * **`seedance-2.0-fast`**: Toggle-able: no additional credits for audio
38
40
  * * **`seedance-2.0-mini`**: Toggle-able: no additional credits for audio
39
41
  * * **`seedance-2.5`**: Toggle-able: no additional credits for audio
40
42
  * * **`veo3.1`**: Toggle-able: audio adds extra credits when enabled
@@ -54,6 +56,7 @@ export type V1TextToVideoCreateBody = {
54
56
  * * **`minimax-h3`**: any integer from 1 to 30
55
57
  * * **`seedance-1.5`**: any integer from 4 to 12
56
58
  * * **`seedance-2.0`**: any integer from 4 to 15
59
+ * * **`seedance-2.0-fast`**: any integer from 4 to 15
57
60
  * * **`seedance-2.0-mini`**: any integer from 4 to 15
58
61
  * * **`seedance-2.5`**: any integer from 4 to 30
59
62
  * * **`veo3.1`**: 4, 6, 8, 16, 24, 32, 40, 48, 56
@@ -74,6 +77,7 @@ export type V1TextToVideoCreateBody = {
74
77
  * * `minimax-h3`: Great for reference-driven clips with native audio and longer durations.
75
78
  * * `seedance-1.5`: Best for smooth, consistent motion with an end frame.
76
79
  * * `seedance-2.0`: Best for reference-led clips with precise subject control.
80
+ * * `seedance-2.0-fast`: Fast reference-led clips with consistent motion and audio.
77
81
  * * `seedance-2.0-mini`: Faster reference-led clips with consistent motion and audio.
78
82
  * * `seedance-2.5`: Best for premium realism, detail, and natural motion.
79
83
  * * `veo3.1`: Best for romantic interactions and expressive action, with realistic detail.
@@ -83,7 +87,7 @@ export type V1TextToVideoCreateBody = {
83
87
  *
84
88
  * If you specify the deprecated model value that includes the `-audio` suffix, this will be the same as included `audio` as `true`.
85
89
  */
86
- 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;
90
+ 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-fast" | "seedance-2.0-mini" | "seedance-2.5" | "sora-2" | "veo3.1" | "veo3.1-audio" | "veo3.1-lite" | "wan-2.2" | "wan-3.0") | undefined;
87
91
  /**
88
92
  * Give your video a custom name for easy identification.
89
93
  */
@@ -92,6 +96,20 @@ export type V1TextToVideoCreateBody = {
92
96
  * Deprecated. Use `aspect_ratio` instead.
93
97
  */
94
98
  orientation?: ("landscape" | "portrait" | "square") | undefined;
99
+ /**
100
+ * Reference media for video generation. Name references without @ and refer to them as @name in style.prompt. Maximum 10 references total.
101
+ *
102
+ * Supported models and reference media:
103
+ * * **`gemini-omni-1.1`**: Supports images, videos. Up to 13 references.
104
+ * * **`kling-3.0`**: Supports images, videos.
105
+ * * **`minimax-h3`**: Supports images, videos, audio.
106
+ * * **`seedance-2.0`**: Supports images, videos, audio.
107
+ * * **`seedance-2.0-fast`**: Supports images, videos, audio.
108
+ * * **`seedance-2.0-mini`**: Supports images, videos, audio.
109
+ * * **`seedance-2.5`**: Supports images, videos, audio.
110
+ * * **`veo3.1`**: Supports images. Up to 3 references. Requires `end_seconds` of 8.
111
+ * * **`wan-3.0`**: Supports images, videos, audio.
112
+ */
95
113
  references?: V1TextToVideoCreateBodyReferencesItem[] | undefined;
96
114
  /**
97
115
  * Controls the output video resolution. Defaults to `720p` on paid tiers and `480p` on free tiers.
@@ -103,6 +121,7 @@ export type V1TextToVideoCreateBody = {
103
121
  * * **`minimax-h3`**: Supports 480p, 720p, 1080p.
104
122
  * * **`seedance-1.5`**: Supports 480p, 720p, 1080p.
105
123
  * * **`seedance-2.0`**: Supports 480p, 720p, 1080p, 4k.
124
+ * * **`seedance-2.0-fast`**: Supports 480p, 720p.
106
125
  * * **`seedance-2.0-mini`**: Supports 480p, 720p.
107
126
  * * **`seedance-2.5`**: Supports 480p, 720p, 1080p.
108
127
  * * **`veo3.1`**: Supports 720p, 1080p.
@@ -123,7 +142,7 @@ export type External$V1TextToVideoCreateBody = {
123
142
  aspect_ratio?: ("16:9" | "1:1" | "9:16") | undefined;
124
143
  audio?: boolean | undefined;
125
144
  end_seconds: number;
126
- 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;
145
+ 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-fast" | "seedance-2.0-mini" | "seedance-2.5" | "sora-2" | "veo3.1" | "veo3.1-audio" | "veo3.1-lite" | "wan-2.2" | "wan-3.0") | undefined;
127
146
  name?: string | undefined;
128
147
  orientation?: ("landscape" | "portrait" | "square") | undefined;
129
148
  references?: External$V1TextToVideoCreateBodyReferencesItem[] | undefined;
@@ -62,6 +62,7 @@ const SchemaIn$V1TextToVideoCreateBody = z
62
62
  "seedance",
63
63
  "seedance-1.5",
64
64
  "seedance-2.0",
65
+ "seedance-2.0-fast",
65
66
  "seedance-2.0-mini",
66
67
  "seedance-2.5",
67
68
  "sora-2",
@@ -118,6 +119,7 @@ const SchemaOut$V1TextToVideoCreateBody = z
118
119
  "seedance",
119
120
  "seedance-1.5",
120
121
  "seedance-2.0",
122
+ "seedance-2.0-fast",
121
123
  "seedance-2.0-mini",
122
124
  "seedance-2.5",
123
125
  "sora-2",
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * * `v1` - more detail, closer prompt adherence, and frame-by-frame previews.
3
3
  * * `v2` - faster, more consistent, and less noisy.
4
- * * `default` - use the default version for the selected art style.
4
+ * * `default` - use the selected art style's default version. Some art styles default to v3, which is unavailable through this API. For `Studio Ghibli`, explicitly set `version` to `v2` to use its supported preset.
5
5
  */
6
6
  export type V1VideoToVideoCreateBodyStyleVersionEnum = "default" | "v1" | "v2";
@@ -24,7 +24,7 @@ export type V1VideoToVideoCreateBodyStyle = {
24
24
  /**
25
25
  * * `v1` - more detail, closer prompt adherence, and frame-by-frame previews.
26
26
  * * `v2` - faster, more consistent, and less noisy.
27
- * * `default` - use the default version for the selected art style.
27
+ * * `default` - use the selected art style's default version. Some art styles default to v3, which is unavailable through this API. For `Studio Ghibli`, explicitly set `version` to `v2` to use its supported preset.
28
28
  */
29
29
  version?: ("default" | "v1" | "v2") | undefined;
30
30
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "magic-hour",
3
- "version": "0.83.0",
3
+ "version": "0.84.0",
4
4
  "main": "./dist/index.js",
5
5
  "types": "./dist/index.d.ts",
6
6
  "exports": {
@@ -25,6 +25,7 @@
25
25
  "test": "jest -i --testPathPattern=test"
26
26
  },
27
27
  "dependencies": {
28
+ "@types/node-fetch": "2.6.9",
28
29
  "make-api-request-js": "^0.2.1",
29
30
  "node-fetch": "^2.7.0"
30
31
  },
@@ -33,7 +34,6 @@
33
34
  "@types/glob": "^8.1.0",
34
35
  "@types/jest": "^29.5.14",
35
36
  "@types/node": "17.0.33",
36
- "@types/node-fetch": "2.6.9",
37
37
  "@types/qs": "6.9.8",
38
38
  "@types/url-join": "4.0.1",
39
39
  "jest": "^29.7.0",
@@ -43,7 +43,8 @@
43
43
  "ts-morph": "^26.0.0",
44
44
  "ts-node": "^10.9.2",
45
45
  "tsc-alias": "^1.8.10",
46
- "typescript": "^5.2.0"
46
+ "typescript": "^5.2.0",
47
+ "@types/node-fetch": "2.6.9"
47
48
  },
48
49
  "bugs": "https://github.com/magichourhq/magic-hour-node/issues",
49
50
  "description": "Node SDK for Magic Hour API",