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
@@ -1,4 +1,4 @@
1
1
  export declare enum Environment {
2
2
  Environment = "https://api.magichour.ai",
3
- MockServer = "https://api.sideko.dev/v1/mock/magichour/magic-hour/0.33.1"
3
+ MockServer = "https://api.sideko.dev/v1/mock/magichour/magic-hour/0.35.0"
4
4
  }
@@ -4,5 +4,5 @@ exports.Environment = void 0;
4
4
  var Environment;
5
5
  (function (Environment) {
6
6
  Environment["Environment"] = "https://api.magichour.ai";
7
- Environment["MockServer"] = "https://api.sideko.dev/v1/mock/magichour/magic-hour/0.33.1";
7
+ Environment["MockServer"] = "https://api.sideko.dev/v1/mock/magichour/magic-hour/0.35.0";
8
8
  })(Environment || (exports.Environment = Environment = {}));
@@ -9,7 +9,7 @@ export type CreateRequest = {
9
9
  */
10
10
  assets: V1AiClothesChangerCreateBodyAssets;
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
  };
@@ -10,7 +10,7 @@ export type CreateRequest = {
10
10
  */
11
11
  assets: V1AiFaceEditorCreateBodyAssets;
12
12
  /**
13
- * The name of image
13
+ * The name of image. This value is mainly used for your own identification of the image.
14
14
  */
15
15
  name?: string | undefined;
16
16
  /**
@@ -5,7 +5,7 @@ import * as z from "zod";
5
5
  */
6
6
  export type CreateRequest = {
7
7
  /**
8
- * The name of gif
8
+ * The name of gif. This value is mainly used for your own identification of the gif.
9
9
  */
10
10
  name?: string | undefined;
11
11
  style: V1AiGifGeneratorCreateBodyStyle;
@@ -10,7 +10,7 @@ export type CreateRequest = {
10
10
  */
11
11
  assets: V1AiHeadshotGeneratorCreateBodyAssets;
12
12
  /**
13
- * The name of image
13
+ * The name of image. This value is mainly used for your own identification of the image.
14
14
  */
15
15
  name?: string | undefined;
16
16
  style?: V1AiHeadshotGeneratorCreateBodyStyle | undefined;
@@ -10,7 +10,7 @@ export type CreateRequest = {
10
10
  */
11
11
  assets: V1AiImageEditorCreateBodyAssets;
12
12
  /**
13
- * The name of image
13
+ * The name of image. This value is mainly used for your own identification of the image.
14
14
  */
15
15
  name?: string | undefined;
16
16
  style: V1AiImageEditorCreateBodyStyle;
@@ -5,14 +5,20 @@ import * as z from "zod";
5
5
  */
6
6
  export type CreateRequest = {
7
7
  /**
8
- * number to images to generate
8
+ * Number of images to generate.
9
9
  */
10
10
  imageCount: number;
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
+ /**
16
+ * The orientation of the output image(s).
17
+ */
15
18
  orientation: "landscape" | "portrait" | "square";
19
+ /**
20
+ * The art style to use for image generation.
21
+ */
16
22
  style: V1AiImageGeneratorCreateBodyStyle;
17
23
  };
18
24
  /**
@@ -10,11 +10,13 @@ export type CreateRequest = {
10
10
  */
11
11
  assets: V1AiImageUpscalerCreateBodyAssets;
12
12
  /**
13
- * The name of image
13
+ * The name of image. This value is mainly used for your own identification of the image.
14
14
  */
15
15
  name?: string | undefined;
16
16
  /**
17
- * How much to scale the image. Must be either 2 or 4
17
+ * How much to scale the image. Must be either 2 or 4.
18
+ *
19
+ * Note: 4x upscale is only available on Creator, Pro, or Business tier.
18
20
  */
19
21
  scaleFactor: number;
20
22
  style: V1AiImageUpscalerCreateBodyStyle;
@@ -10,7 +10,7 @@ export type CreateRequest = {
10
10
  */
11
11
  assets: V1AiPhotoEditorCreateBodyAssets;
12
12
  /**
13
- * The name of image
13
+ * The name of image. This value is mainly used for your own identification of the image.
14
14
  */
15
15
  name?: string | undefined;
16
16
  /**
@@ -9,7 +9,7 @@ export type CreateRequest = {
9
9
  */
10
10
  content: string;
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
  style: V1AiQrCodeGeneratorCreateBodyStyle;
@@ -14,7 +14,7 @@ export type CreateRequest = {
14
14
  */
15
15
  endSeconds: number;
16
16
  /**
17
- * The name of image
17
+ * The name of image. This value is mainly used for your own identification of the image.
18
18
  */
19
19
  name?: string | undefined;
20
20
  /**
@@ -10,7 +10,7 @@ export type CreateRequest = {
10
10
  */
11
11
  assets: V1AnimationCreateBodyAssets;
12
12
  /**
13
- * The end time of the input video in seconds
13
+ * This value determines the duration of the output video.
14
14
  */
15
15
  endSeconds: number;
16
16
  /**
@@ -22,7 +22,7 @@ export type CreateRequest = {
22
22
  */
23
23
  height: number;
24
24
  /**
25
- * The name of video
25
+ * The name of video. This value is mainly used for your own identification of the video.
26
26
  */
27
27
  name?: string | undefined;
28
28
  /**
@@ -10,15 +10,15 @@ export type CreateRequest = {
10
10
  */
11
11
  assets: V1AutoSubtitleGeneratorCreateBodyAssets;
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
  /**
17
- * The name of video
17
+ * The name of video. This value is mainly used for your own identification of the video.
18
18
  */
19
19
  name?: string | undefined;
20
20
  /**
21
- * The start time of the input video in seconds
21
+ * 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.
22
22
  */
23
23
  startSeconds: number;
24
24
  /**
@@ -5,7 +5,7 @@ import * as z from "zod";
5
5
  */
6
6
  export type GetRequest = {
7
7
  /**
8
- * The id of the task
8
+ * The id of the task. This value is returned by the [face detection API](/api-reference/files/face-detection#response-id).
9
9
  */
10
10
  id: string;
11
11
  };
@@ -8,6 +8,8 @@ export declare class FaceDetectionClient extends CoreResourceClient {
8
8
  *
9
9
  * Get the details of a face detection task.
10
10
  *
11
+ * Use this API to get the list of faces detected in the image or video to use in the [face swap photo](/api-reference/face-swap-photo/face-swap-photo) or [face swap video](/api-reference/face-swap/face-swap-video) API calls for multi-face swaps.
12
+ *
11
13
  * GET /v1/face-detection/{id}
12
14
  */
13
15
  get(request: requests.GetRequest, opts?: RequestOptions): ApiPromise<types.V1FaceDetectionGetResponse>;
@@ -16,6 +18,8 @@ export declare class FaceDetectionClient extends CoreResourceClient {
16
18
  *
17
19
  * Detect faces in an image or video.
18
20
  *
21
+ * Use this API to get the list of faces detected in the image or video to use in the [face swap photo](/api-reference/face-swap-photo/face-swap-photo) or [face swap video](/api-reference/face-swap/face-swap-video) API calls for multi-face swaps.
22
+ *
19
23
  * Note: Face detection is free to use for the near future. Pricing may change in the future.
20
24
  *
21
25
  * POST /v1/face-detection
@@ -14,6 +14,8 @@ class FaceDetectionClient extends core_1.CoreResourceClient {
14
14
  *
15
15
  * Get the details of a face detection task.
16
16
  *
17
+ * Use this API to get the list of faces detected in the image or video to use in the [face swap photo](/api-reference/face-swap-photo/face-swap-photo) or [face swap video](/api-reference/face-swap/face-swap-video) API calls for multi-face swaps.
18
+ *
17
19
  * GET /v1/face-detection/{id}
18
20
  */
19
21
  get(request, opts) {
@@ -30,6 +32,8 @@ class FaceDetectionClient extends core_1.CoreResourceClient {
30
32
  *
31
33
  * Detect faces in an image or video.
32
34
  *
35
+ * Use this API to get the list of faces detected in the image or video to use in the [face swap photo](/api-reference/face-swap-photo/face-swap-photo) or [face swap video](/api-reference/face-swap/face-swap-video) API calls for multi-face swaps.
36
+ *
33
37
  * Note: Face detection is free to use for the near future. Pricing may change in the future.
34
38
  *
35
39
  * POST /v1/face-detection
@@ -9,39 +9,37 @@ export type CreateRequest = {
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 CreateRequest = {
51
49
  export type External$CreateRequest = {
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$CreateRequest: {
60
58
  in: z.ZodType<CreateRequest, z.ZodTypeDef, unknown>;
@@ -44,10 +44,10 @@ const SchemaIn$CreateRequest = 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$CreateRequest = 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, {
@@ -9,7 +9,7 @@ export type CreateRequest = {
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
  };
@@ -4,6 +4,9 @@ import * as z from "zod";
4
4
  * CreateRequest
5
5
  */
6
6
  export type CreateRequest = {
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
  /**
@@ -6,19 +6,20 @@ export declare class UploadUrlsClient extends CoreResourceClient {
6
6
  /**
7
7
  * Generate asset upload urls
8
8
  *
9
- * Create a list of urls used to upload the assets needed to generate a video. Each video type has their own requirements on what assets are required. Please refer to the specific mode API for more details. The response array will be in the same order as the request body.
9
+ * Generates a list of pre-signed upload URLs for the assets required. This API is only necessary if you want to upload to Magic Hour's storage. Refer to the [Input Files Guide](/integration/input-files) for more details.
10
10
  *
11
- * Below is the list of valid extensions for each asset type:
11
+ * The response array will match the order of items in the request body.
12
12
  *
13
+ * **Valid file extensions per asset type**:
13
14
  * - video: mp4, m4v, mov, webm
14
15
  * - audio: mp3, mpeg, wav, aac, aiff, flac
15
16
  * - image: png, jpg, jpeg, webp, avif, jp2, tiff, bmp
16
17
  *
17
- * Note: `.gif` is supported for face swap API `video_file_path` field.
18
+ * > Note: `gif` is only supported for face swap API `video_file_path` field.
18
19
  *
19
- * After receiving the upload url, you can upload the file by sending a PUT request.
20
+ * Once you receive an upload URL, send a `PUT` request to upload the file directly.
20
21
  *
21
- * For example using curl
22
+ * Example:
22
23
  *
23
24
  * ```
24
25
  * curl -X PUT --data '@/path/to/file/video.mp4' \
@@ -11,19 +11,20 @@ class UploadUrlsClient extends core_1.CoreResourceClient {
11
11
  /**
12
12
  * Generate asset upload urls
13
13
  *
14
- * Create a list of urls used to upload the assets needed to generate a video. Each video type has their own requirements on what assets are required. Please refer to the specific mode API for more details. The response array will be in the same order as the request body.
14
+ * Generates a list of pre-signed upload URLs for the assets required. This API is only necessary if you want to upload to Magic Hour's storage. Refer to the [Input Files Guide](/integration/input-files) for more details.
15
15
  *
16
- * Below is the list of valid extensions for each asset type:
16
+ * The response array will match the order of items in the request body.
17
17
  *
18
+ * **Valid file extensions per asset type**:
18
19
  * - video: mp4, m4v, mov, webm
19
20
  * - audio: mp3, mpeg, wav, aac, aiff, flac
20
21
  * - image: png, jpg, jpeg, webp, avif, jp2, tiff, bmp
21
22
  *
22
- * Note: `.gif` is supported for face swap API `video_file_path` field.
23
+ * > Note: `gif` is only supported for face swap API `video_file_path` field.
23
24
  *
24
- * After receiving the upload url, you can upload the file by sending a PUT request.
25
+ * Once you receive an upload URL, send a `PUT` request to upload the file directly.
25
26
  *
26
- * For example using curl
27
+ * Example:
27
28
  *
28
29
  * ```
29
30
  * curl -X PUT --data '@/path/to/file/video.mp4' \
@@ -9,7 +9,7 @@ export type CreateRequest = {
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,7 @@ import * as z from "zod";
4
4
  */
5
5
  export type DeleteRequest = {
6
6
  /**
7
- * The id of the image project
7
+ * Unique ID of the image project. This value is returned by all of the POST APIs that create an image.
8
8
  */
9
9
  id: string;
10
10
  };
@@ -25,7 +25,7 @@ export declare const Schemas$DeleteRequest: {
25
25
  */
26
26
  export type GetRequest = {
27
27
  /**
28
- * The id of the image project
28
+ * Unique ID of the image project. This value is returned by all of the POST APIs that create an image.
29
29
  */
30
30
  id: string;
31
31
  };
@@ -6,7 +6,7 @@ export declare class ImageProjectsClient extends CoreResourceClient {
6
6
  /**
7
7
  * Delete image
8
8
  *
9
- * Permanently delete the rendered image. This action is not reversible, please be sure before deleting.
9
+ * Permanently delete the rendered image(s). This action is not reversible, please be sure before deleting.
10
10
  *
11
11
  * DELETE /v1/image-projects/{id}
12
12
  */
@@ -10,7 +10,7 @@ class ImageProjectsClient extends core_1.CoreResourceClient {
10
10
  /**
11
11
  * Delete image
12
12
  *
13
- * Permanently delete the rendered image. This action is not reversible, please be sure before deleting.
13
+ * Permanently delete the rendered image(s). This action is not reversible, please be sure before deleting.
14
14
  *
15
15
  * DELETE /v1/image-projects/{id}
16
16
  */
@@ -19,7 +19,6 @@ class ImageProjectsClient extends core_1.CoreResourceClient {
19
19
  method: "delete",
20
20
  path: `/v1/image-projects/${request.id}`,
21
21
  auth: ["bearerAuth"],
22
- responseRaw: true,
23
22
  opts,
24
23
  });
25
24
  }
@@ -14,22 +14,28 @@ export type CreateRequest = {
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 CreateRequest = {
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 CreateRequest = {
51
61
  export type External$CreateRequest = {
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$CreateRequest: {
61
71
  in: z.ZodType<CreateRequest, z.ZodTypeDef, unknown>;
@@ -45,11 +45,11 @@ const SchemaIn$CreateRequest = 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$CreateRequest = 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, {
@@ -9,43 +9,41 @@ export type CreateRequest = {
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 CreateRequest = {
55
53
  export type External$CreateRequest = {
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$CreateRequest: {
65
63
  in: z.ZodType<CreateRequest, z.ZodTypeDef, unknown>;