magic-hour 0.48.0 → 0.50.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 +0 -5
- package/dist/environment.d.ts +1 -1
- package/dist/environment.js +1 -1
- package/dist/resources/v1/ai-image-editor/request-types.d.ts +39 -0
- package/dist/resources/v1/ai-image-editor/request-types.js +34 -0
- package/dist/resources/v1/ai-image-editor/resource-client.d.ts +1 -1
- package/dist/resources/v1/ai-image-editor/resource-client.js +1 -1
- package/dist/resources/v1/files/upload-urls/resource-client.d.ts +1 -1
- package/dist/resources/v1/files/upload-urls/resource-client.js +1 -1
- package/dist/resources/v1/image-to-video/request-types.d.ts +1 -1
- package/dist/resources/v1/index.d.ts +0 -1
- package/dist/resources/v1/index.js +1 -2
- package/dist/resources/v1/resource-client.d.ts +0 -3
- package/dist/resources/v1/resource-client.js +0 -6
- package/dist/resources/v1/text-to-video/request-types.d.ts +1 -1
- package/dist/types/index.d.ts +2 -4
- package/dist/types/v1-ai-image-editor-create-body-aspect-ratio-enum.d.ts +4 -0
- package/dist/types/v1-ai-image-editor-create-body-aspect-ratio-enum.js +2 -0
- package/dist/types/v1-ai-image-editor-create-body-model-enum.d.ts +28 -0
- package/dist/types/v1-ai-image-editor-create-body-model-enum.js +2 -0
- package/dist/types/v1-ai-image-editor-create-body-style-model-enum.d.ts +1 -1
- package/dist/types/v1-ai-image-editor-create-body-style.d.ts +1 -1
- package/dist/types/v1-ai-image-editor-create-body.d.ts +39 -0
- package/dist/types/v1-ai-image-editor-create-body.js +34 -0
- package/dist/types/v1-files-upload-urls-create-body-items-item.d.ts +1 -1
- package/dist/types/v1-image-projects-get-response.d.ts +1 -1
- package/dist/types/v1-image-to-video-create-body.d.ts +1 -1
- package/dist/types/v1-text-to-video-create-body.d.ts +1 -1
- package/package.json +1 -1
- package/dist/resources/v1/ai-photo-editor/index.d.ts +0 -2
- package/dist/resources/v1/ai-photo-editor/index.js +0 -5
- package/dist/resources/v1/ai-photo-editor/request-types.d.ts +0 -41
- package/dist/resources/v1/ai-photo-editor/request-types.js +0 -85
- package/dist/resources/v1/ai-photo-editor/resource-client.d.ts +0 -65
- package/dist/resources/v1/ai-photo-editor/resource-client.js +0 -111
- package/dist/types/v1-ai-photo-editor-create-body-assets.d.ts +0 -27
- package/dist/types/v1-ai-photo-editor-create-body-assets.js +0 -67
- package/dist/types/v1-ai-photo-editor-create-body-style.d.ts +0 -57
- package/dist/types/v1-ai-photo-editor-create-body-style.js +0 -95
- package/dist/types/v1-ai-photo-editor-create-body.d.ts +0 -41
- package/dist/types/v1-ai-photo-editor-create-body.js +0 -85
- package/dist/types/v1-ai-photo-editor-create-response.d.ts +0 -34
- package/dist/types/v1-ai-photo-editor-create-response.js +0 -75
package/README.md
CHANGED
|
@@ -241,11 +241,6 @@ Valid values are: `none`, `error`, `warn`, `info`, `debug` (case insensitive). I
|
|
|
241
241
|
- [create](src/resources/v1/ai-meme-generator/README.md#create) - AI Meme Generator
|
|
242
242
|
- [generate](src/resources/v1/ai-meme-generator/README.md#generate) - AI Meme Generator Generate Workflow
|
|
243
243
|
|
|
244
|
-
### [v1.aiPhotoEditor](src/resources/v1/ai-photo-editor/README.md)
|
|
245
|
-
|
|
246
|
-
- [create](src/resources/v1/ai-photo-editor/README.md#create) - AI Photo Editor
|
|
247
|
-
- [generate](src/resources/v1/ai-photo-editor/README.md#generate) - AI Photo Editor Generate Workflow
|
|
248
|
-
|
|
249
244
|
### [v1.aiQrCodeGenerator](src/resources/v1/ai-qr-code-generator/README.md)
|
|
250
245
|
|
|
251
246
|
- [create](src/resources/v1/ai-qr-code-generator/README.md#create) - AI QR Code Generator
|
package/dist/environment.d.ts
CHANGED
package/dist/environment.js
CHANGED
|
@@ -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.
|
|
7
|
+
Environment["MockServer"] = "https://api.sideko.dev/v1/mock/magichour/magic-hour/0.51.0";
|
|
8
8
|
})(Environment || (exports.Environment = Environment = {}));
|
|
@@ -5,10 +5,46 @@ import { External$V1AiImageEditorCreateBodyStyle, V1AiImageEditorCreateBodyStyle
|
|
|
5
5
|
* CreateRequest
|
|
6
6
|
*/
|
|
7
7
|
export type CreateRequest = {
|
|
8
|
+
/**
|
|
9
|
+
* The aspect ratio of the output image(s). If not specified, defaults to `auto`.
|
|
10
|
+
*/
|
|
11
|
+
aspectRatio?: ("16:9" | "1:1" | "2:3" | "3:2" | "4:3" | "4:5" | "9:16" | "auto") | undefined;
|
|
8
12
|
/**
|
|
9
13
|
* Provide the assets for image edit
|
|
10
14
|
*/
|
|
11
15
|
assets: V1AiImageEditorCreateBodyAssets;
|
|
16
|
+
/**
|
|
17
|
+
* Number of images to generate. Maximum varies by model. Defaults to 1 if not specified.
|
|
18
|
+
*/
|
|
19
|
+
imageCount?: number | undefined;
|
|
20
|
+
/**
|
|
21
|
+
* The AI model to use for image editing. Each model has different capabilities and costs.
|
|
22
|
+
*
|
|
23
|
+
* **Models:**
|
|
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
|
|
26
|
+
* - Available for tiers: free, creator, pro, business
|
|
27
|
+
* - Image count allowed: 1
|
|
28
|
+
* - Max additional input images: 2
|
|
29
|
+
* - `nano-banana` - 50 credits/image
|
|
30
|
+
* - Available for tiers: free, creator, pro, business
|
|
31
|
+
* - Image count allowed: 1
|
|
32
|
+
* - Max additional input images: 9
|
|
33
|
+
* - `seedream-v4` - 50 credits/image
|
|
34
|
+
* - Available for tiers: free, creator, pro, business
|
|
35
|
+
* - Image count allowed: 1
|
|
36
|
+
* - Max additional input images: 9
|
|
37
|
+
* - `nano-banana-pro` - 150 credits/image
|
|
38
|
+
* - Available for tiers: creator, pro, business
|
|
39
|
+
* - Image count allowed: 1, 4, 9, 16
|
|
40
|
+
* - Max additional input images: 9
|
|
41
|
+
* - `seedream-v4.5` - 100 credits/image
|
|
42
|
+
* - Available for tiers: creator, pro, business
|
|
43
|
+
* - Image count allowed: 1
|
|
44
|
+
* - Max additional input images: 9
|
|
45
|
+
*
|
|
46
|
+
*/
|
|
47
|
+
model?: ("default" | "nano-banana" | "nano-banana-pro" | "qwen-edit" | "seedream-v4" | "seedream-v4.5") | undefined;
|
|
12
48
|
/**
|
|
13
49
|
* Give your image a custom name for easy identification.
|
|
14
50
|
*/
|
|
@@ -21,7 +57,10 @@ export type CreateRequest = {
|
|
|
21
57
|
* we expect to come in as network data
|
|
22
58
|
*/
|
|
23
59
|
export type External$CreateRequest = {
|
|
60
|
+
aspect_ratio?: ("16:9" | "1:1" | "2:3" | "3:2" | "4:3" | "4:5" | "9:16" | "auto") | undefined;
|
|
24
61
|
assets: External$V1AiImageEditorCreateBodyAssets;
|
|
62
|
+
image_count?: number | undefined;
|
|
63
|
+
model?: ("default" | "nano-banana" | "nano-banana-pro" | "qwen-edit" | "seedream-v4" | "seedream-v4.5") | undefined;
|
|
25
64
|
name?: string | undefined;
|
|
26
65
|
style: External$V1AiImageEditorCreateBodyStyle;
|
|
27
66
|
};
|
|
@@ -43,13 +43,30 @@ const v1_ai_image_editor_create_body_style_1 = require("../../../types/v1-ai-ima
|
|
|
43
43
|
*/
|
|
44
44
|
const SchemaIn$CreateRequest = z
|
|
45
45
|
.object({
|
|
46
|
+
aspect_ratio: z
|
|
47
|
+
.enum(["16:9", "1:1", "2:3", "3:2", "4:3", "4:5", "9:16", "auto"])
|
|
48
|
+
.optional(),
|
|
46
49
|
assets: v1_ai_image_editor_create_body_assets_1.Schemas$V1AiImageEditorCreateBodyAssets.in,
|
|
50
|
+
image_count: z.number().optional(),
|
|
51
|
+
model: z
|
|
52
|
+
.enum([
|
|
53
|
+
"default",
|
|
54
|
+
"nano-banana",
|
|
55
|
+
"nano-banana-pro",
|
|
56
|
+
"qwen-edit",
|
|
57
|
+
"seedream-v4",
|
|
58
|
+
"seedream-v4.5",
|
|
59
|
+
])
|
|
60
|
+
.optional(),
|
|
47
61
|
name: z.string().optional(),
|
|
48
62
|
style: v1_ai_image_editor_create_body_style_1.Schemas$V1AiImageEditorCreateBodyStyle.in,
|
|
49
63
|
})
|
|
50
64
|
.transform((obj) => {
|
|
51
65
|
return (0, make_api_request_js_1.zodTransform)(obj, {
|
|
66
|
+
aspect_ratio: "aspectRatio",
|
|
52
67
|
assets: "assets",
|
|
68
|
+
image_count: "imageCount",
|
|
69
|
+
model: "model",
|
|
53
70
|
name: "name",
|
|
54
71
|
style: "style",
|
|
55
72
|
});
|
|
@@ -60,13 +77,30 @@ const SchemaIn$CreateRequest = z
|
|
|
60
77
|
*/
|
|
61
78
|
const SchemaOut$CreateRequest = z
|
|
62
79
|
.object({
|
|
80
|
+
aspectRatio: z
|
|
81
|
+
.enum(["16:9", "1:1", "2:3", "3:2", "4:3", "4:5", "9:16", "auto"])
|
|
82
|
+
.optional(),
|
|
63
83
|
assets: v1_ai_image_editor_create_body_assets_1.Schemas$V1AiImageEditorCreateBodyAssets.out,
|
|
84
|
+
imageCount: z.number().optional(),
|
|
85
|
+
model: z
|
|
86
|
+
.enum([
|
|
87
|
+
"default",
|
|
88
|
+
"nano-banana",
|
|
89
|
+
"nano-banana-pro",
|
|
90
|
+
"qwen-edit",
|
|
91
|
+
"seedream-v4",
|
|
92
|
+
"seedream-v4.5",
|
|
93
|
+
])
|
|
94
|
+
.optional(),
|
|
64
95
|
name: z.string().optional(),
|
|
65
96
|
style: v1_ai_image_editor_create_body_style_1.Schemas$V1AiImageEditorCreateBodyStyle.out,
|
|
66
97
|
})
|
|
67
98
|
.transform((obj) => {
|
|
68
99
|
return (0, make_api_request_js_1.zodTransform)(obj, {
|
|
100
|
+
aspectRatio: "aspect_ratio",
|
|
69
101
|
assets: "assets",
|
|
102
|
+
imageCount: "image_count",
|
|
103
|
+
model: "model",
|
|
70
104
|
name: "name",
|
|
71
105
|
style: "style",
|
|
72
106
|
});
|
|
@@ -12,7 +12,7 @@ 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
|
|
15
|
+
* - audio: mp3, wav, aac, flac, webm, m4a
|
|
16
16
|
* - image: png, jpg, jpeg, heic, webp, avif, jp2, tiff, bmp
|
|
17
17
|
* - gif: gif, webp, webm
|
|
18
18
|
*
|
|
@@ -17,7 +17,7 @@ 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
|
|
20
|
+
* - audio: mp3, wav, aac, flac, webm, m4a
|
|
21
21
|
* - image: png, jpg, jpeg, heic, webp, avif, jp2, tiff, bmp
|
|
22
22
|
* - gif: gif, webp, webm
|
|
23
23
|
*
|
|
@@ -13,7 +13,7 @@ export type CreateRequest = {
|
|
|
13
13
|
* The total duration of the output video in seconds.
|
|
14
14
|
*
|
|
15
15
|
* Supported durations depend on the chosen model:
|
|
16
|
-
* * **Default**: 5-60 seconds (
|
|
16
|
+
* * **Default**: 5-60 seconds (2-12 seconds for 480p).
|
|
17
17
|
* * **Seedance**: 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12
|
|
18
18
|
* * **Kling 2.5 Audio**: 5, 10
|
|
19
19
|
* * **Sora 2**: 4, 8, 12, 24, 36, 48, 60
|
|
@@ -6,7 +6,6 @@ export * as aiImageEditor from "./ai-image-editor";
|
|
|
6
6
|
export * as aiImageGenerator from "./ai-image-generator";
|
|
7
7
|
export * as aiImageUpscaler from "./ai-image-upscaler";
|
|
8
8
|
export * as aiMemeGenerator from "./ai-meme-generator";
|
|
9
|
-
export * as aiPhotoEditor from "./ai-photo-editor";
|
|
10
9
|
export * as aiQrCodeGenerator from "./ai-qr-code-generator";
|
|
11
10
|
export * as aiTalkingPhoto from "./ai-talking-photo";
|
|
12
11
|
export * as aiVoiceCloner from "./ai-voice-cloner";
|
|
@@ -33,7 +33,7 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
33
33
|
};
|
|
34
34
|
})();
|
|
35
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
-
exports.videoToVideo = exports.videoProjects = exports.textToVideo = exports.V1Client = exports.photoColorizer = exports.lipSync = exports.imageToVideo = exports.imageProjects = exports.imageBackgroundRemover = exports.files = exports.faceSwapPhoto = exports.faceSwap = exports.faceDetection = exports.autoSubtitleGenerator = exports.audioProjects = exports.animation = exports.aiVoiceGenerator = exports.aiVoiceCloner = exports.aiTalkingPhoto = exports.aiQrCodeGenerator = exports.
|
|
36
|
+
exports.videoToVideo = exports.videoProjects = exports.textToVideo = exports.V1Client = exports.photoColorizer = exports.lipSync = exports.imageToVideo = exports.imageProjects = exports.imageBackgroundRemover = exports.files = exports.faceSwapPhoto = exports.faceSwap = exports.faceDetection = exports.autoSubtitleGenerator = exports.audioProjects = exports.animation = exports.aiVoiceGenerator = exports.aiVoiceCloner = exports.aiTalkingPhoto = exports.aiQrCodeGenerator = exports.aiMemeGenerator = exports.aiImageUpscaler = exports.aiImageGenerator = exports.aiImageEditor = exports.aiHeadshotGenerator = exports.aiGifGenerator = exports.aiFaceEditor = exports.aiClothesChanger = void 0;
|
|
37
37
|
exports.aiClothesChanger = __importStar(require("./ai-clothes-changer"));
|
|
38
38
|
exports.aiFaceEditor = __importStar(require("./ai-face-editor"));
|
|
39
39
|
exports.aiGifGenerator = __importStar(require("./ai-gif-generator"));
|
|
@@ -42,7 +42,6 @@ exports.aiImageEditor = __importStar(require("./ai-image-editor"));
|
|
|
42
42
|
exports.aiImageGenerator = __importStar(require("./ai-image-generator"));
|
|
43
43
|
exports.aiImageUpscaler = __importStar(require("./ai-image-upscaler"));
|
|
44
44
|
exports.aiMemeGenerator = __importStar(require("./ai-meme-generator"));
|
|
45
|
-
exports.aiPhotoEditor = __importStar(require("./ai-photo-editor"));
|
|
46
45
|
exports.aiQrCodeGenerator = __importStar(require("./ai-qr-code-generator"));
|
|
47
46
|
exports.aiTalkingPhoto = __importStar(require("./ai-talking-photo"));
|
|
48
47
|
exports.aiVoiceCloner = __importStar(require("./ai-voice-cloner"));
|
|
@@ -7,7 +7,6 @@ import { AiImageEditorClient } from "../../resources/v1/ai-image-editor";
|
|
|
7
7
|
import { AiImageGeneratorClient } from "../../resources/v1/ai-image-generator";
|
|
8
8
|
import { AiImageUpscalerClient } from "../../resources/v1/ai-image-upscaler";
|
|
9
9
|
import { AiMemeGeneratorClient } from "../../resources/v1/ai-meme-generator";
|
|
10
|
-
import { AiPhotoEditorClient } from "../../resources/v1/ai-photo-editor";
|
|
11
10
|
import { AiQrCodeGeneratorClient } from "../../resources/v1/ai-qr-code-generator";
|
|
12
11
|
import { AiTalkingPhotoClient } from "../../resources/v1/ai-talking-photo";
|
|
13
12
|
import { AiVoiceClonerClient } from "../../resources/v1/ai-voice-cloner";
|
|
@@ -42,7 +41,6 @@ export declare class V1Client extends CoreResourceClient {
|
|
|
42
41
|
private _aiImageGeneratorLazy?;
|
|
43
42
|
private _aiImageUpscalerLazy?;
|
|
44
43
|
private _aiMemeGeneratorLazy?;
|
|
45
|
-
private _aiPhotoEditorLazy?;
|
|
46
44
|
private _aiQrCodeGeneratorLazy?;
|
|
47
45
|
private _aiTalkingPhotoLazy?;
|
|
48
46
|
private _animationLazy?;
|
|
@@ -68,7 +66,6 @@ export declare class V1Client extends CoreResourceClient {
|
|
|
68
66
|
get aiImageGenerator(): AiImageGeneratorClient;
|
|
69
67
|
get aiImageUpscaler(): AiImageUpscalerClient;
|
|
70
68
|
get aiMemeGenerator(): AiMemeGeneratorClient;
|
|
71
|
-
get aiPhotoEditor(): AiPhotoEditorClient;
|
|
72
69
|
get aiQrCodeGenerator(): AiQrCodeGeneratorClient;
|
|
73
70
|
get aiTalkingPhoto(): AiTalkingPhotoClient;
|
|
74
71
|
get animation(): AnimationClient;
|
|
@@ -14,7 +14,6 @@ class V1Client extends make_api_request_js_1.CoreResourceClient {
|
|
|
14
14
|
this.aiImageGenerator;
|
|
15
15
|
this.aiImageUpscaler;
|
|
16
16
|
this.aiMemeGenerator;
|
|
17
|
-
this.aiPhotoEditor;
|
|
18
17
|
this.aiQrCodeGenerator;
|
|
19
18
|
this.aiTalkingPhoto;
|
|
20
19
|
this.aiVoiceCloner;
|
|
@@ -91,11 +90,6 @@ class V1Client extends make_api_request_js_1.CoreResourceClient {
|
|
|
91
90
|
return ((_a = this._aiMemeGeneratorLazy) !== null && _a !== void 0 ? _a : (this._aiMemeGeneratorLazy =
|
|
92
91
|
new (require("./ai-meme-generator").AiMemeGeneratorClient)(this._client, this._opts)));
|
|
93
92
|
}
|
|
94
|
-
get aiPhotoEditor() {
|
|
95
|
-
var _a;
|
|
96
|
-
return ((_a = this._aiPhotoEditorLazy) !== null && _a !== void 0 ? _a : (this._aiPhotoEditorLazy =
|
|
97
|
-
new (require("./ai-photo-editor").AiPhotoEditorClient)(this._client, this._opts)));
|
|
98
|
-
}
|
|
99
93
|
get aiQrCodeGenerator() {
|
|
100
94
|
var _a;
|
|
101
95
|
return ((_a = this._aiQrCodeGeneratorLazy) !== null && _a !== void 0 ? _a : (this._aiQrCodeGeneratorLazy =
|
|
@@ -18,7 +18,7 @@ export type CreateRequest = {
|
|
|
18
18
|
* The total duration of the output video in seconds.
|
|
19
19
|
*
|
|
20
20
|
* Supported durations depend on the chosen model:
|
|
21
|
-
* * **Default**: 5-60 seconds (
|
|
21
|
+
* * **Default**: 5-60 seconds (2-12 seconds for 480p).
|
|
22
22
|
* * **Seedance**: 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12
|
|
23
23
|
* * **Kling 2.5 Audio**: 5, 10
|
|
24
24
|
* * **Sora 2**: 4, 8, 12, 24, 36, 48, 60
|
package/dist/types/index.d.ts
CHANGED
|
@@ -15,7 +15,9 @@ export { V1AiHeadshotGeneratorCreateBodyAssets } from "./v1-ai-headshot-generato
|
|
|
15
15
|
export { V1AiHeadshotGeneratorCreateBodyStyle } from "./v1-ai-headshot-generator-create-body-style";
|
|
16
16
|
export { V1AiHeadshotGeneratorCreateResponse } from "./v1-ai-headshot-generator-create-response";
|
|
17
17
|
export { V1AiImageEditorCreateBody } from "./v1-ai-image-editor-create-body";
|
|
18
|
+
export { V1AiImageEditorCreateBodyAspectRatioEnum } from "./v1-ai-image-editor-create-body-aspect-ratio-enum";
|
|
18
19
|
export { V1AiImageEditorCreateBodyAssets } from "./v1-ai-image-editor-create-body-assets";
|
|
20
|
+
export { V1AiImageEditorCreateBodyModelEnum } from "./v1-ai-image-editor-create-body-model-enum";
|
|
19
21
|
export { V1AiImageEditorCreateBodyStyle } from "./v1-ai-image-editor-create-body-style";
|
|
20
22
|
export { V1AiImageEditorCreateBodyStyleModelEnum } from "./v1-ai-image-editor-create-body-style-model-enum";
|
|
21
23
|
export { V1AiImageEditorCreateResponse } from "./v1-ai-image-editor-create-response";
|
|
@@ -37,10 +39,6 @@ export { V1AiMemeGeneratorCreateBody } from "./v1-ai-meme-generator-create-body"
|
|
|
37
39
|
export { V1AiMemeGeneratorCreateBodyStyle } from "./v1-ai-meme-generator-create-body-style";
|
|
38
40
|
export { V1AiMemeGeneratorCreateBodyStyleTemplateEnum } from "./v1-ai-meme-generator-create-body-style-template-enum";
|
|
39
41
|
export { V1AiMemeGeneratorCreateResponse } from "./v1-ai-meme-generator-create-response";
|
|
40
|
-
export { V1AiPhotoEditorCreateBody } from "./v1-ai-photo-editor-create-body";
|
|
41
|
-
export { V1AiPhotoEditorCreateBodyAssets } from "./v1-ai-photo-editor-create-body-assets";
|
|
42
|
-
export { V1AiPhotoEditorCreateBodyStyle } from "./v1-ai-photo-editor-create-body-style";
|
|
43
|
-
export { V1AiPhotoEditorCreateResponse } from "./v1-ai-photo-editor-create-response";
|
|
44
42
|
export { V1AiQrCodeGeneratorCreateBody } from "./v1-ai-qr-code-generator-create-body";
|
|
45
43
|
export { V1AiQrCodeGeneratorCreateBodyStyle } from "./v1-ai-qr-code-generator-create-body-style";
|
|
46
44
|
export { V1AiQrCodeGeneratorCreateResponse } from "./v1-ai-qr-code-generator-create-response";
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The AI model to use for image editing. Each model has different capabilities and costs.
|
|
3
|
+
*
|
|
4
|
+
* **Models:**
|
|
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
|
|
7
|
+
* - Available for tiers: free, creator, pro, business
|
|
8
|
+
* - Image count allowed: 1
|
|
9
|
+
* - Max additional input images: 2
|
|
10
|
+
* - `nano-banana` - 50 credits/image
|
|
11
|
+
* - Available for tiers: free, creator, pro, business
|
|
12
|
+
* - Image count allowed: 1
|
|
13
|
+
* - Max additional input images: 9
|
|
14
|
+
* - `seedream-v4` - 50 credits/image
|
|
15
|
+
* - Available for tiers: free, creator, pro, business
|
|
16
|
+
* - Image count allowed: 1
|
|
17
|
+
* - Max additional input images: 9
|
|
18
|
+
* - `nano-banana-pro` - 150 credits/image
|
|
19
|
+
* - Available for tiers: creator, pro, business
|
|
20
|
+
* - Image count allowed: 1, 4, 9, 16
|
|
21
|
+
* - Max additional input images: 9
|
|
22
|
+
* - `seedream-v4.5` - 100 credits/image
|
|
23
|
+
* - Available for tiers: creator, pro, business
|
|
24
|
+
* - Image count allowed: 1
|
|
25
|
+
* - Max additional input images: 9
|
|
26
|
+
*
|
|
27
|
+
*/
|
|
28
|
+
export type V1AiImageEditorCreateBodyModelEnum = "default" | "nano-banana" | "nano-banana-pro" | "qwen-edit" | "seedream-v4" | "seedream-v4.5";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* The AI model to use for image editing.
|
|
2
|
+
* Deprecated: Please use `model` instead. The AI model to use for image editing.
|
|
3
3
|
* * `Nano Banana` - Precise, realistic edits with consistent results
|
|
4
4
|
* * `Seedream` - Creative, imaginative images with artistic freedom
|
|
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.
|
|
@@ -4,7 +4,7 @@ import * as z from "zod";
|
|
|
4
4
|
*/
|
|
5
5
|
export type V1AiImageEditorCreateBodyStyle = {
|
|
6
6
|
/**
|
|
7
|
-
* The AI model to use for image editing.
|
|
7
|
+
* Deprecated: Please use `model` instead. The AI model to use for image editing.
|
|
8
8
|
* * `Nano Banana` - Precise, realistic edits with consistent results
|
|
9
9
|
* * `Seedream` - Creative, imaginative images with artistic freedom
|
|
10
10
|
* * `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.
|
|
@@ -5,10 +5,46 @@ import { External$V1AiImageEditorCreateBodyStyle, V1AiImageEditorCreateBodyStyle
|
|
|
5
5
|
* V1AiImageEditorCreateBody
|
|
6
6
|
*/
|
|
7
7
|
export type V1AiImageEditorCreateBody = {
|
|
8
|
+
/**
|
|
9
|
+
* The aspect ratio of the output image(s). If not specified, defaults to `auto`.
|
|
10
|
+
*/
|
|
11
|
+
aspectRatio?: ("16:9" | "1:1" | "2:3" | "3:2" | "4:3" | "4:5" | "9:16" | "auto") | undefined;
|
|
8
12
|
/**
|
|
9
13
|
* Provide the assets for image edit
|
|
10
14
|
*/
|
|
11
15
|
assets: V1AiImageEditorCreateBodyAssets;
|
|
16
|
+
/**
|
|
17
|
+
* Number of images to generate. Maximum varies by model. Defaults to 1 if not specified.
|
|
18
|
+
*/
|
|
19
|
+
imageCount?: number | undefined;
|
|
20
|
+
/**
|
|
21
|
+
* The AI model to use for image editing. Each model has different capabilities and costs.
|
|
22
|
+
*
|
|
23
|
+
* **Models:**
|
|
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
|
|
26
|
+
* - Available for tiers: free, creator, pro, business
|
|
27
|
+
* - Image count allowed: 1
|
|
28
|
+
* - Max additional input images: 2
|
|
29
|
+
* - `nano-banana` - 50 credits/image
|
|
30
|
+
* - Available for tiers: free, creator, pro, business
|
|
31
|
+
* - Image count allowed: 1
|
|
32
|
+
* - Max additional input images: 9
|
|
33
|
+
* - `seedream-v4` - 50 credits/image
|
|
34
|
+
* - Available for tiers: free, creator, pro, business
|
|
35
|
+
* - Image count allowed: 1
|
|
36
|
+
* - Max additional input images: 9
|
|
37
|
+
* - `nano-banana-pro` - 150 credits/image
|
|
38
|
+
* - Available for tiers: creator, pro, business
|
|
39
|
+
* - Image count allowed: 1, 4, 9, 16
|
|
40
|
+
* - Max additional input images: 9
|
|
41
|
+
* - `seedream-v4.5` - 100 credits/image
|
|
42
|
+
* - Available for tiers: creator, pro, business
|
|
43
|
+
* - Image count allowed: 1
|
|
44
|
+
* - Max additional input images: 9
|
|
45
|
+
*
|
|
46
|
+
*/
|
|
47
|
+
model?: ("default" | "nano-banana" | "nano-banana-pro" | "qwen-edit" | "seedream-v4" | "seedream-v4.5") | undefined;
|
|
12
48
|
/**
|
|
13
49
|
* Give your image a custom name for easy identification.
|
|
14
50
|
*/
|
|
@@ -21,7 +57,10 @@ export type V1AiImageEditorCreateBody = {
|
|
|
21
57
|
* we expect to come in as network data
|
|
22
58
|
*/
|
|
23
59
|
export type External$V1AiImageEditorCreateBody = {
|
|
60
|
+
aspect_ratio?: ("16:9" | "1:1" | "2:3" | "3:2" | "4:3" | "4:5" | "9:16" | "auto") | undefined;
|
|
24
61
|
assets: External$V1AiImageEditorCreateBodyAssets;
|
|
62
|
+
image_count?: number | undefined;
|
|
63
|
+
model?: ("default" | "nano-banana" | "nano-banana-pro" | "qwen-edit" | "seedream-v4" | "seedream-v4.5") | undefined;
|
|
25
64
|
name?: string | undefined;
|
|
26
65
|
style: External$V1AiImageEditorCreateBodyStyle;
|
|
27
66
|
};
|
|
@@ -43,13 +43,30 @@ const v1_ai_image_editor_create_body_style_1 = require("./v1-ai-image-editor-cre
|
|
|
43
43
|
*/
|
|
44
44
|
const SchemaIn$V1AiImageEditorCreateBody = z
|
|
45
45
|
.object({
|
|
46
|
+
aspect_ratio: z
|
|
47
|
+
.enum(["16:9", "1:1", "2:3", "3:2", "4:3", "4:5", "9:16", "auto"])
|
|
48
|
+
.optional(),
|
|
46
49
|
assets: v1_ai_image_editor_create_body_assets_1.Schemas$V1AiImageEditorCreateBodyAssets.in,
|
|
50
|
+
image_count: z.number().optional(),
|
|
51
|
+
model: z
|
|
52
|
+
.enum([
|
|
53
|
+
"default",
|
|
54
|
+
"nano-banana",
|
|
55
|
+
"nano-banana-pro",
|
|
56
|
+
"qwen-edit",
|
|
57
|
+
"seedream-v4",
|
|
58
|
+
"seedream-v4.5",
|
|
59
|
+
])
|
|
60
|
+
.optional(),
|
|
47
61
|
name: z.string().optional(),
|
|
48
62
|
style: v1_ai_image_editor_create_body_style_1.Schemas$V1AiImageEditorCreateBodyStyle.in,
|
|
49
63
|
})
|
|
50
64
|
.transform((obj) => {
|
|
51
65
|
return (0, make_api_request_js_1.zodTransform)(obj, {
|
|
66
|
+
aspect_ratio: "aspectRatio",
|
|
52
67
|
assets: "assets",
|
|
68
|
+
image_count: "imageCount",
|
|
69
|
+
model: "model",
|
|
53
70
|
name: "name",
|
|
54
71
|
style: "style",
|
|
55
72
|
});
|
|
@@ -60,13 +77,30 @@ const SchemaIn$V1AiImageEditorCreateBody = z
|
|
|
60
77
|
*/
|
|
61
78
|
const SchemaOut$V1AiImageEditorCreateBody = z
|
|
62
79
|
.object({
|
|
80
|
+
aspectRatio: z
|
|
81
|
+
.enum(["16:9", "1:1", "2:3", "3:2", "4:3", "4:5", "9:16", "auto"])
|
|
82
|
+
.optional(),
|
|
63
83
|
assets: v1_ai_image_editor_create_body_assets_1.Schemas$V1AiImageEditorCreateBodyAssets.out,
|
|
84
|
+
imageCount: z.number().optional(),
|
|
85
|
+
model: z
|
|
86
|
+
.enum([
|
|
87
|
+
"default",
|
|
88
|
+
"nano-banana",
|
|
89
|
+
"nano-banana-pro",
|
|
90
|
+
"qwen-edit",
|
|
91
|
+
"seedream-v4",
|
|
92
|
+
"seedream-v4.5",
|
|
93
|
+
])
|
|
94
|
+
.optional(),
|
|
64
95
|
name: z.string().optional(),
|
|
65
96
|
style: v1_ai_image_editor_create_body_style_1.Schemas$V1AiImageEditorCreateBodyStyle.out,
|
|
66
97
|
})
|
|
67
98
|
.transform((obj) => {
|
|
68
99
|
return (0, make_api_request_js_1.zodTransform)(obj, {
|
|
100
|
+
aspectRatio: "aspect_ratio",
|
|
69
101
|
assets: "assets",
|
|
102
|
+
imageCount: "image_count",
|
|
103
|
+
model: "model",
|
|
70
104
|
name: "name",
|
|
71
105
|
style: "style",
|
|
72
106
|
});
|
|
@@ -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,png,jpg,jpeg,heic,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,m4a,png,jpg,jpeg,heic,webp,avif,jp2,tiff,bmp,gif,webp,webm
|
|
8
8
|
*/
|
|
9
9
|
extension: string;
|
|
10
10
|
/**
|
|
@@ -42,7 +42,7 @@ export type V1ImageProjectsGetResponse = {
|
|
|
42
42
|
*/
|
|
43
43
|
totalFrameCost: number;
|
|
44
44
|
/**
|
|
45
|
-
* The type of the image project. Possible values are AI_HEADSHOT, AI_IMAGE, IMAGE_UPSCALER, FACE_SWAP, PHOTO_EDITOR, QR_CODE, BACKGROUND_REMOVER, CLOTHES_CHANGER, AI_MEME, FACE_EDITOR, PHOTO_COLORIZER, AI_GIF, AI_SELFIE, AI_IMAGE_EDITOR, HEAD_SWAP
|
|
45
|
+
* The type of the image project. Possible values are AI_HEADSHOT, AI_IMAGE, IMAGE_UPSCALER, FACE_SWAP, PHOTO_EDITOR, QR_CODE, BACKGROUND_REMOVER, CLOTHES_CHANGER, AI_MEME, FACE_EDITOR, PHOTO_COLORIZER, AI_GIF, AI_SELFIE, AI_IMAGE_EDITOR, HEAD_SWAP, STORYBOARD
|
|
46
46
|
*/
|
|
47
47
|
type: string;
|
|
48
48
|
};
|
|
@@ -13,7 +13,7 @@ export type V1ImageToVideoCreateBody = {
|
|
|
13
13
|
* The total duration of the output video in seconds.
|
|
14
14
|
*
|
|
15
15
|
* Supported durations depend on the chosen model:
|
|
16
|
-
* * **Default**: 5-60 seconds (
|
|
16
|
+
* * **Default**: 5-60 seconds (2-12 seconds for 480p).
|
|
17
17
|
* * **Seedance**: 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12
|
|
18
18
|
* * **Kling 2.5 Audio**: 5, 10
|
|
19
19
|
* * **Sora 2**: 4, 8, 12, 24, 36, 48, 60
|
|
@@ -18,7 +18,7 @@ export type V1TextToVideoCreateBody = {
|
|
|
18
18
|
* The total duration of the output video in seconds.
|
|
19
19
|
*
|
|
20
20
|
* Supported durations depend on the chosen model:
|
|
21
|
-
* * **Default**: 5-60 seconds (
|
|
21
|
+
* * **Default**: 5-60 seconds (2-12 seconds for 480p).
|
|
22
22
|
* * **Seedance**: 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12
|
|
23
23
|
* * **Kling 2.5 Audio**: 5, 10
|
|
24
24
|
* * **Sora 2**: 4, 8, 12, 24, 36, 48, 60
|
package/package.json
CHANGED
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.AiPhotoEditorClient = void 0;
|
|
4
|
-
var resource_client_1 = require("./resource-client");
|
|
5
|
-
Object.defineProperty(exports, "AiPhotoEditorClient", { enumerable: true, get: function () { return resource_client_1.AiPhotoEditorClient; } });
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
import * as z from "zod";
|
|
2
|
-
import { External$V1AiPhotoEditorCreateBodyAssets, V1AiPhotoEditorCreateBodyAssets } from "../../../types/v1-ai-photo-editor-create-body-assets";
|
|
3
|
-
import { External$V1AiPhotoEditorCreateBodyStyle, V1AiPhotoEditorCreateBodyStyle } from "../../../types/v1-ai-photo-editor-create-body-style";
|
|
4
|
-
/**
|
|
5
|
-
* CreateRequest
|
|
6
|
-
*/
|
|
7
|
-
export type CreateRequest = {
|
|
8
|
-
/**
|
|
9
|
-
* Provide the assets for photo editor
|
|
10
|
-
*/
|
|
11
|
-
assets: V1AiPhotoEditorCreateBodyAssets;
|
|
12
|
-
/**
|
|
13
|
-
* Give your image a custom name for easy identification.
|
|
14
|
-
*/
|
|
15
|
-
name?: string | undefined;
|
|
16
|
-
/**
|
|
17
|
-
* The resolution of the final output image. The allowed value is based on your subscription. Please refer to our [pricing page](https://magichour.ai/pricing) for more details
|
|
18
|
-
*/
|
|
19
|
-
resolution: number;
|
|
20
|
-
/**
|
|
21
|
-
* Deprecated: Please use `.style.steps` instead. Number of iterations used to generate the output. Higher values improve quality and increase the strength of the prompt but increase processing time.
|
|
22
|
-
*/
|
|
23
|
-
steps?: number | undefined;
|
|
24
|
-
style: V1AiPhotoEditorCreateBodyStyle;
|
|
25
|
-
};
|
|
26
|
-
/**
|
|
27
|
-
* @internal
|
|
28
|
-
* CreateRequest without any key transformation, this is what
|
|
29
|
-
* we expect to come in as network data
|
|
30
|
-
*/
|
|
31
|
-
export type External$CreateRequest = {
|
|
32
|
-
assets: External$V1AiPhotoEditorCreateBodyAssets;
|
|
33
|
-
name?: string | undefined;
|
|
34
|
-
resolution: number;
|
|
35
|
-
steps?: number | undefined;
|
|
36
|
-
style: External$V1AiPhotoEditorCreateBodyStyle;
|
|
37
|
-
};
|
|
38
|
-
export declare const Schemas$CreateRequest: {
|
|
39
|
-
in: z.ZodType<CreateRequest, z.ZodTypeDef, unknown>;
|
|
40
|
-
out: z.ZodType<External$CreateRequest, z.ZodTypeDef, CreateRequest>;
|
|
41
|
-
};
|