@apicity/fal 0.14.0 → 0.14.1

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
@@ -3457,7 +3457,2989 @@ export const FalBriaFiboEdit1p5ProductHoldingRequestSchema = z.object({
3457
3457
  .default(false)
3458
3458
  .describe("If true, returns the image directly in the response (increases latency)."),
3459
3459
  });
3460
+ // Docs: https://fal.ai/models/minimax/h3-max/extend-video/api
3461
+ export const FalMinimaxH3MaxExtendVideoRequestSchema = z.object({
3462
+ video_url: z
3463
+ .string()
3464
+ .min(1)
3465
+ .describe("Source video URL: 1.625–60 seconds, up to 50 MB, aspect ratio 0.4–2.5"),
3466
+ prompt: z.string().min(1).max(50000),
3467
+ aspect_ratio: z
3468
+ .enum(["auto", "21:9", "16:9", "4:3", "1:1", "3:4", "9:16"])
3469
+ .default("auto"),
3470
+ enable_prompt_expansion: z.boolean().default(true),
3471
+ resolution: z.enum(["480P", "768P", "1080P", "2K"]).default("768P"),
3472
+ enable_safety_checker: z.boolean().default(true),
3473
+ duration: z
3474
+ .number()
3475
+ .min(0.71)
3476
+ .max(15)
3477
+ .default(5)
3478
+ .describe("Seconds of new footage to add; the continuation clip also includes the source's last 1.625 seconds and may run longer because of frame rounding"),
3479
+ seed: z.number().int().nullable().optional(),
3480
+ output: z
3481
+ .enum(["extended", "continuation"])
3482
+ .default("extended")
3483
+ .describe("'extended' returns the source and the new footage as one video; 'continuation' returns a clip that starts with a 1.625-second repeat of the source's ending, then the new footage"),
3484
+ reference_audio_urls: z
3485
+ .array(z.string())
3486
+ .max(3)
3487
+ .optional()
3488
+ .describe("Audio references: each 2–15 seconds, at most 15 seconds combined; they guide the newly generated audio instead of the source soundtrack"),
3489
+ });
3490
+ // The live OpenAPI lists `prompt_expansion_mode` as required while also giving
3491
+ // it a default, and types it as a plain string with three examples. Upstream's
3492
+ // validator settles both: a `{}` body is refused for `prompt` alone, and an
3493
+ // unknown mode is refused with "Input should be 'disabled', 'fast', 'balanced'
3494
+ // or 'quality'" (two unbilled 422 probes, 2026-10-07). So the field defaults to
3495
+ // `balanced` and takes the four values the validator accepts, the vocabulary
3496
+ // the minimax/h3 siblings already enumerate. Both images are optional: with
3497
+ // neither, upstream handles the request as text-to-video.
3498
+ // Docs: https://fal.ai/models/minimax/h3-max/image-to-video/api
3499
+ export const FalMinimaxH3MaxImageToVideoRequestSchema = z.object({
3500
+ prompt: z
3501
+ .string()
3502
+ .min(1)
3503
+ .max(50000)
3504
+ .describe("Text prompt for video generation"),
3505
+ duration: z
3506
+ .number()
3507
+ .min(0.92)
3508
+ .max(15)
3509
+ .default(5)
3510
+ .describe("Video length in seconds. The output can run up to about 0.7 s longer than requested. Use at least 2 s with target_audio_url."),
3511
+ resolution: z
3512
+ .enum(["480P", "768P", "1080P"])
3513
+ .default("768P")
3514
+ .describe("The native generation resolution, or 1080P latent refinement from a native 768P source."),
3515
+ seed: z
3516
+ .number()
3517
+ .int()
3518
+ .nullable()
3519
+ .optional()
3520
+ .describe("Random seed. A random seed is selected when omitted."),
3521
+ enable_safety_checker: z
3522
+ .boolean()
3523
+ .default(true)
3524
+ .describe("If set to true, the safety checker will be enabled."),
3525
+ sync_mode: z
3526
+ .boolean()
3527
+ .default(false)
3528
+ .describe("Return the generated video as base64 instead of a CDN URL."),
3529
+ prompt_expansion_mode: z
3530
+ .enum(["disabled", "fast", "balanced", "quality"])
3531
+ .default("balanced")
3532
+ .describe("How much effort to spend rewriting the prompt before generation. 'disabled' skips prompt expansion. 'balanced' returns in about a second. 'quality' spends up to ~30s on a richer prompt."),
3533
+ target_audio_url: z
3534
+ .string()
3535
+ .min(1)
3536
+ .regex(/\S/)
3537
+ .nullable()
3538
+ .optional()
3539
+ .describe("Optional URL of an audio clip at least 2 seconds long (maximum 15 MB) to pin to the generated soundtrack. Longer clips are trimmed to the generated video's length, keeping the beginning. The original audio replaces the output soundtrack, padded with silence if shorter than the video, without changing playback speed. Exceptionally high sample rates may be resampled to 96 kHz. Accepts an HTTP(S) URL or a base64 data URI."),
3540
+ image_url: z
3541
+ .string()
3542
+ .nullable()
3543
+ .optional()
3544
+ .describe("Optional URL of the image to use as the first frame. When provided, the output canvas follows this image. If only end_image_url is provided, the canvas follows that last frame instead. If both images are omitted, the request is handled as text-to-video (16:9 by default)."),
3545
+ end_image_url: z
3546
+ .string()
3547
+ .nullable()
3548
+ .optional()
3549
+ .describe("Optional URL of the image to use as the last frame. It may be provided alone for end-only keyframe generation; in that case the output canvas follows this image."),
3550
+ });
3551
+ // The live OpenAPI lists `prompt_expansion_mode` as required while also giving
3552
+ // it a default, and types it as a plain string with three examples. Upstream's
3553
+ // validator settles both, as it does for the image-to-video sibling: a `{}`
3554
+ // body is refused for `prompt` alone, and an unknown mode is refused with
3555
+ // "Input should be 'disabled', 'fast', 'balanced' or 'quality'" (two unbilled
3556
+ // 422 probes, 2026-10-07). So the field defaults to `balanced` and takes the
3557
+ // four values the validator accepts. The same probe showed that upstream
3558
+ // closes `aspect_ratio` to the six documented ratios.
3559
+ // Docs: https://fal.ai/models/minimax/h3-max/text-to-video/api
3560
+ export const FalMinimaxH3MaxTextToVideoRequestSchema = z.object({
3561
+ prompt: z
3562
+ .string()
3563
+ .min(1)
3564
+ .max(50000)
3565
+ .describe("Text prompt for video generation"),
3566
+ duration: z
3567
+ .number()
3568
+ .min(0.92)
3569
+ .max(15)
3570
+ .default(5)
3571
+ .describe("Video length in seconds. The output can run up to about 0.7 s longer than requested. Use at least 2 s with target_audio_url."),
3572
+ resolution: z
3573
+ .enum(["480P", "768P", "1080P"])
3574
+ .default("768P")
3575
+ .describe("The native generation resolution, or 1080P latent refinement from a native 768P source."),
3576
+ seed: z
3577
+ .number()
3578
+ .int()
3579
+ .nullable()
3580
+ .optional()
3581
+ .describe("Random seed. A random seed is selected when omitted."),
3582
+ enable_safety_checker: z
3583
+ .boolean()
3584
+ .default(true)
3585
+ .describe("If set to true, the safety checker will be enabled."),
3586
+ sync_mode: z
3587
+ .boolean()
3588
+ .default(false)
3589
+ .describe("Return the generated video as base64 instead of a CDN URL."),
3590
+ prompt_expansion_mode: z
3591
+ .enum(["disabled", "fast", "balanced", "quality"])
3592
+ .default("balanced")
3593
+ .describe("How much effort to spend rewriting the prompt before generation. 'disabled' skips prompt expansion. 'balanced' returns in about a second. 'quality' spends up to ~30s on a richer prompt."),
3594
+ target_audio_url: z
3595
+ .string()
3596
+ .min(1)
3597
+ .regex(/\S/)
3598
+ .nullable()
3599
+ .optional()
3600
+ .describe("Optional URL of an audio clip at least 2 seconds long (maximum 15 MB) to pin to the generated soundtrack. Longer clips are trimmed to the generated video's length, keeping the beginning. The original audio replaces the output soundtrack, padded with silence if shorter than the video, without changing playback speed. Exceptionally high sample rates may be resampled to 96 kHz. Accepts an HTTP(S) URL or a base64 data URI."),
3601
+ aspect_ratio: z
3602
+ .enum(["21:9", "16:9", "4:3", "1:1", "3:4", "9:16"])
3603
+ .default("16:9")
3604
+ .describe("The aspect ratio of the generated video."),
3605
+ });
3606
+ // The live OpenAPI lists `prompt_expansion_mode` as required while also giving
3607
+ // it a default, and types it as a plain string with three examples. Upstream's
3608
+ // validator settles both, as it does for the image-to-video and text-to-video
3609
+ // siblings: a body without the field draws no `missing` error (only
3610
+ // `image_url` is required), and an unknown mode is refused with "Input should
3611
+ // be 'disabled', 'fast', 'balanced' or 'quality'". The same unbilled 422 probes
3612
+ // (2026-10-07) showed the two trajectory rules the refinements restate:
3613
+ // keyframe times must be strictly increasing, and the summed azimuth change
3614
+ // between consecutive keyframes may not exceed 32 turns (11,520 degrees).
3615
+ // Docs: https://fal.ai/models/minimax/h3-max/camera-controls/api
3616
+ export const FalMinimaxH3MaxCameraControlsRequestSchema = z.object({
3617
+ prompt: z
3618
+ .string()
3619
+ .max(50000)
3620
+ .default("The same elements in the reference are rigid. Preserve every element exactly. The entire scene is frozen. Only the camera moves. no scene motion only camera motion")
3621
+ .describe("Text prompt for video generation. When omitted or blank, defaults to preserving the frozen reference scene while only the camera moves."),
3622
+ duration: z
3623
+ .number()
3624
+ .min(0.92)
3625
+ .max(15)
3626
+ .default(5)
3627
+ .describe("Video length in seconds. The output can run up to about 0.7 s longer than requested."),
3628
+ resolution: z
3629
+ .enum(["480P", "768P", "1080P"])
3630
+ .default("480P")
3631
+ .describe("The native generation resolution, or 1080P latent refinement from a native 768P source."),
3632
+ seed: z
3633
+ .number()
3634
+ .int()
3635
+ .nullable()
3636
+ .optional()
3637
+ .describe("Random seed. A random seed is selected when omitted."),
3638
+ enable_safety_checker: z
3639
+ .boolean()
3640
+ .default(true)
3641
+ .describe("If set to true, the safety checker will be enabled."),
3642
+ sync_mode: z
3643
+ .boolean()
3644
+ .default(false)
3645
+ .describe("Return the generated video as base64 instead of a CDN URL."),
3646
+ prompt_expansion_mode: z
3647
+ .enum(["disabled", "fast", "balanced", "quality"])
3648
+ .default("balanced")
3649
+ .describe("How much effort to spend rewriting the prompt before generation. 'disabled' skips prompt expansion. 'balanced' returns in about a second. 'quality' spends up to ~30s on a richer prompt."),
3650
+ image_url: z
3651
+ .string()
3652
+ .min(1)
3653
+ .describe("URL of the image to use as the first frame."),
3654
+ camera_trajectory: z
3655
+ .array(z
3656
+ .object({
3657
+ time: z
3658
+ .number()
3659
+ .min(0)
3660
+ .max(1)
3661
+ .describe("Normalized video time, from 0 at the start to 1 at the end."),
3662
+ azimuth: z
3663
+ .number()
3664
+ .describe("Horizontal camera angle around the subject, in degrees."),
3665
+ elevation: z
3666
+ .number()
3667
+ .min(-90)
3668
+ .max(90)
3669
+ .describe("Vertical camera angle around the subject, in degrees."),
3670
+ distance: z
3671
+ .number()
3672
+ .positive()
3673
+ .describe("Camera distance from the subject in normalized scene units."),
3674
+ })
3675
+ .describe("One camera pose at a normalized point in the generated clip."))
3676
+ .min(2)
3677
+ .max(12)
3678
+ .refine((keyframes) => keyframes.every((k, i) => i === 0 || k.time > keyframes[i - 1].time), { message: "Camera keyframe times must be strictly increasing" })
3679
+ .refine((keyframes) => keyframes.reduce((travel, k, i) => i === 0
3680
+ ? 0
3681
+ : travel + Math.abs(k.azimuth - keyframes[i - 1].azimuth), 0) <=
3682
+ 32 * 360, {
3683
+ message: "Camera trajectory supports at most 32 turns of total azimuth travel",
3684
+ })
3685
+ .optional()
3686
+ .describe("Ordered camera keyframes. The first pose is held before its time and the final pose is held for the remainder of the video. Signed full turns are preserved, with at most 32 turns of total azimuth travel."),
3687
+ });
3688
+ // The live OpenAPI lists `prompt_expansion_mode` as required while also giving
3689
+ // it a default, and types it as a plain string with three examples. Upstream's
3690
+ // validator settles both, as it does for the other minimax/h3-max leaves: a
3691
+ // body without the field draws no `missing` error (only `prompt` is
3692
+ // required), and an unknown mode is refused with "Input should be 'disabled',
3693
+ // 'fast', 'balanced' or 'quality'". The same unbilled 422 probes (2026-10-07)
3694
+ // showed one field rule the OpenAPI omits: a prompt of only whitespace is
3695
+ // refused, which the `\S` pattern restates. The three refinements restate
3696
+ // rules the field descriptions publish: at most 12 reference files in all, a
3697
+ // middle image only between start and end images at a native resolution, and
3698
+ // a middle frame time only with a middle image. The probes cannot reach those,
3699
+ // since a body that fails field validation is never checked against them.
3700
+ // Unlike minimax/h3/reference-to-video, audio may be the only reference
3701
+ // modality ("Images, videos, and audio can be provided individually or
3702
+ // together").
3703
+ // Docs: https://fal.ai/models/minimax/h3-max/reference-to-video/api
3704
+ export const FalMinimaxH3MaxReferenceToVideoRequestSchema = z
3705
+ .object({
3706
+ prompt: z
3707
+ .string()
3708
+ .min(1)
3709
+ .max(50000)
3710
+ .regex(/\S/, "Prompt cannot be empty or contain only whitespace")
3711
+ .describe("Text prompt for video generation. Refer to reference assets by their modality and order in the reference lists: Image 1, Image 2, Video 1, Audio 1, and so on."),
3712
+ reference_image_urls: z
3713
+ .array(z.string())
3714
+ .max(9)
3715
+ .optional()
3716
+ .describe("URLs of subject/style reference images, referenced in the prompt as Image 1, Image 2, and so on. Reference images, videos, and audio clips must add up to at most 12 files."),
3717
+ reference_video_urls: z
3718
+ .array(z.string())
3719
+ .max(3)
3720
+ .optional()
3721
+ .describe("URLs of motion/reference video clips (2-15 seconds each, combined duration at most 15 seconds), referenced in the prompt as Video 1, Video 2, and so on. Reference images, videos, and audio clips must add up to at most 12 files."),
3722
+ reference_audio_urls: z
3723
+ .array(z.string())
3724
+ .max(3)
3725
+ .optional()
3726
+ .describe("URLs of reference audio clips (2-15 seconds each, combined duration at most 15 seconds), referenced in the prompt as Audio 1, Audio 2, and so on. Images, videos, and audio can be provided individually or together. Reference images, videos, and audio clips must add up to at most 12 files."),
3727
+ image_url: z
3728
+ .string()
3729
+ .min(1)
3730
+ .nullable()
3731
+ .optional()
3732
+ .describe("Optional URL of the image to use as the first frame. The video opens exactly on this image while the references keep the subjects consistent; the output canvas follows this image."),
3733
+ middle_image_url: z
3734
+ .string()
3735
+ .min(1)
3736
+ .nullable()
3737
+ .optional()
3738
+ .describe("Optional image to guide the video at middle_frame_time. Requires start and end images and native 480P or 768P resolution."),
3739
+ middle_frame_time: z
3740
+ .number()
3741
+ .gt(0)
3742
+ .lt(15)
3743
+ .nullable()
3744
+ .optional()
3745
+ .describe("Target time for the middle image, in seconds from the start. Rounded to the nearest frame at 24 fps; it must fall strictly between the first and last frames of the requested duration. Requires middle_image_url."),
3746
+ end_image_url: z
3747
+ .string()
3748
+ .min(1)
3749
+ .nullable()
3750
+ .optional()
3751
+ .describe("Optional URL of the image to use as the last frame. The video ends exactly on this image."),
3752
+ duration: z
3753
+ .number()
3754
+ .min(0.92)
3755
+ .max(15)
3756
+ .default(5)
3757
+ .describe("Video length in seconds. The output can run up to about 0.7 s longer than requested."),
3758
+ resolution: z
3759
+ .enum(["480P", "768P", "1080P"])
3760
+ .default("768P")
3761
+ .describe("The native generation resolution, or 1080P latent refinement from a native 768P source."),
3762
+ seed: z
3763
+ .number()
3764
+ .int()
3765
+ .nullable()
3766
+ .optional()
3767
+ .describe("Random seed. A random seed is selected when omitted."),
3768
+ enable_safety_checker: z
3769
+ .boolean()
3770
+ .default(true)
3771
+ .describe("If set to true, the safety checker will be enabled."),
3772
+ sync_mode: z
3773
+ .boolean()
3774
+ .default(false)
3775
+ .describe("Return the generated video as base64 instead of a CDN URL."),
3776
+ prompt_expansion_mode: z
3777
+ .enum(["disabled", "fast", "balanced", "quality"])
3778
+ .default("balanced")
3779
+ .describe("How much effort to spend rewriting the prompt before generation. 'disabled' skips prompt expansion. 'balanced' returns in about a second. 'quality' spends up to ~30s on a richer prompt."),
3780
+ aspect_ratio: z
3781
+ .enum(["adaptive", "21:9", "16:9", "4:3", "1:1", "3:4", "9:16"])
3782
+ .default("adaptive")
3783
+ .describe("The aspect ratio of the generated video."),
3784
+ })
3785
+ .refine((v) => (v.reference_image_urls?.length ?? 0) +
3786
+ (v.reference_video_urls?.length ?? 0) +
3787
+ (v.reference_audio_urls?.length ?? 0) <=
3788
+ 12, {
3789
+ message: "minimax/h3-max/reference-to-video accepts at most 12 reference files across reference_image_urls, reference_video_urls, and reference_audio_urls",
3790
+ path: ["reference_image_urls"],
3791
+ })
3792
+ .refine((v) => v.middle_image_url == null ||
3793
+ (v.image_url != null &&
3794
+ v.end_image_url != null &&
3795
+ v.resolution !== "1080P"), {
3796
+ message: "middle_image_url requires image_url, end_image_url, and a native 480P or 768P resolution",
3797
+ path: ["middle_image_url"],
3798
+ })
3799
+ .refine((v) => v.middle_frame_time == null || v.middle_image_url != null, {
3800
+ message: "middle_frame_time requires middle_image_url",
3801
+ path: ["middle_frame_time"],
3802
+ });
3803
+ // Upstream refuses every media URL here, `video_url` and each
3804
+ // `reference_image_urls` entry, unless it is "an HTTPS URL without
3805
+ // credentials or fragments" (unbilled 422 probes, 2026-10-07): an `http:`
3806
+ // URL, a `user:pass@` authority and a `#fragment` were each refused, and an
3807
+ // upper-case `HTTPS:` scheme was accepted. The pattern restates that rule. It
3808
+ // spells the scheme's case out rather than using the `i` flag, which JSON
3809
+ // Schema's `pattern` drops.
3810
+ const FalMinimaxH3MaxThreeDToVideoMediaUrlSchema = z
3811
+ .string()
3812
+ .regex(/^[Hh][Tt][Tt][Pp][Ss]:\/\/[^\s/?#@]+(?:[/?][^\s#]*)?$/, "Media must be an HTTPS URL without credentials or fragments");
3813
+ // The live OpenAPI closes the input (`additionalProperties: false`), and the
3814
+ // same probes confirmed it ("Extra inputs are not permitted"), so the schema
3815
+ // is strict like its minimax/h3-max/recast sibling. They also showed that
3816
+ // `video_url` is the only required field, that
3817
+ // `max_generated_reference_images` takes integers only (a string, a fraction
3818
+ // and a boolean were refused), and that an empty or blank Scene Intent is
3819
+ // accepted. The output duration is not a request field: it follows the
3820
+ // source video.
3821
+ // Docs: https://fal.ai/models/minimax/h3-max/3d-to-video/api
3822
+ export const FalMinimaxH3MaxThreeDToVideoRequestSchema = z
3823
+ .object({
3824
+ video_url: FalMinimaxH3MaxThreeDToVideoMediaUrlSchema.describe("Blender video, up to 15 seconds and 32 shots, at a public HTTPS URL."),
3825
+ prompt: z
3826
+ .string()
3827
+ .max(2000)
3828
+ .nullable()
3829
+ .optional()
3830
+ .describe("Optional clarification of what your proxies represent or how they move, for example: 'The moving block represents a running person.' Camera, trajectories, timing and object count remain defined by the video."),
3831
+ reference_image_urls: z
3832
+ .array(FalMinimaxH3MaxThreeDToVideoMediaUrlSchema)
3833
+ .max(8)
3834
+ .optional()
3835
+ .describe("Optional environment, subject, interior or detail references. When supplied, uses these images directly without visual planning or generating new images; Scene Intent is optional. Without references, automatically creates appearance references within your new-image limit. Camera and movement always come from the video."),
3836
+ max_generated_reference_images: z
3837
+ .number()
3838
+ .int()
3839
+ .min(1)
3840
+ .max(8)
3841
+ .default(2)
3842
+ .describe("Maximum NEW images to generate when no reference images are supplied. Ignored when reference images are supplied. Uses fewer when enough views are covered. Uncovered shots stay in the video."),
3843
+ resolution: z
3844
+ .enum(["480P", "768P", "1080P"])
3845
+ .default("768P")
3846
+ .describe("Output quality. Duration is taken automatically from the video."),
3847
+ })
3848
+ .strict();
3849
+ // Upstream requires only `image_url` and `audio_url` and closes `resolution`
3850
+ // to the four documented values (unbilled 422 probes, 2026-10-08). The same
3851
+ // probes showed that `seed` takes integers from 0 to 2147483647 only, that an
3852
+ // unknown field is accepted, so the schema is not strict, and that neither
3853
+ // media URL is checked for its form before generation. The output length is
3854
+ // not a request field: it follows the supplied audio.
3855
+ // Docs: https://fal.ai/models/minimax/h3-max/lip-sync/image-to-video/api
3856
+ export const FalMinimaxH3MaxLipSyncImageToVideoRequestSchema = z.object({
3857
+ image_url: z
3858
+ .string()
3859
+ .describe("Image to animate. The aspect ratio must be between 0.4 and 2.5."),
3860
+ audio_url: z
3861
+ .string()
3862
+ .describe("Audio to synchronize the mouth movements to, at least 5 seconds long. Supports up to 15 minutes. The output video matches the supplied audio duration."),
3863
+ resolution: z
3864
+ .enum(["480P", "768P", "1080P", "2K"])
3865
+ .default("768P")
3866
+ .describe("Output resolution. Uses the supported aspect ratio nearest the image."),
3867
+ enable_transcription: z
3868
+ .boolean()
3869
+ .default(false)
3870
+ .describe("Transcribe the supplied audio to guide lip synchronization. When disabled, synchronize to the audio without a transcript."),
3871
+ seed: z
3872
+ .number()
3873
+ .int()
3874
+ .min(0)
3875
+ .max(2147483647)
3876
+ .nullable()
3877
+ .optional()
3878
+ .describe("Random seed; selected randomly if omitted."),
3879
+ enable_safety_checker: z
3880
+ .boolean()
3881
+ .default(true)
3882
+ .describe("Enable content safety checks."),
3883
+ });
3884
+ // The live OpenAPI documents the same input as minimax/h3-max/image-to-video,
3885
+ // field for field: it lists `prompt_expansion_mode` as required while giving
3886
+ // it a default, and types it as a plain string with three examples. Upstream's
3887
+ // validator settles both here too: a `{}` body is refused for `prompt` alone,
3888
+ // and an unknown mode is refused with "Input should be 'disabled', 'fast',
3889
+ // 'balanced' or 'quality'" (three unbilled 422 probes, 2026-10-08). So the
3890
+ // field defaults to `balanced` and takes the four values the validator
3891
+ // accepts. Both images are optional: with neither, upstream handles the
3892
+ // request as text-to-video.
3893
+ // Docs: https://fal.ai/models/minimax/h3-max-turbo/image-to-video/api
3894
+ export const FalMinimaxH3MaxTurboImageToVideoRequestSchema = z.object({
3895
+ prompt: z
3896
+ .string()
3897
+ .min(1)
3898
+ .max(50000)
3899
+ .describe("Text prompt for video generation"),
3900
+ duration: z
3901
+ .number()
3902
+ .min(0.92)
3903
+ .max(15)
3904
+ .default(5)
3905
+ .describe("Video length in seconds. The output can run up to about 0.7 s longer than requested. Use at least 2 s with target_audio_url."),
3906
+ resolution: z
3907
+ .enum(["480P", "768P", "1080P"])
3908
+ .default("768P")
3909
+ .describe("The native generation resolution, or 1080P latent refinement from a native 768P source."),
3910
+ seed: z
3911
+ .number()
3912
+ .int()
3913
+ .nullable()
3914
+ .optional()
3915
+ .describe("Random seed. A random seed is selected when omitted."),
3916
+ enable_safety_checker: z
3917
+ .boolean()
3918
+ .default(true)
3919
+ .describe("If set to true, the safety checker will be enabled."),
3920
+ sync_mode: z
3921
+ .boolean()
3922
+ .default(false)
3923
+ .describe("Return the generated video as base64 instead of a CDN URL."),
3924
+ prompt_expansion_mode: z
3925
+ .enum(["disabled", "fast", "balanced", "quality"])
3926
+ .default("balanced")
3927
+ .describe("How much effort to spend rewriting the prompt before generation. 'disabled' skips prompt expansion. 'balanced' returns in about a second. 'quality' spends up to ~30s on a richer prompt."),
3928
+ target_audio_url: z
3929
+ .string()
3930
+ .min(1)
3931
+ .regex(/\S/)
3932
+ .nullable()
3933
+ .optional()
3934
+ .describe("Optional URL of an audio clip at least 2 seconds long (maximum 15 MB) to pin to the generated soundtrack. Longer clips are trimmed to the generated video's length, keeping the beginning. The original audio replaces the output soundtrack, padded with silence if shorter than the video, without changing playback speed. Exceptionally high sample rates may be resampled to 96 kHz. Accepts an HTTP(S) URL or a base64 data URI."),
3935
+ image_url: z
3936
+ .string()
3937
+ .nullable()
3938
+ .optional()
3939
+ .describe("Optional URL of the image to use as the first frame. When provided, the output canvas follows this image. If only end_image_url is provided, the canvas follows that last frame instead. If both images are omitted, the request is handled as text-to-video (16:9 by default)."),
3940
+ end_image_url: z
3941
+ .string()
3942
+ .nullable()
3943
+ .optional()
3944
+ .describe("Optional URL of the image to use as the last frame. It may be provided alone for end-only keyframe generation; in that case the output canvas follows this image."),
3945
+ });
3946
+ // The live OpenAPI documents the same input as minimax/h3-max/text-to-video,
3947
+ // field for field: it lists `prompt_expansion_mode` as required while giving
3948
+ // it a default, and types it as a plain string with three examples. Upstream's
3949
+ // validator settles both here too: a `{}` body is refused for `prompt` alone,
3950
+ // and an unknown mode is refused with "Input should be 'disabled', 'fast',
3951
+ // 'balanced' or 'quality'" (three unbilled 422 probes, 2026-10-08). So the
3952
+ // field defaults to `balanced` and takes the four values the validator
3953
+ // accepts. The same probes showed that upstream closes `aspect_ratio` to the
3954
+ // six documented ratios.
3955
+ // Docs: https://fal.ai/models/minimax/h3-max-turbo/text-to-video/api
3956
+ export const FalMinimaxH3MaxTurboTextToVideoRequestSchema = z.object({
3957
+ prompt: z
3958
+ .string()
3959
+ .min(1)
3960
+ .max(50000)
3961
+ .describe("Text prompt for video generation"),
3962
+ duration: z
3963
+ .number()
3964
+ .min(0.92)
3965
+ .max(15)
3966
+ .default(5)
3967
+ .describe("Video length in seconds. The output can run up to about 0.7 s longer than requested. Use at least 2 s with target_audio_url."),
3968
+ resolution: z
3969
+ .enum(["480P", "768P", "1080P"])
3970
+ .default("768P")
3971
+ .describe("The native generation resolution, or 1080P latent refinement from a native 768P source."),
3972
+ seed: z
3973
+ .number()
3974
+ .int()
3975
+ .nullable()
3976
+ .optional()
3977
+ .describe("Random seed. A random seed is selected when omitted."),
3978
+ enable_safety_checker: z
3979
+ .boolean()
3980
+ .default(true)
3981
+ .describe("If set to true, the safety checker will be enabled."),
3982
+ sync_mode: z
3983
+ .boolean()
3984
+ .default(false)
3985
+ .describe("Return the generated video as base64 instead of a CDN URL."),
3986
+ prompt_expansion_mode: z
3987
+ .enum(["disabled", "fast", "balanced", "quality"])
3988
+ .default("balanced")
3989
+ .describe("How much effort to spend rewriting the prompt before generation. 'disabled' skips prompt expansion. 'balanced' returns in about a second. 'quality' spends up to ~30s on a richer prompt."),
3990
+ target_audio_url: z
3991
+ .string()
3992
+ .min(1)
3993
+ .regex(/\S/)
3994
+ .nullable()
3995
+ .optional()
3996
+ .describe("Optional URL of an audio clip at least 2 seconds long (maximum 15 MB) to pin to the generated soundtrack. Longer clips are trimmed to the generated video's length, keeping the beginning. The original audio replaces the output soundtrack, padded with silence if shorter than the video, without changing playback speed. Exceptionally high sample rates may be resampled to 96 kHz. Accepts an HTTP(S) URL or a base64 data URI."),
3997
+ aspect_ratio: z
3998
+ .enum(["21:9", "16:9", "4:3", "1:1", "3:4", "9:16"])
3999
+ .default("16:9")
4000
+ .describe("The aspect ratio of the generated video."),
4001
+ });
4002
+ // The live OpenAPI requires `prompt` alone, and five unbilled 422 probes
4003
+ // (2026-10-08) found upstream's validator to match it: `duration` is an
4004
+ // integer from 1 to 15, `resolution` and `aspect_ratio` are closed to the
4005
+ // documented values, and `prompt` stops at 4096 characters with no minimum.
4006
+ // An unknown field drew no error, so the object is not strict.
4007
+ // Docs: https://fal.ai/models/xai/grok-imagine-video/v1.5/text-to-video/api
4008
+ export const FalXaiGrokImagineVideoV1p5TextToVideoRequestSchema = z.object({
4009
+ prompt: z
4010
+ .string()
4011
+ .max(4096)
4012
+ .describe("Text description of the desired video."),
4013
+ duration: z
4014
+ .number()
4015
+ .int()
4016
+ .min(1)
4017
+ .max(15)
4018
+ .default(6)
4019
+ .describe("Video duration in seconds."),
4020
+ resolution: z
4021
+ .enum(["480p", "720p", "1080p"])
4022
+ .default("720p")
4023
+ .describe("Resolution of the output video."),
4024
+ aspect_ratio: z
4025
+ .enum(["16:9", "4:3", "3:2", "1:1", "2:3", "3:4", "9:16"])
4026
+ .default("16:9")
4027
+ .describe("Aspect ratio of the generated video."),
4028
+ });
4029
+ // The live OpenAPI requires `prompt` and `image_url`, and six unbilled 422
4030
+ // probes (2026-10-08) found upstream's validator to match it: `duration` is an
4031
+ // integer from 1 to 15, `resolution` is closed to the documented values,
4032
+ // `prompt` stops at 4096 characters with no minimum, and `image_url` must be
4033
+ // a string, though not one checked as a URL. The endpoint documents no
4034
+ // `aspect_ratio`, and the validator ignored one, as it ignored an unknown
4035
+ // field, so the object is not strict.
4036
+ // Docs: https://fal.ai/models/xai/grok-imagine-video/v1.5/image-to-video/api
4037
+ export const FalXaiGrokImagineVideoV1p5ImageToVideoRequestSchema = z.object({
4038
+ prompt: z
4039
+ .string()
4040
+ .max(4096)
4041
+ .describe("Text description of desired changes or motion in the video."),
4042
+ duration: z
4043
+ .number()
4044
+ .int()
4045
+ .min(1)
4046
+ .max(15)
4047
+ .default(6)
4048
+ .describe("Video duration in seconds."),
4049
+ resolution: z
4050
+ .enum(["480p", "720p", "1080p"])
4051
+ .default("720p")
4052
+ .describe("Resolution of the output video."),
4053
+ image_url: z
4054
+ .string()
4055
+ .describe("URL of the input image for video generation."),
4056
+ });
4057
+ // The live OpenAPI requires `prompt` and `video_url`, and seven unbilled 422
4058
+ // probes (2026-10-08) found upstream's validator to match it: `resolution` is
4059
+ // closed to the documented lower-case values (`360P` and `4K` are refused),
4060
+ // `prompt` stops at 20,000 characters with no minimum, and `video_url` must be
4061
+ // a string, though not one checked as a URL. The endpoint documents no
4062
+ // duration or aspect ratio, and the validator ignored both, as it ignored an
4063
+ // unknown field, so the object is not strict.
4064
+ // Docs: https://fal.ai/models/google/gemini-omni-flash/v1.1/edit/api
4065
+ export const FalGeminiOmniFlashV1p1EditRequestSchema = z.object({
4066
+ prompt: z
4067
+ .string()
4068
+ .max(20_000)
4069
+ .describe("A simple instruction describing the edit."),
4070
+ video_url: z.string().describe("URL of the video to edit."),
4071
+ resolution: z
4072
+ .enum(["360p", "720p", "1080p", "4k"])
4073
+ .default("720p")
4074
+ .describe("The resolution of the edited video."),
4075
+ });
4076
+ // The live OpenAPI requires only `prompt`, and ten unbilled 422 probes
4077
+ // (2026-10-08) found upstream's validator to match it: `image_urls` holds at
4078
+ // most ten strings and `reference_video_urls` at most three, with no minimum
4079
+ // and no URL check on either; `duration` is an integer from 3 to 10 (4.5 is
4080
+ // refused); `aspect_ratio` and `resolution` are closed to the documented
4081
+ // values (`1:1`, `360P` and `4K` are refused); and `prompt` stops at 20,000
4082
+ // characters with no minimum. The validator ignored an unknown field, so the
4083
+ // object is not strict.
4084
+ // Docs: https://fal.ai/models/google/gemini-omni-flash/v1.1/reference-to-video/api
4085
+ export const FalGeminiOmniFlashV1p1ReferenceToVideoRequestSchema = z.object({
4086
+ prompt: z
4087
+ .string()
4088
+ .max(20_000)
4089
+ .describe("The text prompt describing the video. Reference media is sent in list order before the prompt."),
4090
+ image_urls: z
4091
+ .array(z.string())
4092
+ .max(10)
4093
+ .optional()
4094
+ .describe("URLs of reference images to incorporate into the video."),
4095
+ reference_video_urls: z
4096
+ .array(z.string())
4097
+ .max(3)
4098
+ .optional()
4099
+ .describe("URLs of up to three reference videos. Each video must be at most three seconds long."),
4100
+ aspect_ratio: z
4101
+ .enum(["16:9", "9:16"])
4102
+ .default("16:9")
4103
+ .describe("The aspect ratio of the generated video."),
4104
+ resolution: z
4105
+ .enum(["360p", "720p", "1080p", "4k"])
4106
+ .default("720p")
4107
+ .describe("The resolution of the generated video."),
4108
+ duration: z
4109
+ .number()
4110
+ .int()
4111
+ .min(3)
4112
+ .max(10)
4113
+ .default(8)
4114
+ .describe("The duration of the generated video, in seconds."),
4115
+ });
4116
+ // The live OpenAPI requires `prompt` and `image_url`, and eleven unbilled 422
4117
+ // probes (2026-10-08) found upstream's validator to match it: `image_url` must
4118
+ // be a string and `end_image_url` a string or null, with no URL check on
4119
+ // either; `duration` is an integer from 3 to 10 (4.5 is refused);
4120
+ // `aspect_ratio` and `resolution` are closed to the documented values (`1:1`,
4121
+ // `360P` and `4K` are refused); and `prompt` stops at 20,000 characters with
4122
+ // no minimum. The validator ignored an unknown field, so the object is not
4123
+ // strict.
4124
+ // Docs: https://fal.ai/models/google/gemini-omni-flash/v1.1/image-to-video/api
4125
+ export const FalGeminiOmniFlashV1p1ImageToVideoRequestSchema = z.object({
4126
+ prompt: z
4127
+ .string()
4128
+ .max(20_000)
4129
+ .describe("The text prompt describing how the first image should be animated or interpolated into the optional end image."),
4130
+ image_url: z.string().describe("URL of the first frame to animate."),
4131
+ end_image_url: z
4132
+ .string()
4133
+ .nullable()
4134
+ .optional()
4135
+ .describe("Optional URL of the end frame. When provided, the model interpolates between the two images in their listed order."),
4136
+ aspect_ratio: z
4137
+ .enum(["16:9", "9:16"])
4138
+ .default("16:9")
4139
+ .describe("The aspect ratio of the generated video."),
4140
+ resolution: z
4141
+ .enum(["360p", "720p", "1080p", "4k"])
4142
+ .default("720p")
4143
+ .describe("The resolution of the generated video."),
4144
+ duration: z
4145
+ .number()
4146
+ .int()
4147
+ .min(3)
4148
+ .max(10)
4149
+ .default(8)
4150
+ .describe("The duration of the generated video, in seconds."),
4151
+ });
4152
+ // The live OpenAPI requires only `prompt`, and twelve unbilled 422 probes
4153
+ // (2026-10-08) found upstream's validator to match it: `prompt` must be a
4154
+ // string of at most 20,000 characters, with no minimum; `duration` is an
4155
+ // integer from 3 to 10 (4.5 and null are refused); and `aspect_ratio` and
4156
+ // `resolution` are closed to the documented values (`1:1`, null, `360P` and
4157
+ // `4K` are refused). The validator ignored an unknown field, so the object is
4158
+ // not strict.
4159
+ // Docs: https://fal.ai/models/google/gemini-omni-flash/v1.1/text-to-video/api
4160
+ export const FalGeminiOmniFlashV1p1TextToVideoRequestSchema = z.object({
4161
+ prompt: z
4162
+ .string()
4163
+ .max(20_000)
4164
+ .describe("The text prompt describing the video you want to generate."),
4165
+ aspect_ratio: z
4166
+ .enum(["16:9", "9:16"])
4167
+ .default("16:9")
4168
+ .describe("The aspect ratio of the generated video."),
4169
+ resolution: z
4170
+ .enum(["360p", "720p", "1080p", "4k"])
4171
+ .default("720p")
4172
+ .describe("The resolution of the generated video."),
4173
+ duration: z
4174
+ .number()
4175
+ .int()
4176
+ .min(3)
4177
+ .max(10)
4178
+ .default(8)
4179
+ .describe("The duration of the generated video, in seconds."),
4180
+ });
4181
+ // The live OpenAPI requires only `prompt`, and sixteen unbilled 422 probes
4182
+ // (2026-10-08) found upstream's validator to match it: `prompt` is a string of
4183
+ // 1 to 5,000 characters; `duration`, `resolution`, `aspect_ratio` and `fps`
4184
+ // are closed to the documented values (null is refused for each);
4185
+ // `camera_motion` is the documented set or null. The validator ignored an
4186
+ // unknown field, so the object is not strict. As on the image-to-video/fast
4187
+ // sibling, the documented coupling of duration to resolution and frame rate
4188
+ // is a cross-field rule upstream enforces; the duration's description states
4189
+ // it, and this schema does not encode it.
4190
+ // Docs: https://fal.ai/models/lightricks/ltx-2.5/text-to-video/fast/api
4191
+ export const FalLightricksLtx2p5TextToVideoFastRequestSchema = z.object({
4192
+ prompt: z
4193
+ .string()
4194
+ .min(1)
4195
+ .max(5000)
4196
+ .describe("The prompt to use for the generated video"),
4197
+ // A fixed vocabulary, not a model registry, so it stays a closed union.
4198
+ duration: z
4199
+ .union([
4200
+ z.literal(6),
4201
+ z.literal(8),
4202
+ z.literal(10),
4203
+ z.literal(12),
4204
+ z.literal(14),
4205
+ z.literal(16),
4206
+ z.literal(18),
4207
+ z.literal(20),
4208
+ z.literal("auto"),
4209
+ ])
4210
+ .default("auto")
4211
+ .describe("The duration of the generated video in seconds. At 720p and 1080p, 24 or 25 FPS supports up to 20 seconds, while 48 or 50 FPS supports up to 10 seconds. At 1440p and 2160p, all frame rates support up to 10 seconds. Set to 'auto' to let the model choose the duration automatically."),
4212
+ resolution: z
4213
+ .enum(["720p", "1080p", "1440p", "2160p"])
4214
+ .default("1080p")
4215
+ .describe("The resolution of the generated video."),
4216
+ aspect_ratio: z
4217
+ .enum(["16:9", "9:16"])
4218
+ .default("16:9")
4219
+ .describe("The aspect ratio of the generated video"),
4220
+ fps: z
4221
+ .union([z.literal(24), z.literal(25), z.literal(48), z.literal(50)])
4222
+ .default(25)
4223
+ .describe("The frames per second of the generated video."),
4224
+ generate_audio: z
4225
+ .boolean()
4226
+ .default(true)
4227
+ .describe("Whether to generate audio for the generated video"),
4228
+ camera_motion: z
4229
+ .enum([
4230
+ "dolly_in",
4231
+ "dolly_out",
4232
+ "dolly_left",
4233
+ "dolly_right",
4234
+ "jib_up",
4235
+ "jib_down",
4236
+ "static",
4237
+ "focus_shift",
4238
+ ])
4239
+ .nullable()
4240
+ .optional()
4241
+ .describe("Optional camera motion applied to the generated video."),
4242
+ });
4243
+ // The live OpenAPI requires only `prompt`, and eighteen unbilled 422 probes
4244
+ // (2026-10-08) found upstream's validator to match it: `prompt` is a string of
4245
+ // 1 to 5,000 characters; `duration`, `resolution`, `aspect_ratio` and `fps`
4246
+ // are closed to the documented values (null is refused for each), which omit
4247
+ // the fast tier's 12 to 20 seconds, 1440p, 2160p and 48 FPS; `camera_motion`
4248
+ // is the documented set or null. The validator ignored an unknown field, so
4249
+ // the object is not strict.
4250
+ // Docs: https://fal.ai/models/lightricks/ltx-2.5/text-to-video/pro/api
4251
+ export const FalLightricksLtx2p5TextToVideoProRequestSchema = z.object({
4252
+ prompt: z
4253
+ .string()
4254
+ .min(1)
4255
+ .max(5000)
4256
+ .describe("The prompt to use for the generated video"),
4257
+ // A fixed vocabulary, not a model registry, so it stays a closed union.
4258
+ duration: z
4259
+ .union([z.literal(6), z.literal(8), z.literal(10), z.literal("auto")])
4260
+ .default("auto")
4261
+ .describe("The duration of the generated video in seconds, up to 10 seconds. Set to 'auto' to let the model choose the duration automatically."),
4262
+ resolution: z
4263
+ .enum(["720p", "1080p"])
4264
+ .default("1080p")
4265
+ .describe("The resolution of the generated video."),
4266
+ aspect_ratio: z
4267
+ .enum(["16:9", "9:16"])
4268
+ .default("16:9")
4269
+ .describe("The aspect ratio of the generated video"),
4270
+ fps: z
4271
+ .union([z.literal(24), z.literal(25), z.literal(50)])
4272
+ .default(25)
4273
+ .describe("The frames per second of the generated video."),
4274
+ generate_audio: z
4275
+ .boolean()
4276
+ .default(true)
4277
+ .describe("Whether to generate audio for the generated video"),
4278
+ camera_motion: z
4279
+ .enum([
4280
+ "dolly_in",
4281
+ "dolly_out",
4282
+ "dolly_left",
4283
+ "dolly_right",
4284
+ "jib_up",
4285
+ "jib_down",
4286
+ "static",
4287
+ "focus_shift",
4288
+ ])
4289
+ .nullable()
4290
+ .optional()
4291
+ .describe("Optional camera motion applied to the generated video."),
4292
+ });
4293
+ // The live OpenAPI requires only `audio_url`, and seventeen unbilled 422
4294
+ // probes (2026-10-08) found upstream's validator to match it: `audio_url` is
4295
+ // a string (null is refused); `image_url` is a string or null; `prompt` is a
4296
+ // string of 1 to 5,000 characters or null; `guidance_scale` is a number from
4297
+ // 1 to 50 or null; `aspect_ratio` is closed to the documented values (null is
4298
+ // refused). The validator ignored an unknown field, so the object is not
4299
+ // strict, and it checked neither media URL's form. The refinement restates
4300
+ // the rule both media descriptions publish: without an image, a prompt is
4301
+ // required. The probes cannot reach it, since a body that fails field
4302
+ // validation is never checked against it. The audio's length limit (2 to 10
4303
+ // seconds on the pro tier) is a property of the file, not of the request, so
4304
+ // the description states it and this schema does not encode it.
4305
+ // Docs: https://fal.ai/models/lightricks/ltx-2.5/audio-to-video/pro/api
4306
+ export const FalLightricksLtx2p5AudioToVideoProRequestSchema = z
4307
+ .object({
4308
+ audio_url: z
4309
+ .string()
4310
+ .describe("URL of the audio file to generate a video from. Duration must be between 2 and 20 seconds; pro models support a maximum of 10 seconds. Must be publicly accessible or base64 data URI."),
4311
+ image_url: z
4312
+ .string()
4313
+ .nullable()
4314
+ .optional()
4315
+ .describe("URL of an image to use as the first frame of the video. If not provided, prompt is required."),
4316
+ prompt: z
4317
+ .string()
4318
+ .min(1)
4319
+ .max(5000)
4320
+ .nullable()
4321
+ .optional()
4322
+ .describe("Text description of how the video should be generated. Required if image_url is not provided. When image_url is provided, this describes how the image should be animated."),
4323
+ guidance_scale: z
4324
+ .number()
4325
+ .min(1)
4326
+ .max(50)
4327
+ .nullable()
4328
+ .optional()
4329
+ .describe("Guidance scale for video generation. Higher values make the output more closely follow the prompt. Defaults to 5 for text-to-video, or 9 when providing an image."),
4330
+ aspect_ratio: z
4331
+ .enum(["auto", "16:9", "9:16"])
4332
+ .default("auto")
4333
+ .describe("The aspect ratio of the generated video. If 'auto', the aspect ratio will be determined automatically based on the input image, or defaults to 16:9 if no image is provided."),
4334
+ })
4335
+ .refine((v) => v.image_url != null || v.prompt != null, {
4336
+ message: "lightricks/ltx-2.5/audio-to-video/pro requires prompt when image_url is not provided",
4337
+ path: ["prompt"],
4338
+ });
4339
+ // The live OpenAPI requires only `audio_url`, and seventeen unbilled 422
4340
+ // probes (2026-10-08) found upstream's validator to match it, answering as it
4341
+ // does for the pro tier: `audio_url` is a string (null is refused);
4342
+ // `image_url` is a string or null; `prompt` is a string of 1 to 5,000
4343
+ // characters or null; `guidance_scale` is a number from 1 to 50 or null;
4344
+ // `aspect_ratio` is closed to the documented values (null is refused). The
4345
+ // validator ignored an unknown field, so the object is not strict, and it
4346
+ // checked neither media URL's form. The refinement restates the rule both
4347
+ // media descriptions publish: without an image, a prompt is required. The
4348
+ // probes cannot reach it, since a body that fails field validation is never
4349
+ // checked against it. The audio's length limit (2 to 20 seconds on the fast
4350
+ // tier) is a property of the file, not of the request, so the description
4351
+ // states it and this schema does not encode it.
4352
+ // Docs: https://fal.ai/models/lightricks/ltx-2.5/audio-to-video/fast/api
4353
+ export const FalLightricksLtx2p5AudioToVideoFastRequestSchema = z
4354
+ .object({
4355
+ audio_url: z
4356
+ .string()
4357
+ .describe("URL of the audio file to generate a video from. Duration must be between 2 and 20 seconds; pro models support a maximum of 10 seconds. Must be publicly accessible or base64 data URI."),
4358
+ image_url: z
4359
+ .string()
4360
+ .nullable()
4361
+ .optional()
4362
+ .describe("URL of an image to use as the first frame of the video. If not provided, prompt is required."),
4363
+ prompt: z
4364
+ .string()
4365
+ .min(1)
4366
+ .max(5000)
4367
+ .nullable()
4368
+ .optional()
4369
+ .describe("Text description of how the video should be generated. Required if image_url is not provided. When image_url is provided, this describes how the image should be animated."),
4370
+ guidance_scale: z
4371
+ .number()
4372
+ .min(1)
4373
+ .max(50)
4374
+ .nullable()
4375
+ .optional()
4376
+ .describe("Guidance scale for video generation. Higher values make the output more closely follow the prompt. Defaults to 5 for text-to-video, or 9 when providing an image."),
4377
+ aspect_ratio: z
4378
+ .enum(["auto", "16:9", "9:16"])
4379
+ .default("auto")
4380
+ .describe("The aspect ratio of the generated video. If 'auto', the aspect ratio will be determined automatically based on the input image, or defaults to 16:9 if no image is provided."),
4381
+ })
4382
+ .refine((v) => v.image_url != null || v.prompt != null, {
4383
+ message: "lightricks/ltx-2.5/audio-to-video/fast requires prompt when image_url is not provided",
4384
+ path: ["prompt"],
4385
+ });
4386
+ const FalKlingVideoV3TurboStandardTextToVideoKlingV3MultiPromptElementSchema = z.object({
4387
+ prompt: z.string().describe("The prompt for this shot."),
4388
+ duration: z
4389
+ .enum([
4390
+ "1",
4391
+ "2",
4392
+ "3",
4393
+ "4",
4394
+ "5",
4395
+ "6",
4396
+ "7",
4397
+ "8",
4398
+ "9",
4399
+ "10",
4400
+ "11",
4401
+ "12",
4402
+ "13",
4403
+ "14",
4404
+ "15",
4405
+ ])
4406
+ .default("5")
4407
+ .describe("The duration of this shot in seconds"),
4408
+ });
4409
+ // Pinned to the live queue OpenAPI read on 2026-10-08
4410
+ // (sha256 bfc28f267f80d27856a8d98a21988eefe395216750e988e53d9fe649ee4fc7fd). Field order follows x-fal-order-properties.
4411
+ // Docs: https://fal.ai/models/fal-ai/kling-video/v3/turbo/standard/text-to-video/api
4412
+ export const FalKlingVideoV3TurboStandardTextToVideoRequestSchema = z
4413
+ .object({
4414
+ prompt: z
4415
+ .string()
4416
+ .max(3072)
4417
+ .nullable()
4418
+ .optional()
4419
+ .describe("Text prompt to generate the video with. For best results keep the prompt under 2500 characters. Mutually exclusive with `multi_prompt`."),
4420
+ multi_prompt: z
4421
+ .array(FalKlingVideoV3TurboStandardTextToVideoKlingV3MultiPromptElementSchema)
4422
+ .nullable()
4423
+ .optional()
4424
+ .describe("Multi-shot storyboard (1-6 shots). Each shot has its own prompt and duration; the total duration must not exceed 15s. Mutually exclusive with `prompt`."),
4425
+ aspect_ratio: z
4426
+ .enum(["16:9", "9:16", "1:1"])
4427
+ .default("16:9")
4428
+ .describe("The aspect ratio (width:height) of the generated video."),
4429
+ duration: z
4430
+ .enum([
4431
+ "3",
4432
+ "4",
4433
+ "5",
4434
+ "6",
4435
+ "7",
4436
+ "8",
4437
+ "9",
4438
+ "10",
4439
+ "11",
4440
+ "12",
4441
+ "13",
4442
+ "14",
4443
+ "15",
4444
+ ])
4445
+ .default("5")
4446
+ .describe("Video length in seconds."),
4447
+ })
4448
+ .refine((v) => !(v.multi_prompt != null && v.prompt != null), {
4449
+ message: "fal-ai/kling-video/v3/turbo/standard/text-to-video multi_prompt and prompt are mutually exclusive",
4450
+ path: ["prompt"],
4451
+ });
4452
+ const FalKlingVideoV3TurboStandardImageToVideoKlingV3MultiPromptElementSchema = z.object({
4453
+ prompt: z.string().describe("The prompt for this shot."),
4454
+ duration: z
4455
+ .enum([
4456
+ "1",
4457
+ "2",
4458
+ "3",
4459
+ "4",
4460
+ "5",
4461
+ "6",
4462
+ "7",
4463
+ "8",
4464
+ "9",
4465
+ "10",
4466
+ "11",
4467
+ "12",
4468
+ "13",
4469
+ "14",
4470
+ "15",
4471
+ ])
4472
+ .default("5")
4473
+ .describe("The duration of this shot in seconds"),
4474
+ });
4475
+ // Pinned to the live queue OpenAPI read on 2026-10-08
4476
+ // (sha256 241098dfefdebefe28a34cd7ef2b0b3cdd08572deb0a7f4587ff94e2288bc59e). Field order follows x-fal-order-properties.
4477
+ // Docs: https://fal.ai/models/fal-ai/kling-video/v3/turbo/standard/image-to-video/api
4478
+ export const FalKlingVideoV3TurboStandardImageToVideoRequestSchema = z
4479
+ .object({
4480
+ prompt: z
4481
+ .string()
4482
+ .max(3072)
4483
+ .nullable()
4484
+ .optional()
4485
+ .describe("Optional text prompt. For best results keep the prompt under 2500 characters. Mutually exclusive with `multi_prompt`."),
4486
+ multi_prompt: z
4487
+ .array(FalKlingVideoV3TurboStandardImageToVideoKlingV3MultiPromptElementSchema)
4488
+ .nullable()
4489
+ .optional()
4490
+ .describe("Multi-shot storyboard (1-6 shots). Each shot has its own prompt and duration; the total duration must not exceed 15s. Mutually exclusive with `prompt`."),
4491
+ image_url: z
4492
+ .string()
4493
+ .describe("First-frame reference image. Formats: .jpg/.jpeg/.png; max 50MB; min 300px per side; aspect ratio within 1:2.5 to 2.5:1."),
4494
+ duration: z
4495
+ .enum([
4496
+ "3",
4497
+ "4",
4498
+ "5",
4499
+ "6",
4500
+ "7",
4501
+ "8",
4502
+ "9",
4503
+ "10",
4504
+ "11",
4505
+ "12",
4506
+ "13",
4507
+ "14",
4508
+ "15",
4509
+ ])
4510
+ .default("5")
4511
+ .describe("Video length in seconds."),
4512
+ })
4513
+ .refine((v) => !(v.multi_prompt != null && v.prompt != null), {
4514
+ message: "fal-ai/kling-video/v3/turbo/standard/image-to-video multi_prompt and prompt are mutually exclusive",
4515
+ path: ["prompt"],
4516
+ });
4517
+ const FalKlingVideoV3TurboProTextToVideoKlingV3MultiPromptElementSchema = z.object({
4518
+ prompt: z.string().describe("The prompt for this shot."),
4519
+ duration: z
4520
+ .enum([
4521
+ "1",
4522
+ "2",
4523
+ "3",
4524
+ "4",
4525
+ "5",
4526
+ "6",
4527
+ "7",
4528
+ "8",
4529
+ "9",
4530
+ "10",
4531
+ "11",
4532
+ "12",
4533
+ "13",
4534
+ "14",
4535
+ "15",
4536
+ ])
4537
+ .default("5")
4538
+ .describe("The duration of this shot in seconds"),
4539
+ });
4540
+ // Pinned to the live queue OpenAPI read on 2026-10-08
4541
+ // (sha256 cba18c45da7f9c3cb4e6e5799d9d831b6eb2527448b562ba6bf48760b2eb4723). Field order follows x-fal-order-properties.
4542
+ // Docs: https://fal.ai/models/fal-ai/kling-video/v3/turbo/pro/text-to-video/api
4543
+ export const FalKlingVideoV3TurboProTextToVideoRequestSchema = z
4544
+ .object({
4545
+ prompt: z
4546
+ .string()
4547
+ .max(3072)
4548
+ .nullable()
4549
+ .optional()
4550
+ .describe("Text prompt to generate the video with. For best results keep the prompt under 2500 characters. Mutually exclusive with `multi_prompt`."),
4551
+ multi_prompt: z
4552
+ .array(FalKlingVideoV3TurboProTextToVideoKlingV3MultiPromptElementSchema)
4553
+ .nullable()
4554
+ .optional()
4555
+ .describe("Multi-shot storyboard (1-6 shots). Each shot has its own prompt and duration; the total duration must not exceed 15s. Mutually exclusive with `prompt`."),
4556
+ aspect_ratio: z
4557
+ .enum(["16:9", "9:16", "1:1"])
4558
+ .default("16:9")
4559
+ .describe("The aspect ratio (width:height) of the generated video."),
4560
+ duration: z
4561
+ .enum([
4562
+ "3",
4563
+ "4",
4564
+ "5",
4565
+ "6",
4566
+ "7",
4567
+ "8",
4568
+ "9",
4569
+ "10",
4570
+ "11",
4571
+ "12",
4572
+ "13",
4573
+ "14",
4574
+ "15",
4575
+ ])
4576
+ .default("5")
4577
+ .describe("Video length in seconds."),
4578
+ })
4579
+ .refine((v) => !(v.multi_prompt != null && v.prompt != null), {
4580
+ message: "fal-ai/kling-video/v3/turbo/pro/text-to-video multi_prompt and prompt are mutually exclusive",
4581
+ path: ["prompt"],
4582
+ });
4583
+ const FalKlingVideoV3TurboProImageToVideoKlingV3MultiPromptElementSchema = z.object({
4584
+ prompt: z.string().describe("The prompt for this shot."),
4585
+ duration: z
4586
+ .enum([
4587
+ "1",
4588
+ "2",
4589
+ "3",
4590
+ "4",
4591
+ "5",
4592
+ "6",
4593
+ "7",
4594
+ "8",
4595
+ "9",
4596
+ "10",
4597
+ "11",
4598
+ "12",
4599
+ "13",
4600
+ "14",
4601
+ "15",
4602
+ ])
4603
+ .default("5")
4604
+ .describe("The duration of this shot in seconds"),
4605
+ });
4606
+ // Pinned to the live queue OpenAPI read on 2026-10-08
4607
+ // (sha256 43cab73a0ae9037b68d3efe4bcb85a8425ea6f35418b11574b891f16bbbe7c87). Field order follows x-fal-order-properties.
4608
+ // Docs: https://fal.ai/models/fal-ai/kling-video/v3/turbo/pro/image-to-video/api
4609
+ export const FalKlingVideoV3TurboProImageToVideoRequestSchema = z
4610
+ .object({
4611
+ prompt: z
4612
+ .string()
4613
+ .max(3072)
4614
+ .nullable()
4615
+ .optional()
4616
+ .describe("Optional text prompt. For best results keep the prompt under 2500 characters. Mutually exclusive with `multi_prompt`."),
4617
+ multi_prompt: z
4618
+ .array(FalKlingVideoV3TurboProImageToVideoKlingV3MultiPromptElementSchema)
4619
+ .nullable()
4620
+ .optional()
4621
+ .describe("Multi-shot storyboard (1-6 shots). Each shot has its own prompt and duration; the total duration must not exceed 15s. Mutually exclusive with `prompt`."),
4622
+ image_url: z
4623
+ .string()
4624
+ .describe("First-frame reference image. Formats: .jpg/.jpeg/.png; max 50MB; min 300px per side; aspect ratio within 1:2.5 to 2.5:1."),
4625
+ duration: z
4626
+ .enum([
4627
+ "3",
4628
+ "4",
4629
+ "5",
4630
+ "6",
4631
+ "7",
4632
+ "8",
4633
+ "9",
4634
+ "10",
4635
+ "11",
4636
+ "12",
4637
+ "13",
4638
+ "14",
4639
+ "15",
4640
+ ])
4641
+ .default("5")
4642
+ .describe("Video length in seconds."),
4643
+ })
4644
+ .refine((v) => !(v.multi_prompt != null && v.prompt != null), {
4645
+ message: "fal-ai/kling-video/v3/turbo/pro/image-to-video multi_prompt and prompt are mutually exclusive",
4646
+ path: ["prompt"],
4647
+ });
4648
+ // Pinned to the live queue OpenAPI read on 2026-10-08
4649
+ // (sha256 2d79f33cef2f2a6c196f66a3cb6bf720f86ede40075e79e06c45e10323b42dc1). Field order follows x-fal-order-properties.
4650
+ // Docs: https://fal.ai/models/alibaba/qwen-audio-3-tts/api
4651
+ export const FalAlibabaQwenAudio3TtsRequestSchema = z.object({
4652
+ text: z.string().min(1).max(2000).describe("The text to convert to speech."),
4653
+ voice: z
4654
+ .enum([
4655
+ "Cherry",
4656
+ "Serena",
4657
+ "Ethan",
4658
+ "Chelsie",
4659
+ "Momo",
4660
+ "Vivian",
4661
+ "Moon",
4662
+ "Maia",
4663
+ "Kai",
4664
+ "Nofish",
4665
+ "Bella",
4666
+ "Jennifer",
4667
+ "Ryan",
4668
+ "Katerina",
4669
+ "Aiden",
4670
+ "Mia",
4671
+ "Mochi",
4672
+ "Bellona",
4673
+ "Vincent",
4674
+ "Bunny",
4675
+ "Neil",
4676
+ "Elias",
4677
+ "Arthur",
4678
+ "Nini",
4679
+ "Seren",
4680
+ "Pip",
4681
+ "Stella",
4682
+ "Bodega",
4683
+ "Sonrisa",
4684
+ "Alek",
4685
+ "Dolce",
4686
+ "Sohee",
4687
+ "Lenn",
4688
+ "Emilien",
4689
+ "Andre",
4690
+ "Jada",
4691
+ "Dylan",
4692
+ "Li",
4693
+ "Marcus",
4694
+ "Roy",
4695
+ "Peter",
4696
+ "Sunny",
4697
+ "Eric",
4698
+ "Rocky",
4699
+ "Kiki",
4700
+ ])
4701
+ .default("Cherry")
4702
+ .describe("The voice used for speech synthesis. See the [Qwen-TTS voice list](https://www.alibabacloud.com/help/en/model-studio/qwen-tts-voice-list) for each voice's language and dialect coverage."),
4703
+ language: z
4704
+ .enum([
4705
+ "Auto",
4706
+ "Chinese",
4707
+ "English",
4708
+ "Spanish",
4709
+ "Russian",
4710
+ "Italian",
4711
+ "French",
4712
+ "Korean",
4713
+ "Japanese",
4714
+ "German",
4715
+ "Portuguese",
4716
+ ])
4717
+ .default("Auto")
4718
+ .describe("Language of the input text. `Auto` lets the model detect it; setting it explicitly improves pronunciation and intonation."),
4719
+ });
4720
+ // Pinned to the live queue OpenAPI read on 2026-10-08
4721
+ // (sha256 10e9ea49b4e3c7d3298ecdd9e8eda5fb332c5122e4f699b51592c839ae2c674e). Field order follows x-fal-order-properties.
4722
+ // Docs: https://fal.ai/models/alibaba/happy-horse/v1.1/reference-to-video/api
4723
+ export const FalAlibabaHappyHorseV1p1ReferenceToVideoRequestSchema = z.object({
4724
+ prompt: z
4725
+ .string()
4726
+ .min(1)
4727
+ .describe("Text prompt describing the desired video. Reference subjects from your images using ``character1``, ``character2``, ... up to ``character9`` (the order matches the order of ``image_urls``). Max 2500 characters."),
4728
+ image_urls: z
4729
+ .array(z.string())
4730
+ .describe("Reference images for subject consistency (1-9 images). Formats: JPEG, JPG, PNG, WEBP. Shortest side must be at least 400 px (720P or higher recommended). Max 20 MB each."),
4731
+ aspect_ratio: z
4732
+ .enum(["16:9", "9:16", "1:1", "4:3", "3:4", "21:9", "9:21", "5:4", "4:5"])
4733
+ .default("16:9")
4734
+ .describe("Aspect ratio of the generated video."),
4735
+ resolution: z
4736
+ .enum(["720p", "1080p"])
4737
+ .default("1080p")
4738
+ .describe("Output video resolution tier."),
4739
+ duration: z
4740
+ .union([
4741
+ z.literal(3),
4742
+ z.literal(4),
4743
+ z.literal(5),
4744
+ z.literal(6),
4745
+ z.literal(7),
4746
+ z.literal(8),
4747
+ z.literal(9),
4748
+ z.literal(10),
4749
+ z.literal(11),
4750
+ z.literal(12),
4751
+ z.literal(13),
4752
+ z.literal(14),
4753
+ z.literal(15),
4754
+ ])
4755
+ .default(5)
4756
+ .describe("Output video duration in seconds (3-15)."),
4757
+ seed: z
4758
+ .number()
4759
+ .int()
4760
+ .nullable()
4761
+ .optional()
4762
+ .describe("Random seed for reproducibility (0-2147483647)."),
4763
+ enable_safety_checker: z
4764
+ .boolean()
4765
+ .default(true)
4766
+ .describe("Enable content moderation for input and output. Disabling it requires account authorization; unauthorized requests are always checked."),
4767
+ });
4768
+ // Pinned to the live queue OpenAPI read on 2026-10-08
4769
+ // (sha256 19e08067c44b97e67233cabf1e0ccfc17ef3efb25c01fcf4d0e4f3754501de68). Field order follows x-fal-order-properties.
4770
+ // Docs: https://fal.ai/models/alibaba/happy-horse/v1.1/image-to-video/api
4771
+ export const FalAlibabaHappyHorseV1p1ImageToVideoRequestSchema = z.object({
4772
+ image_url: z
4773
+ .string()
4774
+ .describe("URL of the first frame image. Formats: JPEG, JPG, PNG, BMP, WEBP. Dimensions must be at least 300px. Aspect ratio must be between 1:2.5 and 2.5:1. Max 20 MB."),
4775
+ prompt: z
4776
+ .string()
4777
+ .nullable()
4778
+ .optional()
4779
+ .describe("Optional text prompt guiding the animation. Max 2500 characters."),
4780
+ resolution: z
4781
+ .enum(["720p", "1080p"])
4782
+ .default("1080p")
4783
+ .describe("Output video resolution tier."),
4784
+ duration: z
4785
+ .union([
4786
+ z.literal(3),
4787
+ z.literal(4),
4788
+ z.literal(5),
4789
+ z.literal(6),
4790
+ z.literal(7),
4791
+ z.literal(8),
4792
+ z.literal(9),
4793
+ z.literal(10),
4794
+ z.literal(11),
4795
+ z.literal(12),
4796
+ z.literal(13),
4797
+ z.literal(14),
4798
+ z.literal(15),
4799
+ ])
4800
+ .default(5)
4801
+ .describe("Output video duration in seconds (3-15)."),
4802
+ seed: z
4803
+ .number()
4804
+ .int()
4805
+ .nullable()
4806
+ .optional()
4807
+ .describe("Random seed for reproducibility (0-2147483647)."),
4808
+ enable_safety_checker: z
4809
+ .boolean()
4810
+ .default(true)
4811
+ .describe("Enable content moderation for input and output. Disabling it requires account authorization; unauthorized requests are always checked."),
4812
+ });
4813
+ // Pinned to the live queue OpenAPI read on 2026-10-08
4814
+ // (sha256 6ef799aab74dd454c97802c98b8e8151130e7b09ad878eb7457bc5a091688955). Field order follows x-fal-order-properties.
4815
+ // Docs: https://fal.ai/models/alibaba/happy-horse/v1.1/text-to-video/api
4816
+ export const FalAlibabaHappyHorseV1p1TextToVideoRequestSchema = z.object({
4817
+ prompt: z
4818
+ .string()
4819
+ .min(1)
4820
+ .describe("Text prompt describing the desired video. Max 2500 characters."),
4821
+ aspect_ratio: z
4822
+ .enum(["16:9", "9:16", "1:1", "4:3", "3:4", "21:9", "9:21", "5:4", "4:5"])
4823
+ .default("16:9")
4824
+ .describe("Aspect ratio of the generated video."),
4825
+ resolution: z
4826
+ .enum(["720p", "1080p"])
4827
+ .default("1080p")
4828
+ .describe("Output video resolution tier."),
4829
+ duration: z
4830
+ .union([
4831
+ z.literal(3),
4832
+ z.literal(4),
4833
+ z.literal(5),
4834
+ z.literal(6),
4835
+ z.literal(7),
4836
+ z.literal(8),
4837
+ z.literal(9),
4838
+ z.literal(10),
4839
+ z.literal(11),
4840
+ z.literal(12),
4841
+ z.literal(13),
4842
+ z.literal(14),
4843
+ z.literal(15),
4844
+ ])
4845
+ .default(5)
4846
+ .describe("Output video duration in seconds (3-15)."),
4847
+ seed: z
4848
+ .number()
4849
+ .int()
4850
+ .nullable()
4851
+ .optional()
4852
+ .describe("Random seed for reproducibility (0-2147483647)."),
4853
+ enable_safety_checker: z
4854
+ .boolean()
4855
+ .default(true)
4856
+ .describe("Enable content moderation for input and output. Disabling it requires account authorization; unauthorized requests are always checked."),
4857
+ });
4858
+ // Pinned to the live queue OpenAPI read on 2026-10-08
4859
+ // (sha256 15115befba2212917f30e6792e1216e68c97023871654b7ac26f337d6fbe2752). Field order follows x-fal-order-properties.
4860
+ // Docs: https://fal.ai/models/blackforestlabs/flux-3/edit-video/api
4861
+ export const FalBlackforestlabsFlux3EditVideoRequestSchema = z.object({
4862
+ prompt: z
4863
+ .string()
4864
+ .max(4096)
4865
+ .describe("The text prompt describing how to change the input video. The clip is re-rendered preserving motion, timing, and framing."),
4866
+ safety_tolerance: z
4867
+ .number()
4868
+ .int()
4869
+ .min(0)
4870
+ .max(4)
4871
+ .default(2)
4872
+ .describe("The safety tolerance level for the generated video. 0 is the strictest and 4 is the most permissive."),
4873
+ video_url: z
4874
+ .string()
4875
+ .describe("URL of the input video. MP4, under 50 MB and under 15 seconds."),
4876
+ });
4877
+ const FalBriaFiboEdit1p5EditPromptObjectSchema = z.object({
4878
+ description: z
4879
+ .string()
4880
+ .nullable()
4881
+ .optional()
4882
+ .describe("A description of the object to be generated."),
4883
+ location: z
4884
+ .string()
4885
+ .nullable()
4886
+ .optional()
4887
+ .describe("The location of the object in the image."),
4888
+ relationship: z
4889
+ .string()
4890
+ .describe("The relationship of the object to other objects in the image."),
4891
+ relative_size: z
4892
+ .string()
4893
+ .nullable()
4894
+ .optional()
4895
+ .describe("The relative size of the object in the image."),
4896
+ shape_and_color: z
4897
+ .string()
4898
+ .nullable()
4899
+ .optional()
4900
+ .describe("The shape and color of the object."),
4901
+ texture: z
4902
+ .string()
4903
+ .nullable()
4904
+ .optional()
4905
+ .describe("The texture of the object."),
4906
+ appearance_details: z
4907
+ .string()
4908
+ .nullable()
4909
+ .optional()
4910
+ .describe("The appearance details of the object."),
4911
+ number_of_objects: z
4912
+ .number()
4913
+ .int()
4914
+ .nullable()
4915
+ .optional()
4916
+ .describe("The number of objects in the image."),
4917
+ pose: z
4918
+ .string()
4919
+ .nullable()
4920
+ .optional()
4921
+ .describe("The pose of the object in the image."),
4922
+ expression: z
4923
+ .string()
4924
+ .nullable()
4925
+ .optional()
4926
+ .describe("The expression of the object in the image."),
4927
+ clothing: z
4928
+ .string()
4929
+ .nullable()
4930
+ .optional()
4931
+ .describe("The clothing of the object in the image."),
4932
+ action: z
4933
+ .string()
4934
+ .nullable()
4935
+ .optional()
4936
+ .describe("The action of the object in the image."),
4937
+ gender: z
4938
+ .string()
4939
+ .nullable()
4940
+ .optional()
4941
+ .describe("The gender of the object in the image."),
4942
+ skin_tone_and_texture: z
4943
+ .string()
4944
+ .nullable()
4945
+ .optional()
4946
+ .describe("The skin tone and texture of the object in the image."),
4947
+ orientation: z
4948
+ .string()
4949
+ .nullable()
4950
+ .optional()
4951
+ .describe("The orientation of the object in the image."),
4952
+ });
4953
+ const FalBriaFiboEdit1p5EditLightingSchema = z.object({
4954
+ conditions: z
4955
+ .string()
4956
+ .nullable()
4957
+ .optional()
4958
+ .describe("The conditions of the lighting in the image to be generated."),
4959
+ direction: z
4960
+ .string()
4961
+ .nullable()
4962
+ .optional()
4963
+ .describe("The direction of the lighting in the image to be generated."),
4964
+ shadows: z
4965
+ .string()
4966
+ .nullable()
4967
+ .optional()
4968
+ .describe("The shadows in the image to be generated."),
4969
+ });
4970
+ const FalBriaFiboEdit1p5EditAestheticsSchema = z.object({
4971
+ composition: z
4972
+ .string()
4973
+ .nullable()
4974
+ .optional()
4975
+ .describe("The composition of the image to be generated."),
4976
+ color_scheme: z
4977
+ .string()
4978
+ .nullable()
4979
+ .optional()
4980
+ .describe("The color scheme of the image to be generated."),
4981
+ mood_atmosphere: z
4982
+ .string()
4983
+ .nullable()
4984
+ .optional()
4985
+ .describe("The mood and atmosphere of the image to be generated."),
4986
+ aesthetic_score: z
4987
+ .string()
4988
+ .nullable()
4989
+ .optional()
4990
+ .describe("The aesthetic score of the image to be generated."),
4991
+ preference_score: z
4992
+ .string()
4993
+ .nullable()
4994
+ .optional()
4995
+ .describe("The preference score of the image to be generated."),
4996
+ });
4997
+ const FalBriaFiboEdit1p5EditPhotographicCharacteristicsSchema = z.object({
4998
+ depth_of_field: z
4999
+ .string()
5000
+ .nullable()
5001
+ .optional()
5002
+ .describe("The depth of field in the image to be generated."),
5003
+ focus: z
5004
+ .string()
5005
+ .nullable()
5006
+ .optional()
5007
+ .describe("The focus in the image to be generated."),
5008
+ camera_angle: z
5009
+ .string()
5010
+ .nullable()
5011
+ .optional()
5012
+ .describe("The angle of the camera in the image to be generated."),
5013
+ lens_focal_length: z
5014
+ .string()
5015
+ .nullable()
5016
+ .optional()
5017
+ .describe("The focal length of the lens in the image to be generated."),
5018
+ });
5019
+ const FalBriaFiboEdit1p5EditStructuredInstructionSchema = z.object({
5020
+ short_description: z
5021
+ .string()
5022
+ .nullable()
5023
+ .optional()
5024
+ .describe("A short description of the image to be generated."),
5025
+ objects: z
5026
+ .array(FalBriaFiboEdit1p5EditPromptObjectSchema)
5027
+ .nullable()
5028
+ .default([])
5029
+ .describe("A list of objects in the image to be generated, along with their attributes and relationships to other objects in the image."),
5030
+ background_setting: z
5031
+ .string()
5032
+ .nullable()
5033
+ .optional()
5034
+ .describe("The background setting of the image to be generated."),
5035
+ lighting: FalBriaFiboEdit1p5EditLightingSchema.nullable()
5036
+ .optional()
5037
+ .describe("The lighting of the image to be generated."),
5038
+ aesthetics: FalBriaFiboEdit1p5EditAestheticsSchema.nullable()
5039
+ .optional()
5040
+ .describe("The aesthetics of the image to be generated."),
5041
+ photographic_characteristics: FalBriaFiboEdit1p5EditPhotographicCharacteristicsSchema.nullable()
5042
+ .optional()
5043
+ .describe("The photographic characteristics of the image to be generated."),
5044
+ style_medium: z
5045
+ .string()
5046
+ .nullable()
5047
+ .optional()
5048
+ .describe("The style medium of the image to be generated."),
5049
+ text_render: z
5050
+ .array(z.unknown())
5051
+ .nullable()
5052
+ .default([])
5053
+ .describe("A list of text to be rendered in the image."),
5054
+ context: z
5055
+ .string()
5056
+ .nullable()
5057
+ .optional()
5058
+ .describe("The context of the image to be generated."),
5059
+ artistic_style: z
5060
+ .string()
5061
+ .nullable()
5062
+ .optional()
5063
+ .describe("The artistic style of the image to be generated."),
5064
+ edit_instruction: z
5065
+ .string()
5066
+ .nullable()
5067
+ .optional()
5068
+ .describe("The edit instruction for the image."),
5069
+ });
5070
+ // Pinned to the live queue OpenAPI read on 2026-10-08
5071
+ // (sha256 8f2dd05d32cfe817ded5a34248afc7fe915074995a3b25eb547546d09c45319a). Field order follows x-fal-order-properties.
5072
+ // Docs: https://fal.ai/models/bria/fibo-edit-1.5/edit/api
5073
+ export const FalBriaFiboEdit1p5EditRequestSchema = z.object({
5074
+ image_urls: z
5075
+ .array(z.string())
5076
+ .nullable()
5077
+ .optional()
5078
+ .describe("1-4 reference images (files or URLs). Order is significant: the instruction is resolved against the images in the order they are sent."),
5079
+ instruction: z
5080
+ .string()
5081
+ .nullable()
5082
+ .optional()
5083
+ .describe("Instruction for image editing."),
5084
+ aspect_ratio: z
5085
+ .enum(["1:1", "2:3", "3:2", "3:4", "4:3", "4:5", "5:4", "9:16", "16:9"])
5086
+ .nullable()
5087
+ .optional()
5088
+ .describe("Output aspect ratio. Left unset, the output keeps the ratio of the first reference image. A chosen ratio applies only with two or more reference images; with a single reference the output keeps that image's ratio either way."),
5089
+ seed: z
5090
+ .number()
5091
+ .int()
5092
+ .default(5555)
5093
+ .describe("Random seed for reproducibility."),
5094
+ mask_url: z
5095
+ .string()
5096
+ .nullable()
5097
+ .optional()
5098
+ .describe("Mask (file or URL) marking the region to regenerate: white where the model should edit, black elsewhere. Single-reference requests only, and it must be the same size as that image. A masked edit comes back at the reference's own resolution."),
5099
+ sync_mode: z
5100
+ .boolean()
5101
+ .default(false)
5102
+ .describe("If true, returns the image directly in the response (increases latency)."),
5103
+ structured_instruction: FalBriaFiboEdit1p5EditStructuredInstructionSchema.nullable()
5104
+ .optional()
5105
+ .describe("A pre-built structured prompt, used verbatim instead of having VGL build one when no instruction is sent. Accepts what a previous edit returned."),
5106
+ });
5107
+ const FalBriaFiboGen1p5TextToImagePromptObjectSchema = z.object({
5108
+ description: z
5109
+ .string()
5110
+ .nullable()
5111
+ .optional()
5112
+ .describe("A description of the object to be generated."),
5113
+ location: z
5114
+ .string()
5115
+ .nullable()
5116
+ .optional()
5117
+ .describe("The location of the object in the image."),
5118
+ relationship: z
5119
+ .string()
5120
+ .describe("The relationship of the object to other objects in the image."),
5121
+ relative_size: z
5122
+ .string()
5123
+ .nullable()
5124
+ .optional()
5125
+ .describe("The relative size of the object in the image."),
5126
+ shape_and_color: z
5127
+ .string()
5128
+ .nullable()
5129
+ .optional()
5130
+ .describe("The shape and color of the object."),
5131
+ texture: z
5132
+ .string()
5133
+ .nullable()
5134
+ .optional()
5135
+ .describe("The texture of the object."),
5136
+ appearance_details: z
5137
+ .string()
5138
+ .nullable()
5139
+ .optional()
5140
+ .describe("The appearance details of the object."),
5141
+ number_of_objects: z
5142
+ .number()
5143
+ .int()
5144
+ .nullable()
5145
+ .optional()
5146
+ .describe("The number of objects in the image."),
5147
+ pose: z
5148
+ .string()
5149
+ .nullable()
5150
+ .optional()
5151
+ .describe("The pose of the object in the image."),
5152
+ expression: z
5153
+ .string()
5154
+ .nullable()
5155
+ .optional()
5156
+ .describe("The expression of the object in the image."),
5157
+ clothing: z
5158
+ .string()
5159
+ .nullable()
5160
+ .optional()
5161
+ .describe("The clothing of the object in the image."),
5162
+ action: z
5163
+ .string()
5164
+ .nullable()
5165
+ .optional()
5166
+ .describe("The action of the object in the image."),
5167
+ gender: z
5168
+ .string()
5169
+ .nullable()
5170
+ .optional()
5171
+ .describe("The gender of the object in the image."),
5172
+ skin_tone_and_texture: z
5173
+ .string()
5174
+ .nullable()
5175
+ .optional()
5176
+ .describe("The skin tone and texture of the object in the image."),
5177
+ orientation: z
5178
+ .string()
5179
+ .nullable()
5180
+ .optional()
5181
+ .describe("The orientation of the object in the image."),
5182
+ });
5183
+ const FalBriaFiboGen1p5TextToImageLightingSchema = z.object({
5184
+ conditions: z
5185
+ .string()
5186
+ .nullable()
5187
+ .optional()
5188
+ .describe("The conditions of the lighting in the image to be generated."),
5189
+ direction: z
5190
+ .string()
5191
+ .nullable()
5192
+ .optional()
5193
+ .describe("The direction of the lighting in the image to be generated."),
5194
+ shadows: z
5195
+ .string()
5196
+ .nullable()
5197
+ .optional()
5198
+ .describe("The shadows in the image to be generated."),
5199
+ });
5200
+ const FalBriaFiboGen1p5TextToImageAestheticsSchema = z.object({
5201
+ composition: z
5202
+ .string()
5203
+ .nullable()
5204
+ .optional()
5205
+ .describe("The composition of the image to be generated."),
5206
+ color_scheme: z
5207
+ .string()
5208
+ .nullable()
5209
+ .optional()
5210
+ .describe("The color scheme of the image to be generated."),
5211
+ mood_atmosphere: z
5212
+ .string()
5213
+ .nullable()
5214
+ .optional()
5215
+ .describe("The mood and atmosphere of the image to be generated."),
5216
+ aesthetic_score: z
5217
+ .string()
5218
+ .nullable()
5219
+ .optional()
5220
+ .describe("The aesthetic score of the image to be generated."),
5221
+ preference_score: z
5222
+ .string()
5223
+ .nullable()
5224
+ .optional()
5225
+ .describe("The preference score of the image to be generated."),
5226
+ });
5227
+ const FalBriaFiboGen1p5TextToImagePhotographicCharacteristicsSchema = z.object({
5228
+ depth_of_field: z
5229
+ .string()
5230
+ .nullable()
5231
+ .optional()
5232
+ .describe("The depth of field in the image to be generated."),
5233
+ focus: z
5234
+ .string()
5235
+ .nullable()
5236
+ .optional()
5237
+ .describe("The focus in the image to be generated."),
5238
+ camera_angle: z
5239
+ .string()
5240
+ .nullable()
5241
+ .optional()
5242
+ .describe("The angle of the camera in the image to be generated."),
5243
+ lens_focal_length: z
5244
+ .string()
5245
+ .nullable()
5246
+ .optional()
5247
+ .describe("The focal length of the lens in the image to be generated."),
5248
+ });
5249
+ const FalBriaFiboGen1p5TextToImageStructuredPromptSchema = z.object({
5250
+ short_description: z
5251
+ .string()
5252
+ .nullable()
5253
+ .optional()
5254
+ .describe("A short description of the image to be generated."),
5255
+ objects: z
5256
+ .array(FalBriaFiboGen1p5TextToImagePromptObjectSchema)
5257
+ .nullable()
5258
+ .default([])
5259
+ .describe("A list of objects in the image to be generated, along with their attributes and relationships to other objects in the image."),
5260
+ background_setting: z
5261
+ .string()
5262
+ .nullable()
5263
+ .optional()
5264
+ .describe("The background setting of the image to be generated."),
5265
+ lighting: FalBriaFiboGen1p5TextToImageLightingSchema.nullable()
5266
+ .optional()
5267
+ .describe("The lighting of the image to be generated."),
5268
+ aesthetics: FalBriaFiboGen1p5TextToImageAestheticsSchema.nullable()
5269
+ .optional()
5270
+ .describe("The aesthetics of the image to be generated."),
5271
+ photographic_characteristics: FalBriaFiboGen1p5TextToImagePhotographicCharacteristicsSchema.nullable()
5272
+ .optional()
5273
+ .describe("The photographic characteristics of the image to be generated."),
5274
+ style_medium: z
5275
+ .string()
5276
+ .nullable()
5277
+ .optional()
5278
+ .describe("The style medium of the image to be generated."),
5279
+ text_render: z
5280
+ .array(z.unknown())
5281
+ .nullable()
5282
+ .default([])
5283
+ .describe("A list of text to be rendered in the image."),
5284
+ context: z
5285
+ .string()
5286
+ .nullable()
5287
+ .optional()
5288
+ .describe("The context of the image to be generated."),
5289
+ artistic_style: z
5290
+ .string()
5291
+ .nullable()
5292
+ .optional()
5293
+ .describe("The artistic style of the image to be generated."),
5294
+ });
5295
+ // Pinned to the live queue OpenAPI read on 2026-10-08
5296
+ // (sha256 d09a549c7740da5690caa8b876dd119bcd8b590d8adb4fb6f0caa896b52d3778). Field order follows x-fal-order-properties.
5297
+ // Docs: https://fal.ai/models/bria/fibo-gen-1.5/text-to-image/api
5298
+ export const FalBriaFiboGen1p5TextToImageRequestSchema = z.object({
5299
+ prompt: z
5300
+ .string()
5301
+ .nullable()
5302
+ .optional()
5303
+ .describe("Prompt for image generation."),
5304
+ structured_prompt: FalBriaFiboGen1p5TextToImageStructuredPromptSchema.nullable()
5305
+ .optional()
5306
+ .describe("The structured prompt to generate an image from."),
5307
+ seed: z
5308
+ .number()
5309
+ .int()
5310
+ .default(5555)
5311
+ .describe("Random seed for reproducibility."),
5312
+ aspect_ratio: z
5313
+ .enum(["1:1", "2:3", "3:2", "3:4", "4:3", "4:5", "5:4", "9:16", "16:9"])
5314
+ .default("1:1")
5315
+ .describe("Aspect ratio. Options: 1:1, 2:3, 3:2, 3:4, 4:3, 4:5, 5:4, 9:16, 16:9"),
5316
+ resolution: z
5317
+ .enum(["1MP", "4MP"])
5318
+ .default("1MP")
5319
+ .describe("Output image resolution"),
5320
+ sync_mode: z
5321
+ .boolean()
5322
+ .default(false)
5323
+ .describe("If true, returns the image directly in the response (increases latency)."),
5324
+ });
5325
+ const FalElevenlabsMusicV2p5MusicAudioReferenceSchema = z
5326
+ .object({
5327
+ audio_url: z
5328
+ .string()
5329
+ .describe("URL of the audio clip to use as the style reference."),
5330
+ start_ms: z
5331
+ .number()
5332
+ .int()
5333
+ .min(0)
5334
+ .default(0)
5335
+ .describe("Offset into the clip where the referenced window starts, in milliseconds."),
5336
+ end_ms: z
5337
+ .number()
5338
+ .int()
5339
+ .gt(0)
5340
+ .nullable()
5341
+ .optional()
5342
+ .describe("Offset into the clip where the referenced window ends, in milliseconds. Defaults to 30000ms after start_ms, or the end of the clip if it is shorter. The window must be at most 30000ms long."),
5343
+ strength: z
5344
+ .enum(["low", "medium", "high", "xhigh"])
5345
+ .nullable()
5346
+ .optional()
5347
+ .describe("How strongly the model follows the reference. Low lets it deviate and be more creative, high keeps it close to the reference."),
5348
+ })
5349
+ .describe("An audio clip whose style conditions a ``music_v2`` / ``music_v2.5`` chunk.\n\nElevenLabs conditions on a *song id*, which only exists after the clip has\nbeen uploaded to them, so the app uploads on the caller's behalf and caches\nthe resulting id (see ``ElevenLabsTTS._resolve_audio_reference``).");
5350
+ const FalElevenlabsMusicV2p5MusicGenerationChunkSchema = z
5351
+ .object({
5352
+ text: z
5353
+ .string()
5354
+ .describe("The text to generate for this chunk. Can start with an optional section name in square brackets, e.g. [Verse 1], followed by lyric lines, plus inline directions in curly braces, e.g. {scratching}. Section names must be between 1 and 100 characters. At most 30 lines are allowed, each at most 200 characters."),
5355
+ duration_ms: z
5356
+ .number()
5357
+ .int()
5358
+ .min(3000)
5359
+ .max(120000)
5360
+ .describe("The duration of the chunk in milliseconds. Must be between 3000ms and 120000ms."),
5361
+ positive_styles: z
5362
+ .array(z.string())
5363
+ .describe("The styles and musical directions that should be present in this chunk. Use English for best results. The styles of the first chunk matter most as they set the overall tone and genre; later chunks can add nuance, progression or change direction."),
5364
+ negative_styles: z
5365
+ .array(z.string())
5366
+ .nullable()
5367
+ .optional()
5368
+ .describe("The styles and musical directions that should not be present in this chunk. Leaving this empty is a good default; only set it to explicitly avoid a particular style or direction."),
5369
+ context_adherence: z
5370
+ .enum(["low", "medium", "high"])
5371
+ .nullable()
5372
+ .optional()
5373
+ .describe("How closely this chunk follows the context of its surrounding chunks. Low adherence lets the model deviate and be more creative, high adherence keeps it consistent with the surrounding context."),
5374
+ audio_reference: FalElevenlabsMusicV2p5MusicAudioReferenceSchema.nullable()
5375
+ .optional()
5376
+ .describe("An audio clip whose style conditions this chunk. The reference on the first chunk matters most: it influences every later chunk, so condition from the first chunk to style the whole song."),
5377
+ })
5378
+ .describe("One generation chunk of a ``music_v2`` / ``music_v2.5`` composition plan.\n\nThe v2 models replaced v1's ``sections`` (``MusicPrompt``) with ``chunks``\n(``CompositionPlan``); the two shapes are not interchangeable -- sending a\nv1 section plan to a v2 model (or vice versa) is rejected by ElevenLabs.");
5379
+ const FalElevenlabsMusicV2p5MusicV2CompositionPlanSchema = z.object({
5380
+ chunks: z
5381
+ .array(FalElevenlabsMusicV2p5MusicGenerationChunkSchema)
5382
+ .min(1)
5383
+ .max(30)
5384
+ .describe("The chunks that make up the generation, in order. At most 30 chunks, totalling between 3000ms and 600000ms."),
5385
+ });
5386
+ // Pinned to the live queue OpenAPI read on 2026-10-08
5387
+ // (sha256 ba750092e132d055203a8475ce3aaddeee1683cc9ec0153368a476a9319a7ee3). Field order follows x-fal-order-properties.
5388
+ // Docs: https://fal.ai/models/elevenlabs/music/v2.5/api
5389
+ export const FalElevenlabsMusicV2p5RequestSchema = z.object({
5390
+ prompt: z
5391
+ .string()
5392
+ .max(4100)
5393
+ .nullable()
5394
+ .optional()
5395
+ .describe("The text prompt describing the music to generate"),
5396
+ composition_plan: FalElevenlabsMusicV2p5MusicV2CompositionPlanSchema.nullable()
5397
+ .optional()
5398
+ .describe("The chunk-based composition plan for the music"),
5399
+ music_length_ms: z
5400
+ .number()
5401
+ .int()
5402
+ .min(3000)
5403
+ .max(600000)
5404
+ .nullable()
5405
+ .optional()
5406
+ .describe("The length of the song to generate in milliseconds. Used only in conjunction with prompt. Must be between 3000ms and 600000ms. Optional - if not provided, the model will choose a length based on the prompt."),
5407
+ force_instrumental: z
5408
+ .boolean()
5409
+ .default(false)
5410
+ .describe("If true, guarantees that the generated song will be instrumental. If false, the song may or may not be instrumental depending on the prompt. Can only be used with prompt."),
5411
+ seed: z
5412
+ .number()
5413
+ .int()
5414
+ .nullable()
5415
+ .optional()
5416
+ .describe("Random seed to initialize the music generation process. Can only be used with composition_plan. The same seed with the same parameters gives more consistent results, but exact reproducibility is not guaranteed."),
5417
+ output_format: z
5418
+ .enum([
5419
+ "mp3_22050_32",
5420
+ "mp3_24000_48",
5421
+ "mp3_44100_32",
5422
+ "mp3_44100_64",
5423
+ "mp3_44100_96",
5424
+ "mp3_44100_128",
5425
+ "mp3_44100_192",
5426
+ "mp3_48000_128",
5427
+ "mp3_48000_192",
5428
+ "mp3_48000_240",
5429
+ "mp3_48000_320",
5430
+ "pcm_8000",
5431
+ "pcm_16000",
5432
+ "pcm_22050",
5433
+ "pcm_24000",
5434
+ "pcm_32000",
5435
+ "pcm_44100",
5436
+ "pcm_48000",
5437
+ "ulaw_8000",
5438
+ "alaw_8000",
5439
+ "opus_48000_32",
5440
+ "opus_48000_64",
5441
+ "opus_48000_96",
5442
+ "opus_48000_128",
5443
+ "opus_48000_192",
5444
+ ])
5445
+ .default("mp3_48000_192")
5446
+ .describe("Output format of the generated audio. Formatted as codec_sample_rate_bitrate. So an mp3 with 22.05kHz sample rate at 32kbs is represented as mp3_22050_32. Note that the μ-law format (sometimes written mu-law, often approximated as u-law) is commonly used for Twilio audio inputs."),
5447
+ });
5448
+ // Pinned to the live queue OpenAPI read on 2026-10-08
5449
+ // (sha256 88ebef33a2cb749a93a9d9e6fe885de49e69ef1f06f011e74da5133db82c8aa1). Field order follows x-fal-order-properties.
5450
+ // Docs: https://fal.ai/models/meta/muse-image/text-to-image/api
5451
+ export const FalMetaMuseImageTextToImageRequestSchema = z.object({
5452
+ prompt: z
5453
+ .string()
5454
+ .min(1)
5455
+ .describe("The text prompt used to generate or edit the image."),
5456
+ aspect_ratio: z
5457
+ .string()
5458
+ .regex(/^[1-9][0-9]{0,4}:[1-9][0-9]{0,4}$/)
5459
+ .nullable()
5460
+ .optional()
5461
+ .describe('Any custom output aspect ratio as "width:height", for example "16:9", "5:4", or "1920:1200". Common presets are "21:9", "16:9", "4:3", "3:2", "1:1", "2:3", "3:4", "9:16", "9:21". The ratio must be between 1:16 and 16:1, the range Muse supports. Only the ratio is used: Muse renders it at its own fixed resolution of roughly 2.5 megapixels, so "1920:1200" and "960:600" both return the same 1920x1200 image. If omitted, Muse chooses the output dimensions automatically.'),
5462
+ num_images: z
5463
+ .number()
5464
+ .int()
5465
+ .min(1)
5466
+ .max(10)
5467
+ .default(1)
5468
+ .describe("The number of images to generate."),
5469
+ output_format: z
5470
+ .enum(["jpeg", "png", "webp"])
5471
+ .default("webp")
5472
+ .describe("The format of the generated image."),
5473
+ sync_mode: z
5474
+ .boolean()
5475
+ .default(false)
5476
+ .describe("If `True`, the image is returned as a data URI and is not persisted in the request history."),
5477
+ });
5478
+ // Pinned to the live queue OpenAPI read on 2026-10-08
5479
+ // (sha256 17c4f7963251d25af485098d771d5a8c9f3f6942db30fd42d05dfeddb3412422). Field order follows x-fal-order-properties.
5480
+ // Docs: https://fal.ai/models/meta/muse-image/edit/api
5481
+ export const FalMetaMuseImageEditRequestSchema = z.object({
5482
+ prompt: z
5483
+ .string()
5484
+ .min(1)
5485
+ .describe("The text prompt used to generate or edit the image."),
5486
+ image_urls: z
5487
+ .array(z.string())
5488
+ .min(1)
5489
+ .max(10)
5490
+ .describe("Reference images used for the edit. Provide between 1 and 10 HTTP(S) or data URLs."),
5491
+ aspect_ratio: z
5492
+ .string()
5493
+ .regex(/^[1-9][0-9]{0,4}:[1-9][0-9]{0,4}$/)
5494
+ .nullable()
5495
+ .optional()
5496
+ .describe('Any custom output aspect ratio as "width:height", for example "16:9", "5:4", or "1920:1200". Common presets are "21:9", "16:9", "4:3", "3:2", "1:1", "2:3", "3:4", "9:16", "9:21". The ratio must be between 1:16 and 16:1, the range Muse supports. Only the ratio is used: Muse renders it at its own fixed resolution of roughly 2.5 megapixels, so "1920:1200" and "960:600" both return the same 1920x1200 image. If omitted, Muse chooses the output dimensions automatically.'),
5497
+ num_images: z
5498
+ .number()
5499
+ .int()
5500
+ .min(1)
5501
+ .max(10)
5502
+ .default(1)
5503
+ .describe("The number of edited images to generate."),
5504
+ output_format: z
5505
+ .enum(["jpeg", "png", "webp"])
5506
+ .default("webp")
5507
+ .describe("The format of the generated image."),
5508
+ sync_mode: z
5509
+ .boolean()
5510
+ .default(false)
5511
+ .describe("If `True`, the image is returned as a data URI and is not persisted in the request history."),
5512
+ });
5513
+ const FalOpenaiGptImage2p5SunburstEditImageSizeSchema = z.object({
5514
+ width: z
5515
+ .number()
5516
+ .int()
5517
+ .gt(0)
5518
+ .max(14142)
5519
+ .default(512)
5520
+ .describe("The width of the generated image."),
5521
+ height: z
5522
+ .number()
5523
+ .int()
5524
+ .gt(0)
5525
+ .max(14142)
5526
+ .default(512)
5527
+ .describe("The height of the generated image."),
5528
+ });
5529
+ // Pinned to the live queue OpenAPI read on 2026-10-08
5530
+ // (sha256 987694eed0568f0c3eec54e80fce719467bafcb34a4fb5c414ba41d13bfe923b). Field order follows x-fal-order-properties.
5531
+ // Docs: https://fal.ai/models/openai/gpt-image-2.5/sunburst/edit/api
5532
+ export const FalOpenaiGptImage2p5SunburstEditRequestSchema = z.object({
5533
+ prompt: z
5534
+ .string()
5535
+ .min(1)
5536
+ .max(32000)
5537
+ .describe("The prompt for image generation"),
5538
+ image_urls: z
5539
+ .array(z.string())
5540
+ .max(16)
5541
+ .describe("The URLs of the images to use as a reference for the generation. A maximum of 16 images are allowed."),
5542
+ mask_url: z
5543
+ .string()
5544
+ .nullable()
5545
+ .optional()
5546
+ .describe("The URL of the mask image to use for the generation. This indicates what part of the image to edit."),
5547
+ image_size: z
5548
+ .union([
5549
+ FalOpenaiGptImage2p5SunburstEditImageSizeSchema,
5550
+ z.enum([
5551
+ "square_hd",
5552
+ "square",
5553
+ "portrait_4_3",
5554
+ "portrait_16_9",
5555
+ "landscape_4_3",
5556
+ "landscape_16_9",
5557
+ "auto",
5558
+ ]),
5559
+ ])
5560
+ .default("auto")
5561
+ .describe("The size of the generated image. Use 'auto' to infer from input images."),
5562
+ background: z
5563
+ .enum(["auto", "transparent", "opaque"])
5564
+ .default("auto")
5565
+ .describe("Background for the generated image"),
5566
+ quality: z
5567
+ .enum(["auto", "low", "medium", "high", "xhigh", "max"])
5568
+ .default("high")
5569
+ .describe("Quality for the generated image. Higher settings increase detail, latency, and token usage. Use 'auto' to let the model choose."),
5570
+ num_images: z
5571
+ .number()
5572
+ .int()
5573
+ .min(1)
5574
+ .max(10)
5575
+ .default(1)
5576
+ .describe("Number of images to generate"),
5577
+ output_format: z
5578
+ .enum(["jpeg", "png", "webp"])
5579
+ .default("png")
5580
+ .describe("Output format for the images"),
5581
+ output_compression: z
5582
+ .number()
5583
+ .int()
5584
+ .min(0)
5585
+ .max(100)
5586
+ .nullable()
5587
+ .optional()
5588
+ .describe("Compression level from 0 to 100. Only supported when output_format is 'jpeg' or 'webp'."),
5589
+ sync_mode: z
5590
+ .boolean()
5591
+ .default(false)
5592
+ .describe("If `True`, the media will be returned as a data URI and the output data won't be available in the request history."),
5593
+ });
5594
+ const FalOpenaiGptImage2p5SunburstTextToImageImageSizeSchema = z.object({
5595
+ width: z
5596
+ .number()
5597
+ .int()
5598
+ .gt(0)
5599
+ .max(14142)
5600
+ .default(512)
5601
+ .describe("The width of the generated image."),
5602
+ height: z
5603
+ .number()
5604
+ .int()
5605
+ .gt(0)
5606
+ .max(14142)
5607
+ .default(512)
5608
+ .describe("The height of the generated image."),
5609
+ });
5610
+ // Pinned to the live queue OpenAPI read on 2026-10-08
5611
+ // (sha256 5721d6ddae78788031890764b6f1fc75136c39ab7b6c906c277e3e7d6e5d40cc). Field order follows x-fal-order-properties.
5612
+ // Docs: https://fal.ai/models/openai/gpt-image-2.5/sunburst/text-to-image/api
5613
+ export const FalOpenaiGptImage2p5SunburstTextToImageRequestSchema = z.object({
5614
+ prompt: z
5615
+ .string()
5616
+ .min(1)
5617
+ .max(32000)
5618
+ .describe("The prompt for image generation"),
5619
+ image_size: z
5620
+ .union([
5621
+ FalOpenaiGptImage2p5SunburstTextToImageImageSizeSchema,
5622
+ z.enum([
5623
+ "square_hd",
5624
+ "square",
5625
+ "portrait_4_3",
5626
+ "portrait_16_9",
5627
+ "landscape_4_3",
5628
+ "landscape_16_9",
5629
+ "auto",
5630
+ ]),
5631
+ ])
5632
+ .default("landscape_4_3")
5633
+ .describe("The size of the generated image. Supports preset names, explicit {width, height}, or 'auto' to let the model pick the best size. Concrete sizes must have both dimensions as multiples of 16, max edge 3840px, aspect ratio <= 3:1, total pixels between 655,360 and 8,294,400."),
5634
+ background: z
5635
+ .enum(["auto", "transparent", "opaque"])
5636
+ .default("auto")
5637
+ .describe("Background for the generated image"),
5638
+ quality: z
5639
+ .enum(["auto", "low", "medium", "high", "xhigh", "max"])
5640
+ .default("high")
5641
+ .describe("Quality for the generated image. Higher settings increase detail, latency, and token usage. Use 'auto' to let the model choose."),
5642
+ num_images: z
5643
+ .number()
5644
+ .int()
5645
+ .min(1)
5646
+ .max(10)
5647
+ .default(1)
5648
+ .describe("Number of images to generate"),
5649
+ output_format: z
5650
+ .enum(["jpeg", "png", "webp"])
5651
+ .default("png")
5652
+ .describe("Output format for the images"),
5653
+ output_compression: z
5654
+ .number()
5655
+ .int()
5656
+ .min(0)
5657
+ .max(100)
5658
+ .nullable()
5659
+ .optional()
5660
+ .describe("Compression level from 0 to 100. Only supported when output_format is 'jpeg' or 'webp'."),
5661
+ sync_mode: z
5662
+ .boolean()
5663
+ .default(false)
5664
+ .describe("If `True`, the media will be returned as a data URI and the output data won't be available in the request history."),
5665
+ });
5666
+ const FalOpenaiGptImage2p5FlareEditImageSizeSchema = z.object({
5667
+ width: z
5668
+ .number()
5669
+ .int()
5670
+ .gt(0)
5671
+ .max(14142)
5672
+ .default(512)
5673
+ .describe("The width of the generated image."),
5674
+ height: z
5675
+ .number()
5676
+ .int()
5677
+ .gt(0)
5678
+ .max(14142)
5679
+ .default(512)
5680
+ .describe("The height of the generated image."),
5681
+ });
5682
+ // Pinned to the live queue OpenAPI read on 2026-10-08
5683
+ // (sha256 334fdc31c66f89efbc208261b35d4e7b4dd085ad7f8940e18b22160fd19d8efe). Field order follows x-fal-order-properties.
5684
+ // Docs: https://fal.ai/models/openai/gpt-image-2.5/flare/edit/api
5685
+ export const FalOpenaiGptImage2p5FlareEditRequestSchema = z.object({
5686
+ prompt: z
5687
+ .string()
5688
+ .min(1)
5689
+ .max(32000)
5690
+ .describe("The prompt for image generation"),
5691
+ image_urls: z
5692
+ .array(z.string())
5693
+ .max(16)
5694
+ .describe("The URLs of the images to use as a reference for the generation. A maximum of 16 images are allowed."),
5695
+ mask_url: z
5696
+ .string()
5697
+ .nullable()
5698
+ .optional()
5699
+ .describe("The URL of the mask image to use for the generation. This indicates what part of the image to edit."),
5700
+ image_size: z
5701
+ .union([
5702
+ FalOpenaiGptImage2p5FlareEditImageSizeSchema,
5703
+ z.enum([
5704
+ "square_hd",
5705
+ "square",
5706
+ "portrait_4_3",
5707
+ "portrait_16_9",
5708
+ "landscape_4_3",
5709
+ "landscape_16_9",
5710
+ "auto",
5711
+ ]),
5712
+ ])
5713
+ .default("auto")
5714
+ .describe("The size of the generated image. Use 'auto' to infer from input images."),
5715
+ background: z
5716
+ .enum(["auto", "transparent", "opaque"])
5717
+ .default("auto")
5718
+ .describe("Background for the generated image"),
5719
+ quality: z
5720
+ .enum(["auto", "low", "medium", "high", "xhigh", "max"])
5721
+ .default("high")
5722
+ .describe("Quality for the generated image. Higher settings increase detail, latency, and token usage. Use 'auto' to let the model choose."),
5723
+ num_images: z
5724
+ .number()
5725
+ .int()
5726
+ .min(1)
5727
+ .max(10)
5728
+ .default(1)
5729
+ .describe("Number of images to generate"),
5730
+ output_format: z
5731
+ .enum(["jpeg", "png", "webp"])
5732
+ .default("png")
5733
+ .describe("Output format for the images"),
5734
+ output_compression: z
5735
+ .number()
5736
+ .int()
5737
+ .min(0)
5738
+ .max(100)
5739
+ .nullable()
5740
+ .optional()
5741
+ .describe("Compression level from 0 to 100. Only supported when output_format is 'jpeg' or 'webp'."),
5742
+ sync_mode: z
5743
+ .boolean()
5744
+ .default(false)
5745
+ .describe("If `True`, the media will be returned as a data URI and the output data won't be available in the request history."),
5746
+ });
5747
+ const FalOpenaiGptImage2p5FlareTextToImageImageSizeSchema = z.object({
5748
+ width: z
5749
+ .number()
5750
+ .int()
5751
+ .gt(0)
5752
+ .max(14142)
5753
+ .default(512)
5754
+ .describe("The width of the generated image."),
5755
+ height: z
5756
+ .number()
5757
+ .int()
5758
+ .gt(0)
5759
+ .max(14142)
5760
+ .default(512)
5761
+ .describe("The height of the generated image."),
5762
+ });
5763
+ // Pinned to the live queue OpenAPI read on 2026-10-08
5764
+ // (sha256 15adb86fc7e37de581565f74ff324161a7218000ae2753bddd034dac4242a293). Field order follows x-fal-order-properties.
5765
+ // Docs: https://fal.ai/models/openai/gpt-image-2.5/flare/text-to-image/api
5766
+ export const FalOpenaiGptImage2p5FlareTextToImageRequestSchema = z.object({
5767
+ prompt: z
5768
+ .string()
5769
+ .min(1)
5770
+ .max(32000)
5771
+ .describe("The prompt for image generation"),
5772
+ image_size: z
5773
+ .union([
5774
+ FalOpenaiGptImage2p5FlareTextToImageImageSizeSchema,
5775
+ z.enum([
5776
+ "square_hd",
5777
+ "square",
5778
+ "portrait_4_3",
5779
+ "portrait_16_9",
5780
+ "landscape_4_3",
5781
+ "landscape_16_9",
5782
+ "auto",
5783
+ ]),
5784
+ ])
5785
+ .default("landscape_4_3")
5786
+ .describe("The size of the generated image. Supports preset names, explicit {width, height}, or 'auto' to let the model pick the best size. Concrete sizes must have both dimensions as multiples of 16, max edge 3840px, aspect ratio <= 3:1, total pixels between 655,360 and 8,294,400."),
5787
+ background: z
5788
+ .enum(["auto", "transparent", "opaque"])
5789
+ .default("auto")
5790
+ .describe("Background for the generated image"),
5791
+ quality: z
5792
+ .enum(["auto", "low", "medium", "high", "xhigh", "max"])
5793
+ .default("high")
5794
+ .describe("Quality for the generated image. Higher settings increase detail, latency, and token usage. Use 'auto' to let the model choose."),
5795
+ num_images: z
5796
+ .number()
5797
+ .int()
5798
+ .min(1)
5799
+ .max(10)
5800
+ .default(1)
5801
+ .describe("Number of images to generate"),
5802
+ output_format: z
5803
+ .enum(["jpeg", "png", "webp"])
5804
+ .default("png")
5805
+ .describe("Output format for the images"),
5806
+ output_compression: z
5807
+ .number()
5808
+ .int()
5809
+ .min(0)
5810
+ .max(100)
5811
+ .nullable()
5812
+ .optional()
5813
+ .describe("Compression level from 0 to 100. Only supported when output_format is 'jpeg' or 'webp'."),
5814
+ sync_mode: z
5815
+ .boolean()
5816
+ .default(false)
5817
+ .describe("If `True`, the media will be returned as a data URI and the output data won't be available in the request history."),
5818
+ });
5819
+ // Pinned to the live queue OpenAPI read on 2026-10-08
5820
+ // (sha256 1b18a611c1f4a0a7f2430aaa0cdb8ff3063021366f02e513c4f55aafe0920089). Field order follows x-fal-order-properties.
5821
+ // Docs: https://fal.ai/models/microsoft/mai-image-2.5-pro/api
5822
+ export const FalMicrosoftMaiImage2p5ProRequestSchema = z.object({
5823
+ prompt: z
5824
+ .string()
5825
+ .min(3)
5826
+ .max(5000)
5827
+ .describe("The text prompt to generate an image from."),
5828
+ num_images: z
5829
+ .number()
5830
+ .int()
5831
+ .min(1)
5832
+ .max(4)
5833
+ .default(1)
5834
+ .describe("The number of images to generate."),
5835
+ aspect_ratio: z
5836
+ .enum(["auto", "1:1", "4:3", "3:4", "16:9", "9:16", "3:2", "2:3"])
5837
+ .default("auto")
5838
+ .describe('The aspect ratio of the generated image. Use "auto" to let the model decide based on the prompt.'),
5839
+ output_format: z
5840
+ .enum(["jpeg", "png", "webp"])
5841
+ .default("png")
5842
+ .describe("The format of the generated image."),
5843
+ sync_mode: z
5844
+ .boolean()
5845
+ .default(false)
5846
+ .describe("If `True`, the media will be returned as a data URI and the output data won't be available in the request history."),
5847
+ });
5848
+ // Pinned to the live queue OpenAPI read on 2026-10-08
5849
+ // (sha256 39588aa3f4029718ccbd21956ceac6aad20cb2fafcc70280100476c18fea407f). Field order follows x-fal-order-properties.
5850
+ // Docs: https://fal.ai/models/microsoft/mai-image-2.5-pro/edit/api
5851
+ export const FalMicrosoftMaiImage2p5ProEditRequestSchema = z.object({
5852
+ prompt: z
5853
+ .string()
5854
+ .min(3)
5855
+ .max(5000)
5856
+ .describe("The instruction describing how to edit the input image(s)."),
5857
+ num_images: z
5858
+ .number()
5859
+ .int()
5860
+ .min(1)
5861
+ .max(4)
5862
+ .default(1)
5863
+ .describe("The number of images to generate."),
5864
+ aspect_ratio: z
5865
+ .enum(["auto", "1:1", "4:3", "3:4", "16:9", "9:16", "3:2", "2:3"])
5866
+ .default("auto")
5867
+ .describe('The aspect ratio of the generated image. Use "auto" to match the input or let the model decide.'),
5868
+ output_format: z
5869
+ .enum(["jpeg", "png", "webp"])
5870
+ .default("png")
5871
+ .describe("The format of the generated image."),
5872
+ sync_mode: z
5873
+ .boolean()
5874
+ .default(false)
5875
+ .describe("If `True`, the media will be returned as a data URI and the output data won't be available in the request history."),
5876
+ image_url: z
5877
+ .string()
5878
+ .default("")
5879
+ .describe("The URL of the image to edit. Provide one http(s) or data: URL."),
5880
+ });
5881
+ const FalNvidiaCosmos3SuperImageToVideoImageSizeSchema = z.object({
5882
+ width: z
5883
+ .number()
5884
+ .int()
5885
+ .gt(0)
5886
+ .max(14142)
5887
+ .default(512)
5888
+ .describe("The width of the generated image."),
5889
+ height: z
5890
+ .number()
5891
+ .int()
5892
+ .gt(0)
5893
+ .max(14142)
5894
+ .default(512)
5895
+ .describe("The height of the generated image."),
5896
+ });
5897
+ // Pinned to the live queue OpenAPI read on 2026-10-08
5898
+ // (sha256 4924d039363d46ea7c2caed4304f68383c957f05514cc14711d833dccb8ef079). Field order follows x-fal-order-properties.
5899
+ // Docs: https://fal.ai/models/nvidia/cosmos-3-super/image-to-video/api
5900
+ export const FalNvidiaCosmos3SuperImageToVideoRequestSchema = z.object({
5901
+ prompt: z
5902
+ .string()
5903
+ .min(1)
5904
+ .max(4096)
5905
+ .describe("Text prompt describing the motion and scene of the video to generate."),
5906
+ image_url: z
5907
+ .string()
5908
+ .describe("URL of the conditioning first-frame image for the video."),
5909
+ negative_prompt: z
5910
+ .string()
5911
+ .max(2048)
5912
+ .default("The video captures a series of frames showing macroblocking artifacts, chromatic aberration, high-frequency noise, and rolling shutter distortion. It includes static with no motion, motion blur, over-saturation, shaky footage, low resolution, grainy texture, pixelated images, poorly lit areas, underexposed and overexposed scenes, poor color balance, washed out colors, choppy sequences, jerky movements, low frame rate, bit-depth compression artifacts, color banding, unnatural transitions, outdated special effects, fake elements, unconvincing visuals, poorly edited content, jump cuts, hard cut, visual noise, and flickering. It features moiré patterns, edge halos, and temporal aliasing. Furthermore, the content defies common sense, generating illogical scenarios, nonsensical entities, absurd character behaviors, and conceptual paradoxes that violate basic human reasoning and everyday reality. The video looks like a surreal or glitchy hallucination. Overall, the video is of poor quality.")
5913
+ .describe("Content to steer the generation away from (artifacts, unwanted motion). Defaults to NVIDIA's recommended i2v negative prompt; pass an empty string to disable."),
5914
+ enable_prompt_expansion: z
5915
+ .boolean()
5916
+ .default(true)
5917
+ .describe("If true, the Cosmos3-Nano Reasoner (a VLM that sees the first frame) rewrites the prompt into the dense caption Cosmos3 was trained on. The app starts a local Reasoner by default, or uses COSMOS_PROMPT_UPSAMPLER_BASE_URL when configured. Falls back to the raw prompt if expansion fails."),
5918
+ enable_agentic_generation: z
5919
+ .boolean()
5920
+ .default(false)
5921
+ .describe("Enable the iterative Cosmos agentic loop: prompt upsampling, candidate video generation, VLM critique of sampled frames, and prompt rewrite. Each candidate is a full render, so this is substantially slower and costlier than a single generation."),
5922
+ agentic_max_iterations: z
5923
+ .number()
5924
+ .int()
5925
+ .min(1)
5926
+ .max(3)
5927
+ .default(2)
5928
+ .describe("Maximum agentic prompt stages when agentic generation is enabled."),
5929
+ agentic_samples_per_iteration: z
5930
+ .number()
5931
+ .int()
5932
+ .min(1)
5933
+ .max(3)
5934
+ .default(2)
5935
+ .describe("Candidate videos to generate and judge per agentic iteration. The best candidate advances to the next rewrite stage."),
5936
+ agentic_early_stop: z
5937
+ .boolean()
5938
+ .default(true)
5939
+ .describe("Stop the agentic loop early when the critic score clears the strict quality threshold."),
5940
+ image_size: z
5941
+ .union([
5942
+ FalNvidiaCosmos3SuperImageToVideoImageSizeSchema,
5943
+ z.enum([
5944
+ "square_hd",
5945
+ "square",
5946
+ "portrait_4_3",
5947
+ "portrait_16_9",
5948
+ "landscape_4_3",
5949
+ "landscape_16_9",
5950
+ ]),
5951
+ ])
5952
+ .default({ height: 480, width: 832 })
5953
+ .describe("The size of the generated video. The request is clamped and snapped to the nearest supported NVIDIA tier (256p/480p/720p) and aspect ratio."),
5954
+ num_frames: z
5955
+ .number()
5956
+ .int()
5957
+ .min(5)
5958
+ .max(189)
5959
+ .default(189)
5960
+ .describe("Number of frames to generate. More frames yield a longer video."),
5961
+ frames_per_second: z
5962
+ .number()
5963
+ .int()
5964
+ .min(4)
5965
+ .max(60)
5966
+ .default(24)
5967
+ .describe("Frames per second of the output video."),
5968
+ num_inference_steps: z
5969
+ .number()
5970
+ .int()
5971
+ .min(1)
5972
+ .max(50)
5973
+ .default(28)
5974
+ .describe("Number of denoising steps. More steps yield higher quality but take longer."),
5975
+ guidance_scale: z
5976
+ .number()
5977
+ .min(0)
5978
+ .max(20)
5979
+ .default(6)
5980
+ .describe("Classifier-free guidance scale. Higher values increase prompt adherence at the cost of diversity."),
5981
+ seed: z
5982
+ .number()
5983
+ .int()
5984
+ .nullable()
5985
+ .optional()
5986
+ .describe("The same seed and prompt given to the same model version will produce the same video every time."),
5987
+ enable_safety_checker: z
5988
+ .boolean()
5989
+ .default(true)
5990
+ .describe("Enable content moderation for the input prompt and image. Disabling it requires account authorization; unauthorized requests are always checked."),
5991
+ sync_mode: z
5992
+ .boolean()
5993
+ .default(false)
5994
+ .describe("If `True`, the video is returned as a data URI and the output data won't be available in the request history."),
5995
+ });
5996
+ const FalNvidiaCosmos3SuperTextToImageImageSizeSchema = z.object({
5997
+ width: z
5998
+ .number()
5999
+ .int()
6000
+ .gt(0)
6001
+ .max(14142)
6002
+ .default(512)
6003
+ .describe("The width of the generated image."),
6004
+ height: z
6005
+ .number()
6006
+ .int()
6007
+ .gt(0)
6008
+ .max(14142)
6009
+ .default(512)
6010
+ .describe("The height of the generated image."),
6011
+ });
6012
+ // Pinned to the live queue OpenAPI read on 2026-10-08
6013
+ // (sha256 955b94ac6f9420a59b7c7fd9adfc3858137c4222458e3aa3349535984851bace). Field order follows x-fal-order-properties.
6014
+ // Docs: https://fal.ai/models/nvidia/cosmos-3-super/text-to-image/api
6015
+ export const FalNvidiaCosmos3SuperTextToImageRequestSchema = z.object({
6016
+ prompt: z
6017
+ .string()
6018
+ .min(1)
6019
+ .max(4096)
6020
+ .describe("Text prompt describing the image to generate."),
6021
+ negative_prompt: z
6022
+ .string()
6023
+ .max(1024)
6024
+ .default("")
6025
+ .describe("Content to steer the generation away from (colors, objects, artifacts)."),
6026
+ enable_prompt_expansion: z
6027
+ .boolean()
6028
+ .default(false)
6029
+ .describe("Expand the prompt with OpenRouter before image generation. When enabled, the prompt is rewritten into the dense structured-JSON format Cosmos3 was trained on; generation falls back to the raw prompt if expansion fails."),
6030
+ enable_agentic_generation: z
6031
+ .boolean()
6032
+ .default(false)
6033
+ .describe("Automatically generate and compare multiple candidate images, then refine the prompt between rounds to better match the original request. This can improve prompt adherence but increases latency and billable image generations."),
6034
+ agentic_max_iterations: z
6035
+ .number()
6036
+ .int()
6037
+ .min(1)
6038
+ .max(3)
6039
+ .default(2)
6040
+ .describe("Maximum number of refinement rounds when agentic generation is enabled."),
6041
+ agentic_samples_per_iteration: z
6042
+ .number()
6043
+ .int()
6044
+ .min(1)
6045
+ .max(3)
6046
+ .default(2)
6047
+ .describe("Candidate images to generate and judge per agentic iteration. The best candidate advances to the next rewrite stage."),
6048
+ agentic_early_stop: z
6049
+ .boolean()
6050
+ .default(true)
6051
+ .describe("Stop early when a candidate image is already a strong match for the prompt."),
6052
+ image_size: z
6053
+ .union([
6054
+ FalNvidiaCosmos3SuperTextToImageImageSizeSchema,
6055
+ z.enum([
6056
+ "square_hd",
6057
+ "square",
6058
+ "portrait_4_3",
6059
+ "portrait_16_9",
6060
+ "landscape_4_3",
6061
+ "landscape_16_9",
6062
+ ]),
6063
+ ])
6064
+ .default("square_hd")
6065
+ .describe("The size of the generated image. Each edge is clamped to 512-1280px (multiples of 16)."),
6066
+ num_inference_steps: z
6067
+ .number()
6068
+ .int()
6069
+ .min(1)
6070
+ .max(50)
6071
+ .default(28)
6072
+ .describe("Number of denoising steps. More steps yield higher quality but take longer."),
6073
+ guidance_scale: z
6074
+ .number()
6075
+ .min(0)
6076
+ .max(20)
6077
+ .default(4)
6078
+ .describe("Classifier-free guidance scale. Higher values increase prompt adherence at the cost of diversity."),
6079
+ num_images: z
6080
+ .number()
6081
+ .int()
6082
+ .min(1)
6083
+ .max(4)
6084
+ .default(1)
6085
+ .describe("The number of images to generate."),
6086
+ seed: z
6087
+ .number()
6088
+ .int()
6089
+ .nullable()
6090
+ .optional()
6091
+ .describe("The same seed and prompt given to the same model version will produce the same image every time."),
6092
+ enable_safety_checker: z
6093
+ .boolean()
6094
+ .default(true)
6095
+ .describe("Enable content moderation for the input prompt and generated images. Disabling it requires account authorization; unauthorized requests are always checked, and images flagged as unsafe are returned as black images."),
6096
+ sync_mode: z
6097
+ .boolean()
6098
+ .default(false)
6099
+ .describe("If `True`, the image is returned as a data URI and the output data won't be available in the request history."),
6100
+ output_format: z
6101
+ .enum(["jpeg", "png"])
6102
+ .default("jpeg")
6103
+ .describe("The format of the generated image."),
6104
+ });
6105
+ const FalLumaAgentRayV3p2ReframeRayReframeSourcePositionSchema = z.object({
6106
+ x_norm: z
6107
+ .number()
6108
+ .min(-2)
6109
+ .max(2)
6110
+ .describe("Left edge of the source rectangle as a fraction of output width."),
6111
+ y_norm: z
6112
+ .number()
6113
+ .min(-2)
6114
+ .max(2)
6115
+ .describe("Top edge of the source rectangle as a fraction of output height."),
6116
+ w_norm: z
6117
+ .number()
6118
+ .gt(0)
6119
+ .max(2)
6120
+ .describe("Width of the source rectangle as a fraction of output width."),
6121
+ h_norm: z
6122
+ .number()
6123
+ .gt(0)
6124
+ .max(2)
6125
+ .describe("Height of the source rectangle as a fraction of output height."),
6126
+ });
6127
+ // Pinned to the live queue OpenAPI read on 2026-10-08
6128
+ // (sha256 6b7fbb43e98d0206bcaffe7046e871a54a8b5e37b63a1264fe03e34b902bb335). Field order follows x-fal-order-properties.
6129
+ // Docs: https://fal.ai/models/luma/agent/ray/v3.2/reframe/api
6130
+ export const FalLumaAgentRayV3p2ReframeRequestSchema = z.object({
6131
+ prompt: z
6132
+ .string()
6133
+ .min(1)
6134
+ .max(6000)
6135
+ .describe("Text prompt describing the content to paint into the newly exposed canvas area when reframing to the target aspect ratio."),
6136
+ video_url: z
6137
+ .string()
6138
+ .min(1)
6139
+ .describe("URL of the source video to reframe (must be 10 seconds or less)."),
6140
+ aspect_ratio: z
6141
+ .enum(["3:4", "4:3", "1:1", "9:16", "16:9", "21:9"])
6142
+ .describe("Target aspect ratio for the reframed video."),
6143
+ resolution: z
6144
+ .enum(["540p", "720p", "1080p"])
6145
+ .default("540p")
6146
+ .describe("Resolution of the reframed video. Higher resolutions cost more."),
6147
+ duration: z
6148
+ .enum(["5s", "10s"])
6149
+ .nullable()
6150
+ .optional()
6151
+ .describe("Duration of the reframed video. Defaults to matching the source video's duration; set explicitly to 5s or 10s to override."),
6152
+ source_position: FalLumaAgentRayV3p2ReframeRayReframeSourcePositionSchema.nullable()
6153
+ .optional()
6154
+ .describe("Optional normalized source rectangle controlling where the source video sits in the output canvas."),
6155
+ });
6156
+ const FalLumaAgentRayV3p2VideoToVideoRayEditPoseControlSchema = z.object({
6157
+ enabled: z
6158
+ .boolean()
6159
+ .default(true)
6160
+ .describe("Enable pose / skeleton conditioning for the edit."),
6161
+ strength: z
6162
+ .enum(["precise", "coarse"])
6163
+ .nullable()
6164
+ .optional()
6165
+ .describe("Pose conditioning precision. 'precise' follows the source pose tightly; 'coarse' allows more freedom. Leave unset for the default."),
6166
+ });
6167
+ const FalLumaAgentRayV3p2VideoToVideoRayEditDepthControlSchema = z.object({
6168
+ enabled: z
6169
+ .boolean()
6170
+ .default(true)
6171
+ .describe("Enable depth / scene-geometry conditioning for the edit."),
6172
+ blur: z
6173
+ .number()
6174
+ .min(0)
6175
+ .max(1)
6176
+ .nullable()
6177
+ .optional()
6178
+ .describe("Depth blur. Higher values allow more geometric freedom. Leave unset for the default."),
6179
+ });
6180
+ const FalLumaAgentRayV3p2VideoToVideoRayEditNormalsControlSchema = z.object({
6181
+ enabled: z
6182
+ .boolean()
6183
+ .default(true)
6184
+ .describe("Enable surface-normals conditioning for the edit."),
6185
+ augmentation: z
6186
+ .number()
6187
+ .min(0)
6188
+ .max(1)
6189
+ .nullable()
6190
+ .optional()
6191
+ .describe("Surface-normals augmentation. Higher values allow more reinterpretation of surface geometry. Leave unset for the default."),
6192
+ });
6193
+ const FalLumaAgentRayV3p2VideoToVideoRayEditTrajectoryControlSchema = z.object({
6194
+ enabled: z
6195
+ .boolean()
6196
+ .default(true)
6197
+ .describe("Enable motion-trajectory conditioning for the edit."),
6198
+ sparsity: z
6199
+ .number()
6200
+ .min(0)
6201
+ .max(1)
6202
+ .nullable()
6203
+ .optional()
6204
+ .describe("Motion-trajectory sparsity. Higher values use fewer motion anchors. Leave unset for the default."),
6205
+ });
6206
+ const FalLumaAgentRayV3p2VideoToVideoRayEditFaceControlSchema = z.object({
6207
+ enabled: z
6208
+ .boolean()
6209
+ .default(true)
6210
+ .describe("Enable face-identity conditioning for the edit."),
6211
+ });
6212
+ const FalLumaAgentRayV3p2VideoToVideoRayEditControlsSchema = z
6213
+ .object({
6214
+ pose: FalLumaAgentRayV3p2VideoToVideoRayEditPoseControlSchema.nullable()
6215
+ .optional()
6216
+ .describe("Pose / skeleton conditioning."),
6217
+ depth: FalLumaAgentRayV3p2VideoToVideoRayEditDepthControlSchema.nullable()
6218
+ .optional()
6219
+ .describe("Depth / scene-geometry conditioning."),
6220
+ normals: FalLumaAgentRayV3p2VideoToVideoRayEditNormalsControlSchema.nullable()
6221
+ .optional()
6222
+ .describe("Surface-normals conditioning."),
6223
+ trajectory: FalLumaAgentRayV3p2VideoToVideoRayEditTrajectoryControlSchema.nullable()
6224
+ .optional()
6225
+ .describe("Motion-trajectory conditioning."),
6226
+ face: FalLumaAgentRayV3p2VideoToVideoRayEditFaceControlSchema.nullable()
6227
+ .optional()
6228
+ .describe("Face-identity conditioning."),
6229
+ })
6230
+ .describe("Per-signal conditioning controls for ray-3.2 video editing.\n\nEach signal is optional; include only the signals you want to tune. Cannot\nbe combined with auto_controls. Mirrors the Luma Agents ``video.edit.controls``\nobject — see https://docs.agents.lumalabs.ai/api/resources/generations.");
6231
+ // Pinned to the live queue OpenAPI read on 2026-10-08
6232
+ // (sha256 8bd14a741c36236019df945f9b48fe593fddd54853d7ea947ace9731e68c84c3). Field order follows x-fal-order-properties.
6233
+ // Docs: https://fal.ai/models/luma/agent/ray/v3.2/video-to-video/api
6234
+ export const FalLumaAgentRayV3p2VideoToVideoRequestSchema = z.object({
6235
+ prompt: z
6236
+ .string()
6237
+ .min(1)
6238
+ .max(6000)
6239
+ .describe("Text prompt describing how to edit the source video."),
6240
+ video_url: z.string().min(1).describe("URL of the source video to edit."),
6241
+ user: z
6242
+ .string()
6243
+ .nullable()
6244
+ .optional()
6245
+ .describe("Optional opaque identifier for the end user making the request. Used only for abuse attribution; never interpreted by fal."),
6246
+ start_image_url: z
6247
+ .string()
6248
+ .nullable()
6249
+ .optional()
6250
+ .describe("Optional URL of an image to use as the edited video's first frame — e.g. a restyled version of the source's opening frame to steer the look of the edit. Leave unset to let the model derive the first frame from the source video."),
6251
+ resolution: z
6252
+ .enum(["540p", "720p", "1080p"])
6253
+ .default("540p")
6254
+ .describe("Resolution of the edited video. Higher resolutions cost more."),
6255
+ duration: z
6256
+ .enum(["5s", "10s"])
6257
+ .default("5s")
6258
+ .describe("Duration of the edited video."),
6259
+ edit_strength: z
6260
+ .enum([
6261
+ "adhere_1",
6262
+ "adhere_2",
6263
+ "adhere_3",
6264
+ "flex_1",
6265
+ "flex_2",
6266
+ "flex_3",
6267
+ "reimagine_1",
6268
+ "reimagine_2",
6269
+ "reimagine_3",
6270
+ ])
6271
+ .nullable()
6272
+ .optional()
6273
+ .describe("How closely the edit preserves the source video. 'adhere_*' stays closest to the source, 'flex_*' is balanced, and 'reimagine_*' diverges most. Leave unset to use Luma's default. Cannot be combined with auto_controls."),
6274
+ auto_controls: z
6275
+ .boolean()
6276
+ .default(false)
6277
+ .describe("Let the model derive the edit conditioning schedule from the source video. Cannot be combined with edit_strength."),
6278
+ hdr: z
6279
+ .boolean()
6280
+ .default(false)
6281
+ .describe("Generate an HDR-encoded MP4. Requires HDR access on the account and a resolution of 720p or 1080p."),
6282
+ exr_export: z
6283
+ .boolean()
6284
+ .default(false)
6285
+ .describe("Also export an EXR file alongside the MP4. Requires hdr=true and HDR access."),
6286
+ controls: FalLumaAgentRayV3p2VideoToVideoRayEditControlsSchema.nullable()
6287
+ .optional()
6288
+ .describe("Per-signal conditioning controls (pose, depth, normals, trajectory, face) for finer control than edit_strength. Cannot be combined with auto_controls."),
6289
+ keyframes: z
6290
+ .array(z.string())
6291
+ .min(1)
6292
+ .max(64)
6293
+ .nullable()
6294
+ .optional()
6295
+ .describe("Multi-keyframe edit guide frames: up to 64 image URLs pinned at the source-frame positions given by keyframe_indexes. Mutually exclusive with start_image_url. Provide keyframes and keyframe_indexes together (same length)."),
6296
+ keyframe_indexes: z
6297
+ .array(z.number().int())
6298
+ .min(1)
6299
+ .max(64)
6300
+ .nullable()
6301
+ .optional()
6302
+ .describe("Source-video frame positions where each keyframes[i] is anchored. Non-negative, unique, and the same length as keyframes."),
6303
+ });
6304
+ // Pinned to the live queue OpenAPI read on 2026-10-08
6305
+ // (sha256 e95ae20b1a5eaf379534320d570eed680354232f5c035907988f14486305d5cd). Field order follows x-fal-order-properties.
6306
+ // Docs: https://fal.ai/models/luma/agent/ray/v3.2/image-to-video/api
6307
+ export const FalLumaAgentRayV3p2ImageToVideoRequestSchema = z.object({
6308
+ prompt: z
6309
+ .string()
6310
+ .min(1)
6311
+ .max(6000)
6312
+ .describe("Text prompt describing the motion/scene to generate."),
6313
+ image_url: z
6314
+ .string()
6315
+ .min(1)
6316
+ .nullable()
6317
+ .optional()
6318
+ .describe("URL of the image used as the first frame of the video. Provide either image_url (optionally with end_image_url) or keyframes — the two anchoring modes are mutually exclusive."),
6319
+ end_image_url: z
6320
+ .string()
6321
+ .nullable()
6322
+ .optional()
6323
+ .describe("Optional URL of an image used as the last frame. When set, the model interpolates between image_url and end_image_url. Cannot be combined with keyframes."),
6324
+ aspect_ratio: z
6325
+ .enum(["3:4", "4:3", "1:1", "9:16", "16:9", "21:9"])
6326
+ .default("16:9")
6327
+ .describe("Aspect ratio of the generated video."),
6328
+ resolution: z
6329
+ .enum(["540p", "720p", "1080p"])
6330
+ .default("540p")
6331
+ .describe("Resolution of the generated video. Higher resolutions cost more."),
6332
+ duration: z
6333
+ .enum(["5s", "10s"])
6334
+ .default("5s")
6335
+ .describe("Duration of the generated video. 10s requires multi-keyframe input (keyframes / keyframe_indexes); it is not supported with a single image_url / end_image_url anchor."),
6336
+ loop: z
6337
+ .boolean()
6338
+ .default(false)
6339
+ .describe("Generate a seamless loop. Only valid for standard-dynamic-range generations without an end frame or keyframes."),
6340
+ hdr: z
6341
+ .boolean()
6342
+ .default(false)
6343
+ .describe("Generate an HDR-encoded MP4. Requires HDR access on the account and a resolution of 720p or 1080p; not supported with loop."),
6344
+ exr_export: z
6345
+ .boolean()
6346
+ .default(false)
6347
+ .describe("Also export an EXR file alongside the MP4. Requires hdr=true and HDR access."),
6348
+ keyframes: z
6349
+ .array(z.string())
6350
+ .min(1)
6351
+ .max(64)
6352
+ .nullable()
6353
+ .optional()
6354
+ .describe("Multi-keyframe image-to-video guide frames: 1-64 image URLs pinned at the positions given by keyframe_indexes. Mutually exclusive with image_url, end_image_url, and loop; unlocks 10s and HDR. Provide keyframes and keyframe_indexes together (same length)."),
6355
+ keyframe_indexes: z
6356
+ .array(z.number().int())
6357
+ .min(1)
6358
+ .max(64)
6359
+ .nullable()
6360
+ .optional()
6361
+ .describe("Output-frame positions (duration x 24fps: 5s -> 0-120, 10s -> 0-240) where each keyframes[i] is anchored. Non-negative, unique, and the same length as keyframes."),
6362
+ });
6363
+ // Pinned to the live queue OpenAPI read on 2026-10-08
6364
+ // (sha256 1b65c2b603474ce4cb84c9b680a6b5d374187e871ea347c5526ec5e9ac11e5e1). Field order follows x-fal-order-properties.
6365
+ // Docs: https://fal.ai/models/luma/agent/ray/v3.2/text-to-video/api
6366
+ export const FalLumaAgentRayV3p2TextToVideoRequestSchema = z.object({
6367
+ prompt: z
6368
+ .string()
6369
+ .min(1)
6370
+ .max(6000)
6371
+ .describe("Text prompt describing the video to generate."),
6372
+ aspect_ratio: z
6373
+ .enum(["3:4", "4:3", "1:1", "9:16", "16:9", "21:9"])
6374
+ .default("16:9")
6375
+ .describe("Aspect ratio of the generated video."),
6376
+ resolution: z
6377
+ .enum(["540p", "720p", "1080p"])
6378
+ .default("540p")
6379
+ .describe("Resolution of the generated video. Higher resolutions cost more."),
6380
+ duration: z
6381
+ .enum(["5s", "10s"])
6382
+ .default("5s")
6383
+ .describe("Duration of the generated video."),
6384
+ loop: z
6385
+ .boolean()
6386
+ .default(false)
6387
+ .describe("Generate a seamless loop. Only valid for 5s, standard-dynamic-range generations without an end frame."),
6388
+ hdr: z
6389
+ .boolean()
6390
+ .default(false)
6391
+ .describe("Generate an HDR-encoded MP4. Requires HDR access on the account and a resolution of 720p or 1080p; not supported with 10s or loop."),
6392
+ exr_export: z
6393
+ .boolean()
6394
+ .default(false)
6395
+ .describe("Also export an EXR file alongside the MP4. Requires hdr=true and HDR access."),
6396
+ });
3460
6397
  export const FAL_ENDPOINT_REQUEST_SCHEMAS = {
6398
+ "luma/agent/ray/v3.2/text-to-video": FalLumaAgentRayV3p2TextToVideoRequestSchema,
6399
+ "luma/agent/ray/v3.2/image-to-video": FalLumaAgentRayV3p2ImageToVideoRequestSchema,
6400
+ "luma/agent/ray/v3.2/video-to-video": FalLumaAgentRayV3p2VideoToVideoRequestSchema,
6401
+ "luma/agent/ray/v3.2/reframe": FalLumaAgentRayV3p2ReframeRequestSchema,
6402
+ "nvidia/cosmos-3-super/text-to-image": FalNvidiaCosmos3SuperTextToImageRequestSchema,
6403
+ "nvidia/cosmos-3-super/image-to-video": FalNvidiaCosmos3SuperImageToVideoRequestSchema,
6404
+ "microsoft/mai-image-2.5-pro/edit": FalMicrosoftMaiImage2p5ProEditRequestSchema,
6405
+ "microsoft/mai-image-2.5-pro": FalMicrosoftMaiImage2p5ProRequestSchema,
6406
+ "openai/gpt-image-2.5/flare/text-to-image": FalOpenaiGptImage2p5FlareTextToImageRequestSchema,
6407
+ "openai/gpt-image-2.5/flare/edit": FalOpenaiGptImage2p5FlareEditRequestSchema,
6408
+ "openai/gpt-image-2.5/sunburst/text-to-image": FalOpenaiGptImage2p5SunburstTextToImageRequestSchema,
6409
+ "openai/gpt-image-2.5/sunburst/edit": FalOpenaiGptImage2p5SunburstEditRequestSchema,
6410
+ "meta/muse-image/edit": FalMetaMuseImageEditRequestSchema,
6411
+ "meta/muse-image/text-to-image": FalMetaMuseImageTextToImageRequestSchema,
6412
+ "elevenlabs/music/v2.5": FalElevenlabsMusicV2p5RequestSchema,
6413
+ "bria/fibo-gen-1.5/text-to-image": FalBriaFiboGen1p5TextToImageRequestSchema,
6414
+ "bria/fibo-edit-1.5/edit": FalBriaFiboEdit1p5EditRequestSchema,
6415
+ "blackforestlabs/flux-3/edit-video": FalBlackforestlabsFlux3EditVideoRequestSchema,
6416
+ "alibaba/happy-horse/v1.1/text-to-video": FalAlibabaHappyHorseV1p1TextToVideoRequestSchema,
6417
+ "alibaba/happy-horse/v1.1/image-to-video": FalAlibabaHappyHorseV1p1ImageToVideoRequestSchema,
6418
+ "alibaba/happy-horse/v1.1/reference-to-video": FalAlibabaHappyHorseV1p1ReferenceToVideoRequestSchema,
6419
+ "alibaba/qwen-audio-3-tts": FalAlibabaQwenAudio3TtsRequestSchema,
6420
+ "fal-ai/kling-video/v3/turbo/pro/image-to-video": FalKlingVideoV3TurboProImageToVideoRequestSchema,
6421
+ "fal-ai/kling-video/v3/turbo/pro/text-to-video": FalKlingVideoV3TurboProTextToVideoRequestSchema,
6422
+ "fal-ai/kling-video/v3/turbo/standard/image-to-video": FalKlingVideoV3TurboStandardImageToVideoRequestSchema,
6423
+ "fal-ai/kling-video/v3/turbo/standard/text-to-video": FalKlingVideoV3TurboStandardTextToVideoRequestSchema,
6424
+ "lightricks/ltx-2.5/audio-to-video/fast": FalLightricksLtx2p5AudioToVideoFastRequestSchema,
6425
+ "lightricks/ltx-2.5/audio-to-video/pro": FalLightricksLtx2p5AudioToVideoProRequestSchema,
6426
+ "lightricks/ltx-2.5/text-to-video/pro": FalLightricksLtx2p5TextToVideoProRequestSchema,
6427
+ "lightricks/ltx-2.5/text-to-video/fast": FalLightricksLtx2p5TextToVideoFastRequestSchema,
6428
+ "google/gemini-omni-flash/v1.1/text-to-video": FalGeminiOmniFlashV1p1TextToVideoRequestSchema,
6429
+ "google/gemini-omni-flash/v1.1/image-to-video": FalGeminiOmniFlashV1p1ImageToVideoRequestSchema,
6430
+ "google/gemini-omni-flash/v1.1/reference-to-video": FalGeminiOmniFlashV1p1ReferenceToVideoRequestSchema,
6431
+ "google/gemini-omni-flash/v1.1/edit": FalGeminiOmniFlashV1p1EditRequestSchema,
6432
+ "xai/grok-imagine-video/v1.5/image-to-video": FalXaiGrokImagineVideoV1p5ImageToVideoRequestSchema,
6433
+ "xai/grok-imagine-video/v1.5/text-to-video": FalXaiGrokImagineVideoV1p5TextToVideoRequestSchema,
6434
+ "minimax/h3-max-turbo/text-to-video": FalMinimaxH3MaxTurboTextToVideoRequestSchema,
6435
+ "minimax/h3-max-turbo/image-to-video": FalMinimaxH3MaxTurboImageToVideoRequestSchema,
6436
+ "minimax/h3-max/lip-sync/image-to-video": FalMinimaxH3MaxLipSyncImageToVideoRequestSchema,
6437
+ "minimax/h3-max/3d-to-video": FalMinimaxH3MaxThreeDToVideoRequestSchema,
6438
+ "minimax/h3-max/reference-to-video": FalMinimaxH3MaxReferenceToVideoRequestSchema,
6439
+ "minimax/h3-max/camera-controls": FalMinimaxH3MaxCameraControlsRequestSchema,
6440
+ "minimax/h3-max/text-to-video": FalMinimaxH3MaxTextToVideoRequestSchema,
6441
+ "minimax/h3-max/image-to-video": FalMinimaxH3MaxImageToVideoRequestSchema,
6442
+ "minimax/h3-max/extend-video": FalMinimaxH3MaxExtendVideoRequestSchema,
3461
6443
  "bria/fibo-edit-1.5/product-holding": FalBriaFiboEdit1p5ProductHoldingRequestSchema,
3462
6444
  "bria/fibo-edit-1.5/virtual-try-on": FalBriaFiboEdit1p5VirtualTryOnRequestSchema,
3463
6445
  "google/lyria-3.5": FalGoogleLyria3p5RequestSchema,