@apicity/fal 0.13.3 → 0.14.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
@@ -2190,7 +2190,1299 @@ export const FalFluxVideoUpscaleRequestSchema = z.object({
2190
2190
  // Endpoint registry — every jsonBody endpoint path (as sent to queue.submit
2191
2191
  // as endpoint_id, i.e. without the leading slash) mapped to its request schema
2192
2192
  // ---------------------------------------------------------------------------
2193
+ // Docs: https://fal.ai/models/minimax/h3-max-turbo/extend-video/api
2194
+ export const FalMinimaxH3MaxTurboExtendVideoRequestSchema = z.object({
2195
+ video_url: z
2196
+ .string()
2197
+ .min(1)
2198
+ .describe("Source video URL: 1.625–60 seconds, up to 50 MB, aspect ratio 0.4–2.5"),
2199
+ prompt: z.string().min(1).max(50000),
2200
+ aspect_ratio: z
2201
+ .enum(["auto", "21:9", "16:9", "4:3", "1:1", "3:4", "9:16"])
2202
+ .default("auto"),
2203
+ enable_prompt_expansion: z.boolean().default(true),
2204
+ resolution: z.enum(["480P", "768P", "1080P", "2K"]).default("768P"),
2205
+ enable_safety_checker: z.boolean().default(true),
2206
+ duration: z
2207
+ .number()
2208
+ .min(0.71)
2209
+ .max(15)
2210
+ .default(5)
2211
+ .describe("Seconds of new footage; billed independently of source duration"),
2212
+ seed: z.number().int().nullable().optional(),
2213
+ output: z.enum(["extended", "continuation"]).default("extended"),
2214
+ reference_audio_urls: z
2215
+ .array(z.string())
2216
+ .max(3)
2217
+ .optional()
2218
+ .describe("Audio references: each 2–15 seconds, at most 15 seconds combined"),
2219
+ });
2220
+ // Docs: https://fal.ai/models/xai/grok-imagine-video/v1.5/lite/text-to-video/api
2221
+ export const FalXaiGrokImagineVideoV1p5LiteTextToVideoRequestSchema = z.object({
2222
+ prompt: z.string().max(4096),
2223
+ duration: z.number().int().min(1).max(15).default(6),
2224
+ resolution: z.enum(["480p", "720p", "1080p"]).default("720p"),
2225
+ aspect_ratio: z
2226
+ .enum(["16:9", "4:3", "3:2", "1:1", "2:3", "3:4", "9:16"])
2227
+ .default("16:9"),
2228
+ });
2229
+ // Docs: https://fal.ai/models/minimax/h3-max/recast/api
2230
+ export const FalMinimaxH3MaxRecastRequestSchema = z
2231
+ .object({
2232
+ video_url: z
2233
+ .string()
2234
+ .describe("Source video: 5–30 seconds, no individual shot longer than 15 seconds"),
2235
+ reference_image_urls: z
2236
+ .array(z.string())
2237
+ .min(1)
2238
+ .max(4)
2239
+ .describe("One reference photo per new person, replacing main people left to right by default"),
2240
+ resolution: z.enum(["768P", "1080P"]).default("1080P"),
2241
+ prompt: z.string().max(2000).nullable().optional(),
2242
+ seed: z.number().int().min(0).nullable().optional(),
2243
+ })
2244
+ .strict();
2245
+ // Docs: https://fal.ai/models/blackforestlabs/flux-3/edit-image/api
2246
+ export const FalFlux3EditImageRequestSchema = z.object({
2247
+ prompt: z.string(),
2248
+ image_urls: z
2249
+ .array(z.string())
2250
+ .min(1)
2251
+ .max(10)
2252
+ .describe("Reference URLs or data URIs: at least 256 pixels per dimension and at most 4 MP; first image controls auto aspect ratio"),
2253
+ aspect_ratio: z
2254
+ .enum([
2255
+ "auto",
2256
+ "21:9",
2257
+ "2:1",
2258
+ "16:9",
2259
+ "3:2",
2260
+ "7:5",
2261
+ "4:3",
2262
+ "5:4",
2263
+ "1:1",
2264
+ "4:5",
2265
+ "3:4",
2266
+ "5:7",
2267
+ "2:3",
2268
+ "9:16",
2269
+ "1:2",
2270
+ ])
2271
+ .default("auto"),
2272
+ resolution: z.enum(["512sq", "768sq", "1k", "2k", "4k"]).default("1k"),
2273
+ enable_prompt_expansion: z.boolean().default(false),
2274
+ safety_tolerance: z.number().int().min(0).max(4).default(2),
2275
+ output_format: z.enum(["jpeg", "png"]).default("jpeg"),
2276
+ sync_mode: z.boolean().default(false),
2277
+ version: z.literal("latest").default("latest"),
2278
+ });
2279
+ // Docs: https://fal.ai/models/blackforestlabs/flux-3/text-to-image/api
2280
+ export const FalFlux3TextToImageRequestSchema = FalFlux3EditImageRequestSchema.omit({ image_urls: true });
2281
+ // Docs: https://fal.ai/models/xai/grok-imagine-video/v1.5/lite/image-to-video/api
2282
+ export const FalXaiGrokImagineVideoV1p5LiteImageToVideoRequestSchema = FalXaiGrokImagineVideoV1p5LiteTextToVideoRequestSchema.omit({
2283
+ aspect_ratio: true,
2284
+ }).extend({ image_url: z.string() });
2285
+ // Docs: https://fal.ai/models/ideogram/v4.5/edit/api
2286
+ export const FalIdeogramV4p5EditRequestSchema = z
2287
+ .object({
2288
+ prompt: z.string().min(1).max(10000),
2289
+ image_url: z.string(),
2290
+ reference_image_urls: z
2291
+ .array(z.string())
2292
+ .max(4)
2293
+ .optional()
2294
+ .describe("Up to four references, or three when a mask is provided."),
2295
+ mask_url: z
2296
+ .string()
2297
+ .nullable()
2298
+ .optional()
2299
+ .describe("Mask matching source dimensions: black edits, white preserves. Both regions must be present."),
2300
+ edit_precision: z.enum(["regular", "high"]).default("regular"),
2301
+ quality: z.enum(["very_low", "low", "medium", "high"]).default("medium"),
2302
+ image_size: z
2303
+ .union([
2304
+ z.enum([
2305
+ "auto",
2306
+ "square",
2307
+ "square_hd",
2308
+ "portrait_4_3",
2309
+ "landscape_4_3",
2310
+ "portrait_16_9",
2311
+ "landscape_16_9",
2312
+ ]),
2313
+ z
2314
+ .object({
2315
+ width: z
2316
+ .number()
2317
+ .int()
2318
+ .min(256)
2319
+ .max(14142)
2320
+ .multipleOf(32)
2321
+ .default(512),
2322
+ height: z
2323
+ .number()
2324
+ .int()
2325
+ .min(256)
2326
+ .max(14142)
2327
+ .multipleOf(32)
2328
+ .default(512),
2329
+ })
2330
+ .refine((size) => size.width * size.height <= 4194304 &&
2331
+ Math.max(size.width, size.height) /
2332
+ Math.min(size.width, size.height) <=
2333
+ 6, {
2334
+ message: "Custom sizes must have area <=4194304 and aspect ratio <=6:1",
2335
+ }),
2336
+ ])
2337
+ .default("auto")
2338
+ .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."),
2339
+ num_images: z.number().int().min(1).max(8).default(1),
2340
+ seed: z.number().int().nullable().optional(),
2341
+ sync_mode: z.boolean().default(false),
2342
+ })
2343
+ .strict()
2344
+ .superRefine((p, ctx) => {
2345
+ if (p.mask_url != null && (p.reference_image_urls?.length ?? 0) > 3) {
2346
+ ctx.addIssue({
2347
+ code: "custom",
2348
+ path: ["reference_image_urls"],
2349
+ message: "Masked edits allow at most three reference images",
2350
+ });
2351
+ }
2352
+ if ((p.mask_url != null || p.edit_precision === "high") &&
2353
+ p.image_size !== "auto") {
2354
+ ctx.addIssue({
2355
+ code: "custom",
2356
+ path: ["image_size"],
2357
+ message: "Masked and high-precision edits require image_size auto",
2358
+ });
2359
+ }
2360
+ });
2361
+ // Docs: https://fal.ai/models/ideogram/v4.5/api
2362
+ export const FalIdeogramV4p5RequestSchema = z
2363
+ .object({
2364
+ prompt: z
2365
+ .string()
2366
+ .min(1)
2367
+ .max(10000)
2368
+ .describe("The generation or editing prompt."),
2369
+ image_size: z
2370
+ .union([
2371
+ z.object({
2372
+ width: z.number().int().gt(0).max(14142).default(512),
2373
+ height: z.number().int().gt(0).max(14142).default(512),
2374
+ }),
2375
+ z.enum([
2376
+ "square_hd",
2377
+ "square",
2378
+ "portrait_4_3",
2379
+ "portrait_16_9",
2380
+ "landscape_4_3",
2381
+ "landscape_16_9",
2382
+ ]),
2383
+ ])
2384
+ .refine((size) => typeof size === "string" ||
2385
+ new Set([
2386
+ "1024x1024",
2387
+ "1152x864",
2388
+ "864x1152",
2389
+ "1280x720",
2390
+ "720x1280",
2391
+ "1024x1024",
2392
+ "1024x3072",
2393
+ "1120x896",
2394
+ "1152x2944",
2395
+ "1152x864",
2396
+ "1248x3328",
2397
+ "1248x832",
2398
+ "1280x3072",
2399
+ "1280x720",
2400
+ "1280x800",
2401
+ "1296x3168",
2402
+ "1440x2560",
2403
+ "1440x2880",
2404
+ "1440x720",
2405
+ "1600x2560",
2406
+ "1664x2496",
2407
+ "1728x2304",
2408
+ "1792x2240",
2409
+ "2048x2048",
2410
+ "2240x1792",
2411
+ "2304x1728",
2412
+ "2496x1664",
2413
+ "2560x1440",
2414
+ "2560x1600",
2415
+ "2880x1440",
2416
+ "2944x1152",
2417
+ "3072x1024",
2418
+ "3072x1280",
2419
+ "3168x1296",
2420
+ "3328x1248",
2421
+ "720x1280",
2422
+ "720x1440",
2423
+ "800x1280",
2424
+ "832x1248",
2425
+ "864x1152",
2426
+ "896x1120",
2427
+ ]).has(`${size.width}x${size.height}`), { message: "Explicit dimensions must be one of the documented sizes" })
2428
+ .default("square_hd")
2429
+ .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"),
2430
+ quality: z
2431
+ .enum(["low", "medium", "high"])
2432
+ .default("medium")
2433
+ .describe("Text-to-image quality."),
2434
+ enable_prompt_expansion: z
2435
+ .boolean()
2436
+ .default(true)
2437
+ .describe("Enable partner prompt expansion."),
2438
+ num_images: z
2439
+ .number()
2440
+ .int()
2441
+ .min(1)
2442
+ .max(8)
2443
+ .default(1)
2444
+ .describe("Number of images to generate."),
2445
+ seed: z
2446
+ .number()
2447
+ .int()
2448
+ .nullable()
2449
+ .optional()
2450
+ .describe("Random seed. Omit to choose automatically."),
2451
+ sync_mode: z
2452
+ .boolean()
2453
+ .default(false)
2454
+ .describe("Return image data directly in the response."),
2455
+ })
2456
+ .strict();
2457
+ // Docs: https://fal.ai/models/minimax/h3-max/insert-video/api
2458
+ export const FalMinimaxH3MaxInsertVideoRequestSchema = z
2459
+ .object({
2460
+ video_url: z.string().min(1),
2461
+ prompt: z.string().min(1).max(50000).nullable().optional(),
2462
+ reference_image_urls: z.array(z.string()).max(9).optional(),
2463
+ reference_video_urls: z.array(z.string()).max(3).optional(),
2464
+ start_time: z.number().min(1.625).max(60),
2465
+ resume_time: z.number().gt(1.625).max(60),
2466
+ duration: z.number().min(5).max(13).default(5),
2467
+ resolution: z.enum(["480p", "768p"]).default("768p"),
2468
+ seed: z.number().int().min(0).max(2147483647).nullable().optional(),
2469
+ enable_prompt_expansion: z.boolean().default(true),
2470
+ color_match: z.boolean().default(true),
2471
+ })
2472
+ .strict();
2473
+ // Docs: https://fal.ai/models/elevenlabs/tts/eleven-v4-turbo/api
2474
+ export const FalElevenlabsTtsElevenV4TurboRequestSchema = z.object({
2475
+ text: z
2476
+ .string()
2477
+ .min(1)
2478
+ .max(5000)
2479
+ .describe("The text to convert to speech. Supports audio tags such as [whispering] and IPA pronunciation enclosed in forward slashes."),
2480
+ voice: z
2481
+ .string()
2482
+ .default("Rachel")
2483
+ .describe("The voice to use for speech generation"),
2484
+ stability: z
2485
+ .number()
2486
+ .min(0)
2487
+ .max(1)
2488
+ .default(0.5)
2489
+ .describe("Voice stability. Lower values allow more expressive delivery; higher values make delivery more consistent."),
2490
+ similarity_boost: z
2491
+ .number()
2492
+ .min(0)
2493
+ .max(1)
2494
+ .default(0.75)
2495
+ .describe("How closely the output follows the reference voice. Higher values increase similarity but may reduce naturalness."),
2496
+ seed: z
2497
+ .number()
2498
+ .int()
2499
+ .min(0)
2500
+ .max(4294967295)
2501
+ .nullable()
2502
+ .optional()
2503
+ .describe("Seed for best-effort reproducibility. Identical output is not guaranteed."),
2504
+ language_code: z
2505
+ .string()
2506
+ .nullable()
2507
+ .optional()
2508
+ .describe("Language code (ISO 639-1) for speech generation and text normalization."),
2509
+ output_format: z
2510
+ .enum([
2511
+ "mp3_22050_32",
2512
+ "mp3_44100_32",
2513
+ "mp3_44100_64",
2514
+ "mp3_44100_96",
2515
+ "mp3_44100_128",
2516
+ "mp3_44100_192",
2517
+ "pcm_8000",
2518
+ "pcm_16000",
2519
+ "pcm_22050",
2520
+ "pcm_24000",
2521
+ "pcm_44100",
2522
+ "pcm_48000",
2523
+ "ulaw_8000",
2524
+ "alaw_8000",
2525
+ "opus_48000_32",
2526
+ "opus_48000_64",
2527
+ "opus_48000_96",
2528
+ "opus_48000_128",
2529
+ "opus_48000_192",
2530
+ ])
2531
+ .default("mp3_44100_128")
2532
+ .describe("Output format of the generated audio. Formatted as codec_sample_rate_bitrate."),
2533
+ apply_text_normalization: z
2534
+ .enum(["auto", "on", "off"])
2535
+ .default("auto")
2536
+ .describe("Whether to normalize text such as numbers and dates before generation."),
2537
+ timestamps: z
2538
+ .boolean()
2539
+ .default(false)
2540
+ .describe("Whether to return character-level timing information with the generated audio."),
2541
+ });
2542
+ // Docs: https://fal.ai/models/elevenlabs/tts/eleven-v4/api
2543
+ export const FalElevenlabsTtsElevenV4RequestSchema = z.object({
2544
+ text: z
2545
+ .string()
2546
+ .min(1)
2547
+ .max(5000)
2548
+ .describe("The text to convert to speech. Supports audio tags such as [whispering] and IPA pronunciation enclosed in forward slashes."),
2549
+ voice: z
2550
+ .string()
2551
+ .default("Rachel")
2552
+ .describe("The voice to use for speech generation"),
2553
+ stability: z
2554
+ .number()
2555
+ .min(0)
2556
+ .max(1)
2557
+ .default(0.5)
2558
+ .describe("Voice stability. Lower values allow more expressive delivery; higher values make delivery more consistent."),
2559
+ similarity_boost: z
2560
+ .number()
2561
+ .min(0)
2562
+ .max(1)
2563
+ .default(0.75)
2564
+ .describe("How closely the output follows the reference voice. Higher values increase similarity but may reduce naturalness."),
2565
+ seed: z
2566
+ .number()
2567
+ .int()
2568
+ .min(0)
2569
+ .max(4294967295)
2570
+ .nullable()
2571
+ .optional()
2572
+ .describe("Seed for best-effort reproducibility. Identical output is not guaranteed."),
2573
+ language_code: z
2574
+ .string()
2575
+ .nullable()
2576
+ .optional()
2577
+ .describe("Language code (ISO 639-1) for speech generation and text normalization."),
2578
+ output_format: z
2579
+ .enum([
2580
+ "mp3_22050_32",
2581
+ "mp3_44100_32",
2582
+ "mp3_44100_64",
2583
+ "mp3_44100_96",
2584
+ "mp3_44100_128",
2585
+ "mp3_44100_192",
2586
+ "pcm_8000",
2587
+ "pcm_16000",
2588
+ "pcm_22050",
2589
+ "pcm_24000",
2590
+ "pcm_44100",
2591
+ "pcm_48000",
2592
+ "ulaw_8000",
2593
+ "alaw_8000",
2594
+ "opus_48000_32",
2595
+ "opus_48000_64",
2596
+ "opus_48000_96",
2597
+ "opus_48000_128",
2598
+ "opus_48000_192",
2599
+ ])
2600
+ .default("mp3_44100_128")
2601
+ .describe("Output format of the generated audio. Formatted as codec_sample_rate_bitrate."),
2602
+ apply_text_normalization: z
2603
+ .enum(["auto", "on", "off"])
2604
+ .default("auto")
2605
+ .describe("Whether to normalize text such as numbers and dates before generation."),
2606
+ timestamps: z
2607
+ .boolean()
2608
+ .default(false)
2609
+ .describe("Whether to return character-level timing information with the generated audio."),
2610
+ });
2611
+ // Docs: https://fal.ai/models/google/gemini-3.8-flash-tts/api
2612
+ export const FalGoogleGemini3p8FlashTtsRequestSchema = z
2613
+ .object({
2614
+ prompt: z
2615
+ .string()
2616
+ .nullable()
2617
+ .optional()
2618
+ .describe("Verbatim text for single-speaker speech. Put delivery directions in style_instructions; inline vocal events may use <laugh> or <sigh>. For dialogue, omit prompt and provide speakers and turns instead. The provider limits the complete input to 8,192 tokens."),
2619
+ style_instructions: z
2620
+ .string()
2621
+ .nullable()
2622
+ .optional()
2623
+ .describe("Delivery style, separate from the spoken transcript. Applies to all turns unless overridden."),
2624
+ voice: z
2625
+ .enum([
2626
+ "Achernar",
2627
+ "Achird",
2628
+ "Algenib",
2629
+ "Algieba",
2630
+ "Alnilam",
2631
+ "Aoede",
2632
+ "Autonoe",
2633
+ "Callirrhoe",
2634
+ "Charon",
2635
+ "Despina",
2636
+ "Enceladus",
2637
+ "Erinome",
2638
+ "Fenrir",
2639
+ "Gacrux",
2640
+ "Iapetus",
2641
+ "Kore",
2642
+ "Laomedeia",
2643
+ "Leda",
2644
+ "Orus",
2645
+ "Pulcherrima",
2646
+ "Puck",
2647
+ "Rasalgethi",
2648
+ "Sadachbia",
2649
+ "Sadaltager",
2650
+ "Schedar",
2651
+ "Sulafat",
2652
+ "Umbriel",
2653
+ "Vindemiatrix",
2654
+ "Zephyr",
2655
+ "Zubenelgenubi",
2656
+ ])
2657
+ .default("Kore")
2658
+ .describe("Prebuilt voice for single-speaker speech."),
2659
+ speakers: z
2660
+ .array(z
2661
+ .object({
2662
+ speaker_id: z.string().min(1),
2663
+ voice: z.enum([
2664
+ "Achernar",
2665
+ "Achird",
2666
+ "Algenib",
2667
+ "Algieba",
2668
+ "Alnilam",
2669
+ "Aoede",
2670
+ "Autonoe",
2671
+ "Callirrhoe",
2672
+ "Charon",
2673
+ "Despina",
2674
+ "Enceladus",
2675
+ "Erinome",
2676
+ "Fenrir",
2677
+ "Gacrux",
2678
+ "Iapetus",
2679
+ "Kore",
2680
+ "Laomedeia",
2681
+ "Leda",
2682
+ "Orus",
2683
+ "Pulcherrima",
2684
+ "Puck",
2685
+ "Rasalgethi",
2686
+ "Sadachbia",
2687
+ "Sadaltager",
2688
+ "Schedar",
2689
+ "Sulafat",
2690
+ "Umbriel",
2691
+ "Vindemiatrix",
2692
+ "Zephyr",
2693
+ "Zubenelgenubi",
2694
+ ]),
2695
+ })
2696
+ .strict())
2697
+ .min(2)
2698
+ .max(2)
2699
+ .nullable()
2700
+ .optional()
2701
+ .describe("Exactly two distinct speaker aliases and their prebuilt voices for dialogue."),
2702
+ turns: z
2703
+ .array(z
2704
+ .object({
2705
+ speaker_id: z.string().min(1),
2706
+ text: z.string().min(1),
2707
+ style_instructions: z.string().nullable().optional(),
2708
+ })
2709
+ .strict())
2710
+ .min(1)
2711
+ .nullable()
2712
+ .optional()
2713
+ .describe("Ordered dialogue turns, each identifying a configured speaker."),
2714
+ })
2715
+ .strict();
2716
+ // Docs: https://fal.ai/models/google/gemini-3.8-flash-lite-tts/api
2717
+ export const FalGoogleGemini3p8FlashLiteTtsRequestSchema = z
2718
+ .object({
2719
+ prompt: z
2720
+ .string()
2721
+ .nullable()
2722
+ .optional()
2723
+ .describe("Verbatim text for single-speaker speech. Put delivery directions in style_instructions; inline vocal events may use <laugh> or <sigh>. For dialogue, omit prompt and provide speakers and turns instead. The provider limits the complete input to 8,192 tokens."),
2724
+ style_instructions: z
2725
+ .string()
2726
+ .nullable()
2727
+ .optional()
2728
+ .describe("Delivery style, separate from the spoken transcript. Applies to all turns unless overridden."),
2729
+ voice: z
2730
+ .enum([
2731
+ "Achernar",
2732
+ "Achird",
2733
+ "Algenib",
2734
+ "Algieba",
2735
+ "Alnilam",
2736
+ "Aoede",
2737
+ "Autonoe",
2738
+ "Callirrhoe",
2739
+ "Charon",
2740
+ "Despina",
2741
+ "Enceladus",
2742
+ "Erinome",
2743
+ "Fenrir",
2744
+ "Gacrux",
2745
+ "Iapetus",
2746
+ "Kore",
2747
+ "Laomedeia",
2748
+ "Leda",
2749
+ "Orus",
2750
+ "Pulcherrima",
2751
+ "Puck",
2752
+ "Rasalgethi",
2753
+ "Sadachbia",
2754
+ "Sadaltager",
2755
+ "Schedar",
2756
+ "Sulafat",
2757
+ "Umbriel",
2758
+ "Vindemiatrix",
2759
+ "Zephyr",
2760
+ "Zubenelgenubi",
2761
+ ])
2762
+ .default("Kore")
2763
+ .describe("Prebuilt voice for single-speaker speech."),
2764
+ speakers: z
2765
+ .array(z
2766
+ .object({
2767
+ speaker_id: z.string().min(1),
2768
+ voice: z.enum([
2769
+ "Achernar",
2770
+ "Achird",
2771
+ "Algenib",
2772
+ "Algieba",
2773
+ "Alnilam",
2774
+ "Aoede",
2775
+ "Autonoe",
2776
+ "Callirrhoe",
2777
+ "Charon",
2778
+ "Despina",
2779
+ "Enceladus",
2780
+ "Erinome",
2781
+ "Fenrir",
2782
+ "Gacrux",
2783
+ "Iapetus",
2784
+ "Kore",
2785
+ "Laomedeia",
2786
+ "Leda",
2787
+ "Orus",
2788
+ "Pulcherrima",
2789
+ "Puck",
2790
+ "Rasalgethi",
2791
+ "Sadachbia",
2792
+ "Sadaltager",
2793
+ "Schedar",
2794
+ "Sulafat",
2795
+ "Umbriel",
2796
+ "Vindemiatrix",
2797
+ "Zephyr",
2798
+ "Zubenelgenubi",
2799
+ ]),
2800
+ })
2801
+ .strict())
2802
+ .min(2)
2803
+ .max(2)
2804
+ .nullable()
2805
+ .optional()
2806
+ .describe("Exactly two distinct speaker aliases and their prebuilt voices for dialogue."),
2807
+ turns: z
2808
+ .array(z
2809
+ .object({
2810
+ speaker_id: z.string().min(1),
2811
+ text: z.string().min(1),
2812
+ style_instructions: z.string().nullable().optional(),
2813
+ })
2814
+ .strict())
2815
+ .min(1)
2816
+ .nullable()
2817
+ .optional()
2818
+ .describe("Ordered dialogue turns, each identifying a configured speaker."),
2819
+ })
2820
+ .strict();
2821
+ // Docs: https://fal.ai/models/bytedance/seedream/v5/flash/layerize/api
2822
+ export const FalBytedanceSeedreamV5FlashLayerizeRequestSchema = z.object({
2823
+ prompt: z
2824
+ .string()
2825
+ .default("")
2826
+ .describe("Optional instructions describing which elements to separate. When empty, the model automatically separates the major elements. Normalized `<bbox>left top right bottom</bbox>` tags may be used for precise coordinate targeting."),
2827
+ image_url: z
2828
+ .string()
2829
+ .describe("URL of the image to decompose into a base image and independently editable layers. The image must contain between 512x512 and 6000x6000 total pixels, have an aspect ratio between 1/16 and 16, and be no larger than 30 MB."),
2830
+ image_size: z
2831
+ .enum(["auto", "auto_1K", "auto_1.5K", "auto_2K"])
2832
+ .default("auto")
2833
+ .describe("Resolution tier for the output base image and layers. `auto` adapts to the input image while preserving each element's aspect ratio."),
2834
+ sync_mode: z
2835
+ .boolean()
2836
+ .default(false)
2837
+ .describe("If `True`, the media will be returned as a data URI and the output data won't be available in the request history."),
2838
+ enable_safety_checker: z
2839
+ .boolean()
2840
+ .default(true)
2841
+ .describe("If set to true, the safety checker will be enabled. Disabling it requires account authorization; unauthorized requests are always checked."),
2842
+ });
2843
+ // Docs: https://fal.ai/models/bytedance/seedream/v5/flash/edit/api
2844
+ export const FalBytedanceSeedreamV5FlashEditRequestSchema = z.object({
2845
+ prompt: z.string().describe("The text prompt used to edit the image."),
2846
+ image_size: z
2847
+ .union([
2848
+ z.object({
2849
+ width: z.number().int().gt(0).max(14142).default(512),
2850
+ height: z.number().int().gt(0).max(14142).default(512),
2851
+ }),
2852
+ z.enum([
2853
+ "square_hd",
2854
+ "square",
2855
+ "portrait_4_3",
2856
+ "portrait_16_9",
2857
+ "landscape_4_3",
2858
+ "landscape_16_9",
2859
+ "auto_1K",
2860
+ "auto_2K",
2861
+ ]),
2862
+ ])
2863
+ .default("auto_2K")
2864
+ .describe("The size of the generated image. Total pixels must be between 1024x1024 and 2048x2048, with aspect ratio between 1/16 and 16."),
2865
+ num_images: z
2866
+ .number()
2867
+ .int()
2868
+ .min(1)
2869
+ .max(6)
2870
+ .default(1)
2871
+ .describe("Number of separate model generations to run with the prompt."),
2872
+ output_format: z
2873
+ .enum(["jpeg", "png"])
2874
+ .default("jpeg")
2875
+ .describe("The file format of the generated image."),
2876
+ sync_mode: z
2877
+ .boolean()
2878
+ .default(false)
2879
+ .describe("If `True`, the media will be returned as a data URI and the output data won't be available in the request history."),
2880
+ enable_safety_checker: z
2881
+ .boolean()
2882
+ .default(true)
2883
+ .describe("If set to true, the safety checker will be enabled. Disabling it requires account authorization; unauthorized requests are always checked."),
2884
+ image_urls: z
2885
+ .array(z.string())
2886
+ .describe("List of URLs of input reference images. Up to 10 images are supported; if more are sent, only the last 10 are used."),
2887
+ });
2888
+ // Docs: https://fal.ai/models/bytedance/seedream/v5/flash/text-to-image/api
2889
+ export const FalBytedanceSeedreamV5FlashTextToImageRequestSchema = z.object({
2890
+ prompt: z.string().describe("The text prompt used to generate the image."),
2891
+ image_size: z
2892
+ .union([
2893
+ z.object({
2894
+ width: z.number().int().gt(0).max(14142).default(512),
2895
+ height: z.number().int().gt(0).max(14142).default(512),
2896
+ }),
2897
+ z.enum([
2898
+ "square_hd",
2899
+ "square",
2900
+ "portrait_4_3",
2901
+ "portrait_16_9",
2902
+ "landscape_4_3",
2903
+ "landscape_16_9",
2904
+ "auto_1K",
2905
+ "auto_2K",
2906
+ ]),
2907
+ ])
2908
+ .default("auto_2K")
2909
+ .describe("The size of the generated image. Total pixels must be between 1024x1024 and 2048x2048, with aspect ratio between 1/16 and 16."),
2910
+ num_images: z
2911
+ .number()
2912
+ .int()
2913
+ .min(1)
2914
+ .max(6)
2915
+ .default(1)
2916
+ .describe("Number of separate model generations to run with the prompt."),
2917
+ output_format: z
2918
+ .enum(["jpeg", "png"])
2919
+ .default("jpeg")
2920
+ .describe("The file format of the generated image."),
2921
+ sync_mode: z
2922
+ .boolean()
2923
+ .default(false)
2924
+ .describe("If `True`, the media will be returned as a data URI and the output data won't be available in the request history."),
2925
+ enable_safety_checker: z
2926
+ .boolean()
2927
+ .default(true)
2928
+ .describe("If set to true, the safety checker will be enabled. Disabling it requires account authorization; unauthorized requests are always checked."),
2929
+ });
2930
+ // Docs: https://fal.ai/models/tripo3d/p2/text-to-3d/api
2931
+ export const FalTripo3dP2TextTo3dRequestSchema = z
2932
+ .object({
2933
+ prompt: z
2934
+ .string()
2935
+ .min(1)
2936
+ .max(1024)
2937
+ .describe("Text description of the 3D object to generate. Maximum 1024 characters."),
2938
+ negative_prompt: z
2939
+ .string()
2940
+ .max(255)
2941
+ .nullable()
2942
+ .optional()
2943
+ .describe("Text describing features to avoid in the generated model."),
2944
+ image_seed: z
2945
+ .number()
2946
+ .int()
2947
+ .nullable()
2948
+ .optional()
2949
+ .describe("Seed for the internal text-to-image step."),
2950
+ model_seed: z
2951
+ .number()
2952
+ .int()
2953
+ .nullable()
2954
+ .optional()
2955
+ .describe("Seed for geometry generation reproducibility."),
2956
+ face_limit: z
2957
+ .number()
2958
+ .int()
2959
+ .min(48)
2960
+ .max(50000)
2961
+ .nullable()
2962
+ .optional()
2963
+ .describe("Maximum number of faces for the generated mesh. Quad meshes support up to 25,000 faces."),
2964
+ texture: z
2965
+ .boolean()
2966
+ .default(true)
2967
+ .describe("Whether to generate textures for the model."),
2968
+ pbr: z
2969
+ .boolean()
2970
+ .default(true)
2971
+ .describe("Whether to generate PBR material maps. Enabling PBR also enables textures."),
2972
+ texture_seed: z
2973
+ .number()
2974
+ .int()
2975
+ .nullable()
2976
+ .optional()
2977
+ .describe("Seed for texture generation reproducibility."),
2978
+ texture_quality: z
2979
+ .enum(["fast", "standard", "detailed", "extreme"])
2980
+ .default("standard")
2981
+ .describe("Texture quality level."),
2982
+ texture_version: z
2983
+ .enum(["v3.5-20260815", "v3.0-20250812", "v2.5-20250123"])
2984
+ .nullable()
2985
+ .optional()
2986
+ .describe("Texture model version. The fast quality requires v3.5-20260815."),
2987
+ delight: z
2988
+ .boolean()
2989
+ .default(true)
2990
+ .describe("Remove baked-in lighting before texturing with v3.5-20260815."),
2991
+ auto_size: z
2992
+ .boolean()
2993
+ .default(false)
2994
+ .describe("Auto-scale the model to real-world dimensions in meters."),
2995
+ export_uv: z
2996
+ .boolean()
2997
+ .default(true)
2998
+ .describe("Whether to generate UV coordinates for the model."),
2999
+ export_orientation: z
3000
+ .enum(["+x", "-x", "-y", "+y"])
3001
+ .nullable()
3002
+ .optional()
3003
+ .describe("Optional forward axis for the exported model."),
3004
+ quad: z
3005
+ .boolean()
3006
+ .default(false)
3007
+ .describe("Generate quad mesh topology instead of triangles."),
3008
+ })
3009
+ .describe("Input for Text to 3D generation using the P2 model.");
3010
+ // Docs: https://fal.ai/models/tripo3d/p2/image-to-3d/api
3011
+ export const FalTripo3dP2ImageTo3dRequestSchema = z
3012
+ .object({
3013
+ image_url: z
3014
+ .string()
3015
+ .describe("URL of the input image for 3D model creation."),
3016
+ face_limit: z
3017
+ .number()
3018
+ .int()
3019
+ .min(48)
3020
+ .max(50000)
3021
+ .nullable()
3022
+ .optional()
3023
+ .describe("Maximum number of faces for the generated mesh. Quad meshes support up to 25,000 faces."),
3024
+ texture: z
3025
+ .boolean()
3026
+ .default(true)
3027
+ .describe("Whether to generate textures for the model."),
3028
+ pbr: z
3029
+ .boolean()
3030
+ .default(true)
3031
+ .describe("Whether to generate PBR material maps. Enabling PBR also enables textures."),
3032
+ model_seed: z
3033
+ .number()
3034
+ .int()
3035
+ .nullable()
3036
+ .optional()
3037
+ .describe("Seed for geometry generation reproducibility."),
3038
+ texture_seed: z
3039
+ .number()
3040
+ .int()
3041
+ .nullable()
3042
+ .optional()
3043
+ .describe("Seed for texture generation reproducibility."),
3044
+ texture_quality: z
3045
+ .enum(["fast", "standard", "detailed", "extreme"])
3046
+ .default("standard")
3047
+ .describe("Texture quality level."),
3048
+ texture_version: z
3049
+ .enum(["v3.5-20260815", "v3.0-20250812", "v2.5-20250123"])
3050
+ .nullable()
3051
+ .optional()
3052
+ .describe("Texture model version. The fast quality requires v3.5-20260815."),
3053
+ delight: z
3054
+ .boolean()
3055
+ .default(true)
3056
+ .describe("Remove baked-in lighting before texturing with v3.5-20260815."),
3057
+ auto_size: z
3058
+ .boolean()
3059
+ .default(false)
3060
+ .describe("Auto-scale the model to real-world dimensions in meters."),
3061
+ export_uv: z
3062
+ .boolean()
3063
+ .default(true)
3064
+ .describe("Whether to generate UV coordinates for the model."),
3065
+ export_orientation: z
3066
+ .enum(["+x", "-x", "-y", "+y"])
3067
+ .nullable()
3068
+ .optional()
3069
+ .describe("Optional forward axis for the exported model."),
3070
+ quad: z
3071
+ .boolean()
3072
+ .default(false)
3073
+ .describe("Generate quad mesh topology instead of triangles."),
3074
+ })
3075
+ .describe("Input for Image to 3D generation using the P2 model.");
3076
+ // Docs: https://fal.ai/models/recraft/v4.1/flash/text-to-image/api
3077
+ export const FalRecraftV4p1FlashTextToImageRequestSchema = z.object({
3078
+ prompt: z.string().min(1).max(10000),
3079
+ image_size: z
3080
+ .union([
3081
+ z.object({
3082
+ width: z.number().int().gt(0).max(14142).default(512),
3083
+ height: z.number().int().gt(0).max(14142).default(512),
3084
+ }),
3085
+ z.enum([
3086
+ "square_hd",
3087
+ "square",
3088
+ "portrait_4_3",
3089
+ "portrait_16_9",
3090
+ "landscape_4_3",
3091
+ "landscape_16_9",
3092
+ ]),
3093
+ ])
3094
+ .default("square_hd"),
3095
+ colors: z
3096
+ .array(z.object({
3097
+ r: z.number().int().min(0).max(255).default(0),
3098
+ g: z.number().int().min(0).max(255).default(0),
3099
+ b: z.number().int().min(0).max(255).default(0),
3100
+ }))
3101
+ .default([])
3102
+ .describe("An array of preferable colors"),
3103
+ background_color: z
3104
+ .unknown()
3105
+ .nullable()
3106
+ .optional()
3107
+ .describe("The preferable background color of the generated images."),
3108
+ enable_safety_checker: z
3109
+ .boolean()
3110
+ .default(true)
3111
+ .describe("If set to true, the safety checker will be enabled. Disabling it requires account authorization; unauthorized requests are always checked."),
3112
+ });
3113
+ // Docs: https://fal.ai/models/meshy/v7.1/text-to-3d/api
3114
+ export const FalMeshyV7p1TextTo3dRequestSchema = z
3115
+ .object({
3116
+ prompt: z
3117
+ .string()
3118
+ .max(600)
3119
+ .describe("Describe what kind of object the 3D model is. Maximum 600 characters."),
3120
+ mode: z
3121
+ .enum(["preview", "full"])
3122
+ .default("full")
3123
+ .describe("Generation mode. 'preview' returns untextured geometry only, 'full' returns textured model (preview + refine)."),
3124
+ seed: z
3125
+ .number()
3126
+ .int()
3127
+ .nullable()
3128
+ .optional()
3129
+ .describe("Seed for reproducible results. Same prompt and seed usually generate the same result."),
3130
+ model_type: z
3131
+ .enum(["standard", "lowpoly", "smart-topology"])
3132
+ .default("standard")
3133
+ .describe("Type of 3D mesh generation. 'standard' produces a regular high-detail mesh; 'lowpoly' produces a low-poly mesh optimized for cleaner polygons; 'smart-topology' uses Meshy-T2 for clean, natively separated parts on the geometry (preview) step. When set to 'lowpoly', the remesh controls (topology, target_polycount, should_remesh) are ignored by Meshy."),
3134
+ topology: z
3135
+ .enum(["quad", "triangle"])
3136
+ .default("triangle")
3137
+ .describe("Specify the topology of the generated model. Quad for smooth surfaces, Triangle for detailed geometry."),
3138
+ target_polycount: z
3139
+ .number()
3140
+ .int()
3141
+ .min(100)
3142
+ .max(300000)
3143
+ .default(30000)
3144
+ .describe("Target number of polygons in the generated model. When model_type is 'smart-topology' and this is left unset, Meshy's lower smart-topology default (4,000) is used instead; smart topology accepts at most 15,000."),
3145
+ should_remesh: z
3146
+ .boolean()
3147
+ .default(true)
3148
+ .describe("Whether to enable the remesh phase. When false, returns unprocessed triangular mesh."),
3149
+ symmetry_mode: z
3150
+ .enum(["off", "auto", "on"])
3151
+ .default("auto")
3152
+ .describe("Controls symmetry behavior during model generation."),
3153
+ enable_pbr: z
3154
+ .boolean()
3155
+ .default(false)
3156
+ .describe("Generate PBR Maps (metallic, roughness, normal) in addition to base color."),
3157
+ is_a_t_pose: z
3158
+ .boolean()
3159
+ .default(false)
3160
+ .describe("Deprecated: use pose_mode instead. When true, generates a T-pose model."),
3161
+ pose_mode: z
3162
+ .enum(["a-pose", "t-pose", ""])
3163
+ .default("")
3164
+ .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."),
3165
+ enable_prompt_expansion: z
3166
+ .boolean()
3167
+ .default(false)
3168
+ .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."),
3169
+ texture_prompt: z
3170
+ .string()
3171
+ .max(600)
3172
+ .nullable()
3173
+ .optional()
3174
+ .describe("Additional text prompt to guide the texturing process (only used in 'full' mode)"),
3175
+ texture_image_url: z
3176
+ .string()
3177
+ .nullable()
3178
+ .optional()
3179
+ .describe("2D image to guide the texturing process (only used in 'full' mode)"),
3180
+ enable_rigging: z
3181
+ .boolean()
3182
+ .default(false)
3183
+ .describe("Automatically rig the generated model as a humanoid character. Includes basic walking and running animations. Best results with humanoid characters that have clearly defined limbs."),
3184
+ rigging_height_meters: z
3185
+ .number()
3186
+ .gt(0)
3187
+ .default(1.7)
3188
+ .describe("Approximate height of the character in meters. Only used when enable_rigging is true."),
3189
+ enable_animation: z
3190
+ .boolean()
3191
+ .default(false)
3192
+ .describe("Apply an animation preset to the rigged model. Requires enable_rigging to be true."),
3193
+ animation_action_id: z
3194
+ .number()
3195
+ .int()
3196
+ .default(92)
3197
+ .describe('Animation preset ID from Meshy\'s library. Only used when enable_animation is true; in that case it must be in [0, 696] (``0`` is the "Idle" preset) and is otherwise rejected with a 422. See https://docs.meshy.ai/en/api/animation-library for available action IDs.'),
3198
+ enable_safety_checker: z
3199
+ .boolean()
3200
+ .default(true)
3201
+ .describe("If set to true, input data will be checked for safety before processing."),
3202
+ geometry_resolution: z
3203
+ .enum(["standard", "2k", "4k"])
3204
+ .nullable()
3205
+ .optional()
3206
+ .describe("Geometry resolution. 4k is only available with Meshy-7.1."),
3207
+ ultra_mode: z
3208
+ .boolean()
3209
+ .default(false)
3210
+ .describe("Deprecated: use geometry_resolution='2k'. If both fields are provided, geometry_resolution takes precedence."),
3211
+ })
3212
+ .describe("Input for Meshy-7.1 Text to 3D generation.");
3213
+ // Docs: https://fal.ai/models/meshy/v7.1/image-to-3d/api
3214
+ export const FalMeshyV7p1ImageTo3dRequestSchema = z
3215
+ .object({
3216
+ image_url: z
3217
+ .string()
3218
+ .describe("Image URL or base64 data URI for 3D model creation. Supports .jpg, .jpeg, and .png formats. Also supports AVIF and HEIF formats which will be automatically converted."),
3219
+ model_type: z
3220
+ .enum(["standard", "lowpoly", "smart-topology"])
3221
+ .default("standard")
3222
+ .describe("Type of 3D mesh generation. 'standard' produces a regular high-detail mesh; 'lowpoly' produces a low-poly mesh optimized for cleaner polygons; 'smart-topology' uses Meshy-T2 for clean, natively separated parts. When set to 'lowpoly', the remesh controls (topology, target_polycount, should_remesh) are ignored by Meshy."),
3223
+ topology: z
3224
+ .enum(["quad", "triangle"])
3225
+ .default("triangle")
3226
+ .describe("Specify the topology of the generated model. Quad for smooth surfaces, Triangle for detailed geometry."),
3227
+ target_polycount: z
3228
+ .number()
3229
+ .int()
3230
+ .min(100)
3231
+ .max(300000)
3232
+ .default(30000)
3233
+ .describe("Target number of polygons in the generated model. When model_type is 'smart-topology' and this is left unset, Meshy's lower smart-topology default (4,000) is used instead; smart topology accepts at most 15,000."),
3234
+ symmetry_mode: z
3235
+ .enum(["off", "auto", "on"])
3236
+ .default("auto")
3237
+ .describe("Controls symmetry behavior during model generation. Off disables symmetry, Auto determines it automatically, On enforces symmetry."),
3238
+ should_remesh: z
3239
+ .boolean()
3240
+ .default(true)
3241
+ .describe("Whether to enable the remesh phase"),
3242
+ should_texture: z
3243
+ .boolean()
3244
+ .default(true)
3245
+ .describe("Whether to generate textures"),
3246
+ enable_pbr: z
3247
+ .boolean()
3248
+ .default(false)
3249
+ .describe("Generate PBR Maps (metallic, roughness, normal) in addition to base color"),
3250
+ is_a_t_pose: z
3251
+ .boolean()
3252
+ .default(false)
3253
+ .describe("Deprecated: use pose_mode instead. When true, generates a T-pose model."),
3254
+ pose_mode: z
3255
+ .enum(["a-pose", "t-pose", ""])
3256
+ .default("")
3257
+ .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."),
3258
+ texture_prompt: z
3259
+ .string()
3260
+ .max(600)
3261
+ .nullable()
3262
+ .optional()
3263
+ .describe("Text prompt to guide the texturing process"),
3264
+ texture_image_url: z
3265
+ .string()
3266
+ .nullable()
3267
+ .optional()
3268
+ .describe("2D image to guide the texturing process"),
3269
+ enable_rigging: z
3270
+ .boolean()
3271
+ .default(false)
3272
+ .describe("Automatically rig the generated model as a humanoid character. Includes basic walking and running animations. Best results with humanoid characters that have clearly defined limbs."),
3273
+ rigging_height_meters: z
3274
+ .number()
3275
+ .gt(0)
3276
+ .default(1.7)
3277
+ .describe("Approximate height of the character in meters. Only used when enable_rigging is true."),
3278
+ enable_animation: z
3279
+ .boolean()
3280
+ .default(false)
3281
+ .describe("Apply an animation preset to the rigged model. Requires enable_rigging to be true."),
3282
+ animation_action_id: z
3283
+ .number()
3284
+ .int()
3285
+ .default(92)
3286
+ .describe('Animation preset ID from Meshy\'s library. Only used when enable_animation is true; in that case it must be in [0, 696] (``0`` is the "Idle" preset) and is otherwise rejected with a 422. See https://docs.meshy.ai/en/api/animation-library for available action IDs.'),
3287
+ enable_safety_checker: z
3288
+ .boolean()
3289
+ .default(true)
3290
+ .describe("If set to true, input data will be checked for safety before processing."),
3291
+ geometry_resolution: z
3292
+ .enum(["standard", "2k", "4k"])
3293
+ .nullable()
3294
+ .optional()
3295
+ .describe("Geometry resolution. 4k is only available with Meshy-7.1."),
3296
+ ultra_mode: z
3297
+ .boolean()
3298
+ .default(false)
3299
+ .describe("Deprecated: use geometry_resolution='2k'. If both fields are provided, geometry_resolution takes precedence."),
3300
+ })
3301
+ .describe("Input for Meshy-7.1 Image to 3D conversion.");
3302
+ // Docs: https://fal.ai/models/meshy/v7.1/multi-image-to-3d/api
3303
+ export const FalMeshyV7p1MultiImageTo3dRequestSchema = z
3304
+ .object({
3305
+ image_urls: z
3306
+ .array(z.string())
3307
+ .describe("1 to 4 images for 3D model creation. All images should depict the same object from different angles. Supports .jpg, .jpeg, .png formats, and AVIF/HEIF which will be automatically converted. If more than 4 images are provided, only the first 4 will be used."),
3308
+ topology: z
3309
+ .enum(["quad", "triangle"])
3310
+ .default("triangle")
3311
+ .describe("Specify the topology of the generated model. Quad for smooth surfaces, Triangle for detailed geometry."),
3312
+ target_polycount: z
3313
+ .number()
3314
+ .int()
3315
+ .min(100)
3316
+ .max(300000)
3317
+ .default(30000)
3318
+ .describe("Target number of polygons in the generated model"),
3319
+ symmetry_mode: z
3320
+ .enum(["off", "auto", "on"])
3321
+ .default("auto")
3322
+ .describe("Controls symmetry behavior during model generation."),
3323
+ should_remesh: z
3324
+ .boolean()
3325
+ .default(true)
3326
+ .describe("Whether to enable the remesh phase. When false, returns triangular mesh ignoring topology and target_polycount."),
3327
+ should_texture: z
3328
+ .boolean()
3329
+ .default(true)
3330
+ .describe("Whether to generate textures."),
3331
+ enable_pbr: z
3332
+ .boolean()
3333
+ .default(false)
3334
+ .describe("Generate PBR Maps (metallic, roughness, normal) in addition to base color. Requires should_texture to be true."),
3335
+ is_a_t_pose: z
3336
+ .boolean()
3337
+ .default(false)
3338
+ .describe("Deprecated: use pose_mode instead. When true, generates a T-pose model."),
3339
+ pose_mode: z
3340
+ .enum(["a-pose", "t-pose", ""])
3341
+ .default("")
3342
+ .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."),
3343
+ texture_prompt: z
3344
+ .string()
3345
+ .max(600)
3346
+ .nullable()
3347
+ .optional()
3348
+ .describe("Text prompt to guide the texturing process. Requires should_texture to be true."),
3349
+ texture_image_url: z
3350
+ .string()
3351
+ .nullable()
3352
+ .optional()
3353
+ .describe("2D image to guide the texturing process. Requires should_texture to be true."),
3354
+ enable_rigging: z
3355
+ .boolean()
3356
+ .default(false)
3357
+ .describe("Automatically rig the generated model as a humanoid character. Includes basic walking and running animations. Best results with humanoid characters that have clearly defined limbs."),
3358
+ rigging_height_meters: z
3359
+ .number()
3360
+ .gt(0)
3361
+ .default(1.7)
3362
+ .describe("Approximate height of the character in meters. Only used when enable_rigging is true."),
3363
+ enable_animation: z
3364
+ .boolean()
3365
+ .default(false)
3366
+ .describe("Apply an animation preset to the rigged model. Requires enable_rigging to be true."),
3367
+ animation_action_id: z
3368
+ .number()
3369
+ .int()
3370
+ .default(92)
3371
+ .describe('Animation preset ID from Meshy\'s library. Only used when enable_animation is true; in that case it must be in [0, 696] (``0`` is the "Idle" preset) and is otherwise rejected with a 422. See https://docs.meshy.ai/en/api/animation-library for available action IDs.'),
3372
+ enable_safety_checker: z
3373
+ .boolean()
3374
+ .default(true)
3375
+ .describe("If set to true, input data will be checked for safety before processing."),
3376
+ geometry_resolution: z
3377
+ .enum(["standard", "2k"])
3378
+ .nullable()
3379
+ .optional()
3380
+ .describe("Geometry resolution. Multi-image generation does not support 4k."),
3381
+ })
3382
+ .describe("Input for Meshy-7 and 7.1 Multi-Image to 3D conversion.");
3383
+ // Docs: https://fal.ai/models/google/lyria-3.5/api
3384
+ export const FalGoogleLyria3p5RequestSchema = z.object({
3385
+ prompt: z
3386
+ .string()
3387
+ .min(1)
3388
+ .max(5000)
3389
+ .describe("The text prompt describing the music you want to generate. Include genre, mood, instrumentation, tempo, vocals, and structure for best results. Lyria 3.5 supports full-length songs up to a few minutes — use timestamps or duration hints in your prompt to control song length, e.g. 'a 2-minute track' or section markers like '[0:00-0:30] Intro: ...' / '[0:30-1:00] Verse: ...'. Supports English, German, Spanish, French, Hindi, Japanese, Korean, and Portuguese."),
3390
+ negative_prompt: z
3391
+ .string()
3392
+ .default("")
3393
+ .describe("Negative prompting is not supported by Lyria 3.5."),
3394
+ image_url: z
3395
+ .string()
3396
+ .nullable()
3397
+ .optional()
3398
+ .describe("Optional image URL to use as visual inspiration for music generation. The model will create music that matches the mood and theme of the image."),
3399
+ });
3400
+ // Docs: https://fal.ai/models/bria/fibo-edit-1.5/virtual-try-on/api
3401
+ export const FalBriaFiboEdit1p5VirtualTryOnRequestSchema = z.object({
3402
+ person_image_url: z
3403
+ .string()
3404
+ .describe("Photo of the person who will wear the garments."),
3405
+ garment_image_urls: z
3406
+ .array(z.string())
3407
+ .min(1)
3408
+ .max(3)
3409
+ .describe("1-3 garment or accessory images to put on the person."),
3410
+ instruction: z
3411
+ .string()
3412
+ .nullable()
3413
+ .optional()
3414
+ .describe("Extra direction, appended after the built-in instruction."),
3415
+ aspect_ratio: z
3416
+ .enum(["1:1", "2:3", "3:2", "3:4", "4:3", "4:5", "5:4", "9:16", "16:9"])
3417
+ .nullable()
3418
+ .optional()
3419
+ .describe("Output aspect ratio. Left unset, the output keeps the ratio of the person image."),
3420
+ seed: z
3421
+ .number()
3422
+ .int()
3423
+ .default(5555)
3424
+ .describe("Random seed for reproducibility."),
3425
+ sync_mode: z
3426
+ .boolean()
3427
+ .default(false)
3428
+ .describe("If true, returns the image directly in the response (increases latency)."),
3429
+ });
3430
+ // Docs: https://fal.ai/models/bria/fibo-edit-1.5/product-holding/api
3431
+ export const FalBriaFiboEdit1p5ProductHoldingRequestSchema = z.object({
3432
+ person_image_url: z
3433
+ .string()
3434
+ .describe("Photo of the person who will hold the product."),
3435
+ product_image_urls: z
3436
+ .array(z.string())
3437
+ .min(1)
3438
+ .max(3)
3439
+ .describe("1-3 product images: packaging, a second angle, or a companion item."),
3440
+ instruction: z
3441
+ .string()
3442
+ .nullable()
3443
+ .optional()
3444
+ .describe("Extra direction, appended after the built-in instruction."),
3445
+ aspect_ratio: z
3446
+ .enum(["1:1", "2:3", "3:2", "3:4", "4:3", "4:5", "5:4", "9:16", "16:9"])
3447
+ .nullable()
3448
+ .optional()
3449
+ .describe("Output aspect ratio. Left unset, the output keeps the ratio of the person image."),
3450
+ seed: z
3451
+ .number()
3452
+ .int()
3453
+ .default(5555)
3454
+ .describe("Random seed for reproducibility."),
3455
+ sync_mode: z
3456
+ .boolean()
3457
+ .default(false)
3458
+ .describe("If true, returns the image directly in the response (increases latency)."),
3459
+ });
2193
3460
  export const FAL_ENDPOINT_REQUEST_SCHEMAS = {
3461
+ "bria/fibo-edit-1.5/product-holding": FalBriaFiboEdit1p5ProductHoldingRequestSchema,
3462
+ "bria/fibo-edit-1.5/virtual-try-on": FalBriaFiboEdit1p5VirtualTryOnRequestSchema,
3463
+ "google/lyria-3.5": FalGoogleLyria3p5RequestSchema,
3464
+ "meshy/v7.1/multi-image-to-3d": FalMeshyV7p1MultiImageTo3dRequestSchema,
3465
+ "meshy/v7.1/image-to-3d": FalMeshyV7p1ImageTo3dRequestSchema,
3466
+ "meshy/v7.1/text-to-3d": FalMeshyV7p1TextTo3dRequestSchema,
3467
+ "recraft/v4.1/flash/text-to-image": FalRecraftV4p1FlashTextToImageRequestSchema,
3468
+ "tripo3d/p2/image-to-3d": FalTripo3dP2ImageTo3dRequestSchema,
3469
+ "tripo3d/p2/text-to-3d": FalTripo3dP2TextTo3dRequestSchema,
3470
+ "bytedance/seedream/v5/flash/text-to-image": FalBytedanceSeedreamV5FlashTextToImageRequestSchema,
3471
+ "bytedance/seedream/v5/flash/edit": FalBytedanceSeedreamV5FlashEditRequestSchema,
3472
+ "bytedance/seedream/v5/flash/layerize": FalBytedanceSeedreamV5FlashLayerizeRequestSchema,
3473
+ "google/gemini-3.8-flash-lite-tts": FalGoogleGemini3p8FlashLiteTtsRequestSchema,
3474
+ "google/gemini-3.8-flash-tts": FalGoogleGemini3p8FlashTtsRequestSchema,
3475
+ "elevenlabs/tts/eleven-v4": FalElevenlabsTtsElevenV4RequestSchema,
3476
+ "elevenlabs/tts/eleven-v4-turbo": FalElevenlabsTtsElevenV4TurboRequestSchema,
3477
+ "minimax/h3-max/insert-video": FalMinimaxH3MaxInsertVideoRequestSchema,
3478
+ "ideogram/v4.5": FalIdeogramV4p5RequestSchema,
3479
+ "ideogram/v4.5/edit": FalIdeogramV4p5EditRequestSchema,
3480
+ "xai/grok-imagine-video/v1.5/lite/image-to-video": FalXaiGrokImagineVideoV1p5LiteImageToVideoRequestSchema,
3481
+ "blackforestlabs/flux-3/text-to-image": FalFlux3TextToImageRequestSchema,
3482
+ "blackforestlabs/flux-3/edit-image": FalFlux3EditImageRequestSchema,
3483
+ "minimax/h3-max/recast": FalMinimaxH3MaxRecastRequestSchema,
3484
+ "xai/grok-imagine-video/v1.5/lite/text-to-video": FalXaiGrokImagineVideoV1p5LiteTextToVideoRequestSchema,
3485
+ "minimax/h3-max-turbo/extend-video": FalMinimaxH3MaxTurboExtendVideoRequestSchema,
2194
3486
  "alibaba/qwen-image-3/text-to-image": FalAlibabaQwenImage3TextToImageRequestSchema,
2195
3487
  "blackforestlabs/flux-3/extend-video": FalFlux3ExtendVideoRequestSchema,
2196
3488
  "blackforestlabs/flux-3/first-last-frame-to-video": FalFlux3FirstLastFrameToVideoRequestSchema,