@apicity/fal 0.30.0 → 0.31.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/README.md +35 -1
- package/dist/src/example.d.ts.map +1 -1
- package/dist/src/example.js +24 -0
- package/dist/src/example.js.map +1 -1
- package/dist/src/fal.d.ts.map +1 -1
- package/dist/src/fal.js +17 -1
- package/dist/src/fal.js.map +1 -1
- package/dist/src/index.d.ts +1 -1
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/types.d.ts +34 -2
- package/dist/src/types.d.ts.map +1 -1
- package/dist/src/types.js.map +1 -1
- package/dist/src/zod.d.ts +276 -0
- package/dist/src/zod.d.ts.map +1 -1
- package/dist/src/zod.js +156 -7
- package/dist/src/zod.js.map +1 -1
- package/package.json +1 -1
package/dist/src/zod.js
CHANGED
|
@@ -1541,6 +1541,7 @@ export const FalAlibabaQwenImage3EditRequestSchema = z.object({
|
|
|
1541
1541
|
// defines one schema that both endpoint ids reuse, the same way
|
|
1542
1542
|
// `fal-ai/wan/v2.7/pro/*` reuses its non-pro schemas.
|
|
1543
1543
|
// Docs: https://fal.ai/models/alibaba/wan-3.0/text-to-video/api
|
|
1544
|
+
const FalWan3p0PromptSchema = z.string().max(20_000);
|
|
1544
1545
|
const FalWan3p0ResolutionSchema = z.enum(["480p", "720p", "1080p"]);
|
|
1545
1546
|
const FalWan3p0AspectRatioSchema = z.enum([
|
|
1546
1547
|
"adaptive",
|
|
@@ -1586,7 +1587,7 @@ const falWan3p0CommonFields = {
|
|
|
1586
1587
|
// Alibaba Wan 3.0 text-to-video
|
|
1587
1588
|
// ---------------------------------------------------------------------------
|
|
1588
1589
|
export const FalWan3p0TextToVideoRequestSchema = z.object({
|
|
1589
|
-
prompt:
|
|
1590
|
+
prompt: FalWan3p0PromptSchema.min(1),
|
|
1590
1591
|
...falWan3p0CommonFields,
|
|
1591
1592
|
});
|
|
1592
1593
|
// ---------------------------------------------------------------------------
|
|
@@ -1594,7 +1595,7 @@ export const FalWan3p0TextToVideoRequestSchema = z.object({
|
|
|
1594
1595
|
// ---------------------------------------------------------------------------
|
|
1595
1596
|
export const FalWan3p0ImageToVideoRequestSchema = z.object({
|
|
1596
1597
|
// Optional here — the start frame alone is a complete request.
|
|
1597
|
-
prompt:
|
|
1598
|
+
prompt: FalWan3p0PromptSchema.nullable().optional(),
|
|
1598
1599
|
start_image_url: z.string().url(),
|
|
1599
1600
|
end_image_url: z.string().url().nullable().optional(),
|
|
1600
1601
|
...falWan3p0CommonFields,
|
|
@@ -1607,7 +1608,7 @@ export const FalWan3p0ImageToVideoRequestSchema = z.object({
|
|
|
1607
1608
|
// one grounding input mirrors the `wan/v2.7/reference-to-video` refinement.
|
|
1608
1609
|
export const FalWan3p0ReferenceToVideoRequestSchema = z
|
|
1609
1610
|
.object({
|
|
1610
|
-
prompt:
|
|
1611
|
+
prompt: FalWan3p0PromptSchema.nullable().optional(),
|
|
1611
1612
|
reference_image_urls: z.array(z.string().url()).max(10).optional(),
|
|
1612
1613
|
// Up to 5 clips totaling at most 15 seconds, each at least 16 fps.
|
|
1613
1614
|
reference_video_urls: z.array(z.string().url()).max(5).optional(),
|
|
@@ -3042,7 +3043,10 @@ const Flux3MaxAspectRatioSchema = z.enum([
|
|
|
3042
3043
|
"3:4",
|
|
3043
3044
|
"9:16",
|
|
3044
3045
|
]);
|
|
3045
|
-
|
|
3046
|
+
// The live OpenAPI, re-read 2026-11-25, adds "2K" (1440p) and "4K" (2160p),
|
|
3047
|
+
// upscaled from the 720p generation. Unlike FLUX 3 ("1440p" / "2160p"), Max
|
|
3048
|
+
// spells them "2K" and "4K"; the enum is case-sensitive.
|
|
3049
|
+
const Flux3MaxResolutionSchema = z.enum(["720p", "1080p", "2K", "4K"]);
|
|
3046
3050
|
const Flux3MaxDurationSchema = z.number().int().min(5).max(20);
|
|
3047
3051
|
const Flux3MaxReasoningLevelSchema = z.enum(["low", "high"]);
|
|
3048
3052
|
const Flux3MaxVideoRequestBaseSchema = z.object({
|
|
@@ -11273,6 +11277,137 @@ export const FalBytedanceSeedance2p5UsImageToVideoRequestSchema = z.object({
|
|
|
11273
11277
|
.describe("The unique user ID of the end user.")
|
|
11274
11278
|
.optional(),
|
|
11275
11279
|
});
|
|
11280
|
+
// Bytedance Seedance 2.5 Flash image-to-video, from the live queue OpenAPI
|
|
11281
|
+
// read 2026-11-25 (Seedance25FlashImageToVideoInput). It matches the
|
|
11282
|
+
// standard 2.5 image-to-video Input without draft, and with resolution
|
|
11283
|
+
// limited to 480p and 720p.
|
|
11284
|
+
export const FalBytedanceSeedance2p5FlashImageToVideoRequestSchema = z.object({
|
|
11285
|
+
prompt: z
|
|
11286
|
+
.string()
|
|
11287
|
+
.nullable()
|
|
11288
|
+
.optional()
|
|
11289
|
+
.describe("The text prompt describing the desired motion and action for the video."),
|
|
11290
|
+
image_url: z
|
|
11291
|
+
.string()
|
|
11292
|
+
.describe("The URL of the starting frame image to animate. Supported formats: JPEG, PNG, WebP, BMP, TIFF, GIF, HEIC, HEIF. Max 30 MB."),
|
|
11293
|
+
end_image_url: z
|
|
11294
|
+
.string()
|
|
11295
|
+
.nullable()
|
|
11296
|
+
.optional()
|
|
11297
|
+
.describe("The URL of the image to use as the last frame of the video. When provided, the generated video will transition from the starting image to this ending image. Supported formats: JPEG, PNG, WebP, BMP, TIFF, GIF, HEIC, HEIF. Max 30 MB."),
|
|
11298
|
+
resolution: z
|
|
11299
|
+
.enum(["480p", "720p"])
|
|
11300
|
+
.default("720p")
|
|
11301
|
+
.describe("Video resolution: 480p or 720p."),
|
|
11302
|
+
duration: z
|
|
11303
|
+
.enum([
|
|
11304
|
+
"auto",
|
|
11305
|
+
"4",
|
|
11306
|
+
"5",
|
|
11307
|
+
"6",
|
|
11308
|
+
"7",
|
|
11309
|
+
"8",
|
|
11310
|
+
"9",
|
|
11311
|
+
"10",
|
|
11312
|
+
"11",
|
|
11313
|
+
"12",
|
|
11314
|
+
"13",
|
|
11315
|
+
"14",
|
|
11316
|
+
"15",
|
|
11317
|
+
"16",
|
|
11318
|
+
"17",
|
|
11319
|
+
"18",
|
|
11320
|
+
"19",
|
|
11321
|
+
"20",
|
|
11322
|
+
"21",
|
|
11323
|
+
"22",
|
|
11324
|
+
"23",
|
|
11325
|
+
"24",
|
|
11326
|
+
"25",
|
|
11327
|
+
"26",
|
|
11328
|
+
"27",
|
|
11329
|
+
"28",
|
|
11330
|
+
"29",
|
|
11331
|
+
"30",
|
|
11332
|
+
])
|
|
11333
|
+
.default("auto")
|
|
11334
|
+
.describe("Duration of the video in seconds. Supports 4 to 30 seconds, or auto to let the model decide based on the prompt."),
|
|
11335
|
+
// The live Input declares const "auto": the output follows the input image.
|
|
11336
|
+
aspect_ratio: z
|
|
11337
|
+
.literal("auto")
|
|
11338
|
+
.default("auto")
|
|
11339
|
+
.describe('The aspect ratio of the generated video. Always "auto" for image-to-video'),
|
|
11340
|
+
generate_audio: z
|
|
11341
|
+
.boolean()
|
|
11342
|
+
.default(true)
|
|
11343
|
+
.describe("Whether to generate synchronized audio for the video, including sound effects, ambient sounds, and lip-synced speech."),
|
|
11344
|
+
bitrate_mode: z
|
|
11345
|
+
.enum(["standard", "high"])
|
|
11346
|
+
.default("standard")
|
|
11347
|
+
.describe("Output bitrate mode. 'high' requests a higher-quality, larger-file encode from the model; 'standard' uses the default bitrate."),
|
|
11348
|
+
codec: z
|
|
11349
|
+
.enum(["auto", "H264", "H265"])
|
|
11350
|
+
.default("auto")
|
|
11351
|
+
.describe("'auto' retains default video codec behaviour; 'H264' uses H.264; 'H265' uses H.265."),
|
|
11352
|
+
output_format: z
|
|
11353
|
+
.enum(["mp4", "mov"])
|
|
11354
|
+
.default("mp4")
|
|
11355
|
+
.describe("Output video format. 'mp4' is broadly compatible; 'mov' targets professional post-production but may not be supported by all players."),
|
|
11356
|
+
return_last_frame: z
|
|
11357
|
+
.boolean()
|
|
11358
|
+
.default(false)
|
|
11359
|
+
.describe("If true, also return the last frame of the generated video as an image."),
|
|
11360
|
+
end_user_id: z
|
|
11361
|
+
.string()
|
|
11362
|
+
.nullable()
|
|
11363
|
+
.describe("The unique user ID of the end user.")
|
|
11364
|
+
.optional(),
|
|
11365
|
+
});
|
|
11366
|
+
// fal queue OpenAPI, Seedance25FlashReferenceToVideoInput (2026-11-25).
|
|
11367
|
+
// The reference limits are published in the individual field descriptions.
|
|
11368
|
+
export const FalBytedanceSeedance2p5FlashReferenceToVideoRequestSchema = z.object({
|
|
11369
|
+
prompt: z
|
|
11370
|
+
.string()
|
|
11371
|
+
.nullable()
|
|
11372
|
+
.optional()
|
|
11373
|
+
.describe("Describe the video to generate."),
|
|
11374
|
+
task: z
|
|
11375
|
+
.enum(["auto", "reference", "editing", "extension"])
|
|
11376
|
+
.default("reference")
|
|
11377
|
+
.describe("Reference uses the supplied media as guidance. Editing modifies a reference video and sets aspect ratio and duration to auto. Extension continues a video and sets its aspect ratio to auto. Auto lets the model choose the task."),
|
|
11378
|
+
image_urls: z
|
|
11379
|
+
.array(z.string())
|
|
11380
|
+
.max(10)
|
|
11381
|
+
.optional()
|
|
11382
|
+
.describe("Up to 10 reference images, 30 MB each. Refer to them as @Image1, @Image2, etc."),
|
|
11383
|
+
video_urls: z
|
|
11384
|
+
.array(z.string())
|
|
11385
|
+
.max(5)
|
|
11386
|
+
.optional()
|
|
11387
|
+
.describe("Up to 5 reference videos, totaling up to 30.2 seconds. A single extension video may be up to 120 seconds, of which the last 30.2 seconds are used. Refer to them as @Video1, @Video2, etc."),
|
|
11388
|
+
audio_urls: z
|
|
11389
|
+
.array(z.string())
|
|
11390
|
+
.max(5)
|
|
11391
|
+
.optional()
|
|
11392
|
+
.describe("Up to 5 audio references, totaling up to 30.2 seconds. Refer to them as @Audio1, @Audio2, etc."),
|
|
11393
|
+
resolution: FalBytedanceSeedance2p5FlashImageToVideoRequestSchema.shape.resolution,
|
|
11394
|
+
duration: FalBytedanceSeedance2p5FlashImageToVideoRequestSchema.shape.duration,
|
|
11395
|
+
aspect_ratio: Seedance2p5AspectRatioSchema.default("auto").describe("Output aspect ratio. Auto lets the model choose."),
|
|
11396
|
+
...FalBytedanceSeedance2p5FlashImageToVideoRequestSchema.pick({
|
|
11397
|
+
generate_audio: true,
|
|
11398
|
+
bitrate_mode: true,
|
|
11399
|
+
codec: true,
|
|
11400
|
+
output_format: true,
|
|
11401
|
+
return_last_frame: true,
|
|
11402
|
+
}).shape,
|
|
11403
|
+
seed: z
|
|
11404
|
+
.number()
|
|
11405
|
+
.int()
|
|
11406
|
+
.nullable()
|
|
11407
|
+
.optional()
|
|
11408
|
+
.describe("Random seed for generation."),
|
|
11409
|
+
end_user_id: FalBytedanceSeedance2p5FlashImageToVideoRequestSchema.shape.end_user_id,
|
|
11410
|
+
});
|
|
11276
11411
|
// Bytedance Seedance 2.5 US reference-to-video. The per-modality caps are
|
|
11277
11412
|
// documented in the field descriptions only (fal's 422 validator does not
|
|
11278
11413
|
// report them); together they also bound the documented 50-file total.
|
|
@@ -11973,11 +12108,15 @@ export const FalIdeogramVectorTextToVectorRequestSchema = z
|
|
|
11973
12108
|
// (sha256 32f6a4ab26aebcb0d97234366f2ac872045fa5eff5ecd430b6cf3a5285e4629d).
|
|
11974
12109
|
// Field order follows x-fal-order-properties; additionalProperties is false.
|
|
11975
12110
|
// The OpenAPI describes only enable_safety_checker.
|
|
12111
|
+
// The queue OpenAPI re-read on 2026-11-25
|
|
12112
|
+
// (sha256 cba0da0a7241a60402346f87c687f681c238e97af6cf46016cf4ec48fda572c7)
|
|
12113
|
+
// raised duration's maximum from 15 to 30 seconds; every other field rule is
|
|
12114
|
+
// unchanged.
|
|
11976
12115
|
// Docs: https://fal.ai/models/heygen/heygen-video/text-to-video/api
|
|
11977
12116
|
export const FalHeygenHeygenVideoTextToVideoRequestSchema = z
|
|
11978
12117
|
.object({
|
|
11979
12118
|
prompt: z.string().min(1).max(32000),
|
|
11980
|
-
duration: z.number().int().min(5).max(
|
|
12119
|
+
duration: z.number().int().min(5).max(30).default(5),
|
|
11981
12120
|
resolution: z.enum(["480p", "768p", "1080p", "2k"]).default("768p"),
|
|
11982
12121
|
prompt_enhancement: z
|
|
11983
12122
|
.enum(["turbo", "quality", "ultraquality", "disabled"])
|
|
@@ -11996,11 +12135,15 @@ export const FalHeygenHeygenVideoTextToVideoRequestSchema = z
|
|
|
11996
12135
|
// (sha256 2b872b7c7eb6bae233b43ad3ccaeb18f372ff6465154e563aca1896ac9068c21).
|
|
11997
12136
|
// Field order follows x-fal-order-properties; additionalProperties is false.
|
|
11998
12137
|
// The OpenAPI describes only image_url and enable_safety_checker.
|
|
12138
|
+
// The queue OpenAPI re-read on 2026-11-25
|
|
12139
|
+
// (sha256 55aeeab43497bc6467b7c18276853832d35a7bd609c1568551f737fcfe335d61)
|
|
12140
|
+
// raised duration's maximum from 15 to 30 seconds; every other field rule is
|
|
12141
|
+
// unchanged.
|
|
11999
12142
|
// Docs: https://fal.ai/models/heygen/heygen-video/image-to-video/api
|
|
12000
12143
|
export const FalHeygenHeygenVideoImageToVideoRequestSchema = z
|
|
12001
12144
|
.object({
|
|
12002
12145
|
prompt: z.string().min(1).max(32000),
|
|
12003
|
-
duration: z.number().int().min(5).max(
|
|
12146
|
+
duration: z.number().int().min(5).max(30).default(5),
|
|
12004
12147
|
resolution: z.enum(["480p", "768p", "1080p", "2k"]).default("768p"),
|
|
12005
12148
|
prompt_enhancement: z
|
|
12006
12149
|
.enum(["turbo", "quality", "ultraquality", "disabled"])
|
|
@@ -12019,11 +12162,15 @@ export const FalHeygenHeygenVideoImageToVideoRequestSchema = z
|
|
|
12019
12162
|
// Free 422 probes the same day returned "At least one reference image or
|
|
12020
12163
|
// video is required" at reference_video_urls whenever neither list had an
|
|
12021
12164
|
// item (audio references alone do not count), and refused null lists.
|
|
12165
|
+
// The queue OpenAPI re-read on 2026-11-25
|
|
12166
|
+
// (sha256 101dbb959290d787746b1eb9d6e2c9bd06474ce6826dd859d67c238f7d0a24a0)
|
|
12167
|
+
// raised duration's maximum from 15 to 30 seconds; the model page prose still
|
|
12168
|
+
// says 5 to 15, but the machine-readable input schema is the contract.
|
|
12022
12169
|
// Docs: https://fal.ai/models/heygen/heygen-video/reference-to-video/api
|
|
12023
12170
|
export const FalHeygenHeygenVideoReferenceToVideoRequestSchema = z
|
|
12024
12171
|
.object({
|
|
12025
12172
|
prompt: z.string().min(1).max(32000),
|
|
12026
|
-
duration: z.number().int().min(5).max(
|
|
12173
|
+
duration: z.number().int().min(5).max(30).default(5),
|
|
12027
12174
|
resolution: z.enum(["480p", "768p", "1080p", "2k"]).default("768p"),
|
|
12028
12175
|
prompt_enhancement: z
|
|
12029
12176
|
.enum(["turbo", "quality", "ultraquality", "disabled"])
|
|
@@ -14437,6 +14584,8 @@ export const FAL_ENDPOINT_REQUEST_SCHEMAS = {
|
|
|
14437
14584
|
"bytedance/seedance-2.5/us/draft/complete": FalBytedanceSeedance2p5UsDraftCompleteRequestSchema,
|
|
14438
14585
|
"bytedance/seedance-2.5/us/reference-to-video": FalBytedanceSeedance2p5UsReferenceToVideoRequestSchema,
|
|
14439
14586
|
"bytedance/seedance-2.5/us/image-to-video": FalBytedanceSeedance2p5UsImageToVideoRequestSchema,
|
|
14587
|
+
"bytedance/seedance-2.5/flash/image-to-video": FalBytedanceSeedance2p5FlashImageToVideoRequestSchema,
|
|
14588
|
+
"bytedance/seedance-2.5/flash/reference-to-video": FalBytedanceSeedance2p5FlashReferenceToVideoRequestSchema,
|
|
14440
14589
|
"bytedance/seedance-2.5/us/text-to-video": FalBytedanceSeedance2p5UsTextToVideoRequestSchema,
|
|
14441
14590
|
"bytedance/seedance-2.0/us/reference-to-video": FalBytedanceSeedance2p0UsReferenceToVideoRequestSchema,
|
|
14442
14591
|
"bytedance/seedance-2.0/us/image-to-video": FalBytedanceSeedance2p0UsImageToVideoRequestSchema,
|