@apicity/fal 0.7.2 → 0.8.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 +144 -0
- package/dist/src/example.d.ts +4 -0
- package/dist/src/example.d.ts.map +1 -1
- package/dist/src/example.js +156 -52
- package/dist/src/example.js.map +1 -1
- package/dist/src/fal.d.ts.map +1 -1
- package/dist/src/fal.js +74 -228
- package/dist/src/fal.js.map +1 -1
- package/dist/src/zod.d.ts +2 -0
- package/dist/src/zod.d.ts.map +1 -1
- package/dist/src/zod.js +24 -14
- package/dist/src/zod.js.map +1 -1
- package/package.json +1 -1
package/dist/src/fal.js
CHANGED
|
@@ -85,7 +85,10 @@ export function createFal(opts) {
|
|
|
85
85
|
const baseURL = opts.baseURL ?? "https://api.fal.ai/v1";
|
|
86
86
|
const doFetch = opts.fetch ?? fetch;
|
|
87
87
|
const timeout = opts.timeout ?? 30000;
|
|
88
|
-
async function makeRequest(method, path,
|
|
88
|
+
async function makeRequest(method, path,
|
|
89
|
+
// Accept any typed request/params object directly — callers no longer
|
|
90
|
+
// launder their interface through `as unknown as Record<string, unknown>`.
|
|
91
|
+
paramsOrBody, signal, headers, customBaseURL) {
|
|
89
92
|
const controller = new AbortController();
|
|
90
93
|
const timeoutId = setTimeout(() => controller.abort(), timeout);
|
|
91
94
|
if (signal) {
|
|
@@ -216,6 +219,15 @@ export function createFal(opts) {
|
|
|
216
219
|
throw new FalError(`Fal request failed: ${error}`, 500, "server_error");
|
|
217
220
|
}
|
|
218
221
|
}
|
|
222
|
+
// Schema-attached endpoint builder. Collapses the repeated
|
|
223
|
+
// `Object.assign(async fn, { schema })` run wrappers: each endpoint declares
|
|
224
|
+
// only its HTTP method, path, request/response types, and zod `.schema`. The
|
|
225
|
+
// typed request object flows straight into makeRequest (no
|
|
226
|
+
// `Record<string, unknown>` laundering); `opts.defaults` are merged under the
|
|
227
|
+
// request and `opts.base` routes to an alternate host (e.g. fal.run).
|
|
228
|
+
function jsonBody(method, path, schema, opts) {
|
|
229
|
+
return Object.assign((params, signal) => makeRequest(method, path, opts?.defaults ? { ...opts.defaults, ...params } : params, signal, undefined, opts?.base), { schema });
|
|
230
|
+
}
|
|
219
231
|
// GET https://api.fal.ai/v1/models/pricing
|
|
220
232
|
// Docs: https://docs.fal.ai
|
|
221
233
|
const pricing = Object.assign(async function pricing(params, signal) {
|
|
@@ -271,386 +283,220 @@ export function createFal(opts) {
|
|
|
271
283
|
// sig-ok: stylistic dotPath divergence from URL
|
|
272
284
|
// POST https://api.fal.ai/v1/bytedance/seedance-2.0/image-to-video
|
|
273
285
|
// Docs: https://docs.fal.ai
|
|
274
|
-
const bytedanceSeedance2p0ImageToVideo =
|
|
275
|
-
return makeRequest("POST", "/bytedance/seedance-2.0/image-to-video", params, signal, undefined, runBaseURL);
|
|
276
|
-
}, {
|
|
277
|
-
schema: FalSeedance2p0ImageToVideoRequestSchema,
|
|
278
|
-
});
|
|
286
|
+
const bytedanceSeedance2p0ImageToVideo = jsonBody("POST", "/bytedance/seedance-2.0/image-to-video", FalSeedance2p0ImageToVideoRequestSchema, { base: runBaseURL });
|
|
279
287
|
// sig-ok: stylistic dotPath divergence from URL
|
|
280
288
|
// POST https://api.fal.ai/v1/bytedance/seedance-2.0/text-to-video
|
|
281
289
|
// Docs: https://docs.fal.ai
|
|
282
|
-
const bytedanceSeedance2p0TextToVideo =
|
|
283
|
-
return makeRequest("POST", "/bytedance/seedance-2.0/text-to-video", params, signal, undefined, runBaseURL);
|
|
284
|
-
}, {
|
|
285
|
-
schema: FalSeedance2p0TextToVideoRequestSchema,
|
|
286
|
-
});
|
|
290
|
+
const bytedanceSeedance2p0TextToVideo = jsonBody("POST", "/bytedance/seedance-2.0/text-to-video", FalSeedance2p0TextToVideoRequestSchema, { base: runBaseURL });
|
|
287
291
|
// sig-ok: stylistic dotPath divergence from URL
|
|
288
292
|
// POST https://api.fal.ai/v1/bytedance/seedance-2.0/fast/image-to-video
|
|
289
293
|
// Docs: https://docs.fal.ai
|
|
290
|
-
const bytedanceSeedance2p0FastImageToVideo =
|
|
291
|
-
return makeRequest("POST", "/bytedance/seedance-2.0/fast/image-to-video", params, signal, undefined, runBaseURL);
|
|
292
|
-
}, {
|
|
293
|
-
schema: FalSeedance2p0FastImageToVideoRequestSchema,
|
|
294
|
-
});
|
|
294
|
+
const bytedanceSeedance2p0FastImageToVideo = jsonBody("POST", "/bytedance/seedance-2.0/fast/image-to-video", FalSeedance2p0FastImageToVideoRequestSchema, { base: runBaseURL });
|
|
295
295
|
// sig-ok: stylistic dotPath divergence from URL
|
|
296
296
|
// POST https://api.fal.ai/v1/bytedance/seedance-2.0/fast/text-to-video
|
|
297
297
|
// Docs: https://docs.fal.ai
|
|
298
|
-
const bytedanceSeedance2p0FastTextToVideo =
|
|
299
|
-
return makeRequest("POST", "/bytedance/seedance-2.0/fast/text-to-video", params, signal, undefined, runBaseURL);
|
|
300
|
-
}, {
|
|
301
|
-
schema: FalSeedance2p0FastTextToVideoRequestSchema,
|
|
302
|
-
});
|
|
298
|
+
const bytedanceSeedance2p0FastTextToVideo = jsonBody("POST", "/bytedance/seedance-2.0/fast/text-to-video", FalSeedance2p0FastTextToVideoRequestSchema, { base: runBaseURL });
|
|
303
299
|
// sig-ok: stylistic dotPath divergence from URL
|
|
304
300
|
// POST https://api.fal.ai/v1/bytedance/seedance-2.0/reference-to-video
|
|
305
301
|
// Docs: https://docs.fal.ai
|
|
306
|
-
const bytedanceSeedance2p0ReferenceToVideo =
|
|
307
|
-
return makeRequest("POST", "/bytedance/seedance-2.0/reference-to-video", params, signal, undefined, runBaseURL);
|
|
308
|
-
}, {
|
|
309
|
-
schema: FalSeedance2p0ReferenceToVideoRequestSchema,
|
|
310
|
-
});
|
|
302
|
+
const bytedanceSeedance2p0ReferenceToVideo = jsonBody("POST", "/bytedance/seedance-2.0/reference-to-video", FalSeedance2p0ReferenceToVideoRequestSchema, { base: runBaseURL });
|
|
311
303
|
// sig-ok: stylistic dotPath divergence from URL
|
|
312
304
|
// POST https://api.fal.ai/v1/bytedance/seedance-2.0/fast/reference-to-video
|
|
313
305
|
// Docs: https://docs.fal.ai
|
|
314
|
-
const bytedanceSeedance2p0FastReferenceToVideo =
|
|
315
|
-
return makeRequest("POST", "/bytedance/seedance-2.0/fast/reference-to-video", params, signal, undefined, runBaseURL);
|
|
316
|
-
}, {
|
|
317
|
-
schema: FalSeedance2p0FastReferenceToVideoRequestSchema,
|
|
318
|
-
});
|
|
306
|
+
const bytedanceSeedance2p0FastReferenceToVideo = jsonBody("POST", "/bytedance/seedance-2.0/fast/reference-to-video", FalSeedance2p0FastReferenceToVideoRequestSchema, { base: runBaseURL });
|
|
319
307
|
// sig-ok: stylistic dotPath divergence from URL
|
|
320
308
|
// POST https://api.fal.ai/v1/fal-ai/nano-banana-pro/edit
|
|
321
309
|
// Docs: https://docs.fal.ai
|
|
322
|
-
const nanoBananaProEdit =
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
schema: FalNanoBananaProEditRequestSchema,
|
|
310
|
+
const nanoBananaProEdit = jsonBody("POST", "/fal-ai/nano-banana-pro/edit", FalNanoBananaProEditRequestSchema, {
|
|
311
|
+
base: runBaseURL,
|
|
312
|
+
defaults: { safety_tolerance: "6" },
|
|
326
313
|
});
|
|
327
314
|
// sig-ok: stylistic dotPath divergence from URL
|
|
328
315
|
// POST https://api.fal.ai/v1/fal-ai/nano-banana-pro
|
|
329
316
|
// Docs: https://docs.fal.ai
|
|
330
|
-
const nanoBananaProTextToImage =
|
|
331
|
-
return makeRequest("POST", "/fal-ai/nano-banana-pro", { safety_tolerance: "6", ...params }, signal, undefined, runBaseURL);
|
|
332
|
-
}, {
|
|
333
|
-
schema: FalNanoBananaProTextToImageRequestSchema,
|
|
334
|
-
});
|
|
317
|
+
const nanoBananaProTextToImage = jsonBody("POST", "/fal-ai/nano-banana-pro", FalNanoBananaProTextToImageRequestSchema, { base: runBaseURL, defaults: { safety_tolerance: "6" } });
|
|
335
318
|
// sig-ok: stylistic dotPath divergence from URL
|
|
336
319
|
// POST https://api.fal.ai/v1/fal-ai/nano-banana
|
|
337
320
|
// Docs: https://docs.fal.ai
|
|
338
|
-
const nanoBananaTextToImage =
|
|
339
|
-
|
|
340
|
-
}, {
|
|
341
|
-
schema: FalNanoBananaTextToImageRequestSchema,
|
|
321
|
+
const nanoBananaTextToImage = jsonBody("POST", "/fal-ai/nano-banana", FalNanoBananaTextToImageRequestSchema, {
|
|
322
|
+
base: runBaseURL,
|
|
342
323
|
});
|
|
343
324
|
// sig-ok: stylistic dotPath divergence from URL
|
|
344
325
|
// POST https://api.fal.ai/v1/fal-ai/nano-banana/edit
|
|
345
326
|
// Docs: https://docs.fal.ai
|
|
346
|
-
const nanoBananaEdit =
|
|
347
|
-
|
|
348
|
-
}, {
|
|
349
|
-
schema: FalNanoBananaEditRequestSchema,
|
|
327
|
+
const nanoBananaEdit = jsonBody("POST", "/fal-ai/nano-banana/edit", FalNanoBananaEditRequestSchema, {
|
|
328
|
+
base: runBaseURL,
|
|
350
329
|
});
|
|
351
330
|
// sig-ok: stylistic dotPath divergence from URL
|
|
352
331
|
// POST https://api.fal.ai/v1/fal-ai/nano-banana-2
|
|
353
332
|
// Docs: https://docs.fal.ai
|
|
354
|
-
const nanoBanana2TextToImage =
|
|
355
|
-
|
|
356
|
-
}, {
|
|
357
|
-
schema: FalNanoBanana2TextToImageRequestSchema,
|
|
333
|
+
const nanoBanana2TextToImage = jsonBody("POST", "/fal-ai/nano-banana-2", FalNanoBanana2TextToImageRequestSchema, {
|
|
334
|
+
base: runBaseURL,
|
|
358
335
|
});
|
|
359
336
|
// sig-ok: stylistic dotPath divergence from URL
|
|
360
337
|
// POST https://api.fal.ai/v1/fal-ai/nano-banana-2/edit
|
|
361
338
|
// Docs: https://docs.fal.ai
|
|
362
|
-
const nanoBanana2Edit =
|
|
363
|
-
|
|
364
|
-
}, {
|
|
365
|
-
schema: FalNanoBanana2EditRequestSchema,
|
|
339
|
+
const nanoBanana2Edit = jsonBody("POST", "/fal-ai/nano-banana-2/edit", FalNanoBanana2EditRequestSchema, {
|
|
340
|
+
base: runBaseURL,
|
|
366
341
|
});
|
|
342
|
+
// sig-ok: stylistic dotPath divergence from URL
|
|
367
343
|
// POST https://api.fal.ai/v1/google/nano-banana-2-lite
|
|
368
344
|
// Docs: https://fal.ai/models/google/nano-banana-2-lite/api
|
|
369
|
-
const nanoBanana2LiteTextToImage =
|
|
370
|
-
|
|
371
|
-
}, {
|
|
372
|
-
schema: FalNanoBanana2LiteTextToImageRequestSchema,
|
|
373
|
-
});
|
|
345
|
+
const nanoBanana2LiteTextToImage = jsonBody("POST", "/google/nano-banana-2-lite", FalNanoBanana2LiteTextToImageRequestSchema, { base: runBaseURL });
|
|
346
|
+
// sig-ok: stylistic dotPath divergence from URL
|
|
374
347
|
// POST https://api.fal.ai/v1/google/nano-banana-lite/edit
|
|
375
348
|
// Docs: https://fal.ai/models/google/nano-banana-lite/edit/api
|
|
376
|
-
const nanoBanana2LiteEdit =
|
|
377
|
-
return makeRequest("POST", "/google/nano-banana-lite/edit", params, signal, undefined, runBaseURL);
|
|
378
|
-
}, {
|
|
379
|
-
schema: FalNanoBanana2LiteEditRequestSchema,
|
|
380
|
-
});
|
|
349
|
+
const nanoBanana2LiteEdit = jsonBody("POST", "/google/nano-banana-lite/edit", FalNanoBanana2LiteEditRequestSchema, { base: runBaseURL });
|
|
381
350
|
// sig-ok: stylistic dotPath divergence from URL
|
|
382
351
|
// POST https://api.fal.ai/v1/fal-ai/bytedance/seedream/v5/lite/edit
|
|
383
352
|
// Docs: https://docs.fal.ai
|
|
384
|
-
const seedreamV5LiteEdit =
|
|
385
|
-
return makeRequest("POST", "/fal-ai/bytedance/seedream/v5/lite/edit", { enable_safety_checker: false, ...params }, signal, undefined, runBaseURL);
|
|
386
|
-
}, {
|
|
387
|
-
schema: FalSeedreamV5LiteEditRequestSchema,
|
|
388
|
-
});
|
|
353
|
+
const seedreamV5LiteEdit = jsonBody("POST", "/fal-ai/bytedance/seedream/v5/lite/edit", FalSeedreamV5LiteEditRequestSchema, { base: runBaseURL, defaults: { enable_safety_checker: false } });
|
|
389
354
|
// sig-ok: stylistic dotPath divergence from URL
|
|
390
355
|
// POST https://api.fal.ai/v1/fal-ai/bytedance/seedream/v5/lite/text-to-image
|
|
391
356
|
// Docs: https://docs.fal.ai
|
|
392
|
-
const seedreamV5LiteTextToImage =
|
|
393
|
-
return makeRequest("POST", "/fal-ai/bytedance/seedream/v5/lite/text-to-image", { enable_safety_checker: false, ...params }, signal, undefined, runBaseURL);
|
|
394
|
-
}, {
|
|
395
|
-
schema: FalSeedreamV5LiteTextToImageRequestSchema,
|
|
396
|
-
});
|
|
357
|
+
const seedreamV5LiteTextToImage = jsonBody("POST", "/fal-ai/bytedance/seedream/v5/lite/text-to-image", FalSeedreamV5LiteTextToImageRequestSchema, { base: runBaseURL, defaults: { enable_safety_checker: false } });
|
|
397
358
|
// sig-ok: stylistic dotPath divergence from URL
|
|
398
359
|
// POST https://api.fal.ai/v1/fal-ai/bytedance/seed-speech/tts/v2
|
|
399
360
|
// Docs: https://fal.ai/models/fal-ai/bytedance/seed-speech/tts/v2/api
|
|
400
|
-
const seedSpeechTtsV2 =
|
|
401
|
-
return makeRequest("POST", "/fal-ai/bytedance/seed-speech/tts/v2", params, signal, undefined, runBaseURL);
|
|
402
|
-
}, {
|
|
403
|
-
schema: FalSeedSpeechTtsV2RequestSchema,
|
|
404
|
-
});
|
|
361
|
+
const seedSpeechTtsV2 = jsonBody("POST", "/fal-ai/bytedance/seed-speech/tts/v2", FalSeedSpeechTtsV2RequestSchema, { base: runBaseURL });
|
|
405
362
|
// sig-ok: stylistic dotPath divergence from URL
|
|
406
363
|
// POST https://api.fal.ai/v1/fal-ai/elevenlabs/speech-to-text/scribe-v2
|
|
407
364
|
// Docs: https://docs.fal.ai
|
|
408
|
-
const elevenlabsSpeechToTextScribeV2 =
|
|
409
|
-
return makeRequest("POST", "/fal-ai/elevenlabs/speech-to-text/scribe-v2", params, signal, undefined, runBaseURL);
|
|
410
|
-
}, {
|
|
411
|
-
schema: FalElevenlabsSpeechToTextScribeV2RequestSchema,
|
|
412
|
-
});
|
|
365
|
+
const elevenlabsSpeechToTextScribeV2 = jsonBody("POST", "/fal-ai/elevenlabs/speech-to-text/scribe-v2", FalElevenlabsSpeechToTextScribeV2RequestSchema, { base: runBaseURL });
|
|
413
366
|
// sig-ok: stylistic dotPath divergence from URL
|
|
414
367
|
// POST https://api.fal.ai/v1/fal-ai/wan/v2.7/text-to-image
|
|
415
368
|
// Docs: https://docs.fal.ai
|
|
416
|
-
const wanV2p7TextToImage =
|
|
417
|
-
return makeRequest("POST", "/fal-ai/wan/v2.7/text-to-image", params, signal, undefined, runBaseURL);
|
|
418
|
-
}, {
|
|
419
|
-
schema: FalWanV2p7TextToImageRequestSchema,
|
|
420
|
-
});
|
|
369
|
+
const wanV2p7TextToImage = jsonBody("POST", "/fal-ai/wan/v2.7/text-to-image", FalWanV2p7TextToImageRequestSchema, { base: runBaseURL });
|
|
421
370
|
// sig-ok: stylistic dotPath divergence from URL
|
|
422
371
|
// POST https://api.fal.ai/v1/fal-ai/wan/v2.7/edit
|
|
423
372
|
// Docs: https://docs.fal.ai
|
|
424
|
-
const wanV2p7Edit =
|
|
425
|
-
return makeRequest("POST", "/fal-ai/wan/v2.7/edit", params, signal, undefined, runBaseURL);
|
|
426
|
-
}, {
|
|
427
|
-
schema: FalWanV2p7EditRequestSchema,
|
|
428
|
-
});
|
|
373
|
+
const wanV2p7Edit = jsonBody("POST", "/fal-ai/wan/v2.7/edit", FalWanV2p7EditRequestSchema, { base: runBaseURL });
|
|
429
374
|
// sig-ok: stylistic dotPath divergence from URL
|
|
430
375
|
// POST https://api.fal.ai/v1/fal-ai/wan/v2.7/pro/text-to-image
|
|
431
376
|
// Docs: https://docs.fal.ai
|
|
432
|
-
const wanV2p7ProTextToImage =
|
|
433
|
-
return makeRequest("POST", "/fal-ai/wan/v2.7/pro/text-to-image", params, signal, undefined, runBaseURL);
|
|
434
|
-
}, {
|
|
435
|
-
schema: FalWanV2p7TextToImageRequestSchema,
|
|
436
|
-
});
|
|
377
|
+
const wanV2p7ProTextToImage = jsonBody("POST", "/fal-ai/wan/v2.7/pro/text-to-image", FalWanV2p7TextToImageRequestSchema, { base: runBaseURL });
|
|
437
378
|
// sig-ok: stylistic dotPath divergence from URL
|
|
438
379
|
// POST https://api.fal.ai/v1/fal-ai/wan/v2.7/pro/edit
|
|
439
380
|
// Docs: https://docs.fal.ai
|
|
440
|
-
const wanV2p7ProEdit =
|
|
441
|
-
return makeRequest("POST", "/fal-ai/wan/v2.7/pro/edit", params, signal, undefined, runBaseURL);
|
|
442
|
-
}, {
|
|
443
|
-
schema: FalWanV2p7EditRequestSchema,
|
|
444
|
-
});
|
|
381
|
+
const wanV2p7ProEdit = jsonBody("POST", "/fal-ai/wan/v2.7/pro/edit", FalWanV2p7EditRequestSchema, { base: runBaseURL });
|
|
445
382
|
// sig-ok: stylistic dotPath divergence from URL
|
|
446
383
|
// POST https://api.fal.ai/v1/fal-ai/wan/v2.7/text-to-video
|
|
447
384
|
// Docs: https://docs.fal.ai
|
|
448
|
-
const wanV2p7TextToVideo =
|
|
449
|
-
return makeRequest("POST", "/fal-ai/wan/v2.7/text-to-video", params, signal, undefined, runBaseURL);
|
|
450
|
-
}, {
|
|
451
|
-
schema: FalWanV2p7TextToVideoRequestSchema,
|
|
452
|
-
});
|
|
385
|
+
const wanV2p7TextToVideo = jsonBody("POST", "/fal-ai/wan/v2.7/text-to-video", FalWanV2p7TextToVideoRequestSchema, { base: runBaseURL });
|
|
453
386
|
// sig-ok: stylistic dotPath divergence from URL
|
|
454
387
|
// POST https://api.fal.ai/v1/fal-ai/wan/v2.7/image-to-video
|
|
455
388
|
// Docs: https://docs.fal.ai
|
|
456
|
-
const wanV2p7ImageToVideo =
|
|
457
|
-
return makeRequest("POST", "/fal-ai/wan/v2.7/image-to-video", params, signal, undefined, runBaseURL);
|
|
458
|
-
}, {
|
|
459
|
-
schema: FalWanV2p7ImageToVideoRequestSchema,
|
|
460
|
-
});
|
|
389
|
+
const wanV2p7ImageToVideo = jsonBody("POST", "/fal-ai/wan/v2.7/image-to-video", FalWanV2p7ImageToVideoRequestSchema, { base: runBaseURL });
|
|
461
390
|
// sig-ok: stylistic dotPath divergence from URL
|
|
462
391
|
// POST https://api.fal.ai/v1/fal-ai/wan/v2.7/reference-to-video
|
|
463
392
|
// Docs: https://docs.fal.ai
|
|
464
|
-
const wanV2p7ReferenceToVideo =
|
|
465
|
-
return makeRequest("POST", "/fal-ai/wan/v2.7/reference-to-video", params, signal, undefined, runBaseURL);
|
|
466
|
-
}, {
|
|
467
|
-
schema: FalWanV2p7ReferenceToVideoRequestSchema,
|
|
468
|
-
});
|
|
393
|
+
const wanV2p7ReferenceToVideo = jsonBody("POST", "/fal-ai/wan/v2.7/reference-to-video", FalWanV2p7ReferenceToVideoRequestSchema, { base: runBaseURL });
|
|
469
394
|
// sig-ok: stylistic dotPath divergence from URL
|
|
470
395
|
// POST https://api.fal.ai/v1/fal-ai/wan/v2.7/edit-video
|
|
471
396
|
// Docs: https://docs.fal.ai
|
|
472
|
-
const wanV2p7EditVideo =
|
|
473
|
-
|
|
474
|
-
}, {
|
|
475
|
-
schema: FalWanV2p7EditVideoRequestSchema,
|
|
397
|
+
const wanV2p7EditVideo = jsonBody("POST", "/fal-ai/wan/v2.7/edit-video", FalWanV2p7EditVideoRequestSchema, {
|
|
398
|
+
base: runBaseURL,
|
|
476
399
|
});
|
|
477
400
|
// sig-ok: stylistic dotPath divergence from URL
|
|
478
401
|
// POST https://api.fal.ai/v1/xai/grok-imagine-image/edit
|
|
479
402
|
// Docs: https://docs.fal.ai
|
|
480
|
-
const xaiGrokImagineImageEdit =
|
|
481
|
-
return makeRequest("POST", "/xai/grok-imagine-image/edit", params, signal, undefined, runBaseURL);
|
|
482
|
-
}, {
|
|
483
|
-
schema: FalXaiGrokImagineImageEditRequestSchema,
|
|
484
|
-
});
|
|
403
|
+
const xaiGrokImagineImageEdit = jsonBody("POST", "/xai/grok-imagine-image/edit", FalXaiGrokImagineImageEditRequestSchema, { base: runBaseURL });
|
|
485
404
|
// sig-ok: stylistic dotPath divergence from URL
|
|
486
405
|
// POST https://api.fal.ai/v1/fal-ai/sora-2/text-to-video
|
|
487
406
|
// Docs: https://docs.fal.ai
|
|
488
|
-
const sora2TextToVideo =
|
|
489
|
-
|
|
490
|
-
}, {
|
|
491
|
-
schema: FalSora2TextToVideoRequestSchema,
|
|
407
|
+
const sora2TextToVideo = jsonBody("POST", "/fal-ai/sora-2/text-to-video", FalSora2TextToVideoRequestSchema, {
|
|
408
|
+
base: runBaseURL,
|
|
492
409
|
});
|
|
493
410
|
// sig-ok: stylistic dotPath divergence from URL
|
|
494
411
|
// POST https://api.fal.ai/v1/fal-ai/sora-2/image-to-video
|
|
495
412
|
// Docs: https://docs.fal.ai
|
|
496
|
-
const sora2ImageToVideo =
|
|
497
|
-
return makeRequest("POST", "/fal-ai/sora-2/image-to-video", params, signal, undefined, runBaseURL);
|
|
498
|
-
}, {
|
|
499
|
-
schema: FalSora2ImageToVideoRequestSchema,
|
|
500
|
-
});
|
|
413
|
+
const sora2ImageToVideo = jsonBody("POST", "/fal-ai/sora-2/image-to-video", FalSora2ImageToVideoRequestSchema, { base: runBaseURL });
|
|
501
414
|
// sig-ok: stylistic dotPath divergence from URL
|
|
502
415
|
// POST https://api.fal.ai/v1/fal-ai/hunyuan-image/v3/instruct/edit
|
|
503
416
|
// Docs: https://docs.fal.ai
|
|
504
|
-
const hunyuanImageV3InstructEdit =
|
|
505
|
-
return makeRequest("POST", "/fal-ai/hunyuan-image/v3/instruct/edit", params, signal, undefined, runBaseURL);
|
|
506
|
-
}, {
|
|
507
|
-
schema: FalHunyuanImageV3InstructEditRequestSchema,
|
|
508
|
-
});
|
|
417
|
+
const hunyuanImageV3InstructEdit = jsonBody("POST", "/fal-ai/hunyuan-image/v3/instruct/edit", FalHunyuanImageV3InstructEditRequestSchema, { base: runBaseURL });
|
|
509
418
|
// sig-ok: stylistic dotPath divergence from URL
|
|
510
419
|
// POST https://api.fal.ai/v1/fal-ai/kling-video/v3/pro/image-to-video
|
|
511
420
|
// Docs: https://docs.fal.ai
|
|
512
|
-
const klingVideoV3ProImageToVideo =
|
|
513
|
-
return makeRequest("POST", "/fal-ai/kling-video/v3/pro/image-to-video", params, signal, undefined, runBaseURL);
|
|
514
|
-
}, {
|
|
515
|
-
schema: FalKlingVideoV3ProImageToVideoRequestSchema,
|
|
516
|
-
});
|
|
421
|
+
const klingVideoV3ProImageToVideo = jsonBody("POST", "/fal-ai/kling-video/v3/pro/image-to-video", FalKlingVideoV3ProImageToVideoRequestSchema, { base: runBaseURL });
|
|
517
422
|
// sig-ok: stylistic dotPath divergence from URL
|
|
518
423
|
// POST https://api.fal.ai/v1/fal-ai/kling-video/v3/pro/text-to-video
|
|
519
424
|
// Docs: https://docs.fal.ai
|
|
520
|
-
const klingVideoV3ProTextToVideo =
|
|
521
|
-
return makeRequest("POST", "/fal-ai/kling-video/v3/pro/text-to-video", params, signal, undefined, runBaseURL);
|
|
522
|
-
}, {
|
|
523
|
-
schema: FalKlingVideoV3ProTextToVideoRequestSchema,
|
|
524
|
-
});
|
|
425
|
+
const klingVideoV3ProTextToVideo = jsonBody("POST", "/fal-ai/kling-video/v3/pro/text-to-video", FalKlingVideoV3ProTextToVideoRequestSchema, { base: runBaseURL });
|
|
525
426
|
// sig-ok: stylistic dotPath divergence from URL
|
|
526
427
|
// POST https://api.fal.ai/v1/fal-ai/kling-video/v3/standard/image-to-video
|
|
527
428
|
// Docs: https://docs.fal.ai
|
|
528
|
-
const klingVideoV3StandardImageToVideo =
|
|
529
|
-
return makeRequest("POST", "/fal-ai/kling-video/v3/standard/image-to-video", params, signal, undefined, runBaseURL);
|
|
530
|
-
}, {
|
|
531
|
-
schema: FalKlingVideoV3StandardImageToVideoRequestSchema,
|
|
532
|
-
});
|
|
429
|
+
const klingVideoV3StandardImageToVideo = jsonBody("POST", "/fal-ai/kling-video/v3/standard/image-to-video", FalKlingVideoV3StandardImageToVideoRequestSchema, { base: runBaseURL });
|
|
533
430
|
// sig-ok: stylistic dotPath divergence from URL
|
|
534
431
|
// POST https://api.fal.ai/v1/fal-ai/kling-video/v3/standard/text-to-video
|
|
535
432
|
// Docs: https://docs.fal.ai
|
|
536
|
-
const klingVideoV3StandardTextToVideo =
|
|
537
|
-
return makeRequest("POST", "/fal-ai/kling-video/v3/standard/text-to-video", params, signal, undefined, runBaseURL);
|
|
538
|
-
}, {
|
|
539
|
-
schema: FalKlingVideoV3StandardTextToVideoRequestSchema,
|
|
540
|
-
});
|
|
433
|
+
const klingVideoV3StandardTextToVideo = jsonBody("POST", "/fal-ai/kling-video/v3/standard/text-to-video", FalKlingVideoV3StandardTextToVideoRequestSchema, { base: runBaseURL });
|
|
541
434
|
// sig-ok: stylistic dotPath divergence from URL
|
|
542
435
|
// POST https://api.fal.ai/v1/fal-ai/kling-video/o3/4k/image-to-video
|
|
543
436
|
// Docs: https://docs.fal.ai
|
|
544
|
-
const klingVideoO3p4kImageToVideo =
|
|
545
|
-
return makeRequest("POST", "/fal-ai/kling-video/o3/4k/image-to-video", params, signal, undefined, runBaseURL);
|
|
546
|
-
}, {
|
|
547
|
-
schema: FalKlingVideoO3p4kImageToVideoRequestSchema,
|
|
548
|
-
});
|
|
437
|
+
const klingVideoO3p4kImageToVideo = jsonBody("POST", "/fal-ai/kling-video/o3/4k/image-to-video", FalKlingVideoO3p4kImageToVideoRequestSchema, { base: runBaseURL });
|
|
549
438
|
// sig-ok: stylistic dotPath divergence from URL
|
|
550
439
|
// POST https://api.fal.ai/v1/fal-ai/kling-video/o3/4k/reference-to-video
|
|
551
440
|
// Docs: https://docs.fal.ai
|
|
552
|
-
const klingVideoO3p4kReferenceToVideo =
|
|
553
|
-
return makeRequest("POST", "/fal-ai/kling-video/o3/4k/reference-to-video", params, signal, undefined, runBaseURL);
|
|
554
|
-
}, {
|
|
555
|
-
schema: FalKlingVideoO3p4kReferenceToVideoRequestSchema,
|
|
556
|
-
});
|
|
441
|
+
const klingVideoO3p4kReferenceToVideo = jsonBody("POST", "/fal-ai/kling-video/o3/4k/reference-to-video", FalKlingVideoO3p4kReferenceToVideoRequestSchema, { base: runBaseURL });
|
|
557
442
|
// sig-ok: stylistic dotPath divergence from URL
|
|
558
443
|
// POST https://api.fal.ai/v1/fal-ai/kling-video/o3/4k/text-to-video
|
|
559
444
|
// Docs: https://docs.fal.ai
|
|
560
|
-
const klingVideoO3p4kTextToVideo =
|
|
561
|
-
return makeRequest("POST", "/fal-ai/kling-video/o3/4k/text-to-video", params, signal, undefined, runBaseURL);
|
|
562
|
-
}, {
|
|
563
|
-
schema: FalKlingVideoO3p4kTextToVideoRequestSchema,
|
|
564
|
-
});
|
|
445
|
+
const klingVideoO3p4kTextToVideo = jsonBody("POST", "/fal-ai/kling-video/o3/4k/text-to-video", FalKlingVideoO3p4kTextToVideoRequestSchema, { base: runBaseURL });
|
|
565
446
|
// sig-ok: stylistic dotPath divergence from URL
|
|
566
447
|
// POST https://api.fal.ai/v1/fal-ai/veo3.1
|
|
567
448
|
// Docs: https://docs.fal.ai
|
|
568
|
-
const veo3p1TextToVideo =
|
|
569
|
-
|
|
570
|
-
}, {
|
|
571
|
-
schema: FalVeo3p1TextToVideoRequestSchema,
|
|
449
|
+
const veo3p1TextToVideo = jsonBody("POST", "/fal-ai/veo3.1", FalVeo3p1TextToVideoRequestSchema, {
|
|
450
|
+
base: runBaseURL,
|
|
572
451
|
});
|
|
573
452
|
// sig-ok: stylistic dotPath divergence from URL
|
|
574
453
|
// POST https://api.fal.ai/v1/fal-ai/veo3.1/image-to-video
|
|
575
454
|
// Docs: https://docs.fal.ai
|
|
576
|
-
const veo3p1ImageToVideo =
|
|
577
|
-
return makeRequest("POST", "/fal-ai/veo3.1/image-to-video", params, signal, undefined, runBaseURL);
|
|
578
|
-
}, {
|
|
579
|
-
schema: FalVeo3p1ImageToVideoRequestSchema,
|
|
580
|
-
});
|
|
455
|
+
const veo3p1ImageToVideo = jsonBody("POST", "/fal-ai/veo3.1/image-to-video", FalVeo3p1ImageToVideoRequestSchema, { base: runBaseURL });
|
|
581
456
|
// sig-ok: stylistic dotPath divergence from URL
|
|
582
457
|
// POST https://api.fal.ai/v1/xai/grok-imagine-video/image-to-video
|
|
583
458
|
// Docs: https://docs.fal.ai
|
|
584
|
-
const xaiGrokImagineVideoImageToVideo =
|
|
585
|
-
return makeRequest("POST", "/xai/grok-imagine-video/image-to-video", params, signal, undefined, runBaseURL);
|
|
586
|
-
}, {
|
|
587
|
-
schema: FalXaiGrokImagineVideoImageToVideoRequestSchema,
|
|
588
|
-
});
|
|
459
|
+
const xaiGrokImagineVideoImageToVideo = jsonBody("POST", "/xai/grok-imagine-video/image-to-video", FalXaiGrokImagineVideoImageToVideoRequestSchema, { base: runBaseURL });
|
|
589
460
|
// sig-ok: stylistic dotPath divergence from URL
|
|
590
461
|
// POST https://api.fal.ai/v1/xai/grok-imagine-video/reference-to-video
|
|
591
462
|
// Docs: https://docs.fal.ai
|
|
592
|
-
const xaiGrokImagineVideoReferenceToVideo =
|
|
593
|
-
return makeRequest("POST", "/xai/grok-imagine-video/reference-to-video", params, signal, undefined, runBaseURL);
|
|
594
|
-
}, {
|
|
595
|
-
schema: FalXaiGrokImagineVideoReferenceToVideoRequestSchema,
|
|
596
|
-
});
|
|
463
|
+
const xaiGrokImagineVideoReferenceToVideo = jsonBody("POST", "/xai/grok-imagine-video/reference-to-video", FalXaiGrokImagineVideoReferenceToVideoRequestSchema, { base: runBaseURL });
|
|
597
464
|
// sig-ok: stylistic dotPath divergence from URL
|
|
598
465
|
// POST https://api.fal.ai/v1/xai/grok-imagine-video/extend-video
|
|
599
466
|
// Docs: https://docs.fal.ai
|
|
600
|
-
const xaiGrokImagineVideoExtendVideo =
|
|
601
|
-
return makeRequest("POST", "/xai/grok-imagine-video/extend-video", params, signal, undefined, runBaseURL);
|
|
602
|
-
}, {
|
|
603
|
-
schema: FalXaiGrokImagineVideoExtendVideoRequestSchema,
|
|
604
|
-
});
|
|
467
|
+
const xaiGrokImagineVideoExtendVideo = jsonBody("POST", "/xai/grok-imagine-video/extend-video", FalXaiGrokImagineVideoExtendVideoRequestSchema, { base: runBaseURL });
|
|
605
468
|
// sig-ok: stylistic dotPath divergence from URL
|
|
606
469
|
// POST https://api.fal.ai/v1/xai/grok-imagine-video/edit-video
|
|
607
470
|
// Docs: https://docs.fal.ai
|
|
608
|
-
const xaiGrokImagineVideoEditVideo =
|
|
609
|
-
return makeRequest("POST", "/xai/grok-imagine-video/edit-video", params, signal, undefined, runBaseURL);
|
|
610
|
-
}, {
|
|
611
|
-
schema: FalXaiGrokImagineVideoEditVideoRequestSchema,
|
|
612
|
-
});
|
|
471
|
+
const xaiGrokImagineVideoEditVideo = jsonBody("POST", "/xai/grok-imagine-video/edit-video", FalXaiGrokImagineVideoEditVideoRequestSchema, { base: runBaseURL });
|
|
613
472
|
// sig-ok: stylistic dotPath divergence from URL
|
|
614
473
|
// POST https://api.fal.ai/v1/xai/grok-imagine-image
|
|
615
474
|
// Docs: https://docs.fal.ai
|
|
616
|
-
const xaiGrokImagineImage = Object.assign(
|
|
617
|
-
return makeRequest("POST", "/xai/grok-imagine-image", params, signal, undefined, runBaseURL);
|
|
618
|
-
}, {
|
|
619
|
-
schema: FalXaiGrokImagineImageRequestSchema,
|
|
475
|
+
const xaiGrokImagineImage = Object.assign(jsonBody("POST", "/xai/grok-imagine-image", FalXaiGrokImagineImageRequestSchema, { base: runBaseURL }), {
|
|
620
476
|
edit: xaiGrokImagineImageEdit,
|
|
621
477
|
});
|
|
622
478
|
// sig-ok: stylistic dotPath divergence from URL
|
|
623
479
|
// POST https://api.fal.ai/v1/fal-ai/qwen-image-edit
|
|
624
480
|
// Docs: https://docs.fal.ai
|
|
625
|
-
const qwenImageEdit =
|
|
626
|
-
|
|
627
|
-
}, {
|
|
628
|
-
schema: FalQwenImageEditRequestSchema,
|
|
481
|
+
const qwenImageEdit = jsonBody("POST", "/fal-ai/qwen-image-edit", FalQwenImageEditRequestSchema, {
|
|
482
|
+
base: runBaseURL,
|
|
629
483
|
});
|
|
630
484
|
// sig-ok: stylistic dotPath divergence from URL
|
|
631
485
|
// POST https://api.fal.ai/v1/fal-ai/gpt-image-1.5/edit
|
|
632
486
|
// Docs: https://docs.fal.ai
|
|
633
|
-
const gptImage1p5Edit =
|
|
634
|
-
|
|
635
|
-
}, {
|
|
636
|
-
schema: FalGptImage1p5EditRequestSchema,
|
|
487
|
+
const gptImage1p5Edit = jsonBody("POST", "/fal-ai/gpt-image-1.5/edit", FalGptImage1p5EditRequestSchema, {
|
|
488
|
+
base: runBaseURL,
|
|
637
489
|
});
|
|
638
490
|
// sig-ok: stylistic dotPath divergence from URL
|
|
639
491
|
// POST https://api.fal.ai/v1/fal-ai/gpt-image-1.5
|
|
640
492
|
// Docs: https://docs.fal.ai
|
|
641
|
-
const gptImage1p5 = Object.assign(
|
|
642
|
-
return makeRequest("POST", "/fal-ai/gpt-image-1.5", params, signal, undefined, runBaseURL);
|
|
643
|
-
}, {
|
|
644
|
-
schema: FalGptImage1p5RequestSchema,
|
|
493
|
+
const gptImage1p5 = Object.assign(jsonBody("POST", "/fal-ai/gpt-image-1.5", FalGptImage1p5RequestSchema, { base: runBaseURL }), {
|
|
645
494
|
edit: gptImage1p5Edit,
|
|
646
495
|
});
|
|
647
496
|
// sig-ok: stylistic dotPath divergence from URL
|
|
648
497
|
// POST https://api.fal.ai/v1/fal-ai/qwen-image
|
|
649
498
|
// Docs: https://docs.fal.ai
|
|
650
|
-
const qwenImage = Object.assign(
|
|
651
|
-
return makeRequest("POST", "/fal-ai/qwen-image", params, signal, undefined, runBaseURL);
|
|
652
|
-
}, {
|
|
653
|
-
schema: FalQwenImageRequestSchema,
|
|
499
|
+
const qwenImage = Object.assign(jsonBody("POST", "/fal-ai/qwen-image", FalQwenImageRequestSchema, { base: runBaseURL }), {
|
|
654
500
|
edit: qwenImageEdit,
|
|
655
501
|
});
|
|
656
502
|
async function storageInitiateCall(path, params, signal) {
|