magic-hour 0.85.0 → 0.87.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 (69) hide show
  1. package/README.md +0 -2
  2. package/dist/environment.d.ts +1 -1
  3. package/dist/environment.js +1 -1
  4. package/dist/resources/v1/ai-talking-photo/request-types.d.ts +2 -2
  5. package/dist/resources/v1/ai-ugc-ad/request-types.d.ts +2 -2
  6. package/dist/resources/v1/ai-video-editor/request-types.d.ts +5 -5
  7. package/dist/resources/v1/ai-video-editor/request-types.js +2 -2
  8. package/dist/resources/v1/character-replace/request-types.d.ts +3 -2
  9. package/dist/resources/v1/character-replace/request-types.js +2 -2
  10. package/dist/resources/v1/files/upload-urls/resource-client.d.ts +1 -1
  11. package/dist/resources/v1/files/upload-urls/resource-client.js +1 -1
  12. package/dist/resources/v1/image-to-video/request-types.d.ts +6 -2
  13. package/dist/resources/v1/image-to-video/request-types.js +2 -0
  14. package/dist/resources/v1/text-to-video/request-types.d.ts +9 -3
  15. package/dist/resources/v1/text-to-video/request-types.js +2 -0
  16. package/dist/types/v1-ai-clothes-changer-create-body-assets.d.ts +2 -2
  17. package/dist/types/v1-ai-face-editor-create-body-assets.d.ts +1 -1
  18. package/dist/types/v1-ai-headshot-generator-create-body-assets.d.ts +1 -1
  19. package/dist/types/v1-ai-image-editor-create-body-assets.d.ts +2 -2
  20. package/dist/types/v1-ai-image-upscaler-create-body-assets.d.ts +1 -1
  21. package/dist/types/v1-ai-talking-photo-create-body-assets.d.ts +2 -2
  22. package/dist/types/v1-ai-talking-photo-create-body.d.ts +2 -2
  23. package/dist/types/v1-ai-ugc-ad-create-body-assets.d.ts +1 -1
  24. package/dist/types/v1-ai-ugc-ad-create-body.d.ts +2 -2
  25. package/dist/types/v1-ai-video-editor-create-body-assets.d.ts +1 -1
  26. package/dist/types/v1-ai-video-editor-create-body-model-enum.d.ts +2 -2
  27. package/dist/types/v1-ai-video-editor-create-body-resolution-enum.d.ts +1 -1
  28. package/dist/types/v1-ai-video-editor-create-body.d.ts +5 -5
  29. package/dist/types/v1-ai-video-editor-create-body.js +2 -2
  30. package/dist/types/v1-ai-video-translator-create-body-assets.d.ts +1 -1
  31. package/dist/types/v1-ai-video-upscaler-create-body-assets.d.ts +1 -1
  32. package/dist/types/v1-ai-voice-cloner-create-body-assets.d.ts +1 -1
  33. package/dist/types/v1-ai-voice-generator-create-body-style-voice-name-enum.d.ts +2 -2
  34. package/dist/types/v1-ai-voice-generator-create-body-style.d.ts +3 -3
  35. package/dist/types/v1-ai-voice-generator-create-body-style.js +0 -4
  36. package/dist/types/v1-animation-create-body-assets.d.ts +2 -2
  37. package/dist/types/v1-audio-to-video-create-body-assets.d.ts +2 -2
  38. package/dist/types/v1-auto-subtitle-generator-create-body-assets.d.ts +1 -1
  39. package/dist/types/v1-body-swap-create-body-assets.d.ts +2 -2
  40. package/dist/types/v1-character-replace-create-body-assets.d.ts +2 -2
  41. package/dist/types/v1-character-replace-create-body-model-enum.d.ts +2 -1
  42. package/dist/types/v1-character-replace-create-body-style-selection-mode-enum.d.ts +1 -1
  43. package/dist/types/v1-character-replace-create-body-style.d.ts +7 -2
  44. package/dist/types/v1-character-replace-create-body-style.js +4 -0
  45. package/dist/types/v1-character-replace-create-body.d.ts +3 -2
  46. package/dist/types/v1-character-replace-create-body.js +2 -2
  47. package/dist/types/v1-face-detection-create-body-assets.d.ts +1 -1
  48. package/dist/types/v1-face-swap-create-body-assets-face-mappings-item.d.ts +1 -1
  49. package/dist/types/v1-face-swap-create-body-assets.d.ts +2 -2
  50. package/dist/types/v1-face-swap-photo-create-body-assets-face-mappings-item.d.ts +1 -1
  51. package/dist/types/v1-face-swap-photo-create-body-assets.d.ts +2 -2
  52. package/dist/types/v1-files-upload-urls-create-body-items-item.d.ts +1 -1
  53. package/dist/types/v1-head-swap-create-body-assets.d.ts +2 -2
  54. package/dist/types/v1-image-background-remover-create-body-assets.d.ts +2 -2
  55. package/dist/types/v1-image-to-video-create-body-assets.d.ts +8 -1
  56. package/dist/types/v1-image-to-video-create-body-model-enum.d.ts +2 -1
  57. package/dist/types/v1-image-to-video-create-body-resolution-enum.d.ts +1 -0
  58. package/dist/types/v1-image-to-video-create-body.d.ts +6 -2
  59. package/dist/types/v1-image-to-video-create-body.js +2 -0
  60. package/dist/types/v1-lip-sync-create-body-assets.d.ts +2 -2
  61. package/dist/types/v1-photo-colorizer-create-body-assets.d.ts +1 -1
  62. package/dist/types/v1-text-to-video-create-body-aspect-ratio-enum.d.ts +1 -0
  63. package/dist/types/v1-text-to-video-create-body-model-enum.d.ts +2 -1
  64. package/dist/types/v1-text-to-video-create-body-references-item.d.ts +8 -0
  65. package/dist/types/v1-text-to-video-create-body-resolution-enum.d.ts +1 -0
  66. package/dist/types/v1-text-to-video-create-body.d.ts +9 -3
  67. package/dist/types/v1-text-to-video-create-body.js +2 -0
  68. package/dist/types/v1-video-to-video-create-body-assets.d.ts +1 -1
  69. package/package.json +1 -1
@@ -46,12 +46,14 @@ const SchemaIn$V1CharacterReplaceCreateBodyStyle = z
46
46
  points: z
47
47
  .array(v1_character_replace_create_body_style_points_item_1.Schemas$V1CharacterReplaceCreateBodyStylePointsItem.in)
48
48
  .optional(),
49
+ prompt: z.string().optional(),
49
50
  selection_mode: z.enum(["auto", "point"]).optional(),
50
51
  })
51
52
  .transform((obj) => {
52
53
  return (0, make_api_request_js_1.zodTransform)(obj, {
53
54
  mode: "mode",
54
55
  points: "points",
56
+ prompt: "prompt",
55
57
  selection_mode: "selectionMode",
56
58
  });
57
59
  });
@@ -65,12 +67,14 @@ const SchemaOut$V1CharacterReplaceCreateBodyStyle = z
65
67
  points: z
66
68
  .array(v1_character_replace_create_body_style_points_item_1.Schemas$V1CharacterReplaceCreateBodyStylePointsItem.out)
67
69
  .optional(),
70
+ prompt: z.string().optional(),
68
71
  selectionMode: z.enum(["auto", "point"]).optional(),
69
72
  })
70
73
  .transform((obj) => {
71
74
  return (0, make_api_request_js_1.zodTransform)(obj, {
72
75
  mode: "mode",
73
76
  points: "points",
77
+ prompt: "prompt",
74
78
  selectionMode: "selection_mode",
75
79
  });
76
80
  });
@@ -18,8 +18,9 @@ export type V1CharacterReplaceCreateBody = {
18
18
  *
19
19
  * * **`wan-animate`**: 480p, 720p. Supports `points` subject selection.
20
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
+ * * **`minimax-h3`**: 480p, 720p, 1080p. Clips of 1–60 seconds in `replace` mode or 1–60 seconds in `animate` mode. Subject `points` are `replace`-only; `animate` with `selection_mode` `point` returns 422, and with `auto` or no `selection_mode` the points are ignored.
21
22
  */
22
- model?: ("kling-3.0" | "wan-animate") | undefined;
23
+ model?: ("kling-3.0" | "minimax-h3" | "wan-animate") | undefined;
23
24
  /**
24
25
  * Give your video a custom name for easy identification.
25
26
  */
@@ -45,7 +46,7 @@ export type V1CharacterReplaceCreateBody = {
45
46
  export type External$V1CharacterReplaceCreateBody = {
46
47
  assets: External$V1CharacterReplaceCreateBodyAssets;
47
48
  end_seconds: number;
48
- model?: ("kling-3.0" | "wan-animate") | undefined;
49
+ model?: ("kling-3.0" | "minimax-h3" | "wan-animate") | undefined;
49
50
  name?: string | undefined;
50
51
  resolution?: ("1080p" | "480p" | "720p") | undefined;
51
52
  start_seconds?: number | undefined;
@@ -45,7 +45,7 @@ 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
+ model: z.enum(["kling-3.0", "minimax-h3", "wan-animate"]).optional(),
49
49
  name: z.string().optional(),
50
50
  resolution: z.enum(["1080p", "480p", "720p"]).optional(),
51
51
  start_seconds: z.number().optional(),
@@ -70,7 +70,7 @@ const SchemaOut$V1CharacterReplaceCreateBody = z
70
70
  .object({
71
71
  assets: v1_character_replace_create_body_assets_1.Schemas$V1CharacterReplaceCreateBodyAssets.out,
72
72
  endSeconds: z.number(),
73
- model: z.enum(["kling-3.0", "wan-animate"]).optional(),
73
+ model: z.enum(["kling-3.0", "minimax-h3", "wan-animate"]).optional(),
74
74
  name: z.string().optional(),
75
75
  resolution: z.enum(["1080p", "480p", "720p"]).optional(),
76
76
  startSeconds: z.number().optional(),
@@ -5,7 +5,7 @@ import * as z from "zod";
5
5
  export type V1FaceDetectionCreateBodyAssets = {
6
6
  /**
7
7
  * This is the image or video where the face will be detected. This value is either
8
- * - a direct URL to the video file
8
+ * - a direct URL to the file. The URL path must end in a supported file extension.
9
9
  * - `file_path` field from the response of the [upload urls API](https://docs.magichour.ai/api-reference/files/generate-asset-upload-urls).
10
10
  *
11
11
  * See the [file upload guide](https://docs.magichour.ai/api-reference/files/generate-asset-upload-urls#input-file) for details.
@@ -5,7 +5,7 @@ import * as z from "zod";
5
5
  export type V1FaceSwapCreateBodyAssetsFaceMappingsItem = {
6
6
  /**
7
7
  * The face image that will be used to replace the face in the `original_face`. This value is either
8
- * - a direct URL to the video file
8
+ * - a direct URL to the file. The URL path must end in a supported file extension.
9
9
  * - `file_path` field from the response of the [upload urls API](https://docs.magichour.ai/api-reference/files/generate-asset-upload-urls).
10
10
  *
11
11
  * See the [file upload guide](https://docs.magichour.ai/api-reference/files/generate-asset-upload-urls#input-file) for details.
@@ -18,7 +18,7 @@ export type V1FaceSwapCreateBodyAssets = {
18
18
  * The path of the input image with the face to be swapped. The value is required if `face_swap_mode` is `all-faces`.
19
19
  *
20
20
  * This value is either
21
- * - a direct URL to the video file
21
+ * - a direct URL to the file. The URL path must end in a supported file extension.
22
22
  * - `file_path` field from the response of the [upload urls API](https://docs.magichour.ai/api-reference/files/generate-asset-upload-urls).
23
23
  *
24
24
  * See the [file upload guide](https://docs.magichour.ai/api-reference/files/generate-asset-upload-urls#input-file) for details.
@@ -27,7 +27,7 @@ export type V1FaceSwapCreateBodyAssets = {
27
27
  imageFilePath?: string | undefined;
28
28
  /**
29
29
  * Your video file. Required if `video_source` is `file`. This value is either
30
- * - a direct URL to the video file
30
+ * - a direct URL to the file. The URL path must end in a supported file extension.
31
31
  * - `file_path` field from the response of the [upload urls API](https://docs.magichour.ai/api-reference/files/generate-asset-upload-urls).
32
32
  *
33
33
  * See the [file upload guide](https://docs.magichour.ai/api-reference/files/generate-asset-upload-urls#input-file) for details.
@@ -5,7 +5,7 @@ import * as z from "zod";
5
5
  export type V1FaceSwapPhotoCreateBodyAssetsFaceMappingsItem = {
6
6
  /**
7
7
  * The face image that will be used to replace the face in the `original_face`. This value is either
8
- * - a direct URL to the video file
8
+ * - a direct URL to the file. The URL path must end in a supported file extension.
9
9
  * - `file_path` field from the response of the [upload urls API](https://docs.magichour.ai/api-reference/files/generate-asset-upload-urls).
10
10
  *
11
11
  * See the [file upload guide](https://docs.magichour.ai/api-reference/files/generate-asset-upload-urls#input-file) for details.
@@ -18,7 +18,7 @@ export type V1FaceSwapPhotoCreateBodyAssets = {
18
18
  * This is the image from which the face is extracted. The value is required if `face_swap_mode` is `all-faces`.
19
19
  *
20
20
  * This value is either
21
- * - a direct URL to the video file
21
+ * - a direct URL to the file. The URL path must end in a supported file extension.
22
22
  * - `file_path` field from the response of the [upload urls API](https://docs.magichour.ai/api-reference/files/generate-asset-upload-urls).
23
23
  *
24
24
  * See the [file upload guide](https://docs.magichour.ai/api-reference/files/generate-asset-upload-urls#input-file) for details.
@@ -27,7 +27,7 @@ export type V1FaceSwapPhotoCreateBodyAssets = {
27
27
  sourceFilePath?: string | undefined;
28
28
  /**
29
29
  * This is the image where the face from the source image will be placed. This value is either
30
- * - a direct URL to the video file
30
+ * - a direct URL to the file. The URL path must end in a supported file extension.
31
31
  * - `file_path` field from the response of the [upload urls API](https://docs.magichour.ai/api-reference/files/generate-asset-upload-urls).
32
32
  *
33
33
  * See the [file upload guide](https://docs.magichour.ai/api-reference/files/generate-asset-upload-urls#input-file) for details.
@@ -4,7 +4,7 @@ import * as z from "zod";
4
4
  */
5
5
  export type V1FilesUploadUrlsCreateBodyItemsItem = {
6
6
  /**
7
- * The extension of the file to upload. Do not include the dot (.) before the extension. Possible extensions are mp4,m4v,mov,webm,mp3,wav,aac,flac,webm,weba,m4a,opus,ogg,oga,aiff,amr,png,jpg,jpeg,jfif,heic,heif,webp,avif,jp2,tiff,tif,bmp,gif,webp,webm
7
+ * The extension of the file to upload. Do not include the dot (.) before the extension. Possible extensions are mp4,m4v,mov,webm,mp3,wav,aac,flac,webm,weba,m4a,opus,ogg,oga,aiff,amr,png,jpg,jpeg,jpe,jfif,heic,heif,webp,avif,jp2,tiff,tif,bmp,gif,webp,webm
8
8
  */
9
9
  extension: string;
10
10
  /**
@@ -5,7 +5,7 @@ import * as z from "zod";
5
5
  export type V1HeadSwapCreateBodyAssets = {
6
6
  /**
7
7
  * Image that receives the swapped head. This value is either
8
- * - a direct URL to the video file
8
+ * - a direct URL to the file. The URL path must end in a supported file extension.
9
9
  * - `file_path` field from the response of the [upload urls API](https://docs.magichour.ai/api-reference/files/generate-asset-upload-urls).
10
10
  *
11
11
  * See the [file upload guide](https://docs.magichour.ai/api-reference/files/generate-asset-upload-urls#input-file) for details.
@@ -14,7 +14,7 @@ export type V1HeadSwapCreateBodyAssets = {
14
14
  bodyFilePath: string;
15
15
  /**
16
16
  * Image of the head to place on the body. This value is either
17
- * - a direct URL to the video file
17
+ * - a direct URL to the file. The URL path must end in a supported file extension.
18
18
  * - `file_path` field from the response of the [upload urls API](https://docs.magichour.ai/api-reference/files/generate-asset-upload-urls).
19
19
  *
20
20
  * See the [file upload guide](https://docs.magichour.ai/api-reference/files/generate-asset-upload-urls#input-file) for details.
@@ -7,7 +7,7 @@ export type V1ImageBackgroundRemoverCreateBodyAssets = {
7
7
  * The image used as the new background for the image_file_path. This image will be resized to match the image in image_file_path. Please make sure the resolution between the images are similar.
8
8
  *
9
9
  * This value is either
10
- * - a direct URL to the video file
10
+ * - a direct URL to the file. The URL path must end in a supported file extension.
11
11
  * - `file_path` field from the response of the [upload urls API](https://docs.magichour.ai/api-reference/files/generate-asset-upload-urls).
12
12
  *
13
13
  * See the [file upload guide](https://docs.magichour.ai/api-reference/files/generate-asset-upload-urls#input-file) for details.
@@ -16,7 +16,7 @@ export type V1ImageBackgroundRemoverCreateBodyAssets = {
16
16
  backgroundImageFilePath?: string | undefined;
17
17
  /**
18
18
  * The image to remove the background. This value is either
19
- * - a direct URL to the video file
19
+ * - a direct URL to the file. The URL path must end in a supported file extension.
20
20
  * - `file_path` field from the response of the [upload urls API](https://docs.magichour.ai/api-reference/files/generate-asset-upload-urls).
21
21
  *
22
22
  * See the [file upload guide](https://docs.magichour.ai/api-reference/files/generate-asset-upload-urls#input-file) for details.
@@ -9,6 +9,7 @@ export type V1ImageToVideoCreateBodyAssets = {
9
9
  * * **`gemini-omni-1.1`**: Supports 360p, 720p, 1080p, 4k.
10
10
  * * **`kling-2.6`**: Supports 1080p.
11
11
  * * **`kling-3.0`**: Supports 720p, 1080p, 4k.
12
+ * * **`kling-4.0`**: Supports 720p, 1080p.
12
13
  * * **`ltx-2.5`**: Supports 480p, 720p, 1080p.
13
14
  * * **`minimax-h3`**: Supports 480p, 720p, 1080p.
14
15
  * * **`seedance-1.5`**: Supports 480p, 720p, 1080p.
@@ -21,11 +22,17 @@ export type V1ImageToVideoCreateBodyAssets = {
21
22
  * * **`wan-2.2`**: Not supported
22
23
  * * **`wan-3.0`**: Supports 480p, 720p, 1080p.
23
24
  *
25
+ * This value is either
26
+ * - a direct URL to the file. The URL path must end in a supported file extension.
27
+ * - `file_path` field from the response of the [upload urls API](https://docs.magichour.ai/api-reference/files/generate-asset-upload-urls).
28
+ *
29
+ * See the [file upload guide](https://docs.magichour.ai/api-reference/files/generate-asset-upload-urls#input-file) for details.
30
+ *
24
31
  */
25
32
  endImageFilePath?: string | undefined;
26
33
  /**
27
34
  * The path of the image file. This value is either
28
- * - a direct URL to the video file
35
+ * - a direct URL to the file. The URL path must end in a supported file extension.
29
36
  * - `file_path` field from the response of the [upload urls API](https://docs.magichour.ai/api-reference/files/generate-asset-upload-urls).
30
37
  *
31
38
  * See the [file upload guide](https://docs.magichour.ai/api-reference/files/generate-asset-upload-urls#input-file) for details.
@@ -5,6 +5,7 @@
5
5
  * * `gemini-omni-1.1`: Best for precise short clips, first/last frames, and high-resolution output.
6
6
  * * `kling-2.6`: Best for action, motion blur, and controlled camera moves.
7
7
  * * `kling-3.0`: Best for cinematic stories, references, and optional audio.
8
+ * * `kling-4.0`: Create cinematic videos with image and video references and optional audio.
8
9
  * * `ltx-2.5`: Fastest for general scenes, long clips, audio, and rapid iteration.
9
10
  * * `minimax-h3`: Great for reference-driven clips with native audio and longer durations.
10
11
  * * `seedance-1.5`: Best for smooth, consistent motion with an end frame.
@@ -19,4 +20,4 @@
19
20
  *
20
21
  * If you specify the deprecated model value that includes the `-audio` suffix, this will be the same as included `audio` as `true`.
21
22
  */
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";
23
+ export type V1ImageToVideoCreateBodyModelEnum = "default" | "gemini-omni-1.1" | "kling-1.6" | "kling-2.5" | "kling-2.5-audio" | "kling-2.6" | "kling-3.0" | "kling-4.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";
@@ -4,6 +4,7 @@
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
+ * * **`kling-4.0`**: Supports 720p, 1080p.
7
8
  * * **`ltx-2.5`**: Supports 480p, 720p, 1080p.
8
9
  * * **`minimax-h3`**: Supports 480p, 720p, 1080p.
9
10
  * * **`seedance-1.5`**: Supports 480p, 720p, 1080p.
@@ -16,6 +16,7 @@ export type V1ImageToVideoCreateBody = {
16
16
  * * **`gemini-omni-1.1`**: Not supported
17
17
  * * **`kling-2.6`**: Not supported
18
18
  * * **`kling-3.0`**: Toggle-able: audio adds extra credits when enabled
19
+ * * **`kling-4.0`**: Toggle-able: no additional credits for audio
19
20
  * * **`ltx-2.5`**: Toggle-able: no additional credits for audio
20
21
  * * **`minimax-h3`**: Toggle-able: no additional credits for audio
21
22
  * * **`seedance-1.5`**: Toggle-able: audio adds extra credits when enabled
@@ -36,6 +37,7 @@ export type V1ImageToVideoCreateBody = {
36
37
  * * **`gemini-omni-1.1`**: any integer from 3 to 10
37
38
  * * **`kling-2.6`**: 5, 10
38
39
  * * **`kling-3.0`**: any integer from 3 to 15
40
+ * * **`kling-4.0`**: any integer from 3 to 30
39
41
  * * **`ltx-2.5`**: any integer from 1 to 60
40
42
  * * **`minimax-h3`**: any integer from 1 to 30
41
43
  * * **`seedance-1.5`**: any integer from 4 to 12
@@ -63,6 +65,7 @@ export type V1ImageToVideoCreateBody = {
63
65
  * * `gemini-omni-1.1`: Best for precise short clips, first/last frames, and high-resolution output.
64
66
  * * `kling-2.6`: Best for action, motion blur, and controlled camera moves.
65
67
  * * `kling-3.0`: Best for cinematic stories, references, and optional audio.
68
+ * * `kling-4.0`: Create cinematic videos with image and video references and optional audio.
66
69
  * * `ltx-2.5`: Fastest for general scenes, long clips, audio, and rapid iteration.
67
70
  * * `minimax-h3`: Great for reference-driven clips with native audio and longer durations.
68
71
  * * `seedance-1.5`: Best for smooth, consistent motion with an end frame.
@@ -77,7 +80,7 @@ export type V1ImageToVideoCreateBody = {
77
80
  *
78
81
  * If you specify the deprecated model value that includes the `-audio` suffix, this will be the same as included `audio` as `true`.
79
82
  */
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;
83
+ model?: ("default" | "gemini-omni-1.1" | "kling-1.6" | "kling-2.5" | "kling-2.5-audio" | "kling-2.6" | "kling-3.0" | "kling-4.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;
81
84
  /**
82
85
  * Give your video a custom name for easy identification.
83
86
  */
@@ -88,6 +91,7 @@ export type V1ImageToVideoCreateBody = {
88
91
  * * **`gemini-omni-1.1`**: Supports 360p, 720p, 1080p, 4k.
89
92
  * * **`kling-2.6`**: Supports 720p, 1080p.
90
93
  * * **`kling-3.0`**: Supports 720p, 1080p, 4k.
94
+ * * **`kling-4.0`**: Supports 720p, 1080p.
91
95
  * * **`ltx-2.5`**: Supports 480p, 720p, 1080p.
92
96
  * * **`minimax-h3`**: Supports 480p, 720p, 1080p.
93
97
  * * **`seedance-1.5`**: Supports 480p, 720p, 1080p.
@@ -123,7 +127,7 @@ export type External$V1ImageToVideoCreateBody = {
123
127
  audio?: boolean | undefined;
124
128
  end_seconds: number;
125
129
  height?: number | null | 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;
130
+ model?: ("default" | "gemini-omni-1.1" | "kling-1.6" | "kling-2.5" | "kling-2.5-audio" | "kling-2.6" | "kling-3.0" | "kling-4.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
131
  name?: string | undefined;
128
132
  resolution?: ("1080p" | "360p" | "480p" | "4k" | "720p") | undefined;
129
133
  style?: External$V1ImageToVideoCreateBodyStyle | undefined;
@@ -56,6 +56,7 @@ const SchemaIn$V1ImageToVideoCreateBody = z
56
56
  "kling-2.5-audio",
57
57
  "kling-2.6",
58
58
  "kling-3.0",
59
+ "kling-4.0",
59
60
  "ltx-2",
60
61
  "ltx-2.3",
61
62
  "ltx-2.5",
@@ -111,6 +112,7 @@ const SchemaOut$V1ImageToVideoCreateBody = z
111
112
  "kling-2.5-audio",
112
113
  "kling-2.6",
113
114
  "kling-3.0",
115
+ "kling-4.0",
114
116
  "ltx-2",
115
117
  "ltx-2.3",
116
118
  "ltx-2.5",
@@ -5,7 +5,7 @@ import * as z from "zod";
5
5
  export type V1LipSyncCreateBodyAssets = {
6
6
  /**
7
7
  * The path of the audio file. This value is either
8
- * - a direct URL to the video file
8
+ * - a direct URL to the file. The URL path must end in a supported file extension.
9
9
  * - `file_path` field from the response of the [upload urls API](https://docs.magichour.ai/api-reference/files/generate-asset-upload-urls).
10
10
  *
11
11
  * See the [file upload guide](https://docs.magichour.ai/api-reference/files/generate-asset-upload-urls#input-file) for details.
@@ -14,7 +14,7 @@ export type V1LipSyncCreateBodyAssets = {
14
14
  audioFilePath: string;
15
15
  /**
16
16
  * Your video file. Required if `video_source` is `file`. This value is either
17
- * - a direct URL to the video file
17
+ * - a direct URL to the file. The URL path must end in a supported file extension.
18
18
  * - `file_path` field from the response of the [upload urls API](https://docs.magichour.ai/api-reference/files/generate-asset-upload-urls).
19
19
  *
20
20
  * See the [file upload guide](https://docs.magichour.ai/api-reference/files/generate-asset-upload-urls#input-file) for details.
@@ -5,7 +5,7 @@ import * as z from "zod";
5
5
  export type V1PhotoColorizerCreateBodyAssets = {
6
6
  /**
7
7
  * The image used to generate the colorized image. This value is either
8
- * - a direct URL to the video file
8
+ * - a direct URL to the file. The URL path must end in a supported file extension.
9
9
  * - `file_path` field from the response of the [upload urls API](https://docs.magichour.ai/api-reference/files/generate-asset-upload-urls).
10
10
  *
11
11
  * See the [file upload guide](https://docs.magichour.ai/api-reference/files/generate-asset-upload-urls#input-file) for details.
@@ -4,6 +4,7 @@
4
4
  * * **`gemini-omni-1.1`**: Supports 16:9, 9:16.
5
5
  * * **`kling-2.6`**: Supports 9:16, 16:9, 1:1.
6
6
  * * **`kling-3.0`**: Supports 9:16, 16:9, 1:1.
7
+ * * **`kling-4.0`**: Supports 9:16, 16:9, 1:1.
7
8
  * * **`ltx-2.5`**: Supports 9:16, 16:9, 1:1.
8
9
  * * **`minimax-h3`**: Supports 16:9, 9:16, 1:1.
9
10
  * * **`seedance-1.5`**: Supports 9:16, 16:9, 1:1.
@@ -5,6 +5,7 @@
5
5
  * * `gemini-omni-1.1`: Best for precise short clips, first/last frames, and high-resolution output.
6
6
  * * `kling-2.6`: Best for action, motion blur, and controlled camera moves.
7
7
  * * `kling-3.0`: Best for cinematic stories, references, and optional audio.
8
+ * * `kling-4.0`: Create cinematic videos with image and video references and optional audio.
8
9
  * * `ltx-2.5`: Fastest for general scenes, long clips, audio, and rapid iteration.
9
10
  * * `minimax-h3`: Great for reference-driven clips with native audio and longer durations.
10
11
  * * `seedance-1.5`: Best for smooth, consistent motion with an end frame.
@@ -19,4 +20,4 @@
19
20
  *
20
21
  * If you specify the deprecated model value that includes the `-audio` suffix, this will be the same as included `audio` as `true`.
21
22
  */
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";
23
+ export type V1TextToVideoCreateBodyModelEnum = "default" | "gemini-omni-1.1" | "kling-1.6" | "kling-2.5" | "kling-2.5-audio" | "kling-2.6" | "kling-3.0" | "kling-4.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";
@@ -3,6 +3,14 @@ import * as z from "zod";
3
3
  * V1TextToVideoCreateBodyReferencesItem
4
4
  */
5
5
  export type V1TextToVideoCreateBodyReferencesItem = {
6
+ /**
7
+ * This value is either
8
+ * - a direct URL to the file. The URL path must end in a supported file extension.
9
+ * - `file_path` field from the response of the [upload urls API](https://docs.magichour.ai/api-reference/files/generate-asset-upload-urls).
10
+ *
11
+ * See the [file upload guide](https://docs.magichour.ai/api-reference/files/generate-asset-upload-urls#input-file) for details.
12
+ *
13
+ */
6
14
  filePath: string;
7
15
  name: string;
8
16
  };
@@ -4,6 +4,7 @@
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
+ * * **`kling-4.0`**: Supports 720p, 1080p.
7
8
  * * **`ltx-2.5`**: Supports 480p, 720p, 1080p.
8
9
  * * **`minimax-h3`**: Supports 480p, 720p, 1080p.
9
10
  * * **`seedance-1.5`**: Supports 480p, 720p, 1080p.
@@ -11,6 +11,7 @@ export type V1TextToVideoCreateBody = {
11
11
  * * **`gemini-omni-1.1`**: Supports 16:9, 9:16.
12
12
  * * **`kling-2.6`**: Supports 9:16, 16:9, 1:1.
13
13
  * * **`kling-3.0`**: Supports 9:16, 16:9, 1:1.
14
+ * * **`kling-4.0`**: Supports 9:16, 16:9, 1:1.
14
15
  * * **`ltx-2.5`**: Supports 9:16, 16:9, 1:1.
15
16
  * * **`minimax-h3`**: Supports 16:9, 9:16, 1:1.
16
17
  * * **`seedance-1.5`**: Supports 9:16, 16:9, 1:1.
@@ -32,6 +33,7 @@ export type V1TextToVideoCreateBody = {
32
33
  * * **`gemini-omni-1.1`**: Not supported
33
34
  * * **`kling-2.6`**: Not supported
34
35
  * * **`kling-3.0`**: Toggle-able: audio adds extra credits when enabled
36
+ * * **`kling-4.0`**: Toggle-able: no additional credits for audio
35
37
  * * **`ltx-2.5`**: Toggle-able: no additional credits for audio
36
38
  * * **`minimax-h3`**: Toggle-able: no additional credits for audio
37
39
  * * **`seedance-1.5`**: Toggle-able: audio adds extra credits when enabled
@@ -52,6 +54,7 @@ export type V1TextToVideoCreateBody = {
52
54
  * * **`gemini-omni-1.1`**: any integer from 3 to 10
53
55
  * * **`kling-2.6`**: 5, 10
54
56
  * * **`kling-3.0`**: any integer from 3 to 15
57
+ * * **`kling-4.0`**: any integer from 3 to 30
55
58
  * * **`ltx-2.5`**: any integer from 1 to 60
56
59
  * * **`minimax-h3`**: any integer from 1 to 30
57
60
  * * **`seedance-1.5`**: any integer from 4 to 12
@@ -73,6 +76,7 @@ export type V1TextToVideoCreateBody = {
73
76
  * * `gemini-omni-1.1`: Best for precise short clips, first/last frames, and high-resolution output.
74
77
  * * `kling-2.6`: Best for action, motion blur, and controlled camera moves.
75
78
  * * `kling-3.0`: Best for cinematic stories, references, and optional audio.
79
+ * * `kling-4.0`: Create cinematic videos with image and video references and optional audio.
76
80
  * * `ltx-2.5`: Fastest for general scenes, long clips, audio, and rapid iteration.
77
81
  * * `minimax-h3`: Great for reference-driven clips with native audio and longer durations.
78
82
  * * `seedance-1.5`: Best for smooth, consistent motion with an end frame.
@@ -87,7 +91,7 @@ export type V1TextToVideoCreateBody = {
87
91
  *
88
92
  * If you specify the deprecated model value that includes the `-audio` suffix, this will be the same as included `audio` as `true`.
89
93
  */
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;
94
+ model?: ("default" | "gemini-omni-1.1" | "kling-1.6" | "kling-2.5" | "kling-2.5-audio" | "kling-2.6" | "kling-3.0" | "kling-4.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;
91
95
  /**
92
96
  * Give your video a custom name for easy identification.
93
97
  */
@@ -102,7 +106,8 @@ export type V1TextToVideoCreateBody = {
102
106
  * Supported models and reference media:
103
107
  * * **`gemini-omni-1.1`**: Supports images, videos. Up to 10 references.
104
108
  * * **`kling-3.0`**: Supports images, videos.
105
- * * **`minimax-h3`**: Supports images, videos, audio.
109
+ * * **`kling-4.0`**: Supports images, videos. Up to 10 references.
110
+ * * **`minimax-h3`**: Supports images, videos, audio. Video references must be 2–15 seconds each and 15 seconds combined, and are used in full.
106
111
  * * **`seedance-2.0`**: Supports images, videos, audio.
107
112
  * * **`seedance-2.0-fast`**: Supports images, videos, audio.
108
113
  * * **`seedance-2.0-mini`**: Supports images, videos, audio.
@@ -117,6 +122,7 @@ export type V1TextToVideoCreateBody = {
117
122
  * * **`gemini-omni-1.1`**: Supports 360p, 720p, 1080p, 4k.
118
123
  * * **`kling-2.6`**: Supports 720p, 1080p.
119
124
  * * **`kling-3.0`**: Supports 720p, 1080p, 4k.
125
+ * * **`kling-4.0`**: Supports 720p, 1080p.
120
126
  * * **`ltx-2.5`**: Supports 480p, 720p, 1080p.
121
127
  * * **`minimax-h3`**: Supports 480p, 720p, 1080p.
122
128
  * * **`seedance-1.5`**: Supports 480p, 720p, 1080p.
@@ -142,7 +148,7 @@ export type External$V1TextToVideoCreateBody = {
142
148
  aspect_ratio?: ("16:9" | "1:1" | "9:16") | undefined;
143
149
  audio?: boolean | undefined;
144
150
  end_seconds: number;
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;
151
+ model?: ("default" | "gemini-omni-1.1" | "kling-1.6" | "kling-2.5" | "kling-2.5-audio" | "kling-2.6" | "kling-3.0" | "kling-4.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;
146
152
  name?: string | undefined;
147
153
  orientation?: ("landscape" | "portrait" | "square") | undefined;
148
154
  references?: External$V1TextToVideoCreateBodyReferencesItem[] | undefined;
@@ -55,6 +55,7 @@ const SchemaIn$V1TextToVideoCreateBody = z
55
55
  "kling-2.5-audio",
56
56
  "kling-2.6",
57
57
  "kling-3.0",
58
+ "kling-4.0",
58
59
  "ltx-2",
59
60
  "ltx-2.3",
60
61
  "ltx-2.5",
@@ -112,6 +113,7 @@ const SchemaOut$V1TextToVideoCreateBody = z
112
113
  "kling-2.5-audio",
113
114
  "kling-2.6",
114
115
  "kling-3.0",
116
+ "kling-4.0",
115
117
  "ltx-2",
116
118
  "ltx-2.3",
117
119
  "ltx-2.5",
@@ -5,7 +5,7 @@ import * as z from "zod";
5
5
  export type V1VideoToVideoCreateBodyAssets = {
6
6
  /**
7
7
  * Your video file. Required if `video_source` is `file`. This value is either
8
- * - a direct URL to the video file
8
+ * - a direct URL to the file. The URL path must end in a supported file extension.
9
9
  * - `file_path` field from the response of the [upload urls API](https://docs.magichour.ai/api-reference/files/generate-asset-upload-urls).
10
10
  *
11
11
  * See the [file upload guide](https://docs.magichour.ai/api-reference/files/generate-asset-upload-urls#input-file) for details.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "magic-hour",
3
- "version": "0.85.0",
3
+ "version": "0.87.0",
4
4
  "main": "./dist/index.js",
5
5
  "types": "./dist/index.d.ts",
6
6
  "exports": {