magic-hour 0.24.0 → 0.26.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 +4 -0
- package/dist/core/auth.d.ts +11 -26
- package/dist/core/auth.js +48 -62
- package/dist/core/index.d.ts +1 -1
- package/dist/core/index.js +2 -4
- package/dist/environment.d.ts +1 -1
- package/dist/environment.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-image-editor/index.d.ts +2 -0
- package/dist/resources/v1/ai-image-editor/index.js +5 -0
- package/dist/resources/v1/ai-image-editor/request-types.d.ts +31 -0
- package/dist/resources/v1/ai-image-editor/request-types.js +77 -0
- package/dist/resources/v1/ai-image-editor/resource-client.d.ts +14 -0
- package/dist/resources/v1/ai-image-editor/resource-client.js +30 -0
- package/dist/resources/v1/files/upload-urls/resource-client.d.ts +3 -4
- package/dist/resources/v1/files/upload-urls/resource-client.js +3 -4
- package/dist/resources/v1/image-to-video/request-types.d.ts +10 -0
- package/dist/resources/v1/image-to-video/request-types.js +4 -0
- 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 +6 -0
- package/dist/resources/v1/text-to-video/request-types.d.ts +10 -0
- package/dist/resources/v1/text-to-video/request-types.js +4 -0
- package/dist/types/index.d.ts +12 -0
- package/dist/types/v1-ai-image-editor-create-body-assets.d.ts +22 -0
- package/dist/types/v1-ai-image-editor-create-body-assets.js +67 -0
- package/dist/types/v1-ai-image-editor-create-body-style.d.ts +22 -0
- package/dist/types/v1-ai-image-editor-create-body-style.js +67 -0
- package/dist/types/v1-ai-image-editor-create-body.d.ts +31 -0
- package/dist/types/v1-ai-image-editor-create-body.js +77 -0
- package/dist/types/v1-ai-image-editor-create-response.d.ts +34 -0
- package/dist/types/v1-ai-image-editor-create-response.js +75 -0
- package/dist/types/v1-ai-image-editor-create-response400.d.ts +19 -0
- package/dist/types/v1-ai-image-editor-create-response400.js +67 -0
- package/dist/types/v1-ai-image-editor-create-response401-message-enum.d.ts +4 -0
- package/dist/types/v1-ai-image-editor-create-response401-message-enum.js +2 -0
- package/dist/types/v1-ai-image-editor-create-response401.d.ts +19 -0
- package/dist/types/v1-ai-image-editor-create-response401.js +67 -0
- package/dist/types/v1-ai-image-editor-create-response404-message-enum.d.ts +4 -0
- package/dist/types/v1-ai-image-editor-create-response404-message-enum.js +2 -0
- package/dist/types/v1-ai-image-editor-create-response404.d.ts +19 -0
- package/dist/types/v1-ai-image-editor-create-response404.js +67 -0
- package/dist/types/v1-ai-image-editor-create-response422.d.ts +19 -0
- package/dist/types/v1-ai-image-editor-create-response422.js +67 -0
- package/dist/types/v1-image-projects-get-response.d.ts +1 -1
- package/dist/types/v1-image-to-video-create-body-resolution-enum.d.ts +9 -0
- package/dist/types/v1-image-to-video-create-body-resolution-enum.js +2 -0
- package/dist/types/v1-image-to-video-create-body-style-quality-mode-enum.d.ts +5 -2
- package/dist/types/v1-image-to-video-create-body-style.d.ts +10 -3
- package/dist/types/v1-image-to-video-create-body.d.ts +10 -0
- package/dist/types/v1-image-to-video-create-body.js +4 -0
- package/dist/types/v1-text-to-video-create-body-resolution-enum.d.ts +9 -0
- package/dist/types/v1-text-to-video-create-body-resolution-enum.js +2 -0
- package/dist/types/v1-text-to-video-create-body-style-quality-mode-enum.d.ts +5 -2
- package/dist/types/v1-text-to-video-create-body-style.d.ts +5 -2
- package/dist/types/v1-text-to-video-create-body.d.ts +10 -0
- package/dist/types/v1-text-to-video-create-body.js +4 -0
- package/package.json +1 -1
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
+
exports.Schemas$V1AiImageEditorCreateResponse401 = 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 V1AiImageEditorCreateResponse401
|
|
41
|
+
*/
|
|
42
|
+
const SchemaIn$V1AiImageEditorCreateResponse401 = z
|
|
43
|
+
.object({
|
|
44
|
+
message: z.enum(["Unauthorized"]),
|
|
45
|
+
})
|
|
46
|
+
.transform((obj) => {
|
|
47
|
+
return (0, core_1.zodTransform)(obj, {
|
|
48
|
+
message: "message",
|
|
49
|
+
});
|
|
50
|
+
});
|
|
51
|
+
/**
|
|
52
|
+
* @internal
|
|
53
|
+
* Takes typescript data, validates it, and maps keys to match the expected external object External$V1AiImageEditorCreateResponse401
|
|
54
|
+
*/
|
|
55
|
+
const SchemaOut$V1AiImageEditorCreateResponse401 = z
|
|
56
|
+
.object({
|
|
57
|
+
message: z.enum(["Unauthorized"]),
|
|
58
|
+
})
|
|
59
|
+
.transform((obj) => {
|
|
60
|
+
return (0, core_1.zodTransform)(obj, {
|
|
61
|
+
message: "message",
|
|
62
|
+
});
|
|
63
|
+
});
|
|
64
|
+
exports.Schemas$V1AiImageEditorCreateResponse401 = {
|
|
65
|
+
in: SchemaIn$V1AiImageEditorCreateResponse401,
|
|
66
|
+
out: SchemaOut$V1AiImageEditorCreateResponse401,
|
|
67
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import * as z from "zod";
|
|
2
|
+
/**
|
|
3
|
+
* Requested resource is not found
|
|
4
|
+
*/
|
|
5
|
+
export type V1AiImageEditorCreateResponse404 = {
|
|
6
|
+
message: "Not Found";
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* @internal
|
|
10
|
+
* V1AiImageEditorCreateResponse404 without any key transformation, this is what
|
|
11
|
+
* we expect to come in as network data
|
|
12
|
+
*/
|
|
13
|
+
export type External$V1AiImageEditorCreateResponse404 = {
|
|
14
|
+
message: "Not Found";
|
|
15
|
+
};
|
|
16
|
+
export declare const Schemas$V1AiImageEditorCreateResponse404: {
|
|
17
|
+
in: z.ZodType<V1AiImageEditorCreateResponse404, z.ZodTypeDef, unknown>;
|
|
18
|
+
out: z.ZodType<External$V1AiImageEditorCreateResponse404, z.ZodTypeDef, V1AiImageEditorCreateResponse404>;
|
|
19
|
+
};
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
+
exports.Schemas$V1AiImageEditorCreateResponse404 = 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 V1AiImageEditorCreateResponse404
|
|
41
|
+
*/
|
|
42
|
+
const SchemaIn$V1AiImageEditorCreateResponse404 = z
|
|
43
|
+
.object({
|
|
44
|
+
message: z.enum(["Not Found"]),
|
|
45
|
+
})
|
|
46
|
+
.transform((obj) => {
|
|
47
|
+
return (0, core_1.zodTransform)(obj, {
|
|
48
|
+
message: "message",
|
|
49
|
+
});
|
|
50
|
+
});
|
|
51
|
+
/**
|
|
52
|
+
* @internal
|
|
53
|
+
* Takes typescript data, validates it, and maps keys to match the expected external object External$V1AiImageEditorCreateResponse404
|
|
54
|
+
*/
|
|
55
|
+
const SchemaOut$V1AiImageEditorCreateResponse404 = z
|
|
56
|
+
.object({
|
|
57
|
+
message: z.enum(["Not Found"]),
|
|
58
|
+
})
|
|
59
|
+
.transform((obj) => {
|
|
60
|
+
return (0, core_1.zodTransform)(obj, {
|
|
61
|
+
message: "message",
|
|
62
|
+
});
|
|
63
|
+
});
|
|
64
|
+
exports.Schemas$V1AiImageEditorCreateResponse404 = {
|
|
65
|
+
in: SchemaIn$V1AiImageEditorCreateResponse404,
|
|
66
|
+
out: SchemaOut$V1AiImageEditorCreateResponse404,
|
|
67
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import * as z from "zod";
|
|
2
|
+
/**
|
|
3
|
+
* Unprocessable Entity
|
|
4
|
+
*/
|
|
5
|
+
export type V1AiImageEditorCreateResponse422 = {
|
|
6
|
+
message: string;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* @internal
|
|
10
|
+
* V1AiImageEditorCreateResponse422 without any key transformation, this is what
|
|
11
|
+
* we expect to come in as network data
|
|
12
|
+
*/
|
|
13
|
+
export type External$V1AiImageEditorCreateResponse422 = {
|
|
14
|
+
message: string;
|
|
15
|
+
};
|
|
16
|
+
export declare const Schemas$V1AiImageEditorCreateResponse422: {
|
|
17
|
+
in: z.ZodType<V1AiImageEditorCreateResponse422, z.ZodTypeDef, unknown>;
|
|
18
|
+
out: z.ZodType<External$V1AiImageEditorCreateResponse422, z.ZodTypeDef, V1AiImageEditorCreateResponse422>;
|
|
19
|
+
};
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
+
exports.Schemas$V1AiImageEditorCreateResponse422 = 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 V1AiImageEditorCreateResponse422
|
|
41
|
+
*/
|
|
42
|
+
const SchemaIn$V1AiImageEditorCreateResponse422 = z
|
|
43
|
+
.object({
|
|
44
|
+
message: z.string(),
|
|
45
|
+
})
|
|
46
|
+
.transform((obj) => {
|
|
47
|
+
return (0, core_1.zodTransform)(obj, {
|
|
48
|
+
message: "message",
|
|
49
|
+
});
|
|
50
|
+
});
|
|
51
|
+
/**
|
|
52
|
+
* @internal
|
|
53
|
+
* Takes typescript data, validates it, and maps keys to match the expected external object External$V1AiImageEditorCreateResponse422
|
|
54
|
+
*/
|
|
55
|
+
const SchemaOut$V1AiImageEditorCreateResponse422 = z
|
|
56
|
+
.object({
|
|
57
|
+
message: z.string(),
|
|
58
|
+
})
|
|
59
|
+
.transform((obj) => {
|
|
60
|
+
return (0, core_1.zodTransform)(obj, {
|
|
61
|
+
message: "message",
|
|
62
|
+
});
|
|
63
|
+
});
|
|
64
|
+
exports.Schemas$V1AiImageEditorCreateResponse422 = {
|
|
65
|
+
in: SchemaIn$V1AiImageEditorCreateResponse422,
|
|
66
|
+
out: SchemaOut$V1AiImageEditorCreateResponse422,
|
|
67
|
+
};
|
|
@@ -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
|
|
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
|
|
46
46
|
*/
|
|
47
47
|
type: string;
|
|
48
48
|
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Controls the output video resolution. Defaults to `720p` if not specified.
|
|
3
|
+
*
|
|
4
|
+
* **Options:**
|
|
5
|
+
* - `480p` - Supports only 5 or 10 second videos. Output: 24fps. Cost: 120 credits per 5 seconds.
|
|
6
|
+
* - `720p` - Supports videos between 5-60 seconds. Output: 30fps. Cost: 300 credits per 5 seconds.
|
|
7
|
+
* - `1080p` - Supports videos between 5-60 seconds. Output: 30fps. Cost: 600 credits per 5 seconds. **Requires** `pro` or `business` tier.
|
|
8
|
+
*/
|
|
9
|
+
export type V1ImageToVideoCreateBodyResolutionEnum = "1080p" | "480p" | "720p";
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
3
|
-
* *
|
|
2
|
+
* DEPRECATED: Please use `resolution` field instead. For backward compatibility:
|
|
3
|
+
* * `quick` maps to 720p resolution
|
|
4
|
+
* * `studio` maps to 1080p resolution
|
|
5
|
+
*
|
|
6
|
+
* This field will be removed in a future version. Use the `resolution` field to directly to specify the resolution.
|
|
4
7
|
*/
|
|
5
8
|
export type V1ImageToVideoCreateBodyStyleQualityModeEnum = "quick" | "studio";
|
|
@@ -4,7 +4,11 @@ import * as z from "zod";
|
|
|
4
4
|
*/
|
|
5
5
|
export type V1ImageToVideoCreateBodyStyle = {
|
|
6
6
|
/**
|
|
7
|
-
* Deprecated: Please use `
|
|
7
|
+
* Deprecated: Please use `resolution` instead. For backward compatibility,
|
|
8
|
+
* * `false` maps to 720p resolution
|
|
9
|
+
* * `true` maps to 1080p resolution
|
|
10
|
+
*
|
|
11
|
+
* This field will be removed in a future version. Use the `resolution` field to directly specify the resolution.
|
|
8
12
|
*/
|
|
9
13
|
highQuality?: boolean | undefined;
|
|
10
14
|
/**
|
|
@@ -12,8 +16,11 @@ export type V1ImageToVideoCreateBodyStyle = {
|
|
|
12
16
|
*/
|
|
13
17
|
prompt?: string | undefined;
|
|
14
18
|
/**
|
|
15
|
-
*
|
|
16
|
-
* *
|
|
19
|
+
* DEPRECATED: Please use `resolution` field instead. For backward compatibility:
|
|
20
|
+
* * `quick` maps to 720p resolution
|
|
21
|
+
* * `studio` maps to 1080p resolution
|
|
22
|
+
*
|
|
23
|
+
* This field will be removed in a future version. Use the `resolution` field to directly to specify the resolution.
|
|
17
24
|
*/
|
|
18
25
|
qualityMode?: ("quick" | "studio") | undefined;
|
|
19
26
|
};
|
|
@@ -23,6 +23,15 @@ export type V1ImageToVideoCreateBody = {
|
|
|
23
23
|
* The name of video
|
|
24
24
|
*/
|
|
25
25
|
name?: string | undefined;
|
|
26
|
+
/**
|
|
27
|
+
* Controls the output video resolution. Defaults to `720p` if not specified.
|
|
28
|
+
*
|
|
29
|
+
* **Options:**
|
|
30
|
+
* - `480p` - Supports only 5 or 10 second videos. Output: 24fps. Cost: 120 credits per 5 seconds.
|
|
31
|
+
* - `720p` - Supports videos between 5-60 seconds. Output: 30fps. Cost: 300 credits per 5 seconds.
|
|
32
|
+
* - `1080p` - Supports videos between 5-60 seconds. Output: 30fps. Cost: 600 credits per 5 seconds. **Requires** `pro` or `business` tier.
|
|
33
|
+
*/
|
|
34
|
+
resolution?: ("1080p" | "480p" | "720p") | undefined;
|
|
26
35
|
/**
|
|
27
36
|
* Attributed used to dictate the style of the output
|
|
28
37
|
*/
|
|
@@ -44,6 +53,7 @@ export type External$V1ImageToVideoCreateBody = {
|
|
|
44
53
|
end_seconds: number;
|
|
45
54
|
height?: number | undefined;
|
|
46
55
|
name?: string | undefined;
|
|
56
|
+
resolution?: ("1080p" | "480p" | "720p") | undefined;
|
|
47
57
|
style: External$V1ImageToVideoCreateBodyStyle;
|
|
48
58
|
width?: number | undefined;
|
|
49
59
|
};
|
|
@@ -47,6 +47,7 @@ const SchemaIn$V1ImageToVideoCreateBody = z
|
|
|
47
47
|
end_seconds: z.number(),
|
|
48
48
|
height: z.number().int().optional(),
|
|
49
49
|
name: z.string().optional(),
|
|
50
|
+
resolution: z.enum(["1080p", "480p", "720p"]).optional(),
|
|
50
51
|
style: v1_image_to_video_create_body_style_1.Schemas$V1ImageToVideoCreateBodyStyle.in,
|
|
51
52
|
width: z.number().int().optional(),
|
|
52
53
|
})
|
|
@@ -56,6 +57,7 @@ const SchemaIn$V1ImageToVideoCreateBody = z
|
|
|
56
57
|
end_seconds: "endSeconds",
|
|
57
58
|
height: "height",
|
|
58
59
|
name: "name",
|
|
60
|
+
resolution: "resolution",
|
|
59
61
|
style: "style",
|
|
60
62
|
width: "width",
|
|
61
63
|
});
|
|
@@ -70,6 +72,7 @@ const SchemaOut$V1ImageToVideoCreateBody = z
|
|
|
70
72
|
endSeconds: z.number(),
|
|
71
73
|
height: z.number().int().optional(),
|
|
72
74
|
name: z.string().optional(),
|
|
75
|
+
resolution: z.enum(["1080p", "480p", "720p"]).optional(),
|
|
73
76
|
style: v1_image_to_video_create_body_style_1.Schemas$V1ImageToVideoCreateBodyStyle.out,
|
|
74
77
|
width: z.number().int().optional(),
|
|
75
78
|
})
|
|
@@ -79,6 +82,7 @@ const SchemaOut$V1ImageToVideoCreateBody = z
|
|
|
79
82
|
endSeconds: "end_seconds",
|
|
80
83
|
height: "height",
|
|
81
84
|
name: "name",
|
|
85
|
+
resolution: "resolution",
|
|
82
86
|
style: "style",
|
|
83
87
|
width: "width",
|
|
84
88
|
});
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Controls the output video resolution. Defaults to `720p` if not specified.
|
|
3
|
+
*
|
|
4
|
+
* **Options:**
|
|
5
|
+
* - `480p` - Supports only 5 or 10 second videos. Output: 24fps. Cost: 120 credits per 5 seconds.
|
|
6
|
+
* - `720p` - Supports videos between 5-60 seconds. Output: 30fps. Cost: 300 credits per 5 seconds.
|
|
7
|
+
* - `1080p` - Supports videos between 5-60 seconds. Output: 30fps. Cost: 600 credits per 5 seconds. **Requires** `pro` or `business` tier.
|
|
8
|
+
*/
|
|
9
|
+
export type V1TextToVideoCreateBodyResolutionEnum = "1080p" | "480p" | "720p";
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
3
|
-
* *
|
|
2
|
+
* DEPRECATED: Please use `resolution` field instead. For backward compatibility:
|
|
3
|
+
* * `quick` maps to 720p resolution
|
|
4
|
+
* * `studio` maps to 1080p resolution
|
|
5
|
+
*
|
|
6
|
+
* This field will be removed in a future version. Use the `resolution` field to directly to specify the resolution.
|
|
4
7
|
*/
|
|
5
8
|
export type V1TextToVideoCreateBodyStyleQualityModeEnum = "quick" | "studio";
|
|
@@ -8,8 +8,11 @@ export type V1TextToVideoCreateBodyStyle = {
|
|
|
8
8
|
*/
|
|
9
9
|
prompt: string;
|
|
10
10
|
/**
|
|
11
|
-
*
|
|
12
|
-
* *
|
|
11
|
+
* DEPRECATED: Please use `resolution` field instead. For backward compatibility:
|
|
12
|
+
* * `quick` maps to 720p resolution
|
|
13
|
+
* * `studio` maps to 1080p resolution
|
|
14
|
+
*
|
|
15
|
+
* This field will be removed in a future version. Use the `resolution` field to directly to specify the resolution.
|
|
13
16
|
*/
|
|
14
17
|
qualityMode?: ("quick" | "studio") | undefined;
|
|
15
18
|
};
|
|
@@ -16,6 +16,15 @@ export type V1TextToVideoCreateBody = {
|
|
|
16
16
|
* Determines the orientation of the output video
|
|
17
17
|
*/
|
|
18
18
|
orientation: "landscape" | "portrait" | "square";
|
|
19
|
+
/**
|
|
20
|
+
* Controls the output video resolution. Defaults to `720p` if not specified.
|
|
21
|
+
*
|
|
22
|
+
* **Options:**
|
|
23
|
+
* - `480p` - Supports only 5 or 10 second videos. Output: 24fps. Cost: 120 credits per 5 seconds.
|
|
24
|
+
* - `720p` - Supports videos between 5-60 seconds. Output: 30fps. Cost: 300 credits per 5 seconds.
|
|
25
|
+
* - `1080p` - Supports videos between 5-60 seconds. Output: 30fps. Cost: 600 credits per 5 seconds. **Requires** `pro` or `business` tier.
|
|
26
|
+
*/
|
|
27
|
+
resolution?: ("1080p" | "480p" | "720p") | undefined;
|
|
19
28
|
style: V1TextToVideoCreateBodyStyle;
|
|
20
29
|
};
|
|
21
30
|
/**
|
|
@@ -27,6 +36,7 @@ export type External$V1TextToVideoCreateBody = {
|
|
|
27
36
|
end_seconds: number;
|
|
28
37
|
name?: string | undefined;
|
|
29
38
|
orientation: "landscape" | "portrait" | "square";
|
|
39
|
+
resolution?: ("1080p" | "480p" | "720p") | undefined;
|
|
30
40
|
style: External$V1TextToVideoCreateBodyStyle;
|
|
31
41
|
};
|
|
32
42
|
export declare const Schemas$V1TextToVideoCreateBody: {
|
|
@@ -45,6 +45,7 @@ const SchemaIn$V1TextToVideoCreateBody = z
|
|
|
45
45
|
end_seconds: z.number(),
|
|
46
46
|
name: z.string().optional(),
|
|
47
47
|
orientation: z.enum(["landscape", "portrait", "square"]),
|
|
48
|
+
resolution: z.enum(["1080p", "480p", "720p"]).optional(),
|
|
48
49
|
style: v1_text_to_video_create_body_style_1.Schemas$V1TextToVideoCreateBodyStyle.in,
|
|
49
50
|
})
|
|
50
51
|
.transform((obj) => {
|
|
@@ -52,6 +53,7 @@ const SchemaIn$V1TextToVideoCreateBody = z
|
|
|
52
53
|
end_seconds: "endSeconds",
|
|
53
54
|
name: "name",
|
|
54
55
|
orientation: "orientation",
|
|
56
|
+
resolution: "resolution",
|
|
55
57
|
style: "style",
|
|
56
58
|
});
|
|
57
59
|
});
|
|
@@ -64,6 +66,7 @@ const SchemaOut$V1TextToVideoCreateBody = z
|
|
|
64
66
|
endSeconds: z.number(),
|
|
65
67
|
name: z.string().optional(),
|
|
66
68
|
orientation: z.enum(["landscape", "portrait", "square"]),
|
|
69
|
+
resolution: z.enum(["1080p", "480p", "720p"]).optional(),
|
|
67
70
|
style: v1_text_to_video_create_body_style_1.Schemas$V1TextToVideoCreateBodyStyle.out,
|
|
68
71
|
})
|
|
69
72
|
.transform((obj) => {
|
|
@@ -71,6 +74,7 @@ const SchemaOut$V1TextToVideoCreateBody = z
|
|
|
71
74
|
endSeconds: "end_seconds",
|
|
72
75
|
name: "name",
|
|
73
76
|
orientation: "orientation",
|
|
77
|
+
resolution: "resolution",
|
|
74
78
|
style: "style",
|
|
75
79
|
});
|
|
76
80
|
});
|