@howells/motif-sdk 6.0.0 → 7.0.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.
@@ -0,0 +1,1757 @@
1
+ //#region src/types.d.ts
2
+ /** ─── Model Types ─────────────────────────────────────────────── */
3
+ type AspectRatio = "auto" | "8:1" | "4:1" | "21:9" | "16:9" | "3:2" | "4:3" | "5:4" | "1:1" | "4:5" | "3:4" | "2:3" | "9:16" | "1:4" | "1:8";
4
+ type Resolution = "0.5K" | "1K" | "2K" | "4K";
5
+ type ModelType = "generation" | "utility" | "video";
6
+ /** `gif` is an animation and `svg` a vector image, on the Models that make them. */
7
+ type ImageOutputFormat = "jpeg" | "png" | "webp" | "gif" | "svg";
8
+ type ImageQuality = "auto" | "low" | "medium" | "high" | "xhigh" | "max";
9
+ interface CustomImageSize {
10
+ height: number;
11
+ width: number;
12
+ }
13
+ /** Limits an endpoint puts on an exact `{ width, height }` image size. */
14
+ interface ImageSizeBounds {
15
+ /** Largest width or height over smallest, e.g. 3 for 3:1. */
16
+ maxRatio?: number;
17
+ maxEdge?: number;
18
+ maxPixels?: number;
19
+ minEdge?: number;
20
+ minPixels?: number;
21
+ /** Both edges must be multiples of this. Motif uses 16 when absent. */
22
+ multipleOf?: number;
23
+ }
24
+ /** How the model accepts image dimensions */
25
+ type SizeMode = "aspect_ratio" | "image_size_enum" | "gpt_size" | "none";
26
+ type QualityTier = "good" | "better" | "best" | "frontier";
27
+ type SpeedTier = "fast" | "balanced" | "slow" | "very_slow" | "unknown";
28
+ type PriceTier = "budget" | "standard" | "premium" | "ultra" | "variable";
29
+ interface FalPricing {
30
+ checkedAt: string;
31
+ currency: "USD";
32
+ endpointId: string;
33
+ estimatedCostPerImageUsd?: number;
34
+ source: "fal-pricing-api";
35
+ unit: string;
36
+ unitPrice: number;
37
+ }
38
+ interface LeaderboardMetric {
39
+ elo: number;
40
+ rank: number;
41
+ winRate?: number;
42
+ }
43
+ interface ModelBenchmark {
44
+ artificialAnalysis?: {
45
+ editing?: LeaderboardMetric;
46
+ sourceUrls: string[];
47
+ snapshotDate: string;
48
+ textToImage?: LeaderboardMetric;
49
+ };
50
+ speed?: {
51
+ medianSeconds?: number;
52
+ p95Seconds?: number;
53
+ source: "artificial-analysis-models";
54
+ };
55
+ tiers?: {
56
+ price: PriceTier;
57
+ quality: QualityTier;
58
+ speed: SpeedTier;
59
+ };
60
+ useCase?: string;
61
+ }
62
+ interface ModelConfig {
63
+ benchmark?: ModelBenchmark;
64
+ /**
65
+ * The fal endpoint's `image_size` also takes an exact `{ width, height }`,
66
+ * within these limits read from fal's OpenAPI schema. Absent means only the
67
+ * named presets are sent. Only meaningful with `sizeMode: "image_size_enum"`.
68
+ */
69
+ customImageSize?: ImageSizeBounds;
70
+ /** Explicit fal streaming support for generation and edit routes. */
71
+ streaming?: {
72
+ generation: boolean;
73
+ edit: boolean;
74
+ };
75
+ editEndpoint?: string;
76
+ editImagesField?: "image_urls" | "image_url";
77
+ endpoint: string;
78
+ falPricing?: FalPricing;
79
+ maxReferenceImages?: number;
80
+ name: string;
81
+ pricing: string;
82
+ /** Null means token-metered with no per-image estimate. */
83
+ pricePerImageUsd?: number | null;
84
+ /** How this model accepts dimensions (default: "aspect_ratio") */
85
+ sizeMode?: SizeMode;
86
+ supportsAspect: boolean;
87
+ /**
88
+ * The aspect ratios fal's `aspect_ratio` enum accepts, where it is narrower
89
+ * than `ASPECT_RATIOS`. Absent means every ratio is accepted.
90
+ */
91
+ supportedAspects?: readonly AspectRatio[];
92
+ /** The resolutions fal's `resolution` enum accepts, where it is narrower than `RESOLUTIONS`. */
93
+ supportedResolutions?: readonly Resolution[];
94
+ supportsBackground?: boolean;
95
+ supportsEdit: boolean;
96
+ supportsExpandPrompt?: boolean;
97
+ supportsGuidanceScale?: boolean;
98
+ supportsGoogleSearch?: boolean;
99
+ supportsInferenceSteps?: boolean;
100
+ supportsLimitGenerations?: boolean;
101
+ supportsMaskImage?: boolean;
102
+ maskImageField?: "mask_image_url" | "mask_url";
103
+ /**
104
+ * Takes `markup_image_url`: a transparent PNG of annotations (circles,
105
+ * arrows, notes) the size of the first edit image, guiding its edit.
106
+ */
107
+ supportsMarkupImage?: boolean;
108
+ /**
109
+ * An edit with no aspect asked for sends `image_size: "auto"`, so the
110
+ * result keeps the edited image's shape. For Models whose fal edit
111
+ * endpoint takes `auto`.
112
+ */
113
+ autoEditSize?: boolean;
114
+ supportsNegativePrompt?: boolean;
115
+ supportsNumImages: boolean;
116
+ supportsOutputFormat?: boolean;
117
+ /** Formats the Model returns. Absent means jpeg, png and webp. */
118
+ supportedOutputFormats?: readonly ImageOutputFormat[];
119
+ /** Formats an edit returns, where they differ from `supportedOutputFormats`. */
120
+ supportedEditOutputFormats?: readonly ImageOutputFormat[];
121
+ supportsQuality?: boolean;
122
+ /** Default matching the quality variant used in this Model's ranking. */
123
+ defaultQuality?: ImageQuality;
124
+ supportedQualities?: readonly ImageQuality[];
125
+ supportsRenderingSpeed?: boolean;
126
+ supportsResolution: boolean;
127
+ supportsSafetyTolerance?: boolean;
128
+ supportsSafetyChecker?: boolean;
129
+ supportsSeed?: boolean;
130
+ supportsSyncMode?: boolean;
131
+ supportsThinkingLevel?: boolean;
132
+ supportsWebSearch?: boolean;
133
+ /**
134
+ * The endpoint only makes transparent images and takes no `background`
135
+ * parameter (Ideogram V3 Transparent). Every output has an alpha channel.
136
+ */
137
+ transparentOutput?: boolean;
138
+ type: ModelType;
139
+ /** Use fal queue submit/status/result even for generate() calls. */
140
+ useQueue?: boolean;
141
+ }
142
+ //#endregion
143
+ //#region src/aspects.d.ts
144
+ /** Pixel sizes of fal's named `image_size` presets. `auto` has none. */
145
+ export declare const FAL_PRESET_SIZES: Readonly<Record<string, CustomImageSize>>;
146
+ //#endregion
147
+ //#region src/cost.d.ts
148
+ /**
149
+ * Estimate cost based on model and settings. `editImages` is the number of
150
+ * input images on an edit, for Models whose edits cost more than generation.
151
+ */
152
+ export declare function estimateCost(model: string, resolution?: Resolution, numImages?: number, editImages?: number): number | null;
153
+ //#endregion
154
+ //#region src/models.d.ts
155
+ export declare const MODELS: Record<string, ModelConfig>;
156
+ //#endregion
157
+ //#region src/tool-types.d.ts
158
+ type FalToolInputKind = "image" | "images" | "video";
159
+ /**
160
+ * Machine-readable cost, so `--dry-run` can emit a number rather than the
161
+ * prose in `pricing`. Required on every entry: a missing price is what makes
162
+ * an agent unable to budget across a registry spanning $0.001 to $0.48.
163
+ */
164
+ type FalToolPrice = {
165
+ kind: "call";
166
+ usd: number;
167
+ /** `usd` is per output image, multiplied by the body's `num_images`. */
168
+ perImage?: true;
169
+ /**
170
+ * USD added when the request body sets a boolean key true, for options
171
+ * fal bills on top of the call, such as rigging a mesh.
172
+ */
173
+ extras?: Readonly<Record<string, number>>;
174
+ /**
175
+ * Body keys `usd` is multiplied by: an array by its length, a number by
176
+ * its value, an absent key by 1. Smart Resize bills each target size.
177
+ */
178
+ per?: readonly string[];
179
+ /** USD added once per request, such as a vision analysis fee. */
180
+ fee?: number;
181
+ /** Multipliers by a body key's value: `{ resolution: { "4K": 2 } }`. */
182
+ multipliers?: Readonly<Record<string, Readonly<Record<string, number>>>>;
183
+ } | {
184
+ kind: "megapixel";
185
+ usd: number;
186
+ } |
187
+ /**
188
+ * `usd` for every started `megapixels` of each output, at least one step:
189
+ * Topaz bills $0.08 for any output up to 24MP, not $0.08/24 per megapixel.
190
+ */
191
+ {
192
+ kind: "megapixel-step";
193
+ megapixels: number;
194
+ usd: number;
195
+ } |
196
+ /**
197
+ * FLUX.2 pricing: `first` for the first megapixel of output, then `extra`
198
+ * for every further megapixel of input and output, each rounded up.
199
+ */
200
+ {
201
+ kind: "megapixel-first";
202
+ extra: number;
203
+ first: number;
204
+ } |
205
+ /**
206
+ * PBR material maps: `base` per request, `perMegapixel` per megapixel of
207
+ * the material, `perMapMegapixel` per megapixel of each map, and an
208
+ * `upscale` surcharge per pre-upscale megapixel per map, keyed by factor.
209
+ */
210
+ {
211
+ kind: "maps";
212
+ base: number;
213
+ perMapMegapixel: number;
214
+ perMegapixel: number;
215
+ upscale?: Readonly<Record<string, number>>;
216
+ } |
217
+ /** Per second of source video; per compute-second when the input is not a video. */
218
+ {
219
+ kind: "second";
220
+ usd: number;
221
+ } |
222
+ /**
223
+ * Per second of output video, tiered by the output's shorter side:
224
+ * `tiers` in ascending `upTo` lines, the last with no `upTo`. Doubled at
225
+ * `doubleAtFps` or above, halved when the body's `model` is `halfWithModel`.
226
+ */
227
+ {
228
+ kind: "video-second";
229
+ doubleAtFps?: number;
230
+ halfWithModel?: string;
231
+ tiers: readonly {
232
+ upTo?: number;
233
+ usd: number;
234
+ }[];
235
+ } |
236
+ /** `usd` for every started `frames` frames of source video. */
237
+ {
238
+ kind: "frames";
239
+ frames: number;
240
+ usd: number;
241
+ } |
242
+ /**
243
+ * Per million input and output tokens. fal bills the tokens a run used,
244
+ * so a projection needs `inputTokens` and `outputTokens` estimates.
245
+ */
246
+ {
247
+ kind: "token";
248
+ inputPerMillion: number;
249
+ inputTokens: number;
250
+ outputPerMillion: number;
251
+ outputTokens: number;
252
+ } | {
253
+ kind: "metered";
254
+ };
255
+ interface FalToolConfig {
256
+ category: "3d" | "analysis" | "background" | "depth" | "erase" | "layers" | "material" | "moderation" | "preprocess" | "reframe" | "relight" | "restoration" | "restyle" | "segmentation" | "try-on" | "upscale" | "vector";
257
+ defaultOptions?: Record<string, unknown>;
258
+ description: string;
259
+ endpoint: string;
260
+ inputField: "content_image_url" | "image_url" | "image_urls" | "input_image_url" | "input_image_urls" | "person_image_url" | "video_url";
261
+ inputKind: FalToolInputKind;
262
+ name: string;
263
+ outputKeys: string[];
264
+ /**
265
+ * Names for the positions of an array-valued output. Used to name downloaded
266
+ * files: without it a PBR set lands as images-2.png, images-3.png and the
267
+ * caller cannot tell a roughness map from a normal map.
268
+ *
269
+ * Two rule shapes, because the names come from two different places.
270
+ *
271
+ * Request-driven: `fromOption` names the request option that actually
272
+ * determines the order — read the resolved request body first and use its
273
+ * value when present, since a caller may reorder or subset it. `fallback` is
274
+ * the endpoint's schema default, used when the option is absent.
275
+ *
276
+ * Response-driven: `fromItem` reads the name off each element of the output
277
+ * array itself, for endpoints that label what they produced (seedream's
278
+ * layer stack names every layer). `nameField` holds the name and
279
+ * `orderField`, when set, holds a non-negative integer that prefixes it so
280
+ * the files sort in stack order. These strings come from a model, so the
281
+ * consumer slugifies them into a filename and keeps positional naming when
282
+ * nothing usable survives.
283
+ *
284
+ * Whichever is used, check the label count against the URL count before
285
+ * applying it: a mislabelled map is worse than a positional one, because it
286
+ * reads as authoritative.
287
+ *
288
+ * Only set this where the order or the naming is actually determined — by a
289
+ * request option, by the schema, or by the response. Leave genuinely
290
+ * unordered, unnamed arrays unlabelled.
291
+ */
292
+ outputLabels?: Record<string, {
293
+ fallback: readonly string[];
294
+ fromOption?: string;
295
+ } | {
296
+ fromItem: {
297
+ nameField: string;
298
+ orderField?: string;
299
+ };
300
+ }>;
301
+ price: FalToolPrice;
302
+ pricing: string;
303
+ /**
304
+ * Body key for the one Reference the tool takes beside its Source: the style
305
+ * a restyle copies, the garment in a try-on. Absent on tools that take none.
306
+ */
307
+ referenceField?: "product_image_url" | "style_image_url";
308
+ /**
309
+ * Endpoint routinely exceeds the 120s sync timeout; callers should use the
310
+ * queue path.
311
+ */
312
+ queued?: true;
313
+ sourceUrl: string;
314
+ task: string;
315
+ }
316
+ //#endregion
317
+ //#region src/tools.d.ts
318
+ export declare const FAL_TOOLS: {
319
+ readonly "got-ocr": {
320
+ readonly category: "analysis";
321
+ readonly description: "Transcribe text from one or more images, optionally as formatted multi-page output.";
322
+ readonly endpoint: "fal-ai/got-ocr/v2";
323
+ readonly inputField: "input_image_urls";
324
+ readonly inputKind: "images";
325
+ readonly name: "GOT-OCR 2.0";
326
+ readonly outputKeys: ["outputs"];
327
+ readonly price: {
328
+ readonly kind: "call";
329
+ readonly per: readonly ["input_image_urls"];
330
+ readonly usd: 0.05;
331
+ };
332
+ readonly pricing: "$0.05/image";
333
+ readonly queued: true;
334
+ readonly sourceUrl: "https://fal.ai/models/fal-ai/got-ocr/v2";
335
+ readonly task: "optical character recognition";
336
+ };
337
+ readonly "moondream-caption": {
338
+ readonly category: "analysis";
339
+ readonly description: "Write a short, normal, or long caption for an image.";
340
+ readonly endpoint: "fal-ai/moondream3-preview/caption";
341
+ readonly inputField: "image_url";
342
+ readonly inputKind: "image";
343
+ readonly name: "Moondream 3 Caption";
344
+ readonly outputKeys: ["output"];
345
+ readonly price: {
346
+ readonly inputPerMillion: 0.4;
347
+ readonly inputTokens: 737;
348
+ readonly kind: "token";
349
+ readonly outputPerMillion: 3.5;
350
+ readonly outputTokens: 200;
351
+ };
352
+ readonly pricing: "$0.40/M input tokens, $3.50/M output tokens";
353
+ readonly sourceUrl: "https://fal.ai/models/fal-ai/moondream3-preview/caption";
354
+ readonly task: "image captioning";
355
+ };
356
+ readonly "moondream-detect": {
357
+ readonly category: "analysis";
358
+ readonly description: "Detect prompted objects and return their bounding boxes, with an optional preview.";
359
+ readonly endpoint: "fal-ai/moondream3-preview/detect";
360
+ readonly inputField: "image_url";
361
+ readonly inputKind: "image";
362
+ readonly name: "Moondream 3 Detect";
363
+ readonly outputKeys: ["objects", "image"];
364
+ readonly price: {
365
+ readonly inputPerMillion: 0.4;
366
+ readonly inputTokens: 737;
367
+ readonly kind: "token";
368
+ readonly outputPerMillion: 3.5;
369
+ readonly outputTokens: 100;
370
+ };
371
+ readonly pricing: "$0.40/M input tokens, $3.50/M output tokens";
372
+ readonly sourceUrl: "https://fal.ai/models/fal-ai/moondream3-preview/detect";
373
+ readonly task: "object detection";
374
+ };
375
+ readonly "moondream-point": {
376
+ readonly category: "analysis";
377
+ readonly description: "Return point coordinates for every instance of a prompted subject.";
378
+ readonly endpoint: "fal-ai/moondream3-preview/point";
379
+ readonly inputField: "image_url";
380
+ readonly inputKind: "image";
381
+ readonly name: "Moondream 3 Point";
382
+ readonly outputKeys: ["points", "image"];
383
+ readonly price: {
384
+ readonly inputPerMillion: 0.4;
385
+ readonly inputTokens: 737;
386
+ readonly kind: "token";
387
+ readonly outputPerMillion: 3.5;
388
+ readonly outputTokens: 100;
389
+ };
390
+ readonly pricing: "$0.40/M input tokens, $3.50/M output tokens";
391
+ readonly sourceUrl: "https://fal.ai/models/fal-ai/moondream3-preview/point";
392
+ readonly task: "object pointing";
393
+ };
394
+ readonly "moondream-query": {
395
+ readonly category: "analysis";
396
+ readonly description: "Answer a free-form question about an image, with reasoning.";
397
+ readonly endpoint: "fal-ai/moondream3-preview/query";
398
+ readonly inputField: "image_url";
399
+ readonly inputKind: "image";
400
+ readonly name: "Moondream 3 Query";
401
+ readonly outputKeys: ["output", "reasoning"];
402
+ readonly price: {
403
+ readonly inputPerMillion: 0.4;
404
+ readonly inputTokens: 737;
405
+ readonly kind: "token";
406
+ readonly outputPerMillion: 3.5;
407
+ readonly outputTokens: 500;
408
+ };
409
+ readonly pricing: "$0.40/M input tokens, $3.50/M output tokens";
410
+ readonly sourceUrl: "https://fal.ai/models/fal-ai/moondream3-preview/query";
411
+ readonly task: "visual question answering";
412
+ };
413
+ readonly nsfw: {
414
+ readonly category: "moderation";
415
+ readonly description: "Predict whether one or more images contain NSFW concepts.";
416
+ readonly endpoint: "fal-ai/x-ailab/nsfw";
417
+ readonly inputField: "image_urls";
418
+ readonly inputKind: "images";
419
+ readonly name: "NSFW Checker";
420
+ readonly outputKeys: ["has_nsfw_concepts"];
421
+ readonly price: {
422
+ readonly kind: "call";
423
+ readonly per: readonly ["image_urls"];
424
+ readonly usd: 0.001;
425
+ };
426
+ readonly pricing: "$0.001/image";
427
+ readonly sourceUrl: "https://fal.ai/models/fal-ai/x-ailab/nsfw";
428
+ readonly task: "vision moderation";
429
+ };
430
+ readonly "hunyuan3d-v3": {
431
+ readonly category: "3d";
432
+ readonly description: "Reconstruct a textured 3D mesh from a single image, with optional multi-view inputs.";
433
+ readonly endpoint: "fal-ai/hunyuan3d-v3/image-to-3d";
434
+ readonly inputField: "input_image_url";
435
+ readonly inputKind: "image";
436
+ readonly name: "Hunyuan3D v3 Image to 3D";
437
+ readonly outputKeys: ["model_glb", "model_urls", "thumbnail"];
438
+ readonly price: {
439
+ readonly kind: "call";
440
+ readonly usd: 0.375;
441
+ };
442
+ readonly pricing: "$0.375/generation at the default Normal type; $0.45 low poly, $0.225 geometry only, and $0.15 each for PBR, multi-view, or a custom face count";
443
+ readonly queued: true;
444
+ readonly sourceUrl: "https://fal.ai/models/fal-ai/hunyuan3d-v3/image-to-3d";
445
+ readonly task: "single-image 3D reconstruction";
446
+ };
447
+ readonly "ideogram-layerize-text": {
448
+ readonly category: "layers";
449
+ readonly description: "Split an image into background image layers plus editable HTML text containers.";
450
+ readonly endpoint: "fal-ai/ideogram/v3/layerize-text";
451
+ readonly inputField: "image_url";
452
+ readonly inputKind: "image";
453
+ readonly name: "Ideogram v3 Text Layerize";
454
+ readonly outputKeys: ["image_layers", "image", "text_html", "text_containers"];
455
+ readonly price: {
456
+ readonly kind: "call";
457
+ readonly usd: 0.09;
458
+ };
459
+ readonly pricing: "$0.09/image";
460
+ readonly queued: true;
461
+ readonly sourceUrl: "https://fal.ai/models/fal-ai/ideogram/v3/layerize-text";
462
+ readonly task: "text and image layer extraction";
463
+ };
464
+ readonly "ideogram-tiling": {
465
+ readonly category: "material";
466
+ readonly description: "Generate a seamlessly tiling texture, optionally conditioned on a source image.";
467
+ readonly endpoint: "ideogram/v4/tiling";
468
+ readonly inputField: "image_url";
469
+ readonly inputKind: "image";
470
+ readonly name: "Ideogram v4 Tiling";
471
+ readonly outputKeys: ["images"];
472
+ readonly price: {
473
+ readonly kind: "megapixel";
474
+ readonly usd: 0.06;
475
+ };
476
+ readonly pricing: "$0.06/megapixel at the default BALANCED speed; $0.03 turbo, $0.10 quality";
477
+ readonly sourceUrl: "https://fal.ai/models/ideogram/v4/tiling";
478
+ readonly task: "seamless texture generation";
479
+ };
480
+ readonly image2svg: {
481
+ readonly category: "vector";
482
+ readonly description: "Trace a raster image into layered SVG paths.";
483
+ readonly endpoint: "fal-ai/image2svg";
484
+ readonly inputField: "image_url";
485
+ readonly inputKind: "image";
486
+ readonly name: "Image to SVG";
487
+ readonly outputKeys: ["images"];
488
+ readonly price: {
489
+ readonly kind: "call";
490
+ readonly usd: 0.005;
491
+ };
492
+ readonly pricing: "$0.005/image";
493
+ readonly sourceUrl: "https://fal.ai/models/fal-ai/image2svg";
494
+ readonly task: "raster to vector tracing";
495
+ };
496
+ readonly "meshy-v7": {
497
+ readonly category: "3d";
498
+ readonly description: "Make a textured 3D mesh from one image, optionally rigged for animation.";
499
+ readonly endpoint: "meshy/v7/image-to-3d";
500
+ readonly inputField: "image_url";
501
+ readonly inputKind: "image";
502
+ readonly name: "Meshy v7 Image to 3D";
503
+ readonly outputKeys: ["model_glb", "model_urls", "thumbnail", "rigged_character_glb", "rigged_character_fbx"];
504
+ readonly price: {
505
+ readonly extras: {
506
+ readonly enable_animation: 0.12;
507
+ readonly enable_rigging: 0.2;
508
+ readonly ultra_mode: 0.2;
509
+ };
510
+ readonly kind: "call";
511
+ readonly usd: 1.2;
512
+ };
513
+ readonly pricing: "$1.20/generation at the default textured model; $0.80 untextured, $1.40 ultra, plus $0.20 for rigging and $0.12 for animation";
514
+ readonly queued: true;
515
+ readonly sourceUrl: "https://fal.ai/models/meshy/v7/image-to-3d";
516
+ readonly task: "single-image 3D reconstruction";
517
+ };
518
+ readonly patina: {
519
+ readonly category: "material";
520
+ readonly description: "Decompose a surface photograph into PBR maps: basecolor, normal, roughness, metalness, height.";
521
+ readonly endpoint: "fal-ai/patina";
522
+ readonly inputField: "image_url";
523
+ readonly inputKind: "image";
524
+ readonly name: "Patina PBR Maps";
525
+ readonly outputKeys: ["images"];
526
+ readonly outputLabels: {
527
+ readonly images: {
528
+ readonly fallback: readonly ["basecolor", "normal", "roughness", "metalness", "height"];
529
+ readonly fromOption: "maps";
530
+ };
531
+ };
532
+ readonly price: {
533
+ readonly base: 0.01;
534
+ readonly kind: "maps";
535
+ readonly perMapMegapixel: 0.01;
536
+ readonly perMegapixel: 0;
537
+ };
538
+ readonly pricing: "$0.01 base plus $0.01/megapixel per output map, so all 5 maps on a 1MP image cost $0.06; the listed rate is per map";
539
+ readonly queued: true;
540
+ readonly sourceUrl: "https://fal.ai/models/fal-ai/patina";
541
+ readonly task: "PBR material decomposition";
542
+ };
543
+ readonly "patina-extract": {
544
+ readonly category: "material";
545
+ readonly description: "Extract a tiling PBR material from a prompted region of a photograph.";
546
+ readonly endpoint: "fal-ai/patina/material/extract";
547
+ readonly inputField: "image_url";
548
+ readonly inputKind: "image";
549
+ readonly name: "Patina Material Extract";
550
+ readonly outputKeys: ["images"];
551
+ readonly outputLabels: {
552
+ readonly images: {
553
+ readonly fallback: readonly ["basecolor", "normal", "roughness", "metalness", "height"];
554
+ readonly fromOption: "maps";
555
+ };
556
+ };
557
+ readonly price: {
558
+ readonly base: 0.1;
559
+ readonly kind: "maps";
560
+ readonly perMapMegapixel: 0.01;
561
+ readonly perMegapixel: 0.02;
562
+ readonly upscale: {
563
+ readonly "2": 0.004;
564
+ readonly "4": 0.016;
565
+ };
566
+ };
567
+ readonly pricing: "$0.10 plus $0.02/megapixel plus $0.01/megapixel per map, so 1MP with all 5 maps is $0.17; upscaling adds $0.004 (2x) or $0.016 (4x) per pre-upscale megapixel per map";
568
+ readonly queued: true;
569
+ readonly sourceUrl: "https://fal.ai/models/fal-ai/patina/material/extract";
570
+ readonly task: "tiling material extraction";
571
+ };
572
+ readonly "qwen-layered": {
573
+ readonly category: "layers";
574
+ readonly description: "Split an image into a configurable number of stacked RGBA layers.";
575
+ readonly endpoint: "fal-ai/qwen-image-layered";
576
+ readonly inputField: "image_url";
577
+ readonly inputKind: "image";
578
+ readonly name: "Qwen Image Layered";
579
+ readonly outputKeys: ["images"];
580
+ readonly price: {
581
+ readonly kind: "call";
582
+ readonly usd: 0.05;
583
+ };
584
+ readonly pricing: "$0.05 per image, one input image a call";
585
+ readonly queued: true;
586
+ readonly sourceUrl: "https://fal.ai/models/fal-ai/qwen-image-layered";
587
+ readonly task: "image layer decomposition";
588
+ };
589
+ readonly "recraft-vectorize": {
590
+ readonly category: "vector";
591
+ readonly description: "Convert a raster image into a clean SVG.";
592
+ readonly endpoint: "fal-ai/recraft/vectorize";
593
+ readonly inputField: "image_url";
594
+ readonly inputKind: "image";
595
+ readonly name: "Recraft Vectorize";
596
+ readonly outputKeys: ["image"];
597
+ readonly price: {
598
+ readonly kind: "call";
599
+ readonly usd: 0.04;
600
+ };
601
+ readonly pricing: "$0.04/image, $0.08 with a vector style";
602
+ readonly sourceUrl: "https://fal.ai/models/fal-ai/recraft/vectorize";
603
+ readonly task: "raster to vector conversion";
604
+ };
605
+ readonly "sam3-3d-align": {
606
+ readonly category: "3d";
607
+ readonly description: "Align SAM 3D objects and bodies into a shared scene.";
608
+ readonly endpoint: "fal-ai/sam-3/3d-align";
609
+ readonly inputField: "image_url";
610
+ readonly inputKind: "image";
611
+ readonly name: "SAM 3D Align";
612
+ readonly outputKeys: ["scene_glb", "model_glb", "visualization", "body_mesh_ply", "metadata"];
613
+ readonly price: {
614
+ readonly kind: "metered";
615
+ };
616
+ readonly pricing: "$0.02 per unit; fal does not define a unit, so no estimate is reported";
617
+ readonly queued: true;
618
+ readonly sourceUrl: "https://fal.ai/models/fal-ai/sam-3/3d-align";
619
+ readonly task: "3D scene alignment";
620
+ };
621
+ readonly "sam3-3d-body": {
622
+ readonly category: "3d";
623
+ readonly defaultOptions: {
624
+ readonly export_meshes: true;
625
+ readonly include_3d_keypoints: true;
626
+ readonly include_mhr_params: true;
627
+ };
628
+ readonly description: "Reconstruct human body meshes and keypoints from a single image.";
629
+ readonly endpoint: "fal-ai/sam-3/3d-body";
630
+ readonly inputField: "image_url";
631
+ readonly inputKind: "image";
632
+ readonly name: "SAM 3D Body";
633
+ readonly outputKeys: ["model_glb", "visualization", "meshes", "metadata"];
634
+ readonly price: {
635
+ readonly kind: "metered";
636
+ };
637
+ readonly pricing: "$0.02 per unit; fal does not define a unit, so no estimate is reported";
638
+ readonly queued: true;
639
+ readonly sourceUrl: "https://fal.ai/models/fal-ai/sam-3/3d-body";
640
+ readonly task: "single-image 3D body reconstruction";
641
+ };
642
+ readonly "sam3-3d-objects": {
643
+ readonly category: "3d";
644
+ readonly description: "Reconstruct one or more 3D objects from an image and prompts.";
645
+ readonly endpoint: "fal-ai/sam-3/3d-objects";
646
+ readonly inputField: "image_url";
647
+ readonly inputKind: "image";
648
+ readonly name: "SAM 3D Objects";
649
+ readonly outputKeys: ["gaussian_splat", "model_glb", "metadata", "individual_splats", "individual_glbs", "artifacts_zip"];
650
+ readonly price: {
651
+ readonly kind: "metered";
652
+ };
653
+ readonly pricing: "$0.02 per unit; fal does not define a unit, and this endpoint returns one mesh per detected object, so no estimate is reported";
654
+ readonly queued: true;
655
+ readonly sourceUrl: "https://fal.ai/models/fal-ai/sam-3/3d-objects";
656
+ readonly task: "single-image 3D object reconstruction";
657
+ };
658
+ readonly "seedream-layerize": {
659
+ readonly category: "layers";
660
+ readonly description: "Split an image into editable Seedream layers plus flattened previews.";
661
+ readonly endpoint: "bytedance/seedream/v5/pro/layerize";
662
+ readonly inputField: "image_url";
663
+ readonly inputKind: "image";
664
+ readonly name: "Seedream v5 Pro Layerize";
665
+ readonly outputKeys: ["layers", "images"];
666
+ readonly outputLabels: {
667
+ readonly layers: {
668
+ readonly fromItem: {
669
+ readonly nameField: "name";
670
+ readonly orderField: "z_index";
671
+ };
672
+ };
673
+ };
674
+ readonly price: {
675
+ readonly kind: "metered";
676
+ };
677
+ readonly pricing: "$0.03375 per generated layer below 1536x1536 total area, $0.0675 per layer above; the listed rate is per layer, not per call";
678
+ readonly queued: true;
679
+ readonly sourceUrl: "https://fal.ai/models/bytedance/seedream/v5/pro/layerize";
680
+ readonly task: "image layer decomposition";
681
+ };
682
+ readonly "seedvr-seamless": {
683
+ readonly category: "material";
684
+ readonly description: "Upscale a tiling texture while keeping its edges seamless. ";
685
+ readonly endpoint: "fal-ai/seedvr/upscale/image/seamless";
686
+ readonly inputField: "image_url";
687
+ readonly inputKind: "image";
688
+ readonly name: "SeedVR Seamless Upscale";
689
+ readonly outputKeys: ["image"];
690
+ readonly price: {
691
+ readonly kind: "megapixel";
692
+ readonly usd: 0.0025;
693
+ };
694
+ readonly pricing: "$0.0025/megapixel";
695
+ readonly queued: true;
696
+ readonly sourceUrl: "https://fal.ai/models/fal-ai/seedvr/upscale/image/seamless";
697
+ readonly task: "seamless texture upscaling";
698
+ };
699
+ readonly "trellis-2": {
700
+ readonly category: "3d";
701
+ readonly description: "Reconstruct a textured 3D mesh from a single image, with UV unwrapping.";
702
+ readonly endpoint: "fal-ai/trellis-2";
703
+ readonly inputField: "image_url";
704
+ readonly inputKind: "image";
705
+ readonly name: "TRELLIS 2";
706
+ readonly outputKeys: ["model_glb"];
707
+ readonly price: {
708
+ readonly kind: "call";
709
+ readonly usd: 0.3;
710
+ };
711
+ readonly pricing: "$0.30 at the default 1024p; $0.25 at 512p, $0.35 at 1536p";
712
+ readonly queued: true;
713
+ readonly sourceUrl: "https://fal.ai/models/fal-ai/trellis-2";
714
+ readonly task: "single-image 3D reconstruction";
715
+ };
716
+ readonly "ben-v2": {
717
+ readonly category: "background";
718
+ readonly description: "Fast, high-quality background removal for images.";
719
+ readonly endpoint: "fal-ai/ben/v2/image";
720
+ readonly inputField: "image_url";
721
+ readonly inputKind: "image";
722
+ readonly name: "BEN v2 Background Removal";
723
+ readonly outputKeys: ["image"];
724
+ readonly price: {
725
+ readonly kind: "megapixel";
726
+ readonly usd: 0.025;
727
+ };
728
+ readonly pricing: "$0.025/megapixel";
729
+ readonly sourceUrl: "https://fal.ai/models/fal-ai/ben/v2/image";
730
+ readonly task: "image background removal";
731
+ };
732
+ readonly birefnet: {
733
+ readonly category: "background";
734
+ readonly defaultOptions: {
735
+ readonly model: "General Use (Light)";
736
+ readonly operating_resolution: "1024x1024";
737
+ readonly output_format: "png";
738
+ readonly refine_foreground: true;
739
+ };
740
+ readonly description: "High-resolution dichotomous image segmentation and background removal.";
741
+ readonly endpoint: "fal-ai/birefnet/v2";
742
+ readonly inputField: "image_url";
743
+ readonly inputKind: "image";
744
+ readonly name: "BirefNet Background Removal";
745
+ readonly outputKeys: ["image", "mask_image"];
746
+ readonly price: {
747
+ readonly kind: "call";
748
+ readonly usd: 0;
749
+ };
750
+ readonly pricing: "$0/compute-second listed by fal";
751
+ readonly sourceUrl: "https://fal.ai/models/fal-ai/birefnet/v2";
752
+ readonly task: "image background removal";
753
+ };
754
+ readonly "bria-rmbg": {
755
+ readonly category: "background";
756
+ readonly description: "Commercial-safe background removal for images.";
757
+ readonly endpoint: "fal-ai/bria/background/remove";
758
+ readonly inputField: "image_url";
759
+ readonly inputKind: "image";
760
+ readonly name: "Bria RMBG 2.0";
761
+ readonly outputKeys: ["image"];
762
+ readonly price: {
763
+ readonly kind: "call";
764
+ readonly usd: 0.018;
765
+ };
766
+ readonly pricing: "$0.018/generation";
767
+ readonly sourceUrl: "https://fal.ai/models/fal-ai/bria/background/remove";
768
+ readonly task: "image background removal";
769
+ };
770
+ readonly "bria-video-rmbg": {
771
+ readonly category: "background";
772
+ readonly defaultOptions: {
773
+ readonly background_color: "Black";
774
+ readonly output_container_and_codec: "webm_vp9";
775
+ readonly preserve_audio: true;
776
+ };
777
+ readonly description: "Remove video backgrounds with configurable output container.";
778
+ readonly endpoint: "bria/video/background-removal";
779
+ readonly inputField: "video_url";
780
+ readonly inputKind: "video";
781
+ readonly name: "Bria Video Background Removal";
782
+ readonly outputKeys: ["video"];
783
+ readonly price: {
784
+ readonly kind: "second";
785
+ readonly usd: 0.14;
786
+ };
787
+ readonly pricing: "$0.14/sec";
788
+ readonly queued: true;
789
+ readonly sourceUrl: "https://fal.ai/models/bria/video/background-removal";
790
+ readonly task: "video background removal";
791
+ };
792
+ readonly "bria-video-rmbg-v3": {
793
+ readonly category: "background";
794
+ readonly defaultOptions: {
795
+ readonly background_color: "Black";
796
+ readonly output_container_and_codec: "webm_vp9";
797
+ readonly preserve_audio: true;
798
+ };
799
+ readonly description: "Remove video backgrounds with Bria's VRMBG 3.0, with configurable output container.";
800
+ readonly endpoint: "bria/video/background-removal/v3";
801
+ readonly inputField: "video_url";
802
+ readonly inputKind: "video";
803
+ readonly name: "Bria Video Background Removal 3.0";
804
+ readonly outputKeys: ["video"];
805
+ readonly price: {
806
+ readonly kind: "second";
807
+ readonly usd: 0.05;
808
+ };
809
+ readonly pricing: "$0.05/sec";
810
+ readonly queued: true;
811
+ readonly sourceUrl: "https://fal.ai/models/bria/video/background-removal/v3";
812
+ readonly task: "video background removal";
813
+ };
814
+ readonly "control-light": {
815
+ readonly category: "restoration";
816
+ readonly description: "Brighten a dark or underexposed photo, recovering detail while keeping its identity, geometry and colour.";
817
+ readonly endpoint: "fal-ai/control-light";
818
+ readonly inputField: "image_url";
819
+ readonly inputKind: "image";
820
+ readonly name: "Control Light";
821
+ readonly outputKeys: ["images"];
822
+ readonly price: {
823
+ readonly kind: "megapixel";
824
+ readonly usd: 0.03;
825
+ };
826
+ readonly pricing: "$0.03/megapixel";
827
+ readonly sourceUrl: "https://fal.ai/models/fal-ai/control-light";
828
+ readonly task: "low-light enhancement";
829
+ };
830
+ readonly ddcolor: {
831
+ readonly category: "restoration";
832
+ readonly description: "Colourise black-and-white photographs.";
833
+ readonly endpoint: "fal-ai/ddcolor";
834
+ readonly inputField: "image_url";
835
+ readonly inputKind: "image";
836
+ readonly name: "DDColor Colourisation";
837
+ readonly outputKeys: ["image"];
838
+ readonly price: {
839
+ readonly kind: "megapixel";
840
+ readonly usd: 0.001;
841
+ };
842
+ readonly pricing: "$0.001/megapixel";
843
+ readonly sourceUrl: "https://fal.ai/models/fal-ai/ddcolor";
844
+ readonly task: "photo colourisation";
845
+ };
846
+ readonly rembg: {
847
+ readonly category: "background";
848
+ readonly defaultOptions: {
849
+ readonly crop_to_bbox: false;
850
+ };
851
+ readonly description: "Generic image background removal utility.";
852
+ readonly endpoint: "fal-ai/imageutils/rembg";
853
+ readonly inputField: "image_url";
854
+ readonly inputKind: "image";
855
+ readonly name: "Remove Background";
856
+ readonly outputKeys: ["image"];
857
+ readonly price: {
858
+ readonly kind: "call";
859
+ readonly usd: 0;
860
+ };
861
+ readonly pricing: "$0/compute-second listed by fal";
862
+ readonly sourceUrl: "https://fal.ai/models/fal-ai/imageutils/rembg";
863
+ readonly task: "image background removal";
864
+ };
865
+ readonly "seedvr-upscale": {
866
+ readonly category: "restoration";
867
+ readonly defaultOptions: {
868
+ readonly output_format: "png";
869
+ };
870
+ readonly description: "Diffusion image restoration and upscaling with SeedVR.";
871
+ readonly endpoint: "fal-ai/seedvr/upscale/image";
872
+ readonly inputField: "image_url";
873
+ readonly inputKind: "image";
874
+ readonly name: "SeedVR Image Upscale";
875
+ readonly outputKeys: ["image"];
876
+ readonly price: {
877
+ readonly kind: "megapixel";
878
+ readonly usd: 0.001;
879
+ };
880
+ readonly pricing: "$0.001/megapixel";
881
+ readonly queued: true;
882
+ readonly sourceUrl: "https://fal.ai/models/fal-ai/seedvr/upscale/image";
883
+ readonly task: "image restoration and upscaling";
884
+ };
885
+ readonly "topaz-adjust": {
886
+ readonly category: "restoration";
887
+ readonly defaultOptions: {
888
+ readonly output_format: "png";
889
+ };
890
+ readonly description: "Topaz exposure, white balance, and colour adjustment.";
891
+ readonly endpoint: "topaz/adjust/image";
892
+ readonly inputField: "image_url";
893
+ readonly inputKind: "image";
894
+ readonly name: "Topaz Adjust";
895
+ readonly outputKeys: ["image"];
896
+ readonly price: {
897
+ readonly kind: "megapixel-step";
898
+ readonly megapixels: 24;
899
+ readonly usd: 0.08;
900
+ };
901
+ readonly pricing: "$0.08 per 24 output megapixels";
902
+ readonly queued: true;
903
+ readonly sourceUrl: "https://fal.ai/models/topaz/adjust/image";
904
+ readonly task: "tonal adjustment";
905
+ };
906
+ readonly "topaz-creative": {
907
+ readonly category: "restoration";
908
+ readonly defaultOptions: {
909
+ readonly output_format: "png";
910
+ };
911
+ readonly description: "Topaz Bloom upscaling, which reimagines detail rather than preserving it.";
912
+ readonly endpoint: "topaz/upscale/image/creative";
913
+ readonly inputField: "image_url";
914
+ readonly inputKind: "image";
915
+ readonly name: "Topaz Creative Upscale";
916
+ readonly outputKeys: ["image"];
917
+ readonly price: {
918
+ readonly kind: "megapixel-step";
919
+ readonly megapixels: 2;
920
+ readonly usd: 0.08;
921
+ };
922
+ readonly pricing: "$0.08 per started 2 output megapixels, any Bloom model";
923
+ readonly queued: true;
924
+ readonly sourceUrl: "https://fal.ai/models/topaz/upscale/image/creative";
925
+ readonly task: "creative image upscaling";
926
+ };
927
+ readonly "topaz-denoise": {
928
+ readonly category: "restoration";
929
+ readonly defaultOptions: {
930
+ readonly output_format: "png";
931
+ };
932
+ readonly description: "Topaz noise reduction at source resolution.";
933
+ readonly endpoint: "topaz/denoise/image";
934
+ readonly inputField: "image_url";
935
+ readonly inputKind: "image";
936
+ readonly name: "Topaz Denoise";
937
+ readonly outputKeys: ["image"];
938
+ readonly price: {
939
+ readonly kind: "megapixel-step";
940
+ readonly megapixels: 24;
941
+ readonly usd: 0.08;
942
+ };
943
+ readonly pricing: "$0.08 per 24 output megapixels at the default Normal model; $0.16 with Denoise Max";
944
+ readonly queued: true;
945
+ readonly sourceUrl: "https://fal.ai/models/topaz/denoise/image";
946
+ readonly task: "image denoising";
947
+ };
948
+ readonly "topaz-generative": {
949
+ readonly category: "restoration";
950
+ readonly defaultOptions: {
951
+ readonly output_format: "png";
952
+ };
953
+ readonly description: "Topaz Wonder upscaling, which synthesises plausible detail as it enlarges.";
954
+ readonly endpoint: "topaz/upscale/image/generative";
955
+ readonly inputField: "image_url";
956
+ readonly inputKind: "image";
957
+ readonly name: "Topaz Generative Upscale";
958
+ readonly outputKeys: ["image"];
959
+ readonly price: {
960
+ readonly kind: "megapixel-step";
961
+ readonly megapixels: 8;
962
+ readonly usd: 0.08;
963
+ };
964
+ readonly pricing: "$0.08 per started 8 output megapixels at the default Wonder 3; per started 4 with Wonder, Wonder 2, Standard MAX, Redefine or Recover 3";
965
+ readonly queued: true;
966
+ readonly sourceUrl: "https://fal.ai/models/topaz/upscale/image/generative";
967
+ readonly task: "generative image upscaling";
968
+ };
969
+ readonly "topaz-image": {
970
+ readonly category: "upscale";
971
+ readonly defaultOptions: {
972
+ readonly model: "Standard V2";
973
+ readonly output_format: "jpeg";
974
+ readonly upscale_factor: 2;
975
+ };
976
+ readonly description: "Professional Topaz image enhancement and upscaling.";
977
+ readonly endpoint: "fal-ai/topaz/upscale/image";
978
+ readonly inputField: "image_url";
979
+ readonly inputKind: "image";
980
+ readonly name: "Topaz Image Upscale";
981
+ readonly outputKeys: ["image"];
982
+ readonly price: {
983
+ readonly kind: "megapixel-step";
984
+ readonly megapixels: 24;
985
+ readonly usd: 0.08;
986
+ };
987
+ readonly pricing: "$0.08 for output up to 24MP; $0.16 to 48MP, $0.32 to 96MP, up to $1.36 at 512MP";
988
+ readonly queued: true;
989
+ readonly sourceUrl: "https://fal.ai/models/fal-ai/topaz/upscale/image";
990
+ readonly task: "image enhancement";
991
+ };
992
+ readonly "topaz-precision": {
993
+ readonly category: "restoration";
994
+ readonly defaultOptions: {
995
+ readonly output_format: "png";
996
+ };
997
+ readonly description: "Topaz upscaling that preserves the original detail rather than inventing it.";
998
+ readonly endpoint: "topaz/upscale/image/precision";
999
+ readonly inputField: "image_url";
1000
+ readonly inputKind: "image";
1001
+ readonly name: "Topaz Precision Upscale";
1002
+ readonly outputKeys: ["image"];
1003
+ readonly price: {
1004
+ readonly kind: "megapixel-step";
1005
+ readonly megapixels: 24;
1006
+ readonly usd: 0.08;
1007
+ };
1008
+ readonly pricing: "$0.08 per 24 output megapixels, any precision model";
1009
+ readonly queued: true;
1010
+ readonly sourceUrl: "https://fal.ai/models/topaz/upscale/image/precision";
1011
+ readonly task: "faithful image upscaling";
1012
+ };
1013
+ readonly "topaz-restore": {
1014
+ readonly category: "restoration";
1015
+ readonly defaultOptions: {
1016
+ readonly output_format: "png";
1017
+ };
1018
+ readonly description: "Topaz restoration of damaged or degraded photographs at source resolution.";
1019
+ readonly endpoint: "topaz/restore/image";
1020
+ readonly inputField: "image_url";
1021
+ readonly inputKind: "image";
1022
+ readonly name: "Topaz Restore";
1023
+ readonly outputKeys: ["image"];
1024
+ readonly price: {
1025
+ readonly kind: "megapixel-step";
1026
+ readonly megapixels: 24;
1027
+ readonly usd: 0.48;
1028
+ };
1029
+ readonly pricing: "$0.48 per 24 output megapixels at the default Recover 3; $0.08 with Dust-Scratch V2";
1030
+ readonly queued: true;
1031
+ readonly sourceUrl: "https://fal.ai/models/topaz/restore/image";
1032
+ readonly task: "photo restoration";
1033
+ };
1034
+ readonly "topaz-sharpen": {
1035
+ readonly category: "restoration";
1036
+ readonly defaultOptions: {
1037
+ readonly output_format: "png";
1038
+ };
1039
+ readonly description: "Topaz deblurring and sharpening at source resolution.";
1040
+ readonly endpoint: "topaz/sharpen/image";
1041
+ readonly inputField: "image_url";
1042
+ readonly inputKind: "image";
1043
+ readonly name: "Topaz Sharpen";
1044
+ readonly outputKeys: ["image"];
1045
+ readonly price: {
1046
+ readonly kind: "megapixel-step";
1047
+ readonly megapixels: 24;
1048
+ readonly usd: 0.08;
1049
+ };
1050
+ readonly pricing: "$0.08 per 24 output megapixels at the default Standard model; $0.16 with Super Focus";
1051
+ readonly queued: true;
1052
+ readonly sourceUrl: "https://fal.ai/models/topaz/sharpen/image";
1053
+ readonly task: "image sharpening";
1054
+ };
1055
+ readonly "topaz-transparent": {
1056
+ readonly category: "restoration";
1057
+ readonly description: "Topaz upscaling that preserves the alpha channel end to end.";
1058
+ readonly endpoint: "topaz/upscale/image/transparent";
1059
+ readonly inputField: "image_url";
1060
+ readonly inputKind: "image";
1061
+ readonly name: "Topaz Transparent Upscale";
1062
+ readonly outputKeys: ["image"];
1063
+ readonly price: {
1064
+ readonly kind: "megapixel-step";
1065
+ readonly megapixels: 24;
1066
+ readonly usd: 0.08;
1067
+ };
1068
+ readonly pricing: "$0.08 per 24 output megapixels";
1069
+ readonly queued: true;
1070
+ readonly sourceUrl: "https://fal.ai/models/topaz/upscale/image/transparent";
1071
+ readonly task: "transparent image upscaling";
1072
+ };
1073
+ readonly "topaz-video": {
1074
+ readonly category: "upscale";
1075
+ readonly defaultOptions: {
1076
+ readonly model: "Proteus";
1077
+ readonly upscale_factor: 2;
1078
+ };
1079
+ readonly description: "Professional Topaz video enhancement and upscaling.";
1080
+ readonly endpoint: "fal-ai/topaz/upscale/video";
1081
+ readonly inputField: "video_url";
1082
+ readonly inputKind: "video";
1083
+ readonly name: "Topaz Video Upscale";
1084
+ readonly outputKeys: ["video"];
1085
+ readonly price: {
1086
+ readonly doubleAtFps: 60;
1087
+ readonly halfWithModel: "Gaia 2";
1088
+ readonly kind: "video-second";
1089
+ readonly tiers: readonly [{
1090
+ readonly upTo: 720;
1091
+ readonly usd: 0.01;
1092
+ }, {
1093
+ readonly upTo: 1080;
1094
+ readonly usd: 0.02;
1095
+ }, {
1096
+ readonly usd: 0.08;
1097
+ }];
1098
+ };
1099
+ readonly pricing: "$0.01/sec up to 720p output; $0.02 to 1080p, $0.08 above, doubled at 60fps, halved with Gaia 2";
1100
+ readonly queued: true;
1101
+ readonly sourceUrl: "https://fal.ai/models/fal-ai/topaz/upscale/video";
1102
+ readonly task: "video enhancement";
1103
+ };
1104
+ readonly "bria-eraser": {
1105
+ readonly category: "erase";
1106
+ readonly description: "Commercial-safe removal of a masked region, inpainted from surrounding context.";
1107
+ readonly endpoint: "fal-ai/bria/eraser";
1108
+ readonly inputField: "image_url";
1109
+ readonly inputKind: "image";
1110
+ readonly name: "Bria Eraser";
1111
+ readonly outputKeys: ["image"];
1112
+ readonly price: {
1113
+ readonly kind: "call";
1114
+ readonly usd: 0.04;
1115
+ };
1116
+ readonly pricing: "$0.04/generation";
1117
+ readonly sourceUrl: "https://fal.ai/models/fal-ai/bria/eraser";
1118
+ readonly task: "masked object erasure";
1119
+ };
1120
+ readonly "bria-expand": {
1121
+ readonly category: "reframe";
1122
+ readonly description: "Expand an image onto a larger canvas, generating the new border area.";
1123
+ readonly endpoint: "fal-ai/bria/expand";
1124
+ readonly inputField: "image_url";
1125
+ readonly inputKind: "image";
1126
+ readonly name: "Bria Image Expansion";
1127
+ readonly outputKeys: ["image"];
1128
+ readonly price: {
1129
+ readonly kind: "call";
1130
+ readonly usd: 0.04;
1131
+ };
1132
+ readonly pricing: "$0.04/generation";
1133
+ readonly sourceUrl: "https://fal.ai/models/fal-ai/bria/expand";
1134
+ readonly task: "image outpainting";
1135
+ };
1136
+ readonly "bria-genfill": {
1137
+ readonly category: "erase";
1138
+ readonly description: "Generative fill of a masked region from a prompt, commercial-safe.";
1139
+ readonly endpoint: "fal-ai/bria/genfill";
1140
+ readonly inputField: "image_url";
1141
+ readonly inputKind: "image";
1142
+ readonly name: "Bria GenFill";
1143
+ readonly outputKeys: ["images"];
1144
+ readonly price: {
1145
+ readonly kind: "call";
1146
+ readonly perImage: true;
1147
+ readonly usd: 0.04;
1148
+ };
1149
+ readonly pricing: "$0.04/generation";
1150
+ readonly sourceUrl: "https://fal.ai/models/fal-ai/bria/genfill";
1151
+ readonly task: "masked generative fill";
1152
+ };
1153
+ readonly "finegrain-eraser": {
1154
+ readonly category: "erase";
1155
+ readonly description: "Remove a prompted object and its shadows and reflections, filling the gap.";
1156
+ readonly endpoint: "fal-ai/finegrain-eraser";
1157
+ readonly inputField: "image_url";
1158
+ readonly inputKind: "image";
1159
+ readonly name: "Finegrain Object Eraser";
1160
+ readonly outputKeys: ["image"];
1161
+ readonly price: {
1162
+ readonly kind: "call";
1163
+ readonly usd: 0.27;
1164
+ };
1165
+ readonly pricing: "$0.27/image at the default standard mode; $0.18 express, $0.36 premium";
1166
+ readonly sourceUrl: "https://fal.ai/models/fal-ai/finegrain-eraser";
1167
+ readonly task: "prompted object erasure";
1168
+ };
1169
+ readonly "flux-outpaint": {
1170
+ readonly category: "reframe";
1171
+ readonly description: "Outpaint an image by a per-edge pixel expansion with FLUX.2 pro.";
1172
+ readonly endpoint: "fal-ai/flux-2-pro/outpaint";
1173
+ readonly inputField: "image_url";
1174
+ readonly inputKind: "image";
1175
+ readonly name: "FLUX.2 Pro Outpaint";
1176
+ readonly outputKeys: ["images"];
1177
+ readonly price: {
1178
+ readonly extra: 0.015;
1179
+ readonly first: 0.03;
1180
+ readonly kind: "megapixel-first";
1181
+ };
1182
+ readonly pricing: "$0.03 for the first output megapixel, then $0.015 per extra megapixel of input and output, rounded up";
1183
+ readonly sourceUrl: "https://fal.ai/models/fal-ai/flux-2-pro/outpaint";
1184
+ readonly task: "image outpainting";
1185
+ };
1186
+ readonly "iclight-v2": {
1187
+ readonly category: "relight";
1188
+ readonly description: "Relight a subject from a prompt, harmonising it with a new light direction.";
1189
+ readonly endpoint: "fal-ai/iclight-v2";
1190
+ readonly inputField: "image_url";
1191
+ readonly inputKind: "image";
1192
+ readonly name: "IC-Light v2";
1193
+ readonly outputKeys: ["images"];
1194
+ readonly price: {
1195
+ readonly kind: "megapixel";
1196
+ readonly usd: 0.1;
1197
+ };
1198
+ readonly pricing: "$0.10/megapixel";
1199
+ readonly sourceUrl: "https://fal.ai/models/fal-ai/iclight-v2";
1200
+ readonly task: "prompted relighting";
1201
+ };
1202
+ readonly "ideogram-reframe": {
1203
+ readonly category: "reframe";
1204
+ readonly description: "Reframe an image to a new aspect ratio, generating the fill.";
1205
+ readonly endpoint: "fal-ai/ideogram/v3/reframe";
1206
+ readonly inputField: "image_url";
1207
+ readonly inputKind: "image";
1208
+ readonly name: "Ideogram v3 Reframe";
1209
+ readonly outputKeys: ["images"];
1210
+ readonly price: {
1211
+ readonly kind: "call";
1212
+ readonly perImage: true;
1213
+ readonly usd: 0.06;
1214
+ };
1215
+ readonly pricing: "$0.06/image at the default BALANCED speed; $0.03 turbo, $0.09 quality";
1216
+ readonly sourceUrl: "https://fal.ai/models/fal-ai/ideogram/v3/reframe";
1217
+ readonly task: "aspect ratio reframing";
1218
+ };
1219
+ readonly "lighting-restoration": {
1220
+ readonly category: "relight";
1221
+ readonly description: "Restore natural, even lighting across one or more input images.";
1222
+ readonly endpoint: "fal-ai/qwen-image-edit-plus-lora-gallery/lighting-restoration";
1223
+ readonly inputField: "image_urls";
1224
+ readonly inputKind: "images";
1225
+ readonly name: "Qwen Lighting Restoration";
1226
+ readonly outputKeys: ["images"];
1227
+ readonly price: {
1228
+ readonly kind: "megapixel";
1229
+ readonly usd: 0.035;
1230
+ };
1231
+ readonly pricing: "$0.035/megapixel";
1232
+ readonly sourceUrl: "https://fal.ai/models/fal-ai/qwen-image-edit-plus-lora-gallery/lighting-restoration";
1233
+ readonly task: "lighting restoration";
1234
+ };
1235
+ readonly "object-removal": {
1236
+ readonly category: "erase";
1237
+ readonly description: "Remove a prompted object from an image and fill the gap.";
1238
+ readonly endpoint: "fal-ai/object-removal";
1239
+ readonly inputField: "image_url";
1240
+ readonly inputKind: "image";
1241
+ readonly name: "Object Removal";
1242
+ readonly outputKeys: ["images"];
1243
+ readonly price: {
1244
+ readonly kind: "call";
1245
+ readonly usd: 0.024;
1246
+ };
1247
+ readonly pricing: "$0.024/image at the default best quality; $0.006 low, $0.012 medium, $0.018 high";
1248
+ readonly sourceUrl: "https://fal.ai/models/fal-ai/object-removal";
1249
+ readonly task: "prompted object removal";
1250
+ };
1251
+ readonly "object-removal-bbox": {
1252
+ readonly category: "erase";
1253
+ readonly description: "Remove whatever falls inside supplied bounding boxes.";
1254
+ readonly endpoint: "fal-ai/object-removal/bbox";
1255
+ readonly inputField: "image_url";
1256
+ readonly inputKind: "image";
1257
+ readonly name: "Object Removal by Box";
1258
+ readonly outputKeys: ["images"];
1259
+ readonly price: {
1260
+ readonly kind: "call";
1261
+ readonly usd: 0.024;
1262
+ };
1263
+ readonly pricing: "$0.024/image at the default best quality; $0.006 low, $0.012 medium, $0.018 high";
1264
+ readonly sourceUrl: "https://fal.ai/models/fal-ai/object-removal/bbox";
1265
+ readonly task: "bounding box object removal";
1266
+ };
1267
+ readonly "object-removal-mask": {
1268
+ readonly category: "erase";
1269
+ readonly description: "Remove the masked region of an image and fill the gap.";
1270
+ readonly endpoint: "fal-ai/object-removal/mask";
1271
+ readonly inputField: "image_url";
1272
+ readonly inputKind: "image";
1273
+ readonly name: "Object Removal by Mask";
1274
+ readonly outputKeys: ["images"];
1275
+ readonly price: {
1276
+ readonly kind: "call";
1277
+ readonly usd: 0.024;
1278
+ };
1279
+ readonly pricing: "$0.024/image at the default best quality; $0.006 low, $0.012 medium, $0.018 high";
1280
+ readonly sourceUrl: "https://fal.ai/models/fal-ai/object-removal/mask";
1281
+ readonly task: "masked object removal";
1282
+ };
1283
+ readonly "remove-lighting": {
1284
+ readonly category: "relight";
1285
+ readonly description: "Strip baked-in lighting and shadows to leave a flat, neutral surface.";
1286
+ readonly endpoint: "fal-ai/qwen-image-edit-plus-lora-gallery/remove-lighting";
1287
+ readonly inputField: "image_urls";
1288
+ readonly inputKind: "images";
1289
+ readonly name: "Qwen Remove Lighting";
1290
+ readonly outputKeys: ["images"];
1291
+ readonly price: {
1292
+ readonly kind: "megapixel";
1293
+ readonly usd: 0.035;
1294
+ };
1295
+ readonly pricing: "$0.035/megapixel";
1296
+ readonly sourceUrl: "https://fal.ai/models/fal-ai/qwen-image-edit-plus-lora-gallery/remove-lighting";
1297
+ readonly task: "lighting removal";
1298
+ };
1299
+ readonly "smart-resize": {
1300
+ readonly category: "reframe";
1301
+ readonly description: "Resize one image to several target sizes, recomposing rather than cropping.";
1302
+ readonly endpoint: "fal-ai/smart-resize";
1303
+ readonly inputField: "image_url";
1304
+ readonly inputKind: "image";
1305
+ readonly name: "Smart Resize";
1306
+ readonly outputKeys: ["images", "results"];
1307
+ readonly price: {
1308
+ readonly fee: 0.05;
1309
+ readonly kind: "call";
1310
+ readonly multipliers: {
1311
+ readonly resolution: {
1312
+ readonly "4K": 2;
1313
+ };
1314
+ };
1315
+ readonly per: readonly ["target_sizes", "num_images_per_size"];
1316
+ readonly usd: 0.15;
1317
+ };
1318
+ readonly pricing: "$0.15 per output image, doubled at 4K, plus a $0.05 vision analysis fee per request";
1319
+ readonly queued: true;
1320
+ readonly sourceUrl: "https://fal.ai/models/fal-ai/smart-resize";
1321
+ readonly task: "multi-size recomposition";
1322
+ };
1323
+ readonly "telestyle-v2": {
1324
+ readonly category: "restyle";
1325
+ readonly description: "Redraw a content image in the style of a second, style image.";
1326
+ readonly endpoint: "fal-ai/telestyle-v2";
1327
+ readonly inputField: "content_image_url";
1328
+ readonly inputKind: "image";
1329
+ readonly name: "TeleStyle v2";
1330
+ readonly outputKeys: ["images"];
1331
+ readonly price: {
1332
+ readonly kind: "megapixel";
1333
+ readonly usd: 0.035;
1334
+ };
1335
+ readonly pricing: "$0.035/megapixel";
1336
+ readonly referenceField: "style_image_url";
1337
+ readonly sourceUrl: "https://fal.ai/models/fal-ai/telestyle-v2";
1338
+ readonly task: "style transfer from a reference image";
1339
+ };
1340
+ readonly "text-removal": {
1341
+ readonly category: "erase";
1342
+ readonly defaultOptions: {
1343
+ readonly output_format: "png";
1344
+ };
1345
+ readonly description: "Remove all rendered text from an image, rebuilding what sat behind it.";
1346
+ readonly endpoint: "fal-ai/image-editing/text-removal";
1347
+ readonly inputField: "image_url";
1348
+ readonly inputKind: "image";
1349
+ readonly name: "Text Removal";
1350
+ readonly outputKeys: ["images"];
1351
+ readonly price: {
1352
+ readonly kind: "call";
1353
+ readonly usd: 0.04;
1354
+ };
1355
+ readonly pricing: "$0.04/image";
1356
+ readonly sourceUrl: "https://fal.ai/models/fal-ai/image-editing/text-removal";
1357
+ readonly task: "text removal";
1358
+ };
1359
+ readonly "virtual-try-on": {
1360
+ readonly category: "try-on";
1361
+ readonly description: "Dress the person in one image in the garment shown in another.";
1362
+ readonly endpoint: "google/virtual-try-on";
1363
+ readonly inputField: "person_image_url";
1364
+ readonly inputKind: "image";
1365
+ readonly name: "Google Virtual Try-On";
1366
+ readonly outputKeys: ["images"];
1367
+ readonly price: {
1368
+ readonly kind: "call";
1369
+ readonly perImage: true;
1370
+ readonly usd: 0.075;
1371
+ };
1372
+ readonly pricing: "$0.075/image";
1373
+ readonly queued: true;
1374
+ readonly referenceField: "product_image_url";
1375
+ readonly sourceUrl: "https://fal.ai/models/google/virtual-try-on";
1376
+ readonly task: "virtual garment try-on";
1377
+ };
1378
+ readonly "depth-anything": {
1379
+ readonly category: "preprocess";
1380
+ readonly description: "Generate Depth Anything v2 depth maps from input images.";
1381
+ readonly endpoint: "fal-ai/image-preprocessors/depth-anything/v2";
1382
+ readonly inputField: "image_url";
1383
+ readonly inputKind: "image";
1384
+ readonly name: "Depth Anything v2 Preprocessor";
1385
+ readonly outputKeys: ["image"];
1386
+ readonly price: {
1387
+ readonly kind: "call";
1388
+ readonly usd: 0;
1389
+ };
1390
+ readonly pricing: "$0/compute-second listed by fal";
1391
+ readonly sourceUrl: "https://fal.ai/models/fal-ai/image-preprocessors/depth-anything/v2";
1392
+ readonly task: "depth preprocessing";
1393
+ };
1394
+ readonly dwpose: {
1395
+ readonly category: "preprocess";
1396
+ readonly description: "Extract body, hand, and face pose skeletons from an image.";
1397
+ readonly endpoint: "fal-ai/dwpose";
1398
+ readonly inputField: "image_url";
1399
+ readonly inputKind: "image";
1400
+ readonly name: "DWPose Estimation";
1401
+ readonly outputKeys: ["image"];
1402
+ readonly price: {
1403
+ readonly kind: "second";
1404
+ readonly usd: 0.0006;
1405
+ };
1406
+ readonly pricing: "$0.0006/compute-second";
1407
+ readonly sourceUrl: "https://fal.ai/models/fal-ai/dwpose";
1408
+ readonly task: "pose preprocessing";
1409
+ };
1410
+ readonly hed: {
1411
+ readonly category: "preprocess";
1412
+ readonly description: "Generate HED soft edge maps for ControlNet-style workflows.";
1413
+ readonly endpoint: "fal-ai/image-preprocessors/hed";
1414
+ readonly inputField: "image_url";
1415
+ readonly inputKind: "image";
1416
+ readonly name: "HED Edge Preprocessor";
1417
+ readonly outputKeys: ["image"];
1418
+ readonly price: {
1419
+ readonly kind: "call";
1420
+ readonly usd: 0;
1421
+ };
1422
+ readonly pricing: "$0/compute-second listed by fal";
1423
+ readonly sourceUrl: "https://fal.ai/models/fal-ai/image-preprocessors/hed";
1424
+ readonly task: "edge preprocessing";
1425
+ };
1426
+ readonly lineart: {
1427
+ readonly category: "preprocess";
1428
+ readonly defaultOptions: {
1429
+ readonly coarse: false;
1430
+ };
1431
+ readonly description: "Generate line art/control-style edges from an input image.";
1432
+ readonly endpoint: "fal-ai/image-preprocessors/lineart";
1433
+ readonly inputField: "image_url";
1434
+ readonly inputKind: "image";
1435
+ readonly name: "Line Art Preprocessor";
1436
+ readonly outputKeys: ["image"];
1437
+ readonly price: {
1438
+ readonly kind: "call";
1439
+ readonly usd: 0;
1440
+ };
1441
+ readonly pricing: "$0/compute-second listed by fal";
1442
+ readonly sourceUrl: "https://fal.ai/models/fal-ai/image-preprocessors/lineart";
1443
+ readonly task: "image preprocessing";
1444
+ };
1445
+ readonly "marigold-depth": {
1446
+ readonly category: "depth";
1447
+ readonly defaultOptions: {
1448
+ readonly ensemble_size: 10;
1449
+ readonly num_inference_steps: 10;
1450
+ };
1451
+ readonly description: "Create depth maps using Marigold depth estimation.";
1452
+ readonly endpoint: "fal-ai/imageutils/marigold-depth";
1453
+ readonly inputField: "image_url";
1454
+ readonly inputKind: "image";
1455
+ readonly name: "Marigold Depth Estimation";
1456
+ readonly outputKeys: ["image"];
1457
+ readonly price: {
1458
+ readonly kind: "call";
1459
+ readonly usd: 0;
1460
+ };
1461
+ readonly pricing: "$0/compute-second listed by fal";
1462
+ readonly sourceUrl: "https://fal.ai/models/fal-ai/imageutils/marigold-depth";
1463
+ readonly task: "depth map";
1464
+ };
1465
+ readonly "midas-depth": {
1466
+ readonly category: "depth";
1467
+ readonly defaultOptions: {
1468
+ readonly a: number;
1469
+ readonly bg_th: 0.1;
1470
+ };
1471
+ readonly description: "Create MiDaS depth maps from input images.";
1472
+ readonly endpoint: "fal-ai/imageutils/depth";
1473
+ readonly inputField: "image_url";
1474
+ readonly inputKind: "image";
1475
+ readonly name: "MiDaS Depth Estimation";
1476
+ readonly outputKeys: ["image"];
1477
+ readonly price: {
1478
+ readonly kind: "call";
1479
+ readonly usd: 0;
1480
+ };
1481
+ readonly pricing: "$0/compute-second listed by fal";
1482
+ readonly sourceUrl: "https://fal.ai/models/fal-ai/imageutils/depth";
1483
+ readonly task: "depth map";
1484
+ };
1485
+ readonly "midas-preprocessor": {
1486
+ readonly category: "preprocess";
1487
+ readonly description: "Generate MiDaS depth and normal maps for image workflows.";
1488
+ readonly endpoint: "fal-ai/image-preprocessors/midas";
1489
+ readonly inputField: "image_url";
1490
+ readonly inputKind: "image";
1491
+ readonly name: "MiDaS Preprocessor";
1492
+ readonly outputKeys: ["depth_map", "normal_map"];
1493
+ readonly price: {
1494
+ readonly kind: "call";
1495
+ readonly usd: 0;
1496
+ };
1497
+ readonly pricing: "$0/compute-second listed by fal";
1498
+ readonly sourceUrl: "https://fal.ai/models/fal-ai/image-preprocessors/midas";
1499
+ readonly task: "depth and normal preprocessing";
1500
+ };
1501
+ readonly mlsd: {
1502
+ readonly category: "preprocess";
1503
+ readonly description: "Detect straight line segments for architectural and interior control maps.";
1504
+ readonly endpoint: "fal-ai/image-preprocessors/mlsd";
1505
+ readonly inputField: "image_url";
1506
+ readonly inputKind: "image";
1507
+ readonly name: "M-LSD Line Preprocessor";
1508
+ readonly outputKeys: ["image"];
1509
+ readonly price: {
1510
+ readonly kind: "call";
1511
+ readonly usd: 0;
1512
+ };
1513
+ readonly pricing: "$0/compute-second listed by fal";
1514
+ readonly sourceUrl: "https://fal.ai/models/fal-ai/image-preprocessors/mlsd";
1515
+ readonly task: "line segment preprocessing";
1516
+ };
1517
+ readonly pidi: {
1518
+ readonly category: "preprocess";
1519
+ readonly description: "Generate PiDiNet soft edge maps from an input image.";
1520
+ readonly endpoint: "fal-ai/image-preprocessors/pidi";
1521
+ readonly inputField: "image_url";
1522
+ readonly inputKind: "image";
1523
+ readonly name: "PiDiNet Edge Preprocessor";
1524
+ readonly outputKeys: ["image"];
1525
+ readonly price: {
1526
+ readonly kind: "call";
1527
+ readonly usd: 0;
1528
+ };
1529
+ readonly pricing: "$0/compute-second listed by fal";
1530
+ readonly sourceUrl: "https://fal.ai/models/fal-ai/image-preprocessors/pidi";
1531
+ readonly task: "edge preprocessing";
1532
+ };
1533
+ readonly "sam-preprocessor": {
1534
+ readonly category: "preprocess";
1535
+ readonly description: "Generate a SAM segmentation map for ControlNet-style workflows.";
1536
+ readonly endpoint: "fal-ai/image-preprocessors/sam";
1537
+ readonly inputField: "image_url";
1538
+ readonly inputKind: "image";
1539
+ readonly name: "SAM Preprocessor";
1540
+ readonly outputKeys: ["image"];
1541
+ readonly price: {
1542
+ readonly kind: "call";
1543
+ readonly usd: 0;
1544
+ };
1545
+ readonly pricing: "$0/compute-second listed by fal";
1546
+ readonly sourceUrl: "https://fal.ai/models/fal-ai/image-preprocessors/sam";
1547
+ readonly task: "segmentation preprocessing";
1548
+ };
1549
+ readonly "sam2-auto": {
1550
+ readonly category: "segmentation";
1551
+ readonly defaultOptions: {
1552
+ readonly min_mask_region_area: 100;
1553
+ readonly output_format: "png";
1554
+ readonly points_per_side: 32;
1555
+ readonly pred_iou_thresh: 0.88;
1556
+ readonly stability_score_thresh: 0.95;
1557
+ };
1558
+ readonly description: "Automatically segment an image into combined and individual masks.";
1559
+ readonly endpoint: "fal-ai/sam2/auto-segment";
1560
+ readonly inputField: "image_url";
1561
+ readonly inputKind: "image";
1562
+ readonly name: "SAM 2 Auto Segment";
1563
+ readonly outputKeys: ["combined_mask", "individual_masks"];
1564
+ readonly price: {
1565
+ readonly kind: "call";
1566
+ readonly usd: 0;
1567
+ };
1568
+ readonly pricing: "$0/compute-second listed by fal";
1569
+ readonly queued: true;
1570
+ readonly sourceUrl: "https://fal.ai/models/fal-ai/sam2/auto-segment";
1571
+ readonly task: "automatic image segmentation";
1572
+ };
1573
+ readonly "sam3-1-image": {
1574
+ readonly category: "segmentation";
1575
+ readonly defaultOptions: {
1576
+ readonly apply_mask: true;
1577
+ readonly max_masks: 3;
1578
+ readonly output_format: "png";
1579
+ };
1580
+ readonly description: "Segment image objects with text, point, or box prompts. SAM 3.1 adds Object Multiplex for faster multi-object tracking.";
1581
+ readonly endpoint: "fal-ai/sam-3-1/image";
1582
+ readonly inputField: "image_url";
1583
+ readonly inputKind: "image";
1584
+ readonly name: "SAM 3.1 Image";
1585
+ readonly outputKeys: ["image", "masks", "metadata", "scores", "boxes"];
1586
+ readonly price: {
1587
+ readonly kind: "call";
1588
+ readonly usd: 0.01;
1589
+ };
1590
+ readonly pricing: "$0.01/request";
1591
+ readonly sourceUrl: "https://fal.ai/models/fal-ai/sam-3-1/image";
1592
+ readonly task: "promptable image segmentation";
1593
+ };
1594
+ readonly "sam3-1-video": {
1595
+ readonly category: "segmentation";
1596
+ readonly defaultOptions: {
1597
+ readonly apply_mask: true;
1598
+ readonly prompt: "person";
1599
+ };
1600
+ readonly description: "SAM 3.1 video segmentation with Object Multiplex tracking for multiple objects.";
1601
+ readonly endpoint: "fal-ai/sam-3-1/video";
1602
+ readonly inputField: "video_url";
1603
+ readonly inputKind: "video";
1604
+ readonly name: "SAM 3.1 Video";
1605
+ readonly outputKeys: ["video", "boundingbox_frames_zip"];
1606
+ readonly price: {
1607
+ readonly frames: 16;
1608
+ readonly kind: "frames";
1609
+ readonly usd: 0.01;
1610
+ };
1611
+ readonly pricing: "$0.01/16 frames of video input";
1612
+ readonly queued: true;
1613
+ readonly sourceUrl: "https://fal.ai/models/fal-ai/sam-3-1/video";
1614
+ readonly task: "multi-object video segmentation";
1615
+ };
1616
+ readonly "sam3-image": {
1617
+ readonly category: "segmentation";
1618
+ readonly defaultOptions: {
1619
+ readonly apply_mask: true;
1620
+ readonly max_masks: 3;
1621
+ readonly output_format: "png";
1622
+ };
1623
+ readonly description: "Segment image objects with text, point, or box prompts.";
1624
+ readonly endpoint: "fal-ai/sam-3/image";
1625
+ readonly inputField: "image_url";
1626
+ readonly inputKind: "image";
1627
+ readonly name: "SAM 3 Image";
1628
+ readonly outputKeys: ["image", "masks", "metadata", "scores", "boxes"];
1629
+ readonly price: {
1630
+ readonly kind: "call";
1631
+ readonly usd: 0.005;
1632
+ };
1633
+ readonly pricing: "$0.005/request";
1634
+ readonly sourceUrl: "https://fal.ai/models/fal-ai/sam-3/image";
1635
+ readonly task: "promptable image segmentation";
1636
+ };
1637
+ readonly "sam3-image-rle": {
1638
+ readonly category: "segmentation";
1639
+ readonly defaultOptions: {
1640
+ readonly apply_mask: true;
1641
+ readonly max_masks: 3;
1642
+ };
1643
+ readonly description: "Segment image objects and return run-length encoded masks.";
1644
+ readonly endpoint: "fal-ai/sam-3/image-rle";
1645
+ readonly inputField: "image_url";
1646
+ readonly inputKind: "image";
1647
+ readonly name: "SAM 3 Image RLE";
1648
+ readonly outputKeys: ["rle", "scores", "boxes", "metadata"];
1649
+ readonly price: {
1650
+ readonly kind: "call";
1651
+ readonly usd: 0.005;
1652
+ };
1653
+ readonly pricing: "$0.005/request";
1654
+ readonly sourceUrl: "https://fal.ai/models/fal-ai/sam-3/image-rle";
1655
+ readonly task: "promptable image segmentation to RLE";
1656
+ };
1657
+ readonly "sam3-video": {
1658
+ readonly category: "segmentation";
1659
+ readonly defaultOptions: {
1660
+ readonly apply_mask: true;
1661
+ readonly detection_threshold: 0.5;
1662
+ readonly prompt: "person";
1663
+ readonly video_output_type: "X264 (.mp4)";
1664
+ };
1665
+ readonly description: "Segment and track prompted objects across video frames.";
1666
+ readonly endpoint: "fal-ai/sam-3/video";
1667
+ readonly inputField: "video_url";
1668
+ readonly inputKind: "video";
1669
+ readonly name: "SAM 3 Video";
1670
+ readonly outputKeys: ["video", "boundingbox_frames_zip"];
1671
+ readonly price: {
1672
+ readonly frames: 16;
1673
+ readonly kind: "frames";
1674
+ readonly usd: 0.005;
1675
+ };
1676
+ readonly pricing: "$0.005/16 frames of video input";
1677
+ readonly queued: true;
1678
+ readonly sourceUrl: "https://fal.ai/models/fal-ai/sam-3/video";
1679
+ readonly task: "promptable video segmentation";
1680
+ };
1681
+ readonly "sam3-video-rle": {
1682
+ readonly category: "segmentation";
1683
+ readonly defaultOptions: {
1684
+ readonly apply_mask: true;
1685
+ readonly detection_threshold: 0.5;
1686
+ readonly prompt: "person";
1687
+ };
1688
+ readonly description: "Track prompted video objects and return RLE mask data.";
1689
+ readonly endpoint: "fal-ai/sam-3/video-rle";
1690
+ readonly inputField: "video_url";
1691
+ readonly inputKind: "video";
1692
+ readonly name: "SAM 3 Video RLE";
1693
+ readonly outputKeys: ["video", "boundingbox_frames_zip"];
1694
+ readonly price: {
1695
+ readonly frames: 16;
1696
+ readonly kind: "frames";
1697
+ readonly usd: 0.005;
1698
+ };
1699
+ readonly pricing: "$0.005/16 frames of video";
1700
+ readonly queued: true;
1701
+ readonly sourceUrl: "https://fal.ai/models/fal-ai/sam-3/video-rle";
1702
+ readonly task: "promptable video segmentation to RLE";
1703
+ };
1704
+ readonly scribble: {
1705
+ readonly category: "preprocess";
1706
+ readonly description: "Turn an image into a scribble-style control map.";
1707
+ readonly endpoint: "fal-ai/image-preprocessors/scribble";
1708
+ readonly inputField: "image_url";
1709
+ readonly inputKind: "image";
1710
+ readonly name: "Scribble Preprocessor";
1711
+ readonly outputKeys: ["image"];
1712
+ readonly price: {
1713
+ readonly kind: "call";
1714
+ readonly usd: 0;
1715
+ };
1716
+ readonly pricing: "$0/compute-second listed by fal";
1717
+ readonly sourceUrl: "https://fal.ai/models/fal-ai/image-preprocessors/scribble";
1718
+ readonly task: "scribble preprocessing";
1719
+ };
1720
+ readonly teed: {
1721
+ readonly category: "preprocess";
1722
+ readonly description: "Generate TEED edge maps from an input image.";
1723
+ readonly endpoint: "fal-ai/image-preprocessors/teed";
1724
+ readonly inputField: "image_url";
1725
+ readonly inputKind: "image";
1726
+ readonly name: "TEED Edge Preprocessor";
1727
+ readonly outputKeys: ["image"];
1728
+ readonly price: {
1729
+ readonly kind: "call";
1730
+ readonly usd: 0;
1731
+ };
1732
+ readonly pricing: "$0/compute-second listed by fal";
1733
+ readonly sourceUrl: "https://fal.ai/models/fal-ai/image-preprocessors/teed";
1734
+ readonly task: "edge preprocessing";
1735
+ };
1736
+ readonly "zoe-depth": {
1737
+ readonly category: "preprocess";
1738
+ readonly description: "Generate ZoeDepth metric depth maps from an input image.";
1739
+ readonly endpoint: "fal-ai/image-preprocessors/zoe";
1740
+ readonly inputField: "image_url";
1741
+ readonly inputKind: "image";
1742
+ readonly name: "ZoeDepth Preprocessor";
1743
+ readonly outputKeys: ["image"];
1744
+ readonly price: {
1745
+ readonly kind: "call";
1746
+ readonly usd: 0;
1747
+ };
1748
+ readonly pricing: "$0/compute-second listed by fal";
1749
+ readonly sourceUrl: "https://fal.ai/models/fal-ai/image-preprocessors/zoe";
1750
+ readonly task: "depth preprocessing";
1751
+ };
1752
+ };
1753
+ declare const FAL_TOOL_IDS: (keyof typeof FAL_TOOLS)[];
1754
+ type FalToolId = (typeof FAL_TOOL_IDS)[number];
1755
+ export declare function isFalToolId(tool: string): tool is FalToolId;
1756
+ //#endregion
1757
+ export type { FalToolConfig, FalToolPrice, ModelConfig };