magic-hour 0.21.0 → 0.23.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/dist/client.js +4 -2
- package/dist/core/core-client.d.ts +4 -3
- package/dist/core/core-client.js +10 -10
- package/dist/environment.d.ts +1 -1
- package/dist/environment.js +1 -1
- package/dist/resources/v1/ai-clothes-changer/resource-client.d.ts +1 -1
- package/dist/resources/v1/ai-clothes-changer/resource-client.js +1 -1
- package/dist/resources/v1/ai-gif-generator/resource-client.d.ts +1 -1
- package/dist/resources/v1/ai-gif-generator/resource-client.js +1 -1
- package/dist/resources/v1/ai-headshot-generator/resource-client.d.ts +1 -1
- package/dist/resources/v1/ai-headshot-generator/resource-client.js +1 -1
- package/dist/resources/v1/ai-image-generator/resource-client.d.ts +1 -1
- package/dist/resources/v1/ai-image-generator/resource-client.js +1 -1
- package/dist/resources/v1/ai-image-upscaler/resource-client.d.ts +1 -1
- package/dist/resources/v1/ai-image-upscaler/resource-client.js +1 -1
- package/dist/resources/v1/ai-meme-generator/resource-client.d.ts +1 -1
- package/dist/resources/v1/ai-meme-generator/resource-client.js +1 -1
- package/dist/resources/v1/ai-photo-editor/resource-client.d.ts +1 -1
- package/dist/resources/v1/ai-photo-editor/resource-client.js +1 -1
- package/dist/resources/v1/ai-qr-code-generator/resource-client.d.ts +1 -1
- package/dist/resources/v1/ai-qr-code-generator/resource-client.js +1 -1
- package/dist/resources/v1/ai-talking-photo/request-types.d.ts +8 -2
- package/dist/resources/v1/ai-talking-photo/request-types.js +5 -0
- package/dist/resources/v1/face-swap-photo/resource-client.d.ts +1 -1
- package/dist/resources/v1/face-swap-photo/resource-client.js +1 -1
- package/dist/resources/v1/image-background-remover/resource-client.d.ts +1 -1
- package/dist/resources/v1/image-background-remover/resource-client.js +1 -1
- package/dist/resources/v1/photo-colorizer/resource-client.d.ts +1 -1
- package/dist/resources/v1/photo-colorizer/resource-client.js +1 -1
- package/dist/types/index.d.ts +2 -0
- package/dist/types/v1-ai-clothes-changer-create-response.d.ts +8 -1
- package/dist/types/v1-ai-clothes-changer-create-response.js +4 -0
- package/dist/types/v1-ai-face-editor-create-response.d.ts +8 -1
- package/dist/types/v1-ai-face-editor-create-response.js +4 -0
- package/dist/types/v1-ai-gif-generator-create-response.d.ts +8 -1
- package/dist/types/v1-ai-gif-generator-create-response.js +4 -0
- package/dist/types/v1-ai-headshot-generator-create-response.d.ts +8 -1
- package/dist/types/v1-ai-headshot-generator-create-response.js +4 -0
- package/dist/types/v1-ai-image-generator-create-response.d.ts +8 -1
- package/dist/types/v1-ai-image-generator-create-response.js +4 -0
- package/dist/types/v1-ai-image-upscaler-create-response.d.ts +8 -1
- package/dist/types/v1-ai-image-upscaler-create-response.js +4 -0
- package/dist/types/v1-ai-meme-generator-create-response.d.ts +8 -1
- package/dist/types/v1-ai-meme-generator-create-response.js +4 -0
- package/dist/types/v1-ai-photo-editor-create-response.d.ts +8 -1
- package/dist/types/v1-ai-photo-editor-create-response.js +4 -0
- package/dist/types/v1-ai-qr-code-generator-create-response.d.ts +8 -1
- package/dist/types/v1-ai-qr-code-generator-create-response.js +4 -0
- package/dist/types/v1-ai-talking-photo-create-body-style-generation-mode-enum.d.ts +6 -0
- package/dist/types/v1-ai-talking-photo-create-body-style-generation-mode-enum.js +2 -0
- package/dist/types/v1-ai-talking-photo-create-body-style.d.ts +31 -0
- package/dist/types/v1-ai-talking-photo-create-body-style.js +71 -0
- package/dist/types/v1-ai-talking-photo-create-body.d.ts +8 -2
- package/dist/types/v1-ai-talking-photo-create-body.js +5 -0
- package/dist/types/v1-ai-talking-photo-create-response.d.ts +10 -1
- package/dist/types/v1-ai-talking-photo-create-response.js +4 -0
- package/dist/types/v1-animation-create-response.d.ts +10 -1
- package/dist/types/v1-animation-create-response.js +4 -0
- package/dist/types/v1-face-swap-create-response.d.ts +11 -2
- package/dist/types/v1-face-swap-create-response.js +4 -0
- package/dist/types/v1-face-swap-photo-create-response.d.ts +8 -1
- package/dist/types/v1-face-swap-photo-create-response.js +4 -0
- package/dist/types/v1-image-background-remover-create-response.d.ts +8 -1
- package/dist/types/v1-image-background-remover-create-response.js +4 -0
- package/dist/types/v1-image-projects-get-response.d.ts +8 -1
- package/dist/types/v1-image-projects-get-response.js +4 -0
- package/dist/types/v1-image-to-video-create-response.d.ts +10 -1
- package/dist/types/v1-image-to-video-create-response.js +4 -0
- package/dist/types/v1-lip-sync-create-response.d.ts +10 -1
- package/dist/types/v1-lip-sync-create-response.js +4 -0
- package/dist/types/v1-photo-colorizer-create-response.d.ts +8 -1
- package/dist/types/v1-photo-colorizer-create-response.js +4 -0
- package/dist/types/v1-text-to-video-create-response.d.ts +10 -1
- package/dist/types/v1-text-to-video-create-response.js +4 -0
- package/dist/types/v1-video-projects-get-response.d.ts +9 -0
- package/dist/types/v1-video-projects-get-response.js +4 -0
- package/dist/types/v1-video-to-video-create-body-style-art-style-enum.d.ts +1 -1
- package/dist/types/v1-video-to-video-create-body-style.d.ts +2 -2
- package/dist/types/v1-video-to-video-create-body-style.js +2 -0
- package/dist/types/v1-video-to-video-create-response.d.ts +10 -1
- package/dist/types/v1-video-to-video-create-response.js +4 -0
- package/package.json +1 -1
|
@@ -41,11 +41,13 @@ const z = __importStar(require("zod"));
|
|
|
41
41
|
*/
|
|
42
42
|
const SchemaIn$V1AiImageGeneratorCreateResponse = z
|
|
43
43
|
.object({
|
|
44
|
+
credits_charged: z.number().int(),
|
|
44
45
|
frame_cost: z.number().int(),
|
|
45
46
|
id: z.string(),
|
|
46
47
|
})
|
|
47
48
|
.transform((obj) => {
|
|
48
49
|
return (0, core_1.zodTransform)(obj, {
|
|
50
|
+
credits_charged: "creditsCharged",
|
|
49
51
|
frame_cost: "frameCost",
|
|
50
52
|
id: "id",
|
|
51
53
|
});
|
|
@@ -56,11 +58,13 @@ const SchemaIn$V1AiImageGeneratorCreateResponse = z
|
|
|
56
58
|
*/
|
|
57
59
|
const SchemaOut$V1AiImageGeneratorCreateResponse = z
|
|
58
60
|
.object({
|
|
61
|
+
creditsCharged: z.number().int(),
|
|
59
62
|
frameCost: z.number().int(),
|
|
60
63
|
id: z.string(),
|
|
61
64
|
})
|
|
62
65
|
.transform((obj) => {
|
|
63
66
|
return (0, core_1.zodTransform)(obj, {
|
|
67
|
+
creditsCharged: "credits_charged",
|
|
64
68
|
frameCost: "frame_cost",
|
|
65
69
|
id: "id",
|
|
66
70
|
});
|
|
@@ -4,7 +4,13 @@ import * as z from "zod";
|
|
|
4
4
|
*/
|
|
5
5
|
export type V1AiImageUpscalerCreateResponse = {
|
|
6
6
|
/**
|
|
7
|
-
* The
|
|
7
|
+
* The amount of credits deducted from your account to generate the image. We charge credits right when the request is made.
|
|
8
|
+
*
|
|
9
|
+
* If an error occurred while generating the image(s), credits will be refunded and this field will be updated to include the refund.
|
|
10
|
+
*/
|
|
11
|
+
creditsCharged: number;
|
|
12
|
+
/**
|
|
13
|
+
* Deprecated: Previously represented the number of frames (original name of our credit system) used for image generation. Use 'credits_charged' instead.
|
|
8
14
|
*/
|
|
9
15
|
frameCost: number;
|
|
10
16
|
/**
|
|
@@ -18,6 +24,7 @@ export type V1AiImageUpscalerCreateResponse = {
|
|
|
18
24
|
* we expect to come in as network data
|
|
19
25
|
*/
|
|
20
26
|
export type External$V1AiImageUpscalerCreateResponse = {
|
|
27
|
+
credits_charged: number;
|
|
21
28
|
frame_cost: number;
|
|
22
29
|
id: string;
|
|
23
30
|
};
|
|
@@ -41,11 +41,13 @@ const z = __importStar(require("zod"));
|
|
|
41
41
|
*/
|
|
42
42
|
const SchemaIn$V1AiImageUpscalerCreateResponse = z
|
|
43
43
|
.object({
|
|
44
|
+
credits_charged: z.number().int(),
|
|
44
45
|
frame_cost: z.number().int(),
|
|
45
46
|
id: z.string(),
|
|
46
47
|
})
|
|
47
48
|
.transform((obj) => {
|
|
48
49
|
return (0, core_1.zodTransform)(obj, {
|
|
50
|
+
credits_charged: "creditsCharged",
|
|
49
51
|
frame_cost: "frameCost",
|
|
50
52
|
id: "id",
|
|
51
53
|
});
|
|
@@ -56,11 +58,13 @@ const SchemaIn$V1AiImageUpscalerCreateResponse = z
|
|
|
56
58
|
*/
|
|
57
59
|
const SchemaOut$V1AiImageUpscalerCreateResponse = z
|
|
58
60
|
.object({
|
|
61
|
+
creditsCharged: z.number().int(),
|
|
59
62
|
frameCost: z.number().int(),
|
|
60
63
|
id: z.string(),
|
|
61
64
|
})
|
|
62
65
|
.transform((obj) => {
|
|
63
66
|
return (0, core_1.zodTransform)(obj, {
|
|
67
|
+
creditsCharged: "credits_charged",
|
|
64
68
|
frameCost: "frame_cost",
|
|
65
69
|
id: "id",
|
|
66
70
|
});
|
|
@@ -4,7 +4,13 @@ import * as z from "zod";
|
|
|
4
4
|
*/
|
|
5
5
|
export type V1AiMemeGeneratorCreateResponse = {
|
|
6
6
|
/**
|
|
7
|
-
* The
|
|
7
|
+
* The amount of credits deducted from your account to generate the image. We charge credits right when the request is made.
|
|
8
|
+
*
|
|
9
|
+
* If an error occurred while generating the image(s), credits will be refunded and this field will be updated to include the refund.
|
|
10
|
+
*/
|
|
11
|
+
creditsCharged: number;
|
|
12
|
+
/**
|
|
13
|
+
* Deprecated: Previously represented the number of frames (original name of our credit system) used for image generation. Use 'credits_charged' instead.
|
|
8
14
|
*/
|
|
9
15
|
frameCost: number;
|
|
10
16
|
/**
|
|
@@ -18,6 +24,7 @@ export type V1AiMemeGeneratorCreateResponse = {
|
|
|
18
24
|
* we expect to come in as network data
|
|
19
25
|
*/
|
|
20
26
|
export type External$V1AiMemeGeneratorCreateResponse = {
|
|
27
|
+
credits_charged: number;
|
|
21
28
|
frame_cost: number;
|
|
22
29
|
id: string;
|
|
23
30
|
};
|
|
@@ -41,11 +41,13 @@ const z = __importStar(require("zod"));
|
|
|
41
41
|
*/
|
|
42
42
|
const SchemaIn$V1AiMemeGeneratorCreateResponse = z
|
|
43
43
|
.object({
|
|
44
|
+
credits_charged: z.number().int(),
|
|
44
45
|
frame_cost: z.number().int(),
|
|
45
46
|
id: z.string(),
|
|
46
47
|
})
|
|
47
48
|
.transform((obj) => {
|
|
48
49
|
return (0, core_1.zodTransform)(obj, {
|
|
50
|
+
credits_charged: "creditsCharged",
|
|
49
51
|
frame_cost: "frameCost",
|
|
50
52
|
id: "id",
|
|
51
53
|
});
|
|
@@ -56,11 +58,13 @@ const SchemaIn$V1AiMemeGeneratorCreateResponse = z
|
|
|
56
58
|
*/
|
|
57
59
|
const SchemaOut$V1AiMemeGeneratorCreateResponse = z
|
|
58
60
|
.object({
|
|
61
|
+
creditsCharged: z.number().int(),
|
|
59
62
|
frameCost: z.number().int(),
|
|
60
63
|
id: z.string(),
|
|
61
64
|
})
|
|
62
65
|
.transform((obj) => {
|
|
63
66
|
return (0, core_1.zodTransform)(obj, {
|
|
67
|
+
creditsCharged: "credits_charged",
|
|
64
68
|
frameCost: "frame_cost",
|
|
65
69
|
id: "id",
|
|
66
70
|
});
|
|
@@ -4,7 +4,13 @@ import * as z from "zod";
|
|
|
4
4
|
*/
|
|
5
5
|
export type V1AiPhotoEditorCreateResponse = {
|
|
6
6
|
/**
|
|
7
|
-
* The
|
|
7
|
+
* The amount of credits deducted from your account to generate the image. We charge credits right when the request is made.
|
|
8
|
+
*
|
|
9
|
+
* If an error occurred while generating the image(s), credits will be refunded and this field will be updated to include the refund.
|
|
10
|
+
*/
|
|
11
|
+
creditsCharged: number;
|
|
12
|
+
/**
|
|
13
|
+
* Deprecated: Previously represented the number of frames (original name of our credit system) used for image generation. Use 'credits_charged' instead.
|
|
8
14
|
*/
|
|
9
15
|
frameCost: number;
|
|
10
16
|
/**
|
|
@@ -18,6 +24,7 @@ export type V1AiPhotoEditorCreateResponse = {
|
|
|
18
24
|
* we expect to come in as network data
|
|
19
25
|
*/
|
|
20
26
|
export type External$V1AiPhotoEditorCreateResponse = {
|
|
27
|
+
credits_charged: number;
|
|
21
28
|
frame_cost: number;
|
|
22
29
|
id: string;
|
|
23
30
|
};
|
|
@@ -41,11 +41,13 @@ const z = __importStar(require("zod"));
|
|
|
41
41
|
*/
|
|
42
42
|
const SchemaIn$V1AiPhotoEditorCreateResponse = z
|
|
43
43
|
.object({
|
|
44
|
+
credits_charged: z.number().int(),
|
|
44
45
|
frame_cost: z.number().int(),
|
|
45
46
|
id: z.string(),
|
|
46
47
|
})
|
|
47
48
|
.transform((obj) => {
|
|
48
49
|
return (0, core_1.zodTransform)(obj, {
|
|
50
|
+
credits_charged: "creditsCharged",
|
|
49
51
|
frame_cost: "frameCost",
|
|
50
52
|
id: "id",
|
|
51
53
|
});
|
|
@@ -56,11 +58,13 @@ const SchemaIn$V1AiPhotoEditorCreateResponse = z
|
|
|
56
58
|
*/
|
|
57
59
|
const SchemaOut$V1AiPhotoEditorCreateResponse = z
|
|
58
60
|
.object({
|
|
61
|
+
creditsCharged: z.number().int(),
|
|
59
62
|
frameCost: z.number().int(),
|
|
60
63
|
id: z.string(),
|
|
61
64
|
})
|
|
62
65
|
.transform((obj) => {
|
|
63
66
|
return (0, core_1.zodTransform)(obj, {
|
|
67
|
+
creditsCharged: "credits_charged",
|
|
64
68
|
frameCost: "frame_cost",
|
|
65
69
|
id: "id",
|
|
66
70
|
});
|
|
@@ -4,7 +4,13 @@ import * as z from "zod";
|
|
|
4
4
|
*/
|
|
5
5
|
export type V1AiQrCodeGeneratorCreateResponse = {
|
|
6
6
|
/**
|
|
7
|
-
* The
|
|
7
|
+
* The amount of credits deducted from your account to generate the image. We charge credits right when the request is made.
|
|
8
|
+
*
|
|
9
|
+
* If an error occurred while generating the image(s), credits will be refunded and this field will be updated to include the refund.
|
|
10
|
+
*/
|
|
11
|
+
creditsCharged: number;
|
|
12
|
+
/**
|
|
13
|
+
* Deprecated: Previously represented the number of frames (original name of our credit system) used for image generation. Use 'credits_charged' instead.
|
|
8
14
|
*/
|
|
9
15
|
frameCost: number;
|
|
10
16
|
/**
|
|
@@ -18,6 +24,7 @@ export type V1AiQrCodeGeneratorCreateResponse = {
|
|
|
18
24
|
* we expect to come in as network data
|
|
19
25
|
*/
|
|
20
26
|
export type External$V1AiQrCodeGeneratorCreateResponse = {
|
|
27
|
+
credits_charged: number;
|
|
21
28
|
frame_cost: number;
|
|
22
29
|
id: string;
|
|
23
30
|
};
|
|
@@ -41,11 +41,13 @@ const z = __importStar(require("zod"));
|
|
|
41
41
|
*/
|
|
42
42
|
const SchemaIn$V1AiQrCodeGeneratorCreateResponse = z
|
|
43
43
|
.object({
|
|
44
|
+
credits_charged: z.number().int(),
|
|
44
45
|
frame_cost: z.number().int(),
|
|
45
46
|
id: z.string(),
|
|
46
47
|
})
|
|
47
48
|
.transform((obj) => {
|
|
48
49
|
return (0, core_1.zodTransform)(obj, {
|
|
50
|
+
credits_charged: "creditsCharged",
|
|
49
51
|
frame_cost: "frameCost",
|
|
50
52
|
id: "id",
|
|
51
53
|
});
|
|
@@ -56,11 +58,13 @@ const SchemaIn$V1AiQrCodeGeneratorCreateResponse = z
|
|
|
56
58
|
*/
|
|
57
59
|
const SchemaOut$V1AiQrCodeGeneratorCreateResponse = z
|
|
58
60
|
.object({
|
|
61
|
+
creditsCharged: z.number().int(),
|
|
59
62
|
frameCost: z.number().int(),
|
|
60
63
|
id: z.string(),
|
|
61
64
|
})
|
|
62
65
|
.transform((obj) => {
|
|
63
66
|
return (0, core_1.zodTransform)(obj, {
|
|
67
|
+
creditsCharged: "credits_charged",
|
|
64
68
|
frameCost: "frame_cost",
|
|
65
69
|
id: "id",
|
|
66
70
|
});
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Controls overall motion style.
|
|
3
|
+
* * `expressive` - More motion and facial expressiveness; may introduce visual artifacts.
|
|
4
|
+
* * `stable` - Reduced motion for cleaner output; may result in minimal animation.
|
|
5
|
+
*/
|
|
6
|
+
export type V1AiTalkingPhotoCreateBodyStyleGenerationModeEnum = "expressive" | "stable";
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import * as z from "zod";
|
|
2
|
+
/**
|
|
3
|
+
* Attributes used to dictate the style of the output
|
|
4
|
+
*/
|
|
5
|
+
export type V1AiTalkingPhotoCreateBodyStyle = {
|
|
6
|
+
/**
|
|
7
|
+
* Controls overall motion style.
|
|
8
|
+
* * `expressive` - More motion and facial expressiveness; may introduce visual artifacts.
|
|
9
|
+
* * `stable` - Reduced motion for cleaner output; may result in minimal animation.
|
|
10
|
+
*/
|
|
11
|
+
generationMode?: ("expressive" | "stable") | undefined;
|
|
12
|
+
/**
|
|
13
|
+
* Note: this value is only applicable when generation_mode is `expressive`. The value can include up to 2 decimal places.
|
|
14
|
+
* * Lower values yield more stability but can suppress mouth movement.
|
|
15
|
+
* * Higher values increase motion and expressiveness, with a higher risk of distortion.
|
|
16
|
+
*/
|
|
17
|
+
intensity?: number | undefined;
|
|
18
|
+
};
|
|
19
|
+
/**
|
|
20
|
+
* @internal
|
|
21
|
+
* V1AiTalkingPhotoCreateBodyStyle without any key transformation, this is what
|
|
22
|
+
* we expect to come in as network data
|
|
23
|
+
*/
|
|
24
|
+
export type External$V1AiTalkingPhotoCreateBodyStyle = {
|
|
25
|
+
generation_mode?: ("expressive" | "stable") | undefined;
|
|
26
|
+
intensity?: number | undefined;
|
|
27
|
+
};
|
|
28
|
+
export declare const Schemas$V1AiTalkingPhotoCreateBodyStyle: {
|
|
29
|
+
in: z.ZodType<V1AiTalkingPhotoCreateBodyStyle, z.ZodTypeDef, unknown>;
|
|
30
|
+
out: z.ZodType<External$V1AiTalkingPhotoCreateBodyStyle, z.ZodTypeDef, V1AiTalkingPhotoCreateBodyStyle>;
|
|
31
|
+
};
|
|
@@ -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$V1AiTalkingPhotoCreateBodyStyle = void 0;
|
|
37
|
+
const core_1 = require("../core");
|
|
38
|
+
const z = __importStar(require("zod"));
|
|
39
|
+
/**
|
|
40
|
+
* Takes network data, validates it, and transforms keys to match typescript object V1AiTalkingPhotoCreateBodyStyle
|
|
41
|
+
*/
|
|
42
|
+
const SchemaIn$V1AiTalkingPhotoCreateBodyStyle = z
|
|
43
|
+
.object({
|
|
44
|
+
generation_mode: z.enum(["expressive", "stable"]).optional(),
|
|
45
|
+
intensity: z.number().optional(),
|
|
46
|
+
})
|
|
47
|
+
.transform((obj) => {
|
|
48
|
+
return (0, core_1.zodTransform)(obj, {
|
|
49
|
+
generation_mode: "generationMode",
|
|
50
|
+
intensity: "intensity",
|
|
51
|
+
});
|
|
52
|
+
});
|
|
53
|
+
/**
|
|
54
|
+
* @internal
|
|
55
|
+
* Takes typescript data, validates it, and maps keys to match the expected external object External$V1AiTalkingPhotoCreateBodyStyle
|
|
56
|
+
*/
|
|
57
|
+
const SchemaOut$V1AiTalkingPhotoCreateBodyStyle = z
|
|
58
|
+
.object({
|
|
59
|
+
generationMode: z.enum(["expressive", "stable"]).optional(),
|
|
60
|
+
intensity: z.number().optional(),
|
|
61
|
+
})
|
|
62
|
+
.transform((obj) => {
|
|
63
|
+
return (0, core_1.zodTransform)(obj, {
|
|
64
|
+
generationMode: "generation_mode",
|
|
65
|
+
intensity: "intensity",
|
|
66
|
+
});
|
|
67
|
+
});
|
|
68
|
+
exports.Schemas$V1AiTalkingPhotoCreateBodyStyle = {
|
|
69
|
+
in: SchemaIn$V1AiTalkingPhotoCreateBodyStyle,
|
|
70
|
+
out: SchemaOut$V1AiTalkingPhotoCreateBodyStyle,
|
|
71
|
+
};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { External$V1AiTalkingPhotoCreateBodyAssets, V1AiTalkingPhotoCreateBodyAssets } from "./v1-ai-talking-photo-create-body-assets";
|
|
2
|
+
import { External$V1AiTalkingPhotoCreateBodyStyle, V1AiTalkingPhotoCreateBodyStyle } from "./v1-ai-talking-photo-create-body-style";
|
|
2
3
|
import * as z from "zod";
|
|
3
4
|
/**
|
|
4
5
|
* Provide the assets for creating a talking photo
|
|
@@ -9,7 +10,7 @@ export type V1AiTalkingPhotoCreateBody = {
|
|
|
9
10
|
*/
|
|
10
11
|
assets: V1AiTalkingPhotoCreateBodyAssets;
|
|
11
12
|
/**
|
|
12
|
-
* The end time of the input
|
|
13
|
+
* The end time of the input audio in seconds. The maximum duration allowed is 30 seconds.
|
|
13
14
|
*/
|
|
14
15
|
endSeconds: number;
|
|
15
16
|
/**
|
|
@@ -17,9 +18,13 @@ export type V1AiTalkingPhotoCreateBody = {
|
|
|
17
18
|
*/
|
|
18
19
|
name?: string | undefined;
|
|
19
20
|
/**
|
|
20
|
-
* The start time of the input
|
|
21
|
+
* The start time of the input audio in seconds. The maximum duration allowed is 30 seconds.
|
|
21
22
|
*/
|
|
22
23
|
startSeconds: number;
|
|
24
|
+
/**
|
|
25
|
+
* Attributes used to dictate the style of the output
|
|
26
|
+
*/
|
|
27
|
+
style?: V1AiTalkingPhotoCreateBodyStyle | undefined;
|
|
23
28
|
};
|
|
24
29
|
/**
|
|
25
30
|
* @internal
|
|
@@ -31,6 +36,7 @@ export type External$V1AiTalkingPhotoCreateBody = {
|
|
|
31
36
|
end_seconds: number;
|
|
32
37
|
name?: string | undefined;
|
|
33
38
|
start_seconds: number;
|
|
39
|
+
style?: External$V1AiTalkingPhotoCreateBodyStyle | undefined;
|
|
34
40
|
};
|
|
35
41
|
export declare const Schemas$V1AiTalkingPhotoCreateBody: {
|
|
36
42
|
in: z.ZodType<V1AiTalkingPhotoCreateBody, z.ZodTypeDef, unknown>;
|
|
@@ -35,6 +35,7 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
35
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
36
|
exports.Schemas$V1AiTalkingPhotoCreateBody = void 0;
|
|
37
37
|
const v1_ai_talking_photo_create_body_assets_1 = require("./v1-ai-talking-photo-create-body-assets");
|
|
38
|
+
const v1_ai_talking_photo_create_body_style_1 = require("./v1-ai-talking-photo-create-body-style");
|
|
38
39
|
const core_1 = require("../core");
|
|
39
40
|
const z = __importStar(require("zod"));
|
|
40
41
|
/**
|
|
@@ -46,6 +47,7 @@ const SchemaIn$V1AiTalkingPhotoCreateBody = z
|
|
|
46
47
|
end_seconds: z.number(),
|
|
47
48
|
name: z.string().optional(),
|
|
48
49
|
start_seconds: z.number(),
|
|
50
|
+
style: v1_ai_talking_photo_create_body_style_1.Schemas$V1AiTalkingPhotoCreateBodyStyle.in.optional(),
|
|
49
51
|
})
|
|
50
52
|
.transform((obj) => {
|
|
51
53
|
return (0, core_1.zodTransform)(obj, {
|
|
@@ -53,6 +55,7 @@ const SchemaIn$V1AiTalkingPhotoCreateBody = z
|
|
|
53
55
|
end_seconds: "endSeconds",
|
|
54
56
|
name: "name",
|
|
55
57
|
start_seconds: "startSeconds",
|
|
58
|
+
style: "style",
|
|
56
59
|
});
|
|
57
60
|
});
|
|
58
61
|
/**
|
|
@@ -65,6 +68,7 @@ const SchemaOut$V1AiTalkingPhotoCreateBody = z
|
|
|
65
68
|
endSeconds: z.number(),
|
|
66
69
|
name: z.string().optional(),
|
|
67
70
|
startSeconds: z.number(),
|
|
71
|
+
style: v1_ai_talking_photo_create_body_style_1.Schemas$V1AiTalkingPhotoCreateBodyStyle.out.optional(),
|
|
68
72
|
})
|
|
69
73
|
.transform((obj) => {
|
|
70
74
|
return (0, core_1.zodTransform)(obj, {
|
|
@@ -72,6 +76,7 @@ const SchemaOut$V1AiTalkingPhotoCreateBody = z
|
|
|
72
76
|
endSeconds: "end_seconds",
|
|
73
77
|
name: "name",
|
|
74
78
|
startSeconds: "start_seconds",
|
|
79
|
+
style: "style",
|
|
75
80
|
});
|
|
76
81
|
});
|
|
77
82
|
exports.Schemas$V1AiTalkingPhotoCreateBody = {
|
|
@@ -4,7 +4,15 @@ import * as z from "zod";
|
|
|
4
4
|
*/
|
|
5
5
|
export type V1AiTalkingPhotoCreateResponse = {
|
|
6
6
|
/**
|
|
7
|
-
*
|
|
7
|
+
* The amount of credits deducted from your account to generate the video. If the status is not 'complete', this value is an estimate and may be adjusted upon completion based on the actual FPS of the output video.
|
|
8
|
+
*
|
|
9
|
+
* If video generation fails, credits will be refunded, and this field will be updated to include the refund.
|
|
10
|
+
*/
|
|
11
|
+
creditsCharged: number;
|
|
12
|
+
/**
|
|
13
|
+
* Deprecated: Previously represented the number of frames (original name of our credit system) used for video generation. Use 'credits_charged' instead.
|
|
14
|
+
*
|
|
15
|
+
* The amount of frames used to generate the video. If the status is not 'complete', the cost is an estimate and will be adjusted when the video completes.
|
|
8
16
|
*/
|
|
9
17
|
estimatedFrameCost: number;
|
|
10
18
|
/**
|
|
@@ -18,6 +26,7 @@ export type V1AiTalkingPhotoCreateResponse = {
|
|
|
18
26
|
* we expect to come in as network data
|
|
19
27
|
*/
|
|
20
28
|
export type External$V1AiTalkingPhotoCreateResponse = {
|
|
29
|
+
credits_charged: number;
|
|
21
30
|
estimated_frame_cost: number;
|
|
22
31
|
id: string;
|
|
23
32
|
};
|
|
@@ -41,11 +41,13 @@ const z = __importStar(require("zod"));
|
|
|
41
41
|
*/
|
|
42
42
|
const SchemaIn$V1AiTalkingPhotoCreateResponse = z
|
|
43
43
|
.object({
|
|
44
|
+
credits_charged: z.number().int(),
|
|
44
45
|
estimated_frame_cost: z.number().int(),
|
|
45
46
|
id: z.string(),
|
|
46
47
|
})
|
|
47
48
|
.transform((obj) => {
|
|
48
49
|
return (0, core_1.zodTransform)(obj, {
|
|
50
|
+
credits_charged: "creditsCharged",
|
|
49
51
|
estimated_frame_cost: "estimatedFrameCost",
|
|
50
52
|
id: "id",
|
|
51
53
|
});
|
|
@@ -56,11 +58,13 @@ const SchemaIn$V1AiTalkingPhotoCreateResponse = z
|
|
|
56
58
|
*/
|
|
57
59
|
const SchemaOut$V1AiTalkingPhotoCreateResponse = z
|
|
58
60
|
.object({
|
|
61
|
+
creditsCharged: z.number().int(),
|
|
59
62
|
estimatedFrameCost: z.number().int(),
|
|
60
63
|
id: z.string(),
|
|
61
64
|
})
|
|
62
65
|
.transform((obj) => {
|
|
63
66
|
return (0, core_1.zodTransform)(obj, {
|
|
67
|
+
creditsCharged: "credits_charged",
|
|
64
68
|
estimatedFrameCost: "estimated_frame_cost",
|
|
65
69
|
id: "id",
|
|
66
70
|
});
|
|
@@ -4,7 +4,15 @@ import * as z from "zod";
|
|
|
4
4
|
*/
|
|
5
5
|
export type V1AnimationCreateResponse = {
|
|
6
6
|
/**
|
|
7
|
-
*
|
|
7
|
+
* The amount of credits deducted from your account to generate the video. If the status is not 'complete', this value is an estimate and may be adjusted upon completion based on the actual FPS of the output video.
|
|
8
|
+
*
|
|
9
|
+
* If video generation fails, credits will be refunded, and this field will be updated to include the refund.
|
|
10
|
+
*/
|
|
11
|
+
creditsCharged: number;
|
|
12
|
+
/**
|
|
13
|
+
* Deprecated: Previously represented the number of frames (original name of our credit system) used for video generation. Use 'credits_charged' instead.
|
|
14
|
+
*
|
|
15
|
+
* The amount of frames used to generate the video. If the status is not 'complete', the cost is an estimate and will be adjusted when the video completes.
|
|
8
16
|
*/
|
|
9
17
|
estimatedFrameCost: number;
|
|
10
18
|
/**
|
|
@@ -18,6 +26,7 @@ export type V1AnimationCreateResponse = {
|
|
|
18
26
|
* we expect to come in as network data
|
|
19
27
|
*/
|
|
20
28
|
export type External$V1AnimationCreateResponse = {
|
|
29
|
+
credits_charged: number;
|
|
21
30
|
estimated_frame_cost: number;
|
|
22
31
|
id: string;
|
|
23
32
|
};
|
|
@@ -41,11 +41,13 @@ const z = __importStar(require("zod"));
|
|
|
41
41
|
*/
|
|
42
42
|
const SchemaIn$V1AnimationCreateResponse = z
|
|
43
43
|
.object({
|
|
44
|
+
credits_charged: z.number().int(),
|
|
44
45
|
estimated_frame_cost: z.number().int(),
|
|
45
46
|
id: z.string(),
|
|
46
47
|
})
|
|
47
48
|
.transform((obj) => {
|
|
48
49
|
return (0, core_1.zodTransform)(obj, {
|
|
50
|
+
credits_charged: "creditsCharged",
|
|
49
51
|
estimated_frame_cost: "estimatedFrameCost",
|
|
50
52
|
id: "id",
|
|
51
53
|
});
|
|
@@ -56,11 +58,13 @@ const SchemaIn$V1AnimationCreateResponse = z
|
|
|
56
58
|
*/
|
|
57
59
|
const SchemaOut$V1AnimationCreateResponse = z
|
|
58
60
|
.object({
|
|
61
|
+
creditsCharged: z.number().int(),
|
|
59
62
|
estimatedFrameCost: z.number().int(),
|
|
60
63
|
id: z.string(),
|
|
61
64
|
})
|
|
62
65
|
.transform((obj) => {
|
|
63
66
|
return (0, core_1.zodTransform)(obj, {
|
|
67
|
+
creditsCharged: "credits_charged",
|
|
64
68
|
estimatedFrameCost: "estimated_frame_cost",
|
|
65
69
|
id: "id",
|
|
66
70
|
});
|
|
@@ -4,11 +4,19 @@ import * as z from "zod";
|
|
|
4
4
|
*/
|
|
5
5
|
export type V1FaceSwapCreateResponse = {
|
|
6
6
|
/**
|
|
7
|
-
*
|
|
7
|
+
* The amount of credits deducted from your account to generate the video. If the status is not 'complete', this value is an estimate and may be adjusted upon completion based on the actual FPS of the output video.
|
|
8
|
+
*
|
|
9
|
+
* If video generation fails, credits will be refunded, and this field will be updated to include the refund.
|
|
10
|
+
*/
|
|
11
|
+
creditsCharged: number;
|
|
12
|
+
/**
|
|
13
|
+
* Deprecated: Previously represented the number of frames (original name of our credit system) used for video generation. Use 'credits_charged' instead.
|
|
14
|
+
*
|
|
15
|
+
* The amount of frames used to generate the video. If the status is not 'complete', the cost is an estimate and will be adjusted when the video completes.
|
|
8
16
|
*/
|
|
9
17
|
estimatedFrameCost: number;
|
|
10
18
|
/**
|
|
11
|
-
* Unique ID of the
|
|
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
|
|
12
20
|
*/
|
|
13
21
|
id: string;
|
|
14
22
|
};
|
|
@@ -18,6 +26,7 @@ export type V1FaceSwapCreateResponse = {
|
|
|
18
26
|
* we expect to come in as network data
|
|
19
27
|
*/
|
|
20
28
|
export type External$V1FaceSwapCreateResponse = {
|
|
29
|
+
credits_charged: number;
|
|
21
30
|
estimated_frame_cost: number;
|
|
22
31
|
id: string;
|
|
23
32
|
};
|
|
@@ -41,11 +41,13 @@ const z = __importStar(require("zod"));
|
|
|
41
41
|
*/
|
|
42
42
|
const SchemaIn$V1FaceSwapCreateResponse = z
|
|
43
43
|
.object({
|
|
44
|
+
credits_charged: z.number().int(),
|
|
44
45
|
estimated_frame_cost: z.number().int(),
|
|
45
46
|
id: z.string(),
|
|
46
47
|
})
|
|
47
48
|
.transform((obj) => {
|
|
48
49
|
return (0, core_1.zodTransform)(obj, {
|
|
50
|
+
credits_charged: "creditsCharged",
|
|
49
51
|
estimated_frame_cost: "estimatedFrameCost",
|
|
50
52
|
id: "id",
|
|
51
53
|
});
|
|
@@ -56,11 +58,13 @@ const SchemaIn$V1FaceSwapCreateResponse = z
|
|
|
56
58
|
*/
|
|
57
59
|
const SchemaOut$V1FaceSwapCreateResponse = z
|
|
58
60
|
.object({
|
|
61
|
+
creditsCharged: z.number().int(),
|
|
59
62
|
estimatedFrameCost: z.number().int(),
|
|
60
63
|
id: z.string(),
|
|
61
64
|
})
|
|
62
65
|
.transform((obj) => {
|
|
63
66
|
return (0, core_1.zodTransform)(obj, {
|
|
67
|
+
creditsCharged: "credits_charged",
|
|
64
68
|
estimatedFrameCost: "estimated_frame_cost",
|
|
65
69
|
id: "id",
|
|
66
70
|
});
|
|
@@ -4,7 +4,13 @@ import * as z from "zod";
|
|
|
4
4
|
*/
|
|
5
5
|
export type V1FaceSwapPhotoCreateResponse = {
|
|
6
6
|
/**
|
|
7
|
-
* The
|
|
7
|
+
* The amount of credits deducted from your account to generate the image. We charge credits right when the request is made.
|
|
8
|
+
*
|
|
9
|
+
* If an error occurred while generating the image(s), credits will be refunded and this field will be updated to include the refund.
|
|
10
|
+
*/
|
|
11
|
+
creditsCharged: number;
|
|
12
|
+
/**
|
|
13
|
+
* Deprecated: Previously represented the number of frames (original name of our credit system) used for image generation. Use 'credits_charged' instead.
|
|
8
14
|
*/
|
|
9
15
|
frameCost: number;
|
|
10
16
|
/**
|
|
@@ -18,6 +24,7 @@ export type V1FaceSwapPhotoCreateResponse = {
|
|
|
18
24
|
* we expect to come in as network data
|
|
19
25
|
*/
|
|
20
26
|
export type External$V1FaceSwapPhotoCreateResponse = {
|
|
27
|
+
credits_charged: number;
|
|
21
28
|
frame_cost: number;
|
|
22
29
|
id: string;
|
|
23
30
|
};
|
|
@@ -41,11 +41,13 @@ const z = __importStar(require("zod"));
|
|
|
41
41
|
*/
|
|
42
42
|
const SchemaIn$V1FaceSwapPhotoCreateResponse = z
|
|
43
43
|
.object({
|
|
44
|
+
credits_charged: z.number().int(),
|
|
44
45
|
frame_cost: z.number().int(),
|
|
45
46
|
id: z.string(),
|
|
46
47
|
})
|
|
47
48
|
.transform((obj) => {
|
|
48
49
|
return (0, core_1.zodTransform)(obj, {
|
|
50
|
+
credits_charged: "creditsCharged",
|
|
49
51
|
frame_cost: "frameCost",
|
|
50
52
|
id: "id",
|
|
51
53
|
});
|
|
@@ -56,11 +58,13 @@ const SchemaIn$V1FaceSwapPhotoCreateResponse = z
|
|
|
56
58
|
*/
|
|
57
59
|
const SchemaOut$V1FaceSwapPhotoCreateResponse = z
|
|
58
60
|
.object({
|
|
61
|
+
creditsCharged: z.number().int(),
|
|
59
62
|
frameCost: z.number().int(),
|
|
60
63
|
id: z.string(),
|
|
61
64
|
})
|
|
62
65
|
.transform((obj) => {
|
|
63
66
|
return (0, core_1.zodTransform)(obj, {
|
|
67
|
+
creditsCharged: "credits_charged",
|
|
64
68
|
frameCost: "frame_cost",
|
|
65
69
|
id: "id",
|
|
66
70
|
});
|