magic-hour 0.66.0 → 0.67.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.
@@ -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.67.0"
3
+ MockServer = "https://api.sideko.dev/v1/mock/magichour/magic-hour/0.68.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.67.0";
7
+ Environment["MockServer"] = "https://api.sideko.dev/v1/mock/magichour/magic-hour/0.68.0";
8
8
  })(Environment || (exports.Environment = Environment = {}));
@@ -20,9 +20,9 @@ export type CreateRequest = {
20
20
  */
21
21
  scaleFactor: number;
22
22
  /**
23
- * Style settings for the upscale. Use `mode` to select between `"pro"` (faster, no enhancement required) and `"creative"` (defaults to `"Balanced"` enhancement). Defaults to `"creative"`.
23
+ * Style settings for the upscale. Use `mode` (`"preserve"`, `"balanced"`, or `"creative"`). Defaults to `"balanced"`.
24
24
  */
25
- style: V1AiImageUpscalerCreateBodyStyle;
25
+ style?: V1AiImageUpscalerCreateBodyStyle | undefined;
26
26
  };
27
27
  /**
28
28
  * @internal
@@ -33,7 +33,7 @@ export type External$CreateRequest = {
33
33
  assets: External$V1AiImageUpscalerCreateBodyAssets;
34
34
  name?: string | undefined;
35
35
  scale_factor: number;
36
- style: External$V1AiImageUpscalerCreateBodyStyle;
36
+ style?: External$V1AiImageUpscalerCreateBodyStyle | undefined;
37
37
  };
38
38
  export declare const Schemas$CreateRequest: {
39
39
  in: z.ZodType<CreateRequest, z.ZodTypeDef, unknown>;
@@ -46,7 +46,7 @@ const SchemaIn$CreateRequest = z
46
46
  assets: v1_ai_image_upscaler_create_body_assets_1.Schemas$V1AiImageUpscalerCreateBodyAssets.in,
47
47
  name: z.string().optional(),
48
48
  scale_factor: z.number(),
49
- style: v1_ai_image_upscaler_create_body_style_1.Schemas$V1AiImageUpscalerCreateBodyStyle.in,
49
+ style: v1_ai_image_upscaler_create_body_style_1.Schemas$V1AiImageUpscalerCreateBodyStyle.in.optional(),
50
50
  })
51
51
  .transform((obj) => {
52
52
  return (0, make_api_request_js_1.zodTransform)(obj, {
@@ -65,7 +65,7 @@ const SchemaOut$CreateRequest = z
65
65
  assets: v1_ai_image_upscaler_create_body_assets_1.Schemas$V1AiImageUpscalerCreateBodyAssets.out,
66
66
  name: z.string().optional(),
67
67
  scaleFactor: z.number(),
68
- style: v1_ai_image_upscaler_create_body_style_1.Schemas$V1AiImageUpscalerCreateBodyStyle.out,
68
+ style: v1_ai_image_upscaler_create_body_style_1.Schemas$V1AiImageUpscalerCreateBodyStyle.out.optional(),
69
69
  })
70
70
  .transform((obj) => {
71
71
  return (0, make_api_request_js_1.zodTransform)(obj, {
@@ -45,7 +45,7 @@ export declare class AiImageUpscalerClient extends CoreResourceClient {
45
45
  /**
46
46
  * AI Image Upscaler
47
47
  *
48
- * Upscale your image using AI. Each 2x upscale costs 50 credits, and 4x upscale costs 200 credits.
48
+ * Upscale your image using AI. Each 2x upscale costs 50 credits for balanced/creative modes, and 25 credits for preserve. 4x upscale costs 200 and 100 credits respectively.
49
49
  *
50
50
  * POST /v1/ai-image-upscaler
51
51
  */
@@ -81,7 +81,7 @@ class AiImageUpscalerClient extends make_api_request_js_1.CoreResourceClient {
81
81
  /**
82
82
  * AI Image Upscaler
83
83
  *
84
- * Upscale your image using AI. Each 2x upscale costs 50 credits, and 4x upscale costs 200 credits.
84
+ * Upscale your image using AI. Each 2x upscale costs 50 credits for balanced/creative modes, and 25 credits for preserve. 4x upscale costs 200 and 100 credits respectively.
85
85
  *
86
86
  * POST /v1/ai-image-upscaler
87
87
  */
@@ -12,8 +12,8 @@ export declare class UploadUrlsClient extends CoreResourceClient {
12
12
  *
13
13
  * **Valid file extensions per asset type**:
14
14
  * - video: mp4, m4v, mov, webm
15
- * - audio: mp3, wav, aac, flac, webm, m4a, opus, ogg, aiff, amr
16
- * - image: png, jpg, jpeg, jfif, heic, heif, webp, avif, jp2, tiff, bmp
15
+ * - audio: mp3, wav, aac, flac, webm, weba, m4a, opus, ogg, oga, aiff, amr
16
+ * - image: png, jpg, jpeg, jfif, heic, heif, webp, avif, jp2, tiff, tif, bmp
17
17
  * - gif: gif, webp, webm
18
18
  *
19
19
  * > Note: `gif` is only supported for face swap API `video_file_path` field.
@@ -17,8 +17,8 @@ class UploadUrlsClient extends make_api_request_js_1.CoreResourceClient {
17
17
  *
18
18
  * **Valid file extensions per asset type**:
19
19
  * - video: mp4, m4v, mov, webm
20
- * - audio: mp3, wav, aac, flac, webm, m4a, opus, ogg, aiff, amr
21
- * - image: png, jpg, jpeg, jfif, heic, heif, webp, avif, jp2, tiff, bmp
20
+ * - audio: mp3, wav, aac, flac, webm, weba, m4a, opus, ogg, oga, aiff, amr
21
+ * - image: png, jpg, jpeg, jfif, heic, heif, webp, avif, jp2, tiff, tif, bmp
22
22
  * - gif: gif, webp, webm
23
23
  *
24
24
  * > Note: `gif` is only supported for face swap API `video_file_path` field.
@@ -1,4 +1,4 @@
1
1
  /**
2
- * V1AiImageUpscalerCreateBodyStyleEnhancementEnum
2
+ * Deprecated: use `mode` instead. `"Resemblance"` maps to `"preserve"`. `"Balanced"` and `"Creative"` map to the same-named modes.
3
3
  */
4
4
  export type V1AiImageUpscalerCreateBodyStyleEnhancementEnum = "Balanced" | "Creative" | "Resemblance";
@@ -1,4 +1,4 @@
1
1
  /**
2
- * The upscaling mode. `"pro"` is faster and does not require `enhancement`. `"creative"` requires `enhancement`. Defaults to `"creative"`.
2
+ * The upscaling mode. `"preserve"` uses the fast pro pipeline (1× credit multiplier). `"balanced"` and `"creative"` use the creative pipeline (2× credit multiplier). `"pro"` is deprecated and maps to `"preserve"`. Defaults to `"balanced"`.
3
3
  */
4
- export type V1AiImageUpscalerCreateBodyStyleModeEnum = "creative" | "pro";
4
+ export type V1AiImageUpscalerCreateBodyStyleModeEnum = "balanced" | "creative" | "preserve" | "pro";
@@ -1,15 +1,18 @@
1
1
  import * as z from "zod";
2
2
  /**
3
- * Style settings for the upscale. Use `mode` to select between `"pro"` (faster, no enhancement required) and `"creative"` (defaults to `"Balanced"` enhancement). Defaults to `"creative"`.
3
+ * Style settings for the upscale. Use `mode` (`"preserve"`, `"balanced"`, or `"creative"`). Defaults to `"balanced"`.
4
4
  */
5
5
  export type V1AiImageUpscalerCreateBodyStyle = {
6
+ /**
7
+ * Deprecated: use `mode` instead. `"Resemblance"` maps to `"preserve"`. `"Balanced"` and `"Creative"` map to the same-named modes.
8
+ */
6
9
  enhancement?: ("Balanced" | "Creative" | "Resemblance") | undefined;
7
10
  /**
8
- * The upscaling mode. `"pro"` is faster and does not require `enhancement`. `"creative"` requires `enhancement`. Defaults to `"creative"`.
11
+ * The upscaling mode. `"preserve"` uses the fast pro pipeline (1× credit multiplier). `"balanced"` and `"creative"` use the creative pipeline (2× credit multiplier). `"pro"` is deprecated and maps to `"preserve"`. Defaults to `"balanced"`.
9
12
  */
10
- mode?: ("creative" | "pro") | undefined;
13
+ mode?: ("balanced" | "creative" | "preserve" | "pro") | undefined;
11
14
  /**
12
- * A prompt to guide the final image. This value is ignored if `enhancement` is not Creative
15
+ * A prompt to guide the final image. Only used when mode is `creative`.
13
16
  */
14
17
  prompt?: string | undefined;
15
18
  };
@@ -20,7 +23,7 @@ export type V1AiImageUpscalerCreateBodyStyle = {
20
23
  */
21
24
  export type External$V1AiImageUpscalerCreateBodyStyle = {
22
25
  enhancement?: ("Balanced" | "Creative" | "Resemblance") | undefined;
23
- mode?: ("creative" | "pro") | undefined;
26
+ mode?: ("balanced" | "creative" | "preserve" | "pro") | undefined;
24
27
  prompt?: string | undefined;
25
28
  };
26
29
  export declare const Schemas$V1AiImageUpscalerCreateBodyStyle: {
@@ -42,7 +42,7 @@ const z = __importStar(require("zod"));
42
42
  const SchemaIn$V1AiImageUpscalerCreateBodyStyle = z
43
43
  .object({
44
44
  enhancement: z.enum(["Balanced", "Creative", "Resemblance"]).optional(),
45
- mode: z.enum(["creative", "pro"]).optional(),
45
+ mode: z.enum(["balanced", "creative", "preserve", "pro"]).optional(),
46
46
  prompt: z.string().optional(),
47
47
  })
48
48
  .transform((obj) => {
@@ -59,7 +59,7 @@ const SchemaIn$V1AiImageUpscalerCreateBodyStyle = z
59
59
  const SchemaOut$V1AiImageUpscalerCreateBodyStyle = z
60
60
  .object({
61
61
  enhancement: z.enum(["Balanced", "Creative", "Resemblance"]).optional(),
62
- mode: z.enum(["creative", "pro"]).optional(),
62
+ mode: z.enum(["balanced", "creative", "preserve", "pro"]).optional(),
63
63
  prompt: z.string().optional(),
64
64
  })
65
65
  .transform((obj) => {
@@ -20,9 +20,9 @@ export type V1AiImageUpscalerCreateBody = {
20
20
  */
21
21
  scaleFactor: number;
22
22
  /**
23
- * Style settings for the upscale. Use `mode` to select between `"pro"` (faster, no enhancement required) and `"creative"` (defaults to `"Balanced"` enhancement). Defaults to `"creative"`.
23
+ * Style settings for the upscale. Use `mode` (`"preserve"`, `"balanced"`, or `"creative"`). Defaults to `"balanced"`.
24
24
  */
25
- style: V1AiImageUpscalerCreateBodyStyle;
25
+ style?: V1AiImageUpscalerCreateBodyStyle | undefined;
26
26
  };
27
27
  /**
28
28
  * @internal
@@ -33,7 +33,7 @@ export type External$V1AiImageUpscalerCreateBody = {
33
33
  assets: External$V1AiImageUpscalerCreateBodyAssets;
34
34
  name?: string | undefined;
35
35
  scale_factor: number;
36
- style: External$V1AiImageUpscalerCreateBodyStyle;
36
+ style?: External$V1AiImageUpscalerCreateBodyStyle | undefined;
37
37
  };
38
38
  export declare const Schemas$V1AiImageUpscalerCreateBody: {
39
39
  in: z.ZodType<V1AiImageUpscalerCreateBody, z.ZodTypeDef, unknown>;
@@ -46,7 +46,7 @@ const SchemaIn$V1AiImageUpscalerCreateBody = z
46
46
  assets: v1_ai_image_upscaler_create_body_assets_1.Schemas$V1AiImageUpscalerCreateBodyAssets.in,
47
47
  name: z.string().optional(),
48
48
  scale_factor: z.number(),
49
- style: v1_ai_image_upscaler_create_body_style_1.Schemas$V1AiImageUpscalerCreateBodyStyle.in,
49
+ style: v1_ai_image_upscaler_create_body_style_1.Schemas$V1AiImageUpscalerCreateBodyStyle.in.optional(),
50
50
  })
51
51
  .transform((obj) => {
52
52
  return (0, make_api_request_js_1.zodTransform)(obj, {
@@ -65,7 +65,7 @@ const SchemaOut$V1AiImageUpscalerCreateBody = z
65
65
  assets: v1_ai_image_upscaler_create_body_assets_1.Schemas$V1AiImageUpscalerCreateBodyAssets.out,
66
66
  name: z.string().optional(),
67
67
  scaleFactor: z.number(),
68
- style: v1_ai_image_upscaler_create_body_style_1.Schemas$V1AiImageUpscalerCreateBodyStyle.out,
68
+ style: v1_ai_image_upscaler_create_body_style_1.Schemas$V1AiImageUpscalerCreateBodyStyle.out.optional(),
69
69
  })
70
70
  .transform((obj) => {
71
71
  return (0, make_api_request_js_1.zodTransform)(obj, {
@@ -13,7 +13,7 @@ export type V1BodySwapCreateBodyAssets = {
13
13
  */
14
14
  personFilePath: string;
15
15
  /**
16
- * Target scene image (background). This value is either
16
+ * Original scene image (background). This value is either
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
  *
@@ -4,7 +4,7 @@ import * as z from "zod";
4
4
  */
5
5
  export type V1FilesUploadUrlsCreateBodyItemsItem = {
6
6
  /**
7
- * The extension of the file to upload. Do not include the dot (.) before the extension. Possible extensions are mp4,m4v,mov,webm,mp3,wav,aac,flac,webm,m4a,opus,ogg,aiff,amr,png,jpg,jpeg,jfif,heic,heif,webp,avif,jp2,tiff,bmp,gif,webp,webm
7
+ * The extension of the file to upload. Do not include the dot (.) before the extension. Possible extensions are mp4,m4v,mov,webm,mp3,wav,aac,flac,webm,weba,m4a,opus,ogg,oga,aiff,amr,png,jpg,jpeg,jfif,heic,heif,webp,avif,jp2,tiff,tif,bmp,gif,webp,webm
8
8
  */
9
9
  extension: string;
10
10
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "magic-hour",
3
- "version": "0.66.0",
3
+ "version": "0.67.0",
4
4
  "main": "./dist/index.js",
5
5
  "types": "./dist/index.d.ts",
6
6
  "exports": {