magic-hour 0.46.0 → 0.48.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 (74) hide show
  1. package/dist/environment.d.ts +1 -1
  2. package/dist/environment.js +1 -1
  3. package/dist/resources/v1/ai-image-editor/resource-client.d.ts +1 -1
  4. package/dist/resources/v1/ai-image-editor/resource-client.js +1 -1
  5. package/dist/resources/v1/ai-image-generator/request-types.d.ts +48 -4
  6. package/dist/resources/v1/ai-image-generator/request-types.js +30 -2
  7. package/dist/resources/v1/ai-image-generator/resource-client.d.ts +1 -1
  8. package/dist/resources/v1/ai-image-generator/resource-client.js +1 -1
  9. package/dist/resources/v1/image-to-video/request-types.d.ts +29 -7
  10. package/dist/resources/v1/image-to-video/request-types.js +24 -0
  11. package/dist/resources/v1/text-to-video/request-types.d.ts +41 -12
  12. package/dist/resources/v1/text-to-video/request-types.js +30 -2
  13. package/dist/types/index.d.ts +6 -0
  14. package/dist/types/v1-ai-image-editor-create-body-style-model-enum.d.ts +2 -1
  15. package/dist/types/v1-ai-image-editor-create-body-style.d.ts +2 -1
  16. package/dist/types/v1-ai-image-generator-create-body-aspect-ratio-enum.d.ts +4 -0
  17. package/dist/types/v1-ai-image-generator-create-body-aspect-ratio-enum.js +2 -0
  18. package/dist/types/v1-ai-image-generator-create-body-model-enum.d.ts +24 -0
  19. package/dist/types/v1-ai-image-generator-create-body-model-enum.js +2 -0
  20. package/dist/types/v1-ai-image-generator-create-body-orientation-enum.d.ts +3 -1
  21. package/dist/types/v1-ai-image-generator-create-body-resolution-enum.d.ts +11 -0
  22. package/dist/types/v1-ai-image-generator-create-body-resolution-enum.js +2 -0
  23. package/dist/types/v1-ai-image-generator-create-body-style-quality-mode-enum.d.ts +5 -5
  24. package/dist/types/v1-ai-image-generator-create-body-style.d.ts +5 -5
  25. package/dist/types/v1-ai-image-generator-create-body.d.ts +48 -4
  26. package/dist/types/v1-ai-image-generator-create-body.js +30 -2
  27. package/dist/types/v1-ai-talking-photo-create-body-style-generation-mode-enum.d.ts +8 -5
  28. package/dist/types/v1-ai-talking-photo-create-body-style.d.ts +15 -6
  29. package/dist/types/v1-ai-talking-photo-create-body-style.js +20 -2
  30. package/dist/types/v1-image-projects-get-response.d.ts +1 -1
  31. package/dist/types/v1-image-to-video-create-body-assets.d.ts +1 -1
  32. package/dist/types/v1-image-to-video-create-body-model-enum.d.ts +11 -0
  33. package/dist/types/v1-image-to-video-create-body-model-enum.js +2 -0
  34. package/dist/types/v1-image-to-video-create-body-resolution-enum.d.ts +7 -6
  35. package/dist/types/v1-image-to-video-create-body.d.ts +29 -7
  36. package/dist/types/v1-image-to-video-create-body.js +24 -0
  37. package/dist/types/v1-text-to-video-create-body-aspect-ratio-enum.d.ts +10 -0
  38. package/dist/types/v1-text-to-video-create-body-aspect-ratio-enum.js +2 -0
  39. package/dist/types/v1-text-to-video-create-body-model-enum.d.ts +11 -0
  40. package/dist/types/v1-text-to-video-create-body-model-enum.js +2 -0
  41. package/dist/types/v1-text-to-video-create-body-orientation-enum.d.ts +1 -1
  42. package/dist/types/v1-text-to-video-create-body-resolution-enum.d.ts +7 -6
  43. package/dist/types/v1-text-to-video-create-body.d.ts +41 -12
  44. package/dist/types/v1-text-to-video-create-body.js +30 -2
  45. package/dist/types/v1-video-projects-get-response.d.ts +1 -1
  46. package/package.json +1 -1
  47. package/dist/core/api-error.d.ts +0 -6
  48. package/dist/core/api-error.js +0 -11
  49. package/dist/core/api-promise.d.ts +0 -28
  50. package/dist/core/api-promise.js +0 -252
  51. package/dist/core/auth.d.ts +0 -76
  52. package/dist/core/auth.js +0 -232
  53. package/dist/core/binary-response.d.ts +0 -6
  54. package/dist/core/binary-response.js +0 -10
  55. package/dist/core/content-type.d.ts +0 -4
  56. package/dist/core/content-type.js +0 -12
  57. package/dist/core/core-client.d.ts +0 -58
  58. package/dist/core/core-client.js +0 -168
  59. package/dist/core/form-data.d.ts +0 -26
  60. package/dist/core/form-data.js +0 -83
  61. package/dist/core/index.d.ts +0 -9
  62. package/dist/core/index.js +0 -28
  63. package/dist/core/logger.d.ts +0 -48
  64. package/dist/core/logger.js +0 -82
  65. package/dist/core/query.d.ts +0 -8
  66. package/dist/core/query.js +0 -77
  67. package/dist/core/runtime.d.ts +0 -4
  68. package/dist/core/runtime.js +0 -20
  69. package/dist/core/zod.d.ts +0 -13
  70. package/dist/core/zod.js +0 -60
  71. package/dist/examples/logging-example.d.ts +0 -10
  72. package/dist/examples/logging-example.js +0 -137
  73. package/dist/logging-client.d.ts +0 -39
  74. package/dist/logging-client.js +0 -116
@@ -5,17 +5,58 @@ import { External$V1AiImageGeneratorCreateBodyStyle, V1AiImageGeneratorCreateBod
5
5
  */
6
6
  export type V1AiImageGeneratorCreateBody = {
7
7
  /**
8
- * Number of images to generate.
8
+ * The aspect ratio of the output image(s). If not specified, defaults to `1:1` (square).
9
+ */
10
+ aspectRatio?: ("16:9" | "1:1" | "9:16") | undefined;
11
+ /**
12
+ * Number of images to generate. Maximum varies by model.
9
13
  */
10
14
  imageCount: number;
15
+ /**
16
+ * The AI model to use for image generation. Each model has different capabilities and costs.
17
+ *
18
+ * **Models:**
19
+ * - `default` - Use the model we recommend, which will change over time. This is recommended unless you need a specific model. This is the default behavior.
20
+ * - `flux-schnell` - 5 credits/image
21
+ * - Supported resolutions: auto
22
+ * - Available for tiers: free, creator, pro, business
23
+ * - Image count allowed: 1, 2, 3, 4
24
+ * - `z-image-turbo` - 5 credits/image
25
+ * - Supported resolutions: auto, 2k
26
+ * - Available for tiers: free, creator, pro, business
27
+ * - Image count allowed: 1, 2, 3, 4
28
+ * - `seedream` - 30 credits/image
29
+ * - Supported resolutions: auto, 2k, 4k
30
+ * - Available for tiers: free, creator, pro, business
31
+ * - Image count allowed: 1, 2, 3, 4
32
+ * - `nano-banana-pro` - 150 credits/image
33
+ * - Supported resolutions: auto
34
+ * - Available for tiers: creator, pro, business
35
+ * - Image count allowed: 1, 4, 9, 16
36
+ *
37
+ */
38
+ model?: ("default" | "flux-schnell" | "nano-banana-pro" | "seedream" | "z-image-turbo") | undefined;
11
39
  /**
12
40
  * Give your image a custom name for easy identification.
13
41
  */
14
42
  name?: string | undefined;
15
43
  /**
16
- * The orientation of the output image(s).
44
+ * DEPRECATED: Use `aspect_ratio` instead.
45
+ *
46
+ * The orientation of the output image(s). `aspect_ratio` takes precedence when `orientation` if both are provided.
47
+ */
48
+ orientation?: ("landscape" | "portrait" | "square") | undefined;
49
+ /**
50
+ * Maximum resolution for the generated image.
51
+ *
52
+ * **Options:**
53
+ * - `auto` - Automatic resolution (all tiers, default)
54
+ * - `2k` - Up to 2048px (requires Pro or Business tier)
55
+ * - `4k` - Up to 4096px (requires Business tier)
56
+ *
57
+ * Note: Resolution availability depends on the model and your subscription tier. See `model` field for which resolutions each model supports. Defaults to `auto` if not specified.
17
58
  */
18
- orientation: "landscape" | "portrait" | "square";
59
+ resolution?: ("2k" | "4k" | "auto") | undefined;
19
60
  /**
20
61
  * The art style to use for image generation.
21
62
  */
@@ -27,9 +68,12 @@ export type V1AiImageGeneratorCreateBody = {
27
68
  * we expect to come in as network data
28
69
  */
29
70
  export type External$V1AiImageGeneratorCreateBody = {
71
+ aspect_ratio?: ("16:9" | "1:1" | "9:16") | undefined;
30
72
  image_count: number;
73
+ model?: ("default" | "flux-schnell" | "nano-banana-pro" | "seedream" | "z-image-turbo") | undefined;
31
74
  name?: string | undefined;
32
- orientation: "landscape" | "portrait" | "square";
75
+ orientation?: ("landscape" | "portrait" | "square") | undefined;
76
+ resolution?: ("2k" | "4k" | "auto") | undefined;
33
77
  style: External$V1AiImageGeneratorCreateBodyStyle;
34
78
  };
35
79
  export declare const Schemas$V1AiImageGeneratorCreateBody: {
@@ -42,16 +42,30 @@ const v1_ai_image_generator_create_body_style_1 = require("./v1-ai-image-generat
42
42
  */
43
43
  const SchemaIn$V1AiImageGeneratorCreateBody = z
44
44
  .object({
45
+ aspect_ratio: z.enum(["16:9", "1:1", "9:16"]).optional(),
45
46
  image_count: z.number().int(),
47
+ model: z
48
+ .enum([
49
+ "default",
50
+ "flux-schnell",
51
+ "nano-banana-pro",
52
+ "seedream",
53
+ "z-image-turbo",
54
+ ])
55
+ .optional(),
46
56
  name: z.string().optional(),
47
- orientation: z.enum(["landscape", "portrait", "square"]),
57
+ orientation: z.enum(["landscape", "portrait", "square"]).optional(),
58
+ resolution: z.enum(["2k", "4k", "auto"]).optional(),
48
59
  style: v1_ai_image_generator_create_body_style_1.Schemas$V1AiImageGeneratorCreateBodyStyle.in,
49
60
  })
50
61
  .transform((obj) => {
51
62
  return (0, make_api_request_js_1.zodTransform)(obj, {
63
+ aspect_ratio: "aspectRatio",
52
64
  image_count: "imageCount",
65
+ model: "model",
53
66
  name: "name",
54
67
  orientation: "orientation",
68
+ resolution: "resolution",
55
69
  style: "style",
56
70
  });
57
71
  });
@@ -61,16 +75,30 @@ const SchemaIn$V1AiImageGeneratorCreateBody = z
61
75
  */
62
76
  const SchemaOut$V1AiImageGeneratorCreateBody = z
63
77
  .object({
78
+ aspectRatio: z.enum(["16:9", "1:1", "9:16"]).optional(),
64
79
  imageCount: z.number().int(),
80
+ model: z
81
+ .enum([
82
+ "default",
83
+ "flux-schnell",
84
+ "nano-banana-pro",
85
+ "seedream",
86
+ "z-image-turbo",
87
+ ])
88
+ .optional(),
65
89
  name: z.string().optional(),
66
- orientation: z.enum(["landscape", "portrait", "square"]),
90
+ orientation: z.enum(["landscape", "portrait", "square"]).optional(),
91
+ resolution: z.enum(["2k", "4k", "auto"]).optional(),
67
92
  style: v1_ai_image_generator_create_body_style_1.Schemas$V1AiImageGeneratorCreateBodyStyle.out,
68
93
  })
69
94
  .transform((obj) => {
70
95
  return (0, make_api_request_js_1.zodTransform)(obj, {
96
+ aspectRatio: "aspect_ratio",
71
97
  imageCount: "image_count",
98
+ model: "model",
72
99
  name: "name",
73
100
  orientation: "orientation",
101
+ resolution: "resolution",
74
102
  style: "style",
75
103
  });
76
104
  });
@@ -1,9 +1,12 @@
1
1
  /**
2
2
  * Controls overall motion style.
3
- * * `pro` - Higher fidelity, realistic detail, accurate lip sync, and faster generation.
4
- * * `standard` - More expressive motion, but lower visual fidelity.
3
+ * * `realistic` - Maintains likeness well, high quality, and reliable.
4
+ * * `prompted` - Slightly lower likeness; allows option to prompt scene.
5
5
  *
6
- * * `expressive` - More motion and facial expressiveness; may introduce visual artifacts. (Deprecated: passing this value will be treated as `standard`)
7
- * * `stable` - Reduced motion for cleaner output; may result in minimal animation. (Deprecated: passing this value will be treated as `pro`)
6
+ * **Deprecated values (maintained for backward compatibility):**
7
+ * * `pro` - Deprecated: use `realistic`
8
+ * * `standard` - Deprecated: use `prompted`
9
+ * * `stable` - Deprecated: use `realistic`
10
+ * * `expressive` - Deprecated: use `prompted`
8
11
  */
9
- export type V1AiTalkingPhotoCreateBodyStyleGenerationModeEnum = "expressive" | "pro" | "stable" | "standard";
12
+ export type V1AiTalkingPhotoCreateBodyStyleGenerationModeEnum = "expressive" | "pro" | "prompted" | "realistic" | "stable" | "standard";
@@ -5,19 +5,27 @@ import * as z from "zod";
5
5
  export type V1AiTalkingPhotoCreateBodyStyle = {
6
6
  /**
7
7
  * Controls overall motion style.
8
- * * `pro` - Higher fidelity, realistic detail, accurate lip sync, and faster generation.
9
- * * `standard` - More expressive motion, but lower visual fidelity.
8
+ * * `realistic` - Maintains likeness well, high quality, and reliable.
9
+ * * `prompted` - Slightly lower likeness; allows option to prompt scene.
10
10
  *
11
- * * `expressive` - More motion and facial expressiveness; may introduce visual artifacts. (Deprecated: passing this value will be treated as `standard`)
12
- * * `stable` - Reduced motion for cleaner output; may result in minimal animation. (Deprecated: passing this value will be treated as `pro`)
11
+ * **Deprecated values (maintained for backward compatibility):**
12
+ * * `pro` - Deprecated: use `realistic`
13
+ * * `standard` - Deprecated: use `prompted`
14
+ * * `stable` - Deprecated: use `realistic`
15
+ * * `expressive` - Deprecated: use `prompted`
13
16
  */
14
- generationMode?: ("expressive" | "pro" | "stable" | "standard") | undefined;
17
+ generationMode?: ("expressive" | "pro" | "prompted" | "realistic" | "stable" | "standard") | undefined;
15
18
  /**
16
19
  * Note: this value is only applicable when generation_mode is `expressive`. The value can include up to 2 decimal places.
17
20
  * * Lower values yield more stability but can suppress mouth movement.
18
21
  * * Higher values increase motion and expressiveness, with a higher risk of distortion.
19
22
  */
20
23
  intensity?: number | undefined;
24
+ /**
25
+ * A text prompt to guide the generation. Only applicable when generation_mode is `prompted`.
26
+ * This field is ignored for other modes.
27
+ */
28
+ prompt?: string | undefined;
21
29
  };
22
30
  /**
23
31
  * @internal
@@ -25,8 +33,9 @@ export type V1AiTalkingPhotoCreateBodyStyle = {
25
33
  * we expect to come in as network data
26
34
  */
27
35
  export type External$V1AiTalkingPhotoCreateBodyStyle = {
28
- generation_mode?: ("expressive" | "pro" | "stable" | "standard") | undefined;
36
+ generation_mode?: ("expressive" | "pro" | "prompted" | "realistic" | "stable" | "standard") | undefined;
29
37
  intensity?: number | undefined;
38
+ prompt?: string | undefined;
30
39
  };
31
40
  export declare const Schemas$V1AiTalkingPhotoCreateBodyStyle: {
32
41
  in: z.ZodType<V1AiTalkingPhotoCreateBodyStyle, z.ZodTypeDef, unknown>;
@@ -42,14 +42,23 @@ const z = __importStar(require("zod"));
42
42
  const SchemaIn$V1AiTalkingPhotoCreateBodyStyle = z
43
43
  .object({
44
44
  generation_mode: z
45
- .enum(["expressive", "pro", "stable", "standard"])
45
+ .enum([
46
+ "expressive",
47
+ "pro",
48
+ "prompted",
49
+ "realistic",
50
+ "stable",
51
+ "standard",
52
+ ])
46
53
  .optional(),
47
54
  intensity: z.number().optional(),
55
+ prompt: z.string().optional(),
48
56
  })
49
57
  .transform((obj) => {
50
58
  return (0, make_api_request_js_1.zodTransform)(obj, {
51
59
  generation_mode: "generationMode",
52
60
  intensity: "intensity",
61
+ prompt: "prompt",
53
62
  });
54
63
  });
55
64
  /**
@@ -59,14 +68,23 @@ const SchemaIn$V1AiTalkingPhotoCreateBodyStyle = z
59
68
  const SchemaOut$V1AiTalkingPhotoCreateBodyStyle = z
60
69
  .object({
61
70
  generationMode: z
62
- .enum(["expressive", "pro", "stable", "standard"])
71
+ .enum([
72
+ "expressive",
73
+ "pro",
74
+ "prompted",
75
+ "realistic",
76
+ "stable",
77
+ "standard",
78
+ ])
63
79
  .optional(),
64
80
  intensity: z.number().optional(),
81
+ prompt: z.string().optional(),
65
82
  })
66
83
  .transform((obj) => {
67
84
  return (0, make_api_request_js_1.zodTransform)(obj, {
68
85
  generationMode: "generation_mode",
69
86
  intensity: "intensity",
87
+ prompt: "prompt",
70
88
  });
71
89
  });
72
90
  exports.Schemas$V1AiTalkingPhotoCreateBodyStyle = {
@@ -42,7 +42,7 @@ export type V1ImageProjectsGetResponse = {
42
42
  */
43
43
  totalFrameCost: number;
44
44
  /**
45
- * The type of the image project. Possible values are AI_HEADSHOT, AI_IMAGE, IMAGE_UPSCALER, FACE_SWAP, PHOTO_EDITOR, QR_CODE, BACKGROUND_REMOVER, CLOTHES_CHANGER, AI_MEME, FACE_EDITOR, PHOTO_COLORIZER, AI_GIF, AI_SELFIE, AI_IMAGE_EDITOR
45
+ * The type of the image project. Possible values are AI_HEADSHOT, AI_IMAGE, IMAGE_UPSCALER, FACE_SWAP, PHOTO_EDITOR, QR_CODE, BACKGROUND_REMOVER, CLOTHES_CHANGER, AI_MEME, FACE_EDITOR, PHOTO_COLORIZER, AI_GIF, AI_SELFIE, AI_IMAGE_EDITOR, HEAD_SWAP
46
46
  */
47
47
  type: string;
48
48
  };
@@ -1,6 +1,6 @@
1
1
  import * as z from "zod";
2
2
  /**
3
- * Provide the assets for image-to-video.
3
+ * Provide the assets for image-to-video. Sora 2 only supports images with an aspect ratio of `9:16` or `16:9`.
4
4
  */
5
5
  export type V1ImageToVideoCreateBodyAssets = {
6
6
  /**
@@ -0,0 +1,11 @@
1
+ /**
2
+ * The AI model to use for video generation.
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
+ * * `seedance`: Great for fast iteration and start/end frame
5
+ * * `kling-2.5-audio`: Great for motion, action, and camera control
6
+ * * `sora-2`: Great for story-telling, dialogue & creativity
7
+ * * `veo3.1-audio`: Great for dialogue + SFX generated natively
8
+ * * `veo3.1`: Great for realism, polish, & prompt adherence
9
+ * * `kling-1.6`: Great for dependable clips with smooth motion
10
+ */
11
+ export type V1ImageToVideoCreateBodyModelEnum = "default" | "kling-1.6" | "kling-2.5-audio" | "seedance" | "sora-2" | "veo3.1" | "veo3.1-audio";
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,11 +1,12 @@
1
1
  /**
2
2
  * Controls the output video resolution. Defaults to `720p` if not specified.
3
3
  *
4
- * 480p and 720p are available on Creator, Pro, or Business tiers. However, 1080p require Pro or Business tier.
5
- *
6
- * **Options:**
7
- * - `480p` - Supports only 5 or 10 second videos. Output: 24fps. Cost: 120 credits per 5 seconds.
8
- * - `720p` - Supports videos between 5-60 seconds. Output: 30fps. Cost: 300 credits per 5 seconds.
9
- * - `1080p` - Supports videos between 5-60 seconds. Output: 30fps. Cost: 600 credits per 5 seconds.
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`.
10
11
  */
11
12
  export type V1ImageToVideoCreateBodyResolutionEnum = "1080p" | "480p" | "720p";
@@ -6,11 +6,20 @@ import { External$V1ImageToVideoCreateBodyStyle, V1ImageToVideoCreateBodyStyle }
6
6
  */
7
7
  export type V1ImageToVideoCreateBody = {
8
8
  /**
9
- * Provide the assets for image-to-video.
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
12
  /**
13
13
  * The total duration of the output video in seconds.
14
+ *
15
+ * Supported durations depend on the chosen model:
16
+ * * **Default**: 5-60 seconds (either 5 or 10 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
14
23
  */
15
24
  endSeconds: number;
16
25
  /**
@@ -23,6 +32,17 @@ export type V1ImageToVideoCreateBody = {
23
32
  * This field is retained only for backward compatibility and will be removed in a future release.
24
33
  */
25
34
  height?: number | null | undefined;
35
+ /**
36
+ * The AI model to use for video generation.
37
+ * * `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
+ * * `seedance`: Great for fast iteration and start/end frame
39
+ * * `kling-2.5-audio`: Great for motion, action, and camera control
40
+ * * `sora-2`: Great for story-telling, dialogue & creativity
41
+ * * `veo3.1-audio`: Great for dialogue + SFX generated natively
42
+ * * `veo3.1`: Great for realism, polish, & prompt adherence
43
+ * * `kling-1.6`: Great for dependable clips with smooth motion
44
+ */
45
+ model?: ("default" | "kling-1.6" | "kling-2.5-audio" | "seedance" | "sora-2" | "veo3.1" | "veo3.1-audio") | undefined;
26
46
  /**
27
47
  * Give your video a custom name for easy identification.
28
48
  */
@@ -30,12 +50,13 @@ export type V1ImageToVideoCreateBody = {
30
50
  /**
31
51
  * Controls the output video resolution. Defaults to `720p` if not specified.
32
52
  *
33
- * 480p and 720p are available on Creator, Pro, or Business tiers. However, 1080p require Pro or Business tier.
34
- *
35
- * **Options:**
36
- * - `480p` - Supports only 5 or 10 second videos. Output: 24fps. Cost: 120 credits per 5 seconds.
37
- * - `720p` - Supports videos between 5-60 seconds. Output: 30fps. Cost: 300 credits per 5 seconds.
38
- * - `1080p` - Supports videos between 5-60 seconds. Output: 30fps. Cost: 600 credits per 5 seconds.
53
+ * * **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`.
39
60
  */
40
61
  resolution?: ("1080p" | "480p" | "720p") | undefined;
41
62
  /**
@@ -62,6 +83,7 @@ export type External$V1ImageToVideoCreateBody = {
62
83
  assets: External$V1ImageToVideoCreateBodyAssets;
63
84
  end_seconds: number;
64
85
  height?: number | null | undefined;
86
+ model?: ("default" | "kling-1.6" | "kling-2.5-audio" | "seedance" | "sora-2" | "veo3.1" | "veo3.1-audio") | undefined;
65
87
  name?: string | undefined;
66
88
  resolution?: ("1080p" | "480p" | "720p") | undefined;
67
89
  style?: External$V1ImageToVideoCreateBodyStyle | undefined;
@@ -46,6 +46,17 @@ const SchemaIn$V1ImageToVideoCreateBody = z
46
46
  assets: v1_image_to_video_create_body_assets_1.Schemas$V1ImageToVideoCreateBodyAssets.in,
47
47
  end_seconds: z.number(),
48
48
  height: z.number().int().nullable().optional(),
49
+ model: z
50
+ .enum([
51
+ "default",
52
+ "kling-1.6",
53
+ "kling-2.5-audio",
54
+ "seedance",
55
+ "sora-2",
56
+ "veo3.1",
57
+ "veo3.1-audio",
58
+ ])
59
+ .optional(),
49
60
  name: z.string().optional(),
50
61
  resolution: z.enum(["1080p", "480p", "720p"]).optional(),
51
62
  style: v1_image_to_video_create_body_style_1.Schemas$V1ImageToVideoCreateBodyStyle.in.optional(),
@@ -56,6 +67,7 @@ const SchemaIn$V1ImageToVideoCreateBody = z
56
67
  assets: "assets",
57
68
  end_seconds: "endSeconds",
58
69
  height: "height",
70
+ model: "model",
59
71
  name: "name",
60
72
  resolution: "resolution",
61
73
  style: "style",
@@ -71,6 +83,17 @@ const SchemaOut$V1ImageToVideoCreateBody = z
71
83
  assets: v1_image_to_video_create_body_assets_1.Schemas$V1ImageToVideoCreateBodyAssets.out,
72
84
  endSeconds: z.number(),
73
85
  height: z.number().int().nullable().optional(),
86
+ model: z
87
+ .enum([
88
+ "default",
89
+ "kling-1.6",
90
+ "kling-2.5-audio",
91
+ "seedance",
92
+ "sora-2",
93
+ "veo3.1",
94
+ "veo3.1-audio",
95
+ ])
96
+ .optional(),
74
97
  name: z.string().optional(),
75
98
  resolution: z.enum(["1080p", "480p", "720p"]).optional(),
76
99
  style: v1_image_to_video_create_body_style_1.Schemas$V1ImageToVideoCreateBodyStyle.out.optional(),
@@ -81,6 +104,7 @@ const SchemaOut$V1ImageToVideoCreateBody = z
81
104
  assets: "assets",
82
105
  endSeconds: "end_seconds",
83
106
  height: "height",
107
+ model: "model",
84
108
  name: "name",
85
109
  resolution: "resolution",
86
110
  style: "style",
@@ -0,0 +1,10 @@
1
+ /**
2
+ * Determines the aspect ratio of the output video.
3
+ * * **Seedance**: Supports `9:16`, `16:9`, `1:1`.
4
+ * * **Kling 2.5 Audio**: Supports `9:16`, `16:9`, `1:1`.
5
+ * * **Sora 2**: Supports `9:16`, `16:9`.
6
+ * * **Veo 3.1 Audio**: Supports `9:16`, `16:9`.
7
+ * * **Veo 3.1**: Supports `9:16`, `16:9`.
8
+ * * **Kling 1.6**: Supports `9:16`, `16:9`, `1:1`.
9
+ */
10
+ export type V1TextToVideoCreateBodyAspectRatioEnum = "16:9" | "1:1" | "9:16";
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,11 @@
1
+ /**
2
+ * The AI model to use for video generation.
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
+ * * `seedance`: Great for fast iteration and start/end frame
5
+ * * `kling-2.5-audio`: Great for motion, action, and camera control
6
+ * * `sora-2`: Great for story-telling, dialogue & creativity
7
+ * * `veo3.1-audio`: Great for dialogue + SFX generated natively
8
+ * * `veo3.1`: Great for realism, polish, & prompt adherence
9
+ * * `kling-1.6`: Great for dependable clips with smooth motion
10
+ */
11
+ export type V1TextToVideoCreateBodyModelEnum = "default" | "kling-1.6" | "kling-2.5-audio" | "seedance" | "sora-2" | "veo3.1" | "veo3.1-audio";
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,4 +1,4 @@
1
1
  /**
2
- * Determines the orientation of the output video
2
+ * Deprecated. Use `aspect_ratio` instead.
3
3
  */
4
4
  export type V1TextToVideoCreateBodyOrientationEnum = "landscape" | "portrait" | "square";
@@ -1,11 +1,12 @@
1
1
  /**
2
2
  * Controls the output video resolution. Defaults to `720p` if not specified.
3
3
  *
4
- * 480p and 720p are available on Creator, Pro, or Business tiers. However, 1080p require Pro or Business tier.
5
- *
6
- * **Options:**
7
- * - `480p` - Supports only 5 or 10 second videos. Output: 24fps. Cost: 120 credits per 5 seconds.
8
- * - `720p` - Supports videos between 5-60 seconds. Output: 30fps. Cost: 300 credits per 5 seconds.
9
- * - `1080p` - Supports videos between 5-60 seconds. Output: 30fps. Cost: 600 credits per 5 seconds.
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`.
10
11
  */
11
12
  export type V1TextToVideoCreateBodyResolutionEnum = "1080p" | "480p" | "720p";
@@ -4,31 +4,58 @@ import { External$V1TextToVideoCreateBodyStyle, V1TextToVideoCreateBodyStyle } f
4
4
  * V1TextToVideoCreateBody
5
5
  */
6
6
  export type V1TextToVideoCreateBody = {
7
+ /**
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`.
15
+ */
16
+ aspectRatio?: ("16:9" | "1:1" | "9:16") | undefined;
7
17
  /**
8
18
  * The total duration of the output video in seconds.
9
19
  *
10
- * The value must be greater than or equal to 5 seconds and less than or equal to 60 seconds.
11
- *
12
- * Note: For 480p resolution, the value must be either 5 or 10.
20
+ * Supported durations depend on the chosen model:
21
+ * * **Default**: 5-60 seconds (either 5 or 10 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
13
28
  */
14
29
  endSeconds: number;
30
+ /**
31
+ * The AI model to use for video generation.
32
+ * * `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
+ * * `seedance`: Great for fast iteration and start/end frame
34
+ * * `kling-2.5-audio`: Great for motion, action, and camera control
35
+ * * `sora-2`: Great for story-telling, dialogue & creativity
36
+ * * `veo3.1-audio`: Great for dialogue + SFX generated natively
37
+ * * `veo3.1`: Great for realism, polish, & prompt adherence
38
+ * * `kling-1.6`: Great for dependable clips with smooth motion
39
+ */
40
+ model?: ("default" | "kling-1.6" | "kling-2.5-audio" | "seedance" | "sora-2" | "veo3.1" | "veo3.1-audio") | undefined;
15
41
  /**
16
42
  * Give your video a custom name for easy identification.
17
43
  */
18
44
  name?: string | undefined;
19
45
  /**
20
- * Determines the orientation of the output video
46
+ * Deprecated. Use `aspect_ratio` instead.
21
47
  */
22
- orientation: "landscape" | "portrait" | "square";
48
+ orientation?: ("landscape" | "portrait" | "square") | undefined;
23
49
  /**
24
50
  * Controls the output video resolution. Defaults to `720p` if not specified.
25
51
  *
26
- * 480p and 720p are available on Creator, Pro, or Business tiers. However, 1080p require Pro or Business tier.
27
- *
28
- * **Options:**
29
- * - `480p` - Supports only 5 or 10 second videos. Output: 24fps. Cost: 120 credits per 5 seconds.
30
- * - `720p` - Supports videos between 5-60 seconds. Output: 30fps. Cost: 300 credits per 5 seconds.
31
- * - `1080p` - Supports videos between 5-60 seconds. Output: 30fps. Cost: 600 credits per 5 seconds.
52
+ * * **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`.
32
59
  */
33
60
  resolution?: ("1080p" | "480p" | "720p") | undefined;
34
61
  style: V1TextToVideoCreateBodyStyle;
@@ -39,9 +66,11 @@ export type V1TextToVideoCreateBody = {
39
66
  * we expect to come in as network data
40
67
  */
41
68
  export type External$V1TextToVideoCreateBody = {
69
+ aspect_ratio?: ("16:9" | "1:1" | "9:16") | undefined;
42
70
  end_seconds: number;
71
+ model?: ("default" | "kling-1.6" | "kling-2.5-audio" | "seedance" | "sora-2" | "veo3.1" | "veo3.1-audio") | undefined;
43
72
  name?: string | undefined;
44
- orientation: "landscape" | "portrait" | "square";
73
+ orientation?: ("landscape" | "portrait" | "square") | undefined;
45
74
  resolution?: ("1080p" | "480p" | "720p") | undefined;
46
75
  style: External$V1TextToVideoCreateBodyStyle;
47
76
  };
@@ -42,15 +42,29 @@ const v1_text_to_video_create_body_style_1 = require("./v1-text-to-video-create-
42
42
  */
43
43
  const SchemaIn$V1TextToVideoCreateBody = z
44
44
  .object({
45
+ aspect_ratio: z.enum(["16:9", "1:1", "9:16"]).optional(),
45
46
  end_seconds: z.number(),
47
+ model: z
48
+ .enum([
49
+ "default",
50
+ "kling-1.6",
51
+ "kling-2.5-audio",
52
+ "seedance",
53
+ "sora-2",
54
+ "veo3.1",
55
+ "veo3.1-audio",
56
+ ])
57
+ .optional(),
46
58
  name: z.string().optional(),
47
- orientation: z.enum(["landscape", "portrait", "square"]),
59
+ orientation: z.enum(["landscape", "portrait", "square"]).optional(),
48
60
  resolution: z.enum(["1080p", "480p", "720p"]).optional(),
49
61
  style: v1_text_to_video_create_body_style_1.Schemas$V1TextToVideoCreateBodyStyle.in,
50
62
  })
51
63
  .transform((obj) => {
52
64
  return (0, make_api_request_js_1.zodTransform)(obj, {
65
+ aspect_ratio: "aspectRatio",
53
66
  end_seconds: "endSeconds",
67
+ model: "model",
54
68
  name: "name",
55
69
  orientation: "orientation",
56
70
  resolution: "resolution",
@@ -63,15 +77,29 @@ const SchemaIn$V1TextToVideoCreateBody = z
63
77
  */
64
78
  const SchemaOut$V1TextToVideoCreateBody = z
65
79
  .object({
80
+ aspectRatio: z.enum(["16:9", "1:1", "9:16"]).optional(),
66
81
  endSeconds: z.number(),
82
+ model: z
83
+ .enum([
84
+ "default",
85
+ "kling-1.6",
86
+ "kling-2.5-audio",
87
+ "seedance",
88
+ "sora-2",
89
+ "veo3.1",
90
+ "veo3.1-audio",
91
+ ])
92
+ .optional(),
67
93
  name: z.string().optional(),
68
- orientation: z.enum(["landscape", "portrait", "square"]),
94
+ orientation: z.enum(["landscape", "portrait", "square"]).optional(),
69
95
  resolution: z.enum(["1080p", "480p", "720p"]).optional(),
70
96
  style: v1_text_to_video_create_body_style_1.Schemas$V1TextToVideoCreateBodyStyle.out,
71
97
  })
72
98
  .transform((obj) => {
73
99
  return (0, make_api_request_js_1.zodTransform)(obj, {
100
+ aspectRatio: "aspect_ratio",
74
101
  endSeconds: "end_seconds",
102
+ model: "model",
75
103
  name: "name",
76
104
  orientation: "orientation",
77
105
  resolution: "resolution",
@@ -61,7 +61,7 @@ export type V1VideoProjectsGetResponse = {
61
61
  */
62
62
  totalFrameCost: number;
63
63
  /**
64
- * The type of the video project. Possible values are ANIMATION, IMAGE_TO_VIDEO, VIDEO_TO_VIDEO, TEXT_TO_VIDEO, FACE_SWAP, LIP_SYNC, AUTO_SUBTITLE, TALKING_PHOTO, UGC_AD
64
+ * The type of the video project. Possible values are ANIMATION, IMAGE_TO_VIDEO, VIDEO_TO_VIDEO, TEXT_TO_VIDEO, FACE_SWAP, LIP_SYNC, AUTO_SUBTITLE, TALKING_PHOTO, UGC_AD, VIDEO_UPSCALER
65
65
  */
66
66
  type: string;
67
67
  /**