magic-hour 0.33.1 → 0.34.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 (94) 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 +3 -3
  19. package/dist/resources/v1/face-swap-photo/request-types.d.ts +1 -1
  20. package/dist/resources/v1/files/upload-urls/request-types.d.ts +3 -0
  21. package/dist/resources/v1/files/upload-urls/resource-client.d.ts +6 -5
  22. package/dist/resources/v1/files/upload-urls/resource-client.js +6 -5
  23. package/dist/resources/v1/image-background-remover/request-types.d.ts +1 -1
  24. package/dist/resources/v1/image-projects/request-types.d.ts +2 -2
  25. package/dist/resources/v1/image-projects/resource-client.d.ts +1 -1
  26. package/dist/resources/v1/image-projects/resource-client.js +1 -2
  27. package/dist/resources/v1/image-to-video/request-types.d.ts +4 -2
  28. package/dist/resources/v1/lip-sync/request-types.d.ts +3 -3
  29. package/dist/resources/v1/photo-colorizer/request-types.d.ts +1 -1
  30. package/dist/resources/v1/text-to-video/request-types.d.ts +8 -2
  31. package/dist/resources/v1/video-projects/request-types.d.ts +2 -2
  32. package/dist/resources/v1/video-projects/resource-client.js +0 -1
  33. package/dist/resources/v1/video-to-video/request-types.d.ts +3 -3
  34. package/dist/types/index.d.ts +0 -165
  35. package/dist/types/v1-ai-clothes-changer-create-body-assets-garment-type-enum.d.ts +1 -1
  36. package/dist/types/v1-ai-clothes-changer-create-body-assets.d.ts +15 -2
  37. package/dist/types/v1-ai-clothes-changer-create-body.d.ts +1 -1
  38. package/dist/types/v1-ai-face-editor-create-body-assets.d.ts +6 -1
  39. package/dist/types/v1-ai-face-editor-create-body-style.d.ts +30 -30
  40. package/dist/types/v1-ai-face-editor-create-body-style.js +30 -30
  41. package/dist/types/v1-ai-face-editor-create-body.d.ts +1 -1
  42. package/dist/types/v1-ai-gif-generator-create-body.d.ts +1 -1
  43. package/dist/types/v1-ai-headshot-generator-create-body-assets.d.ts +6 -1
  44. package/dist/types/v1-ai-headshot-generator-create-body-style.d.ts +1 -1
  45. package/dist/types/v1-ai-headshot-generator-create-body.d.ts +1 -1
  46. package/dist/types/v1-ai-image-editor-create-body-assets.d.ts +6 -1
  47. package/dist/types/v1-ai-image-editor-create-body.d.ts +1 -1
  48. package/dist/types/v1-ai-image-generator-create-body-orientation-enum.d.ts +1 -1
  49. package/dist/types/v1-ai-image-generator-create-body-style.d.ts +2 -2
  50. package/dist/types/v1-ai-image-generator-create-body.d.ts +8 -2
  51. package/dist/types/v1-ai-image-upscaler-create-body-assets.d.ts +6 -1
  52. package/dist/types/v1-ai-image-upscaler-create-body.d.ts +4 -2
  53. package/dist/types/v1-ai-photo-editor-create-body-assets.d.ts +6 -1
  54. package/dist/types/v1-ai-photo-editor-create-body.d.ts +1 -1
  55. package/dist/types/v1-ai-qr-code-generator-create-body.d.ts +1 -1
  56. package/dist/types/v1-ai-talking-photo-create-body-assets.d.ts +12 -2
  57. package/dist/types/v1-ai-talking-photo-create-body.d.ts +1 -1
  58. package/dist/types/v1-animation-create-body-assets.d.ts +12 -2
  59. package/dist/types/v1-animation-create-body-style-art-style-enum.d.ts +1 -1
  60. package/dist/types/v1-animation-create-body-style-camera-effect-enum.d.ts +1 -1
  61. package/dist/types/v1-animation-create-body-style-prompt-type-enum.d.ts +1 -1
  62. package/dist/types/v1-animation-create-body-style.d.ts +10 -5
  63. package/dist/types/v1-animation-create-body-style.js +2 -2
  64. package/dist/types/v1-animation-create-body.d.ts +2 -2
  65. package/dist/types/v1-auto-subtitle-generator-create-body-assets.d.ts +6 -1
  66. package/dist/types/v1-auto-subtitle-generator-create-body.d.ts +3 -3
  67. package/dist/types/v1-face-detection-create-body-assets.d.ts +6 -1
  68. package/dist/types/v1-face-detection-create-response.d.ts +1 -1
  69. package/dist/types/v1-face-detection-get-response.d.ts +1 -1
  70. package/dist/types/v1-face-swap-create-body-assets-face-mappings-item.d.ts +6 -1
  71. package/dist/types/v1-face-swap-create-body-assets.d.ts +12 -2
  72. package/dist/types/v1-face-swap-create-body.d.ts +3 -3
  73. package/dist/types/v1-face-swap-photo-create-body-assets-face-mappings-item.d.ts +6 -1
  74. package/dist/types/v1-face-swap-photo-create-body-assets.d.ts +12 -2
  75. package/dist/types/v1-face-swap-photo-create-body.d.ts +1 -1
  76. package/dist/types/v1-files-upload-urls-create-body-items-item-type-enum.d.ts +1 -1
  77. package/dist/types/v1-files-upload-urls-create-body-items-item.d.ts +2 -2
  78. package/dist/types/v1-files-upload-urls-create-body.d.ts +3 -0
  79. package/dist/types/v1-files-upload-urls-create-response.d.ts +3 -0
  80. package/dist/types/v1-image-background-remover-create-body-assets.d.ts +12 -2
  81. package/dist/types/v1-image-background-remover-create-body.d.ts +1 -1
  82. package/dist/types/v1-image-to-video-create-body-assets.d.ts +6 -1
  83. package/dist/types/v1-image-to-video-create-body-resolution-enum.d.ts +3 -1
  84. package/dist/types/v1-image-to-video-create-body.d.ts +4 -2
  85. package/dist/types/v1-lip-sync-create-body-assets.d.ts +12 -2
  86. package/dist/types/v1-lip-sync-create-body.d.ts +3 -3
  87. package/dist/types/v1-photo-colorizer-create-body-assets.d.ts +6 -1
  88. package/dist/types/v1-photo-colorizer-create-body.d.ts +1 -1
  89. package/dist/types/v1-text-to-video-create-body-resolution-enum.d.ts +3 -1
  90. package/dist/types/v1-text-to-video-create-body.d.ts +8 -2
  91. package/dist/types/v1-video-projects-get-response.d.ts +2 -2
  92. package/dist/types/v1-video-to-video-create-body-assets.d.ts +6 -1
  93. package/dist/types/v1-video-to-video-create-body.d.ts +3 -3
  94. package/package.json +1 -1
@@ -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,7 +9,7 @@ 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
  /**
@@ -28,11 +28,11 @@ export type V1LipSyncCreateBody = {
28
28
  */
29
29
  maxFpsLimit?: number | undefined;
30
30
  /**
31
- * The name of video
31
+ * The name of video. This value is mainly used for your own identification of the video.
32
32
  */
33
33
  name?: string | undefined;
34
34
  /**
35
- * The start time of the input video in seconds
35
+ * 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
36
  */
37
37
  startSeconds: number;
38
38
  /**
@@ -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";
@@ -10,7 +10,7 @@ export type V1VideoToVideoCreateBody = {
10
10
  */
11
11
  assets: V1VideoToVideoCreateBodyAssets;
12
12
  /**
13
- * The end time of the input video in seconds
13
+ * 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.
14
14
  */
15
15
  endSeconds: number;
16
16
  /**
@@ -31,11 +31,11 @@ export type V1VideoToVideoCreateBody = {
31
31
  */
32
32
  height?: number | undefined;
33
33
  /**
34
- * The name of video
34
+ * The name of video. This value is mainly used for your own identification of the video.
35
35
  */
36
36
  name?: string | undefined;
37
37
  /**
38
- * The start time of the input video in seconds
38
+ * 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.
39
39
  */
40
40
  startSeconds: number;
41
41
  style: V1VideoToVideoCreateBodyStyle;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "magic-hour",
3
- "version": "0.33.1",
3
+ "version": "0.34.0",
4
4
  "main": "./dist/index.js",
5
5
  "types": "./dist/index.d.ts",
6
6
  "exports": {