magic-hour 0.50.0 → 0.52.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 (64) hide show
  1. package/README.md +2 -2
  2. package/dist/environment.d.ts +1 -1
  3. package/dist/environment.js +1 -1
  4. package/dist/index.d.ts +1 -1
  5. package/dist/index.js +2 -1
  6. package/dist/resources/v1/ai-clothes-changer/resource-client.d.ts +2 -2
  7. package/dist/resources/v1/ai-clothes-changer/resource-client.js +2 -2
  8. package/dist/resources/v1/ai-face-editor/resource-client.d.ts +2 -2
  9. package/dist/resources/v1/ai-face-editor/resource-client.js +2 -2
  10. package/dist/resources/v1/ai-gif-generator/resource-client.d.ts +2 -2
  11. package/dist/resources/v1/ai-gif-generator/resource-client.js +2 -2
  12. package/dist/resources/v1/ai-headshot-generator/resource-client.d.ts +2 -2
  13. package/dist/resources/v1/ai-headshot-generator/resource-client.js +2 -2
  14. package/dist/resources/v1/ai-image-editor/resource-client.d.ts +2 -2
  15. package/dist/resources/v1/ai-image-editor/resource-client.js +2 -2
  16. package/dist/resources/v1/ai-image-generator/resource-client.d.ts +2 -2
  17. package/dist/resources/v1/ai-image-generator/resource-client.js +2 -2
  18. package/dist/resources/v1/ai-image-upscaler/resource-client.d.ts +2 -2
  19. package/dist/resources/v1/ai-image-upscaler/resource-client.js +2 -2
  20. package/dist/resources/v1/ai-meme-generator/resource-client.d.ts +2 -2
  21. package/dist/resources/v1/ai-meme-generator/resource-client.js +2 -2
  22. package/dist/resources/v1/ai-qr-code-generator/resource-client.d.ts +2 -2
  23. package/dist/resources/v1/ai-qr-code-generator/resource-client.js +2 -2
  24. package/dist/resources/v1/ai-talking-photo/resource-client.d.ts +2 -2
  25. package/dist/resources/v1/ai-talking-photo/resource-client.js +2 -2
  26. package/dist/resources/v1/ai-voice-cloner/resource-client.d.ts +2 -2
  27. package/dist/resources/v1/ai-voice-cloner/resource-client.js +2 -2
  28. package/dist/resources/v1/ai-voice-generator/resource-client.d.ts +2 -2
  29. package/dist/resources/v1/ai-voice-generator/resource-client.js +2 -2
  30. package/dist/resources/v1/animation/resource-client.d.ts +2 -2
  31. package/dist/resources/v1/animation/resource-client.js +2 -2
  32. package/dist/resources/v1/auto-subtitle-generator/resource-client.d.ts +2 -2
  33. package/dist/resources/v1/auto-subtitle-generator/resource-client.js +2 -2
  34. package/dist/resources/v1/face-swap/resource-client.d.ts +2 -2
  35. package/dist/resources/v1/face-swap/resource-client.js +2 -2
  36. package/dist/resources/v1/face-swap-photo/resource-client.d.ts +2 -2
  37. package/dist/resources/v1/face-swap-photo/resource-client.js +2 -2
  38. package/dist/resources/v1/files/resource-client.test.js +2 -5
  39. package/dist/resources/v1/image-background-remover/resource-client.d.ts +2 -2
  40. package/dist/resources/v1/image-background-remover/resource-client.js +2 -2
  41. package/dist/resources/v1/image-to-video/request-types.d.ts +29 -16
  42. package/dist/resources/v1/image-to-video/request-types.js +8 -0
  43. package/dist/resources/v1/image-to-video/resource-client.d.ts +2 -2
  44. package/dist/resources/v1/image-to-video/resource-client.js +2 -2
  45. package/dist/resources/v1/lip-sync/resource-client.d.ts +2 -2
  46. package/dist/resources/v1/lip-sync/resource-client.js +2 -2
  47. package/dist/resources/v1/photo-colorizer/resource-client.d.ts +2 -2
  48. package/dist/resources/v1/photo-colorizer/resource-client.js +2 -2
  49. package/dist/resources/v1/text-to-video/request-types.d.ts +35 -22
  50. package/dist/resources/v1/text-to-video/request-types.js +8 -0
  51. package/dist/resources/v1/text-to-video/resource-client.d.ts +2 -2
  52. package/dist/resources/v1/text-to-video/resource-client.js +2 -2
  53. package/dist/resources/v1/video-to-video/resource-client.d.ts +2 -2
  54. package/dist/resources/v1/video-to-video/resource-client.js +2 -2
  55. package/dist/types/v1-image-to-video-create-body-model-enum.d.ts +3 -3
  56. package/dist/types/v1-image-to-video-create-body-resolution-enum.d.ts +6 -6
  57. package/dist/types/v1-image-to-video-create-body.d.ts +29 -16
  58. package/dist/types/v1-image-to-video-create-body.js +8 -0
  59. package/dist/types/v1-text-to-video-create-body-aspect-ratio-enum.d.ts +6 -6
  60. package/dist/types/v1-text-to-video-create-body-model-enum.d.ts +3 -3
  61. package/dist/types/v1-text-to-video-create-body-resolution-enum.d.ts +6 -6
  62. package/dist/types/v1-text-to-video-create-body.d.ts +35 -22
  63. package/dist/types/v1-text-to-video-create-body.js +8 -0
  64. package/package.json +1 -1
@@ -40,7 +40,7 @@ class FaceSwapPhotoClient extends make_api_request_js_1.CoreResourceClient {
40
40
  *
41
41
  * @example
42
42
  * ```typescript
43
- * import Client from "../../../index.js";
43
+ * import { Client } from "../../../index.js";
44
44
  *
45
45
  * const client = new Client({ token: process.env["API_TOKEN"]!! });
46
46
  * const res = await client.v1.faceSwapPhoto.generate(
@@ -61,7 +61,7 @@ class FaceSwapPhotoClient extends make_api_request_js_1.CoreResourceClient {
61
61
  * {
62
62
  * waitForCompletion: true,
63
63
  * downloadOutputs: true,
64
- * downloadDirectory: "outputs",
64
+ * downloadDirectory: ".",
65
65
  * },
66
66
  * );
67
67
  * ```
@@ -41,11 +41,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
41
41
  step((generator = generator.apply(thisArg, _arguments || [])).next());
42
42
  });
43
43
  };
44
- var __importDefault = (this && this.__importDefault) || function (mod) {
45
- return (mod && mod.__esModule) ? mod : { "default": mod };
46
- };
47
44
  Object.defineProperty(exports, "__esModule", { value: true });
48
- const magic_hour_1 = __importDefault(require("../../../index.js"));
45
+ const magic_hour_1 = require("../../../index.js");
49
46
  const fs = __importStar(require("fs"));
50
47
  const path = __importStar(require("path"));
51
48
  const stream_1 = require("stream");
@@ -91,7 +88,7 @@ afterEach(() => server.resetHandlers());
91
88
  describe("FilesClient.uploadFile", () => {
92
89
  let client;
93
90
  beforeEach(() => {
94
- client = new magic_hour_1.default({
91
+ client = new magic_hour_1.Client({
95
92
  token: "API_TOKEN",
96
93
  });
97
94
  // Reset all mocks
@@ -31,7 +31,7 @@ export declare class ImageBackgroundRemoverClient extends CoreResourceClient {
31
31
  *
32
32
  * @example
33
33
  * ```typescript
34
- * import Client from "../../../index.js";
34
+ * import { Client } from "../../../index.js";
35
35
  *
36
36
  * const client = new Client({ token: process.env["API_TOKEN"]!! });
37
37
  * const res = await client.v1.imageBackgroundRemover.generate(
@@ -45,7 +45,7 @@ export declare class ImageBackgroundRemoverClient extends CoreResourceClient {
45
45
  * {
46
46
  * waitForCompletion: true,
47
47
  * downloadOutputs: true,
48
- * downloadDirectory: "outputs",
48
+ * downloadDirectory: ".",
49
49
  * },
50
50
  * );
51
51
  * ```
@@ -40,7 +40,7 @@ class ImageBackgroundRemoverClient extends make_api_request_js_1.CoreResourceCli
40
40
  *
41
41
  * @example
42
42
  * ```typescript
43
- * import Client from "../../../index.js";
43
+ * import { Client } from "../../../index.js";
44
44
  *
45
45
  * const client = new Client({ token: process.env["API_TOKEN"]!! });
46
46
  * const res = await client.v1.imageBackgroundRemover.generate(
@@ -54,7 +54,7 @@ class ImageBackgroundRemoverClient extends make_api_request_js_1.CoreResourceCli
54
54
  * {
55
55
  * waitForCompletion: true,
56
56
  * downloadOutputs: true,
57
- * downloadDirectory: "outputs",
57
+ * downloadDirectory: ".",
58
58
  * },
59
59
  * );
60
60
  * ```
@@ -9,17 +9,29 @@ export type CreateRequest = {
9
9
  * Provide the assets for image-to-video. Sora 2 only supports images with an aspect ratio of `9:16` or `16:9`.
10
10
  */
11
11
  assets: V1ImageToVideoCreateBodyAssets;
12
+ /**
13
+ * Whether to include audio in the video. Defaults to `false` if not specified.
14
+ *
15
+ * Audio support varies by model:
16
+ * * **seedance**: Not supported
17
+ * * **kling-2.5**: Always included (cannot be disabled)
18
+ * * **kling-3.0**: Toggle-able (can enable/disable)
19
+ * * **sora-2**: Always included (cannot be disabled)
20
+ * * **veo3.1**: Toggle-able (can enable/disable)
21
+ * * **kling-1.6**: Not supported
22
+ */
23
+ audio?: boolean | undefined;
12
24
  /**
13
25
  * The total duration of the output video in seconds.
14
26
  *
15
27
  * Supported durations depend on the chosen model:
16
28
  * * **Default**: 5-60 seconds (2-12 seconds for 480p).
17
- * * **Seedance**: 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12
18
- * * **Kling 2.5 Audio**: 5, 10
19
- * * **Sora 2**: 4, 8, 12, 24, 36, 48, 60
20
- * * **Veo 3.1 Audio**: 4, 6, 8, 16, 24, 32, 40, 48, 56
21
- * * **Veo 3.1**: 4, 6, 8, 16, 24, 32, 40, 48, 56
22
- * * **Kling 1.6**: 5, 10, 15, 20, 25, 30, 35, 40, 45, 50, 55, 60
29
+ * * **seedance**: 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12
30
+ * * **kling-2.5**: 5, 10
31
+ * * **kling-3.0**: 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15
32
+ * * **sora-2**: 4, 8, 12, 24, 36, 48, 60
33
+ * * **veo3.1**: 4, 6, 8, 16, 24, 32, 40, 48, 56
34
+ * * **kling-1.6**: 5, 10, 15, 20, 25, 30, 35, 40, 45, 50, 55, 60
23
35
  */
24
36
  endSeconds: number;
25
37
  /**
@@ -36,13 +48,13 @@ export type CreateRequest = {
36
48
  * The AI model to use for video generation.
37
49
  * * `default`: Our recommended model for general use (Kling 2.5 Audio). Note: For backward compatibility, if you use default and end_seconds > 10, we'll fall back to Kling 1.6.
38
50
  * * `seedance`: Great for fast iteration and start/end frame
39
- * * `kling-2.5-audio`: Great for motion, action, and camera control
51
+ * * `kling-2.5`: Great for motion, action, and camera control
52
+ * * `kling-3.0`: Great for cinematic, multi-scene storytelling with control
40
53
  * * `sora-2`: Great for story-telling, dialogue & creativity
41
- * * `veo3.1-audio`: Great for dialogue + SFX generated natively
42
54
  * * `veo3.1`: Great for realism, polish, & prompt adherence
43
55
  * * `kling-1.6`: Great for dependable clips with smooth motion
44
56
  */
45
- model?: ("default" | "kling-1.6" | "kling-2.5-audio" | "seedance" | "sora-2" | "veo3.1" | "veo3.1-audio") | undefined;
57
+ model?: ("default" | "kling-1.6" | "kling-2.5" | "kling-2.5-audio" | "kling-3.0" | "seedance" | "sora-2" | "veo3.1" | "veo3.1-audio") | undefined;
46
58
  /**
47
59
  * Give your video a custom name for easy identification.
48
60
  */
@@ -51,12 +63,12 @@ export type CreateRequest = {
51
63
  * Controls the output video resolution. Defaults to `720p` if not specified.
52
64
  *
53
65
  * * **Default**: Supports `480p`, `720p`, and `1080p`.
54
- * * **Seedance**: Supports `480p`, `720p`, `1080p`.
55
- * * **Kling 2.5 Audio**: Supports `720p`, `1080p`.
56
- * * **Sora 2**: Supports `720p`.
57
- * * **Veo 3.1 Audio**: Supports `720p`, `1080p`.
58
- * * **Veo 3.1**: Supports `720p`, `1080p`.
59
- * * **Kling 1.6**: Supports `720p`, `1080p`.
66
+ * * **seedance**: Supports `480p`, `720p`, `1080p`.
67
+ * * **kling-2.5**: Supports `720p`, `1080p`.
68
+ * * **kling-3.0**: Supports `720p`, `1080p`.
69
+ * * **sora-2**: Supports `720p`.
70
+ * * **veo3.1**: Supports `720p`, `1080p`.
71
+ * * **kling-1.6**: Supports `720p`, `1080p`.
60
72
  */
61
73
  resolution?: ("1080p" | "480p" | "720p") | undefined;
62
74
  /**
@@ -81,9 +93,10 @@ export type CreateRequest = {
81
93
  */
82
94
  export type External$CreateRequest = {
83
95
  assets: External$V1ImageToVideoCreateBodyAssets;
96
+ audio?: boolean | undefined;
84
97
  end_seconds: number;
85
98
  height?: number | null | undefined;
86
- model?: ("default" | "kling-1.6" | "kling-2.5-audio" | "seedance" | "sora-2" | "veo3.1" | "veo3.1-audio") | undefined;
99
+ model?: ("default" | "kling-1.6" | "kling-2.5" | "kling-2.5-audio" | "kling-3.0" | "seedance" | "sora-2" | "veo3.1" | "veo3.1-audio") | undefined;
87
100
  name?: string | undefined;
88
101
  resolution?: ("1080p" | "480p" | "720p") | undefined;
89
102
  style?: External$V1ImageToVideoCreateBodyStyle | undefined;
@@ -44,13 +44,16 @@ const v1_image_to_video_create_body_style_1 = require("../../../types/v1-image-t
44
44
  const SchemaIn$CreateRequest = z
45
45
  .object({
46
46
  assets: v1_image_to_video_create_body_assets_1.Schemas$V1ImageToVideoCreateBodyAssets.in,
47
+ audio: z.boolean().optional(),
47
48
  end_seconds: z.number(),
48
49
  height: z.number().int().nullable().optional(),
49
50
  model: z
50
51
  .enum([
51
52
  "default",
52
53
  "kling-1.6",
54
+ "kling-2.5",
53
55
  "kling-2.5-audio",
56
+ "kling-3.0",
54
57
  "seedance",
55
58
  "sora-2",
56
59
  "veo3.1",
@@ -65,6 +68,7 @@ const SchemaIn$CreateRequest = z
65
68
  .transform((obj) => {
66
69
  return (0, make_api_request_js_1.zodTransform)(obj, {
67
70
  assets: "assets",
71
+ audio: "audio",
68
72
  end_seconds: "endSeconds",
69
73
  height: "height",
70
74
  model: "model",
@@ -81,13 +85,16 @@ const SchemaIn$CreateRequest = z
81
85
  const SchemaOut$CreateRequest = z
82
86
  .object({
83
87
  assets: v1_image_to_video_create_body_assets_1.Schemas$V1ImageToVideoCreateBodyAssets.out,
88
+ audio: z.boolean().optional(),
84
89
  endSeconds: z.number(),
85
90
  height: z.number().int().nullable().optional(),
86
91
  model: z
87
92
  .enum([
88
93
  "default",
89
94
  "kling-1.6",
95
+ "kling-2.5",
90
96
  "kling-2.5-audio",
97
+ "kling-3.0",
91
98
  "seedance",
92
99
  "sora-2",
93
100
  "veo3.1",
@@ -102,6 +109,7 @@ const SchemaOut$CreateRequest = z
102
109
  .transform((obj) => {
103
110
  return (0, make_api_request_js_1.zodTransform)(obj, {
104
111
  assets: "assets",
112
+ audio: "audio",
105
113
  endSeconds: "end_seconds",
106
114
  height: "height",
107
115
  model: "model",
@@ -23,7 +23,7 @@ export declare class ImageToVideoClient extends CoreResourceClient {
23
23
  *
24
24
  * @example
25
25
  * ```typescript
26
- * import Client from "../../../index.js";
26
+ * import { Client } from "../../../index.js";
27
27
  *
28
28
  * const client = new Client({ token: process.env["API_TOKEN"]!! });
29
29
  * const res = await client.v1.imageToVideo.generate(
@@ -36,7 +36,7 @@ export declare class ImageToVideoClient extends CoreResourceClient {
36
36
  * {
37
37
  * waitForCompletion: true,
38
38
  * downloadOutputs: true,
39
- * downloadDirectory: "outputs",
39
+ * downloadDirectory: ".",
40
40
  * },
41
41
  * );
42
42
  * ```
@@ -40,7 +40,7 @@ class ImageToVideoClient extends make_api_request_js_1.CoreResourceClient {
40
40
  *
41
41
  * @example
42
42
  * ```typescript
43
- * import Client from "../../../index.js";
43
+ * import { Client } from "../../../index.js";
44
44
  *
45
45
  * const client = new Client({ token: process.env["API_TOKEN"]!! });
46
46
  * const res = await client.v1.imageToVideo.generate(
@@ -53,7 +53,7 @@ class ImageToVideoClient extends make_api_request_js_1.CoreResourceClient {
53
53
  * {
54
54
  * waitForCompletion: true,
55
55
  * downloadOutputs: true,
56
- * downloadDirectory: "outputs",
56
+ * downloadDirectory: ".",
57
57
  * },
58
58
  * );
59
59
  * ```
@@ -31,7 +31,7 @@ export declare class LipSyncClient extends CoreResourceClient {
31
31
  *
32
32
  * @example
33
33
  * ```typescript
34
- * import Client from "../../../index.js";
34
+ * import { Client } from "../../../index.js";
35
35
  *
36
36
  * const client = new Client({ token: process.env["API_TOKEN"]!! });
37
37
  * const res = await client.v1.lipSync.generate(
@@ -49,7 +49,7 @@ export declare class LipSyncClient extends CoreResourceClient {
49
49
  * {
50
50
  * waitForCompletion: true,
51
51
  * downloadOutputs: true,
52
- * downloadDirectory: "outputs",
52
+ * downloadDirectory: ".",
53
53
  * },
54
54
  * );
55
55
  * ```
@@ -40,7 +40,7 @@ class LipSyncClient extends make_api_request_js_1.CoreResourceClient {
40
40
  *
41
41
  * @example
42
42
  * ```typescript
43
- * import Client from "../../../index.js";
43
+ * import { Client } from "../../../index.js";
44
44
  *
45
45
  * const client = new Client({ token: process.env["API_TOKEN"]!! });
46
46
  * const res = await client.v1.lipSync.generate(
@@ -58,7 +58,7 @@ class LipSyncClient extends make_api_request_js_1.CoreResourceClient {
58
58
  * {
59
59
  * waitForCompletion: true,
60
60
  * downloadOutputs: true,
61
- * downloadDirectory: "outputs",
61
+ * downloadDirectory: ".",
62
62
  * },
63
63
  * );
64
64
  * ```
@@ -23,7 +23,7 @@ export declare class PhotoColorizerClient extends CoreResourceClient {
23
23
  *
24
24
  * @example
25
25
  * ```typescript
26
- * import Client from "../../../index.js";
26
+ * import { Client } from "../../../index.js";
27
27
  *
28
28
  * const client = new Client({ token: process.env["API_TOKEN"]!! });
29
29
  * const res = await client.v1.photoColorizer.generate(
@@ -34,7 +34,7 @@ export declare class PhotoColorizerClient extends CoreResourceClient {
34
34
  * {
35
35
  * waitForCompletion: true,
36
36
  * downloadOutputs: true,
37
- * downloadDirectory: "outputs",
37
+ * downloadDirectory: ".",
38
38
  * },
39
39
  * );
40
40
  * ```
@@ -40,7 +40,7 @@ class PhotoColorizerClient extends make_api_request_js_1.CoreResourceClient {
40
40
  *
41
41
  * @example
42
42
  * ```typescript
43
- * import Client from "../../../index.js";
43
+ * import { Client } from "../../../index.js";
44
44
  *
45
45
  * const client = new Client({ token: process.env["API_TOKEN"]!! });
46
46
  * const res = await client.v1.photoColorizer.generate(
@@ -51,7 +51,7 @@ class PhotoColorizerClient extends make_api_request_js_1.CoreResourceClient {
51
51
  * {
52
52
  * waitForCompletion: true,
53
53
  * downloadOutputs: true,
54
- * downloadDirectory: "outputs",
54
+ * downloadDirectory: ".",
55
55
  * },
56
56
  * );
57
57
  * ```
@@ -6,38 +6,50 @@ import { External$V1TextToVideoCreateBodyStyle, V1TextToVideoCreateBodyStyle } f
6
6
  export type CreateRequest = {
7
7
  /**
8
8
  * Determines the aspect ratio of the output video.
9
- * * **Seedance**: Supports `9:16`, `16:9`, `1:1`.
10
- * * **Kling 2.5 Audio**: Supports `9:16`, `16:9`, `1:1`.
11
- * * **Sora 2**: Supports `9:16`, `16:9`.
12
- * * **Veo 3.1 Audio**: Supports `9:16`, `16:9`.
13
- * * **Veo 3.1**: Supports `9:16`, `16:9`.
14
- * * **Kling 1.6**: Supports `9:16`, `16:9`, `1:1`.
9
+ * * **seedance**: Supports `9:16`, `16:9`, `1:1`.
10
+ * * **kling-2.5**: Supports `9:16`, `16:9`, `1:1`.
11
+ * * **kling-3.0**: Supports `9:16`, `16:9`, `1:1`.
12
+ * * **sora-2**: Supports `9:16`, `16:9`.
13
+ * * **veo3.1**: Supports `9:16`, `16:9`.
14
+ * * **kling-1.6**: Supports `9:16`, `16:9`, `1:1`.
15
15
  */
16
16
  aspectRatio?: ("16:9" | "1:1" | "9:16") | undefined;
17
+ /**
18
+ * Whether to include audio in the video. Defaults to `false` if not specified.
19
+ *
20
+ * Audio support varies by model:
21
+ * * **seedance**: Not supported
22
+ * * **kling-2.5**: Always included (cannot be disabled)
23
+ * * **kling-3.0**: Toggle-able (can enable/disable)
24
+ * * **sora-2**: Always included (cannot be disabled)
25
+ * * **veo3.1**: Toggle-able (can enable/disable)
26
+ * * **kling-1.6**: Not supported
27
+ */
28
+ audio?: boolean | undefined;
17
29
  /**
18
30
  * The total duration of the output video in seconds.
19
31
  *
20
32
  * Supported durations depend on the chosen model:
21
33
  * * **Default**: 5-60 seconds (2-12 seconds for 480p).
22
- * * **Seedance**: 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12
23
- * * **Kling 2.5 Audio**: 5, 10
24
- * * **Sora 2**: 4, 8, 12, 24, 36, 48, 60
25
- * * **Veo 3.1 Audio**: 4, 6, 8, 16, 24, 32, 40, 48, 56
26
- * * **Veo 3.1**: 4, 6, 8, 16, 24, 32, 40, 48, 56
27
- * * **Kling 1.6**: 5, 10, 15, 20, 25, 30, 35, 40, 45, 50, 55, 60
34
+ * * **seedance**: 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12
35
+ * * **kling-2.5**: 5, 10
36
+ * * **kling-3.0**: 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15
37
+ * * **sora-2**: 4, 8, 12, 24, 36, 48, 60
38
+ * * **veo3.1**: 4, 6, 8, 16, 24, 32, 40, 48, 56
39
+ * * **kling-1.6**: 5, 10, 15, 20, 25, 30, 35, 40, 45, 50, 55, 60
28
40
  */
29
41
  endSeconds: number;
30
42
  /**
31
43
  * The AI model to use for video generation.
32
44
  * * `default`: Our recommended model for general use (Kling 2.5 Audio). Note: For backward compatibility, if you use default and end_seconds > 10, we'll fall back to Kling 1.6.
33
45
  * * `seedance`: Great for fast iteration and start/end frame
34
- * * `kling-2.5-audio`: Great for motion, action, and camera control
46
+ * * `kling-2.5`: Great for motion, action, and camera control
47
+ * * `kling-3.0`: Great for cinematic, multi-scene storytelling with control
35
48
  * * `sora-2`: Great for story-telling, dialogue & creativity
36
- * * `veo3.1-audio`: Great for dialogue + SFX generated natively
37
49
  * * `veo3.1`: Great for realism, polish, & prompt adherence
38
50
  * * `kling-1.6`: Great for dependable clips with smooth motion
39
51
  */
40
- model?: ("default" | "kling-1.6" | "kling-2.5-audio" | "seedance" | "sora-2" | "veo3.1" | "veo3.1-audio") | undefined;
52
+ model?: ("default" | "kling-1.6" | "kling-2.5" | "kling-2.5-audio" | "kling-3.0" | "seedance" | "sora-2" | "veo3.1" | "veo3.1-audio") | undefined;
41
53
  /**
42
54
  * Give your video a custom name for easy identification.
43
55
  */
@@ -50,12 +62,12 @@ export type CreateRequest = {
50
62
  * Controls the output video resolution. Defaults to `720p` if not specified.
51
63
  *
52
64
  * * **Default**: Supports `480p`, `720p`, and `1080p`.
53
- * * **Seedance**: Supports `480p`, `720p`, `1080p`.
54
- * * **Kling 2.5 Audio**: Supports `720p`, `1080p`.
55
- * * **Sora 2**: Supports `720p`.
56
- * * **Veo 3.1 Audio**: Supports `720p`, `1080p`.
57
- * * **Veo 3.1**: Supports `720p`, `1080p`.
58
- * * **Kling 1.6**: Supports `720p`, `1080p`.
65
+ * * **seedance**: Supports `480p`, `720p`, `1080p`.
66
+ * * **kling-2.5**: Supports `720p`, `1080p`.
67
+ * * **kling-3.0**: Supports `720p`, `1080p`.
68
+ * * **sora-2**: Supports `720p`.
69
+ * * **veo3.1**: Supports `720p`, `1080p`.
70
+ * * **kling-1.6**: Supports `720p`, `1080p`.
59
71
  */
60
72
  resolution?: ("1080p" | "480p" | "720p") | undefined;
61
73
  style: V1TextToVideoCreateBodyStyle;
@@ -67,8 +79,9 @@ export type CreateRequest = {
67
79
  */
68
80
  export type External$CreateRequest = {
69
81
  aspect_ratio?: ("16:9" | "1:1" | "9:16") | undefined;
82
+ audio?: boolean | undefined;
70
83
  end_seconds: number;
71
- model?: ("default" | "kling-1.6" | "kling-2.5-audio" | "seedance" | "sora-2" | "veo3.1" | "veo3.1-audio") | undefined;
84
+ model?: ("default" | "kling-1.6" | "kling-2.5" | "kling-2.5-audio" | "kling-3.0" | "seedance" | "sora-2" | "veo3.1" | "veo3.1-audio") | undefined;
72
85
  name?: string | undefined;
73
86
  orientation?: ("landscape" | "portrait" | "square") | undefined;
74
87
  resolution?: ("1080p" | "480p" | "720p") | undefined;
@@ -43,12 +43,15 @@ const v1_text_to_video_create_body_style_1 = require("../../../types/v1-text-to-
43
43
  const SchemaIn$CreateRequest = z
44
44
  .object({
45
45
  aspect_ratio: z.enum(["16:9", "1:1", "9:16"]).optional(),
46
+ audio: z.boolean().optional(),
46
47
  end_seconds: z.number(),
47
48
  model: z
48
49
  .enum([
49
50
  "default",
50
51
  "kling-1.6",
52
+ "kling-2.5",
51
53
  "kling-2.5-audio",
54
+ "kling-3.0",
52
55
  "seedance",
53
56
  "sora-2",
54
57
  "veo3.1",
@@ -63,6 +66,7 @@ const SchemaIn$CreateRequest = z
63
66
  .transform((obj) => {
64
67
  return (0, make_api_request_js_1.zodTransform)(obj, {
65
68
  aspect_ratio: "aspectRatio",
69
+ audio: "audio",
66
70
  end_seconds: "endSeconds",
67
71
  model: "model",
68
72
  name: "name",
@@ -78,12 +82,15 @@ const SchemaIn$CreateRequest = z
78
82
  const SchemaOut$CreateRequest = z
79
83
  .object({
80
84
  aspectRatio: z.enum(["16:9", "1:1", "9:16"]).optional(),
85
+ audio: z.boolean().optional(),
81
86
  endSeconds: z.number(),
82
87
  model: z
83
88
  .enum([
84
89
  "default",
85
90
  "kling-1.6",
91
+ "kling-2.5",
86
92
  "kling-2.5-audio",
93
+ "kling-3.0",
87
94
  "seedance",
88
95
  "sora-2",
89
96
  "veo3.1",
@@ -98,6 +105,7 @@ const SchemaOut$CreateRequest = z
98
105
  .transform((obj) => {
99
106
  return (0, make_api_request_js_1.zodTransform)(obj, {
100
107
  aspectRatio: "aspect_ratio",
108
+ audio: "audio",
101
109
  endSeconds: "end_seconds",
102
110
  model: "model",
103
111
  name: "name",
@@ -14,7 +14,7 @@ export declare class TextToVideoClient extends CoreResourceClient {
14
14
  *
15
15
  * @example
16
16
  * ```typescript
17
- * import Client from "../../../index.js";
17
+ * import { Client } from "../../../index.js";
18
18
  *
19
19
  * const client = new Client({ token: process.env["API_TOKEN"]!! });
20
20
  * const res = await client.v1.textToVideo.generate(
@@ -28,7 +28,7 @@ export declare class TextToVideoClient extends CoreResourceClient {
28
28
  * {
29
29
  * waitForCompletion: true,
30
30
  * downloadOutputs: true,
31
- * downloadDirectory: "outputs",
31
+ * downloadDirectory: ".",
32
32
  * },
33
33
  * );
34
34
  * ```
@@ -39,7 +39,7 @@ class TextToVideoClient extends make_api_request_js_1.CoreResourceClient {
39
39
  *
40
40
  * @example
41
41
  * ```typescript
42
- * import Client from "../../../index.js";
42
+ * import { Client } from "../../../index.js";
43
43
  *
44
44
  * const client = new Client({ token: process.env["API_TOKEN"]!! });
45
45
  * const res = await client.v1.textToVideo.generate(
@@ -53,7 +53,7 @@ class TextToVideoClient extends make_api_request_js_1.CoreResourceClient {
53
53
  * {
54
54
  * waitForCompletion: true,
55
55
  * downloadOutputs: true,
56
- * downloadDirectory: "outputs",
56
+ * downloadDirectory: ".",
57
57
  * },
58
58
  * );
59
59
  * ```
@@ -23,7 +23,7 @@ export declare class VideoToVideoClient extends CoreResourceClient {
23
23
  *
24
24
  * @example
25
25
  * ```typescript
26
- * import Client from "../../../index.js";
26
+ * import { Client } from "../../../index.js";
27
27
  *
28
28
  * const client = new Client({ token: process.env["API_TOKEN"]!! });
29
29
  * const res = await client.v1.videoToVideo.generate(
@@ -44,7 +44,7 @@ export declare class VideoToVideoClient extends CoreResourceClient {
44
44
  * {
45
45
  * waitForCompletion: true,
46
46
  * downloadOutputs: true,
47
- * downloadDirectory: "outputs",
47
+ * downloadDirectory: ".",
48
48
  * },
49
49
  * );
50
50
  * ```
@@ -40,7 +40,7 @@ class VideoToVideoClient extends make_api_request_js_1.CoreResourceClient {
40
40
  *
41
41
  * @example
42
42
  * ```typescript
43
- * import Client from "../../../index.js";
43
+ * import { Client } from "../../../index.js";
44
44
  *
45
45
  * const client = new Client({ token: process.env["API_TOKEN"]!! });
46
46
  * const res = await client.v1.videoToVideo.generate(
@@ -61,7 +61,7 @@ class VideoToVideoClient extends make_api_request_js_1.CoreResourceClient {
61
61
  * {
62
62
  * waitForCompletion: true,
63
63
  * downloadOutputs: true,
64
- * downloadDirectory: "outputs",
64
+ * downloadDirectory: ".",
65
65
  * },
66
66
  * );
67
67
  * ```
@@ -2,10 +2,10 @@
2
2
  * The AI model to use for video generation.
3
3
  * * `default`: Our recommended model for general use (Kling 2.5 Audio). Note: For backward compatibility, if you use default and end_seconds > 10, we'll fall back to Kling 1.6.
4
4
  * * `seedance`: Great for fast iteration and start/end frame
5
- * * `kling-2.5-audio`: Great for motion, action, and camera control
5
+ * * `kling-2.5`: Great for motion, action, and camera control
6
+ * * `kling-3.0`: Great for cinematic, multi-scene storytelling with control
6
7
  * * `sora-2`: Great for story-telling, dialogue & creativity
7
- * * `veo3.1-audio`: Great for dialogue + SFX generated natively
8
8
  * * `veo3.1`: Great for realism, polish, & prompt adherence
9
9
  * * `kling-1.6`: Great for dependable clips with smooth motion
10
10
  */
11
- export type V1ImageToVideoCreateBodyModelEnum = "default" | "kling-1.6" | "kling-2.5-audio" | "seedance" | "sora-2" | "veo3.1" | "veo3.1-audio";
11
+ export type V1ImageToVideoCreateBodyModelEnum = "default" | "kling-1.6" | "kling-2.5" | "kling-2.5-audio" | "kling-3.0" | "seedance" | "sora-2" | "veo3.1" | "veo3.1-audio";
@@ -2,11 +2,11 @@
2
2
  * Controls the output video resolution. Defaults to `720p` if not specified.
3
3
  *
4
4
  * * **Default**: Supports `480p`, `720p`, and `1080p`.
5
- * * **Seedance**: Supports `480p`, `720p`, `1080p`.
6
- * * **Kling 2.5 Audio**: Supports `720p`, `1080p`.
7
- * * **Sora 2**: Supports `720p`.
8
- * * **Veo 3.1 Audio**: Supports `720p`, `1080p`.
9
- * * **Veo 3.1**: Supports `720p`, `1080p`.
10
- * * **Kling 1.6**: Supports `720p`, `1080p`.
5
+ * * **seedance**: Supports `480p`, `720p`, `1080p`.
6
+ * * **kling-2.5**: Supports `720p`, `1080p`.
7
+ * * **kling-3.0**: Supports `720p`, `1080p`.
8
+ * * **sora-2**: Supports `720p`.
9
+ * * **veo3.1**: Supports `720p`, `1080p`.
10
+ * * **kling-1.6**: Supports `720p`, `1080p`.
11
11
  */
12
12
  export type V1ImageToVideoCreateBodyResolutionEnum = "1080p" | "480p" | "720p";