magic-hour 0.20.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.
Files changed (75) hide show
  1. package/dist/client.js +4 -2
  2. package/dist/core/core-client.d.ts +4 -3
  3. package/dist/core/core-client.js +10 -10
  4. package/dist/environment.d.ts +1 -1
  5. package/dist/environment.js +1 -1
  6. package/dist/resources/v1/ai-clothes-changer/resource-client.d.ts +1 -1
  7. package/dist/resources/v1/ai-clothes-changer/resource-client.js +1 -1
  8. package/dist/resources/v1/ai-gif-generator/resource-client.d.ts +1 -1
  9. package/dist/resources/v1/ai-gif-generator/resource-client.js +1 -1
  10. package/dist/resources/v1/ai-headshot-generator/resource-client.d.ts +1 -1
  11. package/dist/resources/v1/ai-headshot-generator/resource-client.js +1 -1
  12. package/dist/resources/v1/ai-image-generator/resource-client.d.ts +1 -1
  13. package/dist/resources/v1/ai-image-generator/resource-client.js +1 -1
  14. package/dist/resources/v1/ai-image-upscaler/resource-client.d.ts +1 -1
  15. package/dist/resources/v1/ai-image-upscaler/resource-client.js +1 -1
  16. package/dist/resources/v1/ai-meme-generator/resource-client.d.ts +1 -1
  17. package/dist/resources/v1/ai-meme-generator/resource-client.js +1 -1
  18. package/dist/resources/v1/ai-photo-editor/resource-client.d.ts +1 -1
  19. package/dist/resources/v1/ai-photo-editor/resource-client.js +1 -1
  20. package/dist/resources/v1/ai-qr-code-generator/resource-client.d.ts +1 -1
  21. package/dist/resources/v1/ai-qr-code-generator/resource-client.js +1 -1
  22. package/dist/resources/v1/face-swap-photo/resource-client.d.ts +1 -1
  23. package/dist/resources/v1/face-swap-photo/resource-client.js +1 -1
  24. package/dist/resources/v1/image-background-remover/resource-client.d.ts +1 -1
  25. package/dist/resources/v1/image-background-remover/resource-client.js +1 -1
  26. package/dist/resources/v1/photo-colorizer/resource-client.d.ts +1 -1
  27. package/dist/resources/v1/photo-colorizer/resource-client.js +1 -1
  28. package/dist/types/v1-ai-clothes-changer-create-response.d.ts +8 -1
  29. package/dist/types/v1-ai-clothes-changer-create-response.js +4 -0
  30. package/dist/types/v1-ai-face-editor-create-response.d.ts +8 -1
  31. package/dist/types/v1-ai-face-editor-create-response.js +4 -0
  32. package/dist/types/v1-ai-gif-generator-create-response.d.ts +8 -1
  33. package/dist/types/v1-ai-gif-generator-create-response.js +4 -0
  34. package/dist/types/v1-ai-headshot-generator-create-response.d.ts +8 -1
  35. package/dist/types/v1-ai-headshot-generator-create-response.js +4 -0
  36. package/dist/types/v1-ai-image-generator-create-response.d.ts +8 -1
  37. package/dist/types/v1-ai-image-generator-create-response.js +4 -0
  38. package/dist/types/v1-ai-image-upscaler-create-response.d.ts +8 -1
  39. package/dist/types/v1-ai-image-upscaler-create-response.js +4 -0
  40. package/dist/types/v1-ai-meme-generator-create-response.d.ts +8 -1
  41. package/dist/types/v1-ai-meme-generator-create-response.js +4 -0
  42. package/dist/types/v1-ai-photo-editor-create-body-style.d.ts +10 -0
  43. package/dist/types/v1-ai-photo-editor-create-body-style.js +8 -0
  44. package/dist/types/v1-ai-photo-editor-create-response.d.ts +8 -1
  45. package/dist/types/v1-ai-photo-editor-create-response.js +4 -0
  46. package/dist/types/v1-ai-qr-code-generator-create-response.d.ts +8 -1
  47. package/dist/types/v1-ai-qr-code-generator-create-response.js +4 -0
  48. package/dist/types/v1-ai-talking-photo-create-response.d.ts +10 -1
  49. package/dist/types/v1-ai-talking-photo-create-response.js +4 -0
  50. package/dist/types/v1-animation-create-response.d.ts +10 -1
  51. package/dist/types/v1-animation-create-response.js +4 -0
  52. package/dist/types/v1-face-swap-create-response.d.ts +11 -2
  53. package/dist/types/v1-face-swap-create-response.js +4 -0
  54. package/dist/types/v1-face-swap-photo-create-response.d.ts +8 -1
  55. package/dist/types/v1-face-swap-photo-create-response.js +4 -0
  56. package/dist/types/v1-image-background-remover-create-response.d.ts +8 -1
  57. package/dist/types/v1-image-background-remover-create-response.js +4 -0
  58. package/dist/types/v1-image-projects-get-response.d.ts +8 -1
  59. package/dist/types/v1-image-projects-get-response.js +4 -0
  60. package/dist/types/v1-image-to-video-create-response.d.ts +10 -1
  61. package/dist/types/v1-image-to-video-create-response.js +4 -0
  62. package/dist/types/v1-lip-sync-create-response.d.ts +10 -1
  63. package/dist/types/v1-lip-sync-create-response.js +4 -0
  64. package/dist/types/v1-photo-colorizer-create-response.d.ts +8 -1
  65. package/dist/types/v1-photo-colorizer-create-response.js +4 -0
  66. package/dist/types/v1-text-to-video-create-response.d.ts +10 -1
  67. package/dist/types/v1-text-to-video-create-response.js +4 -0
  68. package/dist/types/v1-video-projects-get-response.d.ts +9 -0
  69. package/dist/types/v1-video-projects-get-response.js +4 -0
  70. package/dist/types/v1-video-to-video-create-body-style-art-style-enum.d.ts +1 -1
  71. package/dist/types/v1-video-to-video-create-body-style.d.ts +2 -2
  72. package/dist/types/v1-video-to-video-create-body-style.js +2 -0
  73. package/dist/types/v1-video-to-video-create-response.d.ts +10 -1
  74. package/dist/types/v1-video-to-video-create-response.js +4 -0
  75. package/package.json +1 -1
@@ -4,7 +4,13 @@ import * as z from "zod";
4
4
  */
5
5
  export type V1AiMemeGeneratorCreateResponse = {
6
6
  /**
7
- * The frame cost of the image generation
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
  });
@@ -27,6 +27,14 @@ export type V1AiPhotoEditorCreateBodyStyle = {
27
27
  * Number of iterations used to generate the output. Higher values improve quality and increase the strength of the prompt but increase processing time.
28
28
  */
29
29
  steps?: number | undefined;
30
+ /**
31
+ * The multiplier applied to an image's original dimensions during the upscaling process. For example, a scale of 2 doubles the width and height (e.g., from 512x512 to 1024x1024).
32
+ */
33
+ upscaleFactor?: number | undefined;
34
+ /**
35
+ * Upscale fidelity refers to the level of quality desired in the generated image. Fidelity value of 1 means more details.
36
+ */
37
+ upscaleFidelity?: number | undefined;
30
38
  };
31
39
  /**
32
40
  * @internal
@@ -40,6 +48,8 @@ export type External$V1AiPhotoEditorCreateBodyStyle = {
40
48
  prompt: string;
41
49
  prompt_strength: number;
42
50
  steps?: number | undefined;
51
+ upscale_factor?: number | undefined;
52
+ upscale_fidelity?: number | undefined;
43
53
  };
44
54
  export declare const Schemas$V1AiPhotoEditorCreateBodyStyle: {
45
55
  in: z.ZodType<V1AiPhotoEditorCreateBodyStyle, z.ZodTypeDef, unknown>;
@@ -47,6 +47,8 @@ const SchemaIn$V1AiPhotoEditorCreateBodyStyle = z
47
47
  prompt: z.string(),
48
48
  prompt_strength: z.number(),
49
49
  steps: z.number().int().optional(),
50
+ upscale_factor: z.number().int().optional(),
51
+ upscale_fidelity: z.number().optional(),
50
52
  })
51
53
  .transform((obj) => {
52
54
  return (0, core_1.zodTransform)(obj, {
@@ -56,6 +58,8 @@ const SchemaIn$V1AiPhotoEditorCreateBodyStyle = z
56
58
  prompt: "prompt",
57
59
  prompt_strength: "promptStrength",
58
60
  steps: "steps",
61
+ upscale_factor: "upscaleFactor",
62
+ upscale_fidelity: "upscaleFidelity",
59
63
  });
60
64
  });
61
65
  /**
@@ -70,6 +74,8 @@ const SchemaOut$V1AiPhotoEditorCreateBodyStyle = z
70
74
  prompt: z.string(),
71
75
  promptStrength: z.number(),
72
76
  steps: z.number().int().optional(),
77
+ upscaleFactor: z.number().int().optional(),
78
+ upscaleFidelity: z.number().optional(),
73
79
  })
74
80
  .transform((obj) => {
75
81
  return (0, core_1.zodTransform)(obj, {
@@ -79,6 +85,8 @@ const SchemaOut$V1AiPhotoEditorCreateBodyStyle = z
79
85
  prompt: "prompt",
80
86
  promptStrength: "prompt_strength",
81
87
  steps: "steps",
88
+ upscaleFactor: "upscale_factor",
89
+ upscaleFidelity: "upscale_fidelity",
82
90
  });
83
91
  });
84
92
  exports.Schemas$V1AiPhotoEditorCreateBodyStyle = {
@@ -4,7 +4,13 @@ import * as z from "zod";
4
4
  */
5
5
  export type V1AiPhotoEditorCreateResponse = {
6
6
  /**
7
- * The frame cost of the image generation
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 frame cost of the image generation
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
  });
@@ -4,7 +4,15 @@ import * as z from "zod";
4
4
  */
5
5
  export type V1AiTalkingPhotoCreateResponse = {
6
6
  /**
7
- * Estimated cost of the video in terms of number of frames needed to render the video. Frames will be adjusted when the video completes
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
- * Estimated cost of the video in terms of number of frames needed to render the video. Frames will be adjusted when the video completes
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
- * Estimated cost of the video in terms of number of frames needed to render the video. Frames will be adjusted when the video completes
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 image. This value can be used in the [get image project API](https://docs.magichour.ai/api-reference/image-projects/get-image-details) to fetch additional details such as status
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 frame cost of the image generation
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
  });
@@ -4,7 +4,13 @@ import * as z from "zod";
4
4
  */
5
5
  export type V1ImageBackgroundRemoverCreateResponse = {
6
6
  /**
7
- * The frame cost of the image generation
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 V1ImageBackgroundRemoverCreateResponse = {
18
24
  * we expect to come in as network data
19
25
  */
20
26
  export type External$V1ImageBackgroundRemoverCreateResponse = {
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$V1ImageBackgroundRemoverCreateResponse = 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$V1ImageBackgroundRemoverCreateResponse = z
56
58
  */
57
59
  const SchemaOut$V1ImageBackgroundRemoverCreateResponse = 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
  });
@@ -6,6 +6,12 @@ import * as z from "zod";
6
6
  */
7
7
  export type V1ImageProjectsGetResponse = {
8
8
  createdAt: string;
9
+ /**
10
+ * The amount of credits deducted from your account to generate the image. We charge credits right when the request is made.
11
+ *
12
+ * If an error occurred while generating the image(s), credits will be refunded and this field will be updated to include the refund.
13
+ */
14
+ creditsCharged: number;
9
15
  downloads: V1ImageProjectsGetResponseDownloadsItem[];
10
16
  /**
11
17
  * Indicates whether the resource is deleted
@@ -32,7 +38,7 @@ export type V1ImageProjectsGetResponse = {
32
38
  */
33
39
  status: "canceled" | "complete" | "draft" | "error" | "queued" | "rendering";
34
40
  /**
35
- * The amount of frames used to generate the image.
41
+ * Deprecated: Previously represented the number of frames (original name of our credit system) used for image generation. Use 'credits_charged' instead.
36
42
  */
37
43
  totalFrameCost: number;
38
44
  /**
@@ -47,6 +53,7 @@ export type V1ImageProjectsGetResponse = {
47
53
  */
48
54
  export type External$V1ImageProjectsGetResponse = {
49
55
  created_at: string;
56
+ credits_charged: number;
50
57
  downloads: External$V1ImageProjectsGetResponseDownloadsItem[];
51
58
  enabled: boolean;
52
59
  error: External$V1ImageProjectsGetResponseError | null;
@@ -44,6 +44,7 @@ const z = __importStar(require("zod"));
44
44
  const SchemaIn$V1ImageProjectsGetResponse = z
45
45
  .object({
46
46
  created_at: z.string(),
47
+ credits_charged: z.number().int(),
47
48
  downloads: z.array(v1_image_projects_get_response_downloads_item_1.Schemas$V1ImageProjectsGetResponseDownloadsItem.in),
48
49
  enabled: z.boolean(),
49
50
  error: v1_image_projects_get_response_error_1.Schemas$V1ImageProjectsGetResponseError.in.nullable(),
@@ -64,6 +65,7 @@ const SchemaIn$V1ImageProjectsGetResponse = z
64
65
  .transform((obj) => {
65
66
  return (0, core_1.zodTransform)(obj, {
66
67
  created_at: "createdAt",
68
+ credits_charged: "creditsCharged",
67
69
  downloads: "downloads",
68
70
  enabled: "enabled",
69
71
  error: "error",
@@ -82,6 +84,7 @@ const SchemaIn$V1ImageProjectsGetResponse = z
82
84
  const SchemaOut$V1ImageProjectsGetResponse = z
83
85
  .object({
84
86
  createdAt: z.string(),
87
+ creditsCharged: z.number().int(),
85
88
  downloads: z.array(v1_image_projects_get_response_downloads_item_1.Schemas$V1ImageProjectsGetResponseDownloadsItem.out),
86
89
  enabled: z.boolean(),
87
90
  error: v1_image_projects_get_response_error_1.Schemas$V1ImageProjectsGetResponseError.out.nullable(),
@@ -102,6 +105,7 @@ const SchemaOut$V1ImageProjectsGetResponse = z
102
105
  .transform((obj) => {
103
106
  return (0, core_1.zodTransform)(obj, {
104
107
  createdAt: "created_at",
108
+ creditsCharged: "credits_charged",
105
109
  downloads: "downloads",
106
110
  enabled: "enabled",
107
111
  error: "error",
@@ -4,7 +4,15 @@ import * as z from "zod";
4
4
  */
5
5
  export type V1ImageToVideoCreateResponse = {
6
6
  /**
7
- * Estimated cost of the video in terms of number of frames needed to render the video. Frames will be adjusted when the video completes
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 V1ImageToVideoCreateResponse = {
18
26
  * we expect to come in as network data
19
27
  */
20
28
  export type External$V1ImageToVideoCreateResponse = {
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$V1ImageToVideoCreateResponse = 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$V1ImageToVideoCreateResponse = z
56
58
  */
57
59
  const SchemaOut$V1ImageToVideoCreateResponse = 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 V1LipSyncCreateResponse = {
6
6
  /**
7
- * Estimated cost of the video in terms of number of frames needed to render the video. Frames will be adjusted when the video completes
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 V1LipSyncCreateResponse = {
18
26
  * we expect to come in as network data
19
27
  */
20
28
  export type External$V1LipSyncCreateResponse = {
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$V1LipSyncCreateResponse = 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$V1LipSyncCreateResponse = z
56
58
  */
57
59
  const SchemaOut$V1LipSyncCreateResponse = 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
  });