@apicity/fal 0.29.0 → 0.30.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +52 -1
- package/dist/src/example.d.ts.map +1 -1
- package/dist/src/example.js +31 -0
- package/dist/src/example.js.map +1 -1
- package/dist/src/fal.d.ts.map +1 -1
- package/dist/src/fal.js +27 -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 +50 -2
- package/dist/src/types.d.ts.map +1 -1
- package/dist/src/types.js.map +1 -1
- package/dist/src/zod.d.ts +186 -0
- package/dist/src/zod.d.ts.map +1 -1
- package/dist/src/zod.js +167 -0
- package/dist/src/zod.js.map +1 -1
- package/package.json +1 -1
package/dist/src/zod.js
CHANGED
|
@@ -1268,6 +1268,77 @@ export const FalSeedreamV5ProEditRequestSchema = z.object({
|
|
|
1268
1268
|
enable_safety_checker: z.boolean().optional(),
|
|
1269
1269
|
});
|
|
1270
1270
|
// ---------------------------------------------------------------------------
|
|
1271
|
+
// Bytedance Seedream 5.5 edit
|
|
1272
|
+
// ---------------------------------------------------------------------------
|
|
1273
|
+
// Queue OpenAPI re-read 2026-11-20
|
|
1274
|
+
// (sha256 717a8bfaa7293167665dcaeb6bc9d35ab4b16793fc45402fa7626c6dfc19e3c6).
|
|
1275
|
+
// The route was not probed: a rejected body can still be billed.
|
|
1276
|
+
// Docs: https://fal.ai/models/bytedance/seedream/v5.5/edit/api
|
|
1277
|
+
const FalSeedreamV55ImageSizeSchema = z.union([
|
|
1278
|
+
z.enum([
|
|
1279
|
+
"square_hd",
|
|
1280
|
+
"square",
|
|
1281
|
+
"portrait_4_3",
|
|
1282
|
+
"portrait_16_9",
|
|
1283
|
+
"landscape_4_3",
|
|
1284
|
+
"landscape_16_9",
|
|
1285
|
+
"auto_1K",
|
|
1286
|
+
"auto_1.5K",
|
|
1287
|
+
"auto_2K",
|
|
1288
|
+
]),
|
|
1289
|
+
z.object({
|
|
1290
|
+
width: z
|
|
1291
|
+
.number()
|
|
1292
|
+
.int()
|
|
1293
|
+
.min(1)
|
|
1294
|
+
.max(14142)
|
|
1295
|
+
.describe("The width of the generated image."),
|
|
1296
|
+
height: z
|
|
1297
|
+
.number()
|
|
1298
|
+
.int()
|
|
1299
|
+
.min(1)
|
|
1300
|
+
.max(14142)
|
|
1301
|
+
.describe("The height of the generated image."),
|
|
1302
|
+
}),
|
|
1303
|
+
]);
|
|
1304
|
+
export const FalSeedreamV55EditRequestSchema = z.object({
|
|
1305
|
+
prompt: z.string().describe("The text prompt used to edit the image."),
|
|
1306
|
+
image_size: FalSeedreamV55ImageSizeSchema.default("auto_2K").describe("The size of the generated image. Total pixels must be between 921600 and 4624220, with aspect ratio between 1/16 and 16."),
|
|
1307
|
+
num_images: z
|
|
1308
|
+
.number()
|
|
1309
|
+
.int()
|
|
1310
|
+
.min(1)
|
|
1311
|
+
.max(6)
|
|
1312
|
+
.default(1)
|
|
1313
|
+
.describe("Number of separate model generations to run with the prompt."),
|
|
1314
|
+
output_format: z
|
|
1315
|
+
.enum(["jpeg", "png"])
|
|
1316
|
+
.default("png")
|
|
1317
|
+
.describe("The file format of the generated image."),
|
|
1318
|
+
watermark: z
|
|
1319
|
+
.boolean()
|
|
1320
|
+
.default(false)
|
|
1321
|
+
.describe("Whether to add the provider's visible watermark."),
|
|
1322
|
+
sync_mode: z
|
|
1323
|
+
.boolean()
|
|
1324
|
+
.default(false)
|
|
1325
|
+
.describe("If `True`, the media will be returned as a data URI and the output data won't be available in the request history."),
|
|
1326
|
+
enable_safety_checker: z
|
|
1327
|
+
.boolean()
|
|
1328
|
+
.default(true)
|
|
1329
|
+
.describe("If set to true, the safety checker will be enabled. Disabling it requires account authorization; unauthorized requests are always checked."),
|
|
1330
|
+
background: z
|
|
1331
|
+
.enum(["auto", "opaque", "transparent"])
|
|
1332
|
+
.default("auto")
|
|
1333
|
+
.describe("`auto` lets the model choose from the prompt and output format. `transparent` returns an RGBA image and requires `output_format=png`."),
|
|
1334
|
+
// Upstream keeps at most the last 10 images and does not reject a longer
|
|
1335
|
+
// list, so the cap is not encoded. The list is required and non-empty.
|
|
1336
|
+
image_urls: z
|
|
1337
|
+
.array(z.string())
|
|
1338
|
+
.min(1)
|
|
1339
|
+
.describe("List of URLs of input reference images. Up to 10 images are supported; if more are sent, only the last 10 are used."),
|
|
1340
|
+
});
|
|
1341
|
+
// ---------------------------------------------------------------------------
|
|
1271
1342
|
// Bytedance Seed Speech TTS v2
|
|
1272
1343
|
// ---------------------------------------------------------------------------
|
|
1273
1344
|
const FalSeedSpeechTtsV2VoiceSchema = z.enum([
|
|
@@ -14162,6 +14233,99 @@ export const FalKlingV4VideoToVideoEditRequestSchema = z.object({
|
|
|
14162
14233
|
.default("1080p")
|
|
14163
14234
|
.describe("Output resolution."),
|
|
14164
14235
|
});
|
|
14236
|
+
// Pinned to the live queue OpenAPI read on 2026-11-20
|
|
14237
|
+
// (sha256 15c4978af1d2649f0bd7a10ea685c2bab1223116df919226194a23eb29708990).
|
|
14238
|
+
// Field order follows x-fal-order-properties. The input is open. The media
|
|
14239
|
+
// URL rule is the one free 422 probes confirmed on the four kling/v4 video
|
|
14240
|
+
// endpoints; this image route was not probed, because a rejected body can
|
|
14241
|
+
// still be billed. Images and elements combined must stay at or under 10;
|
|
14242
|
+
// that limit is documented and not checked here.
|
|
14243
|
+
// Docs: https://fal.ai/models/kling/v4/image-to-image/api
|
|
14244
|
+
export const FalKlingV4ImageToImageRequestSchema = z.object({
|
|
14245
|
+
prompt: z
|
|
14246
|
+
.string()
|
|
14247
|
+
.min(1)
|
|
14248
|
+
.max(50000)
|
|
14249
|
+
.describe("Text prompt. Reference images as @Image1, @Image2, ... and elements as @Element1, @Element2, ..."),
|
|
14250
|
+
image_urls: z
|
|
14251
|
+
.array(KlingV4MediaUrlSchema)
|
|
14252
|
+
.min(1)
|
|
14253
|
+
.max(10)
|
|
14254
|
+
.describe("Reference images (1-10).\n\nMax file size: 30.0MB, Min width: 300px, Min height: 300px, Min aspect ratio: 0.40, Max aspect ratio: 2.50, Timeout: 20.0s"),
|
|
14255
|
+
elements: z
|
|
14256
|
+
.array(KlingV4ImageElementSchema)
|
|
14257
|
+
.max(7)
|
|
14258
|
+
.nullable()
|
|
14259
|
+
.optional()
|
|
14260
|
+
.describe("Elements, referenced as @Element1, @Element2, ... (max 7). Images and elements combined must not exceed 10."),
|
|
14261
|
+
result_type: z
|
|
14262
|
+
.enum(["single", "series"])
|
|
14263
|
+
.default("single")
|
|
14264
|
+
.describe("'single' returns independent images; 'series' returns a coherent set of related images."),
|
|
14265
|
+
num_images: z
|
|
14266
|
+
.number()
|
|
14267
|
+
.int()
|
|
14268
|
+
.min(1)
|
|
14269
|
+
.max(9)
|
|
14270
|
+
.default(1)
|
|
14271
|
+
.describe("Number of independent images to generate (1-9). Only used when result_type is 'single'."),
|
|
14272
|
+
series_amount: z
|
|
14273
|
+
.union([z.number().int().min(2).max(10), z.literal("auto")])
|
|
14274
|
+
.default(4)
|
|
14275
|
+
.describe("Number of images in the series (2-10), or 'auto' to let the model choose. Only used when result_type is 'series'."),
|
|
14276
|
+
resolution: z
|
|
14277
|
+
.enum(["2K", "4K", "8K"])
|
|
14278
|
+
.default("2K")
|
|
14279
|
+
.describe("Output resolution."),
|
|
14280
|
+
aspect_ratio: z
|
|
14281
|
+
.enum(["auto", "16:9", "9:16", "1:1", "4:3", "3:4", "3:2", "2:3", "21:9"])
|
|
14282
|
+
.default("auto")
|
|
14283
|
+
.describe("Aspect ratio of generated images. 'auto' picks one from the input content."),
|
|
14284
|
+
sync_mode: z
|
|
14285
|
+
.boolean()
|
|
14286
|
+
.default(false)
|
|
14287
|
+
.describe("If `True`, the media will be returned as a data URI."),
|
|
14288
|
+
});
|
|
14289
|
+
// Pinned to the live queue OpenAPI read on 2026-11-20
|
|
14290
|
+
// (sha256 a6a499f3f677057d97bc6a9cc076c8b801a2323ce8250f85e3a9cf4fa9ad0c74).
|
|
14291
|
+
// Field order follows x-fal-order-properties. The input is open. llms.txt
|
|
14292
|
+
// still says $0.063 per units, matching the 2026-11-19 survey. This route
|
|
14293
|
+
// was not probed with a rejected body, because a rejection can still be billed.
|
|
14294
|
+
// Docs: https://fal.ai/models/kling/v4/text-to-image/api
|
|
14295
|
+
export const FalKlingV4TextToImageRequestSchema = z.object({
|
|
14296
|
+
prompt: z
|
|
14297
|
+
.string()
|
|
14298
|
+
.min(1)
|
|
14299
|
+
.max(50000)
|
|
14300
|
+
.describe("Text prompt for image generation."),
|
|
14301
|
+
result_type: z
|
|
14302
|
+
.enum(["single", "series"])
|
|
14303
|
+
.default("single")
|
|
14304
|
+
.describe("'single' returns independent images; 'series' returns a coherent set of related images."),
|
|
14305
|
+
num_images: z
|
|
14306
|
+
.number()
|
|
14307
|
+
.int()
|
|
14308
|
+
.min(1)
|
|
14309
|
+
.max(9)
|
|
14310
|
+
.default(1)
|
|
14311
|
+
.describe("Number of independent images to generate (1-9). Only used when result_type is 'single'."),
|
|
14312
|
+
series_amount: z
|
|
14313
|
+
.union([z.number().int().min(2).max(10), z.literal("auto")])
|
|
14314
|
+
.default(4)
|
|
14315
|
+
.describe("Number of images in the series (2-10), or 'auto' to let the model choose. Only used when result_type is 'series'."),
|
|
14316
|
+
resolution: z
|
|
14317
|
+
.enum(["2K", "4K", "8K"])
|
|
14318
|
+
.default("2K")
|
|
14319
|
+
.describe("Output resolution."),
|
|
14320
|
+
aspect_ratio: z
|
|
14321
|
+
.enum(["auto", "16:9", "9:16", "1:1", "4:3", "3:4", "3:2", "2:3", "21:9"])
|
|
14322
|
+
.default("auto")
|
|
14323
|
+
.describe("Aspect ratio of generated images. 'auto' picks one from the input content."),
|
|
14324
|
+
sync_mode: z
|
|
14325
|
+
.boolean()
|
|
14326
|
+
.default(false)
|
|
14327
|
+
.describe("If `True`, the media will be returned as a data URI."),
|
|
14328
|
+
});
|
|
14165
14329
|
// Pinned to the live queue OpenAPI read on 2026-10-23
|
|
14166
14330
|
// (sha256 896571542e77dada6cfd0bcabc34f17f1db6e4b7afdfa75784e8b3a72461bb05).
|
|
14167
14331
|
// Field order follows x-fal-order-properties. The input is open; free 422
|
|
@@ -14248,6 +14412,8 @@ export const FAL_ENDPOINT_REQUEST_SCHEMAS = {
|
|
|
14248
14412
|
"fal-ai/heygen/v2/video-agent": FalHeygenV2VideoAgentRequestSchema,
|
|
14249
14413
|
"kling/v4/video-to-video/edit": FalKlingV4VideoToVideoEditRequestSchema,
|
|
14250
14414
|
"kling/v4/reference-to-video": FalKlingV4ReferenceToVideoRequestSchema,
|
|
14415
|
+
"kling/v4/image-to-image": FalKlingV4ImageToImageRequestSchema,
|
|
14416
|
+
"kling/v4/text-to-image": FalKlingV4TextToImageRequestSchema,
|
|
14251
14417
|
"kling/v4/image-to-video": FalKlingV4ImageToVideoRequestSchema,
|
|
14252
14418
|
"kling/v4/text-to-video": FalKlingV4TextToVideoRequestSchema,
|
|
14253
14419
|
"fal-ai/heygen/v3/filler-word-removal": FalHeygenV3FillerWordRemovalRequestSchema,
|
|
@@ -14467,6 +14633,7 @@ export const FAL_ENDPOINT_REQUEST_SCHEMAS = {
|
|
|
14467
14633
|
"bytedance/seedream/v5/pro/layerize": FalSeedreamV5ProLayerizeRequestSchema,
|
|
14468
14634
|
"bytedance/seedream/v5/pro/text-to-image": FalSeedreamV5ProTextToImageRequestSchema,
|
|
14469
14635
|
"bytedance/seedream/v5/pro/edit": FalSeedreamV5ProEditRequestSchema,
|
|
14636
|
+
"bytedance/seedream/v5.5/edit": FalSeedreamV55EditRequestSchema,
|
|
14470
14637
|
"fal-ai/bytedance/seed-speech/tts/v2": FalSeedSpeechTtsV2RequestSchema,
|
|
14471
14638
|
"minimax/music-3": FalMinimaxMusic3RequestSchema,
|
|
14472
14639
|
"fal-ai/elevenlabs/speech-to-text/scribe-v2": FalElevenlabsSpeechToTextScribeV2RequestSchema,
|