magic-hour 0.33.1 → 0.35.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 (102) hide show
  1. package/dist/environment.d.ts +1 -1
  2. package/dist/environment.js +1 -1
  3. package/dist/resources/v1/ai-clothes-changer/request-types.d.ts +1 -1
  4. package/dist/resources/v1/ai-face-editor/request-types.d.ts +1 -1
  5. package/dist/resources/v1/ai-gif-generator/request-types.d.ts +1 -1
  6. package/dist/resources/v1/ai-headshot-generator/request-types.d.ts +1 -1
  7. package/dist/resources/v1/ai-image-editor/request-types.d.ts +1 -1
  8. package/dist/resources/v1/ai-image-generator/request-types.d.ts +8 -2
  9. package/dist/resources/v1/ai-image-upscaler/request-types.d.ts +4 -2
  10. package/dist/resources/v1/ai-photo-editor/request-types.d.ts +1 -1
  11. package/dist/resources/v1/ai-qr-code-generator/request-types.d.ts +1 -1
  12. package/dist/resources/v1/ai-talking-photo/request-types.d.ts +1 -1
  13. package/dist/resources/v1/animation/request-types.d.ts +2 -2
  14. package/dist/resources/v1/auto-subtitle-generator/request-types.d.ts +3 -3
  15. package/dist/resources/v1/face-detection/request-types.d.ts +1 -1
  16. package/dist/resources/v1/face-detection/resource-client.d.ts +4 -0
  17. package/dist/resources/v1/face-detection/resource-client.js +4 -0
  18. package/dist/resources/v1/face-swap/request-types.d.ts +17 -19
  19. package/dist/resources/v1/face-swap/request-types.js +4 -4
  20. package/dist/resources/v1/face-swap-photo/request-types.d.ts +1 -1
  21. package/dist/resources/v1/files/upload-urls/request-types.d.ts +3 -0
  22. package/dist/resources/v1/files/upload-urls/resource-client.d.ts +6 -5
  23. package/dist/resources/v1/files/upload-urls/resource-client.js +6 -5
  24. package/dist/resources/v1/image-background-remover/request-types.d.ts +1 -1
  25. package/dist/resources/v1/image-projects/request-types.d.ts +2 -2
  26. package/dist/resources/v1/image-projects/resource-client.d.ts +1 -1
  27. package/dist/resources/v1/image-projects/resource-client.js +1 -2
  28. package/dist/resources/v1/image-to-video/request-types.d.ts +20 -10
  29. package/dist/resources/v1/image-to-video/request-types.js +4 -4
  30. package/dist/resources/v1/lip-sync/request-types.d.ts +17 -19
  31. package/dist/resources/v1/lip-sync/request-types.js +4 -4
  32. package/dist/resources/v1/photo-colorizer/request-types.d.ts +1 -1
  33. package/dist/resources/v1/text-to-video/request-types.d.ts +8 -2
  34. package/dist/resources/v1/video-projects/request-types.d.ts +2 -2
  35. package/dist/resources/v1/video-projects/resource-client.js +0 -1
  36. package/dist/resources/v1/video-to-video/request-types.d.ts +17 -19
  37. package/dist/resources/v1/video-to-video/request-types.js +4 -4
  38. package/dist/types/index.d.ts +0 -165
  39. package/dist/types/v1-ai-clothes-changer-create-body-assets-garment-type-enum.d.ts +1 -1
  40. package/dist/types/v1-ai-clothes-changer-create-body-assets.d.ts +15 -2
  41. package/dist/types/v1-ai-clothes-changer-create-body.d.ts +1 -1
  42. package/dist/types/v1-ai-face-editor-create-body-assets.d.ts +6 -1
  43. package/dist/types/v1-ai-face-editor-create-body-style.d.ts +30 -30
  44. package/dist/types/v1-ai-face-editor-create-body-style.js +30 -30
  45. package/dist/types/v1-ai-face-editor-create-body.d.ts +1 -1
  46. package/dist/types/v1-ai-gif-generator-create-body.d.ts +1 -1
  47. package/dist/types/v1-ai-headshot-generator-create-body-assets.d.ts +6 -1
  48. package/dist/types/v1-ai-headshot-generator-create-body-style.d.ts +1 -1
  49. package/dist/types/v1-ai-headshot-generator-create-body.d.ts +1 -1
  50. package/dist/types/v1-ai-image-editor-create-body-assets.d.ts +6 -1
  51. package/dist/types/v1-ai-image-editor-create-body.d.ts +1 -1
  52. package/dist/types/v1-ai-image-generator-create-body-orientation-enum.d.ts +1 -1
  53. package/dist/types/v1-ai-image-generator-create-body-style.d.ts +2 -2
  54. package/dist/types/v1-ai-image-generator-create-body.d.ts +8 -2
  55. package/dist/types/v1-ai-image-upscaler-create-body-assets.d.ts +6 -1
  56. package/dist/types/v1-ai-image-upscaler-create-body.d.ts +4 -2
  57. package/dist/types/v1-ai-photo-editor-create-body-assets.d.ts +6 -1
  58. package/dist/types/v1-ai-photo-editor-create-body.d.ts +1 -1
  59. package/dist/types/v1-ai-qr-code-generator-create-body.d.ts +1 -1
  60. package/dist/types/v1-ai-talking-photo-create-body-assets.d.ts +12 -2
  61. package/dist/types/v1-ai-talking-photo-create-body.d.ts +1 -1
  62. package/dist/types/v1-animation-create-body-assets.d.ts +12 -2
  63. package/dist/types/v1-animation-create-body-style-art-style-enum.d.ts +1 -1
  64. package/dist/types/v1-animation-create-body-style-camera-effect-enum.d.ts +1 -1
  65. package/dist/types/v1-animation-create-body-style-prompt-type-enum.d.ts +1 -1
  66. package/dist/types/v1-animation-create-body-style.d.ts +10 -5
  67. package/dist/types/v1-animation-create-body-style.js +2 -2
  68. package/dist/types/v1-animation-create-body.d.ts +2 -2
  69. package/dist/types/v1-auto-subtitle-generator-create-body-assets.d.ts +6 -1
  70. package/dist/types/v1-auto-subtitle-generator-create-body.d.ts +3 -3
  71. package/dist/types/v1-face-detection-create-body-assets.d.ts +6 -1
  72. package/dist/types/v1-face-detection-create-response.d.ts +1 -1
  73. package/dist/types/v1-face-detection-get-response.d.ts +1 -1
  74. package/dist/types/v1-face-swap-create-body-assets-face-mappings-item.d.ts +6 -1
  75. package/dist/types/v1-face-swap-create-body-assets.d.ts +12 -2
  76. package/dist/types/v1-face-swap-create-body.d.ts +17 -19
  77. package/dist/types/v1-face-swap-create-body.js +4 -4
  78. package/dist/types/v1-face-swap-photo-create-body-assets-face-mappings-item.d.ts +6 -1
  79. package/dist/types/v1-face-swap-photo-create-body-assets.d.ts +12 -2
  80. package/dist/types/v1-face-swap-photo-create-body.d.ts +1 -1
  81. package/dist/types/v1-files-upload-urls-create-body-items-item-type-enum.d.ts +1 -1
  82. package/dist/types/v1-files-upload-urls-create-body-items-item.d.ts +2 -2
  83. package/dist/types/v1-files-upload-urls-create-body.d.ts +3 -0
  84. package/dist/types/v1-files-upload-urls-create-response.d.ts +3 -0
  85. package/dist/types/v1-image-background-remover-create-body-assets.d.ts +12 -2
  86. package/dist/types/v1-image-background-remover-create-body.d.ts +1 -1
  87. package/dist/types/v1-image-to-video-create-body-assets.d.ts +6 -1
  88. package/dist/types/v1-image-to-video-create-body-resolution-enum.d.ts +3 -1
  89. package/dist/types/v1-image-to-video-create-body.d.ts +20 -10
  90. package/dist/types/v1-image-to-video-create-body.js +4 -4
  91. package/dist/types/v1-lip-sync-create-body-assets.d.ts +12 -2
  92. package/dist/types/v1-lip-sync-create-body.d.ts +17 -19
  93. package/dist/types/v1-lip-sync-create-body.js +4 -4
  94. package/dist/types/v1-photo-colorizer-create-body-assets.d.ts +6 -1
  95. package/dist/types/v1-photo-colorizer-create-body.d.ts +1 -1
  96. package/dist/types/v1-text-to-video-create-body-resolution-enum.d.ts +3 -1
  97. package/dist/types/v1-text-to-video-create-body.d.ts +8 -2
  98. package/dist/types/v1-video-projects-get-response.d.ts +2 -2
  99. package/dist/types/v1-video-to-video-create-body-assets.d.ts +6 -1
  100. package/dist/types/v1-video-to-video-create-body.d.ts +17 -19
  101. package/dist/types/v1-video-to-video-create-body.js +4 -4
  102. package/package.json +1 -1
@@ -13,7 +13,7 @@ export type V1FaceDetectionGetResponse = {
13
13
  */
14
14
  faces: V1FaceDetectionGetResponseFacesItem[];
15
15
  /**
16
- * The id of the task
16
+ * The id of the task. This value is returned by the [face detection API](/api-reference/files/face-detection#response-id).
17
17
  */
18
18
  id: string;
19
19
  /**
@@ -4,7 +4,12 @@ import * as z from "zod";
4
4
  */
5
5
  export type V1FaceSwapCreateBodyAssetsFaceMappingsItem = {
6
6
  /**
7
- * The face image that will be used to replace the face in the `original_face`. This value can be either the `file_path` field from the response of the [upload urls API](https://docs.magichour.ai/api-reference/files/generate-asset-upload-urls), or the url of the file.
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
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
+ * Please refer to the [Input File documentation](https://docs.magichour.ai/api-reference/files/generate-asset-upload-urls#input-file) to learn more.
12
+ *
8
13
  */
9
14
  newFace: string;
10
15
  /**
@@ -17,11 +17,21 @@ export type V1FaceSwapCreateBodyAssets = {
17
17
  /**
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
- * This value can be either the `file_path` field from the response of the [upload urls API](https://docs.magichour.ai/api-reference/files/generate-asset-upload-urls), or the url of the file.
20
+ * This value is either
21
+ * - a direct URL to the video file
22
+ * - `file_path` field from the response of the [upload urls API](https://docs.magichour.ai/api-reference/files/generate-asset-upload-urls).
23
+ *
24
+ * Please refer to the [Input File documentation](https://docs.magichour.ai/api-reference/files/generate-asset-upload-urls#input-file) to learn more.
25
+ *
21
26
  */
22
27
  imageFilePath?: string | undefined;
23
28
  /**
24
- * The path of the input video. This field is required if `video_source` is `file`. This value can be either the `file_path` field from the response of the [upload urls API](https://docs.magichour.ai/api-reference/files/generate-asset-upload-urls), or the url of the file.
29
+ * Required if `video_source` is `file`. This value is either
30
+ * - a direct URL to the video file
31
+ * - `file_path` field from the response of the [upload urls API](https://docs.magichour.ai/api-reference/files/generate-asset-upload-urls).
32
+ *
33
+ * Please refer to the [Input File documentation](https://docs.magichour.ai/api-reference/files/generate-asset-upload-urls#input-file) to learn more.
34
+ *
25
35
  */
26
36
  videoFilePath?: string | undefined;
27
37
  videoSource: "file" | "youtube";
@@ -9,39 +9,37 @@ export type V1FaceSwapCreateBody = {
9
9
  */
10
10
  assets: V1FaceSwapCreateBodyAssets;
11
11
  /**
12
- * The end time of the input video in seconds
12
+ * The end time of the input video in seconds. This value is used to trim the input video. The value must be greater than 0.1, and more than the start_seconds.
13
13
  */
14
14
  endSeconds: number;
15
15
  /**
16
- * Used to determine the dimensions of the output video.
16
+ * `height` is deprecated and no longer influences the output video's resolution.
17
17
  *
18
- * * If height is provided, width will also be required. The larger value between width and height will be used to determine the maximum output resolution while maintaining the original aspect ratio.
19
- * * If both height and width are omitted, the video will be resized according to your subscription's maximum resolution, while preserving aspect ratio.
18
+ * Output resolution is determined by the **minimum** of:
19
+ * - The resolution of the input video
20
+ * - The maximum resolution allowed by your subscription tier. See our [pricing page](https://magichour.ai/pricing) for more details.
20
21
  *
21
- * Note: if the video's original resolution is less than the maximum, the video will not be resized.
22
- *
23
- * See our [pricing page](https://magichour.ai/pricing) for more details.
22
+ * This field is retained only for backward compatibility and will be removed in a future release.
24
23
  */
25
- height?: number | undefined;
24
+ height?: number | null | undefined;
26
25
  /**
27
- * The name of video
26
+ * The name of video. This value is mainly used for your own identification of the video.
28
27
  */
29
28
  name?: string | undefined;
30
29
  /**
31
- * The start time of the input video in seconds
30
+ * The start time of the input video in seconds. This value is used to trim the input video. The value must be greater than 0.
32
31
  */
33
32
  startSeconds: number;
34
33
  /**
35
- * Used to determine the dimensions of the output video.
36
- *
37
- * * If width is provided, height will also be required. The larger value between width and height will be used to determine the maximum output resolution while maintaining the original aspect ratio.
38
- * * If both height and width are omitted, the video will be resized according to your subscription's maximum resolution, while preserving aspect ratio.
34
+ * `width` is deprecated and no longer influences the output video's resolution.
39
35
  *
40
- * Note: if the video's original resolution is less than the maximum, the video will not be resized.
36
+ * Output resolution is determined by the **minimum** of:
37
+ * - The resolution of the input video
38
+ * - The maximum resolution allowed by your subscription tier. See our [pricing page](https://magichour.ai/pricing) for more details.
41
39
  *
42
- * See our [pricing page](https://magichour.ai/pricing) for more details.
40
+ * This field is retained only for backward compatibility and will be removed in a future release.
43
41
  */
44
- width?: number | undefined;
42
+ width?: number | null | undefined;
45
43
  };
46
44
  /**
47
45
  * @internal
@@ -51,10 +49,10 @@ export type V1FaceSwapCreateBody = {
51
49
  export type External$V1FaceSwapCreateBody = {
52
50
  assets: External$V1FaceSwapCreateBodyAssets;
53
51
  end_seconds: number;
54
- height?: number | undefined;
52
+ height?: number | null | undefined;
55
53
  name?: string | undefined;
56
54
  start_seconds: number;
57
- width?: number | undefined;
55
+ width?: number | null | undefined;
58
56
  };
59
57
  export declare const Schemas$V1FaceSwapCreateBody: {
60
58
  in: z.ZodType<V1FaceSwapCreateBody, z.ZodTypeDef, unknown>;
@@ -44,10 +44,10 @@ const SchemaIn$V1FaceSwapCreateBody = z
44
44
  .object({
45
45
  assets: v1_face_swap_create_body_assets_1.Schemas$V1FaceSwapCreateBodyAssets.in,
46
46
  end_seconds: z.number(),
47
- height: z.number().int().optional(),
47
+ height: z.number().int().nullable().optional(),
48
48
  name: z.string().optional(),
49
49
  start_seconds: z.number(),
50
- width: z.number().int().optional(),
50
+ width: z.number().int().nullable().optional(),
51
51
  })
52
52
  .transform((obj) => {
53
53
  return (0, core_1.zodTransform)(obj, {
@@ -67,10 +67,10 @@ const SchemaOut$V1FaceSwapCreateBody = z
67
67
  .object({
68
68
  assets: v1_face_swap_create_body_assets_1.Schemas$V1FaceSwapCreateBodyAssets.out,
69
69
  endSeconds: z.number(),
70
- height: z.number().int().optional(),
70
+ height: z.number().int().nullable().optional(),
71
71
  name: z.string().optional(),
72
72
  startSeconds: z.number(),
73
- width: z.number().int().optional(),
73
+ width: z.number().int().nullable().optional(),
74
74
  })
75
75
  .transform((obj) => {
76
76
  return (0, core_1.zodTransform)(obj, {
@@ -4,7 +4,12 @@ import * as z from "zod";
4
4
  */
5
5
  export type V1FaceSwapPhotoCreateBodyAssetsFaceMappingsItem = {
6
6
  /**
7
- * The face image that will be used to replace the face in the `original_face`. This value can be either the `file_path` field from the response of the [upload urls API](https://docs.magichour.ai/api-reference/files/generate-asset-upload-urls), or the url of the file.
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
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
+ * Please refer to the [Input File documentation](https://docs.magichour.ai/api-reference/files/generate-asset-upload-urls#input-file) to learn more.
12
+ *
8
13
  */
9
14
  newFace: string;
10
15
  /**
@@ -17,11 +17,21 @@ export type V1FaceSwapPhotoCreateBodyAssets = {
17
17
  /**
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
- * This value can be either the `file_path` field from the response of the [upload urls API](https://docs.magichour.ai/api-reference/files/generate-asset-upload-urls), or the url of the file.
20
+ * This value is either
21
+ * - a direct URL to the video file
22
+ * - `file_path` field from the response of the [upload urls API](https://docs.magichour.ai/api-reference/files/generate-asset-upload-urls).
23
+ *
24
+ * Please refer to the [Input File documentation](https://docs.magichour.ai/api-reference/files/generate-asset-upload-urls#input-file) to learn more.
25
+ *
21
26
  */
22
27
  sourceFilePath?: string | undefined;
23
28
  /**
24
- * This is the image where the face from the source image will be placed. This value can be either the `file_path` field from the response of the [upload urls API](https://docs.magichour.ai/api-reference/files/generate-asset-upload-urls), or the url of the file.
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
31
+ * - `file_path` field from the response of the [upload urls API](https://docs.magichour.ai/api-reference/files/generate-asset-upload-urls).
32
+ *
33
+ * Please refer to the [Input File documentation](https://docs.magichour.ai/api-reference/files/generate-asset-upload-urls#input-file) to learn more.
34
+ *
25
35
  */
26
36
  targetFilePath: string;
27
37
  };
@@ -9,7 +9,7 @@ export type V1FaceSwapPhotoCreateBody = {
9
9
  */
10
10
  assets: V1FaceSwapPhotoCreateBodyAssets;
11
11
  /**
12
- * The name of image
12
+ * The name of image. This value is mainly used for your own identification of the image.
13
13
  */
14
14
  name?: string | undefined;
15
15
  };
@@ -1,4 +1,4 @@
1
1
  /**
2
- * The type of asset to upload
2
+ * The type of asset to upload. Possible types are video, audio, image
3
3
  */
4
4
  export type V1FilesUploadUrlsCreateBodyItemsItemTypeEnum = "audio" | "image" | "video";
@@ -4,11 +4,11 @@ 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.
7
+ * The extension of the file to upload. Do not include the dot (.) before the extension. Possible extensions are mp4,m4v,mov,webm,mp3,mpeg,wav,aac,aiff,flac,png,jpg,jpeg,webp,avif,jp2,tiff,bmp
8
8
  */
9
9
  extension: string;
10
10
  /**
11
- * The type of asset to upload
11
+ * The type of asset to upload. Possible types are video, audio, image
12
12
  */
13
13
  type: "audio" | "image" | "video";
14
14
  };
@@ -4,6 +4,9 @@ import * as z from "zod";
4
4
  * V1FilesUploadUrlsCreateBody
5
5
  */
6
6
  export type V1FilesUploadUrlsCreateBody = {
7
+ /**
8
+ * The list of assets to upload. The response array will match the order of items in the request body.
9
+ */
7
10
  items: V1FilesUploadUrlsCreateBodyItemsItem[];
8
11
  };
9
12
  /**
@@ -4,6 +4,9 @@ import * as z from "zod";
4
4
  * Success
5
5
  */
6
6
  export type V1FilesUploadUrlsCreateResponse = {
7
+ /**
8
+ * The list of upload URLs and file paths for the assets. The response array will match the order of items in the request body. Refer to the [Input Files Guide](/integration/input-files) for more details.
9
+ */
7
10
  items: V1FilesUploadUrlsCreateResponseItemsItem[];
8
11
  };
9
12
  /**
@@ -6,11 +6,21 @@ export type V1ImageBackgroundRemoverCreateBodyAssets = {
6
6
  /**
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
- * This value can be either the `file_path` field from the response of the [upload urls API](https://docs.magichour.ai/api-reference/files/generate-asset-upload-urls), or the url of the file.
9
+ * This value is either
10
+ * - a direct URL to the video file
11
+ * - `file_path` field from the response of the [upload urls API](https://docs.magichour.ai/api-reference/files/generate-asset-upload-urls).
12
+ *
13
+ * Please refer to the [Input File documentation](https://docs.magichour.ai/api-reference/files/generate-asset-upload-urls#input-file) to learn more.
14
+ *
10
15
  */
11
16
  backgroundImageFilePath?: string | undefined;
12
17
  /**
13
- * The image to remove the background. This value can be either the `file_path` field from the response of the [upload urls API](https://docs.magichour.ai/api-reference/files/generate-asset-upload-urls), or the url of the file.
18
+ * The image to remove the background. This value is either
19
+ * - a direct URL to the video file
20
+ * - `file_path` field from the response of the [upload urls API](https://docs.magichour.ai/api-reference/files/generate-asset-upload-urls).
21
+ *
22
+ * Please refer to the [Input File documentation](https://docs.magichour.ai/api-reference/files/generate-asset-upload-urls#input-file) to learn more.
23
+ *
14
24
  */
15
25
  imageFilePath: string;
16
26
  };
@@ -9,7 +9,7 @@ export type V1ImageBackgroundRemoverCreateBody = {
9
9
  */
10
10
  assets: V1ImageBackgroundRemoverCreateBodyAssets;
11
11
  /**
12
- * The name of image
12
+ * The name of image. This value is mainly used for your own identification of the image.
13
13
  */
14
14
  name?: string | undefined;
15
15
  };
@@ -4,7 +4,12 @@ import * as z from "zod";
4
4
  */
5
5
  export type V1ImageToVideoCreateBodyAssets = {
6
6
  /**
7
- * The path of the image file. This value can be either the `file_path` field from the response of the [upload urls API](https://docs.magichour.ai/api-reference/files/generate-asset-upload-urls), or the url of the file.
7
+ * The path of the image file. This value is either
8
+ * - a direct URL to the video file
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
+ * Please refer to the [Input File documentation](https://docs.magichour.ai/api-reference/files/generate-asset-upload-urls#input-file) to learn more.
12
+ *
8
13
  */
9
14
  imageFilePath: string;
10
15
  };
@@ -1,9 +1,11 @@
1
1
  /**
2
2
  * Controls the output video resolution. Defaults to `720p` if not specified.
3
3
  *
4
+ * 480p and 720p are available on Creator, Pro, or Business tiers. However, 1080p require Pro or Business tier.
5
+ *
4
6
  * **Options:**
5
7
  * - `480p` - Supports only 5 or 10 second videos. Output: 24fps. Cost: 120 credits per 5 seconds.
6
8
  * - `720p` - Supports videos between 5-60 seconds. Output: 30fps. Cost: 300 credits per 5 seconds.
7
- * - `1080p` - Supports videos between 5-60 seconds. Output: 30fps. Cost: 600 credits per 5 seconds. **Requires** `pro` or `business` tier.
9
+ * - `1080p` - Supports videos between 5-60 seconds. Output: 30fps. Cost: 600 credits per 5 seconds.
8
10
  */
9
11
  export type V1ImageToVideoCreateBodyResolutionEnum = "1080p" | "480p" | "720p";
@@ -14,22 +14,28 @@ export type V1ImageToVideoCreateBody = {
14
14
  */
15
15
  endSeconds: number;
16
16
  /**
17
- * This field does not affect the output video's resolution. The video's orientation will match that of the input image.
17
+ * `height` is deprecated and no longer influences the output video's resolution.
18
18
  *
19
- * It is retained solely for backward compatibility and will be deprecated in the future.
19
+ * Output resolution is determined by the **minimum** of:
20
+ * - The resolution of the input video
21
+ * - The maximum resolution allowed by your subscription tier. See our [pricing page](https://magichour.ai/pricing) for more details.
22
+ *
23
+ * This field is retained only for backward compatibility and will be removed in a future release.
20
24
  */
21
- height?: number | undefined;
25
+ height?: number | null | undefined;
22
26
  /**
23
- * The name of video
27
+ * The name of video. This value is mainly used for your own identification of the video.
24
28
  */
25
29
  name?: string | undefined;
26
30
  /**
27
31
  * Controls the output video resolution. Defaults to `720p` if not specified.
28
32
  *
33
+ * 480p and 720p are available on Creator, Pro, or Business tiers. However, 1080p require Pro or Business tier.
34
+ *
29
35
  * **Options:**
30
36
  * - `480p` - Supports only 5 or 10 second videos. Output: 24fps. Cost: 120 credits per 5 seconds.
31
37
  * - `720p` - Supports videos between 5-60 seconds. Output: 30fps. Cost: 300 credits per 5 seconds.
32
- * - `1080p` - Supports videos between 5-60 seconds. Output: 30fps. Cost: 600 credits per 5 seconds. **Requires** `pro` or `business` tier.
38
+ * - `1080p` - Supports videos between 5-60 seconds. Output: 30fps. Cost: 600 credits per 5 seconds.
33
39
  */
34
40
  resolution?: ("1080p" | "480p" | "720p") | undefined;
35
41
  /**
@@ -37,11 +43,15 @@ export type V1ImageToVideoCreateBody = {
37
43
  */
38
44
  style?: V1ImageToVideoCreateBodyStyle | undefined;
39
45
  /**
40
- * This field does not affect the output video's resolution. The video's orientation will match that of the input image.
46
+ * `width` is deprecated and no longer influences the output video's resolution.
47
+ *
48
+ * Output resolution is determined by the **minimum** of:
49
+ * - The resolution of the input video
50
+ * - The maximum resolution allowed by your subscription tier. See our [pricing page](https://magichour.ai/pricing) for more details.
41
51
  *
42
- * It is retained solely for backward compatibility and will be deprecated in the future.
52
+ * This field is retained only for backward compatibility and will be removed in a future release.
43
53
  */
44
- width?: number | undefined;
54
+ width?: number | null | undefined;
45
55
  };
46
56
  /**
47
57
  * @internal
@@ -51,11 +61,11 @@ export type V1ImageToVideoCreateBody = {
51
61
  export type External$V1ImageToVideoCreateBody = {
52
62
  assets: External$V1ImageToVideoCreateBodyAssets;
53
63
  end_seconds: number;
54
- height?: number | undefined;
64
+ height?: number | null | undefined;
55
65
  name?: string | undefined;
56
66
  resolution?: ("1080p" | "480p" | "720p") | undefined;
57
67
  style?: External$V1ImageToVideoCreateBodyStyle | undefined;
58
- width?: number | undefined;
68
+ width?: number | null | undefined;
59
69
  };
60
70
  export declare const Schemas$V1ImageToVideoCreateBody: {
61
71
  in: z.ZodType<V1ImageToVideoCreateBody, z.ZodTypeDef, unknown>;
@@ -45,11 +45,11 @@ const SchemaIn$V1ImageToVideoCreateBody = z
45
45
  .object({
46
46
  assets: v1_image_to_video_create_body_assets_1.Schemas$V1ImageToVideoCreateBodyAssets.in,
47
47
  end_seconds: z.number(),
48
- height: z.number().int().optional(),
48
+ height: z.number().int().nullable().optional(),
49
49
  name: z.string().optional(),
50
50
  resolution: z.enum(["1080p", "480p", "720p"]).optional(),
51
51
  style: v1_image_to_video_create_body_style_1.Schemas$V1ImageToVideoCreateBodyStyle.in.optional(),
52
- width: z.number().int().optional(),
52
+ width: z.number().int().nullable().optional(),
53
53
  })
54
54
  .transform((obj) => {
55
55
  return (0, core_1.zodTransform)(obj, {
@@ -70,11 +70,11 @@ const SchemaOut$V1ImageToVideoCreateBody = z
70
70
  .object({
71
71
  assets: v1_image_to_video_create_body_assets_1.Schemas$V1ImageToVideoCreateBodyAssets.out,
72
72
  endSeconds: z.number(),
73
- height: z.number().int().optional(),
73
+ height: z.number().int().nullable().optional(),
74
74
  name: z.string().optional(),
75
75
  resolution: z.enum(["1080p", "480p", "720p"]).optional(),
76
76
  style: v1_image_to_video_create_body_style_1.Schemas$V1ImageToVideoCreateBodyStyle.out.optional(),
77
- width: z.number().int().optional(),
77
+ width: z.number().int().nullable().optional(),
78
78
  })
79
79
  .transform((obj) => {
80
80
  return (0, core_1.zodTransform)(obj, {
@@ -4,11 +4,21 @@ import * as z from "zod";
4
4
  */
5
5
  export type V1LipSyncCreateBodyAssets = {
6
6
  /**
7
- * The path of the audio file. This value can be either the `file_path` field from the response of the [upload urls API](https://docs.magichour.ai/api-reference/files/generate-asset-upload-urls), or the url of the file.
7
+ * The path of the audio file. This value is either
8
+ * - a direct URL to the video file
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
+ * Please refer to the [Input File documentation](https://docs.magichour.ai/api-reference/files/generate-asset-upload-urls#input-file) to learn more.
12
+ *
8
13
  */
9
14
  audioFilePath: string;
10
15
  /**
11
- * The path of the input video. This field is required if `video_source` is `file`. This value can be either the `file_path` field from the response of the [upload urls API](https://docs.magichour.ai/api-reference/files/generate-asset-upload-urls), or the url of the file.
16
+ * Required if `video_source` is `file`. This value is either
17
+ * - a direct URL to the video file
18
+ * - `file_path` field from the response of the [upload urls API](https://docs.magichour.ai/api-reference/files/generate-asset-upload-urls).
19
+ *
20
+ * Please refer to the [Input File documentation](https://docs.magichour.ai/api-reference/files/generate-asset-upload-urls#input-file) to learn more.
21
+ *
12
22
  */
13
23
  videoFilePath?: string | undefined;
14
24
  videoSource: "file" | "youtube";
@@ -9,43 +9,41 @@ export type V1LipSyncCreateBody = {
9
9
  */
10
10
  assets: V1LipSyncCreateBodyAssets;
11
11
  /**
12
- * The end time of the input video in seconds
12
+ * The end time of the input video in seconds. This value is used to trim the input video. The value must be greater than 0.1, and more than the start_seconds.
13
13
  */
14
14
  endSeconds: number;
15
15
  /**
16
- * Used to determine the dimensions of the output video.
16
+ * `height` is deprecated and no longer influences the output video's resolution.
17
17
  *
18
- * * If height is provided, width will also be required. The larger value between width and height will be used to determine the maximum output resolution while maintaining the original aspect ratio.
19
- * * If both height and width are omitted, the video will be resized according to your subscription's maximum resolution, while preserving aspect ratio.
18
+ * Output resolution is determined by the **minimum** of:
19
+ * - The resolution of the input video
20
+ * - The maximum resolution allowed by your subscription tier. See our [pricing page](https://magichour.ai/pricing) for more details.
20
21
  *
21
- * Note: if the video's original resolution is less than the maximum, the video will not be resized.
22
- *
23
- * See our [pricing page](https://magichour.ai/pricing) for more details.
22
+ * This field is retained only for backward compatibility and will be removed in a future release.
24
23
  */
25
- height?: number | undefined;
24
+ height?: number | null | undefined;
26
25
  /**
27
26
  * Defines the maximum FPS (frames per second) for the output video. If the input video's FPS is lower than this limit, the output video will retain the input FPS. This is useful for reducing unnecessary frame usage in scenarios where high FPS is not required.
28
27
  */
29
28
  maxFpsLimit?: number | undefined;
30
29
  /**
31
- * The name of video
30
+ * The name of video. This value is mainly used for your own identification of the video.
32
31
  */
33
32
  name?: string | undefined;
34
33
  /**
35
- * The start time of the input video in seconds
34
+ * The start time of the input video in seconds. This value is used to trim the input video. The value must be greater than 0.
36
35
  */
37
36
  startSeconds: number;
38
37
  /**
39
- * Used to determine the dimensions of the output video.
40
- *
41
- * * If width is provided, height will also be required. The larger value between width and height will be used to determine the maximum output resolution while maintaining the original aspect ratio.
42
- * * If both height and width are omitted, the video will be resized according to your subscription's maximum resolution, while preserving aspect ratio.
38
+ * `width` is deprecated and no longer influences the output video's resolution.
43
39
  *
44
- * Note: if the video's original resolution is less than the maximum, the video will not be resized.
40
+ * Output resolution is determined by the **minimum** of:
41
+ * - The resolution of the input video
42
+ * - The maximum resolution allowed by your subscription tier. See our [pricing page](https://magichour.ai/pricing) for more details.
45
43
  *
46
- * See our [pricing page](https://magichour.ai/pricing) for more details.
44
+ * This field is retained only for backward compatibility and will be removed in a future release.
47
45
  */
48
- width?: number | undefined;
46
+ width?: number | null | undefined;
49
47
  };
50
48
  /**
51
49
  * @internal
@@ -55,11 +53,11 @@ export type V1LipSyncCreateBody = {
55
53
  export type External$V1LipSyncCreateBody = {
56
54
  assets: External$V1LipSyncCreateBodyAssets;
57
55
  end_seconds: number;
58
- height?: number | undefined;
56
+ height?: number | null | undefined;
59
57
  max_fps_limit?: number | undefined;
60
58
  name?: string | undefined;
61
59
  start_seconds: number;
62
- width?: number | undefined;
60
+ width?: number | null | undefined;
63
61
  };
64
62
  export declare const Schemas$V1LipSyncCreateBody: {
65
63
  in: z.ZodType<V1LipSyncCreateBody, z.ZodTypeDef, unknown>;
@@ -44,11 +44,11 @@ const SchemaIn$V1LipSyncCreateBody = z
44
44
  .object({
45
45
  assets: v1_lip_sync_create_body_assets_1.Schemas$V1LipSyncCreateBodyAssets.in,
46
46
  end_seconds: z.number(),
47
- height: z.number().int().optional(),
47
+ height: z.number().int().nullable().optional(),
48
48
  max_fps_limit: z.number().optional(),
49
49
  name: z.string().optional(),
50
50
  start_seconds: z.number(),
51
- width: z.number().int().optional(),
51
+ width: z.number().int().nullable().optional(),
52
52
  })
53
53
  .transform((obj) => {
54
54
  return (0, core_1.zodTransform)(obj, {
@@ -69,11 +69,11 @@ const SchemaOut$V1LipSyncCreateBody = z
69
69
  .object({
70
70
  assets: v1_lip_sync_create_body_assets_1.Schemas$V1LipSyncCreateBodyAssets.out,
71
71
  endSeconds: z.number(),
72
- height: z.number().int().optional(),
72
+ height: z.number().int().nullable().optional(),
73
73
  maxFpsLimit: z.number().optional(),
74
74
  name: z.string().optional(),
75
75
  startSeconds: z.number(),
76
- width: z.number().int().optional(),
76
+ width: z.number().int().nullable().optional(),
77
77
  })
78
78
  .transform((obj) => {
79
79
  return (0, core_1.zodTransform)(obj, {
@@ -4,7 +4,12 @@ import * as z from "zod";
4
4
  */
5
5
  export type V1PhotoColorizerCreateBodyAssets = {
6
6
  /**
7
- * The image used to generate the colorized image. This value can be either the `file_path` field from the response of the [upload urls API](https://docs.magichour.ai/api-reference/files/generate-asset-upload-urls), or the url of the file.
7
+ * The image used to generate the colorized image. This value is either
8
+ * - a direct URL to the video file
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
+ * Please refer to the [Input File documentation](https://docs.magichour.ai/api-reference/files/generate-asset-upload-urls#input-file) to learn more.
12
+ *
8
13
  */
9
14
  imageFilePath: string;
10
15
  };
@@ -9,7 +9,7 @@ export type V1PhotoColorizerCreateBody = {
9
9
  */
10
10
  assets: V1PhotoColorizerCreateBodyAssets;
11
11
  /**
12
- * The name of image
12
+ * The name of image. This value is mainly used for your own identification of the image.
13
13
  */
14
14
  name?: string | undefined;
15
15
  };
@@ -1,9 +1,11 @@
1
1
  /**
2
2
  * Controls the output video resolution. Defaults to `720p` if not specified.
3
3
  *
4
+ * 480p and 720p are available on Creator, Pro, or Business tiers. However, 1080p require Pro or Business tier.
5
+ *
4
6
  * **Options:**
5
7
  * - `480p` - Supports only 5 or 10 second videos. Output: 24fps. Cost: 120 credits per 5 seconds.
6
8
  * - `720p` - Supports videos between 5-60 seconds. Output: 30fps. Cost: 300 credits per 5 seconds.
7
- * - `1080p` - Supports videos between 5-60 seconds. Output: 30fps. Cost: 600 credits per 5 seconds. **Requires** `pro` or `business` tier.
9
+ * - `1080p` - Supports videos between 5-60 seconds. Output: 30fps. Cost: 600 credits per 5 seconds.
8
10
  */
9
11
  export type V1TextToVideoCreateBodyResolutionEnum = "1080p" | "480p" | "720p";
@@ -6,10 +6,14 @@ import * as z from "zod";
6
6
  export type V1TextToVideoCreateBody = {
7
7
  /**
8
8
  * The total duration of the output video in seconds.
9
+ *
10
+ * The value must be greater than or equal to 5 seconds and less than or equal to 60 seconds.
11
+ *
12
+ * Note: For 480p resolution, the value must be either 5 or 10.
9
13
  */
10
14
  endSeconds: number;
11
15
  /**
12
- * The name of video
16
+ * The name of video. This value is mainly used for your own identification of the video.
13
17
  */
14
18
  name?: string | undefined;
15
19
  /**
@@ -19,10 +23,12 @@ export type V1TextToVideoCreateBody = {
19
23
  /**
20
24
  * Controls the output video resolution. Defaults to `720p` if not specified.
21
25
  *
26
+ * 480p and 720p are available on Creator, Pro, or Business tiers. However, 1080p require Pro or Business tier.
27
+ *
22
28
  * **Options:**
23
29
  * - `480p` - Supports only 5 or 10 second videos. Output: 24fps. Cost: 120 credits per 5 seconds.
24
30
  * - `720p` - Supports videos between 5-60 seconds. Output: 30fps. Cost: 300 credits per 5 seconds.
25
- * - `1080p` - Supports videos between 5-60 seconds. Output: 30fps. Cost: 600 credits per 5 seconds. **Requires** `pro` or `business` tier.
31
+ * - `1080p` - Supports videos between 5-60 seconds. Output: 30fps. Cost: 600 credits per 5 seconds.
26
32
  */
27
33
  resolution?: ("1080p" | "480p" | "720p") | undefined;
28
34
  style: V1TextToVideoCreateBodyStyle;
@@ -23,7 +23,7 @@ export type V1VideoProjectsGetResponse = {
23
23
  */
24
24
  enabled: boolean;
25
25
  /**
26
- * The end time of the input video in seconds
26
+ * The end time of the input video in seconds. This value is used to trim the input video. The value must be greater than 0.1, and more than the start_seconds.
27
27
  */
28
28
  endSeconds: number;
29
29
  /**
@@ -47,7 +47,7 @@ export type V1VideoProjectsGetResponse = {
47
47
  */
48
48
  name: string | null;
49
49
  /**
50
- * The start time of the input video in seconds
50
+ * The start time of the input video in seconds. This value is used to trim the input video. The value must be greater than 0.
51
51
  */
52
52
  startSeconds: number;
53
53
  /**
@@ -4,7 +4,12 @@ import * as z from "zod";
4
4
  */
5
5
  export type V1VideoToVideoCreateBodyAssets = {
6
6
  /**
7
- * The path of the input video. This field is required if `video_source` is `file`. This value can be either the `file_path` field from the response of the [upload urls API](https://docs.magichour.ai/api-reference/files/generate-asset-upload-urls), or the url of the file.
7
+ * Required if `video_source` is `file`. This value is either
8
+ * - a direct URL to the video file
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
+ * Please refer to the [Input File documentation](https://docs.magichour.ai/api-reference/files/generate-asset-upload-urls#input-file) to learn more.
12
+ *
8
13
  */
9
14
  videoFilePath?: string | undefined;
10
15
  videoSource: "file" | "youtube";