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.
Files changed (82) 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/ai-talking-photo/request-types.d.ts +8 -2
  23. package/dist/resources/v1/ai-talking-photo/request-types.js +5 -0
  24. package/dist/resources/v1/face-swap-photo/resource-client.d.ts +1 -1
  25. package/dist/resources/v1/face-swap-photo/resource-client.js +1 -1
  26. package/dist/resources/v1/image-background-remover/resource-client.d.ts +1 -1
  27. package/dist/resources/v1/image-background-remover/resource-client.js +1 -1
  28. package/dist/resources/v1/photo-colorizer/resource-client.d.ts +1 -1
  29. package/dist/resources/v1/photo-colorizer/resource-client.js +1 -1
  30. package/dist/types/index.d.ts +2 -0
  31. package/dist/types/v1-ai-clothes-changer-create-response.d.ts +8 -1
  32. package/dist/types/v1-ai-clothes-changer-create-response.js +4 -0
  33. package/dist/types/v1-ai-face-editor-create-response.d.ts +8 -1
  34. package/dist/types/v1-ai-face-editor-create-response.js +4 -0
  35. package/dist/types/v1-ai-gif-generator-create-response.d.ts +8 -1
  36. package/dist/types/v1-ai-gif-generator-create-response.js +4 -0
  37. package/dist/types/v1-ai-headshot-generator-create-response.d.ts +8 -1
  38. package/dist/types/v1-ai-headshot-generator-create-response.js +4 -0
  39. package/dist/types/v1-ai-image-generator-create-response.d.ts +8 -1
  40. package/dist/types/v1-ai-image-generator-create-response.js +4 -0
  41. package/dist/types/v1-ai-image-upscaler-create-response.d.ts +8 -1
  42. package/dist/types/v1-ai-image-upscaler-create-response.js +4 -0
  43. package/dist/types/v1-ai-meme-generator-create-response.d.ts +8 -1
  44. package/dist/types/v1-ai-meme-generator-create-response.js +4 -0
  45. package/dist/types/v1-ai-photo-editor-create-response.d.ts +8 -1
  46. package/dist/types/v1-ai-photo-editor-create-response.js +4 -0
  47. package/dist/types/v1-ai-qr-code-generator-create-response.d.ts +8 -1
  48. package/dist/types/v1-ai-qr-code-generator-create-response.js +4 -0
  49. package/dist/types/v1-ai-talking-photo-create-body-style-generation-mode-enum.d.ts +6 -0
  50. package/dist/types/v1-ai-talking-photo-create-body-style-generation-mode-enum.js +2 -0
  51. package/dist/types/v1-ai-talking-photo-create-body-style.d.ts +31 -0
  52. package/dist/types/v1-ai-talking-photo-create-body-style.js +71 -0
  53. package/dist/types/v1-ai-talking-photo-create-body.d.ts +8 -2
  54. package/dist/types/v1-ai-talking-photo-create-body.js +5 -0
  55. package/dist/types/v1-ai-talking-photo-create-response.d.ts +10 -1
  56. package/dist/types/v1-ai-talking-photo-create-response.js +4 -0
  57. package/dist/types/v1-animation-create-response.d.ts +10 -1
  58. package/dist/types/v1-animation-create-response.js +4 -0
  59. package/dist/types/v1-face-swap-create-response.d.ts +11 -2
  60. package/dist/types/v1-face-swap-create-response.js +4 -0
  61. package/dist/types/v1-face-swap-photo-create-response.d.ts +8 -1
  62. package/dist/types/v1-face-swap-photo-create-response.js +4 -0
  63. package/dist/types/v1-image-background-remover-create-response.d.ts +8 -1
  64. package/dist/types/v1-image-background-remover-create-response.js +4 -0
  65. package/dist/types/v1-image-projects-get-response.d.ts +8 -1
  66. package/dist/types/v1-image-projects-get-response.js +4 -0
  67. package/dist/types/v1-image-to-video-create-response.d.ts +10 -1
  68. package/dist/types/v1-image-to-video-create-response.js +4 -0
  69. package/dist/types/v1-lip-sync-create-response.d.ts +10 -1
  70. package/dist/types/v1-lip-sync-create-response.js +4 -0
  71. package/dist/types/v1-photo-colorizer-create-response.d.ts +8 -1
  72. package/dist/types/v1-photo-colorizer-create-response.js +4 -0
  73. package/dist/types/v1-text-to-video-create-response.d.ts +10 -1
  74. package/dist/types/v1-text-to-video-create-response.js +4 -0
  75. package/dist/types/v1-video-projects-get-response.d.ts +9 -0
  76. package/dist/types/v1-video-projects-get-response.js +4 -0
  77. package/dist/types/v1-video-to-video-create-body-style-art-style-enum.d.ts +1 -1
  78. package/dist/types/v1-video-to-video-create-body-style.d.ts +2 -2
  79. package/dist/types/v1-video-to-video-create-body-style.js +2 -0
  80. package/dist/types/v1-video-to-video-create-response.d.ts +10 -1
  81. package/dist/types/v1-video-to-video-create-response.js +4 -0
  82. package/package.json +1 -1
@@ -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
  });
@@ -4,7 +4,13 @@ import * as z from "zod";
4
4
  */
5
5
  export type V1PhotoColorizerCreateResponse = {
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 V1PhotoColorizerCreateResponse = {
18
24
  * we expect to come in as network data
19
25
  */
20
26
  export type External$V1PhotoColorizerCreateResponse = {
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$V1PhotoColorizerCreateResponse = 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$V1PhotoColorizerCreateResponse = z
56
58
  */
57
59
  const SchemaOut$V1PhotoColorizerCreateResponse = 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 V1TextToVideoCreateResponse = {
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 V1TextToVideoCreateResponse = {
18
26
  * we expect to come in as network data
19
27
  */
20
28
  export type External$V1TextToVideoCreateResponse = {
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$V1TextToVideoCreateResponse = 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$V1TextToVideoCreateResponse = z
56
58
  */
57
59
  const SchemaOut$V1TextToVideoCreateResponse = 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
  });
@@ -7,6 +7,12 @@ import * as z from "zod";
7
7
  */
8
8
  export type V1VideoProjectsGetResponse = {
9
9
  createdAt: string;
10
+ /**
11
+ * 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.
12
+ *
13
+ * If video generation fails, credits will be refunded, and this field will be updated to include the refund.
14
+ */
15
+ creditsCharged: number;
10
16
  /**
11
17
  * Deprecated: Please use `.downloads` instead. The download url and expiration date of the video project
12
18
  */
@@ -49,6 +55,8 @@ export type V1VideoProjectsGetResponse = {
49
55
  */
50
56
  status: "canceled" | "complete" | "draft" | "error" | "queued" | "rendering";
51
57
  /**
58
+ * Deprecated: Previously represented the number of frames (original name of our credit system) used for video generation. Use 'credits_charged' instead.
59
+ *
52
60
  * 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.
53
61
  */
54
62
  totalFrameCost: number;
@@ -68,6 +76,7 @@ export type V1VideoProjectsGetResponse = {
68
76
  */
69
77
  export type External$V1VideoProjectsGetResponse = {
70
78
  created_at: string;
79
+ credits_charged: number;
71
80
  download: External$V1VideoProjectsGetResponseDownload | null;
72
81
  downloads: External$V1VideoProjectsGetResponseDownloadsItem[];
73
82
  enabled: boolean;
@@ -45,6 +45,7 @@ const z = __importStar(require("zod"));
45
45
  const SchemaIn$V1VideoProjectsGetResponse = z
46
46
  .object({
47
47
  created_at: z.string(),
48
+ credits_charged: z.number().int(),
48
49
  download: v1_video_projects_get_response_download_1.Schemas$V1VideoProjectsGetResponseDownload.in.nullable(),
49
50
  downloads: z.array(v1_video_projects_get_response_downloads_item_1.Schemas$V1VideoProjectsGetResponseDownloadsItem.in),
50
51
  enabled: z.boolean(),
@@ -70,6 +71,7 @@ const SchemaIn$V1VideoProjectsGetResponse = z
70
71
  .transform((obj) => {
71
72
  return (0, core_1.zodTransform)(obj, {
72
73
  created_at: "createdAt",
74
+ credits_charged: "creditsCharged",
73
75
  download: "download",
74
76
  downloads: "downloads",
75
77
  enabled: "enabled",
@@ -93,6 +95,7 @@ const SchemaIn$V1VideoProjectsGetResponse = z
93
95
  const SchemaOut$V1VideoProjectsGetResponse = z
94
96
  .object({
95
97
  createdAt: z.string(),
98
+ creditsCharged: z.number().int(),
96
99
  download: v1_video_projects_get_response_download_1.Schemas$V1VideoProjectsGetResponseDownload.out.nullable(),
97
100
  downloads: z.array(v1_video_projects_get_response_downloads_item_1.Schemas$V1VideoProjectsGetResponseDownloadsItem.out),
98
101
  enabled: z.boolean(),
@@ -118,6 +121,7 @@ const SchemaOut$V1VideoProjectsGetResponse = z
118
121
  .transform((obj) => {
119
122
  return (0, core_1.zodTransform)(obj, {
120
123
  createdAt: "created_at",
124
+ creditsCharged: "credits_charged",
121
125
  download: "download",
122
126
  downloads: "downloads",
123
127
  enabled: "enabled",
@@ -1,4 +1,4 @@
1
1
  /**
2
2
  * V1VideoToVideoCreateBodyStyleArtStyleEnum
3
3
  */
4
- export type V1VideoToVideoCreateBodyStyleArtStyleEnum = "3D Render" | "Airbender" | "Android" | "Anime Warrior" | "Armored Knight" | "Assassin's Creed" | "Avatar" | "Black Spiderman" | "Boba Fett" | "Celestial Skin" | "Chinese Swordsmen" | "Clay" | "Comic" | "Cyberpunk" | "Cypher" | "Dark Fantasy" | "Dragonball Z" | "Future Bot" | "Futuristic Fantasy" | "GTA" | "Ghost" | "Gundam" | "Hologram" | "Illustration" | "Impressionism" | "Ink" | "Ink Poster" | "Jinx" | "Knight" | "Lego" | "Link" | "Marble" | "Mario" | "Master Chief" | "Mech" | "Minecraft" | "Mystique" | "Naruto" | "Neon Dream" | "Oil Painting" | "On Fire" | "Origami" | "Pixar" | "Pixel" | "Power Armor" | "Power Ranger" | "Retro Anime" | "Retro Sci-Fi" | "Samurai" | "Samurai Bot" | "Solid Snake" | "Spartan" | "Starfield" | "Street Fighter" | "Studio Ghibli" | "Sub-Zero" | "The Void" | "Tomb Raider" | "Underwater" | "Van Gogh" | "Viking" | "Watercolor" | "Wu Kong" | "Zelda";
4
+ export type V1VideoToVideoCreateBodyStyleArtStyleEnum = "3D Render" | "Airbender" | "Android" | "Anime Warrior" | "Armored Knight" | "Assassin's Creed" | "Avatar" | "Black Spiderman" | "Boba Fett" | "Celestial Skin" | "Chinese Swordsmen" | "Clay" | "Comic" | "Cyberpunk" | "Cypher" | "Dark Fantasy" | "Dragonball Z" | "Future Bot" | "Futuristic Fantasy" | "GTA" | "Ghost" | "Gundam" | "Hologram" | "Illustration" | "Impressionism" | "Ink" | "Ink Poster" | "Jinx" | "Knight" | "Lego" | "Link" | "Marble" | "Mario" | "Master Chief" | "Mech" | "Minecraft" | "Mystique" | "Naruto" | "Neon Dream" | "No Art Style" | "Oil Painting" | "On Fire" | "Origami" | "Pixar" | "Pixel" | "Power Armor" | "Power Ranger" | "Retro Anime" | "Retro Sci-Fi" | "Samurai" | "Samurai Bot" | "Solid Snake" | "Spartan" | "Starfield" | "Street Fighter" | "Studio Ghibli" | "Sub-Zero" | "The Void" | "Tomb Raider" | "Underwater" | "Van Gogh" | "Viking" | "Watercolor" | "Wu Kong" | "Zelda";
@@ -3,7 +3,7 @@ import * as z from "zod";
3
3
  * V1VideoToVideoCreateBodyStyle
4
4
  */
5
5
  export type V1VideoToVideoCreateBodyStyle = {
6
- artStyle: "3D Render" | "Airbender" | "Android" | "Anime Warrior" | "Armored Knight" | "Assassin's Creed" | "Avatar" | "Black Spiderman" | "Boba Fett" | "Celestial Skin" | "Chinese Swordsmen" | "Clay" | "Comic" | "Cyberpunk" | "Cypher" | "Dark Fantasy" | "Dragonball Z" | "Future Bot" | "Futuristic Fantasy" | "GTA" | "Ghost" | "Gundam" | "Hologram" | "Illustration" | "Impressionism" | "Ink" | "Ink Poster" | "Jinx" | "Knight" | "Lego" | "Link" | "Marble" | "Mario" | "Master Chief" | "Mech" | "Minecraft" | "Mystique" | "Naruto" | "Neon Dream" | "Oil Painting" | "On Fire" | "Origami" | "Pixar" | "Pixel" | "Power Armor" | "Power Ranger" | "Retro Anime" | "Retro Sci-Fi" | "Samurai" | "Samurai Bot" | "Solid Snake" | "Spartan" | "Starfield" | "Street Fighter" | "Studio Ghibli" | "Sub-Zero" | "The Void" | "Tomb Raider" | "Underwater" | "Van Gogh" | "Viking" | "Watercolor" | "Wu Kong" | "Zelda";
6
+ artStyle: "3D Render" | "Airbender" | "Android" | "Anime Warrior" | "Armored Knight" | "Assassin's Creed" | "Avatar" | "Black Spiderman" | "Boba Fett" | "Celestial Skin" | "Chinese Swordsmen" | "Clay" | "Comic" | "Cyberpunk" | "Cypher" | "Dark Fantasy" | "Dragonball Z" | "Future Bot" | "Futuristic Fantasy" | "GTA" | "Ghost" | "Gundam" | "Hologram" | "Illustration" | "Impressionism" | "Ink" | "Ink Poster" | "Jinx" | "Knight" | "Lego" | "Link" | "Marble" | "Mario" | "Master Chief" | "Mech" | "Minecraft" | "Mystique" | "Naruto" | "Neon Dream" | "No Art Style" | "Oil Painting" | "On Fire" | "Origami" | "Pixar" | "Pixel" | "Power Armor" | "Power Ranger" | "Retro Anime" | "Retro Sci-Fi" | "Samurai" | "Samurai Bot" | "Solid Snake" | "Spartan" | "Starfield" | "Street Fighter" | "Studio Ghibli" | "Sub-Zero" | "The Void" | "Tomb Raider" | "Underwater" | "Van Gogh" | "Viking" | "Watercolor" | "Wu Kong" | "Zelda";
7
7
  /**
8
8
  * * `Dreamshaper` - a good all-around model that works for both animations as well as realism.
9
9
  * * `Absolute Reality` - better at realism, but you'll often get similar results with Dreamshaper as well.
@@ -34,7 +34,7 @@ export type V1VideoToVideoCreateBodyStyle = {
34
34
  * we expect to come in as network data
35
35
  */
36
36
  export type External$V1VideoToVideoCreateBodyStyle = {
37
- art_style: "3D Render" | "Airbender" | "Android" | "Anime Warrior" | "Armored Knight" | "Assassin's Creed" | "Avatar" | "Black Spiderman" | "Boba Fett" | "Celestial Skin" | "Chinese Swordsmen" | "Clay" | "Comic" | "Cyberpunk" | "Cypher" | "Dark Fantasy" | "Dragonball Z" | "Future Bot" | "Futuristic Fantasy" | "GTA" | "Ghost" | "Gundam" | "Hologram" | "Illustration" | "Impressionism" | "Ink" | "Ink Poster" | "Jinx" | "Knight" | "Lego" | "Link" | "Marble" | "Mario" | "Master Chief" | "Mech" | "Minecraft" | "Mystique" | "Naruto" | "Neon Dream" | "Oil Painting" | "On Fire" | "Origami" | "Pixar" | "Pixel" | "Power Armor" | "Power Ranger" | "Retro Anime" | "Retro Sci-Fi" | "Samurai" | "Samurai Bot" | "Solid Snake" | "Spartan" | "Starfield" | "Street Fighter" | "Studio Ghibli" | "Sub-Zero" | "The Void" | "Tomb Raider" | "Underwater" | "Van Gogh" | "Viking" | "Watercolor" | "Wu Kong" | "Zelda";
37
+ art_style: "3D Render" | "Airbender" | "Android" | "Anime Warrior" | "Armored Knight" | "Assassin's Creed" | "Avatar" | "Black Spiderman" | "Boba Fett" | "Celestial Skin" | "Chinese Swordsmen" | "Clay" | "Comic" | "Cyberpunk" | "Cypher" | "Dark Fantasy" | "Dragonball Z" | "Future Bot" | "Futuristic Fantasy" | "GTA" | "Ghost" | "Gundam" | "Hologram" | "Illustration" | "Impressionism" | "Ink" | "Ink Poster" | "Jinx" | "Knight" | "Lego" | "Link" | "Marble" | "Mario" | "Master Chief" | "Mech" | "Minecraft" | "Mystique" | "Naruto" | "Neon Dream" | "No Art Style" | "Oil Painting" | "On Fire" | "Origami" | "Pixar" | "Pixel" | "Power Armor" | "Power Ranger" | "Retro Anime" | "Retro Sci-Fi" | "Samurai" | "Samurai Bot" | "Solid Snake" | "Spartan" | "Starfield" | "Street Fighter" | "Studio Ghibli" | "Sub-Zero" | "The Void" | "Tomb Raider" | "Underwater" | "Van Gogh" | "Viking" | "Watercolor" | "Wu Kong" | "Zelda";
38
38
  model: "Absolute Reality" | "Dreamshaper" | "Flat 2D Anime" | "default";
39
39
  prompt: string | null;
40
40
  prompt_type: "append_default" | "custom" | "default";
@@ -81,6 +81,7 @@ const SchemaIn$V1VideoToVideoCreateBodyStyle = z
81
81
  "Mystique",
82
82
  "Naruto",
83
83
  "Neon Dream",
84
+ "No Art Style",
84
85
  "Oil Painting",
85
86
  "On Fire",
86
87
  "Origami",
@@ -172,6 +173,7 @@ const SchemaOut$V1VideoToVideoCreateBodyStyle = z
172
173
  "Mystique",
173
174
  "Naruto",
174
175
  "Neon Dream",
176
+ "No Art Style",
175
177
  "Oil Painting",
176
178
  "On Fire",
177
179
  "Origami",
@@ -4,7 +4,15 @@ import * as z from "zod";
4
4
  */
5
5
  export type V1VideoToVideoCreateResponse = {
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 V1VideoToVideoCreateResponse = {
18
26
  * we expect to come in as network data
19
27
  */
20
28
  export type External$V1VideoToVideoCreateResponse = {
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$V1VideoToVideoCreateResponse = 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$V1VideoToVideoCreateResponse = z
56
58
  */
57
59
  const SchemaOut$V1VideoToVideoCreateResponse = 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
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "magic-hour",
3
- "version": "0.21.0",
3
+ "version": "0.23.0",
4
4
  "main": "./dist/index.js",
5
5
  "types": "./dist/index.d.ts",
6
6
  "exports": {