@howells/motif-sdk 2.0.0 → 5.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.
- package/README.md +66 -94
- package/dist/image.d.ts +33 -50
- package/dist/image.js +1145 -249
- package/dist/index.cjs +5430 -1278
- package/dist/index.d.cts +1137 -3180
- package/dist/index.d.ts +1137 -3180
- package/dist/index.js +5412 -1249
- package/package.json +16 -14
package/dist/index.d.cts
CHANGED
|
@@ -4,10 +4,11 @@ import { z } from "zod";
|
|
|
4
4
|
/**
|
|
5
5
|
* Creative direction fields applied to prompts in Motif's canonical order.
|
|
6
6
|
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
7
|
+
* A look sets the overall register of the image; a mood sets its light. The
|
|
8
|
+
* order matters because clauses are appended look first, then mood, for
|
|
9
|
+
* stable dry runs, tests, and history.
|
|
9
10
|
*/
|
|
10
|
-
type CreativeField = "
|
|
11
|
+
type CreativeField = "look" | "mood";
|
|
11
12
|
/**
|
|
12
13
|
* Selected creative option ids keyed by direction field.
|
|
13
14
|
*
|
|
@@ -17,7 +18,7 @@ type CreativeField = "recipe" | "shot" | "lighting" | "genre" | "camera" | "colo
|
|
|
17
18
|
type CreativeDirection = Partial<Record<CreativeField, string>>;
|
|
18
19
|
/** A single selectable creative direction option exposed to CLI and MCP schemas. */
|
|
19
20
|
interface CreativeOption {
|
|
20
|
-
/** Prompt
|
|
21
|
+
/** Prompt sentence appended when this option is selected. */
|
|
21
22
|
clause: string;
|
|
22
23
|
/** Human-facing explanation used in schema metadata and generated docs. */
|
|
23
24
|
description: string;
|
|
@@ -26,6 +27,27 @@ interface CreativeOption {
|
|
|
26
27
|
/** Short display label for UIs and schema enum descriptions. */
|
|
27
28
|
label: string;
|
|
28
29
|
}
|
|
30
|
+
/**
|
|
31
|
+
* A house look: a creative option that also carries the aspect ratio and
|
|
32
|
+
* model it was tuned for. Callers apply these only when the user named none.
|
|
33
|
+
*/
|
|
34
|
+
interface LookOption extends CreativeOption {
|
|
35
|
+
/**
|
|
36
|
+
* Whether a mood may be combined with this look. Flat looks (surfaces,
|
|
37
|
+
* paintings, illustrations, studio objects) carry their own light and
|
|
38
|
+
* refuse one.
|
|
39
|
+
*/
|
|
40
|
+
acceptsMood: boolean;
|
|
41
|
+
/** Default aspect ratio, e.g. `"3:2"`. */
|
|
42
|
+
aspect: AspectRatio;
|
|
43
|
+
/**
|
|
44
|
+
* Marks a look still being tuned. It works, but its text and defaults may
|
|
45
|
+
* change more than the others.
|
|
46
|
+
*/
|
|
47
|
+
experimental?: boolean;
|
|
48
|
+
/** Default generation Model id, e.g. `"flux2-pro"`. */
|
|
49
|
+
model: string;
|
|
50
|
+
}
|
|
29
51
|
/** Structured details returned when a creative direction id is not recognized. */
|
|
30
52
|
interface CreativeOptionErrorDetails {
|
|
31
53
|
availableIds: string[];
|
|
@@ -44,66 +66,137 @@ export declare class CreativeOptionError extends Error implements CreativeOption
|
|
|
44
66
|
readonly code = "INVALID_OPTION";
|
|
45
67
|
readonly field: CreativeField;
|
|
46
68
|
readonly value: string;
|
|
47
|
-
constructor(details: Omit<CreativeOptionErrorDetails, "code"
|
|
69
|
+
constructor(details: Omit<CreativeOptionErrorDetails, "code">, message?: string);
|
|
48
70
|
}
|
|
49
71
|
/** Canonical creative field order used for prompt enrichment and schema output. */
|
|
50
|
-
export declare const CREATIVE_FIELDS: readonly ["
|
|
72
|
+
export declare const CREATIVE_FIELDS: readonly ["look", "mood"];
|
|
51
73
|
/**
|
|
52
|
-
* Built-in creative direction
|
|
74
|
+
* Built-in creative direction catalogue: nine house looks and six light moods.
|
|
53
75
|
*
|
|
54
|
-
* Each
|
|
55
|
-
*
|
|
76
|
+
* Each option carries the exact prompt sentence appended when it is selected.
|
|
77
|
+
* Looks also carry the aspect ratio and model they were tuned for. The five
|
|
78
|
+
* photographic looks come first, then the four flat ones.
|
|
56
79
|
*/
|
|
57
80
|
export declare const CREATIVE_TAXONOMY: {
|
|
58
|
-
readonly
|
|
59
|
-
readonly
|
|
60
|
-
readonly
|
|
61
|
-
readonly
|
|
62
|
-
readonly
|
|
81
|
+
readonly look: readonly [{
|
|
82
|
+
readonly acceptsMood: true;
|
|
83
|
+
readonly aspect: "1:1";
|
|
84
|
+
readonly clause: "Editorial photograph in the register of Atelier Ellis, Aman hotels, Kinfolk magazine and Aesop, pigment-rich mineral colour on named matte surfaces, quiet composition with generous negative space, shallow depth of field, shot on film with fine grain, restrained and materially rich. No text, no logos, no people";
|
|
85
|
+
readonly description: "Quiet, materially rich editorial photography for brand and mood imagery.";
|
|
86
|
+
readonly id: "editorial";
|
|
87
|
+
readonly label: "Quiet editorial";
|
|
88
|
+
readonly model: "flux2-pro";
|
|
89
|
+
}, {
|
|
90
|
+
readonly acceptsMood: true;
|
|
91
|
+
readonly aspect: "1:1";
|
|
92
|
+
readonly clause: "Editorial still life in the register of Aesop and Kinfolk, on a warm bone plaster ground, chalky unglazed surfaces in muted mineral colour, a long soft shadow, generous empty space, shot on film with fine grain, restrained and materially rich. No text, no logos, no people";
|
|
93
|
+
readonly description: "Objects and products on a plaster ground, for product and editorial still life.";
|
|
94
|
+
readonly id: "still-life";
|
|
95
|
+
readonly label: "Editorial still life";
|
|
96
|
+
readonly model: "flux2-pro";
|
|
97
|
+
}, {
|
|
98
|
+
readonly acceptsMood: true;
|
|
99
|
+
readonly aspect: "3:2";
|
|
100
|
+
readonly clause: "Interior photograph in the register of House & Garden and Kinfolk, shot square-on at eye level on a 35mm lens, warm off-white plaster, wide oak floorboards, linen, brass and a little pattern, light, bright and layered, collected rather than styled, lived-in rather than showroom-perfect, soft natural daylight, shot on film with fine grain. No text, no logos, no people";
|
|
101
|
+
readonly description: "Bright, collected rooms that feel lived in, for interior scenes.";
|
|
102
|
+
readonly id: "interior";
|
|
103
|
+
readonly label: "Interior";
|
|
104
|
+
readonly model: "flux2-pro";
|
|
105
|
+
}, {
|
|
106
|
+
readonly acceptsMood: true;
|
|
107
|
+
readonly aspect: "4:5";
|
|
108
|
+
readonly clause: "Architectural photograph in the register of House & Garden and Kinfolk, a considered house seen from outside at editorial distance with its garden and setting, pale render, stone or timber meeting precise detailing, clipped planting, soft warm daylight and long shadow, generous negative space, immaculate and calm, shot on film with fine grain. No text, no logos, no people";
|
|
109
|
+
readonly description: "Buildings and their settings from outside, for architecture, property and place.";
|
|
110
|
+
readonly id: "architectural";
|
|
111
|
+
readonly label: "Architectural exterior";
|
|
112
|
+
readonly model: "banana";
|
|
113
|
+
}, {
|
|
114
|
+
readonly acceptsMood: true;
|
|
115
|
+
readonly aspect: "1:1";
|
|
116
|
+
readonly clause: "Editorial documentary portrait in the register of Kinfolk, muted warm palette, waist-up and unposed against a plain plaster or linen ground, plain clothing with no logos, soft natural light, shot on film with fine grain. No text";
|
|
117
|
+
readonly description: "Natural, unposed documentary portraits of people. Pair with a mood for the light.";
|
|
118
|
+
readonly id: "portrait";
|
|
119
|
+
readonly label: "Documentary portrait";
|
|
120
|
+
readonly model: "seedream45";
|
|
121
|
+
}, {
|
|
122
|
+
readonly acceptsMood: false;
|
|
123
|
+
readonly aspect: "1:1";
|
|
124
|
+
readonly clause: "A single matte object centred with generous empty space, soft diffused studio light, minimal and quiet in the register of Aesop, one committed muted mineral colour on a plain ground. No text, no logos, no people";
|
|
125
|
+
readonly description: "One object in one colour on a clean ground, for icons and simple product shots.";
|
|
126
|
+
readonly id: "object";
|
|
127
|
+
readonly label: "Studio object";
|
|
128
|
+
readonly model: "flux2-pro";
|
|
129
|
+
}, {
|
|
130
|
+
readonly acceptsMood: false;
|
|
131
|
+
readonly aspect: "1:1";
|
|
132
|
+
readonly clause: "Straight-on orthographic photograph of the surface filling the entire frame edge to edge, even shadowless studio light, crisp macro texture, colour-accurate and quietly material. No text, no logos";
|
|
133
|
+
readonly description: "Flat, edge-to-edge surface photographs, for textures, backgrounds and material swatches.";
|
|
134
|
+
readonly id: "surface";
|
|
135
|
+
readonly label: "Flat surface";
|
|
136
|
+
readonly model: "flux2-pro";
|
|
137
|
+
}, {
|
|
138
|
+
readonly acceptsMood: false;
|
|
139
|
+
readonly aspect: "3:2";
|
|
140
|
+
readonly clause: "Painted abstraction filling the frame edge to edge, mineral pigment and chalk gesso on coarse natural linen, two or three confident gestures, warm ivory, oatmeal, putty and soft charcoal, flat diffuse reproduction light. No text";
|
|
141
|
+
readonly description: "Painted abstraction edge to edge, for wall art, heroes and calm backgrounds.";
|
|
142
|
+
readonly id: "abstract";
|
|
143
|
+
readonly label: "Painted abstract";
|
|
144
|
+
readonly model: "banana";
|
|
145
|
+
}, {
|
|
146
|
+
readonly acceptsMood: false;
|
|
147
|
+
readonly aspect: "1:1";
|
|
148
|
+
readonly clause: "Stylised editorial illustration in the register of Kinfolk, colour laid as flat planes in a warm muted palette of ivory, putty, sage and charcoal, fine hand-drawn line with a gentle gouache wash, generous empty space, clearly a drawing rather than a photograph. No text, no logos";
|
|
149
|
+
readonly description: "Line and gouache illustration of any subject, for drawn editorial imagery.";
|
|
150
|
+
readonly experimental: true;
|
|
151
|
+
readonly id: "illustration";
|
|
152
|
+
readonly label: "Editorial illustration";
|
|
153
|
+
readonly model: "gpt2";
|
|
63
154
|
}];
|
|
64
|
-
readonly
|
|
65
|
-
readonly clause: "
|
|
66
|
-
readonly description: "
|
|
67
|
-
readonly id: "
|
|
68
|
-
readonly label: "
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
readonly
|
|
72
|
-
readonly
|
|
73
|
-
readonly
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
readonly
|
|
78
|
-
readonly
|
|
79
|
-
|
|
80
|
-
readonly
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
readonly
|
|
84
|
-
|
|
85
|
-
readonly
|
|
86
|
-
readonly
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
readonly
|
|
91
|
-
readonly
|
|
92
|
-
readonly
|
|
93
|
-
|
|
94
|
-
readonly recipe: readonly [{
|
|
95
|
-
readonly clause: "cinematic scene";
|
|
96
|
-
readonly description: "Frames the prompt as a cinematic still or scene.";
|
|
97
|
-
readonly id: "cinematic";
|
|
98
|
-
readonly label: "Cinematic";
|
|
99
|
-
}];
|
|
100
|
-
readonly shot: readonly [{
|
|
101
|
-
readonly clause: "close-up composition with controlled depth of field";
|
|
102
|
-
readonly description: "Tight framing that emphasizes subject detail.";
|
|
103
|
-
readonly id: "close-up";
|
|
104
|
-
readonly label: "Close-up";
|
|
155
|
+
readonly mood: readonly [{
|
|
156
|
+
readonly clause: "soft natural daylight from a window out of frame, gentle falloff into the corners, low contrast, even diffused light with soft, held highlights";
|
|
157
|
+
readonly description: "Soft, even daylight from a window. The safe default.";
|
|
158
|
+
readonly id: "window";
|
|
159
|
+
readonly label: "Window light";
|
|
160
|
+
}, {
|
|
161
|
+
readonly clause: "early morning light through tall glazing, cool and clear";
|
|
162
|
+
readonly description: "Cool, clear early morning light.";
|
|
163
|
+
readonly id: "dawn";
|
|
164
|
+
readonly label: "Dawn";
|
|
165
|
+
}, {
|
|
166
|
+
readonly clause: "low raking daylight from the left, long soft shadows that reveal texture";
|
|
167
|
+
readonly description: "Low side light that brings out surface texture.";
|
|
168
|
+
readonly id: "raking";
|
|
169
|
+
readonly label: "Raking light";
|
|
170
|
+
}, {
|
|
171
|
+
readonly clause: "overcast afternoon with rain on a tall window, soft even grey light";
|
|
172
|
+
readonly description: "Soft grey light on a rainy afternoon.";
|
|
173
|
+
readonly id: "overcast";
|
|
174
|
+
readonly label: "Overcast";
|
|
175
|
+
}, {
|
|
176
|
+
readonly clause: "evening, warm practical lamps around 2400K, candles and a lit fire, cosy and warm, never gloomy";
|
|
177
|
+
readonly description: "Warm evening light from lamps, candles and a fire.";
|
|
178
|
+
readonly id: "lamplit";
|
|
179
|
+
readonly label: "Lamplit evening";
|
|
180
|
+
}, {
|
|
181
|
+
readonly clause: "night, one warm low practical light, deep shadow, candlelit";
|
|
182
|
+
readonly description: "Dark night scene lit by one warm low light.";
|
|
183
|
+
readonly id: "nocturne";
|
|
184
|
+
readonly label: "Nocturne";
|
|
105
185
|
}];
|
|
106
186
|
};
|
|
187
|
+
/** Every house look, in catalogue order. */
|
|
188
|
+
export declare const LOOKS: readonly LookOption[];
|
|
189
|
+
/** Stable id of a house look, e.g. `"interior"`. */
|
|
190
|
+
type LookId = (typeof CREATIVE_TAXONOMY.look)[number]["id"];
|
|
191
|
+
/** Stable id of a light mood, e.g. `"overcast"`. */
|
|
192
|
+
type MoodId = (typeof CREATIVE_TAXONOMY.mood)[number]["id"];
|
|
193
|
+
/**
|
|
194
|
+
* Look up a house look by id.
|
|
195
|
+
*
|
|
196
|
+
* Returns `undefined` for unknown ids; `enrichPrompt` is the validating path
|
|
197
|
+
* and throws `CreativeOptionError` for the same input.
|
|
198
|
+
*/
|
|
199
|
+
export declare function getLook(id: string): LookOption | undefined;
|
|
107
200
|
/** Result of applying creative direction to a base prompt. */
|
|
108
201
|
interface CreativePromptResult {
|
|
109
202
|
/** Sanitized user prompt before Motif adds creative clauses. */
|
|
@@ -131,10 +224,21 @@ interface EnrichPromptOptions {
|
|
|
131
224
|
*/
|
|
132
225
|
export declare function sanitizePrompt(prompt: string): string;
|
|
133
226
|
/**
|
|
134
|
-
*
|
|
227
|
+
* Validate a creative direction and return its clauses in canonical order.
|
|
135
228
|
*
|
|
136
|
-
*
|
|
137
|
-
* `
|
|
229
|
+
* Throws `CreativeOptionError` for an unknown id, and for a mood paired with a
|
|
230
|
+
* look whose `acceptsMood` is false; that error is on field `mood` and its
|
|
231
|
+
* `availableIds` lists the looks that do accept a mood. A mood with no look is
|
|
232
|
+
* valid. Empty-string ids are treated as unset.
|
|
233
|
+
*/
|
|
234
|
+
export declare function validateCreativeDirection(creative: CreativeDirection | undefined): CreativePromptResult["creative"];
|
|
235
|
+
/**
|
|
236
|
+
* Append selected creative direction clauses to a prompt as sentences.
|
|
237
|
+
*
|
|
238
|
+
* Options are validated by `validateCreativeDirection` and applied in
|
|
239
|
+
* `CREATIVE_FIELDS` order (look, then mood). The base prompt comes first; each
|
|
240
|
+
* part loses any trailing period and gets a capital first letter, then they
|
|
241
|
+
* are joined with `". "` and closed with a period. With no clauses the sanitized prompt is returned unchanged.
|
|
138
242
|
*/
|
|
139
243
|
export declare function enrichPrompt(options: EnrichPromptOptions): CreativePromptResult;
|
|
140
244
|
//#endregion
|
|
@@ -142,286 +246,40 @@ export declare function enrichPrompt(options: EnrichPromptOptions): CreativeProm
|
|
|
142
246
|
/** ─── Model Types ─────────────────────────────────────────────── */
|
|
143
247
|
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";
|
|
144
248
|
type Resolution = "0.5K" | "1K" | "2K" | "4K";
|
|
145
|
-
type ModelType = "generation" | "utility" | "video";
|
|
146
249
|
type ImageOutputFormat = "jpeg" | "png" | "webp";
|
|
147
|
-
type BackgroundMode = "auto" | "transparent" | "opaque";
|
|
148
|
-
type ImageQuality = "auto" | "low" | "medium" | "high" | "xhigh" | "max";
|
|
149
|
-
type ThinkingLevel = "minimal" | "high";
|
|
150
|
-
type GptImageSize = "auto" | "1024x1024" | "1536x1024" | "1024x1536";
|
|
151
|
-
type FalImageSizePreset = "auto" | "square_hd" | "square" | "portrait_4_3" | "portrait_16_9" | "landscape_4_3" | "landscape_16_9";
|
|
152
250
|
interface CustomImageSize {
|
|
153
251
|
height: number;
|
|
154
252
|
width: number;
|
|
155
253
|
}
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
estimatedCostPerImageUsd?: number;
|
|
167
|
-
source: "fal-pricing-api";
|
|
168
|
-
unit: string;
|
|
169
|
-
unitPrice: number;
|
|
170
|
-
}
|
|
171
|
-
interface LeaderboardMetric {
|
|
172
|
-
elo: number;
|
|
173
|
-
rank: number;
|
|
174
|
-
winRate?: number;
|
|
175
|
-
}
|
|
176
|
-
interface ModelBenchmark {
|
|
177
|
-
artificialAnalysis?: {
|
|
178
|
-
editing?: LeaderboardMetric;
|
|
179
|
-
sourceUrls: string[];
|
|
180
|
-
snapshotDate: string;
|
|
181
|
-
textToImage?: LeaderboardMetric;
|
|
182
|
-
};
|
|
183
|
-
speed?: {
|
|
184
|
-
medianSeconds?: number;
|
|
185
|
-
p95Seconds?: number;
|
|
186
|
-
source: "artificial-analysis-models";
|
|
187
|
-
};
|
|
188
|
-
tiers?: {
|
|
189
|
-
price: PriceTier;
|
|
190
|
-
quality: QualityTier;
|
|
191
|
-
speed: SpeedTier;
|
|
192
|
-
};
|
|
193
|
-
useCase?: string;
|
|
194
|
-
}
|
|
195
|
-
interface ModelConfig {
|
|
196
|
-
benchmark?: ModelBenchmark;
|
|
197
|
-
editEndpoint?: string;
|
|
198
|
-
editImagesField?: "image_urls" | "image_url";
|
|
199
|
-
endpoint: string;
|
|
200
|
-
falPricing?: FalPricing;
|
|
201
|
-
maxReferenceImages?: number;
|
|
202
|
-
name: string;
|
|
203
|
-
pricing: string;
|
|
204
|
-
/** Null means token-metered with no per-image estimate. */
|
|
205
|
-
pricePerImageUsd?: number | null;
|
|
206
|
-
/** How this model accepts dimensions (default: "aspect_ratio") */
|
|
207
|
-
sizeMode?: SizeMode;
|
|
208
|
-
supportsAspect: boolean;
|
|
209
|
-
supportsBackground?: boolean;
|
|
210
|
-
supportsEdit: boolean;
|
|
211
|
-
supportsEnhancePrompt?: boolean;
|
|
212
|
-
supportsExpandPrompt?: boolean;
|
|
213
|
-
supportsGuidanceScale?: boolean;
|
|
214
|
-
supportsGoogleSearch?: boolean;
|
|
215
|
-
supportsImagePromptStrength?: boolean;
|
|
216
|
-
supportsInferenceSteps?: boolean;
|
|
217
|
-
supportsLimitGenerations?: boolean;
|
|
218
|
-
supportsMaskImage?: boolean;
|
|
219
|
-
maskImageField?: "mask_image_url" | "mask_url";
|
|
220
|
-
supportsNegativePrompt?: boolean;
|
|
221
|
-
supportsNumImages: boolean;
|
|
222
|
-
supportsOutputFormat?: boolean;
|
|
223
|
-
supportedOutputFormats?: readonly ImageOutputFormat[];
|
|
224
|
-
supportsQuality?: boolean;
|
|
225
|
-
supportedQualities?: readonly ImageQuality[];
|
|
226
|
-
supportsRaw?: boolean;
|
|
227
|
-
supportsRenderingSpeed?: boolean;
|
|
228
|
-
supportsResolution: boolean;
|
|
229
|
-
supportsSafetyTolerance?: boolean;
|
|
230
|
-
supportsSafetyChecker?: boolean;
|
|
231
|
-
supportsSeed?: boolean;
|
|
232
|
-
supportsStyle?: boolean;
|
|
233
|
-
supportsSyncMode?: boolean;
|
|
234
|
-
supportsThinkingLevel?: boolean;
|
|
235
|
-
supportsWebSearch?: boolean;
|
|
236
|
-
type: ModelType;
|
|
237
|
-
/** Use fal queue submit/status/result even for generate() calls. */
|
|
238
|
-
useQueue?: boolean;
|
|
239
|
-
}
|
|
240
|
-
/** ─── Generation Types ───────────────────────────────────────── */
|
|
241
|
-
interface GenerateOptions {
|
|
242
|
-
aspect?: AspectRatio;
|
|
243
|
-
/** GPT background mode where supported */
|
|
244
|
-
background?: BackgroundMode;
|
|
245
|
-
/**
|
|
246
|
-
* Motif prompt enrichment choices applied before fal request construction.
|
|
247
|
-
*
|
|
248
|
-
* These options are not sent to fal directly; they append validated creative
|
|
249
|
-
* clauses to `prompt` and are omitted from the final request body.
|
|
250
|
-
*/
|
|
251
|
-
creative?: CreativeDirection;
|
|
252
|
-
editImageUrls?: string[];
|
|
253
|
-
/** Ask fal not to store IO payloads, and expose request ids for deletion. */
|
|
254
|
-
ephemeral?: boolean;
|
|
255
|
-
/** Google-search alias for fal models that expose enable_google_search */
|
|
256
|
-
enableGoogleSearch?: boolean;
|
|
257
|
-
/** fal safety checker toggle where supported */
|
|
258
|
-
enableSafetyChecker?: boolean;
|
|
259
|
-
/** Enable web search for generative context where supported */
|
|
260
|
-
enableWebSearch?: boolean;
|
|
261
|
-
/** Auto-enhance the prompt before generation (flux only) */
|
|
262
|
-
enhancePrompt?: boolean;
|
|
263
|
-
/** Enable MagicPrompt expansion (ideogram only) */
|
|
264
|
-
expandPrompt?: boolean;
|
|
265
|
-
/** CFG guidance scale — flux-fast: 1–20 */
|
|
266
|
-
guidanceScale?: number;
|
|
267
|
-
/** Direct fal image_size override, including custom {width,height} where supported */
|
|
268
|
-
imageSize?: ImageSize;
|
|
269
|
-
/** FLUX image prompt/reference strength where supported */
|
|
270
|
-
imagePromptStrength?: number;
|
|
271
|
-
inputFidelity?: "low" | "high";
|
|
272
|
-
/** Nano Banana 2 generation limiting toggle */
|
|
273
|
-
limitGenerations?: boolean;
|
|
274
|
-
/** Mask image URL for inpainting/editing where supported */
|
|
275
|
-
maskImageUrl?: string;
|
|
276
|
-
model: string;
|
|
277
|
-
/** What NOT to include in the image (ideogram only) */
|
|
278
|
-
negativePrompt?: string;
|
|
279
|
-
numImages?: number;
|
|
280
|
-
/** Number of diffusion inference steps — flux-fast: 1–12 */
|
|
281
|
-
numInferenceSteps?: number;
|
|
282
|
-
/** Output image format (default: model-dependent) */
|
|
283
|
-
outputFormat?: ImageOutputFormat;
|
|
284
|
-
prompt: string;
|
|
285
|
-
/** GPT/OpenAI quality where supported */
|
|
286
|
-
quality?: ImageQuality;
|
|
287
|
-
/** Generate less processed, more natural images (flux only) */
|
|
288
|
-
raw?: boolean;
|
|
289
|
-
/** Speed vs. quality trade-off (ideogram only) */
|
|
290
|
-
renderingSpeed?: "TURBO" | "BALANCED" | "QUALITY";
|
|
291
|
-
resolution?: Resolution;
|
|
292
|
-
/** Safety tolerance level "1"–"6", where "1" is strictest */
|
|
293
|
-
safetyTolerance?: string;
|
|
294
|
-
/** Reproducible generation seed */
|
|
295
|
-
seed?: number;
|
|
296
|
-
/** Style preset — recraft: 70+ hierarchical styles; ideogram: "AUTO"|"GENERAL"|"REALISTIC"|"DESIGN" */
|
|
297
|
-
style?: string;
|
|
298
|
-
/** Return media as data URI where supported */
|
|
299
|
-
syncMode?: boolean;
|
|
300
|
-
/** Nano Banana 2 thinking mode */
|
|
301
|
-
thinkingLevel?: ThinkingLevel;
|
|
302
|
-
transparent?: boolean;
|
|
303
|
-
}
|
|
304
|
-
interface UpscaleOptions {
|
|
305
|
-
creativity?: number;
|
|
306
|
-
/** CFG guidance scale for upscaling (clarity only, 0–20, default 4) */
|
|
307
|
-
guidanceScale?: number;
|
|
308
|
-
imageUrl: string;
|
|
309
|
-
model?: "clarity" | "crystal";
|
|
310
|
-
/** What NOT to include in the upscaled result (clarity only) */
|
|
311
|
-
negativePrompt?: string;
|
|
312
|
-
/** Number of diffusion steps (clarity only, 4–50, default 18) */
|
|
313
|
-
numInferenceSteps?: number;
|
|
314
|
-
/** Prompt to guide the upscaling process (clarity only) */
|
|
315
|
-
prompt?: string;
|
|
316
|
-
/** How closely to preserve the original image (clarity only, 0–1, default 0.6) */
|
|
317
|
-
resemblance?: number;
|
|
318
|
-
scaleFactor?: number;
|
|
319
|
-
}
|
|
320
|
-
interface RemoveBackgroundOptions {
|
|
321
|
-
imageUrl: string;
|
|
322
|
-
model?: "rmbg" | "bria";
|
|
323
|
-
/** BiRefNet operating resolution (rmbg model only, default "1024x1024") */
|
|
324
|
-
operatingResolution?: "1024x1024" | "2048x2048";
|
|
325
|
-
/** Output image format (rmbg model only) */
|
|
326
|
-
outputFormat?: "png" | "webp" | "gif";
|
|
327
|
-
/** Return the alpha mask alongside the result (rmbg model only) */
|
|
328
|
-
outputMask?: boolean;
|
|
329
|
-
/** Apply foreground edge refinement (rmbg model only, default true) */
|
|
330
|
-
refineForeground?: boolean;
|
|
331
|
-
/** BiRefNet model variant (rmbg model only) */
|
|
332
|
-
variant?: "General Use (Light)" | "General Use (Heavy)" | "Portrait";
|
|
333
|
-
}
|
|
334
|
-
interface VideoOptions {
|
|
335
|
-
/** CFG guidance scale for video generation (0–1, default 0.5) */
|
|
336
|
-
cfgScale?: number;
|
|
337
|
-
/** Duration in seconds (3-15) */
|
|
338
|
-
duration?: number;
|
|
339
|
-
/** Optional end frame image URL */
|
|
340
|
-
endImageUrl?: string;
|
|
341
|
-
/** Generate audio track (default true, costs more) */
|
|
342
|
-
generateAudio?: boolean;
|
|
343
|
-
/** Source image URL */
|
|
344
|
-
imageUrl: string;
|
|
345
|
-
/** What NOT to include in the video */
|
|
346
|
-
negativePrompt?: string;
|
|
347
|
-
/** Text description of the motion/scene */
|
|
348
|
-
prompt: string;
|
|
349
|
-
}
|
|
350
|
-
interface VideoResponse {
|
|
351
|
-
contentType: string;
|
|
352
|
-
fileName: string;
|
|
353
|
-
fileSize: number;
|
|
354
|
-
url: string;
|
|
355
|
-
}
|
|
356
|
-
interface ToolRunOptions {
|
|
357
|
-
input?: string;
|
|
358
|
-
inputs?: string[];
|
|
359
|
-
options?: Record<string, unknown>;
|
|
360
|
-
tool: string;
|
|
361
|
-
}
|
|
362
|
-
type ToolResponse = Record<string, unknown>;
|
|
363
|
-
/** ─── Response Types ─────────────────────────────────────────── */
|
|
364
|
-
interface MotifImage {
|
|
365
|
-
content_type?: string;
|
|
366
|
-
height?: number;
|
|
367
|
-
url: string;
|
|
368
|
-
width?: number;
|
|
369
|
-
}
|
|
370
|
-
interface MotifResponse {
|
|
371
|
-
images: MotifImage[];
|
|
372
|
-
prompt?: string;
|
|
373
|
-
requestId?: string;
|
|
374
|
-
seed?: number;
|
|
375
|
-
}
|
|
376
|
-
/** ─── Queue Types ────────────────────────────────────────────── */
|
|
377
|
-
interface QueuedJob {
|
|
378
|
-
endpoint: string;
|
|
379
|
-
estimatedCost: number | null;
|
|
380
|
-
requestId: string;
|
|
381
|
-
}
|
|
382
|
-
interface JobStatus {
|
|
383
|
-
error?: string;
|
|
384
|
-
logs?: {
|
|
385
|
-
message: string;
|
|
386
|
-
timestamp: string;
|
|
387
|
-
}[];
|
|
388
|
-
queuePosition?: number;
|
|
389
|
-
status: "queued" | "processing" | "completed" | "failed";
|
|
390
|
-
}
|
|
391
|
-
/**
|
|
392
|
-
* A tool run accepted by the fal queue.
|
|
393
|
-
*
|
|
394
|
-
* Returned by `FalClient.submitTool`, and the handle passed back to
|
|
395
|
-
* `checkToolStatus` / `getToolResult`. The job itself carries no cost: the
|
|
396
|
-
* rate lives on the registry entry as `FalToolConfig.price`, and for a queued
|
|
397
|
-
* endpoint it is usually per-megapixel or metered, so the final cost is only
|
|
398
|
-
* known once the result is in.
|
|
399
|
-
*/
|
|
400
|
-
interface QueuedToolJob {
|
|
401
|
-
endpoint: string;
|
|
402
|
-
requestId: string;
|
|
254
|
+
/** Limits an endpoint puts on an exact `{ width, height }` image size. */
|
|
255
|
+
interface ImageSizeBounds {
|
|
256
|
+
/** Largest width or height over smallest, e.g. 3 for 3:1. */
|
|
257
|
+
maxRatio?: number;
|
|
258
|
+
maxEdge?: number;
|
|
259
|
+
maxPixels?: number;
|
|
260
|
+
minEdge?: number;
|
|
261
|
+
minPixels?: number;
|
|
262
|
+
/** Both edges must be multiples of this. Motif uses 16 when absent. */
|
|
263
|
+
multipleOf?: number;
|
|
403
264
|
}
|
|
404
265
|
/** ─── Configuration ──────────────────────────────────────────── */
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
/** Max retry attempts for 429/5xx errors (default 3, set 0 to disable) */
|
|
408
|
-
retries?: number;
|
|
409
|
-
/** Request timeout in ms (default 120_000) */
|
|
410
|
-
timeout?: number;
|
|
411
|
-
}
|
|
266
|
+
/** The network seam: a `fetch`-shaped function. */
|
|
267
|
+
type FalFetch = (url: string, init: RequestInit) => Promise<Response>;
|
|
412
268
|
//#endregion
|
|
413
269
|
//#region src/aspects.d.ts
|
|
414
270
|
/** Ordered by popularity: square first, then common ratios */
|
|
415
271
|
export declare const ASPECT_RATIOS: AspectRatio[];
|
|
416
272
|
export declare const RESOLUTIONS: Resolution[];
|
|
417
|
-
/** Map aspect ratio to GPT image_size (GPT doesn't support arbitrary aspects) */
|
|
418
|
-
export declare function aspectToGptSize(aspect: AspectRatio): string;
|
|
419
273
|
/**
|
|
420
|
-
*
|
|
421
|
-
*
|
|
422
|
-
* named size presets rather than aspect ratio strings.
|
|
274
|
+
* Thrown by `buildGenerateBody` when a ratio no fal preset holds has no exact
|
|
275
|
+
* size inside the Model's limits.
|
|
423
276
|
*/
|
|
424
|
-
export declare
|
|
277
|
+
export declare class ImageSizeBoundsError extends Error {
|
|
278
|
+
readonly code = "INVALID_OPTION";
|
|
279
|
+
readonly aspect: AspectRatio;
|
|
280
|
+
readonly bounds: ImageSizeBounds;
|
|
281
|
+
constructor(model: string, aspect: AspectRatio, bounds: ImageSizeBounds);
|
|
282
|
+
}
|
|
425
283
|
/** Format presets that set aspect + resolution in one click */
|
|
426
284
|
export declare const FORMAT_PRESETS: Record<string, {
|
|
427
285
|
label: string;
|
|
@@ -429,76 +287,6 @@ export declare const FORMAT_PRESETS: Record<string, {
|
|
|
429
287
|
resolution?: Resolution;
|
|
430
288
|
}>;
|
|
431
289
|
//#endregion
|
|
432
|
-
//#region src/cost.d.ts
|
|
433
|
-
/** Estimate cost based on model and settings */
|
|
434
|
-
export declare function estimateCost(model: string, resolution?: Resolution, numImages?: number): number | null;
|
|
435
|
-
/** Estimate cost for video generation */
|
|
436
|
-
export declare function estimateVideoCost(durationSeconds?: number, generateAudio?: boolean): number;
|
|
437
|
-
//#endregion
|
|
438
|
-
//#region src/env.d.ts
|
|
439
|
-
export declare const motifEnvSchema: import("@howells/envy").EnvSchema<{
|
|
440
|
-
readonly optional: {
|
|
441
|
-
FAL_KEY: z.ZodString;
|
|
442
|
-
};
|
|
443
|
-
}>;
|
|
444
|
-
type MotifEnv = ReturnType<typeof motifEnvSchema.parse>;
|
|
445
|
-
export declare function parseMotifEnv(input?: Record<string, unknown>): MotifEnv;
|
|
446
|
-
export declare function getFalKeyFromEnv(input?: Record<string, unknown>): string | undefined;
|
|
447
|
-
//#endregion
|
|
448
|
-
//#region src/generate.d.ts
|
|
449
|
-
/**
|
|
450
|
-
* Build the fal.ai request body for a generation request.
|
|
451
|
-
* Shared between sync generate() (CLI) and queue-based submit (web).
|
|
452
|
-
*
|
|
453
|
-
* Models use different sizing APIs:
|
|
454
|
-
* - `gpt_size`: GPT's fixed dimensions (1024x1024, 1536x1024, etc.)
|
|
455
|
-
* - `aspect_ratio`: string like "16:9" (Gemini, Grok, FLUX Pro Ultra)
|
|
456
|
-
* - `image_size_enum`: named presets like "landscape_4_3" (FLUX.2, Seedream, Recraft, Ideogram, GPT Image 2)
|
|
457
|
-
* - `none`: no size control (video models)
|
|
458
|
-
*/
|
|
459
|
-
export declare function buildGenerateBody(options: GenerateOptions): {
|
|
460
|
-
endpoint: string;
|
|
461
|
-
body: Record<string, unknown>;
|
|
462
|
-
};
|
|
463
|
-
//#endregion
|
|
464
|
-
//#region src/leaderboards.d.ts
|
|
465
|
-
interface LeaderboardEntry {
|
|
466
|
-
/**
|
|
467
|
-
* What the model's own vendor charges to run it through their API, as Artificial Analysis
|
|
468
|
-
* quoted it. Not what fal charges us - fal resells several of these for a fraction of the
|
|
469
|
-
* price. For our cost, read `falPricing` on the model in `models.ts`.
|
|
470
|
-
*/
|
|
471
|
-
apiPricing?: string;
|
|
472
|
-
creator: string;
|
|
473
|
-
elo: number;
|
|
474
|
-
isCurrent?: boolean;
|
|
475
|
-
model: string;
|
|
476
|
-
rank: number;
|
|
477
|
-
routableModelId?: string;
|
|
478
|
-
}
|
|
479
|
-
interface LeaderboardSnapshot {
|
|
480
|
-
capturedAt: string;
|
|
481
|
-
entries: LeaderboardEntry[];
|
|
482
|
-
source: string;
|
|
483
|
-
}
|
|
484
|
-
export declare const IMAGE_TEXT_TO_IMAGE_TOP_20: LeaderboardSnapshot;
|
|
485
|
-
export declare const IMAGE_EDITING_TOP_20: LeaderboardSnapshot;
|
|
486
|
-
export declare const VIDEO_TEXT_TO_VIDEO_TOP_15: LeaderboardSnapshot;
|
|
487
|
-
export declare const VIDEO_IMAGE_TO_VIDEO_TOP_15: LeaderboardSnapshot;
|
|
488
|
-
//#endregion
|
|
489
|
-
//#region src/models.d.ts
|
|
490
|
-
export declare const MODELS: Record<string, ModelConfig>;
|
|
491
|
-
export declare const GENERATION_MODELS: readonly ["flare", "sunburst", "gpt2", "gpt", "banana2", "banana", "gemini", "gemini3", "seedream4", "seedream45", "seedream5", "seedream5-lite", "flux2-max", "flux2-pro", "flux2-flex", "flux2-dev", "flux2-turbo", "flux", "flux-fast", "recraft", "recraft4", "ideogram", "ideogram4", "grok-image", "qwen", "qwen3"];
|
|
492
|
-
/** Models whose fal endpoints support image editing (vary/edit flows). */
|
|
493
|
-
export declare const EDIT_CAPABLE_MODELS: ("banana" | "banana2" | "flare" | "flux" | "flux-fast" | "flux2-dev" | "flux2-flex" | "flux2-max" | "flux2-pro" | "flux2-turbo" | "gemini" | "gemini3" | "gpt" | "gpt2" | "grok-image" | "ideogram" | "ideogram4" | "qwen" | "qwen3" | "recraft" | "recraft4" | "seedream4" | "seedream45" | "seedream5" | "seedream5-lite" | "sunburst")[];
|
|
494
|
-
export declare const UTILITY_MODELS: readonly ["clarity", "crystal", "rmbg", "bria"];
|
|
495
|
-
export declare const VIDEO_MODELS: readonly ["kling"];
|
|
496
|
-
type GenerationModelName = (typeof GENERATION_MODELS)[number];
|
|
497
|
-
/** Recraft v3 style presets. Pass as the `style` field in GenerateOptions. */
|
|
498
|
-
export declare const RECRAFT_STYLES: readonly ["realistic_image", "realistic_image/b_and_w", "realistic_image/enterprise", "realistic_image/hard_flash", "realistic_image/hdr", "realistic_image/motion_blur", "realistic_image/natural_light", "realistic_image/studio_portrait", "realistic_image/long_exposure", "digital_illustration", "digital_illustration/2d_art_poster", "digital_illustration/2d_art_poster_2", "digital_illustration/engraving_color", "digital_illustration/grain", "digital_illustration/hand_drawn", "digital_illustration/hand_drawn_outline", "digital_illustration/handmade_3d", "digital_illustration/infantile_sketch", "digital_illustration/pixel_art", "digital_illustration/psychedelic", "digital_illustration/seamless", "digital_illustration/voxel", "digital_illustration/watercolor", "vector_illustration", "vector_illustration/cartoon", "vector_illustration/doodle_line_art", "vector_illustration/engraving", "vector_illustration/flat_2", "vector_illustration/kawaii", "vector_illustration/line_art", "vector_illustration/line_circuit", "vector_illustration/linocut", "vector_illustration/zentangle"];
|
|
499
|
-
/** Ideogram v3 top-level style categories. Pass as the `style` field in GenerateOptions. */
|
|
500
|
-
export declare const IDEOGRAM_STYLES: readonly ["AUTO", "GENERAL", "REALISTIC", "DESIGN"];
|
|
501
|
-
//#endregion
|
|
502
290
|
//#region src/errors.d.ts
|
|
503
291
|
/**
|
|
504
292
|
* `MotifError` and its coercion helper.
|
|
@@ -514,2743 +302,770 @@ export declare class MotifError extends Error {
|
|
|
514
302
|
/** fal's request-correlation id (from the `x-fal-request-id` header or the
|
|
515
303
|
* error body). Ties a failure back to fal's dashboard/support. */
|
|
516
304
|
readonly requestId?: string;
|
|
517
|
-
|
|
305
|
+
/** Structured context for the failure, e.g. the refused field. */
|
|
306
|
+
readonly details?: Record<string, unknown>;
|
|
307
|
+
constructor(message: string, status: number, code?: string, requestId?: string, details?: Record<string, unknown>);
|
|
518
308
|
}
|
|
519
|
-
|
|
520
|
-
|
|
309
|
+
/** Error code for a fal account that is locked, usually for lack of credit. */
|
|
310
|
+
export declare const ACCOUNT_LOCKED = "ACCOUNT_LOCKED";
|
|
521
311
|
/**
|
|
522
|
-
*
|
|
523
|
-
*
|
|
524
|
-
* The low-level, fal-specific client for AI image generation and fal utilities
|
|
525
|
-
* (queue, upload, upscale, rmbg, video, tools, generate). Pairs with the
|
|
526
|
-
* provider-agnostic `createMotifImage` (`@howells/motif-sdk/image`) as the
|
|
527
|
-
* fal-native entry point.
|
|
312
|
+
* Whether a fal HTTP failure means the account is locked.
|
|
528
313
|
*
|
|
529
|
-
*
|
|
314
|
+
* fal answers `403 {"detail":"User is locked. Reason: TOP_UP."}` when the
|
|
315
|
+
* account has run out of credit. Retrying cannot help, and the key is valid.
|
|
316
|
+
*/
|
|
317
|
+
export declare function isFalAccountLocked(status: number, body: string): boolean;
|
|
318
|
+
//#endregion
|
|
319
|
+
//#region src/tasks.d.ts
|
|
320
|
+
/**
|
|
321
|
+
* The Task registry: every job Motif does, with the Models that can do it
|
|
322
|
+
* ranked best-first and tagged with the Tier each belongs to.
|
|
530
323
|
*
|
|
531
|
-
*
|
|
532
|
-
*
|
|
533
|
-
*
|
|
324
|
+
* Rankings are data so a default change is visible in a pull request. A Task
|
|
325
|
+
* ranked from the bench's human comparisons says `rankedFrom: "bench"`; every
|
|
326
|
+
* other Task is hand-ranked from published quality numbers and fal price, and
|
|
327
|
+
* says so. Today no Task is bench-ranked: the bench holds two human ratings,
|
|
328
|
+
* both on one model, which is not an order.
|
|
534
329
|
*
|
|
535
|
-
*
|
|
536
|
-
*
|
|
330
|
+
* Model ids are the short aliases `-m` and `TaskInput.model` accept. `resolveTask` in `./resolve` is the only place a Model is
|
|
331
|
+
* chosen from these lists.
|
|
537
332
|
*
|
|
538
|
-
*
|
|
539
|
-
*
|
|
540
|
-
*
|
|
541
|
-
*
|
|
542
|
-
* }
|
|
543
|
-
* ```
|
|
333
|
+
* A Task can have modes: a variant of the job a caller names explicitly, such
|
|
334
|
+
* as erasing text rather than an object. A ranked entry with a `mode` is only
|
|
335
|
+
* chosen when the request names that mode; an entry without one only when it
|
|
336
|
+
* names none. A Model can appear once per mode.
|
|
544
337
|
*/
|
|
545
|
-
export declare
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
/**
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
/**
|
|
563
|
-
|
|
564
|
-
/**
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
/**
|
|
574
|
-
|
|
575
|
-
/**
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
/**
|
|
585
|
-
|
|
586
|
-
runTool(options: ToolRunOptions): Promise<Result$1<ToolResponse, MotifError>>;
|
|
587
|
-
/** ─── Queue-Based Tools ───────────────────────────────────── */
|
|
588
|
-
/**
|
|
589
|
-
* Submit a tool run to the fal queue. Returns as soon as fal accepts it.
|
|
590
|
-
*
|
|
591
|
-
* The queued counterpart to `runTool`, for endpoints that outrun the
|
|
592
|
-
* synchronous request timeout. Callers choose the path — neither one falls
|
|
593
|
-
* back to the other.
|
|
594
|
-
*/
|
|
595
|
-
submitTool(options: ToolRunOptions): Promise<Result$1<QueuedToolJob, MotifError>>;
|
|
596
|
-
/** Poll one queued tool run. */
|
|
597
|
-
checkToolStatus(job: QueuedToolJob): Promise<Result$1<JobStatus, MotifError>>;
|
|
598
|
-
/** Fetch the finished payload for a queued tool run. */
|
|
599
|
-
getToolResult(job: QueuedToolJob): Promise<Result$1<ToolResponse, MotifError>>;
|
|
600
|
-
/**
|
|
601
|
-
* Submit, poll to completion, and return the result. The convenience path
|
|
602
|
-
* for tools whose registry entry sets `queued`.
|
|
603
|
-
*/
|
|
604
|
-
runToolQueued(options: ToolRunOptions, onProgress?: (status: string, queuePosition?: number) => void): Promise<Result$1<ToolResponse, MotifError>>;
|
|
605
|
-
/**
|
|
606
|
-
* Delete fal's stored IO payloads for a completed request.
|
|
607
|
-
*
|
|
608
|
-
* This removes request input/output payload files exposed by fal's payloads
|
|
609
|
-
* API. It does not remove billing/account metadata or input files separately
|
|
610
|
-
* uploaded to fal storage before a request.
|
|
611
|
-
*/
|
|
612
|
-
deletePayloads(requestId: string): Promise<Result$1<void, MotifError>>;
|
|
613
|
-
/** Estimate cost for a generation (no API call). */
|
|
614
|
-
estimateCost(model: string, resolution?: Resolution, numImages?: number): number | null;
|
|
615
|
-
/** Build the fal.ai request body without sending it. */
|
|
616
|
-
buildRequestBody(options: GenerateOptions): {
|
|
617
|
-
endpoint: string;
|
|
618
|
-
body: Record<string, unknown>;
|
|
619
|
-
};
|
|
620
|
-
/** Model registry. */
|
|
621
|
-
get models(): Record<string, ModelConfig>;
|
|
622
|
-
/** Generation model keys. */
|
|
623
|
-
get generationModels(): readonly ["flare", "sunburst", "gpt2", "gpt", "banana2", "banana", "gemini", "gemini3", "seedream4", "seedream45", "seedream5", "seedream5-lite", "flux2-max", "flux2-pro", "flux2-flex", "flux2-dev", "flux2-turbo", "flux", "flux-fast", "recraft", "recraft4", "ideogram", "ideogram4", "grok-image", "qwen", "qwen3"];
|
|
624
|
-
/** Utility model keys. */
|
|
625
|
-
get utilityModels(): readonly ["clarity", "crystal", "rmbg", "bria"];
|
|
626
|
-
/** Registered fal utility/tool endpoints. */
|
|
627
|
-
get tools(): {
|
|
628
|
-
readonly "got-ocr": {
|
|
629
|
-
readonly category: "analysis";
|
|
630
|
-
readonly description: "Transcribe text from one or more images, optionally as formatted multi-page output.";
|
|
631
|
-
readonly endpoint: "fal-ai/got-ocr/v2";
|
|
632
|
-
readonly inputField: "input_image_urls";
|
|
633
|
-
readonly inputKind: "images";
|
|
634
|
-
readonly name: "GOT-OCR 2.0";
|
|
635
|
-
readonly outputKeys: ["outputs"];
|
|
636
|
-
readonly price: {
|
|
637
|
-
readonly kind: "metered";
|
|
638
|
-
};
|
|
639
|
-
readonly pricing: "$0.05/image";
|
|
640
|
-
readonly queued: true;
|
|
641
|
-
readonly sourceUrl: "https://fal.ai/models/fal-ai/got-ocr/v2";
|
|
642
|
-
readonly task: "optical character recognition";
|
|
643
|
-
};
|
|
644
|
-
readonly "moondream-caption": {
|
|
645
|
-
readonly category: "analysis";
|
|
646
|
-
readonly description: "Write a short, normal, or long caption for an image.";
|
|
647
|
-
readonly endpoint: "fal-ai/moondream3-preview/caption";
|
|
648
|
-
readonly inputField: "image_url";
|
|
649
|
-
readonly inputKind: "image";
|
|
650
|
-
readonly name: "Moondream 3 Caption";
|
|
651
|
-
readonly outputKeys: ["output"];
|
|
652
|
-
readonly price: {
|
|
653
|
-
readonly kind: "metered";
|
|
654
|
-
};
|
|
655
|
-
readonly pricing: "$0.40/M input tokens, $3.50/M output tokens";
|
|
656
|
-
readonly sourceUrl: "https://fal.ai/models/fal-ai/moondream3-preview/caption";
|
|
657
|
-
readonly task: "image captioning";
|
|
658
|
-
};
|
|
659
|
-
readonly "moondream-detect": {
|
|
660
|
-
readonly category: "analysis";
|
|
661
|
-
readonly description: "Detect prompted objects and return their bounding boxes, with an optional preview.";
|
|
662
|
-
readonly endpoint: "fal-ai/moondream3-preview/detect";
|
|
663
|
-
readonly inputField: "image_url";
|
|
664
|
-
readonly inputKind: "image";
|
|
665
|
-
readonly name: "Moondream 3 Detect";
|
|
666
|
-
readonly outputKeys: ["objects", "image"];
|
|
667
|
-
readonly price: {
|
|
668
|
-
readonly kind: "metered";
|
|
669
|
-
};
|
|
670
|
-
readonly pricing: "$0.40/M input tokens, $3.50/M output tokens";
|
|
671
|
-
readonly sourceUrl: "https://fal.ai/models/fal-ai/moondream3-preview/detect";
|
|
672
|
-
readonly task: "object detection";
|
|
673
|
-
};
|
|
674
|
-
readonly "moondream-point": {
|
|
675
|
-
readonly category: "analysis";
|
|
676
|
-
readonly description: "Return point coordinates for every instance of a prompted subject.";
|
|
677
|
-
readonly endpoint: "fal-ai/moondream3-preview/point";
|
|
678
|
-
readonly inputField: "image_url";
|
|
679
|
-
readonly inputKind: "image";
|
|
680
|
-
readonly name: "Moondream 3 Point";
|
|
681
|
-
readonly outputKeys: ["points", "image"];
|
|
682
|
-
readonly price: {
|
|
683
|
-
readonly kind: "metered";
|
|
684
|
-
};
|
|
685
|
-
readonly pricing: "$0.40/M input tokens, $3.50/M output tokens";
|
|
686
|
-
readonly sourceUrl: "https://fal.ai/models/fal-ai/moondream3-preview/point";
|
|
687
|
-
readonly task: "object pointing";
|
|
688
|
-
};
|
|
689
|
-
readonly "moondream-query": {
|
|
690
|
-
readonly category: "analysis";
|
|
691
|
-
readonly description: "Answer a free-form question about an image, with reasoning.";
|
|
692
|
-
readonly endpoint: "fal-ai/moondream3-preview/query";
|
|
693
|
-
readonly inputField: "image_url";
|
|
694
|
-
readonly inputKind: "image";
|
|
695
|
-
readonly name: "Moondream 3 Query";
|
|
696
|
-
readonly outputKeys: ["output", "reasoning"];
|
|
697
|
-
readonly price: {
|
|
698
|
-
readonly kind: "metered";
|
|
699
|
-
};
|
|
700
|
-
readonly pricing: "$0.40/M input tokens, $3.50/M output tokens";
|
|
701
|
-
readonly sourceUrl: "https://fal.ai/models/fal-ai/moondream3-preview/query";
|
|
702
|
-
readonly task: "visual question answering";
|
|
703
|
-
};
|
|
704
|
-
readonly nsfw: {
|
|
705
|
-
readonly category: "moderation";
|
|
706
|
-
readonly description: "Predict whether one or more images contain NSFW concepts.";
|
|
707
|
-
readonly endpoint: "fal-ai/x-ailab/nsfw";
|
|
708
|
-
readonly inputField: "image_urls";
|
|
709
|
-
readonly inputKind: "images";
|
|
710
|
-
readonly name: "NSFW Checker";
|
|
711
|
-
readonly outputKeys: ["has_nsfw_concepts"];
|
|
712
|
-
readonly price: {
|
|
713
|
-
readonly kind: "metered";
|
|
714
|
-
};
|
|
715
|
-
readonly pricing: "$0.001/image";
|
|
716
|
-
readonly sourceUrl: "https://fal.ai/models/fal-ai/x-ailab/nsfw";
|
|
717
|
-
readonly task: "vision moderation";
|
|
718
|
-
};
|
|
719
|
-
readonly "hunyuan3d-v3": {
|
|
720
|
-
readonly category: "3d";
|
|
721
|
-
readonly description: "Reconstruct a textured 3D mesh from a single image, with optional multi-view inputs.";
|
|
722
|
-
readonly endpoint: "fal-ai/hunyuan3d-v3/image-to-3d";
|
|
723
|
-
readonly inputField: "input_image_url";
|
|
724
|
-
readonly inputKind: "image";
|
|
725
|
-
readonly name: "Hunyuan3D v3 Image to 3D";
|
|
726
|
-
readonly outputKeys: ["model_glb", "model_urls", "thumbnail"];
|
|
727
|
-
readonly price: {
|
|
728
|
-
readonly kind: "call";
|
|
729
|
-
readonly usd: 0.375;
|
|
730
|
-
};
|
|
731
|
-
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";
|
|
732
|
-
readonly queued: true;
|
|
733
|
-
readonly sourceUrl: "https://fal.ai/models/fal-ai/hunyuan3d-v3/image-to-3d";
|
|
734
|
-
readonly task: "single-image 3D reconstruction";
|
|
735
|
-
};
|
|
736
|
-
readonly "ideogram-layerize-text": {
|
|
737
|
-
readonly category: "layers";
|
|
738
|
-
readonly description: "Split an image into background image layers plus editable HTML text containers.";
|
|
739
|
-
readonly endpoint: "fal-ai/ideogram/v3/layerize-text";
|
|
740
|
-
readonly inputField: "image_url";
|
|
741
|
-
readonly inputKind: "image";
|
|
742
|
-
readonly name: "Ideogram v3 Text Layerize";
|
|
743
|
-
readonly outputKeys: ["image_layers", "image", "text_html", "text_containers"];
|
|
744
|
-
readonly price: {
|
|
745
|
-
readonly kind: "call";
|
|
746
|
-
readonly usd: 0.09;
|
|
747
|
-
};
|
|
748
|
-
readonly pricing: "$0.09/image";
|
|
749
|
-
readonly queued: true;
|
|
750
|
-
readonly sourceUrl: "https://fal.ai/models/fal-ai/ideogram/v3/layerize-text";
|
|
751
|
-
readonly task: "text and image layer extraction";
|
|
752
|
-
};
|
|
753
|
-
readonly "ideogram-tiling": {
|
|
754
|
-
readonly category: "material";
|
|
755
|
-
readonly description: "Generate a seamlessly tiling texture, optionally conditioned on a source image.";
|
|
756
|
-
readonly endpoint: "ideogram/v4/tiling";
|
|
757
|
-
readonly inputField: "image_url";
|
|
758
|
-
readonly inputKind: "image";
|
|
759
|
-
readonly name: "Ideogram v4 Tiling";
|
|
760
|
-
readonly outputKeys: ["images"];
|
|
761
|
-
readonly price: {
|
|
762
|
-
readonly kind: "megapixel";
|
|
763
|
-
readonly usd: 0.06;
|
|
764
|
-
};
|
|
765
|
-
readonly pricing: "$0.06/megapixel at the default BALANCED speed; $0.03 turbo, $0.10 quality";
|
|
766
|
-
readonly sourceUrl: "https://fal.ai/models/ideogram/v4/tiling";
|
|
767
|
-
readonly task: "seamless texture generation";
|
|
768
|
-
};
|
|
769
|
-
readonly image2svg: {
|
|
770
|
-
readonly category: "vector";
|
|
771
|
-
readonly description: "Trace a raster image into layered SVG paths.";
|
|
772
|
-
readonly endpoint: "fal-ai/image2svg";
|
|
773
|
-
readonly inputField: "image_url";
|
|
774
|
-
readonly inputKind: "image";
|
|
775
|
-
readonly name: "Image to SVG";
|
|
776
|
-
readonly outputKeys: ["images"];
|
|
777
|
-
readonly price: {
|
|
778
|
-
readonly kind: "call";
|
|
779
|
-
readonly usd: 0.005;
|
|
780
|
-
};
|
|
781
|
-
readonly pricing: "$0.005/image";
|
|
782
|
-
readonly sourceUrl: "https://fal.ai/models/fal-ai/image2svg";
|
|
783
|
-
readonly task: "raster to vector tracing";
|
|
784
|
-
};
|
|
785
|
-
readonly patina: {
|
|
786
|
-
readonly category: "material";
|
|
787
|
-
readonly description: "Decompose a surface photograph into PBR maps: basecolor, normal, roughness, metalness, height.";
|
|
788
|
-
readonly endpoint: "fal-ai/patina";
|
|
789
|
-
readonly inputField: "image_url";
|
|
790
|
-
readonly inputKind: "image";
|
|
791
|
-
readonly name: "Patina PBR Maps";
|
|
792
|
-
readonly outputKeys: ["images"];
|
|
793
|
-
readonly outputLabels: {
|
|
794
|
-
readonly images: {
|
|
795
|
-
readonly fallback: readonly ["basecolor", "normal", "roughness", "metalness", "height"];
|
|
796
|
-
readonly fromOption: "maps";
|
|
797
|
-
};
|
|
798
|
-
};
|
|
799
|
-
readonly price: {
|
|
800
|
-
readonly kind: "metered";
|
|
801
|
-
};
|
|
802
|
-
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";
|
|
803
|
-
readonly queued: true;
|
|
804
|
-
readonly sourceUrl: "https://fal.ai/models/fal-ai/patina";
|
|
805
|
-
readonly task: "PBR material decomposition";
|
|
806
|
-
};
|
|
807
|
-
readonly "patina-extract": {
|
|
808
|
-
readonly category: "material";
|
|
809
|
-
readonly description: "Extract a tiling PBR material from a prompted region of a photograph.";
|
|
810
|
-
readonly endpoint: "fal-ai/patina/material/extract";
|
|
811
|
-
readonly inputField: "image_url";
|
|
812
|
-
readonly inputKind: "image";
|
|
813
|
-
readonly name: "Patina Material Extract";
|
|
814
|
-
readonly outputKeys: ["images"];
|
|
815
|
-
readonly outputLabels: {
|
|
816
|
-
readonly images: {
|
|
817
|
-
readonly fallback: readonly ["basecolor", "normal", "roughness", "metalness", "height"];
|
|
818
|
-
readonly fromOption: "maps";
|
|
819
|
-
};
|
|
820
|
-
};
|
|
821
|
-
readonly price: {
|
|
822
|
-
readonly kind: "metered";
|
|
823
|
-
};
|
|
824
|
-
readonly pricing: "$0.10 base only; add $0.02/megapixel plus $0.01/megapixel per map, so 1MP with all 5 maps is $0.17";
|
|
825
|
-
readonly queued: true;
|
|
826
|
-
readonly sourceUrl: "https://fal.ai/models/fal-ai/patina/material/extract";
|
|
827
|
-
readonly task: "tiling material extraction";
|
|
828
|
-
};
|
|
829
|
-
readonly "qwen-layered": {
|
|
830
|
-
readonly category: "layers";
|
|
831
|
-
readonly description: "Split an image into a configurable number of stacked RGBA layers.";
|
|
832
|
-
readonly endpoint: "fal-ai/qwen-image-layered";
|
|
833
|
-
readonly inputField: "image_url";
|
|
834
|
-
readonly inputKind: "image";
|
|
835
|
-
readonly name: "Qwen Image Layered";
|
|
836
|
-
readonly outputKeys: ["images"];
|
|
837
|
-
readonly price: {
|
|
838
|
-
readonly kind: "metered";
|
|
839
|
-
};
|
|
840
|
-
readonly pricing: "$0.05 per image; fal does not say whether that counts the input image or each of the generated layers, so no estimate is reported";
|
|
841
|
-
readonly queued: true;
|
|
842
|
-
readonly sourceUrl: "https://fal.ai/models/fal-ai/qwen-image-layered";
|
|
843
|
-
readonly task: "image layer decomposition";
|
|
844
|
-
};
|
|
845
|
-
readonly "recraft-vectorize": {
|
|
846
|
-
readonly category: "vector";
|
|
847
|
-
readonly description: "Convert a raster image into a clean SVG.";
|
|
848
|
-
readonly endpoint: "fal-ai/recraft/vectorize";
|
|
849
|
-
readonly inputField: "image_url";
|
|
850
|
-
readonly inputKind: "image";
|
|
851
|
-
readonly name: "Recraft Vectorize";
|
|
852
|
-
readonly outputKeys: ["image"];
|
|
853
|
-
readonly price: {
|
|
854
|
-
readonly kind: "call";
|
|
855
|
-
readonly usd: 0.04;
|
|
856
|
-
};
|
|
857
|
-
readonly pricing: "$0.04/image, $0.08 with a vector style";
|
|
858
|
-
readonly sourceUrl: "https://fal.ai/models/fal-ai/recraft/vectorize";
|
|
859
|
-
readonly task: "raster to vector conversion";
|
|
860
|
-
};
|
|
861
|
-
readonly "sam3-3d-align": {
|
|
862
|
-
readonly category: "3d";
|
|
863
|
-
readonly description: "Align SAM 3D objects and bodies into a shared scene.";
|
|
864
|
-
readonly endpoint: "fal-ai/sam-3/3d-align";
|
|
865
|
-
readonly inputField: "image_url";
|
|
866
|
-
readonly inputKind: "image";
|
|
867
|
-
readonly name: "SAM 3D Align";
|
|
868
|
-
readonly outputKeys: ["scene_glb", "model_glb", "visualization", "body_mesh_ply", "metadata"];
|
|
869
|
-
readonly price: {
|
|
870
|
-
readonly kind: "metered";
|
|
871
|
-
};
|
|
872
|
-
readonly pricing: "$0.02 per unit; fal does not define a unit, so no estimate is reported";
|
|
873
|
-
readonly queued: true;
|
|
874
|
-
readonly sourceUrl: "https://fal.ai/models/fal-ai/sam-3/3d-align";
|
|
875
|
-
readonly task: "3D scene alignment";
|
|
876
|
-
};
|
|
877
|
-
readonly "sam3-3d-body": {
|
|
878
|
-
readonly category: "3d";
|
|
879
|
-
readonly defaultOptions: {
|
|
880
|
-
readonly export_meshes: true;
|
|
881
|
-
readonly include_3d_keypoints: true;
|
|
882
|
-
readonly include_mhr_params: true;
|
|
883
|
-
};
|
|
884
|
-
readonly description: "Reconstruct human body meshes and keypoints from a single image.";
|
|
885
|
-
readonly endpoint: "fal-ai/sam-3/3d-body";
|
|
886
|
-
readonly inputField: "image_url";
|
|
887
|
-
readonly inputKind: "image";
|
|
888
|
-
readonly name: "SAM 3D Body";
|
|
889
|
-
readonly outputKeys: ["model_glb", "visualization", "meshes", "metadata"];
|
|
890
|
-
readonly price: {
|
|
891
|
-
readonly kind: "metered";
|
|
892
|
-
};
|
|
893
|
-
readonly pricing: "$0.02 per unit; fal does not define a unit, so no estimate is reported";
|
|
894
|
-
readonly queued: true;
|
|
895
|
-
readonly sourceUrl: "https://fal.ai/models/fal-ai/sam-3/3d-body";
|
|
896
|
-
readonly task: "single-image 3D body reconstruction";
|
|
897
|
-
};
|
|
898
|
-
readonly "sam3-3d-objects": {
|
|
899
|
-
readonly category: "3d";
|
|
900
|
-
readonly defaultOptions: {
|
|
901
|
-
readonly prompt: "car";
|
|
902
|
-
};
|
|
903
|
-
readonly description: "Reconstruct one or more 3D objects from an image and prompts.";
|
|
904
|
-
readonly endpoint: "fal-ai/sam-3/3d-objects";
|
|
905
|
-
readonly inputField: "image_url";
|
|
906
|
-
readonly inputKind: "image";
|
|
907
|
-
readonly name: "SAM 3D Objects";
|
|
908
|
-
readonly outputKeys: ["gaussian_splat", "model_glb", "metadata", "individual_splats", "individual_glbs", "artifacts_zip"];
|
|
909
|
-
readonly price: {
|
|
910
|
-
readonly kind: "metered";
|
|
911
|
-
};
|
|
912
|
-
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";
|
|
913
|
-
readonly queued: true;
|
|
914
|
-
readonly sourceUrl: "https://fal.ai/models/fal-ai/sam-3/3d-objects";
|
|
915
|
-
readonly task: "single-image 3D object reconstruction";
|
|
916
|
-
};
|
|
917
|
-
readonly "seedream-layerize": {
|
|
918
|
-
readonly category: "layers";
|
|
919
|
-
readonly description: "Split an image into editable Seedream layers plus flattened previews.";
|
|
920
|
-
readonly endpoint: "bytedance/seedream/v5/pro/layerize";
|
|
921
|
-
readonly inputField: "image_url";
|
|
922
|
-
readonly inputKind: "image";
|
|
923
|
-
readonly name: "Seedream v5 Pro Layerize";
|
|
924
|
-
readonly outputKeys: ["layers", "images"];
|
|
925
|
-
readonly outputLabels: {
|
|
926
|
-
readonly layers: {
|
|
927
|
-
readonly fromItem: {
|
|
928
|
-
readonly nameField: "name";
|
|
929
|
-
readonly orderField: "z_index";
|
|
930
|
-
};
|
|
931
|
-
};
|
|
932
|
-
};
|
|
933
|
-
readonly price: {
|
|
934
|
-
readonly kind: "metered";
|
|
935
|
-
};
|
|
936
|
-
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";
|
|
937
|
-
readonly queued: true;
|
|
938
|
-
readonly sourceUrl: "https://fal.ai/models/bytedance/seedream/v5/pro/layerize";
|
|
939
|
-
readonly task: "image layer decomposition";
|
|
940
|
-
};
|
|
941
|
-
readonly "seedvr-seamless": {
|
|
942
|
-
readonly category: "material";
|
|
943
|
-
readonly description: "Upscale a tiling texture while keeping its edges seamless. ";
|
|
944
|
-
readonly endpoint: "fal-ai/seedvr/upscale/image/seamless";
|
|
945
|
-
readonly inputField: "image_url";
|
|
946
|
-
readonly inputKind: "image";
|
|
947
|
-
readonly name: "SeedVR Seamless Upscale";
|
|
948
|
-
readonly outputKeys: ["image"];
|
|
949
|
-
readonly price: {
|
|
950
|
-
readonly kind: "megapixel";
|
|
951
|
-
readonly usd: 0.0025;
|
|
952
|
-
};
|
|
953
|
-
readonly pricing: "$0.0025/megapixel";
|
|
954
|
-
readonly queued: true;
|
|
955
|
-
readonly sourceUrl: "https://fal.ai/models/fal-ai/seedvr/upscale/image/seamless";
|
|
956
|
-
readonly task: "seamless texture upscaling";
|
|
957
|
-
};
|
|
958
|
-
readonly "trellis-2": {
|
|
959
|
-
readonly category: "3d";
|
|
960
|
-
readonly description: "Reconstruct a textured 3D mesh from a single image, with UV unwrapping.";
|
|
961
|
-
readonly endpoint: "fal-ai/trellis-2";
|
|
962
|
-
readonly inputField: "image_url";
|
|
963
|
-
readonly inputKind: "image";
|
|
964
|
-
readonly name: "TRELLIS 2";
|
|
965
|
-
readonly outputKeys: ["model_glb"];
|
|
966
|
-
readonly price: {
|
|
967
|
-
readonly kind: "call";
|
|
968
|
-
readonly usd: 0.3;
|
|
969
|
-
};
|
|
970
|
-
readonly pricing: "$0.30 at the default 1024p; $0.25 at 512p, $0.35 at 1536p";
|
|
971
|
-
readonly queued: true;
|
|
972
|
-
readonly sourceUrl: "https://fal.ai/models/fal-ai/trellis-2";
|
|
973
|
-
readonly task: "single-image 3D reconstruction";
|
|
974
|
-
};
|
|
975
|
-
readonly "ben-v2": {
|
|
976
|
-
readonly category: "background";
|
|
977
|
-
readonly description: "Fast, high-quality background removal for images.";
|
|
978
|
-
readonly endpoint: "fal-ai/ben/v2/image";
|
|
979
|
-
readonly inputField: "image_url";
|
|
980
|
-
readonly inputKind: "image";
|
|
981
|
-
readonly name: "BEN v2 Background Removal";
|
|
982
|
-
readonly outputKeys: ["image"];
|
|
983
|
-
readonly price: {
|
|
984
|
-
readonly kind: "megapixel";
|
|
985
|
-
readonly usd: 0.025;
|
|
986
|
-
};
|
|
987
|
-
readonly pricing: "$0.025/megapixel";
|
|
988
|
-
readonly sourceUrl: "https://fal.ai/models/fal-ai/ben/v2/image";
|
|
989
|
-
readonly task: "image background removal";
|
|
990
|
-
};
|
|
991
|
-
readonly birefnet: {
|
|
992
|
-
readonly category: "background";
|
|
993
|
-
readonly defaultOptions: {
|
|
994
|
-
readonly model: "General Use (Light)";
|
|
995
|
-
readonly operating_resolution: "1024x1024";
|
|
996
|
-
readonly output_format: "png";
|
|
997
|
-
readonly refine_foreground: true;
|
|
998
|
-
};
|
|
999
|
-
readonly description: "High-resolution dichotomous image segmentation and background removal.";
|
|
1000
|
-
readonly endpoint: "fal-ai/birefnet/v2";
|
|
1001
|
-
readonly inputField: "image_url";
|
|
1002
|
-
readonly inputKind: "image";
|
|
1003
|
-
readonly name: "BirefNet Background Removal";
|
|
1004
|
-
readonly outputKeys: ["image", "mask_image"];
|
|
1005
|
-
readonly price: {
|
|
1006
|
-
readonly kind: "metered";
|
|
1007
|
-
};
|
|
1008
|
-
readonly pricing: "$0/compute-second listed by fal";
|
|
1009
|
-
readonly sourceUrl: "https://fal.ai/models/fal-ai/birefnet/v2";
|
|
1010
|
-
readonly task: "image background removal";
|
|
1011
|
-
};
|
|
1012
|
-
readonly "bria-rmbg": {
|
|
1013
|
-
readonly category: "background";
|
|
1014
|
-
readonly description: "Commercial-safe background removal for images.";
|
|
1015
|
-
readonly endpoint: "fal-ai/bria/background/remove";
|
|
1016
|
-
readonly inputField: "image_url";
|
|
1017
|
-
readonly inputKind: "image";
|
|
1018
|
-
readonly name: "Bria RMBG 2.0";
|
|
1019
|
-
readonly outputKeys: ["image"];
|
|
1020
|
-
readonly price: {
|
|
1021
|
-
readonly kind: "call";
|
|
1022
|
-
readonly usd: 0.018;
|
|
1023
|
-
};
|
|
1024
|
-
readonly pricing: "$0.018/generation";
|
|
1025
|
-
readonly sourceUrl: "https://fal.ai/models/fal-ai/bria/background/remove";
|
|
1026
|
-
readonly task: "image background removal";
|
|
1027
|
-
};
|
|
1028
|
-
readonly "bria-video-rmbg": {
|
|
1029
|
-
readonly category: "background";
|
|
1030
|
-
readonly defaultOptions: {
|
|
1031
|
-
readonly background_color: "Black";
|
|
1032
|
-
readonly output_container_and_codec: "webm_vp9";
|
|
1033
|
-
readonly preserve_audio: true;
|
|
1034
|
-
};
|
|
1035
|
-
readonly description: "Remove video backgrounds with configurable output container.";
|
|
1036
|
-
readonly endpoint: "bria/video/background-removal";
|
|
1037
|
-
readonly inputField: "video_url";
|
|
1038
|
-
readonly inputKind: "video";
|
|
1039
|
-
readonly name: "Bria Video Background Removal";
|
|
1040
|
-
readonly outputKeys: ["video"];
|
|
1041
|
-
readonly price: {
|
|
1042
|
-
readonly kind: "second";
|
|
1043
|
-
readonly usd: 0.00425;
|
|
1044
|
-
};
|
|
1045
|
-
readonly pricing: "$0.00425/sec";
|
|
1046
|
-
readonly queued: true;
|
|
1047
|
-
readonly sourceUrl: "https://fal.ai/models/bria/video/background-removal";
|
|
1048
|
-
readonly task: "video background removal";
|
|
1049
|
-
};
|
|
1050
|
-
readonly ddcolor: {
|
|
1051
|
-
readonly category: "restoration";
|
|
1052
|
-
readonly description: "Colourise black-and-white photographs.";
|
|
1053
|
-
readonly endpoint: "fal-ai/ddcolor";
|
|
1054
|
-
readonly inputField: "image_url";
|
|
1055
|
-
readonly inputKind: "image";
|
|
1056
|
-
readonly name: "DDColor Colourisation";
|
|
1057
|
-
readonly outputKeys: ["image"];
|
|
1058
|
-
readonly price: {
|
|
1059
|
-
readonly kind: "megapixel";
|
|
1060
|
-
readonly usd: 0.001;
|
|
1061
|
-
};
|
|
1062
|
-
readonly pricing: "$0.001/megapixel";
|
|
1063
|
-
readonly sourceUrl: "https://fal.ai/models/fal-ai/ddcolor";
|
|
1064
|
-
readonly task: "photo colourisation";
|
|
1065
|
-
};
|
|
1066
|
-
readonly rembg: {
|
|
1067
|
-
readonly category: "background";
|
|
1068
|
-
readonly defaultOptions: {
|
|
1069
|
-
readonly crop_to_bbox: false;
|
|
1070
|
-
};
|
|
1071
|
-
readonly description: "Generic image background removal utility.";
|
|
1072
|
-
readonly endpoint: "fal-ai/imageutils/rembg";
|
|
1073
|
-
readonly inputField: "image_url";
|
|
1074
|
-
readonly inputKind: "image";
|
|
1075
|
-
readonly name: "Remove Background";
|
|
1076
|
-
readonly outputKeys: ["image"];
|
|
1077
|
-
readonly price: {
|
|
1078
|
-
readonly kind: "metered";
|
|
1079
|
-
};
|
|
1080
|
-
readonly pricing: "$0/compute-second listed by fal";
|
|
1081
|
-
readonly sourceUrl: "https://fal.ai/models/fal-ai/imageutils/rembg";
|
|
1082
|
-
readonly task: "image background removal";
|
|
1083
|
-
};
|
|
1084
|
-
readonly "seedvr-upscale": {
|
|
1085
|
-
readonly category: "restoration";
|
|
1086
|
-
readonly defaultOptions: {
|
|
1087
|
-
readonly output_format: "png";
|
|
1088
|
-
};
|
|
1089
|
-
readonly description: "Diffusion image restoration and upscaling with SeedVR.";
|
|
1090
|
-
readonly endpoint: "fal-ai/seedvr/upscale/image";
|
|
1091
|
-
readonly inputField: "image_url";
|
|
1092
|
-
readonly inputKind: "image";
|
|
1093
|
-
readonly name: "SeedVR Image Upscale";
|
|
1094
|
-
readonly outputKeys: ["image"];
|
|
1095
|
-
readonly price: {
|
|
1096
|
-
readonly kind: "megapixel";
|
|
1097
|
-
readonly usd: 0.001;
|
|
1098
|
-
};
|
|
1099
|
-
readonly pricing: "$0.001/megapixel";
|
|
1100
|
-
readonly queued: true;
|
|
1101
|
-
readonly sourceUrl: "https://fal.ai/models/fal-ai/seedvr/upscale/image";
|
|
1102
|
-
readonly task: "image restoration and upscaling";
|
|
1103
|
-
};
|
|
1104
|
-
readonly "topaz-adjust": {
|
|
1105
|
-
readonly category: "restoration";
|
|
1106
|
-
readonly defaultOptions: {
|
|
1107
|
-
readonly output_format: "png";
|
|
1108
|
-
};
|
|
1109
|
-
readonly description: "Topaz exposure, white balance, and colour adjustment.";
|
|
1110
|
-
readonly endpoint: "topaz/adjust/image";
|
|
1111
|
-
readonly inputField: "image_url";
|
|
1112
|
-
readonly inputKind: "image";
|
|
1113
|
-
readonly name: "Topaz Adjust";
|
|
1114
|
-
readonly outputKeys: ["image"];
|
|
1115
|
-
readonly price: {
|
|
1116
|
-
readonly kind: "megapixel";
|
|
1117
|
-
readonly usd: number;
|
|
1118
|
-
};
|
|
1119
|
-
readonly pricing: "$0.08 per 24 output megapixels";
|
|
1120
|
-
readonly queued: true;
|
|
1121
|
-
readonly sourceUrl: "https://fal.ai/models/topaz/adjust/image";
|
|
1122
|
-
readonly task: "tonal adjustment";
|
|
1123
|
-
};
|
|
1124
|
-
readonly "topaz-creative": {
|
|
1125
|
-
readonly category: "restoration";
|
|
1126
|
-
readonly defaultOptions: {
|
|
1127
|
-
readonly output_format: "png";
|
|
1128
|
-
};
|
|
1129
|
-
readonly description: "Topaz Bloom upscaling, which reimagines detail rather than preserving it.";
|
|
1130
|
-
readonly endpoint: "topaz/upscale/image/creative";
|
|
1131
|
-
readonly inputField: "image_url";
|
|
1132
|
-
readonly inputKind: "image";
|
|
1133
|
-
readonly name: "Topaz Creative Upscale";
|
|
1134
|
-
readonly outputKeys: ["image"];
|
|
1135
|
-
readonly price: {
|
|
1136
|
-
readonly kind: "megapixel";
|
|
1137
|
-
readonly usd: number;
|
|
1138
|
-
};
|
|
1139
|
-
readonly pricing: "$0.96 per 24 output megapixels";
|
|
1140
|
-
readonly queued: true;
|
|
1141
|
-
readonly sourceUrl: "https://fal.ai/models/topaz/upscale/image/creative";
|
|
1142
|
-
readonly task: "creative image upscaling";
|
|
1143
|
-
};
|
|
1144
|
-
readonly "topaz-denoise": {
|
|
1145
|
-
readonly category: "restoration";
|
|
1146
|
-
readonly defaultOptions: {
|
|
1147
|
-
readonly output_format: "png";
|
|
1148
|
-
};
|
|
1149
|
-
readonly description: "Topaz noise reduction at source resolution.";
|
|
1150
|
-
readonly endpoint: "topaz/denoise/image";
|
|
1151
|
-
readonly inputField: "image_url";
|
|
1152
|
-
readonly inputKind: "image";
|
|
1153
|
-
readonly name: "Topaz Denoise";
|
|
1154
|
-
readonly outputKeys: ["image"];
|
|
1155
|
-
readonly price: {
|
|
1156
|
-
readonly kind: "megapixel";
|
|
1157
|
-
readonly usd: number;
|
|
1158
|
-
};
|
|
1159
|
-
readonly pricing: "$0.08 per 24 output megapixels at the default Normal model; $0.16 with Denoise Max";
|
|
1160
|
-
readonly queued: true;
|
|
1161
|
-
readonly sourceUrl: "https://fal.ai/models/topaz/denoise/image";
|
|
1162
|
-
readonly task: "image denoising";
|
|
1163
|
-
};
|
|
1164
|
-
readonly "topaz-generative": {
|
|
1165
|
-
readonly category: "restoration";
|
|
1166
|
-
readonly defaultOptions: {
|
|
1167
|
-
readonly output_format: "png";
|
|
1168
|
-
};
|
|
1169
|
-
readonly description: "Topaz Wonder upscaling, which synthesises plausible detail as it enlarges.";
|
|
1170
|
-
readonly endpoint: "topaz/upscale/image/generative";
|
|
1171
|
-
readonly inputField: "image_url";
|
|
1172
|
-
readonly inputKind: "image";
|
|
1173
|
-
readonly name: "Topaz Generative Upscale";
|
|
1174
|
-
readonly outputKeys: ["image"];
|
|
1175
|
-
readonly price: {
|
|
1176
|
-
readonly kind: "megapixel";
|
|
1177
|
-
readonly usd: number;
|
|
1178
|
-
};
|
|
1179
|
-
readonly pricing: "$0.24 per 24 output megapixels at the default Wonder 3; $0.48 with Wonder, Wonder 2, Standard MAX, Redefine or Recover 3";
|
|
1180
|
-
readonly queued: true;
|
|
1181
|
-
readonly sourceUrl: "https://fal.ai/models/topaz/upscale/image/generative";
|
|
1182
|
-
readonly task: "generative image upscaling";
|
|
1183
|
-
};
|
|
1184
|
-
readonly "topaz-image": {
|
|
1185
|
-
readonly category: "upscale";
|
|
1186
|
-
readonly defaultOptions: {
|
|
1187
|
-
readonly model: "Standard V2";
|
|
1188
|
-
readonly output_format: "jpeg";
|
|
1189
|
-
readonly upscale_factor: 2;
|
|
1190
|
-
};
|
|
1191
|
-
readonly description: "Professional Topaz image enhancement and upscaling.";
|
|
1192
|
-
readonly endpoint: "fal-ai/topaz/upscale/image";
|
|
1193
|
-
readonly inputField: "image_url";
|
|
1194
|
-
readonly inputKind: "image";
|
|
1195
|
-
readonly name: "Topaz Image Upscale";
|
|
1196
|
-
readonly outputKeys: ["image"];
|
|
1197
|
-
readonly price: {
|
|
1198
|
-
readonly kind: "megapixel";
|
|
1199
|
-
readonly usd: number;
|
|
1200
|
-
};
|
|
1201
|
-
readonly pricing: "$0.08 for output up to 24MP; $0.16 to 48MP, $0.32 to 96MP, up to $1.36 at 512MP";
|
|
1202
|
-
readonly queued: true;
|
|
1203
|
-
readonly sourceUrl: "https://fal.ai/models/fal-ai/topaz/upscale/image";
|
|
1204
|
-
readonly task: "image enhancement";
|
|
1205
|
-
};
|
|
1206
|
-
readonly "topaz-precision": {
|
|
1207
|
-
readonly category: "restoration";
|
|
1208
|
-
readonly defaultOptions: {
|
|
1209
|
-
readonly output_format: "png";
|
|
1210
|
-
};
|
|
1211
|
-
readonly description: "Topaz upscaling that preserves the original detail rather than inventing it.";
|
|
1212
|
-
readonly endpoint: "topaz/upscale/image/precision";
|
|
1213
|
-
readonly inputField: "image_url";
|
|
1214
|
-
readonly inputKind: "image";
|
|
1215
|
-
readonly name: "Topaz Precision Upscale";
|
|
1216
|
-
readonly outputKeys: ["image"];
|
|
1217
|
-
readonly price: {
|
|
1218
|
-
readonly kind: "megapixel";
|
|
1219
|
-
readonly usd: number;
|
|
1220
|
-
};
|
|
1221
|
-
readonly pricing: "$0.08 per 24 output megapixels, any precision model";
|
|
1222
|
-
readonly queued: true;
|
|
1223
|
-
readonly sourceUrl: "https://fal.ai/models/topaz/upscale/image/precision";
|
|
1224
|
-
readonly task: "faithful image upscaling";
|
|
1225
|
-
};
|
|
1226
|
-
readonly "topaz-restore": {
|
|
1227
|
-
readonly category: "restoration";
|
|
1228
|
-
readonly defaultOptions: {
|
|
1229
|
-
readonly output_format: "png";
|
|
1230
|
-
};
|
|
1231
|
-
readonly description: "Topaz restoration of damaged or degraded photographs at source resolution.";
|
|
1232
|
-
readonly endpoint: "topaz/restore/image";
|
|
1233
|
-
readonly inputField: "image_url";
|
|
1234
|
-
readonly inputKind: "image";
|
|
1235
|
-
readonly name: "Topaz Restore";
|
|
1236
|
-
readonly outputKeys: ["image"];
|
|
1237
|
-
readonly price: {
|
|
1238
|
-
readonly kind: "megapixel";
|
|
1239
|
-
readonly usd: number;
|
|
1240
|
-
};
|
|
1241
|
-
readonly pricing: "$0.48 per 24 output megapixels at the default Recover 3; $0.08 with Dust-Scratch V2";
|
|
1242
|
-
readonly queued: true;
|
|
1243
|
-
readonly sourceUrl: "https://fal.ai/models/topaz/restore/image";
|
|
1244
|
-
readonly task: "photo restoration";
|
|
1245
|
-
};
|
|
1246
|
-
readonly "topaz-sharpen": {
|
|
1247
|
-
readonly category: "restoration";
|
|
1248
|
-
readonly defaultOptions: {
|
|
1249
|
-
readonly output_format: "png";
|
|
1250
|
-
};
|
|
1251
|
-
readonly description: "Topaz deblurring and sharpening at source resolution.";
|
|
1252
|
-
readonly endpoint: "topaz/sharpen/image";
|
|
1253
|
-
readonly inputField: "image_url";
|
|
1254
|
-
readonly inputKind: "image";
|
|
1255
|
-
readonly name: "Topaz Sharpen";
|
|
1256
|
-
readonly outputKeys: ["image"];
|
|
1257
|
-
readonly price: {
|
|
1258
|
-
readonly kind: "megapixel";
|
|
1259
|
-
readonly usd: number;
|
|
1260
|
-
};
|
|
1261
|
-
readonly pricing: "$0.08 per 24 output megapixels at the default Standard model; $0.16 with Super Focus";
|
|
1262
|
-
readonly queued: true;
|
|
1263
|
-
readonly sourceUrl: "https://fal.ai/models/topaz/sharpen/image";
|
|
1264
|
-
readonly task: "image sharpening";
|
|
1265
|
-
};
|
|
1266
|
-
readonly "topaz-transparent": {
|
|
1267
|
-
readonly category: "restoration";
|
|
1268
|
-
readonly description: "Topaz upscaling that preserves the alpha channel end to end.";
|
|
1269
|
-
readonly endpoint: "topaz/upscale/image/transparent";
|
|
1270
|
-
readonly inputField: "image_url";
|
|
1271
|
-
readonly inputKind: "image";
|
|
1272
|
-
readonly name: "Topaz Transparent Upscale";
|
|
1273
|
-
readonly outputKeys: ["image"];
|
|
1274
|
-
readonly price: {
|
|
1275
|
-
readonly kind: "megapixel";
|
|
1276
|
-
readonly usd: number;
|
|
1277
|
-
};
|
|
1278
|
-
readonly pricing: "$0.08 per 24 output megapixels";
|
|
1279
|
-
readonly queued: true;
|
|
1280
|
-
readonly sourceUrl: "https://fal.ai/models/topaz/upscale/image/transparent";
|
|
1281
|
-
readonly task: "transparent image upscaling";
|
|
1282
|
-
};
|
|
1283
|
-
readonly "topaz-video": {
|
|
1284
|
-
readonly category: "upscale";
|
|
1285
|
-
readonly defaultOptions: {
|
|
1286
|
-
readonly model: "Proteus";
|
|
1287
|
-
readonly upscale_factor: 2;
|
|
1288
|
-
};
|
|
1289
|
-
readonly description: "Professional Topaz video enhancement and upscaling.";
|
|
1290
|
-
readonly endpoint: "fal-ai/topaz/upscale/video";
|
|
1291
|
-
readonly inputField: "video_url";
|
|
1292
|
-
readonly inputKind: "video";
|
|
1293
|
-
readonly name: "Topaz Video Upscale";
|
|
1294
|
-
readonly outputKeys: ["video"];
|
|
1295
|
-
readonly price: {
|
|
1296
|
-
readonly kind: "second";
|
|
1297
|
-
readonly usd: 0.01;
|
|
1298
|
-
};
|
|
1299
|
-
readonly pricing: "$0.01/sec up to 720p; $0.02 to 1080p, $0.08 above, doubled at 60fps, halved with Gaia 2";
|
|
1300
|
-
readonly queued: true;
|
|
1301
|
-
readonly sourceUrl: "https://fal.ai/models/fal-ai/topaz/upscale/video";
|
|
1302
|
-
readonly task: "video enhancement";
|
|
1303
|
-
};
|
|
1304
|
-
readonly "bria-eraser": {
|
|
1305
|
-
readonly category: "erase";
|
|
1306
|
-
readonly description: "Commercial-safe removal of a masked region, inpainted from surrounding context.";
|
|
1307
|
-
readonly endpoint: "fal-ai/bria/eraser";
|
|
1308
|
-
readonly inputField: "image_url";
|
|
1309
|
-
readonly inputKind: "image";
|
|
1310
|
-
readonly name: "Bria Eraser";
|
|
1311
|
-
readonly outputKeys: ["image"];
|
|
1312
|
-
readonly price: {
|
|
1313
|
-
readonly kind: "call";
|
|
1314
|
-
readonly usd: 0.04;
|
|
1315
|
-
};
|
|
1316
|
-
readonly pricing: "$0.04/generation";
|
|
1317
|
-
readonly sourceUrl: "https://fal.ai/models/fal-ai/bria/eraser";
|
|
1318
|
-
readonly task: "masked object erasure";
|
|
1319
|
-
};
|
|
1320
|
-
readonly "bria-expand": {
|
|
1321
|
-
readonly category: "reframe";
|
|
1322
|
-
readonly description: "Expand an image onto a larger canvas, generating the new border area.";
|
|
1323
|
-
readonly endpoint: "fal-ai/bria/expand";
|
|
1324
|
-
readonly inputField: "image_url";
|
|
1325
|
-
readonly inputKind: "image";
|
|
1326
|
-
readonly name: "Bria Image Expansion";
|
|
1327
|
-
readonly outputKeys: ["image"];
|
|
1328
|
-
readonly price: {
|
|
1329
|
-
readonly kind: "call";
|
|
1330
|
-
readonly usd: 0.04;
|
|
1331
|
-
};
|
|
1332
|
-
readonly pricing: "$0.04/generation";
|
|
1333
|
-
readonly sourceUrl: "https://fal.ai/models/fal-ai/bria/expand";
|
|
1334
|
-
readonly task: "image outpainting";
|
|
1335
|
-
};
|
|
1336
|
-
readonly "bria-genfill": {
|
|
1337
|
-
readonly category: "erase";
|
|
1338
|
-
readonly description: "Generative fill of a masked region from a prompt, commercial-safe.";
|
|
1339
|
-
readonly endpoint: "fal-ai/bria/genfill";
|
|
1340
|
-
readonly inputField: "image_url";
|
|
1341
|
-
readonly inputKind: "image";
|
|
1342
|
-
readonly name: "Bria GenFill";
|
|
1343
|
-
readonly outputKeys: ["images"];
|
|
1344
|
-
readonly price: {
|
|
1345
|
-
readonly kind: "call";
|
|
1346
|
-
readonly usd: 0.04;
|
|
1347
|
-
};
|
|
1348
|
-
readonly pricing: "$0.04/generation";
|
|
1349
|
-
readonly sourceUrl: "https://fal.ai/models/fal-ai/bria/genfill";
|
|
1350
|
-
readonly task: "masked generative fill";
|
|
1351
|
-
};
|
|
1352
|
-
readonly "finegrain-eraser": {
|
|
1353
|
-
readonly category: "erase";
|
|
1354
|
-
readonly description: "Remove a prompted object and its shadows and reflections, filling the gap.";
|
|
1355
|
-
readonly endpoint: "fal-ai/finegrain-eraser";
|
|
1356
|
-
readonly inputField: "image_url";
|
|
1357
|
-
readonly inputKind: "image";
|
|
1358
|
-
readonly name: "Finegrain Object Eraser";
|
|
1359
|
-
readonly outputKeys: ["image"];
|
|
1360
|
-
readonly price: {
|
|
1361
|
-
readonly kind: "call";
|
|
1362
|
-
readonly usd: 0.27;
|
|
1363
|
-
};
|
|
1364
|
-
readonly pricing: "$0.27/image at the default standard mode; $0.18 express, $0.36 premium";
|
|
1365
|
-
readonly sourceUrl: "https://fal.ai/models/fal-ai/finegrain-eraser";
|
|
1366
|
-
readonly task: "prompted object erasure";
|
|
1367
|
-
};
|
|
1368
|
-
readonly "flux-outpaint": {
|
|
1369
|
-
readonly category: "reframe";
|
|
1370
|
-
readonly description: "Outpaint an image by a per-edge pixel expansion with FLUX.2 pro.";
|
|
1371
|
-
readonly endpoint: "fal-ai/flux-2-pro/outpaint";
|
|
1372
|
-
readonly inputField: "image_url";
|
|
1373
|
-
readonly inputKind: "image";
|
|
1374
|
-
readonly name: "FLUX.2 Pro Outpaint";
|
|
1375
|
-
readonly outputKeys: ["images"];
|
|
1376
|
-
readonly price: {
|
|
1377
|
-
readonly kind: "metered";
|
|
1378
|
-
};
|
|
1379
|
-
readonly pricing: "$0.03 for the first output megapixel, then $0.015 per extra megapixel of input and output, rounded up";
|
|
1380
|
-
readonly sourceUrl: "https://fal.ai/models/fal-ai/flux-2-pro/outpaint";
|
|
1381
|
-
readonly task: "image outpainting";
|
|
1382
|
-
};
|
|
1383
|
-
readonly "iclight-v2": {
|
|
1384
|
-
readonly category: "relight";
|
|
1385
|
-
readonly description: "Relight a subject from a prompt, harmonising it with a new light direction.";
|
|
1386
|
-
readonly endpoint: "fal-ai/iclight-v2";
|
|
1387
|
-
readonly inputField: "image_url";
|
|
1388
|
-
readonly inputKind: "image";
|
|
1389
|
-
readonly name: "IC-Light v2";
|
|
1390
|
-
readonly outputKeys: ["images"];
|
|
1391
|
-
readonly price: {
|
|
1392
|
-
readonly kind: "megapixel";
|
|
1393
|
-
readonly usd: 0.1;
|
|
1394
|
-
};
|
|
1395
|
-
readonly pricing: "$0.10/megapixel";
|
|
1396
|
-
readonly sourceUrl: "https://fal.ai/models/fal-ai/iclight-v2";
|
|
1397
|
-
readonly task: "prompted relighting";
|
|
1398
|
-
};
|
|
1399
|
-
readonly "ideogram-reframe": {
|
|
1400
|
-
readonly category: "reframe";
|
|
1401
|
-
readonly description: "Reframe an image to a new aspect ratio, generating the fill.";
|
|
1402
|
-
readonly endpoint: "fal-ai/ideogram/v3/reframe";
|
|
1403
|
-
readonly inputField: "image_url";
|
|
1404
|
-
readonly inputKind: "image";
|
|
1405
|
-
readonly name: "Ideogram v3 Reframe";
|
|
1406
|
-
readonly outputKeys: ["images"];
|
|
1407
|
-
readonly price: {
|
|
1408
|
-
readonly kind: "call";
|
|
1409
|
-
readonly usd: 0.06;
|
|
1410
|
-
};
|
|
1411
|
-
readonly pricing: "$0.06/image at the default BALANCED speed; $0.03 turbo, $0.09 quality";
|
|
1412
|
-
readonly sourceUrl: "https://fal.ai/models/fal-ai/ideogram/v3/reframe";
|
|
1413
|
-
readonly task: "aspect ratio reframing";
|
|
1414
|
-
};
|
|
1415
|
-
readonly "lighting-restoration": {
|
|
1416
|
-
readonly category: "relight";
|
|
1417
|
-
readonly description: "Restore natural, even lighting across one or more input images.";
|
|
1418
|
-
readonly endpoint: "fal-ai/qwen-image-edit-plus-lora-gallery/lighting-restoration";
|
|
1419
|
-
readonly inputField: "image_urls";
|
|
1420
|
-
readonly inputKind: "images";
|
|
1421
|
-
readonly name: "Qwen Lighting Restoration";
|
|
1422
|
-
readonly outputKeys: ["images"];
|
|
1423
|
-
readonly price: {
|
|
1424
|
-
readonly kind: "megapixel";
|
|
1425
|
-
readonly usd: 0.035;
|
|
1426
|
-
};
|
|
1427
|
-
readonly pricing: "$0.035/megapixel";
|
|
1428
|
-
readonly sourceUrl: "https://fal.ai/models/fal-ai/qwen-image-edit-plus-lora-gallery/lighting-restoration";
|
|
1429
|
-
readonly task: "lighting restoration";
|
|
1430
|
-
};
|
|
1431
|
-
readonly "object-removal": {
|
|
1432
|
-
readonly category: "erase";
|
|
1433
|
-
readonly description: "Remove a prompted object from an image and fill the gap.";
|
|
1434
|
-
readonly endpoint: "fal-ai/object-removal";
|
|
1435
|
-
readonly inputField: "image_url";
|
|
1436
|
-
readonly inputKind: "image";
|
|
1437
|
-
readonly name: "Object Removal";
|
|
1438
|
-
readonly outputKeys: ["images"];
|
|
1439
|
-
readonly price: {
|
|
1440
|
-
readonly kind: "call";
|
|
1441
|
-
readonly usd: 0.024;
|
|
1442
|
-
};
|
|
1443
|
-
readonly pricing: "$0.024/image at the default best quality; $0.006 low, $0.012 medium, $0.018 high";
|
|
1444
|
-
readonly sourceUrl: "https://fal.ai/models/fal-ai/object-removal";
|
|
1445
|
-
readonly task: "prompted object removal";
|
|
1446
|
-
};
|
|
1447
|
-
readonly "object-removal-bbox": {
|
|
1448
|
-
readonly category: "erase";
|
|
1449
|
-
readonly description: "Remove whatever falls inside supplied bounding boxes.";
|
|
1450
|
-
readonly endpoint: "fal-ai/object-removal/bbox";
|
|
1451
|
-
readonly inputField: "image_url";
|
|
1452
|
-
readonly inputKind: "image";
|
|
1453
|
-
readonly name: "Object Removal by Box";
|
|
1454
|
-
readonly outputKeys: ["images"];
|
|
1455
|
-
readonly price: {
|
|
1456
|
-
readonly kind: "call";
|
|
1457
|
-
readonly usd: 0.024;
|
|
1458
|
-
};
|
|
1459
|
-
readonly pricing: "$0.024/image at the default best quality; $0.006 low, $0.012 medium, $0.018 high";
|
|
1460
|
-
readonly sourceUrl: "https://fal.ai/models/fal-ai/object-removal/bbox";
|
|
1461
|
-
readonly task: "bounding box object removal";
|
|
1462
|
-
};
|
|
1463
|
-
readonly "object-removal-mask": {
|
|
1464
|
-
readonly category: "erase";
|
|
1465
|
-
readonly description: "Remove the masked region of an image and fill the gap.";
|
|
1466
|
-
readonly endpoint: "fal-ai/object-removal/mask";
|
|
1467
|
-
readonly inputField: "image_url";
|
|
1468
|
-
readonly inputKind: "image";
|
|
1469
|
-
readonly name: "Object Removal by Mask";
|
|
1470
|
-
readonly outputKeys: ["images"];
|
|
1471
|
-
readonly price: {
|
|
1472
|
-
readonly kind: "call";
|
|
1473
|
-
readonly usd: 0.024;
|
|
1474
|
-
};
|
|
1475
|
-
readonly pricing: "$0.024/image at the default best quality; $0.006 low, $0.012 medium, $0.018 high";
|
|
1476
|
-
readonly sourceUrl: "https://fal.ai/models/fal-ai/object-removal/mask";
|
|
1477
|
-
readonly task: "masked object removal";
|
|
1478
|
-
};
|
|
1479
|
-
readonly "remove-lighting": {
|
|
1480
|
-
readonly category: "relight";
|
|
1481
|
-
readonly description: "Strip baked-in lighting and shadows to leave a flat, neutral surface.";
|
|
1482
|
-
readonly endpoint: "fal-ai/qwen-image-edit-plus-lora-gallery/remove-lighting";
|
|
1483
|
-
readonly inputField: "image_urls";
|
|
1484
|
-
readonly inputKind: "images";
|
|
1485
|
-
readonly name: "Qwen Remove Lighting";
|
|
1486
|
-
readonly outputKeys: ["images"];
|
|
1487
|
-
readonly price: {
|
|
1488
|
-
readonly kind: "megapixel";
|
|
1489
|
-
readonly usd: 0.035;
|
|
1490
|
-
};
|
|
1491
|
-
readonly pricing: "$0.035/megapixel";
|
|
1492
|
-
readonly sourceUrl: "https://fal.ai/models/fal-ai/qwen-image-edit-plus-lora-gallery/remove-lighting";
|
|
1493
|
-
readonly task: "lighting removal";
|
|
1494
|
-
};
|
|
1495
|
-
readonly "smart-resize": {
|
|
1496
|
-
readonly category: "reframe";
|
|
1497
|
-
readonly description: "Resize one image to several target sizes, recomposing rather than cropping.";
|
|
1498
|
-
readonly endpoint: "fal-ai/smart-resize";
|
|
1499
|
-
readonly inputField: "image_url";
|
|
1500
|
-
readonly inputKind: "image";
|
|
1501
|
-
readonly name: "Smart Resize";
|
|
1502
|
-
readonly outputKeys: ["images", "results"];
|
|
1503
|
-
readonly price: {
|
|
1504
|
-
readonly kind: "metered";
|
|
1505
|
-
};
|
|
1506
|
-
readonly pricing: "$0.15 per output image, doubled at 4K, plus a $0.05 vision analysis fee per request";
|
|
1507
|
-
readonly queued: true;
|
|
1508
|
-
readonly sourceUrl: "https://fal.ai/models/fal-ai/smart-resize";
|
|
1509
|
-
readonly task: "multi-size recomposition";
|
|
1510
|
-
};
|
|
1511
|
-
readonly "text-removal": {
|
|
1512
|
-
readonly category: "erase";
|
|
1513
|
-
readonly defaultOptions: {
|
|
1514
|
-
readonly output_format: "png";
|
|
1515
|
-
};
|
|
1516
|
-
readonly description: "Remove all rendered text from an image, rebuilding what sat behind it.";
|
|
1517
|
-
readonly endpoint: "fal-ai/image-editing/text-removal";
|
|
1518
|
-
readonly inputField: "image_url";
|
|
1519
|
-
readonly inputKind: "image";
|
|
1520
|
-
readonly name: "Text Removal";
|
|
1521
|
-
readonly outputKeys: ["images"];
|
|
1522
|
-
readonly price: {
|
|
1523
|
-
readonly kind: "call";
|
|
1524
|
-
readonly usd: 0.04;
|
|
1525
|
-
};
|
|
1526
|
-
readonly pricing: "$0.04/image";
|
|
1527
|
-
readonly sourceUrl: "https://fal.ai/models/fal-ai/image-editing/text-removal";
|
|
1528
|
-
readonly task: "text removal";
|
|
1529
|
-
};
|
|
1530
|
-
readonly "depth-anything": {
|
|
1531
|
-
readonly category: "preprocess";
|
|
1532
|
-
readonly description: "Generate Depth Anything v2 depth maps from input images.";
|
|
1533
|
-
readonly endpoint: "fal-ai/image-preprocessors/depth-anything/v2";
|
|
1534
|
-
readonly inputField: "image_url";
|
|
1535
|
-
readonly inputKind: "image";
|
|
1536
|
-
readonly name: "Depth Anything v2 Preprocessor";
|
|
1537
|
-
readonly outputKeys: ["image"];
|
|
1538
|
-
readonly price: {
|
|
1539
|
-
readonly kind: "metered";
|
|
1540
|
-
};
|
|
1541
|
-
readonly pricing: "$0/compute-second listed by fal";
|
|
1542
|
-
readonly sourceUrl: "https://fal.ai/models/fal-ai/image-preprocessors/depth-anything/v2";
|
|
1543
|
-
readonly task: "depth preprocessing";
|
|
1544
|
-
};
|
|
1545
|
-
readonly dwpose: {
|
|
1546
|
-
readonly category: "preprocess";
|
|
1547
|
-
readonly description: "Extract body, hand, and face pose skeletons from an image.";
|
|
1548
|
-
readonly endpoint: "fal-ai/dwpose";
|
|
1549
|
-
readonly inputField: "image_url";
|
|
1550
|
-
readonly inputKind: "image";
|
|
1551
|
-
readonly name: "DWPose Estimation";
|
|
1552
|
-
readonly outputKeys: ["image"];
|
|
1553
|
-
readonly price: {
|
|
1554
|
-
readonly kind: "second";
|
|
1555
|
-
readonly usd: 0.0006;
|
|
1556
|
-
};
|
|
1557
|
-
readonly pricing: "$0.0006/compute-second";
|
|
1558
|
-
readonly sourceUrl: "https://fal.ai/models/fal-ai/dwpose";
|
|
1559
|
-
readonly task: "pose preprocessing";
|
|
1560
|
-
};
|
|
1561
|
-
readonly hed: {
|
|
1562
|
-
readonly category: "preprocess";
|
|
1563
|
-
readonly description: "Generate HED soft edge maps for ControlNet-style workflows.";
|
|
1564
|
-
readonly endpoint: "fal-ai/image-preprocessors/hed";
|
|
1565
|
-
readonly inputField: "image_url";
|
|
1566
|
-
readonly inputKind: "image";
|
|
1567
|
-
readonly name: "HED Edge Preprocessor";
|
|
1568
|
-
readonly outputKeys: ["image"];
|
|
1569
|
-
readonly price: {
|
|
1570
|
-
readonly kind: "metered";
|
|
1571
|
-
};
|
|
1572
|
-
readonly pricing: "$0/compute-second listed by fal";
|
|
1573
|
-
readonly sourceUrl: "https://fal.ai/models/fal-ai/image-preprocessors/hed";
|
|
1574
|
-
readonly task: "edge preprocessing";
|
|
1575
|
-
};
|
|
1576
|
-
readonly lineart: {
|
|
1577
|
-
readonly category: "preprocess";
|
|
1578
|
-
readonly defaultOptions: {
|
|
1579
|
-
readonly coarse: false;
|
|
1580
|
-
};
|
|
1581
|
-
readonly description: "Generate line art/control-style edges from an input image.";
|
|
1582
|
-
readonly endpoint: "fal-ai/image-preprocessors/lineart";
|
|
1583
|
-
readonly inputField: "image_url";
|
|
1584
|
-
readonly inputKind: "image";
|
|
1585
|
-
readonly name: "Line Art Preprocessor";
|
|
1586
|
-
readonly outputKeys: ["image"];
|
|
1587
|
-
readonly price: {
|
|
1588
|
-
readonly kind: "metered";
|
|
1589
|
-
};
|
|
1590
|
-
readonly pricing: "$0/compute-second listed by fal";
|
|
1591
|
-
readonly sourceUrl: "https://fal.ai/models/fal-ai/image-preprocessors/lineart";
|
|
1592
|
-
readonly task: "image preprocessing";
|
|
1593
|
-
};
|
|
1594
|
-
readonly "marigold-depth": {
|
|
1595
|
-
readonly category: "depth";
|
|
1596
|
-
readonly defaultOptions: {
|
|
1597
|
-
readonly ensemble_size: 10;
|
|
1598
|
-
readonly num_inference_steps: 10;
|
|
1599
|
-
};
|
|
1600
|
-
readonly description: "Create depth maps using Marigold depth estimation.";
|
|
1601
|
-
readonly endpoint: "fal-ai/imageutils/marigold-depth";
|
|
1602
|
-
readonly inputField: "image_url";
|
|
1603
|
-
readonly inputKind: "image";
|
|
1604
|
-
readonly name: "Marigold Depth Estimation";
|
|
1605
|
-
readonly outputKeys: ["image"];
|
|
1606
|
-
readonly price: {
|
|
1607
|
-
readonly kind: "metered";
|
|
1608
|
-
};
|
|
1609
|
-
readonly pricing: "$0/compute-second listed by fal";
|
|
1610
|
-
readonly sourceUrl: "https://fal.ai/models/fal-ai/imageutils/marigold-depth";
|
|
1611
|
-
readonly task: "depth map";
|
|
1612
|
-
};
|
|
1613
|
-
readonly "midas-depth": {
|
|
1614
|
-
readonly category: "depth";
|
|
1615
|
-
readonly defaultOptions: {
|
|
1616
|
-
readonly a: number;
|
|
1617
|
-
readonly bg_th: 0.1;
|
|
1618
|
-
};
|
|
1619
|
-
readonly description: "Create MiDaS depth maps from input images.";
|
|
1620
|
-
readonly endpoint: "fal-ai/imageutils/depth";
|
|
1621
|
-
readonly inputField: "image_url";
|
|
1622
|
-
readonly inputKind: "image";
|
|
1623
|
-
readonly name: "MiDaS Depth Estimation";
|
|
1624
|
-
readonly outputKeys: ["image"];
|
|
1625
|
-
readonly price: {
|
|
1626
|
-
readonly kind: "metered";
|
|
1627
|
-
};
|
|
1628
|
-
readonly pricing: "$0/compute-second listed by fal";
|
|
1629
|
-
readonly sourceUrl: "https://fal.ai/models/fal-ai/imageutils/depth";
|
|
1630
|
-
readonly task: "depth map";
|
|
1631
|
-
};
|
|
1632
|
-
readonly "midas-preprocessor": {
|
|
1633
|
-
readonly category: "preprocess";
|
|
1634
|
-
readonly description: "Generate MiDaS depth and normal maps for image workflows.";
|
|
1635
|
-
readonly endpoint: "fal-ai/image-preprocessors/midas";
|
|
1636
|
-
readonly inputField: "image_url";
|
|
1637
|
-
readonly inputKind: "image";
|
|
1638
|
-
readonly name: "MiDaS Preprocessor";
|
|
1639
|
-
readonly outputKeys: ["depth_map", "normal_map"];
|
|
1640
|
-
readonly price: {
|
|
1641
|
-
readonly kind: "metered";
|
|
1642
|
-
};
|
|
1643
|
-
readonly pricing: "$0/compute-second listed by fal";
|
|
1644
|
-
readonly sourceUrl: "https://fal.ai/models/fal-ai/image-preprocessors/midas";
|
|
1645
|
-
readonly task: "depth and normal preprocessing";
|
|
1646
|
-
};
|
|
1647
|
-
readonly mlsd: {
|
|
1648
|
-
readonly category: "preprocess";
|
|
1649
|
-
readonly description: "Detect straight line segments for architectural and interior control maps.";
|
|
1650
|
-
readonly endpoint: "fal-ai/image-preprocessors/mlsd";
|
|
1651
|
-
readonly inputField: "image_url";
|
|
1652
|
-
readonly inputKind: "image";
|
|
1653
|
-
readonly name: "M-LSD Line Preprocessor";
|
|
1654
|
-
readonly outputKeys: ["image"];
|
|
1655
|
-
readonly price: {
|
|
1656
|
-
readonly kind: "metered";
|
|
1657
|
-
};
|
|
1658
|
-
readonly pricing: "$0/compute-second listed by fal";
|
|
1659
|
-
readonly sourceUrl: "https://fal.ai/models/fal-ai/image-preprocessors/mlsd";
|
|
1660
|
-
readonly task: "line segment preprocessing";
|
|
1661
|
-
};
|
|
1662
|
-
readonly pidi: {
|
|
1663
|
-
readonly category: "preprocess";
|
|
1664
|
-
readonly description: "Generate PiDiNet soft edge maps from an input image.";
|
|
1665
|
-
readonly endpoint: "fal-ai/image-preprocessors/pidi";
|
|
1666
|
-
readonly inputField: "image_url";
|
|
1667
|
-
readonly inputKind: "image";
|
|
1668
|
-
readonly name: "PiDiNet Edge Preprocessor";
|
|
1669
|
-
readonly outputKeys: ["image"];
|
|
1670
|
-
readonly price: {
|
|
1671
|
-
readonly kind: "metered";
|
|
1672
|
-
};
|
|
1673
|
-
readonly pricing: "$0/compute-second listed by fal";
|
|
1674
|
-
readonly sourceUrl: "https://fal.ai/models/fal-ai/image-preprocessors/pidi";
|
|
1675
|
-
readonly task: "edge preprocessing";
|
|
1676
|
-
};
|
|
1677
|
-
readonly "sam-preprocessor": {
|
|
1678
|
-
readonly category: "preprocess";
|
|
1679
|
-
readonly description: "Generate a SAM segmentation map for ControlNet-style workflows.";
|
|
1680
|
-
readonly endpoint: "fal-ai/image-preprocessors/sam";
|
|
1681
|
-
readonly inputField: "image_url";
|
|
1682
|
-
readonly inputKind: "image";
|
|
1683
|
-
readonly name: "SAM Preprocessor";
|
|
1684
|
-
readonly outputKeys: ["image"];
|
|
1685
|
-
readonly price: {
|
|
1686
|
-
readonly kind: "metered";
|
|
1687
|
-
};
|
|
1688
|
-
readonly pricing: "$0/compute-second listed by fal";
|
|
1689
|
-
readonly sourceUrl: "https://fal.ai/models/fal-ai/image-preprocessors/sam";
|
|
1690
|
-
readonly task: "segmentation preprocessing";
|
|
1691
|
-
};
|
|
1692
|
-
readonly "sam2-auto": {
|
|
1693
|
-
readonly category: "segmentation";
|
|
1694
|
-
readonly defaultOptions: {
|
|
1695
|
-
readonly min_mask_region_area: 100;
|
|
1696
|
-
readonly output_format: "png";
|
|
1697
|
-
readonly points_per_side: 32;
|
|
1698
|
-
readonly pred_iou_thresh: 0.88;
|
|
1699
|
-
readonly stability_score_thresh: 0.95;
|
|
1700
|
-
};
|
|
1701
|
-
readonly description: "Automatically segment an image into combined and individual masks.";
|
|
1702
|
-
readonly endpoint: "fal-ai/sam2/auto-segment";
|
|
1703
|
-
readonly inputField: "image_url";
|
|
1704
|
-
readonly inputKind: "image";
|
|
1705
|
-
readonly name: "SAM 2 Auto Segment";
|
|
1706
|
-
readonly outputKeys: ["combined_mask", "individual_masks"];
|
|
1707
|
-
readonly price: {
|
|
1708
|
-
readonly kind: "metered";
|
|
1709
|
-
};
|
|
1710
|
-
readonly pricing: "$0/compute-second listed by fal";
|
|
1711
|
-
readonly queued: true;
|
|
1712
|
-
readonly sourceUrl: "https://fal.ai/models/fal-ai/sam2/auto-segment";
|
|
1713
|
-
readonly task: "automatic image segmentation";
|
|
1714
|
-
};
|
|
1715
|
-
readonly "sam3-1-image": {
|
|
1716
|
-
readonly category: "segmentation";
|
|
1717
|
-
readonly defaultOptions: {
|
|
1718
|
-
readonly apply_mask: true;
|
|
1719
|
-
readonly max_masks: 3;
|
|
1720
|
-
readonly output_format: "png";
|
|
1721
|
-
};
|
|
1722
|
-
readonly description: "Segment image objects with text, point, or box prompts. SAM 3.1 adds Object Multiplex for faster multi-object tracking.";
|
|
1723
|
-
readonly endpoint: "fal-ai/sam-3-1/image";
|
|
1724
|
-
readonly inputField: "image_url";
|
|
1725
|
-
readonly inputKind: "image";
|
|
1726
|
-
readonly name: "SAM 3.1 Image";
|
|
1727
|
-
readonly outputKeys: ["image", "masks", "metadata", "scores", "boxes"];
|
|
1728
|
-
readonly price: {
|
|
1729
|
-
readonly kind: "call";
|
|
1730
|
-
readonly usd: 0.01;
|
|
1731
|
-
};
|
|
1732
|
-
readonly pricing: "$0.01/request";
|
|
1733
|
-
readonly sourceUrl: "https://fal.ai/models/fal-ai/sam-3-1/image";
|
|
1734
|
-
readonly task: "promptable image segmentation";
|
|
1735
|
-
};
|
|
1736
|
-
readonly "sam3-1-video": {
|
|
1737
|
-
readonly category: "segmentation";
|
|
1738
|
-
readonly defaultOptions: {
|
|
1739
|
-
readonly apply_mask: true;
|
|
1740
|
-
readonly prompt: "person";
|
|
1741
|
-
};
|
|
1742
|
-
readonly description: "SAM 3.1 video segmentation with Object Multiplex tracking for multiple objects.";
|
|
1743
|
-
readonly endpoint: "fal-ai/sam-3-1/video";
|
|
1744
|
-
readonly inputField: "video_url";
|
|
1745
|
-
readonly inputKind: "video";
|
|
1746
|
-
readonly name: "SAM 3.1 Video";
|
|
1747
|
-
readonly outputKeys: ["video", "boundingbox_frames_zip"];
|
|
1748
|
-
readonly price: {
|
|
1749
|
-
readonly kind: "metered";
|
|
1750
|
-
};
|
|
1751
|
-
readonly pricing: "$0.01/16 frames of video input";
|
|
1752
|
-
readonly queued: true;
|
|
1753
|
-
readonly sourceUrl: "https://fal.ai/models/fal-ai/sam-3-1/video";
|
|
1754
|
-
readonly task: "multi-object video segmentation";
|
|
1755
|
-
};
|
|
1756
|
-
readonly "sam3-image": {
|
|
1757
|
-
readonly category: "segmentation";
|
|
1758
|
-
readonly defaultOptions: {
|
|
1759
|
-
readonly apply_mask: true;
|
|
1760
|
-
readonly max_masks: 3;
|
|
1761
|
-
readonly output_format: "png";
|
|
1762
|
-
};
|
|
1763
|
-
readonly description: "Segment image objects with text, point, or box prompts.";
|
|
1764
|
-
readonly endpoint: "fal-ai/sam-3/image";
|
|
1765
|
-
readonly inputField: "image_url";
|
|
1766
|
-
readonly inputKind: "image";
|
|
1767
|
-
readonly name: "SAM 3 Image";
|
|
1768
|
-
readonly outputKeys: ["image", "masks", "metadata", "scores", "boxes"];
|
|
1769
|
-
readonly price: {
|
|
1770
|
-
readonly kind: "call";
|
|
1771
|
-
readonly usd: 0.005;
|
|
1772
|
-
};
|
|
1773
|
-
readonly pricing: "$0.005/request";
|
|
1774
|
-
readonly sourceUrl: "https://fal.ai/models/fal-ai/sam-3/image";
|
|
1775
|
-
readonly task: "promptable image segmentation";
|
|
1776
|
-
};
|
|
1777
|
-
readonly "sam3-image-rle": {
|
|
1778
|
-
readonly category: "segmentation";
|
|
1779
|
-
readonly defaultOptions: {
|
|
1780
|
-
readonly apply_mask: true;
|
|
1781
|
-
readonly max_masks: 3;
|
|
1782
|
-
};
|
|
1783
|
-
readonly description: "Segment image objects and return run-length encoded masks.";
|
|
1784
|
-
readonly endpoint: "fal-ai/sam-3/image-rle";
|
|
1785
|
-
readonly inputField: "image_url";
|
|
1786
|
-
readonly inputKind: "image";
|
|
1787
|
-
readonly name: "SAM 3 Image RLE";
|
|
1788
|
-
readonly outputKeys: ["rle", "scores", "boxes", "metadata"];
|
|
1789
|
-
readonly price: {
|
|
1790
|
-
readonly kind: "call";
|
|
1791
|
-
readonly usd: 0.005;
|
|
1792
|
-
};
|
|
1793
|
-
readonly pricing: "$0.005/request";
|
|
1794
|
-
readonly sourceUrl: "https://fal.ai/models/fal-ai/sam-3/image-rle";
|
|
1795
|
-
readonly task: "promptable image segmentation to RLE";
|
|
1796
|
-
};
|
|
1797
|
-
readonly "sam3-video": {
|
|
1798
|
-
readonly category: "segmentation";
|
|
1799
|
-
readonly defaultOptions: {
|
|
1800
|
-
readonly apply_mask: true;
|
|
1801
|
-
readonly detection_threshold: 0.5;
|
|
1802
|
-
readonly prompt: "person";
|
|
1803
|
-
readonly video_output_type: "X264 (.mp4)";
|
|
1804
|
-
};
|
|
1805
|
-
readonly description: "Segment and track prompted objects across video frames.";
|
|
1806
|
-
readonly endpoint: "fal-ai/sam-3/video";
|
|
1807
|
-
readonly inputField: "video_url";
|
|
1808
|
-
readonly inputKind: "video";
|
|
1809
|
-
readonly name: "SAM 3 Video";
|
|
1810
|
-
readonly outputKeys: ["video", "boundingbox_frames_zip"];
|
|
1811
|
-
readonly price: {
|
|
1812
|
-
readonly kind: "metered";
|
|
1813
|
-
};
|
|
1814
|
-
readonly pricing: "$0.005/16 frames of video input";
|
|
1815
|
-
readonly queued: true;
|
|
1816
|
-
readonly sourceUrl: "https://fal.ai/models/fal-ai/sam-3/video";
|
|
1817
|
-
readonly task: "promptable video segmentation";
|
|
1818
|
-
};
|
|
1819
|
-
readonly "sam3-video-rle": {
|
|
1820
|
-
readonly category: "segmentation";
|
|
1821
|
-
readonly defaultOptions: {
|
|
1822
|
-
readonly apply_mask: true;
|
|
1823
|
-
readonly detection_threshold: 0.5;
|
|
1824
|
-
readonly prompt: "person";
|
|
1825
|
-
};
|
|
1826
|
-
readonly description: "Track prompted video objects and return RLE mask data.";
|
|
1827
|
-
readonly endpoint: "fal-ai/sam-3/video-rle";
|
|
1828
|
-
readonly inputField: "video_url";
|
|
1829
|
-
readonly inputKind: "video";
|
|
1830
|
-
readonly name: "SAM 3 Video RLE";
|
|
1831
|
-
readonly outputKeys: ["video", "boundingbox_frames_zip"];
|
|
1832
|
-
readonly price: {
|
|
1833
|
-
readonly kind: "metered";
|
|
1834
|
-
};
|
|
1835
|
-
readonly pricing: "$0.005/16 frames of video";
|
|
1836
|
-
readonly queued: true;
|
|
1837
|
-
readonly sourceUrl: "https://fal.ai/models/fal-ai/sam-3/video-rle";
|
|
1838
|
-
readonly task: "promptable video segmentation to RLE";
|
|
1839
|
-
};
|
|
1840
|
-
readonly scribble: {
|
|
1841
|
-
readonly category: "preprocess";
|
|
1842
|
-
readonly description: "Turn an image into a scribble-style control map.";
|
|
1843
|
-
readonly endpoint: "fal-ai/image-preprocessors/scribble";
|
|
1844
|
-
readonly inputField: "image_url";
|
|
1845
|
-
readonly inputKind: "image";
|
|
1846
|
-
readonly name: "Scribble Preprocessor";
|
|
1847
|
-
readonly outputKeys: ["image"];
|
|
1848
|
-
readonly price: {
|
|
1849
|
-
readonly kind: "metered";
|
|
1850
|
-
};
|
|
1851
|
-
readonly pricing: "$0/compute-second listed by fal";
|
|
1852
|
-
readonly sourceUrl: "https://fal.ai/models/fal-ai/image-preprocessors/scribble";
|
|
1853
|
-
readonly task: "scribble preprocessing";
|
|
1854
|
-
};
|
|
1855
|
-
readonly teed: {
|
|
1856
|
-
readonly category: "preprocess";
|
|
1857
|
-
readonly description: "Generate TEED edge maps from an input image.";
|
|
1858
|
-
readonly endpoint: "fal-ai/image-preprocessors/teed";
|
|
1859
|
-
readonly inputField: "image_url";
|
|
1860
|
-
readonly inputKind: "image";
|
|
1861
|
-
readonly name: "TEED Edge Preprocessor";
|
|
1862
|
-
readonly outputKeys: ["image"];
|
|
1863
|
-
readonly price: {
|
|
1864
|
-
readonly kind: "metered";
|
|
1865
|
-
};
|
|
1866
|
-
readonly pricing: "$0/compute-second listed by fal";
|
|
1867
|
-
readonly sourceUrl: "https://fal.ai/models/fal-ai/image-preprocessors/teed";
|
|
1868
|
-
readonly task: "edge preprocessing";
|
|
1869
|
-
};
|
|
1870
|
-
readonly "zoe-depth": {
|
|
1871
|
-
readonly category: "preprocess";
|
|
1872
|
-
readonly description: "Generate ZoeDepth metric depth maps from an input image.";
|
|
1873
|
-
readonly endpoint: "fal-ai/image-preprocessors/zoe";
|
|
1874
|
-
readonly inputField: "image_url";
|
|
1875
|
-
readonly inputKind: "image";
|
|
1876
|
-
readonly name: "ZoeDepth Preprocessor";
|
|
1877
|
-
readonly outputKeys: ["image"];
|
|
1878
|
-
readonly price: {
|
|
1879
|
-
readonly kind: "metered";
|
|
1880
|
-
};
|
|
1881
|
-
readonly pricing: "$0/compute-second listed by fal";
|
|
1882
|
-
readonly sourceUrl: "https://fal.ai/models/fal-ai/image-preprocessors/zoe";
|
|
1883
|
-
readonly task: "depth preprocessing";
|
|
1884
|
-
};
|
|
1885
|
-
};
|
|
1886
|
-
/**
|
|
1887
|
-
* The seam `server-tools.ts` runs against — the client's authenticated fetch
|
|
1888
|
-
* and its queue status parser, exposed without widening the public surface.
|
|
1889
|
-
*/
|
|
1890
|
-
private get toolExecutor();
|
|
1891
|
-
/** ─── Private ─────────────────────────────────────────────── */
|
|
1892
|
-
/** Authenticated fetch to fal.ai APIs with retry logic. */
|
|
1893
|
-
private request;
|
|
1894
|
-
private ephemeralHeaders;
|
|
1895
|
-
/**
|
|
1896
|
-
* Normalize fal.ai responses.
|
|
1897
|
-
* Some APIs return `{ image: {...} }` instead of `{ images: [...] }`.
|
|
1898
|
-
*/
|
|
1899
|
-
private normalizeResponse;
|
|
338
|
+
export declare const TIERS: readonly ["fast", "balanced", "quality"];
|
|
339
|
+
/** How far a Task trades cost and speed for quality. */
|
|
340
|
+
type Tier = (typeof TIERS)[number];
|
|
341
|
+
export declare const DEFAULT_TIER: Tier;
|
|
342
|
+
/** Where a Task's order came from. */
|
|
343
|
+
type RankedFrom = "bench" | "hand";
|
|
344
|
+
/** Something a request needs that not every Model can honour. */
|
|
345
|
+
type Capability = "aspect" | "count" | "image" | "mask" | "negativePrompt" | "outputFormat" | "references" | "resolution" | "rig" | "seed" | "transparency" | "video";
|
|
346
|
+
interface RankedModel {
|
|
347
|
+
/** A Model id, as accepted by `-m` or `TaskInput.model`. */
|
|
348
|
+
readonly model: string;
|
|
349
|
+
/** The Tier this Model is offered at. */
|
|
350
|
+
readonly tier: Tier;
|
|
351
|
+
/** The mode this entry serves. Absent for the Task's plain job. */
|
|
352
|
+
readonly mode?: string;
|
|
353
|
+
/** Capabilities this Model has for this Task beyond its registry profile. */
|
|
354
|
+
readonly supports?: readonly Capability[];
|
|
355
|
+
/** The Model works without a Source, such as a tile made from a prompt. */
|
|
356
|
+
readonly sourceOptional?: true;
|
|
357
|
+
/** Inputs the request must supply for this Model to be chosen, e.g. a mask. */
|
|
358
|
+
readonly requires?: readonly Capability[];
|
|
359
|
+
}
|
|
360
|
+
interface TaskMode {
|
|
361
|
+
readonly id: string;
|
|
362
|
+
/** One sentence: what this mode does differently. */
|
|
363
|
+
readonly summary: string;
|
|
364
|
+
}
|
|
365
|
+
interface TaskDefinition {
|
|
366
|
+
/** One sentence: the job, in the words a caller would use. */
|
|
367
|
+
readonly summary: string;
|
|
368
|
+
/** What to use instead, naming the sibling Task. */
|
|
369
|
+
readonly notFor: string;
|
|
370
|
+
readonly rankedFrom: RankedFrom;
|
|
371
|
+
/** ISO date the order was last set. */
|
|
372
|
+
readonly rankedAt: string;
|
|
373
|
+
/** How the order was decided, for the reviewer of the next change. */
|
|
374
|
+
readonly basis: string;
|
|
375
|
+
/** Named variants of the job. Every `mode` on a ranked entry is listed here. */
|
|
376
|
+
readonly modes?: readonly TaskMode[];
|
|
377
|
+
/** Best first. Order within a Tier is the order tried at that Tier. */
|
|
378
|
+
readonly models: readonly RankedModel[];
|
|
1900
379
|
}
|
|
380
|
+
/** Every Task with a Model. A Task is absent here until it has at least one Model. */
|
|
381
|
+
export declare const TASKS: {
|
|
382
|
+
readonly animate: {
|
|
383
|
+
readonly basis: "Hand-ranked. Kling v3 Pro leads with audio, an end frame and a negative prompt at $0.112-$0.168/sec; Kling v3 Turbo Pro is the fast pick at $0.14/sec without them.";
|
|
384
|
+
readonly models: readonly [{
|
|
385
|
+
readonly model: "kling";
|
|
386
|
+
readonly tier: "balanced";
|
|
387
|
+
}, {
|
|
388
|
+
readonly model: "kling-turbo";
|
|
389
|
+
readonly tier: "fast";
|
|
390
|
+
}];
|
|
391
|
+
readonly notFor: "A still image (generate), or variations of one (vary).";
|
|
392
|
+
readonly rankedAt: "2026-09-16";
|
|
393
|
+
readonly rankedFrom: "hand";
|
|
394
|
+
readonly summary: "Turn a still image into a short video clip.";
|
|
395
|
+
};
|
|
396
|
+
readonly ask: {
|
|
397
|
+
readonly basis: "Hand-ranked. Moondream answers questions, captions, detects and points; GOT-OCR transcribes text; the NSFW classifier answers the safety question.";
|
|
398
|
+
readonly modes: readonly [{
|
|
399
|
+
readonly id: "caption";
|
|
400
|
+
readonly summary: "Write a caption for the image.";
|
|
401
|
+
}, {
|
|
402
|
+
readonly id: "detect";
|
|
403
|
+
readonly summary: "Return bounding boxes for a named thing.";
|
|
404
|
+
}, {
|
|
405
|
+
readonly id: "point";
|
|
406
|
+
readonly summary: "Return a point on every instance of a named thing.";
|
|
407
|
+
}, {
|
|
408
|
+
readonly id: "read";
|
|
409
|
+
readonly summary: "Transcribe the text in the image.";
|
|
410
|
+
}, {
|
|
411
|
+
readonly id: "safe";
|
|
412
|
+
readonly summary: "Say whether the image is safe for work.";
|
|
413
|
+
}];
|
|
414
|
+
readonly models: readonly [{
|
|
415
|
+
readonly model: "moondream-query";
|
|
416
|
+
readonly tier: "balanced";
|
|
417
|
+
}, {
|
|
418
|
+
readonly mode: "caption";
|
|
419
|
+
readonly model: "moondream-caption";
|
|
420
|
+
readonly tier: "balanced";
|
|
421
|
+
}, {
|
|
422
|
+
readonly mode: "detect";
|
|
423
|
+
readonly model: "moondream-detect";
|
|
424
|
+
readonly tier: "balanced";
|
|
425
|
+
}, {
|
|
426
|
+
readonly mode: "point";
|
|
427
|
+
readonly model: "moondream-point";
|
|
428
|
+
readonly tier: "balanced";
|
|
429
|
+
}, {
|
|
430
|
+
readonly mode: "read";
|
|
431
|
+
readonly model: "got-ocr";
|
|
432
|
+
readonly tier: "balanced";
|
|
433
|
+
}, {
|
|
434
|
+
readonly mode: "safe";
|
|
435
|
+
readonly model: "nsfw";
|
|
436
|
+
readonly tier: "balanced";
|
|
437
|
+
}];
|
|
438
|
+
readonly notFor: "Pixel masks of a named thing (segment).";
|
|
439
|
+
readonly rankedAt: "2026-09-16";
|
|
440
|
+
readonly rankedFrom: "hand";
|
|
441
|
+
readonly summary: "Answer a question about an image, caption it, count or find things in it.";
|
|
442
|
+
};
|
|
443
|
+
readonly cutout: {
|
|
444
|
+
readonly basis: "Hand-ranked from fal price and edge quality: Bria for commercial-safe edges, BEN v2 and BiRefNet as the balanced picks, rembg as the cheap one. For video, Bria's VRMBG 3.0 ($0.05/sec) leads the older Bria remover ($0.14/sec).";
|
|
445
|
+
readonly models: readonly [{
|
|
446
|
+
readonly model: "bria-rmbg";
|
|
447
|
+
readonly tier: "quality";
|
|
448
|
+
}, {
|
|
449
|
+
readonly model: "birefnet";
|
|
450
|
+
readonly tier: "balanced";
|
|
451
|
+
}, {
|
|
452
|
+
readonly model: "ben-v2";
|
|
453
|
+
readonly tier: "balanced";
|
|
454
|
+
}, {
|
|
455
|
+
readonly model: "rembg";
|
|
456
|
+
readonly tier: "fast";
|
|
457
|
+
}, {
|
|
458
|
+
readonly model: "bria-video-rmbg-v3";
|
|
459
|
+
readonly tier: "balanced";
|
|
460
|
+
}, {
|
|
461
|
+
readonly model: "bria-video-rmbg";
|
|
462
|
+
readonly tier: "balanced";
|
|
463
|
+
}];
|
|
464
|
+
readonly notFor: "Cutting one named thing out of a scene, such as the chair in a room (segment), or taking an object out and filling the gap (erase).";
|
|
465
|
+
readonly rankedAt: "2026-09-16";
|
|
466
|
+
readonly rankedFrom: "hand";
|
|
467
|
+
readonly summary: "Remove the background behind the main subject of an image or video.";
|
|
468
|
+
};
|
|
469
|
+
readonly erase: {
|
|
470
|
+
readonly basis: "Hand-ranked. Finegrain also removes shadows and reflections and costs ten times more, so it leads the quality tier only. With a mask, Bria's eraser leads and fal's mask remover is the balanced pick.";
|
|
471
|
+
readonly modes: readonly [{
|
|
472
|
+
readonly id: "boxes";
|
|
473
|
+
readonly summary: "Remove whatever falls inside the given boxes.";
|
|
474
|
+
}, {
|
|
475
|
+
readonly id: "text";
|
|
476
|
+
readonly summary: "Remove all rendered text.";
|
|
477
|
+
}, {
|
|
478
|
+
readonly id: "with";
|
|
479
|
+
readonly summary: "Fill the masked region with something described in words.";
|
|
480
|
+
}];
|
|
481
|
+
readonly models: readonly [{
|
|
482
|
+
readonly model: "finegrain-eraser";
|
|
483
|
+
readonly tier: "quality";
|
|
484
|
+
}, {
|
|
485
|
+
readonly model: "object-removal";
|
|
486
|
+
readonly tier: "balanced";
|
|
487
|
+
}, {
|
|
488
|
+
readonly model: "bria-eraser";
|
|
489
|
+
readonly requires: readonly ["mask"];
|
|
490
|
+
readonly supports: readonly ["mask"];
|
|
491
|
+
readonly tier: "quality";
|
|
492
|
+
}, {
|
|
493
|
+
readonly model: "object-removal-mask";
|
|
494
|
+
readonly requires: readonly ["mask"];
|
|
495
|
+
readonly supports: readonly ["mask"];
|
|
496
|
+
readonly tier: "balanced";
|
|
497
|
+
}, {
|
|
498
|
+
readonly mode: "boxes";
|
|
499
|
+
readonly model: "object-removal-bbox";
|
|
500
|
+
readonly tier: "balanced";
|
|
501
|
+
}, {
|
|
502
|
+
readonly mode: "text";
|
|
503
|
+
readonly model: "text-removal";
|
|
504
|
+
readonly tier: "balanced";
|
|
505
|
+
}, {
|
|
506
|
+
readonly mode: "with";
|
|
507
|
+
readonly model: "bria-genfill";
|
|
508
|
+
readonly requires: readonly ["mask"];
|
|
509
|
+
readonly supports: readonly ["mask"];
|
|
510
|
+
readonly tier: "balanced";
|
|
511
|
+
}];
|
|
512
|
+
readonly notFor: "The whole background (cutout), or extending the canvas (reframe).";
|
|
513
|
+
readonly rankedAt: "2026-09-16";
|
|
514
|
+
readonly rankedFrom: "hand";
|
|
515
|
+
readonly summary: "Remove an object, person, text or clutter from an image and fill the gap.";
|
|
516
|
+
};
|
|
517
|
+
readonly generate: {
|
|
518
|
+
readonly basis: "Hand-ranked. Tiers set by fal price per image (quality ≥ $0.07, balanced $0.02-$0.15 with edit quality, fast ≤ $0.04); order within a tier by Artificial Analysis text-to-image Elo, snapshot 2026-08-23, unranked models last. banana leads balanced because it is the house default the looks are tuned on. Ideogram V3 Transparent follows it but is chosen only for a transparent request, so transparency needs no OpenAI key at balanced; token-metered Nano Banana 2 Lite sits in balanced by its Elo.";
|
|
519
|
+
readonly models: readonly RankedModel[];
|
|
520
|
+
readonly notFor: "Variations of an image you already have (vary), or a consistent set of images (series run).";
|
|
521
|
+
readonly rankedAt: "2026-09-16";
|
|
522
|
+
readonly rankedFrom: "hand";
|
|
523
|
+
readonly summary: "Make an image from a prompt, or change an image you pass as a reference.";
|
|
524
|
+
};
|
|
525
|
+
readonly layers: {
|
|
526
|
+
readonly basis: "Hand-ranked. Qwen gives a set number of stacked RGBA layers; Seedream names and orders object layers; Ideogram separates text from artwork.";
|
|
527
|
+
readonly modes: readonly [{
|
|
528
|
+
readonly id: "text";
|
|
529
|
+
readonly summary: "Separate the text from the artwork as editable text.";
|
|
530
|
+
}];
|
|
531
|
+
readonly models: readonly [{
|
|
532
|
+
readonly model: "seedream-layerize";
|
|
533
|
+
readonly tier: "quality";
|
|
534
|
+
}, {
|
|
535
|
+
readonly model: "qwen-layered";
|
|
536
|
+
readonly tier: "balanced";
|
|
537
|
+
}, {
|
|
538
|
+
readonly mode: "text";
|
|
539
|
+
readonly model: "ideogram-layerize-text";
|
|
540
|
+
readonly tier: "balanced";
|
|
541
|
+
}];
|
|
542
|
+
readonly notFor: "Masking one named thing (segment), or removing the background (cutout).";
|
|
543
|
+
readonly rankedAt: "2026-09-16";
|
|
544
|
+
readonly rankedFrom: "hand";
|
|
545
|
+
readonly summary: "Split an image into transparent layers.";
|
|
546
|
+
};
|
|
547
|
+
readonly map: {
|
|
548
|
+
readonly basis: "Hand-ranked. Depth is the plain job: Marigold for quality, Depth Anything v2 balanced, MiDaS fast. The other maps are modes, each with its own Models.";
|
|
549
|
+
readonly modes: readonly [{
|
|
550
|
+
readonly id: "edges";
|
|
551
|
+
readonly summary: "A soft edge map.";
|
|
552
|
+
}, {
|
|
553
|
+
readonly id: "lineart";
|
|
554
|
+
readonly summary: "A line-art map.";
|
|
555
|
+
}, {
|
|
556
|
+
readonly id: "lines";
|
|
557
|
+
readonly summary: "Straight line segments, for architecture and interiors.";
|
|
558
|
+
}, {
|
|
559
|
+
readonly id: "metric";
|
|
560
|
+
readonly summary: "Metric depth, in real distances.";
|
|
561
|
+
}, {
|
|
562
|
+
readonly id: "normals";
|
|
563
|
+
readonly summary: "A surface normal map.";
|
|
564
|
+
}, {
|
|
565
|
+
readonly id: "pose";
|
|
566
|
+
readonly summary: "Body, hand and face pose skeletons.";
|
|
567
|
+
}, {
|
|
568
|
+
readonly id: "scribble";
|
|
569
|
+
readonly summary: "A scribble-style map.";
|
|
570
|
+
}, {
|
|
571
|
+
readonly id: "segments";
|
|
572
|
+
readonly summary: "A segmentation map.";
|
|
573
|
+
}];
|
|
574
|
+
readonly models: readonly [{
|
|
575
|
+
readonly model: "marigold-depth";
|
|
576
|
+
readonly tier: "quality";
|
|
577
|
+
}, {
|
|
578
|
+
readonly model: "depth-anything";
|
|
579
|
+
readonly tier: "balanced";
|
|
580
|
+
}, {
|
|
581
|
+
readonly model: "midas-depth";
|
|
582
|
+
readonly tier: "fast";
|
|
583
|
+
}, {
|
|
584
|
+
readonly mode: "edges";
|
|
585
|
+
readonly model: "teed";
|
|
586
|
+
readonly tier: "quality";
|
|
587
|
+
}, {
|
|
588
|
+
readonly mode: "edges";
|
|
589
|
+
readonly model: "hed";
|
|
590
|
+
readonly tier: "balanced";
|
|
591
|
+
}, {
|
|
592
|
+
readonly mode: "edges";
|
|
593
|
+
readonly model: "pidi";
|
|
594
|
+
readonly tier: "fast";
|
|
595
|
+
}, {
|
|
596
|
+
readonly mode: "lineart";
|
|
597
|
+
readonly model: "lineart";
|
|
598
|
+
readonly tier: "balanced";
|
|
599
|
+
}, {
|
|
600
|
+
readonly mode: "lines";
|
|
601
|
+
readonly model: "mlsd";
|
|
602
|
+
readonly tier: "balanced";
|
|
603
|
+
}, {
|
|
604
|
+
readonly mode: "metric";
|
|
605
|
+
readonly model: "zoe-depth";
|
|
606
|
+
readonly tier: "balanced";
|
|
607
|
+
}, {
|
|
608
|
+
readonly mode: "normals";
|
|
609
|
+
readonly model: "midas-preprocessor";
|
|
610
|
+
readonly tier: "balanced";
|
|
611
|
+
}, {
|
|
612
|
+
readonly mode: "pose";
|
|
613
|
+
readonly model: "dwpose";
|
|
614
|
+
readonly tier: "balanced";
|
|
615
|
+
}, {
|
|
616
|
+
readonly mode: "scribble";
|
|
617
|
+
readonly model: "scribble";
|
|
618
|
+
readonly tier: "balanced";
|
|
619
|
+
}, {
|
|
620
|
+
readonly mode: "segments";
|
|
621
|
+
readonly model: "sam-preprocessor";
|
|
622
|
+
readonly tier: "balanced";
|
|
623
|
+
}];
|
|
624
|
+
readonly notFor: "Masks of a named thing (segment), or PBR material maps (material).";
|
|
625
|
+
readonly rankedAt: "2026-09-16";
|
|
626
|
+
readonly rankedFrom: "hand";
|
|
627
|
+
readonly summary: "Make a control map of an image: depth, edges, lines, normals or pose.";
|
|
628
|
+
};
|
|
629
|
+
readonly material: {
|
|
630
|
+
readonly basis: "Hand-ranked. Patina is the only PBR decomposition Model; extract works on a region.";
|
|
631
|
+
readonly modes: readonly [{
|
|
632
|
+
readonly id: "extract";
|
|
633
|
+
readonly summary: "Extract a tiling material from a named region.";
|
|
634
|
+
}];
|
|
635
|
+
readonly models: readonly [{
|
|
636
|
+
readonly model: "patina";
|
|
637
|
+
readonly tier: "balanced";
|
|
638
|
+
}, {
|
|
639
|
+
readonly mode: "extract";
|
|
640
|
+
readonly model: "patina-extract";
|
|
641
|
+
readonly tier: "balanced";
|
|
642
|
+
}];
|
|
643
|
+
readonly notFor: "A seamless texture without PBR maps (tile), or depth and normals of a scene (map).";
|
|
644
|
+
readonly rankedAt: "2026-09-16";
|
|
645
|
+
readonly rankedFrom: "hand";
|
|
646
|
+
readonly summary: "Turn a surface photograph into PBR maps: colour, normal, roughness, metalness, height.";
|
|
647
|
+
};
|
|
648
|
+
readonly mesh: {
|
|
649
|
+
readonly basis: "Hand-ranked from fal price and published quality: Meshy v7 leads quality and is the only Model that rigs a mesh; Hunyuan3D v3 is the quality second at under a third of the price; TRELLIS 2 balanced. SAM 3D reconstructs several prompted objects, or a human body.";
|
|
650
|
+
readonly modes: readonly [{
|
|
651
|
+
readonly id: "body";
|
|
652
|
+
readonly summary: "Reconstruct a human body mesh with keypoints.";
|
|
653
|
+
}, {
|
|
654
|
+
readonly id: "objects";
|
|
655
|
+
readonly summary: "Reconstruct a named object from one image.";
|
|
656
|
+
}];
|
|
657
|
+
readonly models: readonly [{
|
|
658
|
+
readonly model: "meshy-v7";
|
|
659
|
+
readonly tier: "quality";
|
|
660
|
+
}, {
|
|
661
|
+
readonly model: "hunyuan3d-v3";
|
|
662
|
+
readonly tier: "quality";
|
|
663
|
+
}, {
|
|
664
|
+
readonly model: "trellis-2";
|
|
665
|
+
readonly tier: "balanced";
|
|
666
|
+
}, {
|
|
667
|
+
readonly mode: "body";
|
|
668
|
+
readonly model: "sam3-3d-body";
|
|
669
|
+
readonly tier: "balanced";
|
|
670
|
+
}, {
|
|
671
|
+
readonly mode: "objects";
|
|
672
|
+
readonly model: "sam3-3d-objects";
|
|
673
|
+
readonly tier: "balanced";
|
|
674
|
+
}];
|
|
675
|
+
readonly notFor: "A flat image of an object (generate), or depth of a scene (map).";
|
|
676
|
+
readonly rankedAt: "2026-09-16";
|
|
677
|
+
readonly rankedFrom: "hand";
|
|
678
|
+
readonly summary: "Make a textured 3D mesh from one image.";
|
|
679
|
+
};
|
|
680
|
+
readonly reframe: {
|
|
681
|
+
readonly basis: "Hand-ranked. Ideogram reframes to a ratio and leads; Bria expands to a ratio for less. FLUX outpaints by a per-edge pixel margin. Smart resize makes several sizes at once.";
|
|
682
|
+
readonly modes: readonly [{
|
|
683
|
+
readonly id: "margin";
|
|
684
|
+
readonly summary: "Extend each edge by a set number of pixels.";
|
|
685
|
+
}, {
|
|
686
|
+
readonly id: "sizes";
|
|
687
|
+
readonly summary: "Make several target sizes at once, recomposing each.";
|
|
688
|
+
}];
|
|
689
|
+
readonly models: readonly [{
|
|
690
|
+
readonly model: "ideogram-reframe";
|
|
691
|
+
readonly tier: "balanced";
|
|
692
|
+
}, {
|
|
693
|
+
readonly model: "bria-expand";
|
|
694
|
+
readonly tier: "fast";
|
|
695
|
+
}, {
|
|
696
|
+
readonly mode: "margin";
|
|
697
|
+
readonly model: "flux-outpaint";
|
|
698
|
+
readonly tier: "balanced";
|
|
699
|
+
}, {
|
|
700
|
+
readonly mode: "sizes";
|
|
701
|
+
readonly model: "smart-resize";
|
|
702
|
+
readonly tier: "balanced";
|
|
703
|
+
}];
|
|
704
|
+
readonly notFor: "A new image at a given ratio (generate with a ratio).";
|
|
705
|
+
readonly rankedAt: "2026-09-16";
|
|
706
|
+
readonly rankedFrom: "hand";
|
|
707
|
+
readonly summary: "Extend or recut an image to a new aspect ratio, generating the new edges.";
|
|
708
|
+
};
|
|
709
|
+
readonly relight: {
|
|
710
|
+
readonly basis: "Hand-ranked. IC-Light relights to a described light or a mood, with or without a mask; the two lighting Models even out or strip baked-in light.";
|
|
711
|
+
readonly modes: readonly [{
|
|
712
|
+
readonly id: "even";
|
|
713
|
+
readonly summary: "Restore natural, even lighting.";
|
|
714
|
+
}, {
|
|
715
|
+
readonly id: "flat";
|
|
716
|
+
readonly summary: "Strip baked-in light and shadow to a neutral surface.";
|
|
717
|
+
}];
|
|
718
|
+
readonly models: readonly [{
|
|
719
|
+
readonly model: "iclight-v2";
|
|
720
|
+
readonly supports: readonly ["mask"];
|
|
721
|
+
readonly tier: "balanced";
|
|
722
|
+
}, {
|
|
723
|
+
readonly mode: "even";
|
|
724
|
+
readonly model: "lighting-restoration";
|
|
725
|
+
readonly tier: "balanced";
|
|
726
|
+
}, {
|
|
727
|
+
readonly mode: "flat";
|
|
728
|
+
readonly model: "remove-lighting";
|
|
729
|
+
readonly tier: "balanced";
|
|
730
|
+
}];
|
|
731
|
+
readonly notFor: "Regenerating the scene in a new light (generate with a mood).";
|
|
732
|
+
readonly rankedAt: "2026-09-16";
|
|
733
|
+
readonly rankedFrom: "hand";
|
|
734
|
+
readonly summary: "Change the light in a photo without regenerating it.";
|
|
735
|
+
};
|
|
736
|
+
readonly restore: {
|
|
737
|
+
readonly basis: "Hand-ranked. Each mode names what is wrong and has the Model that fixes it; the plain job is Topaz's general restoration. Control Light, a FLUX.2 klein fine-tune at $0.03/MP, brightens dark photos.";
|
|
738
|
+
readonly modes: readonly [{
|
|
739
|
+
readonly id: "colour";
|
|
740
|
+
readonly summary: "Colourise a black-and-white photograph.";
|
|
741
|
+
}, {
|
|
742
|
+
readonly id: "dark";
|
|
743
|
+
readonly summary: "Brighten a dark or underexposed photo.";
|
|
744
|
+
}, {
|
|
745
|
+
readonly id: "noise";
|
|
746
|
+
readonly summary: "Remove noise.";
|
|
747
|
+
}, {
|
|
748
|
+
readonly id: "scratches";
|
|
749
|
+
readonly summary: "Repair scratches, tears and damage.";
|
|
750
|
+
}, {
|
|
751
|
+
readonly id: "softness";
|
|
752
|
+
readonly summary: "Sharpen a soft or blurred image.";
|
|
753
|
+
}, {
|
|
754
|
+
readonly id: "tone";
|
|
755
|
+
readonly summary: "Fix exposure, white balance and colour.";
|
|
756
|
+
}];
|
|
757
|
+
readonly models: readonly [{
|
|
758
|
+
readonly model: "topaz-restore";
|
|
759
|
+
readonly tier: "balanced";
|
|
760
|
+
}, {
|
|
761
|
+
readonly mode: "colour";
|
|
762
|
+
readonly model: "ddcolor";
|
|
763
|
+
readonly tier: "balanced";
|
|
764
|
+
}, {
|
|
765
|
+
readonly mode: "dark";
|
|
766
|
+
readonly model: "control-light";
|
|
767
|
+
readonly tier: "balanced";
|
|
768
|
+
}, {
|
|
769
|
+
readonly mode: "noise";
|
|
770
|
+
readonly model: "topaz-denoise";
|
|
771
|
+
readonly tier: "balanced";
|
|
772
|
+
}, {
|
|
773
|
+
readonly mode: "scratches";
|
|
774
|
+
readonly model: "topaz-restore";
|
|
775
|
+
readonly tier: "balanced";
|
|
776
|
+
}, {
|
|
777
|
+
readonly mode: "softness";
|
|
778
|
+
readonly model: "topaz-sharpen";
|
|
779
|
+
readonly tier: "balanced";
|
|
780
|
+
}, {
|
|
781
|
+
readonly mode: "tone";
|
|
782
|
+
readonly model: "topaz-adjust";
|
|
783
|
+
readonly tier: "balanced";
|
|
784
|
+
}];
|
|
785
|
+
readonly notFor: "Making an image larger (upscale).";
|
|
786
|
+
readonly rankedAt: "2026-09-16";
|
|
787
|
+
readonly rankedFrom: "hand";
|
|
788
|
+
readonly summary: "Fix noise, softness, damage, colour or tone without changing the size.";
|
|
789
|
+
};
|
|
790
|
+
readonly restyle: {
|
|
791
|
+
readonly basis: "Hand-ranked. One Model: TeleStyle v2.";
|
|
792
|
+
readonly models: readonly [{
|
|
793
|
+
readonly model: "telestyle-v2";
|
|
794
|
+
readonly tier: "balanced";
|
|
795
|
+
}];
|
|
796
|
+
readonly notFor: "A house style kept across images (generate with a look).";
|
|
797
|
+
readonly rankedAt: "2026-09-16";
|
|
798
|
+
readonly rankedFrom: "hand";
|
|
799
|
+
readonly summary: "Redraw an image in the style of a reference image.";
|
|
800
|
+
};
|
|
801
|
+
readonly segment: {
|
|
802
|
+
readonly basis: "Hand-ranked. SAM 3.1 for quality, SAM 3 balanced; SAM 2 segments everything without a prompt. RLE modes return run-length masks.";
|
|
803
|
+
readonly modes: readonly [{
|
|
804
|
+
readonly id: "auto";
|
|
805
|
+
readonly summary: "Segment every region without a prompt.";
|
|
806
|
+
}, {
|
|
807
|
+
readonly id: "rle";
|
|
808
|
+
readonly summary: "Return run-length encoded masks instead of images.";
|
|
809
|
+
}];
|
|
810
|
+
readonly models: readonly [{
|
|
811
|
+
readonly model: "sam3-1-image";
|
|
812
|
+
readonly tier: "quality";
|
|
813
|
+
}, {
|
|
814
|
+
readonly model: "sam3-image";
|
|
815
|
+
readonly tier: "balanced";
|
|
816
|
+
}, {
|
|
817
|
+
readonly model: "sam3-1-video";
|
|
818
|
+
readonly tier: "quality";
|
|
819
|
+
}, {
|
|
820
|
+
readonly model: "sam3-video";
|
|
821
|
+
readonly tier: "balanced";
|
|
822
|
+
}, {
|
|
823
|
+
readonly mode: "auto";
|
|
824
|
+
readonly model: "sam2-auto";
|
|
825
|
+
readonly tier: "balanced";
|
|
826
|
+
}, {
|
|
827
|
+
readonly mode: "rle";
|
|
828
|
+
readonly model: "sam3-image-rle";
|
|
829
|
+
readonly tier: "balanced";
|
|
830
|
+
}, {
|
|
831
|
+
readonly mode: "rle";
|
|
832
|
+
readonly model: "sam3-video-rle";
|
|
833
|
+
readonly tier: "balanced";
|
|
834
|
+
}];
|
|
835
|
+
readonly notFor: "The background behind the subject (cutout), or boxes without masks (ask detect).";
|
|
836
|
+
readonly rankedAt: "2026-09-16";
|
|
837
|
+
readonly rankedFrom: "hand";
|
|
838
|
+
readonly summary: "Mask or cut out a named thing in an image or video.";
|
|
839
|
+
};
|
|
840
|
+
readonly tile: {
|
|
841
|
+
readonly basis: "Hand-ranked. Ideogram makes the tile; SeedVR upscales one while keeping its edges seamless.";
|
|
842
|
+
readonly modes: readonly [{
|
|
843
|
+
readonly id: "upscale";
|
|
844
|
+
readonly summary: "Upscale a tiling texture and keep it seamless.";
|
|
845
|
+
}];
|
|
846
|
+
readonly models: readonly [{
|
|
847
|
+
readonly model: "ideogram-tiling";
|
|
848
|
+
readonly sourceOptional: true;
|
|
849
|
+
readonly tier: "balanced";
|
|
850
|
+
}, {
|
|
851
|
+
readonly mode: "upscale";
|
|
852
|
+
readonly model: "seedvr-seamless";
|
|
853
|
+
readonly tier: "balanced";
|
|
854
|
+
}];
|
|
855
|
+
readonly notFor: "PBR maps of a surface (material).";
|
|
856
|
+
readonly rankedAt: "2026-09-16";
|
|
857
|
+
readonly rankedFrom: "hand";
|
|
858
|
+
readonly summary: "Make a seamlessly tiling texture.";
|
|
859
|
+
};
|
|
860
|
+
readonly "try-on": {
|
|
861
|
+
readonly basis: "Hand-ranked. One Model: Google's virtual try-on.";
|
|
862
|
+
readonly models: readonly [{
|
|
863
|
+
readonly model: "virtual-try-on";
|
|
864
|
+
readonly tier: "balanced";
|
|
865
|
+
}];
|
|
866
|
+
readonly notFor: "Changing clothes by description (generate with a reference).";
|
|
867
|
+
readonly rankedAt: "2026-09-16";
|
|
868
|
+
readonly rankedFrom: "hand";
|
|
869
|
+
readonly summary: "Dress a person in a garment from another image.";
|
|
870
|
+
};
|
|
871
|
+
readonly upscale: {
|
|
872
|
+
readonly basis: "Hand-ranked. Topaz Precision and Topaz Image lead quality for fidelity at $0.003/MP; Clarity stays the balanced default it was as --up; Crystal is fast. SeedVR is the balanced second. Topaz Transparent is the only Model that keeps alpha. Generative and creative modes invent detail. Topaz Video upscales video.";
|
|
873
|
+
readonly modes: readonly [{
|
|
874
|
+
readonly id: "creative";
|
|
875
|
+
readonly summary: "Reimagine detail as it enlarges.";
|
|
876
|
+
}, {
|
|
877
|
+
readonly id: "generative";
|
|
878
|
+
readonly summary: "Synthesise plausible detail as it enlarges.";
|
|
879
|
+
}];
|
|
880
|
+
readonly models: readonly [{
|
|
881
|
+
readonly model: "topaz-precision";
|
|
882
|
+
readonly tier: "quality";
|
|
883
|
+
}, {
|
|
884
|
+
readonly model: "topaz-image";
|
|
885
|
+
readonly tier: "quality";
|
|
886
|
+
}, {
|
|
887
|
+
readonly model: "clarity";
|
|
888
|
+
readonly tier: "balanced";
|
|
889
|
+
}, {
|
|
890
|
+
readonly model: "seedvr-upscale";
|
|
891
|
+
readonly tier: "balanced";
|
|
892
|
+
}, {
|
|
893
|
+
readonly model: "crystal";
|
|
894
|
+
readonly tier: "fast";
|
|
895
|
+
}, {
|
|
896
|
+
readonly model: "topaz-transparent";
|
|
897
|
+
readonly supports: readonly ["transparency"];
|
|
898
|
+
readonly tier: "balanced";
|
|
899
|
+
}, {
|
|
900
|
+
readonly model: "topaz-video";
|
|
901
|
+
readonly tier: "balanced";
|
|
902
|
+
}, {
|
|
903
|
+
readonly mode: "creative";
|
|
904
|
+
readonly model: "topaz-creative";
|
|
905
|
+
readonly tier: "balanced";
|
|
906
|
+
}, {
|
|
907
|
+
readonly mode: "generative";
|
|
908
|
+
readonly model: "topaz-generative";
|
|
909
|
+
readonly tier: "balanced";
|
|
910
|
+
}];
|
|
911
|
+
readonly notFor: "Fixing noise, softness or colour without changing the size (restore).";
|
|
912
|
+
readonly rankedAt: "2026-09-16";
|
|
913
|
+
readonly rankedFrom: "hand";
|
|
914
|
+
readonly summary: "Make an image or video larger without losing detail.";
|
|
915
|
+
};
|
|
916
|
+
readonly vectorize: {
|
|
917
|
+
readonly basis: "Hand-ranked. Recraft gives a clean SVG with few paths; image2svg traces faithfully with many paths and costs an eighth as much.";
|
|
918
|
+
readonly models: readonly [{
|
|
919
|
+
readonly model: "recraft-vectorize";
|
|
920
|
+
readonly tier: "balanced";
|
|
921
|
+
}, {
|
|
922
|
+
readonly model: "image2svg";
|
|
923
|
+
readonly tier: "fast";
|
|
924
|
+
}];
|
|
925
|
+
readonly notFor: "Drawing a new image from a prompt (generate).";
|
|
926
|
+
readonly rankedAt: "2026-09-16";
|
|
927
|
+
readonly rankedFrom: "hand";
|
|
928
|
+
readonly summary: "Trace a raster image to a clean SVG.";
|
|
929
|
+
};
|
|
930
|
+
readonly vary: {
|
|
931
|
+
readonly basis: "The generate ranking, filtered to Models that can edit. vary reuses the Model of the image it varies while Motif still offers it.";
|
|
932
|
+
readonly models: RankedModel[];
|
|
933
|
+
readonly notFor: "A specific change to an image described in words (generate with a reference), or a set of different scenes in one style (series run).";
|
|
934
|
+
readonly rankedAt: "2026-09-16";
|
|
935
|
+
readonly rankedFrom: "hand";
|
|
936
|
+
readonly summary: "Make variations of an image you already have.";
|
|
937
|
+
};
|
|
938
|
+
};
|
|
939
|
+
/** A Task that has at least one Model. */
|
|
940
|
+
type TaskId = keyof typeof TASKS;
|
|
941
|
+
export declare const TASK_IDS: readonly TaskId[];
|
|
942
|
+
export declare function isTaskId(value: string): value is TaskId;
|
|
1901
943
|
//#endregion
|
|
1902
|
-
//#region src/
|
|
1903
|
-
|
|
944
|
+
//#region src/resolve.d.ts
|
|
945
|
+
/** What the request needs. Only the fields that narrow the choice. */
|
|
946
|
+
interface TaskRequest {
|
|
947
|
+
/** Explicit Model id, e.g. from `--model`. Overrides everything. */
|
|
948
|
+
readonly model?: string;
|
|
949
|
+
/** Look id. A Look fixes the Model, so `tier` has no effect with one. */
|
|
950
|
+
readonly look?: string;
|
|
951
|
+
readonly tier?: Tier;
|
|
952
|
+
/** Transparent output wanted. */
|
|
953
|
+
readonly transparent?: boolean;
|
|
954
|
+
/** Number of reference images passed in. */
|
|
955
|
+
readonly references?: number;
|
|
956
|
+
/** A mask image is passed in. */
|
|
957
|
+
readonly mask?: boolean;
|
|
958
|
+
/** An aspect ratio is asked for, e.g. `"3:2"`. */
|
|
959
|
+
readonly aspect?: string;
|
|
960
|
+
/** A resolution tier is asked for, e.g. `"1K"`. */
|
|
961
|
+
readonly resolution?: string;
|
|
962
|
+
/** Number of outputs wanted. */
|
|
963
|
+
readonly count?: number;
|
|
964
|
+
readonly seed?: boolean;
|
|
965
|
+
readonly negativePrompt?: boolean;
|
|
966
|
+
readonly outputFormat?: boolean;
|
|
967
|
+
/** A rigged mesh wanted. */
|
|
968
|
+
readonly rig?: boolean;
|
|
969
|
+
/** The kind of Source passed in. Absent for a text-only request. */
|
|
970
|
+
readonly source?: "image" | "video";
|
|
971
|
+
/** A named variant of the Task, e.g. `"text"` for erase. */
|
|
972
|
+
readonly mode?: string;
|
|
973
|
+
}
|
|
974
|
+
interface TaskEnvironment {
|
|
975
|
+
/** Names of the provider key variables that are set, e.g. `["FAL_KEY"]`. */
|
|
976
|
+
readonly keys: readonly string[];
|
|
977
|
+
/** Models pinned per Task in config (`tasks.<task>.model`). */
|
|
978
|
+
readonly pins?: Readonly<Partial<Record<TaskId, string>>>;
|
|
979
|
+
}
|
|
980
|
+
/** Which rule fixed the Model. */
|
|
981
|
+
type ChosenBy = "look" | "model" | "pin" | "ranking";
|
|
982
|
+
type Blocker = Capability | "key" | "mode" | "unknown-model";
|
|
1904
983
|
/**
|
|
1905
|
-
*
|
|
1906
|
-
*
|
|
1907
|
-
* an agent unable to budget across a registry spanning $0.001 to $0.48.
|
|
984
|
+
* What unblocks a refused request: name another Model, set a key, drop an
|
|
985
|
+
* option the request asked for, or supply an input a Model needs (a mask).
|
|
1908
986
|
*/
|
|
1909
|
-
type
|
|
1910
|
-
|
|
1911
|
-
|
|
1912
|
-
|
|
1913
|
-
|
|
1914
|
-
|
|
1915
|
-
|
|
1916
|
-
|
|
1917
|
-
|
|
1918
|
-
} | {
|
|
1919
|
-
kind: "metered";
|
|
1920
|
-
};
|
|
1921
|
-
interface FalToolConfig {
|
|
1922
|
-
category: "3d" | "analysis" | "background" | "depth" | "erase" | "layers" | "material" | "moderation" | "preprocess" | "reframe" | "relight" | "restoration" | "segmentation" | "upscale" | "vector";
|
|
1923
|
-
defaultOptions?: Record<string, unknown>;
|
|
1924
|
-
description: string;
|
|
1925
|
-
endpoint: string;
|
|
1926
|
-
inputField: "image_url" | "image_urls" | "input_image_url" | "input_image_urls" | "video_url";
|
|
1927
|
-
inputKind: FalToolInputKind;
|
|
1928
|
-
name: string;
|
|
1929
|
-
outputKeys: string[];
|
|
1930
|
-
/**
|
|
1931
|
-
* Names for the positions of an array-valued output. Used to name downloaded
|
|
1932
|
-
* files: without it a PBR set lands as images-2.png, images-3.png and the
|
|
1933
|
-
* caller cannot tell a roughness map from a normal map.
|
|
1934
|
-
*
|
|
1935
|
-
* Two rule shapes, because the names come from two different places.
|
|
1936
|
-
*
|
|
1937
|
-
* Request-driven: `fromOption` names the request option that actually
|
|
1938
|
-
* determines the order — read the resolved request body first and use its
|
|
1939
|
-
* value when present, since a caller may reorder or subset it. `fallback` is
|
|
1940
|
-
* the endpoint's schema default, used when the option is absent.
|
|
1941
|
-
*
|
|
1942
|
-
* Response-driven: `fromItem` reads the name off each element of the output
|
|
1943
|
-
* array itself, for endpoints that label what they produced (seedream's
|
|
1944
|
-
* layer stack names every layer). `nameField` holds the name and
|
|
1945
|
-
* `orderField`, when set, holds a non-negative integer that prefixes it so
|
|
1946
|
-
* the files sort in stack order. These strings come from a model, so the
|
|
1947
|
-
* consumer slugifies them into a filename and keeps positional naming when
|
|
1948
|
-
* nothing usable survives.
|
|
1949
|
-
*
|
|
1950
|
-
* Whichever is used, check the label count against the URL count before
|
|
1951
|
-
* applying it: a mislabelled map is worse than a positional one, because it
|
|
1952
|
-
* reads as authoritative.
|
|
1953
|
-
*
|
|
1954
|
-
* Only set this where the order or the naming is actually determined — by a
|
|
1955
|
-
* request option, by the schema, or by the response. Leave genuinely
|
|
1956
|
-
* unordered, unnamed arrays unlabelled.
|
|
1957
|
-
*/
|
|
1958
|
-
outputLabels?: Record<string, {
|
|
1959
|
-
fallback: readonly string[];
|
|
1960
|
-
fromOption?: string;
|
|
1961
|
-
} | {
|
|
1962
|
-
fromItem: {
|
|
1963
|
-
nameField: string;
|
|
1964
|
-
orderField?: string;
|
|
1965
|
-
};
|
|
1966
|
-
}>;
|
|
1967
|
-
price: FalToolPrice;
|
|
1968
|
-
pricing: string;
|
|
1969
|
-
/**
|
|
1970
|
-
* Endpoint routinely exceeds the 120s sync timeout; callers should use the
|
|
1971
|
-
* queue path.
|
|
1972
|
-
*/
|
|
1973
|
-
queued?: true;
|
|
1974
|
-
sourceUrl: string;
|
|
1975
|
-
task: string;
|
|
987
|
+
type Unblocker = "input" | "key" | "model" | "option";
|
|
988
|
+
export declare const NO_MODEL_AVAILABLE = "NO_MODEL_AVAILABLE";
|
|
989
|
+
interface TaskResolved {
|
|
990
|
+
readonly ok: true;
|
|
991
|
+
readonly task: TaskId;
|
|
992
|
+
readonly model: string;
|
|
993
|
+
readonly tier: Tier;
|
|
994
|
+
readonly rankedFrom: RankedFrom;
|
|
995
|
+
readonly chosenBy: ChosenBy;
|
|
1976
996
|
}
|
|
1977
|
-
interface
|
|
1978
|
-
|
|
1979
|
-
|
|
1980
|
-
|
|
1981
|
-
|
|
997
|
+
interface TaskUnresolved {
|
|
998
|
+
readonly ok: false;
|
|
999
|
+
readonly error: typeof NO_MODEL_AVAILABLE;
|
|
1000
|
+
readonly task: TaskId;
|
|
1001
|
+
/** The capability, or missing key, that stopped the best candidate. */
|
|
1002
|
+
readonly blockedBy: Blocker;
|
|
1003
|
+
/** What would unblock it: name a Model, set a key, drop the option. */
|
|
1004
|
+
readonly unblockedBy: readonly Unblocker[];
|
|
1005
|
+
/** The key variable that would unblock a Model, when one would. */
|
|
1006
|
+
readonly missingKey?: string;
|
|
1007
|
+
readonly message: string;
|
|
1982
1008
|
}
|
|
1983
|
-
|
|
1984
|
-
|
|
1985
|
-
|
|
1986
|
-
|
|
1009
|
+
type TaskResolution = TaskResolved | TaskUnresolved;
|
|
1010
|
+
interface ModelProfile {
|
|
1011
|
+
readonly capabilities: ReadonlySet<Capability>;
|
|
1012
|
+
/** Capabilities reachable only when this key variable is set. */
|
|
1013
|
+
readonly keyedCapabilities: ReadonlyMap<Capability, string>;
|
|
1014
|
+
/** Key variables the Model needs for any request. */
|
|
1015
|
+
readonly keys: readonly string[];
|
|
1016
|
+
readonly maxReferences: number;
|
|
1017
|
+
/** Aspect ratios the Model accepts. Absent means any. */
|
|
1018
|
+
readonly aspects?: readonly string[];
|
|
1019
|
+
/** Resolutions the Model accepts. Absent means any. */
|
|
1020
|
+
readonly resolutions?: readonly string[];
|
|
1987
1021
|
}
|
|
1022
|
+
/** The profile for a Model id, or undefined when no registry knows it. */
|
|
1023
|
+
export declare function modelProfile(model: string): ModelProfile | undefined;
|
|
1024
|
+
/**
|
|
1025
|
+
* Choose the Model for a Task. Pure: no I/O, and the prompt is never read.
|
|
1026
|
+
*
|
|
1027
|
+
* `request.look` must already be a valid Look id; an unknown one is treated as
|
|
1028
|
+
* no Look, because Look validation belongs to the creative layer.
|
|
1029
|
+
*/
|
|
1030
|
+
export declare function resolveTask(task: TaskId, request: TaskRequest, environment: TaskEnvironment): TaskResolution;
|
|
1031
|
+
/**
|
|
1032
|
+
* Whether the Tier changes the Model for this Task and request. False for a
|
|
1033
|
+
* Task with one qualifying Model, so `--describe` can say the Tier changes
|
|
1034
|
+
* nothing there.
|
|
1035
|
+
*/
|
|
1036
|
+
export declare function tierChangesChoice(task: TaskId, request: Omit<TaskRequest, "tier">, environment: TaskEnvironment): boolean;
|
|
1988
1037
|
//#endregion
|
|
1989
|
-
//#region src/
|
|
1990
|
-
|
|
1991
|
-
|
|
1992
|
-
|
|
1993
|
-
|
|
1994
|
-
|
|
1995
|
-
|
|
1996
|
-
|
|
1997
|
-
|
|
1998
|
-
|
|
1999
|
-
|
|
2000
|
-
|
|
2001
|
-
|
|
2002
|
-
|
|
2003
|
-
|
|
2004
|
-
|
|
2005
|
-
|
|
2006
|
-
|
|
2007
|
-
|
|
2008
|
-
|
|
2009
|
-
|
|
2010
|
-
|
|
2011
|
-
|
|
2012
|
-
|
|
2013
|
-
|
|
2014
|
-
|
|
2015
|
-
|
|
2016
|
-
|
|
2017
|
-
|
|
2018
|
-
|
|
2019
|
-
|
|
2020
|
-
readonly task: "image captioning";
|
|
2021
|
-
};
|
|
2022
|
-
readonly "moondream-detect": {
|
|
2023
|
-
readonly category: "analysis";
|
|
2024
|
-
readonly description: "Detect prompted objects and return their bounding boxes, with an optional preview.";
|
|
2025
|
-
readonly endpoint: "fal-ai/moondream3-preview/detect";
|
|
2026
|
-
readonly inputField: "image_url";
|
|
2027
|
-
readonly inputKind: "image";
|
|
2028
|
-
readonly name: "Moondream 3 Detect";
|
|
2029
|
-
readonly outputKeys: ["objects", "image"];
|
|
2030
|
-
readonly price: {
|
|
2031
|
-
readonly kind: "metered";
|
|
2032
|
-
};
|
|
2033
|
-
readonly pricing: "$0.40/M input tokens, $3.50/M output tokens";
|
|
2034
|
-
readonly sourceUrl: "https://fal.ai/models/fal-ai/moondream3-preview/detect";
|
|
2035
|
-
readonly task: "object detection";
|
|
2036
|
-
};
|
|
2037
|
-
readonly "moondream-point": {
|
|
2038
|
-
readonly category: "analysis";
|
|
2039
|
-
readonly description: "Return point coordinates for every instance of a prompted subject.";
|
|
2040
|
-
readonly endpoint: "fal-ai/moondream3-preview/point";
|
|
2041
|
-
readonly inputField: "image_url";
|
|
2042
|
-
readonly inputKind: "image";
|
|
2043
|
-
readonly name: "Moondream 3 Point";
|
|
2044
|
-
readonly outputKeys: ["points", "image"];
|
|
2045
|
-
readonly price: {
|
|
2046
|
-
readonly kind: "metered";
|
|
2047
|
-
};
|
|
2048
|
-
readonly pricing: "$0.40/M input tokens, $3.50/M output tokens";
|
|
2049
|
-
readonly sourceUrl: "https://fal.ai/models/fal-ai/moondream3-preview/point";
|
|
2050
|
-
readonly task: "object pointing";
|
|
2051
|
-
};
|
|
2052
|
-
readonly "moondream-query": {
|
|
2053
|
-
readonly category: "analysis";
|
|
2054
|
-
readonly description: "Answer a free-form question about an image, with reasoning.";
|
|
2055
|
-
readonly endpoint: "fal-ai/moondream3-preview/query";
|
|
2056
|
-
readonly inputField: "image_url";
|
|
2057
|
-
readonly inputKind: "image";
|
|
2058
|
-
readonly name: "Moondream 3 Query";
|
|
2059
|
-
readonly outputKeys: ["output", "reasoning"];
|
|
2060
|
-
readonly price: {
|
|
2061
|
-
readonly kind: "metered";
|
|
2062
|
-
};
|
|
2063
|
-
readonly pricing: "$0.40/M input tokens, $3.50/M output tokens";
|
|
2064
|
-
readonly sourceUrl: "https://fal.ai/models/fal-ai/moondream3-preview/query";
|
|
2065
|
-
readonly task: "visual question answering";
|
|
2066
|
-
};
|
|
2067
|
-
readonly nsfw: {
|
|
2068
|
-
readonly category: "moderation";
|
|
2069
|
-
readonly description: "Predict whether one or more images contain NSFW concepts.";
|
|
2070
|
-
readonly endpoint: "fal-ai/x-ailab/nsfw";
|
|
2071
|
-
readonly inputField: "image_urls";
|
|
2072
|
-
readonly inputKind: "images";
|
|
2073
|
-
readonly name: "NSFW Checker";
|
|
2074
|
-
readonly outputKeys: ["has_nsfw_concepts"];
|
|
2075
|
-
readonly price: {
|
|
2076
|
-
readonly kind: "metered";
|
|
2077
|
-
};
|
|
2078
|
-
readonly pricing: "$0.001/image";
|
|
2079
|
-
readonly sourceUrl: "https://fal.ai/models/fal-ai/x-ailab/nsfw";
|
|
2080
|
-
readonly task: "vision moderation";
|
|
2081
|
-
};
|
|
2082
|
-
readonly "hunyuan3d-v3": {
|
|
2083
|
-
readonly category: "3d";
|
|
2084
|
-
readonly description: "Reconstruct a textured 3D mesh from a single image, with optional multi-view inputs.";
|
|
2085
|
-
readonly endpoint: "fal-ai/hunyuan3d-v3/image-to-3d";
|
|
2086
|
-
readonly inputField: "input_image_url";
|
|
2087
|
-
readonly inputKind: "image";
|
|
2088
|
-
readonly name: "Hunyuan3D v3 Image to 3D";
|
|
2089
|
-
readonly outputKeys: ["model_glb", "model_urls", "thumbnail"];
|
|
2090
|
-
readonly price: {
|
|
2091
|
-
readonly kind: "call";
|
|
2092
|
-
readonly usd: 0.375;
|
|
2093
|
-
};
|
|
2094
|
-
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";
|
|
2095
|
-
readonly queued: true;
|
|
2096
|
-
readonly sourceUrl: "https://fal.ai/models/fal-ai/hunyuan3d-v3/image-to-3d";
|
|
2097
|
-
readonly task: "single-image 3D reconstruction";
|
|
2098
|
-
};
|
|
2099
|
-
readonly "ideogram-layerize-text": {
|
|
2100
|
-
readonly category: "layers";
|
|
2101
|
-
readonly description: "Split an image into background image layers plus editable HTML text containers.";
|
|
2102
|
-
readonly endpoint: "fal-ai/ideogram/v3/layerize-text";
|
|
2103
|
-
readonly inputField: "image_url";
|
|
2104
|
-
readonly inputKind: "image";
|
|
2105
|
-
readonly name: "Ideogram v3 Text Layerize";
|
|
2106
|
-
readonly outputKeys: ["image_layers", "image", "text_html", "text_containers"];
|
|
2107
|
-
readonly price: {
|
|
2108
|
-
readonly kind: "call";
|
|
2109
|
-
readonly usd: 0.09;
|
|
2110
|
-
};
|
|
2111
|
-
readonly pricing: "$0.09/image";
|
|
2112
|
-
readonly queued: true;
|
|
2113
|
-
readonly sourceUrl: "https://fal.ai/models/fal-ai/ideogram/v3/layerize-text";
|
|
2114
|
-
readonly task: "text and image layer extraction";
|
|
2115
|
-
};
|
|
2116
|
-
readonly "ideogram-tiling": {
|
|
2117
|
-
readonly category: "material";
|
|
2118
|
-
readonly description: "Generate a seamlessly tiling texture, optionally conditioned on a source image.";
|
|
2119
|
-
readonly endpoint: "ideogram/v4/tiling";
|
|
2120
|
-
readonly inputField: "image_url";
|
|
2121
|
-
readonly inputKind: "image";
|
|
2122
|
-
readonly name: "Ideogram v4 Tiling";
|
|
2123
|
-
readonly outputKeys: ["images"];
|
|
2124
|
-
readonly price: {
|
|
2125
|
-
readonly kind: "megapixel";
|
|
2126
|
-
readonly usd: 0.06;
|
|
2127
|
-
};
|
|
2128
|
-
readonly pricing: "$0.06/megapixel at the default BALANCED speed; $0.03 turbo, $0.10 quality";
|
|
2129
|
-
readonly sourceUrl: "https://fal.ai/models/ideogram/v4/tiling";
|
|
2130
|
-
readonly task: "seamless texture generation";
|
|
2131
|
-
};
|
|
2132
|
-
readonly image2svg: {
|
|
2133
|
-
readonly category: "vector";
|
|
2134
|
-
readonly description: "Trace a raster image into layered SVG paths.";
|
|
2135
|
-
readonly endpoint: "fal-ai/image2svg";
|
|
2136
|
-
readonly inputField: "image_url";
|
|
2137
|
-
readonly inputKind: "image";
|
|
2138
|
-
readonly name: "Image to SVG";
|
|
2139
|
-
readonly outputKeys: ["images"];
|
|
2140
|
-
readonly price: {
|
|
2141
|
-
readonly kind: "call";
|
|
2142
|
-
readonly usd: 0.005;
|
|
2143
|
-
};
|
|
2144
|
-
readonly pricing: "$0.005/image";
|
|
2145
|
-
readonly sourceUrl: "https://fal.ai/models/fal-ai/image2svg";
|
|
2146
|
-
readonly task: "raster to vector tracing";
|
|
2147
|
-
};
|
|
2148
|
-
readonly patina: {
|
|
2149
|
-
readonly category: "material";
|
|
2150
|
-
readonly description: "Decompose a surface photograph into PBR maps: basecolor, normal, roughness, metalness, height.";
|
|
2151
|
-
readonly endpoint: "fal-ai/patina";
|
|
2152
|
-
readonly inputField: "image_url";
|
|
2153
|
-
readonly inputKind: "image";
|
|
2154
|
-
readonly name: "Patina PBR Maps";
|
|
2155
|
-
readonly outputKeys: ["images"];
|
|
2156
|
-
readonly outputLabels: {
|
|
2157
|
-
readonly images: {
|
|
2158
|
-
readonly fallback: readonly ["basecolor", "normal", "roughness", "metalness", "height"];
|
|
2159
|
-
readonly fromOption: "maps";
|
|
2160
|
-
};
|
|
2161
|
-
};
|
|
2162
|
-
readonly price: {
|
|
2163
|
-
readonly kind: "metered";
|
|
2164
|
-
};
|
|
2165
|
-
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";
|
|
2166
|
-
readonly queued: true;
|
|
2167
|
-
readonly sourceUrl: "https://fal.ai/models/fal-ai/patina";
|
|
2168
|
-
readonly task: "PBR material decomposition";
|
|
2169
|
-
};
|
|
2170
|
-
readonly "patina-extract": {
|
|
2171
|
-
readonly category: "material";
|
|
2172
|
-
readonly description: "Extract a tiling PBR material from a prompted region of a photograph.";
|
|
2173
|
-
readonly endpoint: "fal-ai/patina/material/extract";
|
|
2174
|
-
readonly inputField: "image_url";
|
|
2175
|
-
readonly inputKind: "image";
|
|
2176
|
-
readonly name: "Patina Material Extract";
|
|
2177
|
-
readonly outputKeys: ["images"];
|
|
2178
|
-
readonly outputLabels: {
|
|
2179
|
-
readonly images: {
|
|
2180
|
-
readonly fallback: readonly ["basecolor", "normal", "roughness", "metalness", "height"];
|
|
2181
|
-
readonly fromOption: "maps";
|
|
2182
|
-
};
|
|
2183
|
-
};
|
|
2184
|
-
readonly price: {
|
|
2185
|
-
readonly kind: "metered";
|
|
2186
|
-
};
|
|
2187
|
-
readonly pricing: "$0.10 base only; add $0.02/megapixel plus $0.01/megapixel per map, so 1MP with all 5 maps is $0.17";
|
|
2188
|
-
readonly queued: true;
|
|
2189
|
-
readonly sourceUrl: "https://fal.ai/models/fal-ai/patina/material/extract";
|
|
2190
|
-
readonly task: "tiling material extraction";
|
|
2191
|
-
};
|
|
2192
|
-
readonly "qwen-layered": {
|
|
2193
|
-
readonly category: "layers";
|
|
2194
|
-
readonly description: "Split an image into a configurable number of stacked RGBA layers.";
|
|
2195
|
-
readonly endpoint: "fal-ai/qwen-image-layered";
|
|
2196
|
-
readonly inputField: "image_url";
|
|
2197
|
-
readonly inputKind: "image";
|
|
2198
|
-
readonly name: "Qwen Image Layered";
|
|
2199
|
-
readonly outputKeys: ["images"];
|
|
2200
|
-
readonly price: {
|
|
2201
|
-
readonly kind: "metered";
|
|
2202
|
-
};
|
|
2203
|
-
readonly pricing: "$0.05 per image; fal does not say whether that counts the input image or each of the generated layers, so no estimate is reported";
|
|
2204
|
-
readonly queued: true;
|
|
2205
|
-
readonly sourceUrl: "https://fal.ai/models/fal-ai/qwen-image-layered";
|
|
2206
|
-
readonly task: "image layer decomposition";
|
|
2207
|
-
};
|
|
2208
|
-
readonly "recraft-vectorize": {
|
|
2209
|
-
readonly category: "vector";
|
|
2210
|
-
readonly description: "Convert a raster image into a clean SVG.";
|
|
2211
|
-
readonly endpoint: "fal-ai/recraft/vectorize";
|
|
2212
|
-
readonly inputField: "image_url";
|
|
2213
|
-
readonly inputKind: "image";
|
|
2214
|
-
readonly name: "Recraft Vectorize";
|
|
2215
|
-
readonly outputKeys: ["image"];
|
|
2216
|
-
readonly price: {
|
|
2217
|
-
readonly kind: "call";
|
|
2218
|
-
readonly usd: 0.04;
|
|
2219
|
-
};
|
|
2220
|
-
readonly pricing: "$0.04/image, $0.08 with a vector style";
|
|
2221
|
-
readonly sourceUrl: "https://fal.ai/models/fal-ai/recraft/vectorize";
|
|
2222
|
-
readonly task: "raster to vector conversion";
|
|
2223
|
-
};
|
|
2224
|
-
readonly "sam3-3d-align": {
|
|
2225
|
-
readonly category: "3d";
|
|
2226
|
-
readonly description: "Align SAM 3D objects and bodies into a shared scene.";
|
|
2227
|
-
readonly endpoint: "fal-ai/sam-3/3d-align";
|
|
2228
|
-
readonly inputField: "image_url";
|
|
2229
|
-
readonly inputKind: "image";
|
|
2230
|
-
readonly name: "SAM 3D Align";
|
|
2231
|
-
readonly outputKeys: ["scene_glb", "model_glb", "visualization", "body_mesh_ply", "metadata"];
|
|
2232
|
-
readonly price: {
|
|
2233
|
-
readonly kind: "metered";
|
|
2234
|
-
};
|
|
2235
|
-
readonly pricing: "$0.02 per unit; fal does not define a unit, so no estimate is reported";
|
|
2236
|
-
readonly queued: true;
|
|
2237
|
-
readonly sourceUrl: "https://fal.ai/models/fal-ai/sam-3/3d-align";
|
|
2238
|
-
readonly task: "3D scene alignment";
|
|
2239
|
-
};
|
|
2240
|
-
readonly "sam3-3d-body": {
|
|
2241
|
-
readonly category: "3d";
|
|
2242
|
-
readonly defaultOptions: {
|
|
2243
|
-
readonly export_meshes: true;
|
|
2244
|
-
readonly include_3d_keypoints: true;
|
|
2245
|
-
readonly include_mhr_params: true;
|
|
2246
|
-
};
|
|
2247
|
-
readonly description: "Reconstruct human body meshes and keypoints from a single image.";
|
|
2248
|
-
readonly endpoint: "fal-ai/sam-3/3d-body";
|
|
2249
|
-
readonly inputField: "image_url";
|
|
2250
|
-
readonly inputKind: "image";
|
|
2251
|
-
readonly name: "SAM 3D Body";
|
|
2252
|
-
readonly outputKeys: ["model_glb", "visualization", "meshes", "metadata"];
|
|
2253
|
-
readonly price: {
|
|
2254
|
-
readonly kind: "metered";
|
|
2255
|
-
};
|
|
2256
|
-
readonly pricing: "$0.02 per unit; fal does not define a unit, so no estimate is reported";
|
|
2257
|
-
readonly queued: true;
|
|
2258
|
-
readonly sourceUrl: "https://fal.ai/models/fal-ai/sam-3/3d-body";
|
|
2259
|
-
readonly task: "single-image 3D body reconstruction";
|
|
2260
|
-
};
|
|
2261
|
-
readonly "sam3-3d-objects": {
|
|
2262
|
-
readonly category: "3d";
|
|
2263
|
-
readonly defaultOptions: {
|
|
2264
|
-
readonly prompt: "car";
|
|
2265
|
-
};
|
|
2266
|
-
readonly description: "Reconstruct one or more 3D objects from an image and prompts.";
|
|
2267
|
-
readonly endpoint: "fal-ai/sam-3/3d-objects";
|
|
2268
|
-
readonly inputField: "image_url";
|
|
2269
|
-
readonly inputKind: "image";
|
|
2270
|
-
readonly name: "SAM 3D Objects";
|
|
2271
|
-
readonly outputKeys: ["gaussian_splat", "model_glb", "metadata", "individual_splats", "individual_glbs", "artifacts_zip"];
|
|
2272
|
-
readonly price: {
|
|
2273
|
-
readonly kind: "metered";
|
|
2274
|
-
};
|
|
2275
|
-
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";
|
|
2276
|
-
readonly queued: true;
|
|
2277
|
-
readonly sourceUrl: "https://fal.ai/models/fal-ai/sam-3/3d-objects";
|
|
2278
|
-
readonly task: "single-image 3D object reconstruction";
|
|
2279
|
-
};
|
|
2280
|
-
readonly "seedream-layerize": {
|
|
2281
|
-
readonly category: "layers";
|
|
2282
|
-
readonly description: "Split an image into editable Seedream layers plus flattened previews.";
|
|
2283
|
-
readonly endpoint: "bytedance/seedream/v5/pro/layerize";
|
|
2284
|
-
readonly inputField: "image_url";
|
|
2285
|
-
readonly inputKind: "image";
|
|
2286
|
-
readonly name: "Seedream v5 Pro Layerize";
|
|
2287
|
-
readonly outputKeys: ["layers", "images"];
|
|
2288
|
-
readonly outputLabels: {
|
|
2289
|
-
readonly layers: {
|
|
2290
|
-
readonly fromItem: {
|
|
2291
|
-
readonly nameField: "name";
|
|
2292
|
-
readonly orderField: "z_index";
|
|
2293
|
-
};
|
|
2294
|
-
};
|
|
2295
|
-
};
|
|
2296
|
-
readonly price: {
|
|
2297
|
-
readonly kind: "metered";
|
|
2298
|
-
};
|
|
2299
|
-
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";
|
|
2300
|
-
readonly queued: true;
|
|
2301
|
-
readonly sourceUrl: "https://fal.ai/models/bytedance/seedream/v5/pro/layerize";
|
|
2302
|
-
readonly task: "image layer decomposition";
|
|
2303
|
-
};
|
|
2304
|
-
readonly "seedvr-seamless": {
|
|
2305
|
-
readonly category: "material";
|
|
2306
|
-
readonly description: "Upscale a tiling texture while keeping its edges seamless. ";
|
|
2307
|
-
readonly endpoint: "fal-ai/seedvr/upscale/image/seamless";
|
|
2308
|
-
readonly inputField: "image_url";
|
|
2309
|
-
readonly inputKind: "image";
|
|
2310
|
-
readonly name: "SeedVR Seamless Upscale";
|
|
2311
|
-
readonly outputKeys: ["image"];
|
|
2312
|
-
readonly price: {
|
|
2313
|
-
readonly kind: "megapixel";
|
|
2314
|
-
readonly usd: 0.0025;
|
|
2315
|
-
};
|
|
2316
|
-
readonly pricing: "$0.0025/megapixel";
|
|
2317
|
-
readonly queued: true;
|
|
2318
|
-
readonly sourceUrl: "https://fal.ai/models/fal-ai/seedvr/upscale/image/seamless";
|
|
2319
|
-
readonly task: "seamless texture upscaling";
|
|
2320
|
-
};
|
|
2321
|
-
readonly "trellis-2": {
|
|
2322
|
-
readonly category: "3d";
|
|
2323
|
-
readonly description: "Reconstruct a textured 3D mesh from a single image, with UV unwrapping.";
|
|
2324
|
-
readonly endpoint: "fal-ai/trellis-2";
|
|
2325
|
-
readonly inputField: "image_url";
|
|
2326
|
-
readonly inputKind: "image";
|
|
2327
|
-
readonly name: "TRELLIS 2";
|
|
2328
|
-
readonly outputKeys: ["model_glb"];
|
|
2329
|
-
readonly price: {
|
|
2330
|
-
readonly kind: "call";
|
|
2331
|
-
readonly usd: 0.3;
|
|
2332
|
-
};
|
|
2333
|
-
readonly pricing: "$0.30 at the default 1024p; $0.25 at 512p, $0.35 at 1536p";
|
|
2334
|
-
readonly queued: true;
|
|
2335
|
-
readonly sourceUrl: "https://fal.ai/models/fal-ai/trellis-2";
|
|
2336
|
-
readonly task: "single-image 3D reconstruction";
|
|
2337
|
-
};
|
|
2338
|
-
readonly "ben-v2": {
|
|
2339
|
-
readonly category: "background";
|
|
2340
|
-
readonly description: "Fast, high-quality background removal for images.";
|
|
2341
|
-
readonly endpoint: "fal-ai/ben/v2/image";
|
|
2342
|
-
readonly inputField: "image_url";
|
|
2343
|
-
readonly inputKind: "image";
|
|
2344
|
-
readonly name: "BEN v2 Background Removal";
|
|
2345
|
-
readonly outputKeys: ["image"];
|
|
2346
|
-
readonly price: {
|
|
2347
|
-
readonly kind: "megapixel";
|
|
2348
|
-
readonly usd: 0.025;
|
|
2349
|
-
};
|
|
2350
|
-
readonly pricing: "$0.025/megapixel";
|
|
2351
|
-
readonly sourceUrl: "https://fal.ai/models/fal-ai/ben/v2/image";
|
|
2352
|
-
readonly task: "image background removal";
|
|
2353
|
-
};
|
|
2354
|
-
readonly birefnet: {
|
|
2355
|
-
readonly category: "background";
|
|
2356
|
-
readonly defaultOptions: {
|
|
2357
|
-
readonly model: "General Use (Light)";
|
|
2358
|
-
readonly operating_resolution: "1024x1024";
|
|
2359
|
-
readonly output_format: "png";
|
|
2360
|
-
readonly refine_foreground: true;
|
|
2361
|
-
};
|
|
2362
|
-
readonly description: "High-resolution dichotomous image segmentation and background removal.";
|
|
2363
|
-
readonly endpoint: "fal-ai/birefnet/v2";
|
|
2364
|
-
readonly inputField: "image_url";
|
|
2365
|
-
readonly inputKind: "image";
|
|
2366
|
-
readonly name: "BirefNet Background Removal";
|
|
2367
|
-
readonly outputKeys: ["image", "mask_image"];
|
|
2368
|
-
readonly price: {
|
|
2369
|
-
readonly kind: "metered";
|
|
2370
|
-
};
|
|
2371
|
-
readonly pricing: "$0/compute-second listed by fal";
|
|
2372
|
-
readonly sourceUrl: "https://fal.ai/models/fal-ai/birefnet/v2";
|
|
2373
|
-
readonly task: "image background removal";
|
|
2374
|
-
};
|
|
2375
|
-
readonly "bria-rmbg": {
|
|
2376
|
-
readonly category: "background";
|
|
2377
|
-
readonly description: "Commercial-safe background removal for images.";
|
|
2378
|
-
readonly endpoint: "fal-ai/bria/background/remove";
|
|
2379
|
-
readonly inputField: "image_url";
|
|
2380
|
-
readonly inputKind: "image";
|
|
2381
|
-
readonly name: "Bria RMBG 2.0";
|
|
2382
|
-
readonly outputKeys: ["image"];
|
|
2383
|
-
readonly price: {
|
|
2384
|
-
readonly kind: "call";
|
|
2385
|
-
readonly usd: 0.018;
|
|
2386
|
-
};
|
|
2387
|
-
readonly pricing: "$0.018/generation";
|
|
2388
|
-
readonly sourceUrl: "https://fal.ai/models/fal-ai/bria/background/remove";
|
|
2389
|
-
readonly task: "image background removal";
|
|
2390
|
-
};
|
|
2391
|
-
readonly "bria-video-rmbg": {
|
|
2392
|
-
readonly category: "background";
|
|
2393
|
-
readonly defaultOptions: {
|
|
2394
|
-
readonly background_color: "Black";
|
|
2395
|
-
readonly output_container_and_codec: "webm_vp9";
|
|
2396
|
-
readonly preserve_audio: true;
|
|
2397
|
-
};
|
|
2398
|
-
readonly description: "Remove video backgrounds with configurable output container.";
|
|
2399
|
-
readonly endpoint: "bria/video/background-removal";
|
|
2400
|
-
readonly inputField: "video_url";
|
|
2401
|
-
readonly inputKind: "video";
|
|
2402
|
-
readonly name: "Bria Video Background Removal";
|
|
2403
|
-
readonly outputKeys: ["video"];
|
|
2404
|
-
readonly price: {
|
|
2405
|
-
readonly kind: "second";
|
|
2406
|
-
readonly usd: 0.00425;
|
|
2407
|
-
};
|
|
2408
|
-
readonly pricing: "$0.00425/sec";
|
|
2409
|
-
readonly queued: true;
|
|
2410
|
-
readonly sourceUrl: "https://fal.ai/models/bria/video/background-removal";
|
|
2411
|
-
readonly task: "video background removal";
|
|
2412
|
-
};
|
|
2413
|
-
readonly ddcolor: {
|
|
2414
|
-
readonly category: "restoration";
|
|
2415
|
-
readonly description: "Colourise black-and-white photographs.";
|
|
2416
|
-
readonly endpoint: "fal-ai/ddcolor";
|
|
2417
|
-
readonly inputField: "image_url";
|
|
2418
|
-
readonly inputKind: "image";
|
|
2419
|
-
readonly name: "DDColor Colourisation";
|
|
2420
|
-
readonly outputKeys: ["image"];
|
|
2421
|
-
readonly price: {
|
|
2422
|
-
readonly kind: "megapixel";
|
|
2423
|
-
readonly usd: 0.001;
|
|
2424
|
-
};
|
|
2425
|
-
readonly pricing: "$0.001/megapixel";
|
|
2426
|
-
readonly sourceUrl: "https://fal.ai/models/fal-ai/ddcolor";
|
|
2427
|
-
readonly task: "photo colourisation";
|
|
2428
|
-
};
|
|
2429
|
-
readonly rembg: {
|
|
2430
|
-
readonly category: "background";
|
|
2431
|
-
readonly defaultOptions: {
|
|
2432
|
-
readonly crop_to_bbox: false;
|
|
2433
|
-
};
|
|
2434
|
-
readonly description: "Generic image background removal utility.";
|
|
2435
|
-
readonly endpoint: "fal-ai/imageutils/rembg";
|
|
2436
|
-
readonly inputField: "image_url";
|
|
2437
|
-
readonly inputKind: "image";
|
|
2438
|
-
readonly name: "Remove Background";
|
|
2439
|
-
readonly outputKeys: ["image"];
|
|
2440
|
-
readonly price: {
|
|
2441
|
-
readonly kind: "metered";
|
|
2442
|
-
};
|
|
2443
|
-
readonly pricing: "$0/compute-second listed by fal";
|
|
2444
|
-
readonly sourceUrl: "https://fal.ai/models/fal-ai/imageutils/rembg";
|
|
2445
|
-
readonly task: "image background removal";
|
|
2446
|
-
};
|
|
2447
|
-
readonly "seedvr-upscale": {
|
|
2448
|
-
readonly category: "restoration";
|
|
2449
|
-
readonly defaultOptions: {
|
|
2450
|
-
readonly output_format: "png";
|
|
2451
|
-
};
|
|
2452
|
-
readonly description: "Diffusion image restoration and upscaling with SeedVR.";
|
|
2453
|
-
readonly endpoint: "fal-ai/seedvr/upscale/image";
|
|
2454
|
-
readonly inputField: "image_url";
|
|
2455
|
-
readonly inputKind: "image";
|
|
2456
|
-
readonly name: "SeedVR Image Upscale";
|
|
2457
|
-
readonly outputKeys: ["image"];
|
|
2458
|
-
readonly price: {
|
|
2459
|
-
readonly kind: "megapixel";
|
|
2460
|
-
readonly usd: 0.001;
|
|
2461
|
-
};
|
|
2462
|
-
readonly pricing: "$0.001/megapixel";
|
|
2463
|
-
readonly queued: true;
|
|
2464
|
-
readonly sourceUrl: "https://fal.ai/models/fal-ai/seedvr/upscale/image";
|
|
2465
|
-
readonly task: "image restoration and upscaling";
|
|
2466
|
-
};
|
|
2467
|
-
readonly "topaz-adjust": {
|
|
2468
|
-
readonly category: "restoration";
|
|
2469
|
-
readonly defaultOptions: {
|
|
2470
|
-
readonly output_format: "png";
|
|
2471
|
-
};
|
|
2472
|
-
readonly description: "Topaz exposure, white balance, and colour adjustment.";
|
|
2473
|
-
readonly endpoint: "topaz/adjust/image";
|
|
2474
|
-
readonly inputField: "image_url";
|
|
2475
|
-
readonly inputKind: "image";
|
|
2476
|
-
readonly name: "Topaz Adjust";
|
|
2477
|
-
readonly outputKeys: ["image"];
|
|
2478
|
-
readonly price: {
|
|
2479
|
-
readonly kind: "megapixel";
|
|
2480
|
-
readonly usd: number;
|
|
2481
|
-
};
|
|
2482
|
-
readonly pricing: "$0.08 per 24 output megapixels";
|
|
2483
|
-
readonly queued: true;
|
|
2484
|
-
readonly sourceUrl: "https://fal.ai/models/topaz/adjust/image";
|
|
2485
|
-
readonly task: "tonal adjustment";
|
|
2486
|
-
};
|
|
2487
|
-
readonly "topaz-creative": {
|
|
2488
|
-
readonly category: "restoration";
|
|
2489
|
-
readonly defaultOptions: {
|
|
2490
|
-
readonly output_format: "png";
|
|
2491
|
-
};
|
|
2492
|
-
readonly description: "Topaz Bloom upscaling, which reimagines detail rather than preserving it.";
|
|
2493
|
-
readonly endpoint: "topaz/upscale/image/creative";
|
|
2494
|
-
readonly inputField: "image_url";
|
|
2495
|
-
readonly inputKind: "image";
|
|
2496
|
-
readonly name: "Topaz Creative Upscale";
|
|
2497
|
-
readonly outputKeys: ["image"];
|
|
2498
|
-
readonly price: {
|
|
2499
|
-
readonly kind: "megapixel";
|
|
2500
|
-
readonly usd: number;
|
|
2501
|
-
};
|
|
2502
|
-
readonly pricing: "$0.96 per 24 output megapixels";
|
|
2503
|
-
readonly queued: true;
|
|
2504
|
-
readonly sourceUrl: "https://fal.ai/models/topaz/upscale/image/creative";
|
|
2505
|
-
readonly task: "creative image upscaling";
|
|
2506
|
-
};
|
|
2507
|
-
readonly "topaz-denoise": {
|
|
2508
|
-
readonly category: "restoration";
|
|
2509
|
-
readonly defaultOptions: {
|
|
2510
|
-
readonly output_format: "png";
|
|
2511
|
-
};
|
|
2512
|
-
readonly description: "Topaz noise reduction at source resolution.";
|
|
2513
|
-
readonly endpoint: "topaz/denoise/image";
|
|
2514
|
-
readonly inputField: "image_url";
|
|
2515
|
-
readonly inputKind: "image";
|
|
2516
|
-
readonly name: "Topaz Denoise";
|
|
2517
|
-
readonly outputKeys: ["image"];
|
|
2518
|
-
readonly price: {
|
|
2519
|
-
readonly kind: "megapixel";
|
|
2520
|
-
readonly usd: number;
|
|
2521
|
-
};
|
|
2522
|
-
readonly pricing: "$0.08 per 24 output megapixels at the default Normal model; $0.16 with Denoise Max";
|
|
2523
|
-
readonly queued: true;
|
|
2524
|
-
readonly sourceUrl: "https://fal.ai/models/topaz/denoise/image";
|
|
2525
|
-
readonly task: "image denoising";
|
|
2526
|
-
};
|
|
2527
|
-
readonly "topaz-generative": {
|
|
2528
|
-
readonly category: "restoration";
|
|
2529
|
-
readonly defaultOptions: {
|
|
2530
|
-
readonly output_format: "png";
|
|
2531
|
-
};
|
|
2532
|
-
readonly description: "Topaz Wonder upscaling, which synthesises plausible detail as it enlarges.";
|
|
2533
|
-
readonly endpoint: "topaz/upscale/image/generative";
|
|
2534
|
-
readonly inputField: "image_url";
|
|
2535
|
-
readonly inputKind: "image";
|
|
2536
|
-
readonly name: "Topaz Generative Upscale";
|
|
2537
|
-
readonly outputKeys: ["image"];
|
|
2538
|
-
readonly price: {
|
|
2539
|
-
readonly kind: "megapixel";
|
|
2540
|
-
readonly usd: number;
|
|
2541
|
-
};
|
|
2542
|
-
readonly pricing: "$0.24 per 24 output megapixels at the default Wonder 3; $0.48 with Wonder, Wonder 2, Standard MAX, Redefine or Recover 3";
|
|
2543
|
-
readonly queued: true;
|
|
2544
|
-
readonly sourceUrl: "https://fal.ai/models/topaz/upscale/image/generative";
|
|
2545
|
-
readonly task: "generative image upscaling";
|
|
2546
|
-
};
|
|
2547
|
-
readonly "topaz-image": {
|
|
2548
|
-
readonly category: "upscale";
|
|
2549
|
-
readonly defaultOptions: {
|
|
2550
|
-
readonly model: "Standard V2";
|
|
2551
|
-
readonly output_format: "jpeg";
|
|
2552
|
-
readonly upscale_factor: 2;
|
|
2553
|
-
};
|
|
2554
|
-
readonly description: "Professional Topaz image enhancement and upscaling.";
|
|
2555
|
-
readonly endpoint: "fal-ai/topaz/upscale/image";
|
|
2556
|
-
readonly inputField: "image_url";
|
|
2557
|
-
readonly inputKind: "image";
|
|
2558
|
-
readonly name: "Topaz Image Upscale";
|
|
2559
|
-
readonly outputKeys: ["image"];
|
|
2560
|
-
readonly price: {
|
|
2561
|
-
readonly kind: "megapixel";
|
|
2562
|
-
readonly usd: number;
|
|
2563
|
-
};
|
|
2564
|
-
readonly pricing: "$0.08 for output up to 24MP; $0.16 to 48MP, $0.32 to 96MP, up to $1.36 at 512MP";
|
|
2565
|
-
readonly queued: true;
|
|
2566
|
-
readonly sourceUrl: "https://fal.ai/models/fal-ai/topaz/upscale/image";
|
|
2567
|
-
readonly task: "image enhancement";
|
|
2568
|
-
};
|
|
2569
|
-
readonly "topaz-precision": {
|
|
2570
|
-
readonly category: "restoration";
|
|
2571
|
-
readonly defaultOptions: {
|
|
2572
|
-
readonly output_format: "png";
|
|
2573
|
-
};
|
|
2574
|
-
readonly description: "Topaz upscaling that preserves the original detail rather than inventing it.";
|
|
2575
|
-
readonly endpoint: "topaz/upscale/image/precision";
|
|
2576
|
-
readonly inputField: "image_url";
|
|
2577
|
-
readonly inputKind: "image";
|
|
2578
|
-
readonly name: "Topaz Precision Upscale";
|
|
2579
|
-
readonly outputKeys: ["image"];
|
|
2580
|
-
readonly price: {
|
|
2581
|
-
readonly kind: "megapixel";
|
|
2582
|
-
readonly usd: number;
|
|
2583
|
-
};
|
|
2584
|
-
readonly pricing: "$0.08 per 24 output megapixels, any precision model";
|
|
2585
|
-
readonly queued: true;
|
|
2586
|
-
readonly sourceUrl: "https://fal.ai/models/topaz/upscale/image/precision";
|
|
2587
|
-
readonly task: "faithful image upscaling";
|
|
2588
|
-
};
|
|
2589
|
-
readonly "topaz-restore": {
|
|
2590
|
-
readonly category: "restoration";
|
|
2591
|
-
readonly defaultOptions: {
|
|
2592
|
-
readonly output_format: "png";
|
|
2593
|
-
};
|
|
2594
|
-
readonly description: "Topaz restoration of damaged or degraded photographs at source resolution.";
|
|
2595
|
-
readonly endpoint: "topaz/restore/image";
|
|
2596
|
-
readonly inputField: "image_url";
|
|
2597
|
-
readonly inputKind: "image";
|
|
2598
|
-
readonly name: "Topaz Restore";
|
|
2599
|
-
readonly outputKeys: ["image"];
|
|
2600
|
-
readonly price: {
|
|
2601
|
-
readonly kind: "megapixel";
|
|
2602
|
-
readonly usd: number;
|
|
2603
|
-
};
|
|
2604
|
-
readonly pricing: "$0.48 per 24 output megapixels at the default Recover 3; $0.08 with Dust-Scratch V2";
|
|
2605
|
-
readonly queued: true;
|
|
2606
|
-
readonly sourceUrl: "https://fal.ai/models/topaz/restore/image";
|
|
2607
|
-
readonly task: "photo restoration";
|
|
2608
|
-
};
|
|
2609
|
-
readonly "topaz-sharpen": {
|
|
2610
|
-
readonly category: "restoration";
|
|
2611
|
-
readonly defaultOptions: {
|
|
2612
|
-
readonly output_format: "png";
|
|
2613
|
-
};
|
|
2614
|
-
readonly description: "Topaz deblurring and sharpening at source resolution.";
|
|
2615
|
-
readonly endpoint: "topaz/sharpen/image";
|
|
2616
|
-
readonly inputField: "image_url";
|
|
2617
|
-
readonly inputKind: "image";
|
|
2618
|
-
readonly name: "Topaz Sharpen";
|
|
2619
|
-
readonly outputKeys: ["image"];
|
|
2620
|
-
readonly price: {
|
|
2621
|
-
readonly kind: "megapixel";
|
|
2622
|
-
readonly usd: number;
|
|
2623
|
-
};
|
|
2624
|
-
readonly pricing: "$0.08 per 24 output megapixels at the default Standard model; $0.16 with Super Focus";
|
|
2625
|
-
readonly queued: true;
|
|
2626
|
-
readonly sourceUrl: "https://fal.ai/models/topaz/sharpen/image";
|
|
2627
|
-
readonly task: "image sharpening";
|
|
2628
|
-
};
|
|
2629
|
-
readonly "topaz-transparent": {
|
|
2630
|
-
readonly category: "restoration";
|
|
2631
|
-
readonly description: "Topaz upscaling that preserves the alpha channel end to end.";
|
|
2632
|
-
readonly endpoint: "topaz/upscale/image/transparent";
|
|
2633
|
-
readonly inputField: "image_url";
|
|
2634
|
-
readonly inputKind: "image";
|
|
2635
|
-
readonly name: "Topaz Transparent Upscale";
|
|
2636
|
-
readonly outputKeys: ["image"];
|
|
2637
|
-
readonly price: {
|
|
2638
|
-
readonly kind: "megapixel";
|
|
2639
|
-
readonly usd: number;
|
|
2640
|
-
};
|
|
2641
|
-
readonly pricing: "$0.08 per 24 output megapixels";
|
|
2642
|
-
readonly queued: true;
|
|
2643
|
-
readonly sourceUrl: "https://fal.ai/models/topaz/upscale/image/transparent";
|
|
2644
|
-
readonly task: "transparent image upscaling";
|
|
2645
|
-
};
|
|
2646
|
-
readonly "topaz-video": {
|
|
2647
|
-
readonly category: "upscale";
|
|
2648
|
-
readonly defaultOptions: {
|
|
2649
|
-
readonly model: "Proteus";
|
|
2650
|
-
readonly upscale_factor: 2;
|
|
2651
|
-
};
|
|
2652
|
-
readonly description: "Professional Topaz video enhancement and upscaling.";
|
|
2653
|
-
readonly endpoint: "fal-ai/topaz/upscale/video";
|
|
2654
|
-
readonly inputField: "video_url";
|
|
2655
|
-
readonly inputKind: "video";
|
|
2656
|
-
readonly name: "Topaz Video Upscale";
|
|
2657
|
-
readonly outputKeys: ["video"];
|
|
2658
|
-
readonly price: {
|
|
2659
|
-
readonly kind: "second";
|
|
2660
|
-
readonly usd: 0.01;
|
|
2661
|
-
};
|
|
2662
|
-
readonly pricing: "$0.01/sec up to 720p; $0.02 to 1080p, $0.08 above, doubled at 60fps, halved with Gaia 2";
|
|
2663
|
-
readonly queued: true;
|
|
2664
|
-
readonly sourceUrl: "https://fal.ai/models/fal-ai/topaz/upscale/video";
|
|
2665
|
-
readonly task: "video enhancement";
|
|
2666
|
-
};
|
|
2667
|
-
readonly "bria-eraser": {
|
|
2668
|
-
readonly category: "erase";
|
|
2669
|
-
readonly description: "Commercial-safe removal of a masked region, inpainted from surrounding context.";
|
|
2670
|
-
readonly endpoint: "fal-ai/bria/eraser";
|
|
2671
|
-
readonly inputField: "image_url";
|
|
2672
|
-
readonly inputKind: "image";
|
|
2673
|
-
readonly name: "Bria Eraser";
|
|
2674
|
-
readonly outputKeys: ["image"];
|
|
2675
|
-
readonly price: {
|
|
2676
|
-
readonly kind: "call";
|
|
2677
|
-
readonly usd: 0.04;
|
|
2678
|
-
};
|
|
2679
|
-
readonly pricing: "$0.04/generation";
|
|
2680
|
-
readonly sourceUrl: "https://fal.ai/models/fal-ai/bria/eraser";
|
|
2681
|
-
readonly task: "masked object erasure";
|
|
2682
|
-
};
|
|
2683
|
-
readonly "bria-expand": {
|
|
2684
|
-
readonly category: "reframe";
|
|
2685
|
-
readonly description: "Expand an image onto a larger canvas, generating the new border area.";
|
|
2686
|
-
readonly endpoint: "fal-ai/bria/expand";
|
|
2687
|
-
readonly inputField: "image_url";
|
|
2688
|
-
readonly inputKind: "image";
|
|
2689
|
-
readonly name: "Bria Image Expansion";
|
|
2690
|
-
readonly outputKeys: ["image"];
|
|
2691
|
-
readonly price: {
|
|
2692
|
-
readonly kind: "call";
|
|
2693
|
-
readonly usd: 0.04;
|
|
2694
|
-
};
|
|
2695
|
-
readonly pricing: "$0.04/generation";
|
|
2696
|
-
readonly sourceUrl: "https://fal.ai/models/fal-ai/bria/expand";
|
|
2697
|
-
readonly task: "image outpainting";
|
|
2698
|
-
};
|
|
2699
|
-
readonly "bria-genfill": {
|
|
2700
|
-
readonly category: "erase";
|
|
2701
|
-
readonly description: "Generative fill of a masked region from a prompt, commercial-safe.";
|
|
2702
|
-
readonly endpoint: "fal-ai/bria/genfill";
|
|
2703
|
-
readonly inputField: "image_url";
|
|
2704
|
-
readonly inputKind: "image";
|
|
2705
|
-
readonly name: "Bria GenFill";
|
|
2706
|
-
readonly outputKeys: ["images"];
|
|
2707
|
-
readonly price: {
|
|
2708
|
-
readonly kind: "call";
|
|
2709
|
-
readonly usd: 0.04;
|
|
2710
|
-
};
|
|
2711
|
-
readonly pricing: "$0.04/generation";
|
|
2712
|
-
readonly sourceUrl: "https://fal.ai/models/fal-ai/bria/genfill";
|
|
2713
|
-
readonly task: "masked generative fill";
|
|
2714
|
-
};
|
|
2715
|
-
readonly "finegrain-eraser": {
|
|
2716
|
-
readonly category: "erase";
|
|
2717
|
-
readonly description: "Remove a prompted object and its shadows and reflections, filling the gap.";
|
|
2718
|
-
readonly endpoint: "fal-ai/finegrain-eraser";
|
|
2719
|
-
readonly inputField: "image_url";
|
|
2720
|
-
readonly inputKind: "image";
|
|
2721
|
-
readonly name: "Finegrain Object Eraser";
|
|
2722
|
-
readonly outputKeys: ["image"];
|
|
2723
|
-
readonly price: {
|
|
2724
|
-
readonly kind: "call";
|
|
2725
|
-
readonly usd: 0.27;
|
|
2726
|
-
};
|
|
2727
|
-
readonly pricing: "$0.27/image at the default standard mode; $0.18 express, $0.36 premium";
|
|
2728
|
-
readonly sourceUrl: "https://fal.ai/models/fal-ai/finegrain-eraser";
|
|
2729
|
-
readonly task: "prompted object erasure";
|
|
2730
|
-
};
|
|
2731
|
-
readonly "flux-outpaint": {
|
|
2732
|
-
readonly category: "reframe";
|
|
2733
|
-
readonly description: "Outpaint an image by a per-edge pixel expansion with FLUX.2 pro.";
|
|
2734
|
-
readonly endpoint: "fal-ai/flux-2-pro/outpaint";
|
|
2735
|
-
readonly inputField: "image_url";
|
|
2736
|
-
readonly inputKind: "image";
|
|
2737
|
-
readonly name: "FLUX.2 Pro Outpaint";
|
|
2738
|
-
readonly outputKeys: ["images"];
|
|
2739
|
-
readonly price: {
|
|
2740
|
-
readonly kind: "metered";
|
|
2741
|
-
};
|
|
2742
|
-
readonly pricing: "$0.03 for the first output megapixel, then $0.015 per extra megapixel of input and output, rounded up";
|
|
2743
|
-
readonly sourceUrl: "https://fal.ai/models/fal-ai/flux-2-pro/outpaint";
|
|
2744
|
-
readonly task: "image outpainting";
|
|
2745
|
-
};
|
|
2746
|
-
readonly "iclight-v2": {
|
|
2747
|
-
readonly category: "relight";
|
|
2748
|
-
readonly description: "Relight a subject from a prompt, harmonising it with a new light direction.";
|
|
2749
|
-
readonly endpoint: "fal-ai/iclight-v2";
|
|
2750
|
-
readonly inputField: "image_url";
|
|
2751
|
-
readonly inputKind: "image";
|
|
2752
|
-
readonly name: "IC-Light v2";
|
|
2753
|
-
readonly outputKeys: ["images"];
|
|
2754
|
-
readonly price: {
|
|
2755
|
-
readonly kind: "megapixel";
|
|
2756
|
-
readonly usd: 0.1;
|
|
2757
|
-
};
|
|
2758
|
-
readonly pricing: "$0.10/megapixel";
|
|
2759
|
-
readonly sourceUrl: "https://fal.ai/models/fal-ai/iclight-v2";
|
|
2760
|
-
readonly task: "prompted relighting";
|
|
2761
|
-
};
|
|
2762
|
-
readonly "ideogram-reframe": {
|
|
2763
|
-
readonly category: "reframe";
|
|
2764
|
-
readonly description: "Reframe an image to a new aspect ratio, generating the fill.";
|
|
2765
|
-
readonly endpoint: "fal-ai/ideogram/v3/reframe";
|
|
2766
|
-
readonly inputField: "image_url";
|
|
2767
|
-
readonly inputKind: "image";
|
|
2768
|
-
readonly name: "Ideogram v3 Reframe";
|
|
2769
|
-
readonly outputKeys: ["images"];
|
|
2770
|
-
readonly price: {
|
|
2771
|
-
readonly kind: "call";
|
|
2772
|
-
readonly usd: 0.06;
|
|
2773
|
-
};
|
|
2774
|
-
readonly pricing: "$0.06/image at the default BALANCED speed; $0.03 turbo, $0.09 quality";
|
|
2775
|
-
readonly sourceUrl: "https://fal.ai/models/fal-ai/ideogram/v3/reframe";
|
|
2776
|
-
readonly task: "aspect ratio reframing";
|
|
2777
|
-
};
|
|
2778
|
-
readonly "lighting-restoration": {
|
|
2779
|
-
readonly category: "relight";
|
|
2780
|
-
readonly description: "Restore natural, even lighting across one or more input images.";
|
|
2781
|
-
readonly endpoint: "fal-ai/qwen-image-edit-plus-lora-gallery/lighting-restoration";
|
|
2782
|
-
readonly inputField: "image_urls";
|
|
2783
|
-
readonly inputKind: "images";
|
|
2784
|
-
readonly name: "Qwen Lighting Restoration";
|
|
2785
|
-
readonly outputKeys: ["images"];
|
|
2786
|
-
readonly price: {
|
|
2787
|
-
readonly kind: "megapixel";
|
|
2788
|
-
readonly usd: 0.035;
|
|
2789
|
-
};
|
|
2790
|
-
readonly pricing: "$0.035/megapixel";
|
|
2791
|
-
readonly sourceUrl: "https://fal.ai/models/fal-ai/qwen-image-edit-plus-lora-gallery/lighting-restoration";
|
|
2792
|
-
readonly task: "lighting restoration";
|
|
2793
|
-
};
|
|
2794
|
-
readonly "object-removal": {
|
|
2795
|
-
readonly category: "erase";
|
|
2796
|
-
readonly description: "Remove a prompted object from an image and fill the gap.";
|
|
2797
|
-
readonly endpoint: "fal-ai/object-removal";
|
|
2798
|
-
readonly inputField: "image_url";
|
|
2799
|
-
readonly inputKind: "image";
|
|
2800
|
-
readonly name: "Object Removal";
|
|
2801
|
-
readonly outputKeys: ["images"];
|
|
2802
|
-
readonly price: {
|
|
2803
|
-
readonly kind: "call";
|
|
2804
|
-
readonly usd: 0.024;
|
|
2805
|
-
};
|
|
2806
|
-
readonly pricing: "$0.024/image at the default best quality; $0.006 low, $0.012 medium, $0.018 high";
|
|
2807
|
-
readonly sourceUrl: "https://fal.ai/models/fal-ai/object-removal";
|
|
2808
|
-
readonly task: "prompted object removal";
|
|
2809
|
-
};
|
|
2810
|
-
readonly "object-removal-bbox": {
|
|
2811
|
-
readonly category: "erase";
|
|
2812
|
-
readonly description: "Remove whatever falls inside supplied bounding boxes.";
|
|
2813
|
-
readonly endpoint: "fal-ai/object-removal/bbox";
|
|
2814
|
-
readonly inputField: "image_url";
|
|
2815
|
-
readonly inputKind: "image";
|
|
2816
|
-
readonly name: "Object Removal by Box";
|
|
2817
|
-
readonly outputKeys: ["images"];
|
|
2818
|
-
readonly price: {
|
|
2819
|
-
readonly kind: "call";
|
|
2820
|
-
readonly usd: 0.024;
|
|
2821
|
-
};
|
|
2822
|
-
readonly pricing: "$0.024/image at the default best quality; $0.006 low, $0.012 medium, $0.018 high";
|
|
2823
|
-
readonly sourceUrl: "https://fal.ai/models/fal-ai/object-removal/bbox";
|
|
2824
|
-
readonly task: "bounding box object removal";
|
|
2825
|
-
};
|
|
2826
|
-
readonly "object-removal-mask": {
|
|
2827
|
-
readonly category: "erase";
|
|
2828
|
-
readonly description: "Remove the masked region of an image and fill the gap.";
|
|
2829
|
-
readonly endpoint: "fal-ai/object-removal/mask";
|
|
2830
|
-
readonly inputField: "image_url";
|
|
2831
|
-
readonly inputKind: "image";
|
|
2832
|
-
readonly name: "Object Removal by Mask";
|
|
2833
|
-
readonly outputKeys: ["images"];
|
|
2834
|
-
readonly price: {
|
|
2835
|
-
readonly kind: "call";
|
|
2836
|
-
readonly usd: 0.024;
|
|
2837
|
-
};
|
|
2838
|
-
readonly pricing: "$0.024/image at the default best quality; $0.006 low, $0.012 medium, $0.018 high";
|
|
2839
|
-
readonly sourceUrl: "https://fal.ai/models/fal-ai/object-removal/mask";
|
|
2840
|
-
readonly task: "masked object removal";
|
|
2841
|
-
};
|
|
2842
|
-
readonly "remove-lighting": {
|
|
2843
|
-
readonly category: "relight";
|
|
2844
|
-
readonly description: "Strip baked-in lighting and shadows to leave a flat, neutral surface.";
|
|
2845
|
-
readonly endpoint: "fal-ai/qwen-image-edit-plus-lora-gallery/remove-lighting";
|
|
2846
|
-
readonly inputField: "image_urls";
|
|
2847
|
-
readonly inputKind: "images";
|
|
2848
|
-
readonly name: "Qwen Remove Lighting";
|
|
2849
|
-
readonly outputKeys: ["images"];
|
|
2850
|
-
readonly price: {
|
|
2851
|
-
readonly kind: "megapixel";
|
|
2852
|
-
readonly usd: 0.035;
|
|
2853
|
-
};
|
|
2854
|
-
readonly pricing: "$0.035/megapixel";
|
|
2855
|
-
readonly sourceUrl: "https://fal.ai/models/fal-ai/qwen-image-edit-plus-lora-gallery/remove-lighting";
|
|
2856
|
-
readonly task: "lighting removal";
|
|
2857
|
-
};
|
|
2858
|
-
readonly "smart-resize": {
|
|
2859
|
-
readonly category: "reframe";
|
|
2860
|
-
readonly description: "Resize one image to several target sizes, recomposing rather than cropping.";
|
|
2861
|
-
readonly endpoint: "fal-ai/smart-resize";
|
|
2862
|
-
readonly inputField: "image_url";
|
|
2863
|
-
readonly inputKind: "image";
|
|
2864
|
-
readonly name: "Smart Resize";
|
|
2865
|
-
readonly outputKeys: ["images", "results"];
|
|
2866
|
-
readonly price: {
|
|
2867
|
-
readonly kind: "metered";
|
|
2868
|
-
};
|
|
2869
|
-
readonly pricing: "$0.15 per output image, doubled at 4K, plus a $0.05 vision analysis fee per request";
|
|
2870
|
-
readonly queued: true;
|
|
2871
|
-
readonly sourceUrl: "https://fal.ai/models/fal-ai/smart-resize";
|
|
2872
|
-
readonly task: "multi-size recomposition";
|
|
2873
|
-
};
|
|
2874
|
-
readonly "text-removal": {
|
|
2875
|
-
readonly category: "erase";
|
|
2876
|
-
readonly defaultOptions: {
|
|
2877
|
-
readonly output_format: "png";
|
|
2878
|
-
};
|
|
2879
|
-
readonly description: "Remove all rendered text from an image, rebuilding what sat behind it.";
|
|
2880
|
-
readonly endpoint: "fal-ai/image-editing/text-removal";
|
|
2881
|
-
readonly inputField: "image_url";
|
|
2882
|
-
readonly inputKind: "image";
|
|
2883
|
-
readonly name: "Text Removal";
|
|
2884
|
-
readonly outputKeys: ["images"];
|
|
2885
|
-
readonly price: {
|
|
2886
|
-
readonly kind: "call";
|
|
2887
|
-
readonly usd: 0.04;
|
|
2888
|
-
};
|
|
2889
|
-
readonly pricing: "$0.04/image";
|
|
2890
|
-
readonly sourceUrl: "https://fal.ai/models/fal-ai/image-editing/text-removal";
|
|
2891
|
-
readonly task: "text removal";
|
|
2892
|
-
};
|
|
2893
|
-
readonly "depth-anything": {
|
|
2894
|
-
readonly category: "preprocess";
|
|
2895
|
-
readonly description: "Generate Depth Anything v2 depth maps from input images.";
|
|
2896
|
-
readonly endpoint: "fal-ai/image-preprocessors/depth-anything/v2";
|
|
2897
|
-
readonly inputField: "image_url";
|
|
2898
|
-
readonly inputKind: "image";
|
|
2899
|
-
readonly name: "Depth Anything v2 Preprocessor";
|
|
2900
|
-
readonly outputKeys: ["image"];
|
|
2901
|
-
readonly price: {
|
|
2902
|
-
readonly kind: "metered";
|
|
2903
|
-
};
|
|
2904
|
-
readonly pricing: "$0/compute-second listed by fal";
|
|
2905
|
-
readonly sourceUrl: "https://fal.ai/models/fal-ai/image-preprocessors/depth-anything/v2";
|
|
2906
|
-
readonly task: "depth preprocessing";
|
|
2907
|
-
};
|
|
2908
|
-
readonly dwpose: {
|
|
2909
|
-
readonly category: "preprocess";
|
|
2910
|
-
readonly description: "Extract body, hand, and face pose skeletons from an image.";
|
|
2911
|
-
readonly endpoint: "fal-ai/dwpose";
|
|
2912
|
-
readonly inputField: "image_url";
|
|
2913
|
-
readonly inputKind: "image";
|
|
2914
|
-
readonly name: "DWPose Estimation";
|
|
2915
|
-
readonly outputKeys: ["image"];
|
|
2916
|
-
readonly price: {
|
|
2917
|
-
readonly kind: "second";
|
|
2918
|
-
readonly usd: 0.0006;
|
|
2919
|
-
};
|
|
2920
|
-
readonly pricing: "$0.0006/compute-second";
|
|
2921
|
-
readonly sourceUrl: "https://fal.ai/models/fal-ai/dwpose";
|
|
2922
|
-
readonly task: "pose preprocessing";
|
|
2923
|
-
};
|
|
2924
|
-
readonly hed: {
|
|
2925
|
-
readonly category: "preprocess";
|
|
2926
|
-
readonly description: "Generate HED soft edge maps for ControlNet-style workflows.";
|
|
2927
|
-
readonly endpoint: "fal-ai/image-preprocessors/hed";
|
|
2928
|
-
readonly inputField: "image_url";
|
|
2929
|
-
readonly inputKind: "image";
|
|
2930
|
-
readonly name: "HED Edge Preprocessor";
|
|
2931
|
-
readonly outputKeys: ["image"];
|
|
2932
|
-
readonly price: {
|
|
2933
|
-
readonly kind: "metered";
|
|
2934
|
-
};
|
|
2935
|
-
readonly pricing: "$0/compute-second listed by fal";
|
|
2936
|
-
readonly sourceUrl: "https://fal.ai/models/fal-ai/image-preprocessors/hed";
|
|
2937
|
-
readonly task: "edge preprocessing";
|
|
2938
|
-
};
|
|
2939
|
-
readonly lineart: {
|
|
2940
|
-
readonly category: "preprocess";
|
|
2941
|
-
readonly defaultOptions: {
|
|
2942
|
-
readonly coarse: false;
|
|
2943
|
-
};
|
|
2944
|
-
readonly description: "Generate line art/control-style edges from an input image.";
|
|
2945
|
-
readonly endpoint: "fal-ai/image-preprocessors/lineart";
|
|
2946
|
-
readonly inputField: "image_url";
|
|
2947
|
-
readonly inputKind: "image";
|
|
2948
|
-
readonly name: "Line Art Preprocessor";
|
|
2949
|
-
readonly outputKeys: ["image"];
|
|
2950
|
-
readonly price: {
|
|
2951
|
-
readonly kind: "metered";
|
|
2952
|
-
};
|
|
2953
|
-
readonly pricing: "$0/compute-second listed by fal";
|
|
2954
|
-
readonly sourceUrl: "https://fal.ai/models/fal-ai/image-preprocessors/lineart";
|
|
2955
|
-
readonly task: "image preprocessing";
|
|
2956
|
-
};
|
|
2957
|
-
readonly "marigold-depth": {
|
|
2958
|
-
readonly category: "depth";
|
|
2959
|
-
readonly defaultOptions: {
|
|
2960
|
-
readonly ensemble_size: 10;
|
|
2961
|
-
readonly num_inference_steps: 10;
|
|
2962
|
-
};
|
|
2963
|
-
readonly description: "Create depth maps using Marigold depth estimation.";
|
|
2964
|
-
readonly endpoint: "fal-ai/imageutils/marigold-depth";
|
|
2965
|
-
readonly inputField: "image_url";
|
|
2966
|
-
readonly inputKind: "image";
|
|
2967
|
-
readonly name: "Marigold Depth Estimation";
|
|
2968
|
-
readonly outputKeys: ["image"];
|
|
2969
|
-
readonly price: {
|
|
2970
|
-
readonly kind: "metered";
|
|
2971
|
-
};
|
|
2972
|
-
readonly pricing: "$0/compute-second listed by fal";
|
|
2973
|
-
readonly sourceUrl: "https://fal.ai/models/fal-ai/imageutils/marigold-depth";
|
|
2974
|
-
readonly task: "depth map";
|
|
2975
|
-
};
|
|
2976
|
-
readonly "midas-depth": {
|
|
2977
|
-
readonly category: "depth";
|
|
2978
|
-
readonly defaultOptions: {
|
|
2979
|
-
readonly a: number;
|
|
2980
|
-
readonly bg_th: 0.1;
|
|
2981
|
-
};
|
|
2982
|
-
readonly description: "Create MiDaS depth maps from input images.";
|
|
2983
|
-
readonly endpoint: "fal-ai/imageutils/depth";
|
|
2984
|
-
readonly inputField: "image_url";
|
|
2985
|
-
readonly inputKind: "image";
|
|
2986
|
-
readonly name: "MiDaS Depth Estimation";
|
|
2987
|
-
readonly outputKeys: ["image"];
|
|
2988
|
-
readonly price: {
|
|
2989
|
-
readonly kind: "metered";
|
|
2990
|
-
};
|
|
2991
|
-
readonly pricing: "$0/compute-second listed by fal";
|
|
2992
|
-
readonly sourceUrl: "https://fal.ai/models/fal-ai/imageutils/depth";
|
|
2993
|
-
readonly task: "depth map";
|
|
2994
|
-
};
|
|
2995
|
-
readonly "midas-preprocessor": {
|
|
2996
|
-
readonly category: "preprocess";
|
|
2997
|
-
readonly description: "Generate MiDaS depth and normal maps for image workflows.";
|
|
2998
|
-
readonly endpoint: "fal-ai/image-preprocessors/midas";
|
|
2999
|
-
readonly inputField: "image_url";
|
|
3000
|
-
readonly inputKind: "image";
|
|
3001
|
-
readonly name: "MiDaS Preprocessor";
|
|
3002
|
-
readonly outputKeys: ["depth_map", "normal_map"];
|
|
3003
|
-
readonly price: {
|
|
3004
|
-
readonly kind: "metered";
|
|
3005
|
-
};
|
|
3006
|
-
readonly pricing: "$0/compute-second listed by fal";
|
|
3007
|
-
readonly sourceUrl: "https://fal.ai/models/fal-ai/image-preprocessors/midas";
|
|
3008
|
-
readonly task: "depth and normal preprocessing";
|
|
3009
|
-
};
|
|
3010
|
-
readonly mlsd: {
|
|
3011
|
-
readonly category: "preprocess";
|
|
3012
|
-
readonly description: "Detect straight line segments for architectural and interior control maps.";
|
|
3013
|
-
readonly endpoint: "fal-ai/image-preprocessors/mlsd";
|
|
3014
|
-
readonly inputField: "image_url";
|
|
3015
|
-
readonly inputKind: "image";
|
|
3016
|
-
readonly name: "M-LSD Line Preprocessor";
|
|
3017
|
-
readonly outputKeys: ["image"];
|
|
3018
|
-
readonly price: {
|
|
3019
|
-
readonly kind: "metered";
|
|
3020
|
-
};
|
|
3021
|
-
readonly pricing: "$0/compute-second listed by fal";
|
|
3022
|
-
readonly sourceUrl: "https://fal.ai/models/fal-ai/image-preprocessors/mlsd";
|
|
3023
|
-
readonly task: "line segment preprocessing";
|
|
3024
|
-
};
|
|
3025
|
-
readonly pidi: {
|
|
3026
|
-
readonly category: "preprocess";
|
|
3027
|
-
readonly description: "Generate PiDiNet soft edge maps from an input image.";
|
|
3028
|
-
readonly endpoint: "fal-ai/image-preprocessors/pidi";
|
|
3029
|
-
readonly inputField: "image_url";
|
|
3030
|
-
readonly inputKind: "image";
|
|
3031
|
-
readonly name: "PiDiNet Edge Preprocessor";
|
|
3032
|
-
readonly outputKeys: ["image"];
|
|
3033
|
-
readonly price: {
|
|
3034
|
-
readonly kind: "metered";
|
|
3035
|
-
};
|
|
3036
|
-
readonly pricing: "$0/compute-second listed by fal";
|
|
3037
|
-
readonly sourceUrl: "https://fal.ai/models/fal-ai/image-preprocessors/pidi";
|
|
3038
|
-
readonly task: "edge preprocessing";
|
|
3039
|
-
};
|
|
3040
|
-
readonly "sam-preprocessor": {
|
|
3041
|
-
readonly category: "preprocess";
|
|
3042
|
-
readonly description: "Generate a SAM segmentation map for ControlNet-style workflows.";
|
|
3043
|
-
readonly endpoint: "fal-ai/image-preprocessors/sam";
|
|
3044
|
-
readonly inputField: "image_url";
|
|
3045
|
-
readonly inputKind: "image";
|
|
3046
|
-
readonly name: "SAM Preprocessor";
|
|
3047
|
-
readonly outputKeys: ["image"];
|
|
3048
|
-
readonly price: {
|
|
3049
|
-
readonly kind: "metered";
|
|
3050
|
-
};
|
|
3051
|
-
readonly pricing: "$0/compute-second listed by fal";
|
|
3052
|
-
readonly sourceUrl: "https://fal.ai/models/fal-ai/image-preprocessors/sam";
|
|
3053
|
-
readonly task: "segmentation preprocessing";
|
|
3054
|
-
};
|
|
3055
|
-
readonly "sam2-auto": {
|
|
3056
|
-
readonly category: "segmentation";
|
|
3057
|
-
readonly defaultOptions: {
|
|
3058
|
-
readonly min_mask_region_area: 100;
|
|
3059
|
-
readonly output_format: "png";
|
|
3060
|
-
readonly points_per_side: 32;
|
|
3061
|
-
readonly pred_iou_thresh: 0.88;
|
|
3062
|
-
readonly stability_score_thresh: 0.95;
|
|
3063
|
-
};
|
|
3064
|
-
readonly description: "Automatically segment an image into combined and individual masks.";
|
|
3065
|
-
readonly endpoint: "fal-ai/sam2/auto-segment";
|
|
3066
|
-
readonly inputField: "image_url";
|
|
3067
|
-
readonly inputKind: "image";
|
|
3068
|
-
readonly name: "SAM 2 Auto Segment";
|
|
3069
|
-
readonly outputKeys: ["combined_mask", "individual_masks"];
|
|
3070
|
-
readonly price: {
|
|
3071
|
-
readonly kind: "metered";
|
|
3072
|
-
};
|
|
3073
|
-
readonly pricing: "$0/compute-second listed by fal";
|
|
3074
|
-
readonly queued: true;
|
|
3075
|
-
readonly sourceUrl: "https://fal.ai/models/fal-ai/sam2/auto-segment";
|
|
3076
|
-
readonly task: "automatic image segmentation";
|
|
3077
|
-
};
|
|
3078
|
-
readonly "sam3-1-image": {
|
|
3079
|
-
readonly category: "segmentation";
|
|
3080
|
-
readonly defaultOptions: {
|
|
3081
|
-
readonly apply_mask: true;
|
|
3082
|
-
readonly max_masks: 3;
|
|
3083
|
-
readonly output_format: "png";
|
|
3084
|
-
};
|
|
3085
|
-
readonly description: "Segment image objects with text, point, or box prompts. SAM 3.1 adds Object Multiplex for faster multi-object tracking.";
|
|
3086
|
-
readonly endpoint: "fal-ai/sam-3-1/image";
|
|
3087
|
-
readonly inputField: "image_url";
|
|
3088
|
-
readonly inputKind: "image";
|
|
3089
|
-
readonly name: "SAM 3.1 Image";
|
|
3090
|
-
readonly outputKeys: ["image", "masks", "metadata", "scores", "boxes"];
|
|
3091
|
-
readonly price: {
|
|
3092
|
-
readonly kind: "call";
|
|
3093
|
-
readonly usd: 0.01;
|
|
3094
|
-
};
|
|
3095
|
-
readonly pricing: "$0.01/request";
|
|
3096
|
-
readonly sourceUrl: "https://fal.ai/models/fal-ai/sam-3-1/image";
|
|
3097
|
-
readonly task: "promptable image segmentation";
|
|
3098
|
-
};
|
|
3099
|
-
readonly "sam3-1-video": {
|
|
3100
|
-
readonly category: "segmentation";
|
|
3101
|
-
readonly defaultOptions: {
|
|
3102
|
-
readonly apply_mask: true;
|
|
3103
|
-
readonly prompt: "person";
|
|
3104
|
-
};
|
|
3105
|
-
readonly description: "SAM 3.1 video segmentation with Object Multiplex tracking for multiple objects.";
|
|
3106
|
-
readonly endpoint: "fal-ai/sam-3-1/video";
|
|
3107
|
-
readonly inputField: "video_url";
|
|
3108
|
-
readonly inputKind: "video";
|
|
3109
|
-
readonly name: "SAM 3.1 Video";
|
|
3110
|
-
readonly outputKeys: ["video", "boundingbox_frames_zip"];
|
|
3111
|
-
readonly price: {
|
|
3112
|
-
readonly kind: "metered";
|
|
3113
|
-
};
|
|
3114
|
-
readonly pricing: "$0.01/16 frames of video input";
|
|
3115
|
-
readonly queued: true;
|
|
3116
|
-
readonly sourceUrl: "https://fal.ai/models/fal-ai/sam-3-1/video";
|
|
3117
|
-
readonly task: "multi-object video segmentation";
|
|
3118
|
-
};
|
|
3119
|
-
readonly "sam3-image": {
|
|
3120
|
-
readonly category: "segmentation";
|
|
3121
|
-
readonly defaultOptions: {
|
|
3122
|
-
readonly apply_mask: true;
|
|
3123
|
-
readonly max_masks: 3;
|
|
3124
|
-
readonly output_format: "png";
|
|
3125
|
-
};
|
|
3126
|
-
readonly description: "Segment image objects with text, point, or box prompts.";
|
|
3127
|
-
readonly endpoint: "fal-ai/sam-3/image";
|
|
3128
|
-
readonly inputField: "image_url";
|
|
3129
|
-
readonly inputKind: "image";
|
|
3130
|
-
readonly name: "SAM 3 Image";
|
|
3131
|
-
readonly outputKeys: ["image", "masks", "metadata", "scores", "boxes"];
|
|
3132
|
-
readonly price: {
|
|
3133
|
-
readonly kind: "call";
|
|
3134
|
-
readonly usd: 0.005;
|
|
3135
|
-
};
|
|
3136
|
-
readonly pricing: "$0.005/request";
|
|
3137
|
-
readonly sourceUrl: "https://fal.ai/models/fal-ai/sam-3/image";
|
|
3138
|
-
readonly task: "promptable image segmentation";
|
|
3139
|
-
};
|
|
3140
|
-
readonly "sam3-image-rle": {
|
|
3141
|
-
readonly category: "segmentation";
|
|
3142
|
-
readonly defaultOptions: {
|
|
3143
|
-
readonly apply_mask: true;
|
|
3144
|
-
readonly max_masks: 3;
|
|
3145
|
-
};
|
|
3146
|
-
readonly description: "Segment image objects and return run-length encoded masks.";
|
|
3147
|
-
readonly endpoint: "fal-ai/sam-3/image-rle";
|
|
3148
|
-
readonly inputField: "image_url";
|
|
3149
|
-
readonly inputKind: "image";
|
|
3150
|
-
readonly name: "SAM 3 Image RLE";
|
|
3151
|
-
readonly outputKeys: ["rle", "scores", "boxes", "metadata"];
|
|
3152
|
-
readonly price: {
|
|
3153
|
-
readonly kind: "call";
|
|
3154
|
-
readonly usd: 0.005;
|
|
3155
|
-
};
|
|
3156
|
-
readonly pricing: "$0.005/request";
|
|
3157
|
-
readonly sourceUrl: "https://fal.ai/models/fal-ai/sam-3/image-rle";
|
|
3158
|
-
readonly task: "promptable image segmentation to RLE";
|
|
3159
|
-
};
|
|
3160
|
-
readonly "sam3-video": {
|
|
3161
|
-
readonly category: "segmentation";
|
|
3162
|
-
readonly defaultOptions: {
|
|
3163
|
-
readonly apply_mask: true;
|
|
3164
|
-
readonly detection_threshold: 0.5;
|
|
3165
|
-
readonly prompt: "person";
|
|
3166
|
-
readonly video_output_type: "X264 (.mp4)";
|
|
3167
|
-
};
|
|
3168
|
-
readonly description: "Segment and track prompted objects across video frames.";
|
|
3169
|
-
readonly endpoint: "fal-ai/sam-3/video";
|
|
3170
|
-
readonly inputField: "video_url";
|
|
3171
|
-
readonly inputKind: "video";
|
|
3172
|
-
readonly name: "SAM 3 Video";
|
|
3173
|
-
readonly outputKeys: ["video", "boundingbox_frames_zip"];
|
|
3174
|
-
readonly price: {
|
|
3175
|
-
readonly kind: "metered";
|
|
3176
|
-
};
|
|
3177
|
-
readonly pricing: "$0.005/16 frames of video input";
|
|
3178
|
-
readonly queued: true;
|
|
3179
|
-
readonly sourceUrl: "https://fal.ai/models/fal-ai/sam-3/video";
|
|
3180
|
-
readonly task: "promptable video segmentation";
|
|
3181
|
-
};
|
|
3182
|
-
readonly "sam3-video-rle": {
|
|
3183
|
-
readonly category: "segmentation";
|
|
3184
|
-
readonly defaultOptions: {
|
|
3185
|
-
readonly apply_mask: true;
|
|
3186
|
-
readonly detection_threshold: 0.5;
|
|
3187
|
-
readonly prompt: "person";
|
|
3188
|
-
};
|
|
3189
|
-
readonly description: "Track prompted video objects and return RLE mask data.";
|
|
3190
|
-
readonly endpoint: "fal-ai/sam-3/video-rle";
|
|
3191
|
-
readonly inputField: "video_url";
|
|
3192
|
-
readonly inputKind: "video";
|
|
3193
|
-
readonly name: "SAM 3 Video RLE";
|
|
3194
|
-
readonly outputKeys: ["video", "boundingbox_frames_zip"];
|
|
3195
|
-
readonly price: {
|
|
3196
|
-
readonly kind: "metered";
|
|
3197
|
-
};
|
|
3198
|
-
readonly pricing: "$0.005/16 frames of video";
|
|
3199
|
-
readonly queued: true;
|
|
3200
|
-
readonly sourceUrl: "https://fal.ai/models/fal-ai/sam-3/video-rle";
|
|
3201
|
-
readonly task: "promptable video segmentation to RLE";
|
|
3202
|
-
};
|
|
3203
|
-
readonly scribble: {
|
|
3204
|
-
readonly category: "preprocess";
|
|
3205
|
-
readonly description: "Turn an image into a scribble-style control map.";
|
|
3206
|
-
readonly endpoint: "fal-ai/image-preprocessors/scribble";
|
|
3207
|
-
readonly inputField: "image_url";
|
|
3208
|
-
readonly inputKind: "image";
|
|
3209
|
-
readonly name: "Scribble Preprocessor";
|
|
3210
|
-
readonly outputKeys: ["image"];
|
|
3211
|
-
readonly price: {
|
|
3212
|
-
readonly kind: "metered";
|
|
3213
|
-
};
|
|
3214
|
-
readonly pricing: "$0/compute-second listed by fal";
|
|
3215
|
-
readonly sourceUrl: "https://fal.ai/models/fal-ai/image-preprocessors/scribble";
|
|
3216
|
-
readonly task: "scribble preprocessing";
|
|
3217
|
-
};
|
|
3218
|
-
readonly teed: {
|
|
3219
|
-
readonly category: "preprocess";
|
|
3220
|
-
readonly description: "Generate TEED edge maps from an input image.";
|
|
3221
|
-
readonly endpoint: "fal-ai/image-preprocessors/teed";
|
|
3222
|
-
readonly inputField: "image_url";
|
|
3223
|
-
readonly inputKind: "image";
|
|
3224
|
-
readonly name: "TEED Edge Preprocessor";
|
|
3225
|
-
readonly outputKeys: ["image"];
|
|
3226
|
-
readonly price: {
|
|
3227
|
-
readonly kind: "metered";
|
|
3228
|
-
};
|
|
3229
|
-
readonly pricing: "$0/compute-second listed by fal";
|
|
3230
|
-
readonly sourceUrl: "https://fal.ai/models/fal-ai/image-preprocessors/teed";
|
|
3231
|
-
readonly task: "edge preprocessing";
|
|
3232
|
-
};
|
|
3233
|
-
readonly "zoe-depth": {
|
|
3234
|
-
readonly category: "preprocess";
|
|
3235
|
-
readonly description: "Generate ZoeDepth metric depth maps from an input image.";
|
|
3236
|
-
readonly endpoint: "fal-ai/image-preprocessors/zoe";
|
|
3237
|
-
readonly inputField: "image_url";
|
|
3238
|
-
readonly inputKind: "image";
|
|
3239
|
-
readonly name: "ZoeDepth Preprocessor";
|
|
3240
|
-
readonly outputKeys: ["image"];
|
|
3241
|
-
readonly price: {
|
|
3242
|
-
readonly kind: "metered";
|
|
3243
|
-
};
|
|
3244
|
-
readonly pricing: "$0/compute-second listed by fal";
|
|
3245
|
-
readonly sourceUrl: "https://fal.ai/models/fal-ai/image-preprocessors/zoe";
|
|
3246
|
-
readonly task: "depth preprocessing";
|
|
3247
|
-
};
|
|
3248
|
-
};
|
|
3249
|
-
export declare const FAL_TOOLS_CHECKED_AT = "2026-08-23";
|
|
3250
|
-
export declare const FAL_TOOL_IDS: (keyof typeof FAL_TOOLS)[];
|
|
3251
|
-
type FalToolId = (typeof FAL_TOOL_IDS)[number];
|
|
3252
|
-
export declare function isFalToolId(tool: string): tool is FalToolId;
|
|
3253
|
-
export declare function buildFalToolRequest(options: FalToolRunOptions): FalToolRequest;
|
|
1038
|
+
//#region src/task-stream.d.ts
|
|
1039
|
+
interface TaskStreamOptions {
|
|
1040
|
+
signal?: AbortSignal;
|
|
1041
|
+
/** Overall deadline covering connection and consumption, in milliseconds. */
|
|
1042
|
+
timeout?: number;
|
|
1043
|
+
}
|
|
1044
|
+
interface EventMetadata {
|
|
1045
|
+
event?: string;
|
|
1046
|
+
id?: string;
|
|
1047
|
+
}
|
|
1048
|
+
type TaskStreamEvent = EventMetadata & ({
|
|
1049
|
+
type: "images";
|
|
1050
|
+
files: TaskFile[];
|
|
1051
|
+
raw: unknown;
|
|
1052
|
+
} | {
|
|
1053
|
+
type: "progress";
|
|
1054
|
+
progress?: number;
|
|
1055
|
+
message?: string;
|
|
1056
|
+
raw: unknown;
|
|
1057
|
+
} | {
|
|
1058
|
+
type: "provider";
|
|
1059
|
+
data: unknown;
|
|
1060
|
+
});
|
|
1061
|
+
interface TaskStream {
|
|
1062
|
+
plan: TaskPlan;
|
|
1063
|
+
requestId?: string;
|
|
1064
|
+
/** Single-use stream. EOF does not establish generation success. */
|
|
1065
|
+
events: AsyncIterable<Result$1<TaskStreamEvent, MotifError>>;
|
|
1066
|
+
/** Stops local consumption; does not guarantee provider cancellation or refund. */
|
|
1067
|
+
abort: () => void;
|
|
1068
|
+
}
|
|
3254
1069
|
//#endregion
|
|
3255
1070
|
//#region src/tool-cost.d.ts
|
|
3256
1071
|
/** Pixel dimensions of one file an endpoint returned. */
|
|
@@ -3258,6 +1073,14 @@ interface OutputDimensions {
|
|
|
3258
1073
|
height?: number;
|
|
3259
1074
|
width?: number;
|
|
3260
1075
|
}
|
|
1076
|
+
/** What a caller knows of a source video before a run, read from its header. */
|
|
1077
|
+
interface SourceVideo {
|
|
1078
|
+
fps?: number;
|
|
1079
|
+
frames?: number;
|
|
1080
|
+
height?: number;
|
|
1081
|
+
seconds: number;
|
|
1082
|
+
width?: number;
|
|
1083
|
+
}
|
|
3261
1084
|
/** A cost, and enough context for a caller to say why it is what it is. */
|
|
3262
1085
|
interface ResolvedCost {
|
|
3263
1086
|
/** USD, or null when the rate cannot be resolved against what we know. */
|
|
@@ -3269,22 +1092,6 @@ interface ResolvedCost {
|
|
|
3269
1092
|
*/
|
|
3270
1093
|
basis: "measured" | "projected" | "unknown";
|
|
3271
1094
|
}
|
|
3272
|
-
/**
|
|
3273
|
-
* The figure to show before a run, from the rate alone.
|
|
3274
|
-
*
|
|
3275
|
-
* Only a flat per-call price survives this: everything else depends on an
|
|
3276
|
-
* output that does not exist yet, and guessing its size is how a dry run comes
|
|
3277
|
-
* to promise a number the invoice contradicts.
|
|
3278
|
-
*/
|
|
3279
|
-
export declare function projectedToolCost(price: FalToolPrice): ResolvedCost;
|
|
3280
|
-
/**
|
|
3281
|
-
* The figure to record after a run, from the rate and the output it produced.
|
|
3282
|
-
*
|
|
3283
|
-
* A per-megapixel rate becomes exact here, because the files have been written
|
|
3284
|
-
* and measured. Per-second rates need a duration nothing in the image path
|
|
3285
|
-
* carries, and metered endpoints publish no rate at all, so both stay unknown.
|
|
3286
|
-
*/
|
|
3287
|
-
export declare function measuredToolCost(price: FalToolPrice, outputs: readonly OutputDimensions[]): ResolvedCost;
|
|
3288
1095
|
/**
|
|
3289
1096
|
* Render a cost for a human. `null` never becomes "$0.000" - it says what it
|
|
3290
1097
|
* means, which is that nobody knows.
|
|
@@ -3302,61 +1109,211 @@ export declare function sumCosts(costs: readonly (number | null)[]): {
|
|
|
3302
1109
|
unknown: number;
|
|
3303
1110
|
};
|
|
3304
1111
|
//#endregion
|
|
3305
|
-
//#region src/
|
|
3306
|
-
|
|
3307
|
-
|
|
3308
|
-
|
|
1112
|
+
//#region src/task-client.d.ts
|
|
1113
|
+
interface MotifClientConfig {
|
|
1114
|
+
/** Falls back to FAL_KEY. */
|
|
1115
|
+
falKey?: string;
|
|
1116
|
+
/** Falls back to OPENAI_API_KEY. Used only by Models routed through OpenAI. */
|
|
1117
|
+
openAiKey?: string;
|
|
1118
|
+
/** Models pinned per Task, as `resolveTask` takes them. */
|
|
1119
|
+
pins?: TaskEnvironment["pins"];
|
|
1120
|
+
/** The one network seam. Defaults to global fetch. Retries and timeouts still apply. */
|
|
1121
|
+
fetch?: FalFetch;
|
|
1122
|
+
timeout?: number;
|
|
1123
|
+
retries?: number;
|
|
1124
|
+
}
|
|
1125
|
+
interface TaskInput {
|
|
1126
|
+
/** Source image: https URL or data URL. */
|
|
1127
|
+
image?: string;
|
|
1128
|
+
/**
|
|
1129
|
+
* Boxes to act on, in whole pixels of the source image. A Model that takes
|
|
1130
|
+
* fractions gets them converted using the source's size.
|
|
1131
|
+
*/
|
|
1132
|
+
boxes?: readonly {
|
|
1133
|
+
x: number;
|
|
1134
|
+
y: number;
|
|
1135
|
+
width: number;
|
|
1136
|
+
height: number;
|
|
1137
|
+
}[];
|
|
1138
|
+
/**
|
|
1139
|
+
* The source image's pixel size, needed to convert `boxes` for a Model that
|
|
1140
|
+
* takes fractions when `image` is an https URL. Read from a data URL itself.
|
|
1141
|
+
*/
|
|
1142
|
+
sourceSize?: {
|
|
1143
|
+
width: number;
|
|
1144
|
+
height: number;
|
|
1145
|
+
};
|
|
1146
|
+
/**
|
|
1147
|
+
* The source video's length, frame count, size and frame rate, read from
|
|
1148
|
+
* its header by the caller. Per-second and per-frame Models price from it;
|
|
1149
|
+
* without it their projected cost is unknown.
|
|
1150
|
+
*/
|
|
1151
|
+
sourceVideo?: SourceVideo;
|
|
1152
|
+
/** reframe `margin` mode: pixels to add on each edge. */
|
|
1153
|
+
margin?: {
|
|
1154
|
+
top: number;
|
|
1155
|
+
right: number;
|
|
1156
|
+
bottom: number;
|
|
1157
|
+
left: number;
|
|
1158
|
+
};
|
|
1159
|
+
/** Source video: https URL. */
|
|
1160
|
+
video?: string;
|
|
1161
|
+
prompt?: string;
|
|
1162
|
+
/** Mask image: https URL or data URL. */
|
|
1163
|
+
mask?: string;
|
|
1164
|
+
/** Reference images: https URLs or data URLs. restyle and try-on take exactly one. */
|
|
1165
|
+
references?: readonly string[];
|
|
1166
|
+
aspect?: AspectRatio;
|
|
1167
|
+
resolution?: Resolution;
|
|
1168
|
+
count?: number;
|
|
1169
|
+
seed?: number;
|
|
1170
|
+
negativePrompt?: string;
|
|
1171
|
+
outputFormat?: ImageOutputFormat;
|
|
1172
|
+
transparent?: boolean;
|
|
1173
|
+
/** Upscale factor. */
|
|
1174
|
+
scale?: number;
|
|
1175
|
+
/** reframe `sizes` mode: target sizes. */
|
|
1176
|
+
sizes?: readonly CustomImageSize[];
|
|
1177
|
+
/** animate: seconds. */
|
|
1178
|
+
duration?: number;
|
|
1179
|
+
/** mesh: rig the mesh for animation. */
|
|
1180
|
+
rig?: boolean;
|
|
1181
|
+
look?: string;
|
|
1182
|
+
mood?: string;
|
|
1183
|
+
tier?: Tier;
|
|
1184
|
+
model?: string;
|
|
1185
|
+
mode?: string;
|
|
1186
|
+
/** Model-only fal body fields, sent as given. Requires `model`. */
|
|
1187
|
+
params?: Readonly<Record<string, unknown>>;
|
|
1188
|
+
/** Ask fal not to store IO payloads. */
|
|
1189
|
+
ephemeral?: boolean;
|
|
1190
|
+
/**
|
|
1191
|
+
* Called on each poll of fal's queue with its status ("queued",
|
|
1192
|
+
* "in_progress", "completed") and, while queued, the place in line. Passing
|
|
1193
|
+
* it runs a fal generation through the queue, since only the queue reports.
|
|
1194
|
+
*/
|
|
1195
|
+
onProgress?: (status: string, queuePosition?: number) => void;
|
|
1196
|
+
}
|
|
1197
|
+
interface TaskFile {
|
|
1198
|
+
/** Output key the URL came from, e.g. "image", "masks", "model_glb". */
|
|
3309
1199
|
key: string;
|
|
3310
|
-
|
|
3311
|
-
|
|
3312
|
-
|
|
3313
|
-
required?: true;
|
|
3314
|
-
/** Compact rendering of fal's declared type, e.g. `enum(a|b)`, `list[string]`. */
|
|
3315
|
-
type: string;
|
|
1200
|
+
url: string;
|
|
1201
|
+
/** Semantic name from the registry's outputLabels, when one applies. */
|
|
1202
|
+
label?: string;
|
|
3316
1203
|
}
|
|
3317
|
-
|
|
3318
|
-
|
|
3319
|
-
|
|
3320
|
-
|
|
3321
|
-
|
|
3322
|
-
|
|
3323
|
-
|
|
3324
|
-
|
|
3325
|
-
|
|
3326
|
-
|
|
3327
|
-
|
|
3328
|
-
|
|
3329
|
-
/**
|
|
3330
|
-
|
|
3331
|
-
/**
|
|
3332
|
-
|
|
1204
|
+
interface TaskPlan {
|
|
1205
|
+
task: TaskId;
|
|
1206
|
+
model: string;
|
|
1207
|
+
tier: Tier;
|
|
1208
|
+
chosenBy: ChosenBy;
|
|
1209
|
+
mode?: string;
|
|
1210
|
+
endpoint: string;
|
|
1211
|
+
/** Request body as it will be sent. */
|
|
1212
|
+
body: Record<string, unknown>;
|
|
1213
|
+
/** Prompt after Look and Mood enrichment, when the Task takes one. */
|
|
1214
|
+
prompt?: string;
|
|
1215
|
+
queued: boolean;
|
|
1216
|
+
/** Projected: before the call. */
|
|
1217
|
+
cost: ResolvedCost;
|
|
1218
|
+
/** The provider carrying the request. "openai" only for a transparency route. */
|
|
1219
|
+
provider: "fal" | "openai";
|
|
1220
|
+
}
|
|
1221
|
+
interface TaskOutput extends Omit<TaskPlan, "body" | "cost" | "queued"> {
|
|
1222
|
+
files: TaskFile[];
|
|
1223
|
+
/** Non-file result fields: answer, reasoning, boxes, scores, points, rle, text... */
|
|
1224
|
+
data: Record<string, unknown>;
|
|
1225
|
+
/** Measured where the rate allows, else projected or unknown. */
|
|
1226
|
+
cost: ResolvedCost;
|
|
1227
|
+
requestId?: string;
|
|
1228
|
+
/** Raw provider response, for callers that need a field we don't lift. */
|
|
1229
|
+
raw: Record<string, unknown>;
|
|
1230
|
+
}
|
|
1231
|
+
interface PlanOptions {
|
|
1232
|
+
/** Resolve as if FAL_KEY were set, so a dry run can price without a key. */
|
|
1233
|
+
dryRun?: boolean;
|
|
1234
|
+
}
|
|
1235
|
+
type TaskFunction = (input: TaskInput) => Promise<Result$1<TaskOutput, MotifError>>;
|
|
1236
|
+
interface MotifClient {
|
|
1237
|
+
/** Pure: resolve the Model, build the request, price it. No I/O. */
|
|
1238
|
+
plan: (task: TaskId, input: TaskInput, options?: PlanOptions) => Result$1<TaskPlan, MotifError>;
|
|
1239
|
+
run: (task: TaskId, input: TaskInput) => Promise<Result$1<TaskOutput, MotifError>>;
|
|
1240
|
+
stream: (task: TaskId, input: TaskInput, options?: TaskStreamOptions) => Promise<Result$1<TaskStream, MotifError>>;
|
|
1241
|
+
animate: TaskFunction;
|
|
1242
|
+
ask: TaskFunction;
|
|
1243
|
+
cutout: TaskFunction;
|
|
1244
|
+
erase: TaskFunction;
|
|
1245
|
+
generate: TaskFunction;
|
|
1246
|
+
layers: TaskFunction;
|
|
1247
|
+
map: TaskFunction;
|
|
1248
|
+
material: TaskFunction;
|
|
1249
|
+
mesh: TaskFunction;
|
|
1250
|
+
reframe: TaskFunction;
|
|
1251
|
+
relight: TaskFunction;
|
|
1252
|
+
restore: TaskFunction;
|
|
1253
|
+
restyle: TaskFunction;
|
|
1254
|
+
segment: TaskFunction;
|
|
1255
|
+
tile: TaskFunction;
|
|
1256
|
+
"try-on": TaskFunction;
|
|
1257
|
+
upscale: TaskFunction;
|
|
1258
|
+
vary: TaskFunction;
|
|
1259
|
+
vectorize: TaskFunction;
|
|
1260
|
+
/** Upload bytes to fal storage; returns the public URL. */
|
|
1261
|
+
upload: (bytes: Uint8Array, contentType: string, fileName?: string) => Promise<Result$1<string, MotifError>>;
|
|
1262
|
+
deletePayloads: (requestId: string) => Promise<Result$1<void, MotifError>>;
|
|
3333
1263
|
}
|
|
3334
|
-
|
|
1264
|
+
/** Create the Task client. Keys fall back to FAL_KEY and OPENAI_API_KEY. */
|
|
1265
|
+
export declare function createMotif(config?: MotifClientConfig): MotifClient;
|
|
3335
1266
|
//#endregion
|
|
3336
|
-
//#region src/
|
|
3337
|
-
|
|
3338
|
-
|
|
3339
|
-
|
|
3340
|
-
"default" |
|
|
3341
|
-
/** Lossy by default, lossless when `outputFormat` is set. */
|
|
3342
|
-
"on-request" |
|
|
3343
|
-
/** No lossless route: the endpoint returns a lossy container and rejects the argument. */
|
|
3344
|
-
"unavailable" |
|
|
3345
|
-
/** Not probed. Absence of evidence, not evidence of a limitation. */
|
|
3346
|
-
"unknown";
|
|
3347
|
-
/** Measured shape of what a model returns by default, if it has been probed. */
|
|
3348
|
-
export declare function modelOutput(model: string): ModelOutputShape | undefined;
|
|
1267
|
+
//#region src/task-plan-shared.d.ts
|
|
1268
|
+
export declare const INVALID_OPTION = "INVALID_OPTION";
|
|
1269
|
+
//#endregion
|
|
1270
|
+
//#region src/prompt-warnings.d.ts
|
|
3349
1271
|
/**
|
|
3350
|
-
*
|
|
1272
|
+
* Advisory checks on a user-written prompt.
|
|
3351
1273
|
*
|
|
3352
|
-
*
|
|
3353
|
-
*
|
|
1274
|
+
* These run on the caller's own prompt only, never on look or mood text, and
|
|
1275
|
+
* never block a request. They flag phrasings that image models tend to
|
|
1276
|
+
* misread.
|
|
3354
1277
|
*/
|
|
3355
|
-
|
|
1278
|
+
/** Stable id of a prompt warning rule. */
|
|
1279
|
+
type PromptWarningRule = "edit-has-verb" | "negated-object" | "text-bearing-object";
|
|
1280
|
+
/** One advisory finding about a prompt. */
|
|
1281
|
+
interface PromptWarning {
|
|
1282
|
+
/** The text in the prompt that triggered the rule. */
|
|
1283
|
+
match: string;
|
|
1284
|
+
/** Plain-English advice for the caller. */
|
|
1285
|
+
message: string;
|
|
1286
|
+
rule: PromptWarningRule;
|
|
1287
|
+
}
|
|
3356
1288
|
/**
|
|
3357
|
-
*
|
|
3358
|
-
*
|
|
1289
|
+
* Check a user prompt for phrasings that tend to backfire.
|
|
1290
|
+
*
|
|
1291
|
+
* - `negated-object`: "no <object>" for anything other than text, logos,
|
|
1292
|
+
* people, faces, watermarks, words or lettering. Naming an object tends to
|
|
1293
|
+
* draw it into the picture.
|
|
1294
|
+
* - `text-bearing-object`: the prompt asks for no text or no words but also
|
|
1295
|
+
* names something that usually carries text, such as a sign or a poster.
|
|
1296
|
+
* - `edit-has-verb`: an edit (`context.editing`) whose prompt starts with
|
|
1297
|
+
* remove, erase, extend or outpaint, jobs the CLI has a verb for.
|
|
1298
|
+
*
|
|
1299
|
+
* Pass the caller's own prompt, not an enriched one, and `editing: true` when
|
|
1300
|
+
* the request carries reference images to edit.
|
|
3359
1301
|
*/
|
|
3360
|
-
export declare function
|
|
1302
|
+
export declare function promptWarnings(prompt: string, context?: {
|
|
1303
|
+
editing?: boolean;
|
|
1304
|
+
}): PromptWarning[];
|
|
1305
|
+
//#endregion
|
|
1306
|
+
//#region src/env.d.ts
|
|
1307
|
+
export declare const motifEnvSchema: import("@howells/envy").EnvSchema<{
|
|
1308
|
+
readonly optional: {
|
|
1309
|
+
FAL_KEY: z.ZodString;
|
|
1310
|
+
OPENAI_API_KEY: z.ZodString;
|
|
1311
|
+
};
|
|
1312
|
+
}>;
|
|
1313
|
+
type MotifEnv = ReturnType<typeof motifEnvSchema.parse>;
|
|
1314
|
+
export declare function parseMotifEnv(input?: Record<string, unknown>): MotifEnv;
|
|
1315
|
+
export declare function getFalKeyFromEnv(input?: Record<string, unknown>): string | undefined;
|
|
1316
|
+
/** The OpenAI key, used by direct OpenAI routes such as gpt2 transparency. */
|
|
1317
|
+
export declare function getOpenAiKeyFromEnv(input?: Record<string, unknown>): string | undefined;
|
|
3361
1318
|
//#endregion
|
|
3362
|
-
export { type AspectRatio, type
|
|
1319
|
+
export { type AspectRatio, type Blocker, type Capability, type ChosenBy, type CreativeDirection, type CreativeField, type CreativeOption, type CreativeOptionErrorDetails, type CreativePromptResult, type CustomImageSize, type EnrichPromptOptions, type FalFetch, type ImageSizeBounds, type LookId, type LookOption, type ModelProfile, type MoodId, type MotifClient, type MotifClientConfig, type MotifEnv, type OutputDimensions, type PlanOptions, type PromptWarning, type PromptWarningRule, type RankedFrom, type RankedModel, type Resolution, type ResolvedCost, type Result, type ResultAsync, type TaskDefinition, type TaskEnvironment, type TaskFile, type TaskFunction, type TaskId, type TaskInput, type TaskMode, type TaskOutput, type TaskPlan, type TaskRequest, type TaskResolution, type TaskResolved, type TaskStream, type TaskStreamEvent, type TaskStreamOptions, type TaskUnresolved, type Tier, type Unblocker, err, ok };
|