magic-hour 0.21.0 → 0.22.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/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/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-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
package/dist/client.js
CHANGED
|
@@ -6,8 +6,10 @@ const environment_1 = require("./environment");
|
|
|
6
6
|
class Client {
|
|
7
7
|
constructor(opts) {
|
|
8
8
|
var _a, _b;
|
|
9
|
-
|
|
10
|
-
|
|
9
|
+
this._client = new core_1.CoreClient({
|
|
10
|
+
baseUrl: (_b = (_a = opts === null || opts === void 0 ? void 0 : opts.baseUrl) !== null && _a !== void 0 ? _a : opts === null || opts === void 0 ? void 0 : opts.environment) !== null && _b !== void 0 ? _b : environment_1.Environment.Environment,
|
|
11
|
+
timeout: opts === null || opts === void 0 ? void 0 : opts.timeout,
|
|
12
|
+
});
|
|
11
13
|
this._opts = { lazyLoad: opts === null || opts === void 0 ? void 0 : opts.lazyLoad };
|
|
12
14
|
this._client.registerAuth("bearerAuth", new core_1.AuthBearer(opts === null || opts === void 0 ? void 0 : opts.token));
|
|
13
15
|
if (this._opts.lazyLoad === false) {
|
|
@@ -4,7 +4,7 @@ import { AuthProvider } from "./auth";
|
|
|
4
4
|
import { ApiPromise } from "./api-promise";
|
|
5
5
|
import { QueryStyle } from "./query";
|
|
6
6
|
export interface CoreClientProps {
|
|
7
|
-
baseUrl: string
|
|
7
|
+
baseUrl: string | Record<string, string | undefined>;
|
|
8
8
|
timeout?: number | undefined;
|
|
9
9
|
}
|
|
10
10
|
export type ApiResponse = Response | NodeResponse;
|
|
@@ -12,6 +12,7 @@ export type HttpMethod = "get" | "post" | "put" | "patch" | "delete";
|
|
|
12
12
|
export type RequestConfig = {
|
|
13
13
|
method: HttpMethod;
|
|
14
14
|
path: string;
|
|
15
|
+
serviceName?: string | undefined;
|
|
15
16
|
responseSchema?: z.Schema;
|
|
16
17
|
responseStream?: boolean;
|
|
17
18
|
responseRaw?: boolean;
|
|
@@ -33,13 +34,13 @@ export interface RequestOptions {
|
|
|
33
34
|
additionalQuery?: Record<string, string>;
|
|
34
35
|
}
|
|
35
36
|
export declare class CoreClient {
|
|
36
|
-
baseUrl
|
|
37
|
+
private baseUrl;
|
|
37
38
|
private auths;
|
|
38
39
|
private timeout;
|
|
39
40
|
constructor(props: CoreClientProps);
|
|
40
41
|
registerAuth(name: string, provider: AuthProvider): void;
|
|
41
42
|
private applyAuths;
|
|
42
|
-
buildUrl(path: string): string;
|
|
43
|
+
buildUrl(path: string, serviceName?: string): string;
|
|
43
44
|
private buildUrlFromCfg;
|
|
44
45
|
private applyHeaders;
|
|
45
46
|
private encodeBodyByContentType;
|
package/dist/core/core-client.js
CHANGED
|
@@ -16,10 +16,14 @@ const api_error_1 = require("./api-error");
|
|
|
16
16
|
const form_data_1 = require("./form-data");
|
|
17
17
|
const query_1 = require("./query");
|
|
18
18
|
const content_type_1 = require("./content-type");
|
|
19
|
+
const _DEFAULT_SERVICE_NAME = "__default_service__";
|
|
19
20
|
class CoreClient {
|
|
20
21
|
// private agent: any // TODO
|
|
21
22
|
constructor(props) {
|
|
22
|
-
this.baseUrl =
|
|
23
|
+
this.baseUrl =
|
|
24
|
+
typeof props.baseUrl === "string"
|
|
25
|
+
? { [_DEFAULT_SERVICE_NAME]: props.baseUrl }
|
|
26
|
+
: props.baseUrl;
|
|
23
27
|
this.auths = {};
|
|
24
28
|
this.timeout = props.timeout;
|
|
25
29
|
}
|
|
@@ -38,20 +42,16 @@ class CoreClient {
|
|
|
38
42
|
return cfg;
|
|
39
43
|
});
|
|
40
44
|
}
|
|
41
|
-
buildUrl(path) {
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
+
buildUrl(path, serviceName = _DEFAULT_SERVICE_NAME) {
|
|
46
|
+
var _a;
|
|
47
|
+
const baseUrl = (_a = this.baseUrl[serviceName !== null && serviceName !== void 0 ? serviceName : _DEFAULT_SERVICE_NAME]) !== null && _a !== void 0 ? _a : "";
|
|
48
|
+
const base = baseUrl.endsWith("/") ? baseUrl.slice(0, -1) : baseUrl;
|
|
45
49
|
const cleanPath = path.startsWith("/") ? path.slice(1) : path;
|
|
46
50
|
return `${base}/${cleanPath}`;
|
|
47
51
|
}
|
|
48
52
|
buildUrlFromCfg(cfg) {
|
|
49
53
|
var _a, _b, _c;
|
|
50
|
-
|
|
51
|
-
? this.baseUrl.slice(0, -1)
|
|
52
|
-
: this.baseUrl;
|
|
53
|
-
const path = cfg.path.startsWith("/") ? cfg.path.slice(1) : cfg.path;
|
|
54
|
-
let url = `${base}/${path}`;
|
|
54
|
+
let url = this.buildUrl(cfg.path, cfg.serviceName);
|
|
55
55
|
const searchParams = new URLSearchParams(((_a = cfg.query) !== null && _a !== void 0 ? _a : []).join("&"));
|
|
56
56
|
for (const [key, val] of Object.entries((_c = (_b = cfg.opts) === null || _b === void 0 ? void 0 : _b.additionalQuery) !== null && _c !== void 0 ? _c : {})) {
|
|
57
57
|
searchParams.append(key, val);
|
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.22.0";
|
|
8
8
|
})(Environment || (exports.Environment = Environment = {}));
|
|
@@ -6,7 +6,7 @@ export declare class AiClothesChangerClient extends CoreResourceClient {
|
|
|
6
6
|
/**
|
|
7
7
|
* AI Clothes Changer
|
|
8
8
|
*
|
|
9
|
-
* Change outfits in photos in seconds with just a photo reference. Each photo costs 25
|
|
9
|
+
* Change outfits in photos in seconds with just a photo reference. Each photo costs 25 credits.
|
|
10
10
|
*
|
|
11
11
|
* POST /v1/ai-clothes-changer
|
|
12
12
|
*/
|
|
@@ -11,7 +11,7 @@ class AiClothesChangerClient extends core_1.CoreResourceClient {
|
|
|
11
11
|
/**
|
|
12
12
|
* AI Clothes Changer
|
|
13
13
|
*
|
|
14
|
-
* Change outfits in photos in seconds with just a photo reference. Each photo costs 25
|
|
14
|
+
* Change outfits in photos in seconds with just a photo reference. Each photo costs 25 credits.
|
|
15
15
|
*
|
|
16
16
|
* POST /v1/ai-clothes-changer
|
|
17
17
|
*/
|
|
@@ -6,7 +6,7 @@ export declare class AiHeadshotGeneratorClient extends CoreResourceClient {
|
|
|
6
6
|
/**
|
|
7
7
|
* AI Headshots
|
|
8
8
|
*
|
|
9
|
-
* Create an AI headshot. Each headshot costs 50
|
|
9
|
+
* Create an AI headshot. Each headshot costs 50 credits.
|
|
10
10
|
*
|
|
11
11
|
* POST /v1/ai-headshot-generator
|
|
12
12
|
*/
|
|
@@ -11,7 +11,7 @@ class AiHeadshotGeneratorClient extends core_1.CoreResourceClient {
|
|
|
11
11
|
/**
|
|
12
12
|
* AI Headshots
|
|
13
13
|
*
|
|
14
|
-
* Create an AI headshot. Each headshot costs 50
|
|
14
|
+
* Create an AI headshot. Each headshot costs 50 credits.
|
|
15
15
|
*
|
|
16
16
|
* POST /v1/ai-headshot-generator
|
|
17
17
|
*/
|
|
@@ -6,7 +6,7 @@ export declare class AiImageUpscalerClient extends CoreResourceClient {
|
|
|
6
6
|
/**
|
|
7
7
|
* AI Image Upscaler
|
|
8
8
|
*
|
|
9
|
-
* Upscale your image using AI. Each 2x upscale costs 50
|
|
9
|
+
* Upscale your image using AI. Each 2x upscale costs 50 credits, and 4x upscale costs 200 credits.
|
|
10
10
|
*
|
|
11
11
|
* POST /v1/ai-image-upscaler
|
|
12
12
|
*/
|
|
@@ -11,7 +11,7 @@ class AiImageUpscalerClient extends core_1.CoreResourceClient {
|
|
|
11
11
|
/**
|
|
12
12
|
* AI Image Upscaler
|
|
13
13
|
*
|
|
14
|
-
* Upscale your image using AI. Each 2x upscale costs 50
|
|
14
|
+
* Upscale your image using AI. Each 2x upscale costs 50 credits, and 4x upscale costs 200 credits.
|
|
15
15
|
*
|
|
16
16
|
* POST /v1/ai-image-upscaler
|
|
17
17
|
*/
|
|
@@ -6,7 +6,7 @@ export declare class AiMemeGeneratorClient extends CoreResourceClient {
|
|
|
6
6
|
/**
|
|
7
7
|
* AI Meme Generator
|
|
8
8
|
*
|
|
9
|
-
* Create an AI generated meme. Each meme costs 10
|
|
9
|
+
* Create an AI generated meme. Each meme costs 10 credits.
|
|
10
10
|
*
|
|
11
11
|
* POST /v1/ai-meme-generator
|
|
12
12
|
*/
|
|
@@ -11,7 +11,7 @@ class AiMemeGeneratorClient extends core_1.CoreResourceClient {
|
|
|
11
11
|
/**
|
|
12
12
|
* AI Meme Generator
|
|
13
13
|
*
|
|
14
|
-
* Create an AI generated meme. Each meme costs 10
|
|
14
|
+
* Create an AI generated meme. Each meme costs 10 credits.
|
|
15
15
|
*
|
|
16
16
|
* POST /v1/ai-meme-generator
|
|
17
17
|
*/
|
|
@@ -8,7 +8,7 @@ export declare class AiPhotoEditorClient extends CoreResourceClient {
|
|
|
8
8
|
*
|
|
9
9
|
* > **NOTE**: this API is still in early development stages, and should be avoided. Please reach out to us if you're interested in this API.
|
|
10
10
|
*
|
|
11
|
-
* Edit photo using AI. Each photo costs 10
|
|
11
|
+
* Edit photo using AI. Each photo costs 10 credits.
|
|
12
12
|
*
|
|
13
13
|
* POST /v1/ai-photo-editor
|
|
14
14
|
*/
|
|
@@ -13,7 +13,7 @@ class AiPhotoEditorClient extends core_1.CoreResourceClient {
|
|
|
13
13
|
*
|
|
14
14
|
* > **NOTE**: this API is still in early development stages, and should be avoided. Please reach out to us if you're interested in this API.
|
|
15
15
|
*
|
|
16
|
-
* Edit photo using AI. Each photo costs 10
|
|
16
|
+
* Edit photo using AI. Each photo costs 10 credits.
|
|
17
17
|
*
|
|
18
18
|
* POST /v1/ai-photo-editor
|
|
19
19
|
*/
|
|
@@ -6,7 +6,7 @@ export declare class FaceSwapPhotoClient extends CoreResourceClient {
|
|
|
6
6
|
/**
|
|
7
7
|
* Face Swap Photo
|
|
8
8
|
*
|
|
9
|
-
* Create a face swap photo. Each photo costs 5
|
|
9
|
+
* Create a face swap photo. Each photo costs 5 credits. The height/width of the output image depends on your subscription. Please refer to our [pricing](/pricing) page for more details
|
|
10
10
|
*
|
|
11
11
|
* POST /v1/face-swap-photo
|
|
12
12
|
*/
|
|
@@ -11,7 +11,7 @@ class FaceSwapPhotoClient extends core_1.CoreResourceClient {
|
|
|
11
11
|
/**
|
|
12
12
|
* Face Swap Photo
|
|
13
13
|
*
|
|
14
|
-
* Create a face swap photo. Each photo costs 5
|
|
14
|
+
* Create a face swap photo. Each photo costs 5 credits. The height/width of the output image depends on your subscription. Please refer to our [pricing](/pricing) page for more details
|
|
15
15
|
*
|
|
16
16
|
* POST /v1/face-swap-photo
|
|
17
17
|
*/
|
|
@@ -6,7 +6,7 @@ export declare class ImageBackgroundRemoverClient extends CoreResourceClient {
|
|
|
6
6
|
/**
|
|
7
7
|
* Image Background Remover
|
|
8
8
|
*
|
|
9
|
-
* Remove background from image. Each image costs 5
|
|
9
|
+
* Remove background from image. Each image costs 5 credits.
|
|
10
10
|
*
|
|
11
11
|
* POST /v1/image-background-remover
|
|
12
12
|
*/
|
|
@@ -11,7 +11,7 @@ class ImageBackgroundRemoverClient extends core_1.CoreResourceClient {
|
|
|
11
11
|
/**
|
|
12
12
|
* Image Background Remover
|
|
13
13
|
*
|
|
14
|
-
* Remove background from image. Each image costs 5
|
|
14
|
+
* Remove background from image. Each image costs 5 credits.
|
|
15
15
|
*
|
|
16
16
|
* POST /v1/image-background-remover
|
|
17
17
|
*/
|
|
@@ -4,7 +4,13 @@ import * as z from "zod";
|
|
|
4
4
|
*/
|
|
5
5
|
export type V1AiClothesChangerCreateResponse = {
|
|
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 V1AiClothesChangerCreateResponse = {
|
|
|
18
24
|
* we expect to come in as network data
|
|
19
25
|
*/
|
|
20
26
|
export type External$V1AiClothesChangerCreateResponse = {
|
|
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$V1AiClothesChangerCreateResponse = 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$V1AiClothesChangerCreateResponse = z
|
|
|
56
58
|
*/
|
|
57
59
|
const SchemaOut$V1AiClothesChangerCreateResponse = 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 V1AiFaceEditorCreateResponse = {
|
|
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 V1AiFaceEditorCreateResponse = {
|
|
|
18
24
|
* we expect to come in as network data
|
|
19
25
|
*/
|
|
20
26
|
export type External$V1AiFaceEditorCreateResponse = {
|
|
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$V1AiFaceEditorCreateResponse = 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$V1AiFaceEditorCreateResponse = z
|
|
|
56
58
|
*/
|
|
57
59
|
const SchemaOut$V1AiFaceEditorCreateResponse = 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 V1AiGifGeneratorCreateResponse = {
|
|
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 V1AiGifGeneratorCreateResponse = {
|
|
|
18
24
|
* we expect to come in as network data
|
|
19
25
|
*/
|
|
20
26
|
export type External$V1AiGifGeneratorCreateResponse = {
|
|
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$V1AiGifGeneratorCreateResponse = 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$V1AiGifGeneratorCreateResponse = z
|
|
|
56
58
|
*/
|
|
57
59
|
const SchemaOut$V1AiGifGeneratorCreateResponse = 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 V1AiHeadshotGeneratorCreateResponse = {
|
|
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 V1AiHeadshotGeneratorCreateResponse = {
|
|
|
18
24
|
* we expect to come in as network data
|
|
19
25
|
*/
|
|
20
26
|
export type External$V1AiHeadshotGeneratorCreateResponse = {
|
|
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$V1AiHeadshotGeneratorCreateResponse = 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$V1AiHeadshotGeneratorCreateResponse = z
|
|
|
56
58
|
*/
|
|
57
59
|
const SchemaOut$V1AiHeadshotGeneratorCreateResponse = 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 V1AiImageGeneratorCreateResponse = {
|
|
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 V1AiImageGeneratorCreateResponse = {
|
|
|
18
24
|
* we expect to come in as network data
|
|
19
25
|
*/
|
|
20
26
|
export type External$V1AiImageGeneratorCreateResponse = {
|
|
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$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
|
});
|