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
@@ -1,4 +1,4 @@
1
1
  export declare enum Environment {
2
2
  Environment = "https://api.magichour.ai",
3
- MockServer = "https://api.sideko.dev/v1/mock/magichour/magic-hour/0.46.0"
3
+ MockServer = "https://api.sideko.dev/v1/mock/magichour/magic-hour/0.49.0"
4
4
  }
@@ -4,5 +4,5 @@ exports.Environment = void 0;
4
4
  var Environment;
5
5
  (function (Environment) {
6
6
  Environment["Environment"] = "https://api.magichour.ai";
7
- Environment["MockServer"] = "https://api.sideko.dev/v1/mock/magichour/magic-hour/0.46.0";
7
+ Environment["MockServer"] = "https://api.sideko.dev/v1/mock/magichour/magic-hour/0.49.0";
8
8
  })(Environment || (exports.Environment = Environment = {}));
@@ -54,7 +54,7 @@ export declare class AiImageEditorClient extends CoreResourceClient {
54
54
  /**
55
55
  * AI Image Editor
56
56
  *
57
- * Edit images with AI. Each edit costs 10 credits.
57
+ * Edit images with AI. Each edit costs 50 credits.
58
58
  *
59
59
  * POST /v1/ai-image-editor
60
60
  */
@@ -86,7 +86,7 @@ class AiImageEditorClient extends make_api_request_js_1.CoreResourceClient {
86
86
  /**
87
87
  * AI Image Editor
88
88
  *
89
- * Edit images with AI. Each edit costs 10 credits.
89
+ * Edit images with AI. Each edit costs 50 credits.
90
90
  *
91
91
  * POST /v1/ai-image-editor
92
92
  */
@@ -5,17 +5,58 @@ import { External$V1AiImageGeneratorCreateBodyStyle, V1AiImageGeneratorCreateBod
5
5
  */
6
6
  export type CreateRequest = {
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 CreateRequest = {
27
68
  * we expect to come in as network data
28
69
  */
29
70
  export type External$CreateRequest = {
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$CreateRequest: {
@@ -42,16 +42,30 @@ const v1_ai_image_generator_create_body_style_1 = require("../../../types/v1-ai-
42
42
  */
43
43
  const SchemaIn$CreateRequest = 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$CreateRequest = z
61
75
  */
62
76
  const SchemaOut$CreateRequest = 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
  });
@@ -36,7 +36,7 @@ export declare class AiImageGeneratorClient extends CoreResourceClient {
36
36
  /**
37
37
  * AI Image Generator
38
38
  *
39
- * Create an AI image. Each standard image costs 5 credits. Pro quality images cost 30 credits.
39
+ * Create an AI image with advanced model selection and quality controls.
40
40
  *
41
41
  * POST /v1/ai-image-generator
42
42
  */
@@ -73,7 +73,7 @@ class AiImageGeneratorClient extends make_api_request_js_1.CoreResourceClient {
73
73
  /**
74
74
  * AI Image Generator
75
75
  *
76
- * Create an AI image. Each standard image costs 5 credits. Pro quality images cost 30 credits.
76
+ * Create an AI image with advanced model selection and quality controls.
77
77
  *
78
78
  * POST /v1/ai-image-generator
79
79
  */
@@ -6,11 +6,20 @@ import { External$V1ImageToVideoCreateBodyStyle, V1ImageToVideoCreateBodyStyle }
6
6
  */
7
7
  export type CreateRequest = {
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 CreateRequest = {
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 CreateRequest = {
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$CreateRequest = {
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$CreateRequest = 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$CreateRequest = 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$CreateRequest = 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$CreateRequest = 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",
@@ -4,31 +4,58 @@ import { External$V1TextToVideoCreateBodyStyle, V1TextToVideoCreateBodyStyle } f
4
4
  * CreateRequest
5
5
  */
6
6
  export type CreateRequest = {
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 CreateRequest = {
39
66
  * we expect to come in as network data
40
67
  */
41
68
  export type External$CreateRequest = {
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("../../../types/v1-text-to-
42
42
  */
43
43
  const SchemaIn$CreateRequest = 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$CreateRequest = z
63
77
  */
64
78
  const SchemaOut$CreateRequest = 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",
@@ -20,7 +20,10 @@ export { V1AiImageEditorCreateBodyStyle } from "./v1-ai-image-editor-create-body
20
20
  export { V1AiImageEditorCreateBodyStyleModelEnum } from "./v1-ai-image-editor-create-body-style-model-enum";
21
21
  export { V1AiImageEditorCreateResponse } from "./v1-ai-image-editor-create-response";
22
22
  export { V1AiImageGeneratorCreateBody } from "./v1-ai-image-generator-create-body";
23
+ export { V1AiImageGeneratorCreateBodyAspectRatioEnum } from "./v1-ai-image-generator-create-body-aspect-ratio-enum";
24
+ export { V1AiImageGeneratorCreateBodyModelEnum } from "./v1-ai-image-generator-create-body-model-enum";
23
25
  export { V1AiImageGeneratorCreateBodyOrientationEnum } from "./v1-ai-image-generator-create-body-orientation-enum";
26
+ export { V1AiImageGeneratorCreateBodyResolutionEnum } from "./v1-ai-image-generator-create-body-resolution-enum";
24
27
  export { V1AiImageGeneratorCreateBodyStyle } from "./v1-ai-image-generator-create-body-style";
25
28
  export { V1AiImageGeneratorCreateBodyStyleQualityModeEnum } from "./v1-ai-image-generator-create-body-style-quality-mode-enum";
26
29
  export { V1AiImageGeneratorCreateBodyStyleToolEnum } from "./v1-ai-image-generator-create-body-style-tool-enum";
@@ -105,6 +108,7 @@ export { V1ImageProjectsGetResponseError } from "./v1-image-projects-get-respons
105
108
  export { V1ImageProjectsGetResponseStatusEnum } from "./v1-image-projects-get-response-status-enum";
106
109
  export { V1ImageToVideoCreateBody } from "./v1-image-to-video-create-body";
107
110
  export { V1ImageToVideoCreateBodyAssets } from "./v1-image-to-video-create-body-assets";
111
+ export { V1ImageToVideoCreateBodyModelEnum } from "./v1-image-to-video-create-body-model-enum";
108
112
  export { V1ImageToVideoCreateBodyResolutionEnum } from "./v1-image-to-video-create-body-resolution-enum";
109
113
  export { V1ImageToVideoCreateBodyStyle } from "./v1-image-to-video-create-body-style";
110
114
  export { V1ImageToVideoCreateBodyStyleQualityModeEnum } from "./v1-image-to-video-create-body-style-quality-mode-enum";
@@ -119,6 +123,8 @@ export { V1PhotoColorizerCreateBody } from "./v1-photo-colorizer-create-body";
119
123
  export { V1PhotoColorizerCreateBodyAssets } from "./v1-photo-colorizer-create-body-assets";
120
124
  export { V1PhotoColorizerCreateResponse } from "./v1-photo-colorizer-create-response";
121
125
  export { V1TextToVideoCreateBody } from "./v1-text-to-video-create-body";
126
+ export { V1TextToVideoCreateBodyAspectRatioEnum } from "./v1-text-to-video-create-body-aspect-ratio-enum";
127
+ export { V1TextToVideoCreateBodyModelEnum } from "./v1-text-to-video-create-body-model-enum";
122
128
  export { V1TextToVideoCreateBodyOrientationEnum } from "./v1-text-to-video-create-body-orientation-enum";
123
129
  export { V1TextToVideoCreateBodyResolutionEnum } from "./v1-text-to-video-create-body-resolution-enum";
124
130
  export { V1TextToVideoCreateBodyStyle } from "./v1-text-to-video-create-body-style";
@@ -1,5 +1,6 @@
1
1
  /**
2
- * The AI model to use for image editing. * `Nano Banana` - Precise, realistic edits with consistent results
2
+ * The AI model to use for image editing.
3
+ * * `Nano Banana` - Precise, realistic edits with consistent results
3
4
  * * `Seedream` - Creative, imaginative images with artistic freedom
4
5
  * * `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.
5
6
  */
@@ -4,7 +4,8 @@ import * as z from "zod";
4
4
  */
5
5
  export type V1AiImageEditorCreateBodyStyle = {
6
6
  /**
7
- * The AI model to use for image editing. * `Nano Banana` - Precise, realistic edits with consistent results
7
+ * The AI model to use for image editing.
8
+ * * `Nano Banana` - Precise, realistic edits with consistent results
8
9
  * * `Seedream` - Creative, imaginative images with artistic freedom
9
10
  * * `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.
10
11
  */
@@ -0,0 +1,4 @@
1
+ /**
2
+ * The aspect ratio of the output image(s). If not specified, defaults to `1:1` (square).
3
+ */
4
+ export type V1AiImageGeneratorCreateBodyAspectRatioEnum = "16:9" | "1:1" | "9:16";
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,24 @@
1
+ /**
2
+ * The AI model to use for image generation. Each model has different capabilities and costs.
3
+ *
4
+ * **Models:**
5
+ * - `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.
6
+ * - `flux-schnell` - 5 credits/image
7
+ * - Supported resolutions: auto
8
+ * - Available for tiers: free, creator, pro, business
9
+ * - Image count allowed: 1, 2, 3, 4
10
+ * - `z-image-turbo` - 5 credits/image
11
+ * - Supported resolutions: auto, 2k
12
+ * - Available for tiers: free, creator, pro, business
13
+ * - Image count allowed: 1, 2, 3, 4
14
+ * - `seedream` - 30 credits/image
15
+ * - Supported resolutions: auto, 2k, 4k
16
+ * - Available for tiers: free, creator, pro, business
17
+ * - Image count allowed: 1, 2, 3, 4
18
+ * - `nano-banana-pro` - 150 credits/image
19
+ * - Supported resolutions: auto
20
+ * - Available for tiers: creator, pro, business
21
+ * - Image count allowed: 1, 4, 9, 16
22
+ *
23
+ */
24
+ export type V1AiImageGeneratorCreateBodyModelEnum = "default" | "flux-schnell" | "nano-banana-pro" | "seedream" | "z-image-turbo";
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,4 +1,6 @@
1
1
  /**
2
- * The orientation of the output image(s).
2
+ * DEPRECATED: Use `aspect_ratio` instead.
3
+ *
4
+ * The orientation of the output image(s). `aspect_ratio` takes precedence when `orientation` if both are provided.
3
5
  */
4
6
  export type V1AiImageGeneratorCreateBodyOrientationEnum = "landscape" | "portrait" | "square";
@@ -0,0 +1,11 @@
1
+ /**
2
+ * Maximum resolution for the generated image.
3
+ *
4
+ * **Options:**
5
+ * - `auto` - Automatic resolution (all tiers, default)
6
+ * - `2k` - Up to 2048px (requires Pro or Business tier)
7
+ * - `4k` - Up to 4096px (requires Business tier)
8
+ *
9
+ * 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.
10
+ */
11
+ export type V1AiImageGeneratorCreateBodyResolutionEnum = "2k" | "4k" | "auto";
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,10 +1,10 @@
1
1
  /**
2
- * Controls the quality of the generated image. Defaults to 'standard' if not specified.
2
+ * DEPRECATED: Use `model` field instead for explicit model selection.
3
3
  *
4
- * **Options:**
5
- * - `standard` - Standard quality generation. Cost: 5 credits per image.
6
- * - `pro` - Pro quality generation with enhanced details and quality. Cost: 30 credits per image.
4
+ * Legacy quality mode mapping:
5
+ * - `standard` → `z-image-turbo` model
6
+ * - `pro` → `seedream` model
7
7
  *
8
- * Note: Pro mode is available for users on Creator, Pro, or Business tier.
8
+ * If model is specified, it will take precedence over the legacy quality_mode field.
9
9
  */
10
10
  export type V1AiImageGeneratorCreateBodyStyleQualityModeEnum = "pro" | "standard";
@@ -8,13 +8,13 @@ export type V1AiImageGeneratorCreateBodyStyle = {
8
8
  */
9
9
  prompt: string;
10
10
  /**
11
- * Controls the quality of the generated image. Defaults to 'standard' if not specified.
11
+ * DEPRECATED: Use `model` field instead for explicit model selection.
12
12
  *
13
- * **Options:**
14
- * - `standard` - Standard quality generation. Cost: 5 credits per image.
15
- * - `pro` - Pro quality generation with enhanced details and quality. Cost: 30 credits per image.
13
+ * Legacy quality mode mapping:
14
+ * - `standard` → `z-image-turbo` model
15
+ * - `pro` → `seedream` model
16
16
  *
17
- * Note: Pro mode is available for users on Creator, Pro, or Business tier.
17
+ * If model is specified, it will take precedence over the legacy quality_mode field.
18
18
  */
19
19
  qualityMode?: ("pro" | "standard") | undefined;
20
20
  /**