magic-hour 0.59.0 → 0.61.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.
- package/README.md +5 -0
- package/dist/environment.d.ts +1 -1
- package/dist/environment.js +1 -1
- package/dist/resources/v1/ai-image-editor/request-types.d.ts +29 -19
- package/dist/resources/v1/ai-image-editor/request-types.js +2 -2
- package/dist/resources/v1/ai-image-generator/request-types.d.ts +35 -22
- package/dist/resources/v1/ai-image-generator/request-types.js +4 -2
- package/dist/resources/v1/body-swap/index.d.ts +2 -0
- package/dist/resources/v1/body-swap/index.js +5 -0
- package/dist/resources/v1/body-swap/request-types.d.ts +33 -0
- package/dist/resources/v1/body-swap/request-types.js +76 -0
- package/dist/resources/v1/body-swap/resource-client.d.ts +64 -0
- package/dist/resources/v1/body-swap/resource-client.js +105 -0
- package/dist/resources/v1/image-to-video/request-types.d.ts +4 -4
- package/dist/resources/v1/index.d.ts +1 -0
- package/dist/resources/v1/index.js +2 -1
- package/dist/resources/v1/resource-client.d.ts +3 -0
- package/dist/resources/v1/resource-client.js +5 -0
- package/dist/resources/v1/text-to-video/request-types.d.ts +4 -4
- package/dist/types/index.d.ts +4 -0
- package/dist/types/v1-ai-image-editor-create-body-model-enum.d.ts +12 -12
- package/dist/types/v1-ai-image-editor-create-body-resolution-enum.d.ts +16 -6
- package/dist/types/v1-ai-image-editor-create-body.d.ts +29 -19
- package/dist/types/v1-ai-image-editor-create-body.js +2 -2
- package/dist/types/v1-ai-image-generator-create-body-model-enum.d.ts +17 -14
- package/dist/types/v1-ai-image-generator-create-body-resolution-enum.d.ts +16 -6
- package/dist/types/v1-ai-image-generator-create-body-style-quality-mode-enum.d.ts +1 -1
- package/dist/types/v1-ai-image-generator-create-body-style.d.ts +1 -1
- package/dist/types/v1-ai-image-generator-create-body.d.ts +35 -22
- package/dist/types/v1-ai-image-generator-create-body.js +4 -2
- package/dist/types/v1-body-swap-create-body-assets.d.ts +37 -0
- package/dist/types/v1-body-swap-create-body-assets.js +71 -0
- package/dist/types/v1-body-swap-create-body-resolution-enum.d.ts +4 -0
- package/dist/types/v1-body-swap-create-body-resolution-enum.js +2 -0
- package/dist/types/v1-body-swap-create-body.d.ts +33 -0
- package/dist/types/v1-body-swap-create-body.js +76 -0
- package/dist/types/v1-body-swap-create-response.d.ts +34 -0
- package/dist/types/v1-body-swap-create-response.js +75 -0
- package/dist/types/v1-image-projects-get-response.d.ts +1 -1
- package/dist/types/v1-image-to-video-create-body.d.ts +4 -4
- package/dist/types/v1-text-to-video-create-body.d.ts +4 -4
- package/dist/types/v1-video-projects-get-response.d.ts +1 -1
- package/package.json +1 -1
|
@@ -28,12 +28,12 @@ export type CreateRequest = {
|
|
|
28
28
|
* * **`ltx-2`**: Automatically included with no extra credits
|
|
29
29
|
* * **`wan-2.2`**: Not supported
|
|
30
30
|
* * **`seedance`**: Not supported
|
|
31
|
-
* * **`seedance-2.0`**:
|
|
31
|
+
* * **`seedance-2.0`**: Automatically included with no extra credits
|
|
32
32
|
* * **`kling-2.5`**: Automatically included with no extra credits
|
|
33
33
|
* * **`kling-3.0`**: Toggle-able (can enable/disable)
|
|
34
34
|
* * **`sora-2`**: Automatically included with no extra credits
|
|
35
35
|
* * **`veo3.1`**: Toggle-able (can enable/disable)
|
|
36
|
-
* * **`veo3.1-lite`**:
|
|
36
|
+
* * **`veo3.1-lite`**: Toggle-able (can enable/disable)
|
|
37
37
|
*
|
|
38
38
|
* Legacy models:
|
|
39
39
|
* * **`kling-1.6`**: Not supported
|
|
@@ -42,7 +42,7 @@ export type CreateRequest = {
|
|
|
42
42
|
/**
|
|
43
43
|
* The total duration of the output video in seconds. Supported durations depend on the chosen model:
|
|
44
44
|
*
|
|
45
|
-
* * **`ltx-2`**: 3, 4, 5, 6, 7, 8, 9, 10, 15, 20, 25, 30
|
|
45
|
+
* * **`ltx-2`**: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 15, 20, 25, 30
|
|
46
46
|
* * **`wan-2.2`**: 3, 4, 5, 6, 7, 8, 9, 10, 15
|
|
47
47
|
* * **`seedance`**: 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12
|
|
48
48
|
* * **`seedance-2.0`**: 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15
|
|
@@ -50,7 +50,7 @@ export type CreateRequest = {
|
|
|
50
50
|
* * **`kling-3.0`**: 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15
|
|
51
51
|
* * **`sora-2`**: 4, 8, 12, 24, 36, 48, 60
|
|
52
52
|
* * **`veo3.1`**: 4, 6, 8, 16, 24, 32, 40, 48, 56
|
|
53
|
-
* * **`veo3.1-lite`**:
|
|
53
|
+
* * **`veo3.1-lite`**: 8, 16, 24, 32, 40, 48, 56
|
|
54
54
|
*
|
|
55
55
|
* Legacy models:
|
|
56
56
|
* * **`kling-1.6`**: 5, 10, 15, 20, 25, 30, 35, 40, 45, 50, 55, 60
|
package/dist/types/index.d.ts
CHANGED
|
@@ -74,6 +74,10 @@ export { V1AutoSubtitleGeneratorCreateBodyStyle } from "./v1-auto-subtitle-gener
|
|
|
74
74
|
export { V1AutoSubtitleGeneratorCreateBodyStyleCustomConfig } from "./v1-auto-subtitle-generator-create-body-style-custom-config";
|
|
75
75
|
export { V1AutoSubtitleGeneratorCreateBodyStyleTemplateEnum } from "./v1-auto-subtitle-generator-create-body-style-template-enum";
|
|
76
76
|
export { V1AutoSubtitleGeneratorCreateResponse } from "./v1-auto-subtitle-generator-create-response";
|
|
77
|
+
export { V1BodySwapCreateBody } from "./v1-body-swap-create-body";
|
|
78
|
+
export { V1BodySwapCreateBodyAssets } from "./v1-body-swap-create-body-assets";
|
|
79
|
+
export { V1BodySwapCreateBodyResolutionEnum } from "./v1-body-swap-create-body-resolution-enum";
|
|
80
|
+
export { V1BodySwapCreateResponse } from "./v1-body-swap-create-response";
|
|
77
81
|
export { V1FaceDetectionCreateBody } from "./v1-face-detection-create-body";
|
|
78
82
|
export { V1FaceDetectionCreateBodyAssets } from "./v1-face-detection-create-body-assets";
|
|
79
83
|
export { V1FaceDetectionCreateResponse } from "./v1-face-detection-create-response";
|
|
@@ -3,29 +3,29 @@
|
|
|
3
3
|
*
|
|
4
4
|
* **Models:**
|
|
5
5
|
* - `default` - Use the model we recommend, which will change over time. This is recommended unless you need a specific model. This is the default behavior.
|
|
6
|
-
* - `qwen-edit` - 10 credits/image
|
|
6
|
+
* - `qwen-edit` - from 10 credits/image
|
|
7
|
+
* - Supported resolutions: 640px, 1k, 2k
|
|
7
8
|
* - Available for tiers: free, creator, pro, business
|
|
8
|
-
* - Image count allowed: 1
|
|
9
9
|
* - Max additional input images: 2
|
|
10
|
-
* - `nano-banana` - 50 credits/image
|
|
10
|
+
* - `nano-banana` - from 50 credits/image
|
|
11
|
+
* - Supported resolutions: 640px, 1k
|
|
11
12
|
* - Available for tiers: free, creator, pro, business
|
|
12
|
-
* - Image count allowed: 1
|
|
13
13
|
* - Max additional input images: 9
|
|
14
|
-
* - `nano-banana-2` - 100 credits/image
|
|
14
|
+
* - `nano-banana-2` - from 100 credits/image
|
|
15
|
+
* - Supported resolutions: 640px, 1k, 2k, 4k
|
|
15
16
|
* - Available for tiers: free, creator, pro, business
|
|
16
|
-
* - Image count allowed: 1
|
|
17
17
|
* - Max additional input images: 9
|
|
18
|
-
* - `seedream-v4` -
|
|
18
|
+
* - `seedream-v4` - from 40 credits/image
|
|
19
|
+
* - Supported resolutions: 640px, 1k, 2k, 4k
|
|
19
20
|
* - Available for tiers: free, creator, pro, business
|
|
20
|
-
* - Image count allowed: 1
|
|
21
21
|
* - Max additional input images: 9
|
|
22
|
-
* - `nano-banana-pro` - 150 credits/image
|
|
22
|
+
* - `nano-banana-pro` - from 150 credits/image
|
|
23
|
+
* - Supported resolutions: 1k, 2k, 4k
|
|
23
24
|
* - Available for tiers: creator, pro, business
|
|
24
|
-
* - Image count allowed: 1, 4, 9, 16
|
|
25
25
|
* - Max additional input images: 9
|
|
26
|
-
* - `seedream-v4.5` -
|
|
26
|
+
* - `seedream-v4.5` - from 50 credits/image
|
|
27
|
+
* - Supported resolutions: 640px, 1k, 2k, 4k
|
|
27
28
|
* - Available for tiers: creator, pro, business
|
|
28
|
-
* - Image count allowed: 1
|
|
29
29
|
* - Max additional input images: 9
|
|
30
30
|
*
|
|
31
31
|
*/
|
|
@@ -1,11 +1,21 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Maximum resolution for the
|
|
2
|
+
* Maximum resolution (longest edge) for the output image.
|
|
3
3
|
*
|
|
4
4
|
* **Options:**
|
|
5
|
-
* - `
|
|
6
|
-
* - `
|
|
7
|
-
* - `
|
|
5
|
+
* - `640px` — up to 640px
|
|
6
|
+
* - `1k` — up to 1024px
|
|
7
|
+
* - `2k` — up to 2048px
|
|
8
|
+
* - `4k` — up to 4096px
|
|
9
|
+
* - `auto` — **Deprecated.** Mapped server-side from your subscription tier to the best matching resolution the model supports
|
|
8
10
|
*
|
|
9
|
-
*
|
|
11
|
+
* **Per-model support:**
|
|
12
|
+
* - `qwen-edit` - 640px, 1k, 2k
|
|
13
|
+
* - `nano-banana` - 640px, 1k
|
|
14
|
+
* - `nano-banana-2` - 640px, 1k, 2k, 4k
|
|
15
|
+
* - `seedream-v4` - 640px, 1k, 2k, 4k
|
|
16
|
+
* - `nano-banana-pro` - 1k, 2k, 4k
|
|
17
|
+
* - `seedream-v4.5` - 640px, 1k, 2k, 4k
|
|
18
|
+
*
|
|
19
|
+
* Note: Resolution availability depends on the model and your subscription tier.
|
|
10
20
|
*/
|
|
11
|
-
export type V1AiImageEditorCreateBodyResolutionEnum = "2k" | "4k" | "auto";
|
|
21
|
+
export type V1AiImageEditorCreateBodyResolutionEnum = "1k" | "2k" | "4k" | "640px" | "auto";
|
|
@@ -22,29 +22,29 @@ export type V1AiImageEditorCreateBody = {
|
|
|
22
22
|
*
|
|
23
23
|
* **Models:**
|
|
24
24
|
* - `default` - Use the model we recommend, which will change over time. This is recommended unless you need a specific model. This is the default behavior.
|
|
25
|
-
* - `qwen-edit` - 10 credits/image
|
|
25
|
+
* - `qwen-edit` - from 10 credits/image
|
|
26
|
+
* - Supported resolutions: 640px, 1k, 2k
|
|
26
27
|
* - Available for tiers: free, creator, pro, business
|
|
27
|
-
* - Image count allowed: 1
|
|
28
28
|
* - Max additional input images: 2
|
|
29
|
-
* - `nano-banana` - 50 credits/image
|
|
29
|
+
* - `nano-banana` - from 50 credits/image
|
|
30
|
+
* - Supported resolutions: 640px, 1k
|
|
30
31
|
* - Available for tiers: free, creator, pro, business
|
|
31
|
-
* - Image count allowed: 1
|
|
32
32
|
* - Max additional input images: 9
|
|
33
|
-
* - `nano-banana-2` - 100 credits/image
|
|
33
|
+
* - `nano-banana-2` - from 100 credits/image
|
|
34
|
+
* - Supported resolutions: 640px, 1k, 2k, 4k
|
|
34
35
|
* - Available for tiers: free, creator, pro, business
|
|
35
|
-
* - Image count allowed: 1
|
|
36
36
|
* - Max additional input images: 9
|
|
37
|
-
* - `seedream-v4` -
|
|
37
|
+
* - `seedream-v4` - from 40 credits/image
|
|
38
|
+
* - Supported resolutions: 640px, 1k, 2k, 4k
|
|
38
39
|
* - Available for tiers: free, creator, pro, business
|
|
39
|
-
* - Image count allowed: 1
|
|
40
40
|
* - Max additional input images: 9
|
|
41
|
-
* - `nano-banana-pro` - 150 credits/image
|
|
41
|
+
* - `nano-banana-pro` - from 150 credits/image
|
|
42
|
+
* - Supported resolutions: 1k, 2k, 4k
|
|
42
43
|
* - Available for tiers: creator, pro, business
|
|
43
|
-
* - Image count allowed: 1, 4, 9, 16
|
|
44
44
|
* - Max additional input images: 9
|
|
45
|
-
* - `seedream-v4.5` -
|
|
45
|
+
* - `seedream-v4.5` - from 50 credits/image
|
|
46
|
+
* - Supported resolutions: 640px, 1k, 2k, 4k
|
|
46
47
|
* - Available for tiers: creator, pro, business
|
|
47
|
-
* - Image count allowed: 1
|
|
48
48
|
* - Max additional input images: 9
|
|
49
49
|
*
|
|
50
50
|
*/
|
|
@@ -54,16 +54,26 @@ export type V1AiImageEditorCreateBody = {
|
|
|
54
54
|
*/
|
|
55
55
|
name?: string | undefined;
|
|
56
56
|
/**
|
|
57
|
-
* Maximum resolution for the
|
|
57
|
+
* Maximum resolution (longest edge) for the output image.
|
|
58
58
|
*
|
|
59
59
|
* **Options:**
|
|
60
|
-
* - `
|
|
61
|
-
* - `
|
|
62
|
-
* - `
|
|
60
|
+
* - `640px` — up to 640px
|
|
61
|
+
* - `1k` — up to 1024px
|
|
62
|
+
* - `2k` — up to 2048px
|
|
63
|
+
* - `4k` — up to 4096px
|
|
64
|
+
* - `auto` — **Deprecated.** Mapped server-side from your subscription tier to the best matching resolution the model supports
|
|
63
65
|
*
|
|
64
|
-
*
|
|
66
|
+
* **Per-model support:**
|
|
67
|
+
* - `qwen-edit` - 640px, 1k, 2k
|
|
68
|
+
* - `nano-banana` - 640px, 1k
|
|
69
|
+
* - `nano-banana-2` - 640px, 1k, 2k, 4k
|
|
70
|
+
* - `seedream-v4` - 640px, 1k, 2k, 4k
|
|
71
|
+
* - `nano-banana-pro` - 1k, 2k, 4k
|
|
72
|
+
* - `seedream-v4.5` - 640px, 1k, 2k, 4k
|
|
73
|
+
*
|
|
74
|
+
* Note: Resolution availability depends on the model and your subscription tier.
|
|
65
75
|
*/
|
|
66
|
-
resolution?: ("2k" | "4k" | "auto") | undefined;
|
|
76
|
+
resolution?: ("1k" | "2k" | "4k" | "640px" | "auto") | undefined;
|
|
67
77
|
style: V1AiImageEditorCreateBodyStyle;
|
|
68
78
|
};
|
|
69
79
|
/**
|
|
@@ -77,7 +87,7 @@ export type External$V1AiImageEditorCreateBody = {
|
|
|
77
87
|
image_count?: number | undefined;
|
|
78
88
|
model?: ("default" | "nano-banana" | "nano-banana-2" | "nano-banana-pro" | "qwen-edit" | "seedream-v4" | "seedream-v4.5") | undefined;
|
|
79
89
|
name?: string | undefined;
|
|
80
|
-
resolution?: ("2k" | "4k" | "auto") | undefined;
|
|
90
|
+
resolution?: ("1k" | "2k" | "4k" | "640px" | "auto") | undefined;
|
|
81
91
|
style: External$V1AiImageEditorCreateBodyStyle;
|
|
82
92
|
};
|
|
83
93
|
export declare const Schemas$V1AiImageEditorCreateBody: {
|
|
@@ -60,7 +60,7 @@ const SchemaIn$V1AiImageEditorCreateBody = z
|
|
|
60
60
|
])
|
|
61
61
|
.optional(),
|
|
62
62
|
name: z.string().optional(),
|
|
63
|
-
resolution: z.enum(["2k", "4k", "auto"]).optional(),
|
|
63
|
+
resolution: z.enum(["1k", "2k", "4k", "640px", "auto"]).optional(),
|
|
64
64
|
style: v1_ai_image_editor_create_body_style_1.Schemas$V1AiImageEditorCreateBodyStyle.in,
|
|
65
65
|
})
|
|
66
66
|
.transform((obj) => {
|
|
@@ -97,7 +97,7 @@ const SchemaOut$V1AiImageEditorCreateBody = z
|
|
|
97
97
|
])
|
|
98
98
|
.optional(),
|
|
99
99
|
name: z.string().optional(),
|
|
100
|
-
resolution: z.enum(["2k", "4k", "auto"]).optional(),
|
|
100
|
+
resolution: z.enum(["1k", "2k", "4k", "640px", "auto"]).optional(),
|
|
101
101
|
style: v1_ai_image_editor_create_body_style_1.Schemas$V1AiImageEditorCreateBodyStyle.out,
|
|
102
102
|
})
|
|
103
103
|
.transform((obj) => {
|
|
@@ -3,30 +3,33 @@
|
|
|
3
3
|
*
|
|
4
4
|
* **Models:**
|
|
5
5
|
* - `default` - Use the model we recommend, which will change over time. This is recommended unless you need a specific model. This is the default behavior.
|
|
6
|
-
* - `flux-schnell` - 5 credits/image
|
|
7
|
-
* - Supported resolutions:
|
|
6
|
+
* - `flux-schnell` - from 5 credits/image
|
|
7
|
+
* - Supported resolutions: 640px, 1k, 2k
|
|
8
8
|
* - Available for tiers: free, creator, pro, business
|
|
9
9
|
* - Image count allowed: 1, 2, 3, 4
|
|
10
|
-
* - `z-image-turbo` - 5 credits/image
|
|
11
|
-
* - Supported resolutions:
|
|
10
|
+
* - `z-image-turbo` - from 5 credits/image
|
|
11
|
+
* - Supported resolutions: 640px, 1k, 2k
|
|
12
12
|
* - Available for tiers: free, creator, pro, business
|
|
13
13
|
* - Image count allowed: 1, 2, 3, 4
|
|
14
|
-
* - `seedream` -
|
|
15
|
-
* - Supported resolutions:
|
|
14
|
+
* - `seedream-v4` - from 40 credits/image
|
|
15
|
+
* - Supported resolutions: 640px, 1k, 2k, 4k
|
|
16
16
|
* - Available for tiers: free, creator, pro, business
|
|
17
17
|
* - Image count allowed: 1, 2, 3, 4
|
|
18
|
-
* - `nano-banana` - 50 credits/image
|
|
19
|
-
* - Supported resolutions:
|
|
18
|
+
* - `nano-banana` - from 50 credits/image
|
|
19
|
+
* - Supported resolutions: 640px, 1k
|
|
20
20
|
* - Available for tiers: free, creator, pro, business
|
|
21
21
|
* - Image count allowed: 1, 2, 3, 4
|
|
22
|
-
* - `nano-banana-2` - 100 credits/image
|
|
23
|
-
* - Supported resolutions:
|
|
22
|
+
* - `nano-banana-2` - from 100 credits/image
|
|
23
|
+
* - Supported resolutions: 640px, 1k, 2k, 4k
|
|
24
24
|
* - Available for tiers: free, creator, pro, business
|
|
25
|
-
* - Image count allowed: 1,
|
|
26
|
-
* - `nano-banana-pro` - 150 credits/image
|
|
27
|
-
* - Supported resolutions:
|
|
25
|
+
* - Image count allowed: 1, 4, 9, 16
|
|
26
|
+
* - `nano-banana-pro` - from 150 credits/image
|
|
27
|
+
* - Supported resolutions: 1k, 2k, 4k
|
|
28
28
|
* - Available for tiers: creator, pro, business
|
|
29
29
|
* - Image count allowed: 1, 4, 9, 16
|
|
30
30
|
*
|
|
31
|
+
* **Deprecated Enum Values:**
|
|
32
|
+
* - `seedream` - Use `seedream-v4` instead.
|
|
33
|
+
*
|
|
31
34
|
*/
|
|
32
|
-
export type V1AiImageGeneratorCreateBodyModelEnum = "default" | "flux-schnell" | "nano-banana" | "nano-banana-2" | "nano-banana-pro" | "seedream" | "z-image-turbo";
|
|
35
|
+
export type V1AiImageGeneratorCreateBodyModelEnum = "default" | "flux-schnell" | "nano-banana" | "nano-banana-2" | "nano-banana-pro" | "seedream" | "seedream-v4" | "z-image-turbo";
|
|
@@ -1,11 +1,21 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Maximum resolution for the
|
|
2
|
+
* Maximum resolution (longest edge) for the output image.
|
|
3
3
|
*
|
|
4
4
|
* **Options:**
|
|
5
|
-
* - `
|
|
6
|
-
* - `
|
|
7
|
-
* - `
|
|
5
|
+
* - `640px` — up to 640px
|
|
6
|
+
* - `1k` — up to 1024px
|
|
7
|
+
* - `2k` — up to 2048px
|
|
8
|
+
* - `4k` — up to 4096px
|
|
9
|
+
* - `auto` — **Deprecated.** Mapped server-side from your subscription tier to the best matching resolution the model supports
|
|
8
10
|
*
|
|
9
|
-
*
|
|
11
|
+
* **Per-model support:**
|
|
12
|
+
* - `flux-schnell` - 640px, 1k, 2k
|
|
13
|
+
* - `z-image-turbo` - 640px, 1k, 2k
|
|
14
|
+
* - `seedream-v4` - 640px, 1k, 2k, 4k
|
|
15
|
+
* - `nano-banana` - 640px, 1k
|
|
16
|
+
* - `nano-banana-2` - 640px, 1k, 2k, 4k
|
|
17
|
+
* - `nano-banana-pro` - 1k, 2k, 4k
|
|
18
|
+
*
|
|
19
|
+
* Note: Resolution availability depends on the model and your subscription tier.
|
|
10
20
|
*/
|
|
11
|
-
export type V1AiImageGeneratorCreateBodyResolutionEnum = "2k" | "4k" | "auto";
|
|
21
|
+
export type V1AiImageGeneratorCreateBodyResolutionEnum = "1k" | "2k" | "4k" | "640px" | "auto";
|
|
@@ -12,7 +12,7 @@ export type V1AiImageGeneratorCreateBodyStyle = {
|
|
|
12
12
|
*
|
|
13
13
|
* Legacy quality mode mapping:
|
|
14
14
|
* - `standard` → `z-image-turbo` model
|
|
15
|
-
* - `pro` → `seedream` model
|
|
15
|
+
* - `pro` → `seedream-v4` model
|
|
16
16
|
*
|
|
17
17
|
* If model is specified, it will take precedence over the legacy quality_mode field.
|
|
18
18
|
*/
|
|
@@ -17,33 +17,36 @@ export type V1AiImageGeneratorCreateBody = {
|
|
|
17
17
|
*
|
|
18
18
|
* **Models:**
|
|
19
19
|
* - `default` - Use the model we recommend, which will change over time. This is recommended unless you need a specific model. This is the default behavior.
|
|
20
|
-
* - `flux-schnell` - 5 credits/image
|
|
21
|
-
* - Supported resolutions:
|
|
20
|
+
* - `flux-schnell` - from 5 credits/image
|
|
21
|
+
* - Supported resolutions: 640px, 1k, 2k
|
|
22
22
|
* - Available for tiers: free, creator, pro, business
|
|
23
23
|
* - Image count allowed: 1, 2, 3, 4
|
|
24
|
-
* - `z-image-turbo` - 5 credits/image
|
|
25
|
-
* - Supported resolutions:
|
|
24
|
+
* - `z-image-turbo` - from 5 credits/image
|
|
25
|
+
* - Supported resolutions: 640px, 1k, 2k
|
|
26
26
|
* - Available for tiers: free, creator, pro, business
|
|
27
27
|
* - Image count allowed: 1, 2, 3, 4
|
|
28
|
-
* - `seedream` -
|
|
29
|
-
* - Supported resolutions:
|
|
28
|
+
* - `seedream-v4` - from 40 credits/image
|
|
29
|
+
* - Supported resolutions: 640px, 1k, 2k, 4k
|
|
30
30
|
* - Available for tiers: free, creator, pro, business
|
|
31
31
|
* - Image count allowed: 1, 2, 3, 4
|
|
32
|
-
* - `nano-banana` - 50 credits/image
|
|
33
|
-
* - Supported resolutions:
|
|
32
|
+
* - `nano-banana` - from 50 credits/image
|
|
33
|
+
* - Supported resolutions: 640px, 1k
|
|
34
34
|
* - Available for tiers: free, creator, pro, business
|
|
35
35
|
* - Image count allowed: 1, 2, 3, 4
|
|
36
|
-
* - `nano-banana-2` - 100 credits/image
|
|
37
|
-
* - Supported resolutions:
|
|
36
|
+
* - `nano-banana-2` - from 100 credits/image
|
|
37
|
+
* - Supported resolutions: 640px, 1k, 2k, 4k
|
|
38
38
|
* - Available for tiers: free, creator, pro, business
|
|
39
|
-
* - Image count allowed: 1,
|
|
40
|
-
* - `nano-banana-pro` - 150 credits/image
|
|
41
|
-
* - Supported resolutions:
|
|
39
|
+
* - Image count allowed: 1, 4, 9, 16
|
|
40
|
+
* - `nano-banana-pro` - from 150 credits/image
|
|
41
|
+
* - Supported resolutions: 1k, 2k, 4k
|
|
42
42
|
* - Available for tiers: creator, pro, business
|
|
43
43
|
* - Image count allowed: 1, 4, 9, 16
|
|
44
44
|
*
|
|
45
|
+
* **Deprecated Enum Values:**
|
|
46
|
+
* - `seedream` - Use `seedream-v4` instead.
|
|
47
|
+
*
|
|
45
48
|
*/
|
|
46
|
-
model?: ("default" | "flux-schnell" | "nano-banana" | "nano-banana-2" | "nano-banana-pro" | "seedream" | "z-image-turbo") | undefined;
|
|
49
|
+
model?: ("default" | "flux-schnell" | "nano-banana" | "nano-banana-2" | "nano-banana-pro" | "seedream" | "seedream-v4" | "z-image-turbo") | undefined;
|
|
47
50
|
/**
|
|
48
51
|
* Give your image a custom name for easy identification.
|
|
49
52
|
*/
|
|
@@ -55,16 +58,26 @@ export type V1AiImageGeneratorCreateBody = {
|
|
|
55
58
|
*/
|
|
56
59
|
orientation?: ("landscape" | "portrait" | "square") | undefined;
|
|
57
60
|
/**
|
|
58
|
-
* Maximum resolution for the
|
|
61
|
+
* Maximum resolution (longest edge) for the output image.
|
|
59
62
|
*
|
|
60
63
|
* **Options:**
|
|
61
|
-
* - `
|
|
62
|
-
* - `
|
|
63
|
-
* - `
|
|
64
|
+
* - `640px` — up to 640px
|
|
65
|
+
* - `1k` — up to 1024px
|
|
66
|
+
* - `2k` — up to 2048px
|
|
67
|
+
* - `4k` — up to 4096px
|
|
68
|
+
* - `auto` — **Deprecated.** Mapped server-side from your subscription tier to the best matching resolution the model supports
|
|
69
|
+
*
|
|
70
|
+
* **Per-model support:**
|
|
71
|
+
* - `flux-schnell` - 640px, 1k, 2k
|
|
72
|
+
* - `z-image-turbo` - 640px, 1k, 2k
|
|
73
|
+
* - `seedream-v4` - 640px, 1k, 2k, 4k
|
|
74
|
+
* - `nano-banana` - 640px, 1k
|
|
75
|
+
* - `nano-banana-2` - 640px, 1k, 2k, 4k
|
|
76
|
+
* - `nano-banana-pro` - 1k, 2k, 4k
|
|
64
77
|
*
|
|
65
|
-
* Note: Resolution availability depends on the model and your subscription tier.
|
|
78
|
+
* Note: Resolution availability depends on the model and your subscription tier.
|
|
66
79
|
*/
|
|
67
|
-
resolution?: ("2k" | "4k" | "auto") | undefined;
|
|
80
|
+
resolution?: ("1k" | "2k" | "4k" | "640px" | "auto") | undefined;
|
|
68
81
|
/**
|
|
69
82
|
* The art style to use for image generation.
|
|
70
83
|
*/
|
|
@@ -78,10 +91,10 @@ export type V1AiImageGeneratorCreateBody = {
|
|
|
78
91
|
export type External$V1AiImageGeneratorCreateBody = {
|
|
79
92
|
aspect_ratio?: ("16:9" | "1:1" | "9:16") | undefined;
|
|
80
93
|
image_count: number;
|
|
81
|
-
model?: ("default" | "flux-schnell" | "nano-banana" | "nano-banana-2" | "nano-banana-pro" | "seedream" | "z-image-turbo") | undefined;
|
|
94
|
+
model?: ("default" | "flux-schnell" | "nano-banana" | "nano-banana-2" | "nano-banana-pro" | "seedream" | "seedream-v4" | "z-image-turbo") | undefined;
|
|
82
95
|
name?: string | undefined;
|
|
83
96
|
orientation?: ("landscape" | "portrait" | "square") | undefined;
|
|
84
|
-
resolution?: ("2k" | "4k" | "auto") | undefined;
|
|
97
|
+
resolution?: ("1k" | "2k" | "4k" | "640px" | "auto") | undefined;
|
|
85
98
|
style: External$V1AiImageGeneratorCreateBodyStyle;
|
|
86
99
|
};
|
|
87
100
|
export declare const Schemas$V1AiImageGeneratorCreateBody: {
|
|
@@ -52,12 +52,13 @@ const SchemaIn$V1AiImageGeneratorCreateBody = z
|
|
|
52
52
|
"nano-banana-2",
|
|
53
53
|
"nano-banana-pro",
|
|
54
54
|
"seedream",
|
|
55
|
+
"seedream-v4",
|
|
55
56
|
"z-image-turbo",
|
|
56
57
|
])
|
|
57
58
|
.optional(),
|
|
58
59
|
name: z.string().optional(),
|
|
59
60
|
orientation: z.enum(["landscape", "portrait", "square"]).optional(),
|
|
60
|
-
resolution: z.enum(["2k", "4k", "auto"]).optional(),
|
|
61
|
+
resolution: z.enum(["1k", "2k", "4k", "640px", "auto"]).optional(),
|
|
61
62
|
style: v1_ai_image_generator_create_body_style_1.Schemas$V1AiImageGeneratorCreateBodyStyle.in,
|
|
62
63
|
})
|
|
63
64
|
.transform((obj) => {
|
|
@@ -87,12 +88,13 @@ const SchemaOut$V1AiImageGeneratorCreateBody = z
|
|
|
87
88
|
"nano-banana-2",
|
|
88
89
|
"nano-banana-pro",
|
|
89
90
|
"seedream",
|
|
91
|
+
"seedream-v4",
|
|
90
92
|
"z-image-turbo",
|
|
91
93
|
])
|
|
92
94
|
.optional(),
|
|
93
95
|
name: z.string().optional(),
|
|
94
96
|
orientation: z.enum(["landscape", "portrait", "square"]).optional(),
|
|
95
|
-
resolution: z.enum(["2k", "4k", "auto"]).optional(),
|
|
97
|
+
resolution: z.enum(["1k", "2k", "4k", "640px", "auto"]).optional(),
|
|
96
98
|
style: v1_ai_image_generator_create_body_style_1.Schemas$V1AiImageGeneratorCreateBodyStyle.out,
|
|
97
99
|
})
|
|
98
100
|
.transform((obj) => {
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import * as z from "zod";
|
|
2
|
+
/**
|
|
3
|
+
* Person image and scene image for body swap
|
|
4
|
+
*/
|
|
5
|
+
export type V1BodySwapCreateBodyAssets = {
|
|
6
|
+
/**
|
|
7
|
+
* Image of the person to place into the scene. 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
|
+
personFilePath: string;
|
|
15
|
+
/**
|
|
16
|
+
* Target scene image (background). 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
|
+
* See the [file upload guide](https://docs.magichour.ai/api-reference/files/generate-asset-upload-urls#input-file) for details.
|
|
21
|
+
*
|
|
22
|
+
*/
|
|
23
|
+
sceneFilePath: string;
|
|
24
|
+
};
|
|
25
|
+
/**
|
|
26
|
+
* @internal
|
|
27
|
+
* V1BodySwapCreateBodyAssets without any key transformation, this is what
|
|
28
|
+
* we expect to come in as network data
|
|
29
|
+
*/
|
|
30
|
+
export type External$V1BodySwapCreateBodyAssets = {
|
|
31
|
+
person_file_path: string;
|
|
32
|
+
scene_file_path: string;
|
|
33
|
+
};
|
|
34
|
+
export declare const Schemas$V1BodySwapCreateBodyAssets: {
|
|
35
|
+
in: z.ZodType<V1BodySwapCreateBodyAssets, z.ZodTypeDef, unknown>;
|
|
36
|
+
out: z.ZodType<External$V1BodySwapCreateBodyAssets, z.ZodTypeDef, V1BodySwapCreateBodyAssets>;
|
|
37
|
+
};
|
|
@@ -0,0 +1,71 @@
|
|
|
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$V1BodySwapCreateBodyAssets = 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 V1BodySwapCreateBodyAssets
|
|
41
|
+
*/
|
|
42
|
+
const SchemaIn$V1BodySwapCreateBodyAssets = z
|
|
43
|
+
.object({
|
|
44
|
+
person_file_path: z.string(),
|
|
45
|
+
scene_file_path: z.string(),
|
|
46
|
+
})
|
|
47
|
+
.transform((obj) => {
|
|
48
|
+
return (0, make_api_request_js_1.zodTransform)(obj, {
|
|
49
|
+
person_file_path: "personFilePath",
|
|
50
|
+
scene_file_path: "sceneFilePath",
|
|
51
|
+
});
|
|
52
|
+
});
|
|
53
|
+
/**
|
|
54
|
+
* @internal
|
|
55
|
+
* Takes typescript data, validates it, and maps keys to match the expected external object External$V1BodySwapCreateBodyAssets
|
|
56
|
+
*/
|
|
57
|
+
const SchemaOut$V1BodySwapCreateBodyAssets = z
|
|
58
|
+
.object({
|
|
59
|
+
personFilePath: z.string(),
|
|
60
|
+
sceneFilePath: z.string(),
|
|
61
|
+
})
|
|
62
|
+
.transform((obj) => {
|
|
63
|
+
return (0, make_api_request_js_1.zodTransform)(obj, {
|
|
64
|
+
personFilePath: "person_file_path",
|
|
65
|
+
sceneFilePath: "scene_file_path",
|
|
66
|
+
});
|
|
67
|
+
});
|
|
68
|
+
exports.Schemas$V1BodySwapCreateBodyAssets = {
|
|
69
|
+
in: SchemaIn$V1BodySwapCreateBodyAssets,
|
|
70
|
+
out: SchemaOut$V1BodySwapCreateBodyAssets,
|
|
71
|
+
};
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import * as z from "zod";
|
|
2
|
+
import { External$V1BodySwapCreateBodyAssets, V1BodySwapCreateBodyAssets } from "./v1-body-swap-create-body-assets";
|
|
3
|
+
/**
|
|
4
|
+
* V1BodySwapCreateBody
|
|
5
|
+
*/
|
|
6
|
+
export type V1BodySwapCreateBody = {
|
|
7
|
+
/**
|
|
8
|
+
* Person image and scene image for body swap
|
|
9
|
+
*/
|
|
10
|
+
assets: V1BodySwapCreateBodyAssets;
|
|
11
|
+
/**
|
|
12
|
+
* Give your image a custom name for easy identification.
|
|
13
|
+
*/
|
|
14
|
+
name?: string | undefined;
|
|
15
|
+
/**
|
|
16
|
+
* Output resolution. Determines credits charged for the run.
|
|
17
|
+
*/
|
|
18
|
+
resolution: "1k" | "2k" | "4k" | "640px";
|
|
19
|
+
};
|
|
20
|
+
/**
|
|
21
|
+
* @internal
|
|
22
|
+
* V1BodySwapCreateBody without any key transformation, this is what
|
|
23
|
+
* we expect to come in as network data
|
|
24
|
+
*/
|
|
25
|
+
export type External$V1BodySwapCreateBody = {
|
|
26
|
+
assets: External$V1BodySwapCreateBodyAssets;
|
|
27
|
+
name?: string | undefined;
|
|
28
|
+
resolution: "1k" | "2k" | "4k" | "640px";
|
|
29
|
+
};
|
|
30
|
+
export declare const Schemas$V1BodySwapCreateBody: {
|
|
31
|
+
in: z.ZodType<V1BodySwapCreateBody, z.ZodTypeDef, unknown>;
|
|
32
|
+
out: z.ZodType<External$V1BodySwapCreateBody, z.ZodTypeDef, V1BodySwapCreateBody>;
|
|
33
|
+
};
|