magic-hour 0.43.1 → 0.45.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 (167) hide show
  1. package/README.md +82 -77
  2. package/dist/core/api-error.d.ts +6 -0
  3. package/dist/core/api-error.js +11 -0
  4. package/dist/core/api-promise.d.ts +28 -0
  5. package/dist/core/api-promise.js +252 -0
  6. package/dist/core/auth.d.ts +76 -0
  7. package/dist/core/auth.js +232 -0
  8. package/dist/core/binary-response.d.ts +6 -0
  9. package/dist/core/binary-response.js +10 -0
  10. package/dist/core/content-type.d.ts +4 -0
  11. package/dist/core/content-type.js +12 -0
  12. package/dist/core/core-client.d.ts +58 -0
  13. package/dist/core/core-client.js +168 -0
  14. package/dist/core/form-data.d.ts +26 -0
  15. package/dist/core/form-data.js +83 -0
  16. package/dist/core/index.d.ts +9 -0
  17. package/dist/core/index.js +28 -0
  18. package/dist/core/logger.d.ts +48 -0
  19. package/dist/core/logger.js +82 -0
  20. package/dist/core/query.d.ts +8 -0
  21. package/dist/core/query.js +77 -0
  22. package/dist/core/runtime.d.ts +4 -0
  23. package/dist/core/runtime.js +20 -0
  24. package/dist/core/zod.d.ts +13 -0
  25. package/dist/core/zod.js +60 -0
  26. package/dist/environment.d.ts +1 -1
  27. package/dist/environment.js +1 -1
  28. package/dist/examples/logging-example.d.ts +10 -0
  29. package/dist/examples/logging-example.js +137 -0
  30. package/dist/logging-client.d.ts +39 -0
  31. package/dist/logging-client.js +116 -0
  32. package/dist/resources/v1/ai-clothes-changer/request-types.d.ts +1 -1
  33. package/dist/resources/v1/ai-face-editor/request-types.d.ts +1 -1
  34. package/dist/resources/v1/ai-gif-generator/request-types.d.ts +1 -1
  35. package/dist/resources/v1/ai-headshot-generator/request-types.d.ts +1 -1
  36. package/dist/resources/v1/ai-image-editor/request-types.d.ts +1 -1
  37. package/dist/resources/v1/ai-image-editor/resource-client.d.ts +1 -1
  38. package/dist/resources/v1/ai-image-editor/resource-client.js +1 -1
  39. package/dist/resources/v1/ai-image-generator/request-types.d.ts +1 -1
  40. package/dist/resources/v1/ai-image-upscaler/request-types.d.ts +1 -1
  41. package/dist/resources/v1/ai-photo-editor/request-types.d.ts +1 -1
  42. package/dist/resources/v1/ai-qr-code-generator/request-types.d.ts +1 -1
  43. package/dist/resources/v1/ai-talking-photo/request-types.d.ts +1 -1
  44. package/dist/resources/v1/ai-voice-cloner/index.d.ts +2 -0
  45. package/dist/resources/v1/ai-voice-cloner/index.js +5 -0
  46. package/dist/resources/v1/ai-voice-cloner/request-types.d.ts +31 -0
  47. package/dist/resources/v1/ai-voice-cloner/request-types.js +77 -0
  48. package/dist/resources/v1/ai-voice-cloner/resource-client.d.ts +55 -0
  49. package/dist/resources/v1/ai-voice-cloner/resource-client.js +99 -0
  50. package/dist/resources/v1/ai-voice-generator/request-types.d.ts +1 -1
  51. package/dist/resources/v1/animation/request-types.d.ts +1 -1
  52. package/dist/resources/v1/audio-projects/resource-client.d.ts +9 -10
  53. package/dist/resources/v1/audio-projects/resource-client.js +8 -9
  54. package/dist/resources/v1/auto-subtitle-generator/request-types.d.ts +3 -3
  55. package/dist/resources/v1/face-swap/request-types.d.ts +3 -3
  56. package/dist/resources/v1/face-swap/resource-client.d.ts +20 -2
  57. package/dist/resources/v1/face-swap/resource-client.js +20 -2
  58. package/dist/resources/v1/face-swap-photo/request-types.d.ts +1 -1
  59. package/dist/resources/v1/files/resource-client.d.ts +13 -3
  60. package/dist/resources/v1/files/resource-client.js +54 -3
  61. package/dist/resources/v1/files/resource-client.test.js +45 -0
  62. package/dist/resources/v1/image-background-remover/request-types.d.ts +1 -1
  63. package/dist/resources/v1/image-projects/resource-client.d.ts +9 -10
  64. package/dist/resources/v1/image-projects/resource-client.js +8 -9
  65. package/dist/resources/v1/image-to-video/request-types.d.ts +1 -1
  66. package/dist/resources/v1/image-to-video/resource-client.d.ts +20 -2
  67. package/dist/resources/v1/image-to-video/resource-client.js +20 -2
  68. package/dist/resources/v1/index.d.ts +1 -0
  69. package/dist/resources/v1/index.js +2 -1
  70. package/dist/resources/v1/lip-sync/request-types.d.ts +3 -3
  71. package/dist/resources/v1/lip-sync/resource-client.d.ts +20 -2
  72. package/dist/resources/v1/lip-sync/resource-client.js +20 -2
  73. package/dist/resources/v1/photo-colorizer/request-types.d.ts +1 -1
  74. package/dist/resources/v1/photo-colorizer/resource-client.d.ts +1 -1
  75. package/dist/resources/v1/photo-colorizer/resource-client.js +1 -1
  76. package/dist/resources/v1/resource-client.d.ts +3 -0
  77. package/dist/resources/v1/resource-client.js +6 -0
  78. package/dist/resources/v1/text-to-video/request-types.d.ts +1 -1
  79. package/dist/resources/v1/text-to-video/resource-client.d.ts +20 -2
  80. package/dist/resources/v1/text-to-video/resource-client.js +20 -2
  81. package/dist/resources/v1/video-projects/resource-client.d.ts +9 -10
  82. package/dist/resources/v1/video-projects/resource-client.js +8 -9
  83. package/dist/resources/v1/video-to-video/request-types.d.ts +3 -3
  84. package/dist/resources/v1/video-to-video/resource-client.d.ts +20 -2
  85. package/dist/resources/v1/video-to-video/resource-client.js +20 -2
  86. package/dist/types/index.d.ts +4 -0
  87. package/dist/types/v1-ai-clothes-changer-create-body-assets-garment-type-enum.d.ts +6 -2
  88. package/dist/types/v1-ai-clothes-changer-create-body-assets.d.ts +9 -5
  89. package/dist/types/v1-ai-clothes-changer-create-body-assets.js +6 -2
  90. package/dist/types/v1-ai-clothes-changer-create-body.d.ts +1 -1
  91. package/dist/types/v1-ai-clothes-changer-create-response.d.ts +1 -1
  92. package/dist/types/v1-ai-face-editor-create-body-assets.d.ts +1 -1
  93. package/dist/types/v1-ai-face-editor-create-body.d.ts +1 -1
  94. package/dist/types/v1-ai-face-editor-create-response.d.ts +1 -1
  95. package/dist/types/v1-ai-gif-generator-create-body.d.ts +1 -1
  96. package/dist/types/v1-ai-gif-generator-create-response.d.ts +1 -1
  97. package/dist/types/v1-ai-headshot-generator-create-body-assets.d.ts +1 -1
  98. package/dist/types/v1-ai-headshot-generator-create-body.d.ts +1 -1
  99. package/dist/types/v1-ai-headshot-generator-create-response.d.ts +1 -1
  100. package/dist/types/v1-ai-image-editor-create-body-assets.d.ts +2 -2
  101. package/dist/types/v1-ai-image-editor-create-body.d.ts +1 -1
  102. package/dist/types/v1-ai-image-editor-create-response.d.ts +1 -1
  103. package/dist/types/v1-ai-image-generator-create-body.d.ts +1 -1
  104. package/dist/types/v1-ai-image-generator-create-response.d.ts +1 -1
  105. package/dist/types/v1-ai-image-upscaler-create-body-assets.d.ts +1 -1
  106. package/dist/types/v1-ai-image-upscaler-create-body.d.ts +1 -1
  107. package/dist/types/v1-ai-image-upscaler-create-response.d.ts +1 -1
  108. package/dist/types/v1-ai-meme-generator-create-response.d.ts +1 -1
  109. package/dist/types/v1-ai-photo-editor-create-body-assets.d.ts +1 -1
  110. package/dist/types/v1-ai-photo-editor-create-body.d.ts +1 -1
  111. package/dist/types/v1-ai-photo-editor-create-response.d.ts +1 -1
  112. package/dist/types/v1-ai-qr-code-generator-create-body.d.ts +1 -1
  113. package/dist/types/v1-ai-qr-code-generator-create-response.d.ts +1 -1
  114. package/dist/types/v1-ai-talking-photo-create-body-assets.d.ts +2 -2
  115. package/dist/types/v1-ai-talking-photo-create-body.d.ts +1 -1
  116. package/dist/types/v1-ai-talking-photo-create-response.d.ts +1 -1
  117. package/dist/types/v1-ai-voice-cloner-create-body-assets.d.ts +27 -0
  118. package/dist/types/v1-ai-voice-cloner-create-body-assets.js +67 -0
  119. package/dist/types/v1-ai-voice-cloner-create-body-style.d.ts +22 -0
  120. package/dist/types/v1-ai-voice-cloner-create-body-style.js +67 -0
  121. package/dist/types/v1-ai-voice-cloner-create-body.d.ts +31 -0
  122. package/dist/types/v1-ai-voice-cloner-create-body.js +77 -0
  123. package/dist/types/v1-ai-voice-cloner-create-response.d.ts +29 -0
  124. package/dist/types/v1-ai-voice-cloner-create-response.js +71 -0
  125. package/dist/types/v1-ai-voice-generator-create-body.d.ts +1 -1
  126. package/dist/types/v1-ai-voice-generator-create-response.d.ts +1 -1
  127. package/dist/types/v1-animation-create-body-assets.d.ts +2 -2
  128. package/dist/types/v1-animation-create-body.d.ts +1 -1
  129. package/dist/types/v1-animation-create-response.d.ts +1 -1
  130. package/dist/types/v1-audio-projects-get-response.d.ts +2 -2
  131. package/dist/types/v1-auto-subtitle-generator-create-body-assets.d.ts +1 -1
  132. package/dist/types/v1-auto-subtitle-generator-create-body.d.ts +3 -3
  133. package/dist/types/v1-auto-subtitle-generator-create-response.d.ts +1 -1
  134. package/dist/types/v1-face-detection-create-body-assets.d.ts +1 -1
  135. package/dist/types/v1-face-swap-create-body-assets-face-mappings-item.d.ts +1 -1
  136. package/dist/types/v1-face-swap-create-body-assets-face-swap-mode-enum.d.ts +3 -3
  137. package/dist/types/v1-face-swap-create-body-assets-video-source-enum.d.ts +1 -1
  138. package/dist/types/v1-face-swap-create-body-assets.d.ts +10 -7
  139. package/dist/types/v1-face-swap-create-body.d.ts +3 -3
  140. package/dist/types/v1-face-swap-create-response.d.ts +1 -1
  141. package/dist/types/v1-face-swap-photo-create-body-assets-face-mappings-item.d.ts +1 -1
  142. package/dist/types/v1-face-swap-photo-create-body-assets-face-swap-mode-enum.d.ts +3 -3
  143. package/dist/types/v1-face-swap-photo-create-body-assets.d.ts +5 -5
  144. package/dist/types/v1-face-swap-photo-create-body.d.ts +1 -1
  145. package/dist/types/v1-face-swap-photo-create-response.d.ts +1 -1
  146. package/dist/types/v1-image-background-remover-create-body-assets.d.ts +2 -2
  147. package/dist/types/v1-image-background-remover-create-body.d.ts +1 -1
  148. package/dist/types/v1-image-background-remover-create-response.d.ts +1 -1
  149. package/dist/types/v1-image-projects-get-response.d.ts +2 -2
  150. package/dist/types/v1-image-to-video-create-body-assets.d.ts +1 -1
  151. package/dist/types/v1-image-to-video-create-body.d.ts +1 -1
  152. package/dist/types/v1-image-to-video-create-response.d.ts +1 -1
  153. package/dist/types/v1-lip-sync-create-body-assets-video-source-enum.d.ts +1 -1
  154. package/dist/types/v1-lip-sync-create-body-assets.d.ts +7 -4
  155. package/dist/types/v1-lip-sync-create-body.d.ts +3 -3
  156. package/dist/types/v1-lip-sync-create-response.d.ts +1 -1
  157. package/dist/types/v1-photo-colorizer-create-body-assets.d.ts +1 -1
  158. package/dist/types/v1-photo-colorizer-create-body.d.ts +1 -1
  159. package/dist/types/v1-photo-colorizer-create-response.d.ts +1 -1
  160. package/dist/types/v1-text-to-video-create-body.d.ts +1 -1
  161. package/dist/types/v1-text-to-video-create-response.d.ts +1 -1
  162. package/dist/types/v1-video-projects-get-response.d.ts +4 -4
  163. package/dist/types/v1-video-to-video-create-body-assets-video-source-enum.d.ts +1 -1
  164. package/dist/types/v1-video-to-video-create-body-assets.d.ts +6 -3
  165. package/dist/types/v1-video-to-video-create-body.d.ts +3 -3
  166. package/dist/types/v1-video-to-video-create-response.d.ts +1 -1
  167. package/package.json +2 -2
@@ -10,7 +10,7 @@ export type CreateRequest = {
10
10
  */
11
11
  assets: V1VideoToVideoCreateBodyAssets;
12
12
  /**
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.
13
+ * End time of your clip (seconds). Must be greater than start_seconds.
14
14
  */
15
15
  endSeconds: number;
16
16
  /**
@@ -30,11 +30,11 @@ export type CreateRequest = {
30
30
  */
31
31
  height?: number | null | undefined;
32
32
  /**
33
- * The name of video. This value is mainly used for your own identification of the video.
33
+ * Give your video a custom name for easy identification.
34
34
  */
35
35
  name?: string | undefined;
36
36
  /**
37
- * 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.
37
+ * Start time of your clip (seconds). Must be ≥ 0.
38
38
  */
39
39
  startSeconds: number;
40
40
  style: V1VideoToVideoCreateBodyStyle;
@@ -53,10 +53,28 @@ export declare class VideoToVideoClient extends CoreResourceClient {
53
53
  /**
54
54
  * Video-to-Video
55
55
  *
56
- * Create a Video To Video video. The estimated frame cost is calculated using 30 FPS. This amount is deducted from your account balance when a video is queued. Once the video is complete, the cost will be updated based on the actual number of frames rendered.
56
+ * **What this API does**
57
57
  *
58
- * Get more information about this mode at our [product page](https://magichour.ai/products/video-to-video).
58
+ * Create the same Video To Video you can make in the browser, but programmatically, so you can automate it, run it at scale, or connect it to your own app or workflow.
59
59
  *
60
+ * **Good for**
61
+ * - Automation and batch processing
62
+ * - Adding video to video into apps, pipelines, or tools
63
+ *
64
+ * **How it works (3 steps)**
65
+ * 1) Upload your inputs (video, image, or audio) with [Generate Upload URLs](https://docs.magichour.ai/api-reference/files/generate-asset-upload-urls) and copy the `file_path`.
66
+ * 2) Send a request to create a video to video job with the basic fields.
67
+ * 3) Check the job status until it's `complete`, then download the result from `downloads`.
68
+ *
69
+ * **Key options**
70
+ * - Inputs: usually a file, sometimes a YouTube link, depending on project type
71
+ * - Resolution: free users are limited to 576px; higher plans unlock HD and larger sizes
72
+ * - Extra fields: e.g. `face_swap_mode`, `start_seconds`/`end_seconds`, or a text prompt
73
+ *
74
+ * **Cost**
75
+ * Credits are only charged for the frames that actually render. You'll see an estimate when the job is queued, and the final total after it's done.
76
+ *
77
+ * For detailed examples, see the [product page](https://magichour.ai/products/video-to-video).
60
78
  *
61
79
  * POST /v1/video-to-video
62
80
  */
@@ -95,10 +95,28 @@ class VideoToVideoClient extends make_api_request_js_1.CoreResourceClient {
95
95
  /**
96
96
  * Video-to-Video
97
97
  *
98
- * Create a Video To Video video. The estimated frame cost is calculated using 30 FPS. This amount is deducted from your account balance when a video is queued. Once the video is complete, the cost will be updated based on the actual number of frames rendered.
98
+ * **What this API does**
99
99
  *
100
- * Get more information about this mode at our [product page](https://magichour.ai/products/video-to-video).
100
+ * Create the same Video To Video you can make in the browser, but programmatically, so you can automate it, run it at scale, or connect it to your own app or workflow.
101
101
  *
102
+ * **Good for**
103
+ * - Automation and batch processing
104
+ * - Adding video to video into apps, pipelines, or tools
105
+ *
106
+ * **How it works (3 steps)**
107
+ * 1) Upload your inputs (video, image, or audio) with [Generate Upload URLs](https://docs.magichour.ai/api-reference/files/generate-asset-upload-urls) and copy the `file_path`.
108
+ * 2) Send a request to create a video to video job with the basic fields.
109
+ * 3) Check the job status until it's `complete`, then download the result from `downloads`.
110
+ *
111
+ * **Key options**
112
+ * - Inputs: usually a file, sometimes a YouTube link, depending on project type
113
+ * - Resolution: free users are limited to 576px; higher plans unlock HD and larger sizes
114
+ * - Extra fields: e.g. `face_swap_mode`, `start_seconds`/`end_seconds`, or a text prompt
115
+ *
116
+ * **Cost**
117
+ * Credits are only charged for the frames that actually render. You'll see an estimate when the job is queued, and the final total after it's done.
118
+ *
119
+ * For detailed examples, see the [product page](https://magichour.ai/products/video-to-video).
102
120
  *
103
121
  * POST /v1/video-to-video
104
122
  */
@@ -46,6 +46,10 @@ export { V1AiTalkingPhotoCreateBodyAssets } from "./v1-ai-talking-photo-create-b
46
46
  export { V1AiTalkingPhotoCreateBodyStyle } from "./v1-ai-talking-photo-create-body-style";
47
47
  export { V1AiTalkingPhotoCreateBodyStyleGenerationModeEnum } from "./v1-ai-talking-photo-create-body-style-generation-mode-enum";
48
48
  export { V1AiTalkingPhotoCreateResponse } from "./v1-ai-talking-photo-create-response";
49
+ export { V1AiVoiceClonerCreateBody } from "./v1-ai-voice-cloner-create-body";
50
+ export { V1AiVoiceClonerCreateBodyAssets } from "./v1-ai-voice-cloner-create-body-assets";
51
+ export { V1AiVoiceClonerCreateBodyStyle } from "./v1-ai-voice-cloner-create-body-style";
52
+ export { V1AiVoiceClonerCreateResponse } from "./v1-ai-voice-cloner-create-response";
49
53
  export { V1AiVoiceGeneratorCreateBody } from "./v1-ai-voice-generator-create-body";
50
54
  export { V1AiVoiceGeneratorCreateBodyStyle } from "./v1-ai-voice-generator-create-body-style";
51
55
  export { V1AiVoiceGeneratorCreateBodyStyleVoiceNameEnum } from "./v1-ai-voice-generator-create-body-style-voice-name-enum";
@@ -1,4 +1,8 @@
1
1
  /**
2
- * The type of the outfit.
2
+ * Type of garment to swap. If not provided, swaps the entire outfit.
3
+ * * `upper_body` - for shirts/jackets
4
+ * * `lower_body` - for pants/skirts
5
+ * * `dresses` - for entire outfit (deprecated, use `entire_outfit` instead)
6
+ * * `entire_outfit` - for entire outfit
3
7
  */
4
- export type V1AiClothesChangerCreateBodyAssetsGarmentTypeEnum = "dresses" | "lower_body" | "upper_body";
8
+ export type V1AiClothesChangerCreateBodyAssetsGarmentTypeEnum = "dresses" | "entire_outfit" | "lower_body" | "upper_body";
@@ -8,20 +8,24 @@ export type V1AiClothesChangerCreateBodyAssets = {
8
8
  * - a direct URL to the video file
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
- * Please refer to the [Input File documentation](https://docs.magichour.ai/api-reference/files/generate-asset-upload-urls#input-file) to learn more.
11
+ * See the [file upload guide](https://docs.magichour.ai/api-reference/files/generate-asset-upload-urls#input-file) for details.
12
12
  *
13
13
  */
14
14
  garmentFilePath: string;
15
15
  /**
16
- * The type of the outfit.
16
+ * Type of garment to swap. If not provided, swaps the entire outfit.
17
+ * * `upper_body` - for shirts/jackets
18
+ * * `lower_body` - for pants/skirts
19
+ * * `dresses` - for entire outfit (deprecated, use `entire_outfit` instead)
20
+ * * `entire_outfit` - for entire outfit
17
21
  */
18
- garmentType: "dresses" | "lower_body" | "upper_body";
22
+ garmentType?: ("dresses" | "entire_outfit" | "lower_body" | "upper_body") | undefined;
19
23
  /**
20
24
  * The image with the person. This value is either
21
25
  * - a direct URL to the video file
22
26
  * - `file_path` field from the response of the [upload urls API](https://docs.magichour.ai/api-reference/files/generate-asset-upload-urls).
23
27
  *
24
- * Please refer to the [Input File documentation](https://docs.magichour.ai/api-reference/files/generate-asset-upload-urls#input-file) to learn more.
28
+ * See the [file upload guide](https://docs.magichour.ai/api-reference/files/generate-asset-upload-urls#input-file) for details.
25
29
  *
26
30
  */
27
31
  personFilePath: string;
@@ -33,7 +37,7 @@ export type V1AiClothesChangerCreateBodyAssets = {
33
37
  */
34
38
  export type External$V1AiClothesChangerCreateBodyAssets = {
35
39
  garment_file_path: string;
36
- garment_type: "dresses" | "lower_body" | "upper_body";
40
+ garment_type?: ("dresses" | "entire_outfit" | "lower_body" | "upper_body") | undefined;
37
41
  person_file_path: string;
38
42
  };
39
43
  export declare const Schemas$V1AiClothesChangerCreateBodyAssets: {
@@ -42,7 +42,9 @@ const z = __importStar(require("zod"));
42
42
  const SchemaIn$V1AiClothesChangerCreateBodyAssets = z
43
43
  .object({
44
44
  garment_file_path: z.string(),
45
- garment_type: z.enum(["dresses", "lower_body", "upper_body"]),
45
+ garment_type: z
46
+ .enum(["dresses", "entire_outfit", "lower_body", "upper_body"])
47
+ .optional(),
46
48
  person_file_path: z.string(),
47
49
  })
48
50
  .transform((obj) => {
@@ -59,7 +61,9 @@ const SchemaIn$V1AiClothesChangerCreateBodyAssets = z
59
61
  const SchemaOut$V1AiClothesChangerCreateBodyAssets = z
60
62
  .object({
61
63
  garmentFilePath: z.string(),
62
- garmentType: z.enum(["dresses", "lower_body", "upper_body"]),
64
+ garmentType: z
65
+ .enum(["dresses", "entire_outfit", "lower_body", "upper_body"])
66
+ .optional(),
63
67
  personFilePath: z.string(),
64
68
  })
65
69
  .transform((obj) => {
@@ -9,7 +9,7 @@ export type V1AiClothesChangerCreateBody = {
9
9
  */
10
10
  assets: V1AiClothesChangerCreateBodyAssets;
11
11
  /**
12
- * The name of image. This value is mainly used for your own identification of the image.
12
+ * Give your image a custom name for easy identification.
13
13
  */
14
14
  name?: string | undefined;
15
15
  };
@@ -14,7 +14,7 @@ export type V1AiClothesChangerCreateResponse = {
14
14
  */
15
15
  frameCost: number;
16
16
  /**
17
- * Unique ID of the image. This value can be used in the [get image project API](https://docs.magichour.ai/api-reference/image-projects/get-image-details) to fetch additional details such as status
17
+ * Unique ID of the image. Use it with the [Get image Project API](https://docs.magichour.ai/api-reference/image-projects/get-image-details) to fetch status and downloads.
18
18
  */
19
19
  id: string;
20
20
  };
@@ -8,7 +8,7 @@ export type V1AiFaceEditorCreateBodyAssets = {
8
8
  * - a direct URL to the video file
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
- * Please refer to the [Input File documentation](https://docs.magichour.ai/api-reference/files/generate-asset-upload-urls#input-file) to learn more.
11
+ * See the [file upload guide](https://docs.magichour.ai/api-reference/files/generate-asset-upload-urls#input-file) for details.
12
12
  *
13
13
  */
14
14
  imageFilePath: string;
@@ -10,7 +10,7 @@ export type V1AiFaceEditorCreateBody = {
10
10
  */
11
11
  assets: V1AiFaceEditorCreateBodyAssets;
12
12
  /**
13
- * The name of image. This value is mainly used for your own identification of the image.
13
+ * Give your image a custom name for easy identification.
14
14
  */
15
15
  name?: string | undefined;
16
16
  /**
@@ -14,7 +14,7 @@ export type V1AiFaceEditorCreateResponse = {
14
14
  */
15
15
  frameCost: number;
16
16
  /**
17
- * Unique ID of the image. This value can be used in the [get image project API](https://docs.magichour.ai/api-reference/image-projects/get-image-details) to fetch additional details such as status
17
+ * Unique ID of the image. Use it with the [Get image Project API](https://docs.magichour.ai/api-reference/image-projects/get-image-details) to fetch status and downloads.
18
18
  */
19
19
  id: string;
20
20
  };
@@ -5,7 +5,7 @@ import { External$V1AiGifGeneratorCreateBodyStyle, V1AiGifGeneratorCreateBodySty
5
5
  */
6
6
  export type V1AiGifGeneratorCreateBody = {
7
7
  /**
8
- * The name of gif. This value is mainly used for your own identification of the gif.
8
+ * Give your gif a custom name for easy identification.
9
9
  */
10
10
  name?: string | undefined;
11
11
  /**
@@ -14,7 +14,7 @@ export type V1AiGifGeneratorCreateResponse = {
14
14
  */
15
15
  frameCost: number;
16
16
  /**
17
- * Unique ID of the image. This value can be used in the [get image project API](https://docs.magichour.ai/api-reference/image-projects/get-image-details) to fetch additional details such as status
17
+ * Unique ID of the image. Use it with the [Get image Project API](https://docs.magichour.ai/api-reference/image-projects/get-image-details) to fetch status and downloads.
18
18
  */
19
19
  id: string;
20
20
  };
@@ -8,7 +8,7 @@ export type V1AiHeadshotGeneratorCreateBodyAssets = {
8
8
  * - a direct URL to the video file
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
- * Please refer to the [Input File documentation](https://docs.magichour.ai/api-reference/files/generate-asset-upload-urls#input-file) to learn more.
11
+ * See the [file upload guide](https://docs.magichour.ai/api-reference/files/generate-asset-upload-urls#input-file) for details.
12
12
  *
13
13
  */
14
14
  imageFilePath: string;
@@ -10,7 +10,7 @@ export type V1AiHeadshotGeneratorCreateBody = {
10
10
  */
11
11
  assets: V1AiHeadshotGeneratorCreateBodyAssets;
12
12
  /**
13
- * The name of image. This value is mainly used for your own identification of the image.
13
+ * Give your image a custom name for easy identification.
14
14
  */
15
15
  name?: string | undefined;
16
16
  style?: V1AiHeadshotGeneratorCreateBodyStyle | undefined;
@@ -14,7 +14,7 @@ export type V1AiHeadshotGeneratorCreateResponse = {
14
14
  */
15
15
  frameCost: number;
16
16
  /**
17
- * Unique ID of the image. This value can be used in the [get image project API](https://docs.magichour.ai/api-reference/image-projects/get-image-details) to fetch additional details such as status
17
+ * Unique ID of the image. Use it with the [Get image Project API](https://docs.magichour.ai/api-reference/image-projects/get-image-details) to fetch status and downloads.
18
18
  */
19
19
  id: string;
20
20
  };
@@ -8,7 +8,7 @@ export type V1AiImageEditorCreateBodyAssets = {
8
8
  * - a direct URL to the video file
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
- * Please refer to the [Input File documentation](https://docs.magichour.ai/api-reference/files/generate-asset-upload-urls#input-file) to learn more.
11
+ * See the [file upload guide](https://docs.magichour.ai/api-reference/files/generate-asset-upload-urls#input-file) for details.
12
12
  *
13
13
  */
14
14
  imageFilePath?: string | undefined;
@@ -17,7 +17,7 @@ export type V1AiImageEditorCreateBodyAssets = {
17
17
  * - a direct URL to the video file
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
- * Please refer to the [Input File documentation](https://docs.magichour.ai/api-reference/files/generate-asset-upload-urls#input-file) to learn more.
20
+ * See the [file upload guide](https://docs.magichour.ai/api-reference/files/generate-asset-upload-urls#input-file) for details.
21
21
  *
22
22
  */
23
23
  imageFilePaths?: string[] | undefined;
@@ -10,7 +10,7 @@ export type V1AiImageEditorCreateBody = {
10
10
  */
11
11
  assets: V1AiImageEditorCreateBodyAssets;
12
12
  /**
13
- * The name of image. This value is mainly used for your own identification of the image.
13
+ * Give your image a custom name for easy identification.
14
14
  */
15
15
  name?: string | undefined;
16
16
  style: V1AiImageEditorCreateBodyStyle;
@@ -14,7 +14,7 @@ export type V1AiImageEditorCreateResponse = {
14
14
  */
15
15
  frameCost: number;
16
16
  /**
17
- * Unique ID of the image. This value can be used in the [get image project API](https://docs.magichour.ai/api-reference/image-projects/get-image-details) to fetch additional details such as status
17
+ * Unique ID of the image. Use it with the [Get image Project API](https://docs.magichour.ai/api-reference/image-projects/get-image-details) to fetch status and downloads.
18
18
  */
19
19
  id: string;
20
20
  };
@@ -9,7 +9,7 @@ export type V1AiImageGeneratorCreateBody = {
9
9
  */
10
10
  imageCount: number;
11
11
  /**
12
- * The name of image. This value is mainly used for your own identification of the image.
12
+ * Give your image a custom name for easy identification.
13
13
  */
14
14
  name?: string | undefined;
15
15
  /**
@@ -14,7 +14,7 @@ export type V1AiImageGeneratorCreateResponse = {
14
14
  */
15
15
  frameCost: number;
16
16
  /**
17
- * Unique ID of the image. This value can be used in the [get image project API](https://docs.magichour.ai/api-reference/image-projects/get-image-details) to fetch additional details such as status
17
+ * Unique ID of the image. Use it with the [Get image Project API](https://docs.magichour.ai/api-reference/image-projects/get-image-details) to fetch status and downloads.
18
18
  */
19
19
  id: string;
20
20
  };
@@ -8,7 +8,7 @@ export type V1AiImageUpscalerCreateBodyAssets = {
8
8
  * - a direct URL to the video file
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
- * Please refer to the [Input File documentation](https://docs.magichour.ai/api-reference/files/generate-asset-upload-urls#input-file) to learn more.
11
+ * See the [file upload guide](https://docs.magichour.ai/api-reference/files/generate-asset-upload-urls#input-file) for details.
12
12
  *
13
13
  */
14
14
  imageFilePath: string;
@@ -10,7 +10,7 @@ export type V1AiImageUpscalerCreateBody = {
10
10
  */
11
11
  assets: V1AiImageUpscalerCreateBodyAssets;
12
12
  /**
13
- * The name of image. This value is mainly used for your own identification of the image.
13
+ * Give your image a custom name for easy identification.
14
14
  */
15
15
  name?: string | undefined;
16
16
  /**
@@ -14,7 +14,7 @@ export type V1AiImageUpscalerCreateResponse = {
14
14
  */
15
15
  frameCost: number;
16
16
  /**
17
- * Unique ID of the image. This value can be used in the [get image project API](https://docs.magichour.ai/api-reference/image-projects/get-image-details) to fetch additional details such as status
17
+ * Unique ID of the image. Use it with the [Get image Project API](https://docs.magichour.ai/api-reference/image-projects/get-image-details) to fetch status and downloads.
18
18
  */
19
19
  id: string;
20
20
  };
@@ -14,7 +14,7 @@ export type V1AiMemeGeneratorCreateResponse = {
14
14
  */
15
15
  frameCost: number;
16
16
  /**
17
- * Unique ID of the image. This value can be used in the [get image project API](https://docs.magichour.ai/api-reference/image-projects/get-image-details) to fetch additional details such as status
17
+ * Unique ID of the image. Use it with the [Get image Project API](https://docs.magichour.ai/api-reference/image-projects/get-image-details) to fetch status and downloads.
18
18
  */
19
19
  id: string;
20
20
  };
@@ -8,7 +8,7 @@ export type V1AiPhotoEditorCreateBodyAssets = {
8
8
  * - a direct URL to the video file
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
- * Please refer to the [Input File documentation](https://docs.magichour.ai/api-reference/files/generate-asset-upload-urls#input-file) to learn more.
11
+ * See the [file upload guide](https://docs.magichour.ai/api-reference/files/generate-asset-upload-urls#input-file) for details.
12
12
  *
13
13
  */
14
14
  imageFilePath: string;
@@ -10,7 +10,7 @@ export type V1AiPhotoEditorCreateBody = {
10
10
  */
11
11
  assets: V1AiPhotoEditorCreateBodyAssets;
12
12
  /**
13
- * The name of image. This value is mainly used for your own identification of the image.
13
+ * Give your image a custom name for easy identification.
14
14
  */
15
15
  name?: string | undefined;
16
16
  /**
@@ -14,7 +14,7 @@ export type V1AiPhotoEditorCreateResponse = {
14
14
  */
15
15
  frameCost: number;
16
16
  /**
17
- * Unique ID of the image. This value can be used in the [get image project API](https://docs.magichour.ai/api-reference/image-projects/get-image-details) to fetch additional details such as status
17
+ * Unique ID of the image. Use it with the [Get image Project API](https://docs.magichour.ai/api-reference/image-projects/get-image-details) to fetch status and downloads.
18
18
  */
19
19
  id: string;
20
20
  };
@@ -9,7 +9,7 @@ export type V1AiQrCodeGeneratorCreateBody = {
9
9
  */
10
10
  content: string;
11
11
  /**
12
- * The name of image. This value is mainly used for your own identification of the image.
12
+ * Give your image a custom name for easy identification.
13
13
  */
14
14
  name?: string | undefined;
15
15
  style: V1AiQrCodeGeneratorCreateBodyStyle;
@@ -14,7 +14,7 @@ export type V1AiQrCodeGeneratorCreateResponse = {
14
14
  */
15
15
  frameCost: number;
16
16
  /**
17
- * Unique ID of the image. This value can be used in the [get image project API](https://docs.magichour.ai/api-reference/image-projects/get-image-details) to fetch additional details such as status
17
+ * Unique ID of the image. Use it with the [Get image Project API](https://docs.magichour.ai/api-reference/image-projects/get-image-details) to fetch status and downloads.
18
18
  */
19
19
  id: string;
20
20
  };
@@ -8,7 +8,7 @@ export type V1AiTalkingPhotoCreateBodyAssets = {
8
8
  * - a direct URL to the video file
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
- * Please refer to the [Input File documentation](https://docs.magichour.ai/api-reference/files/generate-asset-upload-urls#input-file) to learn more.
11
+ * See the [file upload guide](https://docs.magichour.ai/api-reference/files/generate-asset-upload-urls#input-file) for details.
12
12
  *
13
13
  */
14
14
  audioFilePath: string;
@@ -17,7 +17,7 @@ export type V1AiTalkingPhotoCreateBodyAssets = {
17
17
  * - a direct URL to the video file
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
- * Please refer to the [Input File documentation](https://docs.magichour.ai/api-reference/files/generate-asset-upload-urls#input-file) to learn more.
20
+ * See the [file upload guide](https://docs.magichour.ai/api-reference/files/generate-asset-upload-urls#input-file) for details.
21
21
  *
22
22
  */
23
23
  imageFilePath: string;
@@ -14,7 +14,7 @@ export type V1AiTalkingPhotoCreateBody = {
14
14
  */
15
15
  endSeconds: number;
16
16
  /**
17
- * The name of image. This value is mainly used for your own identification of the image.
17
+ * Give your image a custom name for easy identification.
18
18
  */
19
19
  name?: string | undefined;
20
20
  /**
@@ -16,7 +16,7 @@ export type V1AiTalkingPhotoCreateResponse = {
16
16
  */
17
17
  estimatedFrameCost: number;
18
18
  /**
19
- * Unique ID of the video. This value can be used in the [get video project API](https://docs.magichour.ai/api-reference/video-projects/get-video-details) to fetch additional details such as status
19
+ * Unique ID of the video. Use it with the [Get video Project API](https://docs.magichour.ai/api-reference/video-projects/get-video-details) to fetch status and downloads.
20
20
  */
21
21
  id: string;
22
22
  };
@@ -0,0 +1,27 @@
1
+ import * as z from "zod";
2
+ /**
3
+ * Provide the assets for voice cloning.
4
+ */
5
+ export type V1AiVoiceClonerCreateBodyAssets = {
6
+ /**
7
+ * The audio used to clone the voice. 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
+ * See the [file upload guide](https://docs.magichour.ai/api-reference/files/generate-asset-upload-urls#input-file) for details.
12
+ *
13
+ */
14
+ audioFilePath: string;
15
+ };
16
+ /**
17
+ * @internal
18
+ * V1AiVoiceClonerCreateBodyAssets without any key transformation, this is what
19
+ * we expect to come in as network data
20
+ */
21
+ export type External$V1AiVoiceClonerCreateBodyAssets = {
22
+ audio_file_path: string;
23
+ };
24
+ export declare const Schemas$V1AiVoiceClonerCreateBodyAssets: {
25
+ in: z.ZodType<V1AiVoiceClonerCreateBodyAssets, z.ZodTypeDef, unknown>;
26
+ out: z.ZodType<External$V1AiVoiceClonerCreateBodyAssets, z.ZodTypeDef, V1AiVoiceClonerCreateBodyAssets>;
27
+ };
@@ -0,0 +1,67 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || (function () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
24
+ };
25
+ return ownKeys(o);
26
+ };
27
+ return function (mod) {
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
33
+ };
34
+ })();
35
+ Object.defineProperty(exports, "__esModule", { value: true });
36
+ exports.Schemas$V1AiVoiceClonerCreateBodyAssets = void 0;
37
+ const make_api_request_js_1 = require("make-api-request-js");
38
+ const z = __importStar(require("zod"));
39
+ /**
40
+ * Takes network data, validates it, and transforms keys to match typescript object V1AiVoiceClonerCreateBodyAssets
41
+ */
42
+ const SchemaIn$V1AiVoiceClonerCreateBodyAssets = z
43
+ .object({
44
+ audio_file_path: z.string(),
45
+ })
46
+ .transform((obj) => {
47
+ return (0, make_api_request_js_1.zodTransform)(obj, {
48
+ audio_file_path: "audioFilePath",
49
+ });
50
+ });
51
+ /**
52
+ * @internal
53
+ * Takes typescript data, validates it, and maps keys to match the expected external object External$V1AiVoiceClonerCreateBodyAssets
54
+ */
55
+ const SchemaOut$V1AiVoiceClonerCreateBodyAssets = z
56
+ .object({
57
+ audioFilePath: z.string(),
58
+ })
59
+ .transform((obj) => {
60
+ return (0, make_api_request_js_1.zodTransform)(obj, {
61
+ audioFilePath: "audio_file_path",
62
+ });
63
+ });
64
+ exports.Schemas$V1AiVoiceClonerCreateBodyAssets = {
65
+ in: SchemaIn$V1AiVoiceClonerCreateBodyAssets,
66
+ out: SchemaOut$V1AiVoiceClonerCreateBodyAssets,
67
+ };
@@ -0,0 +1,22 @@
1
+ import * as z from "zod";
2
+ /**
3
+ * V1AiVoiceClonerCreateBodyStyle
4
+ */
5
+ export type V1AiVoiceClonerCreateBodyStyle = {
6
+ /**
7
+ * Text used to generate speech from the cloned voice. The character limit is 1000 characters.
8
+ */
9
+ prompt: string;
10
+ };
11
+ /**
12
+ * @internal
13
+ * V1AiVoiceClonerCreateBodyStyle without any key transformation, this is what
14
+ * we expect to come in as network data
15
+ */
16
+ export type External$V1AiVoiceClonerCreateBodyStyle = {
17
+ prompt: string;
18
+ };
19
+ export declare const Schemas$V1AiVoiceClonerCreateBodyStyle: {
20
+ in: z.ZodType<V1AiVoiceClonerCreateBodyStyle, z.ZodTypeDef, unknown>;
21
+ out: z.ZodType<External$V1AiVoiceClonerCreateBodyStyle, z.ZodTypeDef, V1AiVoiceClonerCreateBodyStyle>;
22
+ };