@apicity/fal 0.31.1 → 0.32.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.
package/dist/src/zod.js CHANGED
@@ -439,7 +439,7 @@ export const FalSeedance2p0MiniReferenceToVideoRequestSchema = z
439
439
  // ---------------------------------------------------------------------------
440
440
  // Bytedance Seedance 2.5 shared vocabularies
441
441
  // ---------------------------------------------------------------------------
442
- const Seedance2p5ResolutionSchema = z.enum(["480p", "720p", "1080p"]);
442
+ const Seedance2p5ResolutionSchema = z.enum(["480p", "720p", "1080p", "4k"]);
443
443
  const Seedance2p5DurationSchema = z.enum([
444
444
  "auto",
445
445
  "4",
@@ -487,7 +487,7 @@ export const FalSeedance2p5TextToVideoRequestSchema = z.object({
487
487
  resolution: Seedance2p5ResolutionSchema.optional(),
488
488
  draft: z
489
489
  .boolean()
490
- .describe("Generate a draft preview at 480p, overriding resolution. Returns a draft_id for completing the draft at 1080p within seven days.")
490
+ .describe("Generate a draft preview at 480p, overriding resolution. Returns a draft_id for completing the draft at 1080p or 4k within 14 days.")
491
491
  .optional(),
492
492
  duration: Seedance2p5DurationSchema.optional(),
493
493
  aspect_ratio: Seedance2p5AspectRatioSchema.optional(),
@@ -515,8 +515,8 @@ export const FalSeedance2p5ImageToVideoRequestSchema = FalSeedance2p5TextToVideo
515
515
  export const FalSeedance2p5ReferenceToVideoRequestSchema = FalSeedance2p5TextToVideoRequestSchema.extend({
516
516
  prompt: z.string().nullable().optional(),
517
517
  task: z
518
- .enum(["reference", "editing", "extension"])
519
- .describe("The type of video generation task. Reference uses the supplied media as guidance. Editing modifies a reference video and automatically coerces aspect_ratio and duration to auto. Extension continues a reference video and automatically coerces aspect_ratio to auto.")
518
+ .enum(["auto", "reference", "editing", "extension"])
519
+ .describe("The type of video generation task. Reference uses the supplied media as guidance. Editing modifies a reference video and automatically coerces aspect_ratio and duration to auto. Extension continues a reference video and automatically coerces aspect_ratio to auto. Auto leaves the task type unset so the model decides it from the prompt and references.")
520
520
  .optional(),
521
521
  image_urls: z.array(z.string()).max(30).optional(),
522
522
  video_urls: z.array(z.string()).max(10).optional(),
@@ -855,7 +855,8 @@ export const FalMeshyV7ImageTo3dRequestSchema = z.object({
855
855
  // is upstream's own "no specific pose" default.
856
856
  is_a_t_pose: z.boolean().optional(),
857
857
  pose_mode: z.enum(["a-pose", "t-pose", ""]).optional(),
858
- texture_prompt: z.string().max(600).optional(),
858
+ // Upstream documents a maximum of 800 characters (re-read 2026-11-27).
859
+ texture_prompt: z.string().max(800).optional(),
859
860
  texture_image_url: z.string().optional(),
860
861
  enable_rigging: z.boolean().optional(),
861
862
  rigging_height_meters: z.number().positive().optional(),
@@ -1073,6 +1074,10 @@ export const FalNanoBananaProTextToImageRequestSchema = z.object({
1073
1074
  "3:4",
1074
1075
  "2:3",
1075
1076
  "9:16",
1077
+ "4:1",
1078
+ "1:4",
1079
+ "8:1",
1080
+ "1:8",
1076
1081
  ])
1077
1082
  .optional(),
1078
1083
  output_format: z.enum(["jpeg", "png", "webp"]).optional(),
@@ -1106,6 +1111,10 @@ export const FalNanoBananaProEditRequestSchema = z.object({
1106
1111
  "3:4",
1107
1112
  "2:3",
1108
1113
  "9:16",
1114
+ "4:1",
1115
+ "1:4",
1116
+ "8:1",
1117
+ "1:8",
1109
1118
  ])
1110
1119
  .optional(),
1111
1120
  output_format: z.enum(["jpeg", "png", "webp"]).optional(),
@@ -1146,10 +1155,14 @@ export const FalSeedreamV5LiteEditRequestSchema = z.object({
1146
1155
  // documented only on the text-to-image surface, so it is absent here.
1147
1156
  // Docs: https://fal.ai/models/fal-ai/bytedance/seedream/v5/lite/edit
1148
1157
  image_size: FalSeedreamV5LiteImageSizeSchema.optional(),
1149
- // Fal documents `num_images` and `max_images` as integers in [1, 6].
1158
+ // Fal documents `num_images` as an integer in [1, 6] and `max_images`
1159
+ // (images per generation in sequential mode) as an integer in [1, 15]
1160
+ // (queue OpenAPI re-read 2026-11-27). Above 1, `max_images` turns
1161
+ // sequential generation on, and input references plus outputs per
1162
+ // generation cannot exceed 15.
1150
1163
  // Docs: https://fal.ai/models/fal-ai/bytedance/seedream/v5/lite/edit
1151
1164
  num_images: z.number().int().min(1).max(6).optional(),
1152
- max_images: z.number().int().min(1).max(6).optional(),
1165
+ max_images: z.number().int().min(1).max(15).optional(),
1153
1166
  sync_mode: z.boolean().optional(),
1154
1167
  enable_safety_checker: z.boolean().optional(),
1155
1168
  });
@@ -1166,10 +1179,14 @@ export const FalSeedreamV5LiteTextToImageRequestSchema = z.object({
1166
1179
  // text-to-image surface only.
1167
1180
  // Docs: https://fal.ai/models/fal-ai/bytedance/seedream/v5/lite/text-to-image
1168
1181
  return_byteplus_urls: z.boolean().optional(),
1169
- // Fal documents `num_images` and `max_images` as integers in [1, 6].
1182
+ // Fal documents `num_images` as an integer in [1, 6] and `max_images`
1183
+ // (images per generation in sequential mode) as an integer in [1, 15]
1184
+ // (queue OpenAPI re-read 2026-11-27). Above 1, `max_images` turns
1185
+ // sequential generation on, and input references plus outputs per
1186
+ // generation cannot exceed 15.
1170
1187
  // Docs: https://fal.ai/models/fal-ai/bytedance/seedream/v5/lite/text-to-image
1171
1188
  num_images: z.number().int().min(1).max(6).optional(),
1172
- max_images: z.number().int().min(1).max(6).optional(),
1189
+ max_images: z.number().int().min(1).max(15).optional(),
1173
1190
  sync_mode: z.boolean().optional(),
1174
1191
  enable_safety_checker: z.boolean().optional(),
1175
1192
  });
@@ -1203,9 +1220,10 @@ export const FalSeedreamV5ProLayerizeRequestSchema = z.object({
1203
1220
  // Bytedance Seedream v5 Pro text-to-image
1204
1221
  // Bytedance Seedream v5 Pro (shared image_size)
1205
1222
  // ---------------------------------------------------------------------------
1206
- // The Pro surface offers `auto_1K`/`auto_2K` where the Lite surface offers
1207
- // `auto_2K`/`auto_3K`/`auto_4K`, so it carries its own union rather than
1208
- // reusing FalSeedreamV5LiteImageSizeSchema.
1223
+ // The Pro surface offers `auto_1K`/`auto_1.5K`/`auto_2K` where the Lite
1224
+ // surface offers `auto_2K`/`auto_3K`/`auto_4K`, so it carries its own union
1225
+ // rather than reusing FalSeedreamV5LiteImageSizeSchema. Both Pro ids list
1226
+ // `auto_1.5K` (queue OpenAPI re-read 2026-11-27).
1209
1227
  // Docs: https://fal.ai/models/bytedance/seedream/v5/pro/text-to-image/api
1210
1228
  // Docs: https://fal.ai/models/bytedance/seedream/v5/pro/edit/api
1211
1229
  const FalSeedreamV5ProImageSizeSchema = z.union([
@@ -1217,6 +1235,7 @@ const FalSeedreamV5ProImageSizeSchema = z.union([
1217
1235
  "landscape_4_3",
1218
1236
  "landscape_16_9",
1219
1237
  "auto_1K",
1238
+ "auto_1.5K",
1220
1239
  "auto_2K",
1221
1240
  ]),
1222
1241
  z.object({ width: z.number(), height: z.number() }),
@@ -2345,7 +2364,9 @@ const FalWanV2p7AspectRatioSchema = z.enum([
2345
2364
  const FalWanV2p7ResolutionSchema = z.enum(["720p", "1080p"]);
2346
2365
  const FalWanV2p7AudioSettingSchema = z.enum(["auto", "origin"]);
2347
2366
  export const FalWanV2p7TextToImageRequestSchema = z.object({
2348
- prompt: z.string().min(1).max(500),
2367
+ // The queue OpenAPI caps the prompt at 2000 characters on the base and pro
2368
+ // ids, both served by this schema (re-read 2026-11-27).
2369
+ prompt: z.string().min(1).max(2000),
2349
2370
  negative_prompt: z.string().max(500).optional(),
2350
2371
  image_size: FalWanV2p7ImageSizeSchema.optional(),
2351
2372
  max_images: z.number().int().min(1).max(5).optional(),
@@ -2356,7 +2377,9 @@ export const FalWanV2p7TextToImageRequestSchema = z.object({
2356
2377
  // Wan v2.7 edit (image-to-image)
2357
2378
  // ---------------------------------------------------------------------------
2358
2379
  export const FalWanV2p7EditRequestSchema = z.object({
2359
- prompt: z.string().min(1).max(500),
2380
+ // The queue OpenAPI caps the prompt at 2000 characters on the base and pro
2381
+ // ids, both served by this schema (re-read 2026-11-27).
2382
+ prompt: z.string().min(1).max(2000),
2360
2383
  image_urls: z.array(z.string().url()).min(1).max(4),
2361
2384
  negative_prompt: z.string().max(500).optional(),
2362
2385
  image_size: FalWanV2p7ImageSizeSchema.optional(),
@@ -2466,8 +2489,11 @@ export const FalWanV2p7EditVideoRequestSchema = z.object({
2466
2489
  export const FalXaiGrokImagineImageRequestSchema = z.object({
2467
2490
  prompt: z.string(),
2468
2491
  num_images: z.number().int().min(1).max(4).optional(),
2492
+ // Upstream default "1:1"; `auto` lets the provider choose (queue OpenAPI
2493
+ // re-read 2026-11-27).
2469
2494
  aspect_ratio: z
2470
2495
  .enum([
2496
+ "auto",
2471
2497
  "2:1",
2472
2498
  "20:9",
2473
2499
  "19.5:9",
@@ -2490,6 +2516,8 @@ export const FalXaiGrokImagineImageRequestSchema = z.object({
2490
2516
  // ---------------------------------------------------------------------------
2491
2517
  // xAI Grok Imagine Image v2.0 text-to-image
2492
2518
  // ---------------------------------------------------------------------------
2519
+ // Shared by v2.0 text-to-image and edit; both queue OpenAPI documents list
2520
+ // 21:9 and 5:2 as well as `auto` (re-read 2026-11-27).
2493
2521
  const FAL_XAI_GROK_IMAGINE_IMAGE_V2P0_ASPECT_RATIOS = [
2494
2522
  "2:1",
2495
2523
  "20:9",
@@ -2504,19 +2532,22 @@ const FAL_XAI_GROK_IMAGINE_IMAGE_V2P0_ASPECT_RATIOS = [
2504
2532
  "9:19.5",
2505
2533
  "9:20",
2506
2534
  "1:2",
2535
+ "21:9",
2536
+ "5:2",
2507
2537
  ];
2508
2538
  export const FalXaiGrokImagineImageV2p0TextToImageRequestSchema = z.object({
2509
2539
  prompt: z.string().min(1),
2510
- // Upstream default 1. The page publishes no ceiling, so mirror v1's 1-4.
2511
- num_images: z.number().int().min(1).max(4).optional(),
2512
- // Upstream default "1:1".
2540
+ // Upstream default 1; the queue OpenAPI caps it at 10 (re-read 2026-11-27).
2541
+ num_images: z.number().int().min(1).max(10).optional(),
2542
+ // Upstream default "1:1"; `auto` lets the provider choose.
2513
2543
  aspect_ratio: z
2514
- .enum(FAL_XAI_GROK_IMAGINE_IMAGE_V2P0_ASPECT_RATIOS)
2544
+ .enum(["auto", ...FAL_XAI_GROK_IMAGINE_IMAGE_V2P0_ASPECT_RATIOS])
2515
2545
  .optional(),
2516
2546
  // Upstream default "1k".
2517
2547
  resolution: z.enum(["1k", "2k"]).optional(),
2518
- // Upstream default "medium".
2519
- quality: z.enum(["low", "medium"]).optional(),
2548
+ // Upstream default "medium". `auto` lets xAI choose; upstream says it
2549
+ // currently uses `low` for generation.
2550
+ quality: z.enum(["low", "medium", "auto"]).optional(),
2520
2551
  // Upstream default "jpeg".
2521
2552
  output_format: z.enum(["jpeg", "png", "webp"]).optional(),
2522
2553
  sync_mode: z.boolean().optional(),
@@ -2526,16 +2557,17 @@ export const FalXaiGrokImagineImageV2p0TextToImageRequestSchema = z.object({
2526
2557
  // ---------------------------------------------------------------------------
2527
2558
  export const FalXaiGrokImagineImageV2p0EditRequestSchema = z.object({
2528
2559
  prompt: z.string().min(1),
2529
- // Upstream default 1. The page publishes no ceiling, so mirror v1's 1-4.
2530
- num_images: z.number().int().min(1).max(4).optional(),
2560
+ // Upstream default 1; the queue OpenAPI caps it at 10 (re-read 2026-11-27).
2561
+ num_images: z.number().int().min(1).max(10).optional(),
2531
2562
  // Upstream default "auto".
2532
2563
  aspect_ratio: z
2533
2564
  .enum(["auto", ...FAL_XAI_GROK_IMAGINE_IMAGE_V2P0_ASPECT_RATIOS])
2534
2565
  .optional(),
2535
2566
  // Upstream default "1k".
2536
2567
  resolution: z.enum(["1k", "2k"]).optional(),
2537
- // Upstream default "medium".
2538
- quality: z.enum(["low", "medium"]).optional(),
2568
+ // Upstream default "medium". `auto` lets xAI choose; upstream says it
2569
+ // currently uses `medium` for editing.
2570
+ quality: z.enum(["low", "medium", "auto"]).optional(),
2539
2571
  // Upstream default "jpeg".
2540
2572
  output_format: z.enum(["jpeg", "png", "webp"]).optional(),
2541
2573
  sync_mode: z.boolean().optional(),
@@ -2567,7 +2599,9 @@ export const FalKlingVideoV3ProImageToVideoRequestSchema = z.object({
2567
2599
  end_image_url: z.string().optional(),
2568
2600
  duration: z.string().optional(),
2569
2601
  generate_audio: z.boolean().optional(),
2570
- shot_type: z.enum(["customize"]).optional(),
2602
+ // `intelligent` lets the model determine the shot structure (queue OpenAPI
2603
+ // re-read 2026-11-27).
2604
+ shot_type: z.enum(["customize", "intelligent"]).optional(),
2571
2605
  negative_prompt: z.string().max(2500).optional(),
2572
2606
  cfg_scale: z.number().min(0).max(1).optional(),
2573
2607
  elements: z
@@ -2745,7 +2779,7 @@ export const FalXaiGrokImagineVideoV1p5ReferenceToVideoRequestSchema = z.object(
2745
2779
  duration: z.number().int().min(1).max(15).optional(),
2746
2780
  resolution: z.enum(["480p", "720p"]).optional(),
2747
2781
  aspect_ratio: z
2748
- .enum(["16:9", "4:3", "3:2", "1:1", "2:3", "3:4", "9:16"])
2782
+ .enum(["16:9", "4:3", "3:2", "1:1", "2:3", "3:4", "9:16", "21:9", "5:2"])
2749
2783
  .optional(),
2750
2784
  });
2751
2785
  // ---------------------------------------------------------------------------
@@ -3114,7 +3148,7 @@ export const FalXaiGrokImagineVideoV1p5LiteTextToVideoRequestSchema = z.object({
3114
3148
  duration: z.number().int().min(1).max(15).default(6),
3115
3149
  resolution: z.enum(["480p", "720p", "1080p"]).default("720p"),
3116
3150
  aspect_ratio: z
3117
- .enum(["16:9", "4:3", "3:2", "1:1", "2:3", "3:4", "9:16"])
3151
+ .enum(["16:9", "4:3", "3:2", "1:1", "2:3", "3:4", "9:16", "21:9", "5:2"])
3118
3152
  .default("16:9"),
3119
3153
  });
3120
3154
  // Docs: https://fal.ai/models/minimax/h3-max/recast/api
@@ -3160,7 +3194,9 @@ export const FalFlux3EditImageRequestSchema = z.object({
3160
3194
  "1:2",
3161
3195
  ])
3162
3196
  .default("auto"),
3163
- resolution: z.enum(["512sq", "768sq", "1k", "2k", "4k"]).default("1k"),
3197
+ resolution: z
3198
+ .enum(["512sq", "768sq", "1k", "1.5k", "2k", "4k"])
3199
+ .default("1k"),
3164
3200
  enable_prompt_expansion: z.boolean().default(false),
3165
3201
  safety_tolerance: z.number().int().min(0).max(4).default(2),
3166
3202
  output_format: z.enum(["jpeg", "png"]).default("jpeg"),
@@ -3304,6 +3340,7 @@ export const FalIdeogramV4p5EditRequestSchema = z
3304
3340
  "landscape_4_3",
3305
3341
  "portrait_16_9",
3306
3342
  "landscape_16_9",
3343
+ "provider_auto",
3307
3344
  ]),
3308
3345
  z
3309
3346
  .object({
@@ -3330,7 +3367,7 @@ export const FalIdeogramV4p5EditRequestSchema = z
3330
3367
  }),
3331
3368
  ])
3332
3369
  .default("auto")
3333
- .describe("Only unmasked regular edits accept non-auto sizes. Custom dimensions must be multiples of 32, at least 256, with area <=4194304 and aspect ratio <=6:1."),
3370
+ .describe("auto preserves source geometry, downscaled by the provider if needed. provider_auto lets Ideogram pick a supported size of about 2K from the sources and prompt. Only unmasked regular edits accept non-auto sizes. Custom dimensions must be multiples of 32, at least 256, with area <=4194304 and aspect ratio <=6:1."),
3334
3371
  num_images: z.number().int().min(1).max(8).default(1),
3335
3372
  seed: z.number().int().nullable().optional(),
3336
3373
  sync_mode: z.boolean().default(false),
@@ -3368,6 +3405,7 @@ export const FalIdeogramV4p5RequestSchema = z
3368
3405
  height: z.number().int().gt(0).max(14142).default(512),
3369
3406
  }),
3370
3407
  z.enum([
3408
+ "auto",
3371
3409
  "square_hd",
3372
3410
  "square",
3373
3411
  "portrait_4_3",
@@ -3421,7 +3459,7 @@ export const FalIdeogramV4p5RequestSchema = z
3421
3459
  "896x1120",
3422
3460
  ]).has(`${size.width}x${size.height}`), { message: "Explicit dimensions must be one of the documented sizes" })
3423
3461
  .default("square_hd")
3424
- .describe("Output size. square is promoted to square_hd (1024x1024). 4:3 presets use 1152x864 or 864x1152; 16:9 presets use 1280x720 or 720x1280. Explicit dimensions must match a supported size: 1024x1024, 1024x3072, 1120x896, 1152x2944, 1152x864, 1248x3328, 1248x832, 1280x3072, 1280x720, 1280x800, 1296x3168, 1440x2560, 1440x2880, 1440x720, 1600x2560, 1664x2496, 1728x2304, 1792x2240, 2048x2048, 2240x1792, 2304x1728, 2496x1664, 2560x1440, 2560x1600, 2880x1440, 2944x1152, 3072x1024, 3072x1280, 3168x1296, 3328x1248, 720x1280, 720x1440, 800x1280, 832x1248, 864x1152, 896x1120"),
3462
+ .describe("Output size. auto lets the model pick a size of about 2K from the prompt. square is promoted to square_hd (1024x1024). 4:3 presets use 1152x864 or 864x1152; 16:9 presets use 1280x720 or 720x1280. Explicit dimensions must match a supported size: 1024x1024, 1024x3072, 1120x896, 1152x2944, 1152x864, 1248x3328, 1248x832, 1280x3072, 1280x720, 1280x800, 1296x3168, 1440x2560, 1440x2880, 1440x720, 1600x2560, 1664x2496, 1728x2304, 1792x2240, 2048x2048, 2240x1792, 2304x1728, 2496x1664, 2560x1440, 2560x1600, 2880x1440, 2944x1152, 3072x1024, 3072x1280, 3168x1296, 3328x1248, 720x1280, 720x1440, 800x1280, 832x1248, 864x1152, 896x1120"),
3425
3463
  quality: z
3426
3464
  .enum(["low", "medium", "high"])
3427
3465
  .default("medium")
@@ -3852,6 +3890,7 @@ export const FalBytedanceSeedreamV5FlashEditRequestSchema = z.object({
3852
3890
  "landscape_4_3",
3853
3891
  "landscape_16_9",
3854
3892
  "auto_1K",
3893
+ "auto_1.5K",
3855
3894
  "auto_2K",
3856
3895
  ]),
3857
3896
  ])
@@ -3897,6 +3936,7 @@ export const FalBytedanceSeedreamV5FlashTextToImageRequestSchema = z.object({
3897
3936
  "landscape_4_3",
3898
3937
  "landscape_16_9",
3899
3938
  "auto_1K",
3939
+ "auto_1.5K",
3900
3940
  "auto_2K",
3901
3941
  ]),
3902
3942
  ])
@@ -4163,10 +4203,10 @@ export const FalMeshyV7p1TextTo3dRequestSchema = z
4163
4203
  .describe("Whether to enable prompt expansion. This will use a large language model to expand the prompt with additional details while maintaining the original meaning."),
4164
4204
  texture_prompt: z
4165
4205
  .string()
4166
- .max(600)
4206
+ .max(800)
4167
4207
  .nullable()
4168
4208
  .optional()
4169
- .describe("Additional text prompt to guide the texturing process (only used in 'full' mode)"),
4209
+ .describe("Additional text prompt to guide the texturing process (only used in 'full' mode). Maximum 800 characters."),
4170
4210
  texture_image_url: z
4171
4211
  .string()
4172
4212
  .nullable()
@@ -4252,10 +4292,10 @@ export const FalMeshyV7p1ImageTo3dRequestSchema = z
4252
4292
  .describe("Pose mode for the generated model. 'a-pose' generates an A-pose, 't-pose' generates a T-pose, empty string for no specific pose."),
4253
4293
  texture_prompt: z
4254
4294
  .string()
4255
- .max(600)
4295
+ .max(800)
4256
4296
  .nullable()
4257
4297
  .optional()
4258
- .describe("Text prompt to guide the texturing process"),
4298
+ .describe("Text prompt to guide the texturing process. Maximum 800 characters."),
4259
4299
  texture_image_url: z
4260
4300
  .string()
4261
4301
  .nullable()
@@ -4337,10 +4377,10 @@ export const FalMeshyV7p1MultiImageTo3dRequestSchema = z
4337
4377
  .describe("Pose mode for the generated model. 'a-pose' generates an A-pose, 't-pose' generates a T-pose, empty string for no specific pose."),
4338
4378
  texture_prompt: z
4339
4379
  .string()
4340
- .max(600)
4380
+ .max(800)
4341
4381
  .nullable()
4342
4382
  .optional()
4343
- .describe("Text prompt to guide the texturing process. Requires should_texture to be true."),
4383
+ .describe("Text prompt to guide the texturing process. Maximum 800 characters. Requires should_texture to be true."),
4344
4384
  texture_image_url: z
4345
4385
  .string()
4346
4386
  .nullable()
@@ -5109,7 +5149,7 @@ export const FalXaiGrokImagineVideoV1p5TextToVideoRequestSchema = z.object({
5109
5149
  .default("720p")
5110
5150
  .describe("Resolution of the output video."),
5111
5151
  aspect_ratio: z
5112
- .enum(["16:9", "4:3", "3:2", "1:1", "2:3", "3:4", "9:16"])
5152
+ .enum(["16:9", "4:3", "3:2", "1:1", "2:3", "3:4", "9:16", "21:9", "5:2"])
5113
5153
  .default("16:9")
5114
5154
  .describe("Aspect ratio of the generated video."),
5115
5155
  });
@@ -11135,14 +11175,11 @@ export const FalBytedanceSeedance2p0UsReferenceToVideoRequestSchema = z
11135
11175
  // Bytedance Seedance 2.5 US text-to-video
11136
11176
  export const FalBytedanceSeedance2p5UsTextToVideoRequestSchema = z.object({
11137
11177
  prompt: z.string().describe("The text prompt used to generate the video"),
11138
- resolution: z
11139
- .enum(["480p", "720p", "1080p"])
11140
- .default("720p")
11141
- .describe("Video resolution - 480p for faster generation, 720p for balance, 1080p for high quality."),
11178
+ resolution: Seedance2p5ResolutionSchema.default("720p").describe("Video resolution - 480p for faster generation, 720p for balance, 1080p for high quality, 4k for highest quality."),
11142
11179
  draft: z
11143
11180
  .boolean()
11144
11181
  .default(false)
11145
- .describe("Generate a draft preview at 480p, overriding resolution. Returns a draft_id for completing the draft at 1080p within 14 days."),
11182
+ .describe("Generate a draft preview at 480p, overriding resolution. Returns a draft_id for completing the draft at 1080p or 4k within 14 days."),
11146
11183
  duration: z
11147
11184
  .enum([
11148
11185
  "auto",
@@ -11213,14 +11250,11 @@ export const FalBytedanceSeedance2p5UsImageToVideoRequestSchema = z.object({
11213
11250
  .nullable()
11214
11251
  .optional()
11215
11252
  .describe("The URL of the image to use as the last frame of the video. When provided, the generated video will transition from the starting image to this ending image. Supported formats: JPEG, PNG, WebP. Max 30 MB."),
11216
- resolution: z
11217
- .enum(["480p", "720p", "1080p"])
11218
- .default("720p")
11219
- .describe("Video resolution - 480p for faster generation, 720p for balance, 1080p for high quality."),
11253
+ resolution: Seedance2p5ResolutionSchema.default("720p").describe("Video resolution - 480p for faster generation, 720p for balance, 1080p for high quality, 4k for highest quality."),
11220
11254
  draft: z
11221
11255
  .boolean()
11222
11256
  .default(false)
11223
- .describe("Generate a draft preview at 480p, overriding resolution. Returns a draft_id for completing the draft at 1080p within 14 days."),
11257
+ .describe("Generate a draft preview at 480p, overriding resolution. Returns a draft_id for completing the draft at 1080p or 4k within 14 days."),
11224
11258
  duration: z
11225
11259
  .enum([
11226
11260
  "auto",
@@ -11408,6 +11442,23 @@ export const FalBytedanceSeedance2p5FlashReferenceToVideoRequestSchema = z.objec
11408
11442
  .describe("Random seed for generation."),
11409
11443
  end_user_id: FalBytedanceSeedance2p5FlashImageToVideoRequestSchema.shape.end_user_id,
11410
11444
  });
11445
+ // fal queue OpenAPI, Seedance25FlashTextToVideoInput (2026-11-30).
11446
+ // Prompt is required. Resolution is 480p or 720p. Duration is "auto" or a
11447
+ // digit string from "4" to "30". There is no draft request field.
11448
+ export const FalBytedanceSeedance2p5FlashTextToVideoRequestSchema = z.object({
11449
+ prompt: z.string().describe("The text prompt used to generate the video."),
11450
+ resolution: FalBytedanceSeedance2p5FlashImageToVideoRequestSchema.shape.resolution,
11451
+ duration: FalBytedanceSeedance2p5FlashImageToVideoRequestSchema.shape.duration,
11452
+ aspect_ratio: Seedance2p5AspectRatioSchema.default("auto").describe("The aspect ratio of the generated video. Use 16:9 for landscape, 9:16 for portrait, 1:1 for square, 21:9 for ultrawide, or auto to let the model decide."),
11453
+ ...FalBytedanceSeedance2p5FlashImageToVideoRequestSchema.pick({
11454
+ generate_audio: true,
11455
+ bitrate_mode: true,
11456
+ codec: true,
11457
+ output_format: true,
11458
+ return_last_frame: true,
11459
+ }).shape,
11460
+ end_user_id: FalBytedanceSeedance2p5FlashImageToVideoRequestSchema.shape.end_user_id,
11461
+ });
11411
11462
  // Bytedance Seedance 2.5 US reference-to-video. The per-modality caps are
11412
11463
  // documented in the field descriptions only (fal's 422 validator does not
11413
11464
  // report them); together they also bound the documented 50-file total.
@@ -11418,9 +11469,9 @@ export const FalBytedanceSeedance2p5UsReferenceToVideoRequestSchema = z.object({
11418
11469
  .optional()
11419
11470
  .describe("The text prompt used to generate the video."),
11420
11471
  task: z
11421
- .enum(["reference", "editing", "extension"])
11472
+ .enum(["auto", "reference", "editing", "extension"])
11422
11473
  .default("reference")
11423
- .describe("The type of video generation task. Reference uses the supplied media as guidance. Editing modifies a reference video and automatically coerces aspect_ratio and duration to auto. Extension continues a reference video and automatically coerces aspect_ratio to auto."),
11474
+ .describe("The type of video generation task. Reference uses the supplied media as guidance. Editing modifies a reference video and automatically coerces aspect_ratio and duration to auto. Extension continues a reference video and automatically coerces aspect_ratio to auto. Auto leaves the task type unset so the model decides it from the prompt and references."),
11424
11475
  image_urls: z
11425
11476
  .array(z.string())
11426
11477
  .max(30)
@@ -11436,14 +11487,11 @@ export const FalBytedanceSeedance2p5UsReferenceToVideoRequestSchema = z.object({
11436
11487
  .max(10)
11437
11488
  .optional()
11438
11489
  .describe("Reference audio to guide video generation. Refer to them in the prompt as @Audio1, @Audio2, etc. Supported formats: MP3, WAV. Up to 10 files. Each file must be 1.8 to 30.2 seconds and no larger than 15 MB; combined duration must not exceed 30.2 seconds."),
11439
- resolution: z
11440
- .enum(["480p", "720p", "1080p"])
11441
- .default("720p")
11442
- .describe("Video resolution - 480p for faster generation, 720p for balance, 1080p for high quality."),
11490
+ resolution: Seedance2p5ResolutionSchema.default("720p").describe("Video resolution - 480p for faster generation, 720p for balance, 1080p for high quality, 4k for highest quality."),
11443
11491
  draft: z
11444
11492
  .boolean()
11445
11493
  .default(false)
11446
- .describe("Generate a draft preview at 480p, overriding resolution. Returns a draft_id for completing the draft at 1080p within 14 days."),
11494
+ .describe("Generate a draft preview at 480p, overriding resolution. Returns a draft_id for completing the draft at 1080p or 4k within 14 days."),
11447
11495
  duration: z
11448
11496
  .enum([
11449
11497
  "auto",
@@ -11513,9 +11561,9 @@ export const FalBytedanceSeedance2p5DraftCompleteRequestSchema = z.object({
11513
11561
  .max(8192)
11514
11562
  .describe("The draft_id returned with draft enabled. Valid for seven days and only for the original caller."),
11515
11563
  resolution: z
11516
- .literal("1080p")
11564
+ .enum(["1080p", "4k"])
11517
11565
  .default("1080p")
11518
- .describe("Completed drafts only support 1080p output."),
11566
+ .describe("Resolution of the completed video: 1080p or 4k."),
11519
11567
  codec: z
11520
11568
  .enum(["auto", "H264", "H265"])
11521
11569
  .default("auto")
@@ -11529,9 +11577,9 @@ export const FalBytedanceSeedance2p5UsDraftCompleteRequestSchema = z.object({
11529
11577
  .max(8192)
11530
11578
  .describe("The draft_id returned with draft enabled. Valid for 14 days and only for the original caller."),
11531
11579
  resolution: z
11532
- .literal("1080p")
11580
+ .enum(["1080p", "4k"])
11533
11581
  .default("1080p")
11534
- .describe("Completed drafts only support 1080p output."),
11582
+ .describe("Resolution of the completed video: 1080p or 4k."),
11535
11583
  codec: z
11536
11584
  .enum(["auto", "H264", "H265"])
11537
11585
  .default("auto")
@@ -11545,10 +11593,10 @@ export const FalMeshyV6LiteRetextureRequestSchema = z
11545
11593
  .describe("URL or base64 data URI of a 3D model to texture. Supports .glb, .gltf, .obj, .fbx, .stl formats. Can be a publicly accessible URL or data URI with MIME type application/octet-stream."),
11546
11594
  text_style_prompt: z
11547
11595
  .string()
11548
- .max(600)
11596
+ .max(800)
11549
11597
  .nullable()
11550
11598
  .optional()
11551
- .describe("Describe your desired texture style using text. Maximum 600 characters. Required if image_style_url is not provided."),
11599
+ .describe("Describe your desired texture style using text. Maximum 800 characters. Required if image_style_url is not provided."),
11552
11600
  image_style_url: z
11553
11601
  .string()
11554
11602
  .nullable()
@@ -14194,12 +14242,16 @@ export const FalKlingV4TextToVideoRequestSchema = z.object({
14194
14242
  .max(30)
14195
14243
  .default(5)
14196
14244
  .describe("Video duration in seconds (3-30)."),
14245
+ hdr: z
14246
+ .boolean()
14247
+ .optional()
14248
+ .describe("10-bit HDR at 1080p or 4k, billed per output second."),
14197
14249
  resolution: z
14198
- .enum(["720p", "1080p"])
14250
+ .enum(["720p", "1080p", "4k"])
14199
14251
  .default("1080p")
14200
14252
  .describe("Output resolution."),
14201
14253
  aspect_ratio: z
14202
- .enum(["16:9", "9:16", "1:1", "21:9"])
14254
+ .enum(["16:9", "9:16", "1:1", "4:3", "3:4", "21:9"])
14203
14255
  .default("16:9")
14204
14256
  .describe("Aspect ratio of the generated video."),
14205
14257
  });
@@ -14242,11 +14294,39 @@ export const FalKlingV4ImageToVideoRequestSchema = z.object({
14242
14294
  .max(30)
14243
14295
  .default(5)
14244
14296
  .describe("Video duration in seconds (3-30)."),
14297
+ hdr: z
14298
+ .boolean()
14299
+ .optional()
14300
+ .describe("10-bit HDR at 1080p or 4k, billed per output second."),
14245
14301
  resolution: z
14246
- .enum(["720p", "1080p"])
14302
+ .enum(["720p", "1080p", "4k"])
14247
14303
  .default("1080p")
14248
14304
  .describe("Output resolution."),
14249
14305
  });
14306
+ // Docs: https://fal.ai/models/kling/v4/flash/image-to-video/api
14307
+ export const FalKlingV4FlashImageToVideoRequestSchema = z.object({
14308
+ prompt: z
14309
+ .string()
14310
+ .max(26000)
14311
+ .nullish()
14312
+ .describe("Optional text describing the shot."),
14313
+ start_image_url: FalKlingV4ImageToVideoRequestSchema.shape.start_image_url,
14314
+ duration: z
14315
+ .number()
14316
+ .int()
14317
+ .min(3)
14318
+ .max(20)
14319
+ .default(5)
14320
+ .describe("Output duration in seconds."),
14321
+ resolution: z.enum(["720p"]).default("720p").describe("Output resolution."),
14322
+ });
14323
+ // Docs: https://fal.ai/models/kling/v4/flash/text-to-video/api
14324
+ export const FalKlingV4FlashTextToVideoRequestSchema = z.object({
14325
+ prompt: z.string().max(26000).describe("Text prompt for video generation."),
14326
+ duration: FalKlingV4FlashImageToVideoRequestSchema.shape.duration,
14327
+ resolution: FalKlingV4FlashImageToVideoRequestSchema.shape.resolution,
14328
+ aspect_ratio: FalKlingV4TextToVideoRequestSchema.shape.aspect_ratio,
14329
+ });
14250
14330
  // A Kling 4.0 reference element (an image character or a video element).
14251
14331
  // Free 422 probes returned this rule as a field error on elements[i]: a
14252
14332
  // frontal image with at least one reference image, or a video, but not both.
@@ -14324,15 +14404,85 @@ export const FalKlingV4ReferenceToVideoRequestSchema = z.object({
14324
14404
  .nullable()
14325
14405
  .optional()
14326
14406
  .describe("Characters/objects, referenced as @Element1, @Element2, ... (max 7). Up to 3 elements may carry a voice_id and up to 3 may be video elements."),
14407
+ hdr: z
14408
+ .boolean()
14409
+ .optional()
14410
+ .describe("10-bit HDR at 1080p or 4k, billed per output second."),
14327
14411
  resolution: z
14328
- .enum(["720p", "1080p"])
14412
+ .enum(["720p", "1080p", "4k"])
14329
14413
  .default("1080p")
14330
14414
  .describe("Output resolution."),
14331
14415
  aspect_ratio: z
14332
- .enum(["auto", "16:9", "9:16", "1:1", "21:9"])
14416
+ .enum(["auto", "16:9", "9:16", "1:1", "4:3", "3:4", "21:9"])
14333
14417
  .default("16:9")
14334
14418
  .describe("Aspect ratio of the generated video. 'auto' adapts it to the references."),
14335
14419
  });
14420
+ const KlingV4FlashReferenceImageSchema = FalKlingV4ImageToVideoRequestSchema.shape.start_image_url.describe("Reference image up to 30 MB, at least 300 px on both axes, with aspect ratio 0.4–2.5.");
14421
+ const KlingV4FlashElementSchema = z
14422
+ .object({
14423
+ frontal_image_url: KlingV4FlashReferenceImageSchema.nullish(),
14424
+ reference_image_urls: z
14425
+ .array(KlingV4FlashReferenceImageSchema)
14426
+ .min(1)
14427
+ .max(3)
14428
+ .nullish()
14429
+ .describe("Additional views of the element."),
14430
+ video_url: KlingV4MediaUrlSchema.nullish().describe("Element video, 3–8 seconds, used in place of images. Up to 300 MB, 700–4553 px on both axes, aspect ratio 0.4–2.5, 23.9–60.05 fps."),
14431
+ })
14432
+ .refine((e) => !(e.video_url && (e.frontal_image_url || e.reference_image_urls?.length)), { message: "Use a video or images for an element." });
14433
+ // Docs: https://fal.ai/models/kling/v4/flash/reference-to-video/api
14434
+ export const FalKlingV4FlashReferenceToVideoRequestSchema = z
14435
+ .object({
14436
+ prompt: FalKlingV4FlashTextToVideoRequestSchema.shape.prompt.describe("Reference images, videos and elements as @Image1, @Video1 and @Element1 in the prompt."),
14437
+ duration: FalKlingV4FlashImageToVideoRequestSchema.shape.duration,
14438
+ start_image_url: FalKlingV4ReferenceToVideoRequestSchema.shape.start_image_url,
14439
+ image_urls: z
14440
+ .array(KlingV4FlashReferenceImageSchema)
14441
+ .max(10)
14442
+ .nullish()
14443
+ .describe("Reference images, numbered from @Image1."),
14444
+ video_urls: FalKlingV4ReferenceToVideoRequestSchema.shape.video_urls.describe("Up to 5 reference videos, 3–20 seconds each. All videos, including element videos, share a 20-second limit. Each video can be up to 300 MB, 700–4553 px on both axes, aspect ratio 0.4–2.5, 23.9–60.05 fps."),
14445
+ elements: z
14446
+ .array(KlingV4FlashElementSchema)
14447
+ .max(7)
14448
+ .refine((elements) => elements.filter((element) => element.video_url).length <= 3, "At most three elements may contain a video.")
14449
+ .nullish()
14450
+ .describe("Up to seven elements, including up to three video elements."),
14451
+ keep_audio: z
14452
+ .boolean()
14453
+ .default(false)
14454
+ .describe("Keep the audio of the first reference video."),
14455
+ resolution: FalKlingV4FlashImageToVideoRequestSchema.shape.resolution,
14456
+ aspect_ratio: FalKlingV4ReferenceToVideoRequestSchema.shape.aspect_ratio,
14457
+ })
14458
+ .refine((p) => (p.image_urls?.length ?? 0) + Number(Boolean(p.start_image_url)) <= 10, {
14459
+ message: "The start frame and image references may total at most 10.",
14460
+ path: ["image_urls"],
14461
+ });
14462
+ // Docs: https://fal.ai/models/kling/v4/flash/video-to-video/api
14463
+ export const FalKlingV4FlashVideoToVideoRequestSchema = z.object({
14464
+ prompt: FalKlingV4FlashTextToVideoRequestSchema.shape.prompt.describe("Edit instruction. Reference the source video as @Video1."),
14465
+ video_url: KlingV4MediaUrlSchema.describe("The source video (@Video1), 3–20 s, up to 300 MB, 700–4553 px on both axes, aspect ratio 0.4–2.5, 23.9–60.05 fps."),
14466
+ image_urls: FalKlingV4FlashReferenceToVideoRequestSchema.shape.image_urls,
14467
+ video_urls: z
14468
+ .array(KlingV4MediaUrlSchema)
14469
+ .max(4)
14470
+ .nullish()
14471
+ .describe("Reference videos, numbered from @Video2. The source, reference and element videos may total up to 20 seconds."),
14472
+ elements: FalKlingV4FlashReferenceToVideoRequestSchema.shape.elements,
14473
+ keep_audio: z
14474
+ .boolean()
14475
+ .default(false)
14476
+ .describe("Keep the audio of the source video."),
14477
+ duration: z
14478
+ .number()
14479
+ .int()
14480
+ .min(3)
14481
+ .max(20)
14482
+ .nullish()
14483
+ .describe("Output duration in seconds. Defaults to the source video's length."),
14484
+ resolution: FalKlingV4FlashImageToVideoRequestSchema.shape.resolution,
14485
+ });
14336
14486
  // A Kling 4.0 image element of the video edit input.
14337
14487
  const KlingV4ImageElementSchema = z.object({
14338
14488
  frontal_image_url: KlingV4MediaUrlSchema.describe("The frontal image of the element (main view).\n\nMax file size: 30.0MB, Min width: 300px, Min height: 300px, Min aspect ratio: 0.40, Max aspect ratio: 2.50, Timeout: 20.0s"),
@@ -14375,8 +14525,12 @@ export const FalKlingV4VideoToVideoEditRequestSchema = z.object({
14375
14525
  .nullable()
14376
14526
  .optional()
14377
14527
  .describe("Output duration in seconds (3-30). Defaults to the source video's length."),
14528
+ hdr: z
14529
+ .boolean()
14530
+ .optional()
14531
+ .describe("10-bit HDR at 1080p or 4k, billed per output second."),
14378
14532
  resolution: z
14379
- .enum(["720p", "1080p"])
14533
+ .enum(["720p", "1080p", "4k"])
14380
14534
  .default("1080p")
14381
14535
  .describe("Output resolution."),
14382
14536
  });
@@ -14561,6 +14715,10 @@ export const FAL_ENDPOINT_REQUEST_SCHEMAS = {
14561
14715
  "kling/v4/reference-to-video": FalKlingV4ReferenceToVideoRequestSchema,
14562
14716
  "kling/v4/image-to-image": FalKlingV4ImageToImageRequestSchema,
14563
14717
  "kling/v4/text-to-image": FalKlingV4TextToImageRequestSchema,
14718
+ "kling/v4/flash/image-to-video": FalKlingV4FlashImageToVideoRequestSchema,
14719
+ "kling/v4/flash/text-to-video": FalKlingV4FlashTextToVideoRequestSchema,
14720
+ "kling/v4/flash/reference-to-video": FalKlingV4FlashReferenceToVideoRequestSchema,
14721
+ "kling/v4/flash/video-to-video": FalKlingV4FlashVideoToVideoRequestSchema,
14564
14722
  "kling/v4/image-to-video": FalKlingV4ImageToVideoRequestSchema,
14565
14723
  "kling/v4/text-to-video": FalKlingV4TextToVideoRequestSchema,
14566
14724
  "fal-ai/heygen/v3/filler-word-removal": FalHeygenV3FillerWordRemovalRequestSchema,
@@ -14586,6 +14744,7 @@ export const FAL_ENDPOINT_REQUEST_SCHEMAS = {
14586
14744
  "bytedance/seedance-2.5/us/image-to-video": FalBytedanceSeedance2p5UsImageToVideoRequestSchema,
14587
14745
  "bytedance/seedance-2.5/flash/image-to-video": FalBytedanceSeedance2p5FlashImageToVideoRequestSchema,
14588
14746
  "bytedance/seedance-2.5/flash/reference-to-video": FalBytedanceSeedance2p5FlashReferenceToVideoRequestSchema,
14747
+ "bytedance/seedance-2.5/flash/text-to-video": FalBytedanceSeedance2p5FlashTextToVideoRequestSchema,
14589
14748
  "bytedance/seedance-2.5/us/text-to-video": FalBytedanceSeedance2p5UsTextToVideoRequestSchema,
14590
14749
  "bytedance/seedance-2.0/us/reference-to-video": FalBytedanceSeedance2p0UsReferenceToVideoRequestSchema,
14591
14750
  "bytedance/seedance-2.0/us/image-to-video": FalBytedanceSeedance2p0UsImageToVideoRequestSchema,