The open creative studio on ComfyUI: images, video, 3D and audio on open weights, on your own GPU or the cloud. Camera motions, effects, apps, Cinema, Layers, Image to 3D and an AI agent.
TypeScript ai-videocomfyuicreative-toolsgenerative-aiideogramimage-generationimage-to-3dimage-to-videoltx-videominimax-h3nextjsopen-sourceopen-weightsqwen-imagetext-to-imagevideo-generationwan
FLUX 3 Klein: fal's routes, LoRA twins and trainer read from fal, in the catalog on the cloud
Claudeba245182dff6
diff --git a/docs/research/fuobe-originals-recipes-5.json b/docs/research/fuobe-originals-recipes-5.jsonindex fe3cf6ff..781aba72 100644--- a/docs/research/fuobe-originals-recipes-5.json+++ b/docs/research/fuobe-originals-recipes-5.json@@ -7008,6 +7008,60 @@"price": "free on own GPU","schemaUrl": "https://github.com/ostris/ai-toolkit","checked": "2026-10-23"+ },+ {+ "provider": "fal",+ "id": "blackforestlabs/flux-3/klein/base/trainer",+ "family": "FLUX 3 Klein base",+ "role": "Soul ID on FLUX 3 Image Klein (nm10-flux3-klein; FLUX Kommunity licence, shown as information)",+ "required": [+ "images_data_url"+ ],+ "fields": {+ "images_data_url": "string",+ "trigger_phrase": "string default=\"\"",+ "steps": "integer default=1000 minimum=100 maximum=10000",+ "learning_rate": "number default=0.0001 minimum=1e-06 maximum=0.01",+ "resolution": "integer default=1024 enum=[512, 768, 1024]"+ },+ "price": "Your request will cost $0.0043 per training step (minimum 100 steps). The default 1000 steps cost $4.30.",+ "baseLicence": "FLUX Kommunity License v1.0 (non-commercial; commercial outputs for Qualifying Users under US$5M revenue)",+ "commercialWeights": null,+ "licenceNote": "Not blanket permission for commercial fine-tuning or distribution (the model card); information, never a gate",+ "status": "active",+ "schemaUrl": "https://fal.ai/api/openapi/queue/openapi.json?endpoint_id=blackforestlabs/flux-3/klein/base/trainer",+ "checked": "2026-11-01",+ "loraOutput": [+ "lora_file"+ ],+ "outputChecked": "2026-11-01"+ },+ {+ "provider": "fal",+ "id": "blackforestlabs/flux-3/klein/base/trainer/edit",+ "family": "FLUX 3 Klein base",+ "role": "Edit LoRAs from before / after pairs on FLUX 3 Image Klein (recorded; Soul ID trains subjects with the plain trainer)",+ "required": [+ "images_data_url"+ ],+ "fields": {+ "images_data_url": "string",+ "trigger_phrase": "string default=\"\"",+ "steps": "integer default=1000 minimum=100 maximum=10000",+ "learning_rate": "number default=0.0001 minimum=1e-06 maximum=0.01",+ "resolution": "integer default=1024 enum=[512, 768, 1024]"+ },+ "price": "Your request will cost $0.002 per training step, multiplied by the reference images per pair: x2.11 with 1, x3.44 with 2, x5.09 with 3, x6.95 with 4 (up to x23.44 with 10). 1000 steps cost $4.22 with 1 reference image and $13.90 with 4.",+ "baseLicence": "FLUX Kommunity License v1.0 (non-commercial; commercial outputs for Qualifying Users under US$5M revenue)",+ "commercialWeights": null,+ "licenceNote": "Not blanket permission for commercial fine-tuning or distribution (the model card); information, never a gate",+ "status": "active",+ "schemaUrl": "https://fal.ai/api/openapi/queue/openapi.json?endpoint_id=blackforestlabs/flux-3/klein/base/trainer/edit",+ "checked": "2026-11-01",+ "loraOutput": [+ "lora_file"+ ],+ "outputChecked": "2026-11-01"}],"loraLibrary": [diff --git a/docs/research/new-models-10.json b/docs/research/new-models-10.jsonindex f8709afe..2e3faa57 100644--- a/docs/research/new-models-10.json+++ b/docs/research/new-models-10.json@@ -1298,5 +1298,1723 @@"dependsOn": [],"brief": "WHY. 'Worlds' became a hot category in October: fal opened a worlds section (H3 Max Director, Abot World 0, Lingbot World 2, VAST Eden Live) and Tencent open-sourced Hy-Nomas (Apache-2.0, 2026-10-21), an interactive world model that keeps generating 720p video at 24 fps while you change the action in words and fly the camera on a trajectory. A community ComfyUI port loads it with stock loaders and measured ~21 s per 3 s turn on a 5090. Fuobe's Cinema already has camera paths (fly path) to drive it.\nWHERE IT SHOWS UP. Cinema Studio: a 'World' take type (opening description, then turns with words and a camera move from the fly-path library), a turn timeline with redo, export as one film; Assist ('make a 60 s world walk-through').\nFacts (tencent/Hy-Nomas @ bb6a8ca451bf, Apache-2.0 per the HF tag: read the LICENSE file and record it; github.com/Tencent-Hunyuan/Hy-Nomas; port github.com/Nynxz/ComfyUI-HyNomas with converted weights at huggingface.co/nynxz/Hy-Nomas; read all as data): 720x1280 at 24 fps; 8-step distilled config, Euler ODE, text and camera guidance 1.0; a JSON prompt file of segments (start/end times, a long opening description, short change descriptions for later turns, timed actions; inference.video_length=event derives lengths from event times); a trajectory file of camera-to-world matrices and intrinsics (trajectory_translation_scale 1.0, trajectory_rotation_scale 2.5 by default); keyboard/mouse control only in Tencent's hosted demo. The gallery example is 60 s from five 12 s text-only turns. Hardware: reference 8 GPUs with sequence parallelism; a single-4090 config uses INT8 DiT and KV cache, an FP8 decoder, stage-by-stage CPU offload and GPU history capped at 18 latent frames (speed unverified by Tencent); the port measured ~21 s per 3 s turn plus ~4 s decode per window on a 5090 at 1280x704 INT8. Files: DiT/distilled_int8 9.06 GB (port: INT8 DiT 9.0 GB in diffusion_models; BF16 17.1 GB for LoRA merges), PixelUMM VAE (31.55 GB in Tencent's repo; 15.8 GB converted by the port), a cinematic LoRA adapter 6.12 GB, the prompt enhancer PE (~55 GB, optional: offline inference reads prepared prompt files), the text encoder Qwen2.5-VL 7B loaded as type qwen_image from Comfy-Org/Qwen-Image_ComfyUI (Fuobe may already pin it: check).\nSTART by mapping what already exists against the plan: earlier packages built parts of this (read git log --oneline on the base for the files the plan names, the catalog, the studio code and its tests). Build only the gaps, extend what exists rather than duplicating it, and say in your report which plan items were already there.\nBuild:\n1. Pin the port (Nynxz/ComfyUI-HyNomas at a commit) and the converted weights in packs.json / model-pins.json; graph world-hy-nomas-turn: one turn = the previous turn's state (the port's history mechanism: read how it carries history between queue runs) + the turn's words + the turn's camera trajectory → 3-12 s of video; validate against the node list. If the port cannot carry history between separate /prompt calls, build the whole film as one graph with N turns and say so.\n2. A pure, tested converter src/lib/world-path.ts: Fuobe's camera paths (scene3d keyframes / the fly-path library: orbits, dollies, trucks, figure-8) → Hy-Nomas camera-to-world matrices and intrinsics at 24 fps, with the default scales.\n3. Cinema 'World' take: opening description, turns list (words + a camera move chip + seconds), Preview the path, Run turn, Redo from here (keeps earlier turns), Export (join with video-concat). Sound: Hy-Nomas makes none: offer the existing Foley / music tools after.\n4. CLOUD: Hy-Nomas is not hosted on fal or Replicate: open engine only ('Runs on your GPU (open source)'; 'Paid APIs only' hides it). fal's worlds models (H3 Max Director realtime WebRTC sessions with a 60 s minimum; Abot World 0; Lingbot World 2 'research' licence; Eden Live) are different models, not stand-ins: record them in the research JSON; whether to offer any of them under its own name is the owner's call.\n5. Relation to queued work: n7-9-worldcast-worker (WorldCast fly-around from one photo) is a different model and stays; reuse its camera-path pieces if they landed first.\n6. /connect row: 'World mode' with the 24 GB+ (guess) requirement and the ~25 GB of files; licence row Apache-2.0 (and the PE and VAE licences as their cards say).\nTests: converter tests (matrix conventions, intrinsics, frame counts, scales), turn-state tests, library test, browser checks of the World take at 1440 and 390 px, light and dark, in demo mode. No GPU here: every speed figure is the port author's.\nCLOUD ONLY WHERE IT IS HOSTED (the owner's rule): a feature gets a cloud route only when the model itself (or its base model with LoRA support, for a LoRA) is hosted on fal or Replicate with the inputs it needs. If it isn't, the feature is on the open engine (ComfyUI) only: no substitute recipe on the cloud. The cloud engine says plainly that it runs on your GPU (open source), and Engine mode \"Paid APIs only\" hides or refuses it with that reason. EACH ENGINE DOES ALL IT CAN (the owner, 10-30): the cloud uses only hosted models, with what the hosted endpoint supports; the open engine keeps every capability it has (LoRAs, custom nodes, longer clips, reference images) even when the cloud can't match it. Never remove or weaken a local capability because the cloud lacks it: a LoRA that only works locally runs locally, and the cloud runs the same hosted model without it. The UI says plainly what each engine does.\nMAIN CHANGED THIS AREA (10-30): main's GPU pre-flight board (/connect; STUDIO_ROWS and the preset map in src/server/gpu/tools.ts; chips from /api/gpu/badges) shows every studio, app and model as Ready / One step away / Needs setup / Needs a bigger GPU. Give a new studio page, hub tool or app its row there, and make sure its ComfyUI graphs reach workflows/comfyui/requirements.json (the library build writes it; pin a new node pack in workflows/comfyui/packs.json and new model files in workflows/comfyui/model-pins.json).\nPUBLIC SIGN-UP (the owner's, on main: docs/public-signup.md at your base, which wins where it says more than this; the accounts lane acc-* was dropped on 2026-10-30, and docs/research/accounts-8.md is background research only): every route, tool, page and run you add follows it the way main's own routes do. Read src/lib/guest-access.ts, src/proxy.ts, src/server/tenant.ts and tests/public-signup.test.ts first. Guests browse read-only (changes answer 401). Accounts see the owner's library as a guest does: the owner's lists come back empty (EMPTY_LISTS), other reads of them are refused, a change to the library or projects goes in LIBRARY_CHANGES (403 code library), and a visitor is never told whether one of the owner's records exists. Install-wide settings, keys and tokens stay the owner's (OWNER_WRITES, OWNER_ALL). Only the owner's runs reach the install's keys or GPU: an account runs studio generations through POST /api/generations on its own ComfyUI (onOwnGpu in src/server/providers/comfyui.ts; accountRun in src/server/generations.ts keeps chained steps the account's own); without a GPU any run answers connect-gpu, and a tool that plans with the studio's own AI helpers or keeps projects of its own answers own-gpu-tool (so does every 3D model for now). An account's run reads only its own files: it runs inside runAsTenant, src/server/tenant.ts says what work inside a tenant may use, and src/server/account-inputs.ts checks every input (input-not-allowed, input-not-yours, input-gone, input-too-big). A new server path that reads, fetches or chains a file for a run goes through them, with a test in the style of tests/account-tenant.test.ts and the other tests/account-*.test.ts. A price check (an estimate route, or ?preview=1 on a run route) goes in ESTIMATES or PREVIEWS and runs through priceAs (src/server/visitor.ts), so a visitor is priced for its own GPU on the open engine, never a demo. The sign-in proxy holds a request body only up to 4 MB (main, 10-31: proxyClientMaxBodySize in next.config.ts; a bigger body reaches the route cut short, with no error), so a route that takes a large file takes an uploaded file's reference instead (POST /api/uploads skips the proxy through src/server/direct-gate.ts). A route that must take a file itself skips the proxy the way main's do: the matcher in src/proxy.ts, then gateAsProxy and readBodyWithin or readFormWithin from src/server/direct-gate.ts, and a row in tests/request-body-limits.test.ts. Add each new route to those rules and to tests/public-signup.test.ts (tools in the style of tests/public-signup-tools.test.ts). A new ComfyUI workflow or node pack goes into the GPU pre-flight's requirement index (workflows/comfyui/packs.json and model-pins.json, then node scripts/comfy/build-requirements.mjs), and a new studio or tool gets a row on the pre-flight board (/connect; STUDIO_ROWS in src/server/gpu/tools.ts)."}+ ],+ "endpointRecords": [+ {+ "family": "flux-3-klein",+ "model": "FLUX 3 Klein",+ "title": "FLUX.3 Klein",+ "vendor": "Black Forest Labs",+ "operation": "t2i",+ "provider": "fal",+ "endpoint": "blackforestlabs/flux-3/klein/text-to-image",+ "falCategory": "text-to-image",+ "status": "active",+ "keyFields": {+ "prompt": "prompt",+ "aspectRatio": "image_size",+ "seed": "seed",+ "numOutputs": "num_images",+ "enhancePrompt": "enable_prompt_expansion",+ "boundingBoxes": "bounding_boxes"+ },+ "inputs": {+ "prompt": {+ "type": "string",+ "required": true,+ "desc": "The prompt to generate an image from. The model is trained on detailed captions: describe framing, subject, background and lighting.",+ "examples": [+ "A red fox standing in fresh snow at sunrise, its breath visible in the cold air. Soft golden light rakes across the snowfield from the left, pine forest softly blurred in the background, shot at eye level with a telephoto lens."+ ]+ },+ "enable_prompt_expansion": {+ "type": "boolean",+ "required": false,+ "default": true,+ "desc": "If set to true, the prompt is expanded into a detailed caption (grounded in the reference images when editing) before generation."+ },+ "seed": {+ "nullable": true,+ "type": "integer",+ "required": false,+ "desc": "The same seed and the same prompt given to the same version of the model will output the same image every time."+ },+ "num_images": {+ "type": "integer",+ "required": false,+ "default": 1,+ "minimum": 1,+ "maximum": 4,+ "desc": "The number of images to generate."+ },+ "enable_safety_checker": {+ "type": "boolean",+ "required": false,+ "default": true,+ "desc": "If set to true, the safety checker will be enabled."+ },+ "output_format": {+ "type": "enum",+ "values": [+ "jpeg",+ "png",+ "webp"+ ],+ "valueType": "string",+ "required": false,+ "default": "png",+ "desc": "The format of the generated image."+ },+ "sync_mode": {+ "type": "boolean",+ "required": false,+ "default": false,+ "desc": "If `True`, the media will be returned as a data URI and the output data won't be available in the request history."+ },+ "image_size": {+ "type": "union",+ "variants": [+ {+ "type": "object",+ "fields": {+ "width": {+ "type": "integer",+ "required": false,+ "default": 512,+ "maximum": 14142,+ "minimumExclusive": 0,+ "desc": "The width of the generated image."+ },+ "height": {+ "type": "integer",+ "required": false,+ "default": 512,+ "maximum": 14142,+ "minimumExclusive": 0,+ "desc": "The height of the generated image."+ }+ },+ "required": false+ },+ {+ "type": "enum",+ "values": [+ "square_hd",+ "square",+ "portrait_4_3",+ "portrait_16_9",+ "landscape_4_3",+ "landscape_16_9"+ ],+ "valueType": "string",+ "required": false+ }+ ],+ "default": "square_hd",+ "desc": "The size of the generated image. Each side can be 256 to 4096 pixels (native 4K)."+ },+ "bounding_boxes": {+ "nullable": true,+ "type": "array",+ "items": "object",+ "itemSchema": {+ "box": {+ "type": "object",+ "fields": {+ "y_max": {+ "type": "number",+ "required": false,+ "minimum": 0,+ "maximum": 1,+ "desc": "Bottom edge as a fraction of the image height (0-1).",+ "examples": [+ 0.9+ ]+ },+ "x_max": {+ "type": "number",+ "required": false,+ "minimum": 0,+ "maximum": 1,+ "desc": "Right edge as a fraction of the image width (0-1).",+ "examples": [+ 0.7+ ]+ },+ "x_min": {+ "type": "number",+ "required": false,+ "minimum": 0,+ "maximum": 1,+ "desc": "Left edge as a fraction of the image width (0-1).",+ "examples": [+ 0.3+ ]+ },+ "y_min": {+ "type": "number",+ "required": false,+ "minimum": 0,+ "maximum": 1,+ "desc": "Top edge as a fraction of the image height (0-1).",+ "examples": [+ 0.4+ ]+ }+ },+ "required": false+ },+ "label": {+ "nullable": true,+ "type": "string",+ "required": false,+ "maxLength": 64,+ "desc": "Short name for the object in this box, e.g. `fox`. Write `<fox>` in the prompt to tie the box to those words; a box the prompt doesn't name is added to the scene. Defaults to `obj_<n>`.",+ "examples": [+ "fox"+ ]+ },+ "description": {+ "type": "string",+ "required": false,+ "maxLength": 500,+ "desc": "What to draw in this box: the object and its look.",+ "examples": [+ "a red fox with thick orange fur and a white-tipped tail"+ ]+ }+ },+ "itemRequired": [+ "description",+ "box"+ ],+ "maxItems": 32,+ "required": false,+ "desc": "Optional layout: draw each described object inside its box. Box edges are fractions of the image size, with (0, 0) at the top-left. Name boxes in the prompt by label, e.g. `A red fox <fox> sits under a red umbrella <umbrella>`."+ }+ },+ "output": "images[].url",+ "price": "Pricing per output image is $0.008 at 768 × 768, $0.009 at 1K, $0.011 at 1.5K, $0.014 at 2K, and $0.036 at 4K. The same planned rates apply to generation and editing; for example, 10 images at 1K would cost $0.09.",+ "pricing": {+ "usd": 0.009,+ "unit": "image",+ "byResolution": {+ "1K": 0.009,+ "1.5K": 0.011,+ "2K": 0.014,+ "4K": 0.036+ }+ },+ "license": "FLUX Kommunity License v1.0: non-commercial use, plus commercial outputs for Qualifying Users under US$5M gross annual revenue (affiliates included); other commercial use needs a BFL licence. Its commercial-use exception is not blanket permission for commercial fine-tuning or distribution. The Qwen3-VL-4B-Instruct text encoder is Apache-2.0",+ "notes": "Send enable_prompt_expansion false with a Fuobe layout; the boxes go as bounding_boxes ({box: {x_min, y_min, x_max, y_max} as 0-1 fractions, label, description}), the prompt naming each box as <label>. image_size takes 256-4096 px a side.",+ "verified": true,+ "sourceUrl": "https://fal.ai/models/blackforestlabs/flux-3/klein/text-to-image",+ "schemaUrl": "https://fal.ai/api/openapi/queue/openapi.json?endpoint_id=blackforestlabs/flux-3/klein/text-to-image",+ "capability": "t2i",+ "fetched": "2026-11-01"+ },+ {+ "family": "flux-3-klein",+ "model": "FLUX 3 Klein",+ "title": "FLUX.3 Klein Image Editing",+ "vendor": "Black Forest Labs",+ "operation": "edit",+ "provider": "fal",+ "endpoint": "blackforestlabs/flux-3/klein/edit-image",+ "falCategory": "image-to-image",+ "status": "active",+ "keyFields": {+ "prompt": "prompt",+ "aspectRatio": "image_size",+ "seed": "seed",+ "numOutputs": "num_images",+ "enhancePrompt": "enable_prompt_expansion",+ "boundingBoxes": "bounding_boxes",+ "images": "image_urls"+ },+ "inputs": {+ "prompt": {+ "type": "string",+ "required": true,+ "desc": "A complete caption of the target image with the edit folded in. Refer to the references by their order: the first image, the second image.",+ "examples": [+ "A miniature grey amigurumi knight figure crocheted from thick woolen yarn stands on a cliff of stacked yarn skeins at night, lit by a full moon, next to a large fluffy knitted dragon in terracotta and mustard yarn, with a soft out-of-focus backdrop of indigo knitted yarn."+ ]+ },+ "enable_prompt_expansion": {+ "type": "boolean",+ "required": false,+ "default": true,+ "desc": "If set to true, the prompt is expanded into a detailed caption (grounded in the reference images when editing) before generation."+ },+ "seed": {+ "nullable": true,+ "type": "integer",+ "required": false,+ "desc": "The same seed and the same prompt given to the same version of the model will output the same image every time."+ },+ "num_images": {+ "type": "integer",+ "required": false,+ "default": 1,+ "minimum": 1,+ "maximum": 4,+ "desc": "The number of images to generate."+ },+ "enable_safety_checker": {+ "type": "boolean",+ "required": false,+ "default": true,+ "desc": "If set to true, the safety checker will be enabled."+ },+ "output_format": {+ "type": "enum",+ "values": [+ "jpeg",+ "png",+ "webp"+ ],+ "valueType": "string",+ "required": false,+ "default": "png",+ "desc": "The format of the generated image."+ },+ "sync_mode": {+ "type": "boolean",+ "required": false,+ "default": false,+ "desc": "If `True`, the media will be returned as a data URI and the output data won't be available in the request history."+ },+ "image_urls": {+ "type": "array",+ "items": "string",+ "minItems": 1,+ "maxItems": 10,+ "required": true,+ "desc": "The reference images to edit or compose from (up to 10).",+ "examples": [+ [+ "https://storage.googleapis.com/falserverless/example_inputs/z-image-turbo-i2i-input.png"+ ]+ ]+ },+ "image_size": {+ "nullable": true,+ "type": "union",+ "variants": [+ {+ "type": "object",+ "fields": {+ "width": {+ "type": "integer",+ "required": false,+ "default": 512,+ "maximum": 14142,+ "minimumExclusive": 0,+ "desc": "The width of the generated image."+ },+ "height": {+ "type": "integer",+ "required": false,+ "default": 512,+ "maximum": 14142,+ "minimumExclusive": 0,+ "desc": "The height of the generated image."+ }+ },+ "required": false+ },+ {+ "type": "enum",+ "values": [+ "square_hd",+ "square",+ "portrait_4_3",+ "portrait_16_9",+ "landscape_4_3",+ "landscape_16_9"+ ],+ "valueType": "string",+ "required": false+ }+ ],+ "desc": "The size of the generated image, 256 to 4096 pixels per side. If not set, a single reference image's own size (scaled to at most 4 megapixels) is used, or the first reference image's size (at most 1 megapixel) when several are given."+ },+ "bounding_boxes": {+ "nullable": true,+ "type": "array",+ "items": "object",+ "itemSchema": {+ "box": {+ "nullable": true,+ "type": "object",+ "fields": {+ "y_max": {+ "type": "number",+ "required": false,+ "minimum": 0,+ "maximum": 1,+ "desc": "Bottom edge as a fraction of the image height (0-1).",+ "examples": [+ 0.9+ ]+ },+ "x_max": {+ "type": "number",+ "required": false,+ "minimum": 0,+ "maximum": 1,+ "desc": "Right edge as a fraction of the image width (0-1).",+ "examples": [+ 0.7+ ]+ },+ "x_min": {+ "type": "number",+ "required": false,+ "minimum": 0,+ "maximum": 1,+ "desc": "Left edge as a fraction of the image width (0-1).",+ "examples": [+ 0.3+ ]+ },+ "y_min": {+ "type": "number",+ "required": false,+ "minimum": 0,+ "maximum": 1,+ "desc": "Top edge as a fraction of the image height (0-1).",+ "examples": [+ 0.4+ ]+ }+ },+ "required": false,+ "desc": "Where the object goes in the output image, as on text-to-image. Use instead of `source_box`/`target_box`."+ },+ "source_box": {+ "nullable": true,+ "type": "object",+ "fields": {+ "y_max": {+ "type": "number",+ "required": false,+ "minimum": 0,+ "maximum": 1,+ "desc": "Bottom edge as a fraction of the image height (0-1).",+ "examples": [+ 0.9+ ]+ },+ "x_max": {+ "type": "number",+ "required": false,+ "minimum": 0,+ "maximum": 1,+ "desc": "Right edge as a fraction of the image width (0-1).",+ "examples": [+ 0.7+ ]+ },+ "x_min": {+ "type": "number",+ "required": false,+ "minimum": 0,+ "maximum": 1,+ "desc": "Left edge as a fraction of the image width (0-1).",+ "examples": [+ 0.3+ ]+ },+ "y_min": {+ "type": "number",+ "required": false,+ "minimum": 0,+ "maximum": 1,+ "desc": "Top edge as a fraction of the image height (0-1).",+ "examples": [+ 0.4+ ]+ }+ },+ "required": false,+ "desc": "Where the object is in the reference image. Requires `source_image_index`."+ },+ "label": {+ "nullable": true,+ "type": "string",+ "required": false,+ "maxLength": 64,+ "desc": "Short name for the object in this box, e.g. `dragon`. Write `<dragon>` in the prompt to tie the box to those words; a box the prompt doesn't name is added to the scene. Defaults to `obj_<n>`.",+ "examples": [+ "dragon"+ ]+ },+ "description": {+ "type": "string",+ "required": false,+ "maxLength": 500,+ "desc": "What to draw in this box: the object and its look.",+ "examples": [+ "a large fluffy knitted dragon in terracotta and mustard yarn"+ ]+ },+ "target_box": {+ "nullable": true,+ "type": "object",+ "fields": {+ "y_max": {+ "type": "number",+ "required": false,+ "minimum": 0,+ "maximum": 1,+ "desc": "Bottom edge as a fraction of the image height (0-1).",+ "examples": [+ 0.9+ ]+ },+ "x_max": {+ "type": "number",+ "required": false,+ "minimum": 0,+ "maximum": 1,+ "desc": "Right edge as a fraction of the image width (0-1).",+ "examples": [+ 0.7+ ]+ },+ "x_min": {+ "type": "number",+ "required": false,+ "minimum": 0,+ "maximum": 1,+ "desc": "Left edge as a fraction of the image width (0-1).",+ "examples": [+ 0.3+ ]+ },+ "y_min": {+ "type": "number",+ "required": false,+ "minimum": 0,+ "maximum": 1,+ "desc": "Top edge as a fraction of the image height (0-1).",+ "examples": [+ 0.4+ ]+ }+ },+ "required": false,+ "desc": "Where the object goes in the output image. Leave unset to remove a referenced object; set both boxes to move or resize it."+ },+ "source_image_index": {+ "nullable": true,+ "type": "integer",+ "required": false,+ "minimum": 0,+ "desc": "0-based index into `image_urls` of the reference the object comes from. Leave unset for a new object."+ }+ },+ "itemRequired": [+ "description"+ ],+ "maxItems": 32,+ "required": false,+ "desc": "Optional layout, with (0, 0) at the top-left of each image: keep, move, resize or remove objects from the references, or place new ones. Name boxes in the prompt by label, e.g. `<dragon>`."+ }+ },+ "output": "images[].url",+ "price": "Pricing per output image is $0.008 at 768 × 768, $0.009 at 1K, $0.011 at 1.5K, $0.014 at 2K, and $0.036 at 4K. The same planned rates apply to generation and editing; for example, 10 images at 1K would cost $0.09.",+ "pricing": {+ "usd": 0.009,+ "unit": "image",+ "byResolution": {+ "1K": 0.009,+ "1.5K": 0.011,+ "2K": 0.014,+ "4K": 0.036+ }+ },+ "license": "FLUX Kommunity License v1.0: non-commercial use, plus commercial outputs for Qualifying Users under US$5M gross annual revenue (affiliates included); other commercial use needs a BFL licence. Its commercial-use exception is not blanket permission for commercial fine-tuning or distribution. The Qwen3-VL-4B-Instruct text encoder is Apache-2.0",+ "notes": "Send enable_prompt_expansion false with a Fuobe layout; the boxes go as bounding_boxes ({box: {x_min, y_min, x_max, y_max} as 0-1 fractions, label, description}), the prompt naming each box as <label>. image_size takes 256-4096 px a side.",+ "verified": true,+ "sourceUrl": "https://fal.ai/models/blackforestlabs/flux-3/klein/edit-image",+ "schemaUrl": "https://fal.ai/api/openapi/queue/openapi.json?endpoint_id=blackforestlabs/flux-3/klein/edit-image",+ "capability": "edit",+ "fetched": "2026-11-01"+ },+ {+ "family": "flux-3-klein",+ "model": "FLUX 3 Klein LoRA",+ "title": "FLUX 3 Klein Text to Image LoRA",+ "vendor": "Black Forest Labs",+ "operation": "t2i",+ "provider": "fal",+ "endpoint": "blackforestlabs/flux-3/klein/text-to-image/lora",+ "falCategory": "text-to-image",+ "status": "active",+ "keyFields": {+ "prompt": "prompt",+ "aspectRatio": "image_size",+ "seed": "seed",+ "numOutputs": "num_images",+ "enhancePrompt": "enable_prompt_expansion",+ "boundingBoxes": "bounding_boxes",+ "loras": "loras"+ },+ "inputs": {+ "loras": {+ "type": "array",+ "items": "object",+ "itemSchema": {+ "scale": {+ "type": "number",+ "required": false,+ "default": 1,+ "minimum": 0,+ "maximum": 4,+ "desc": "Scale factor for LoRA application (0.0 to 4.0)."+ },+ "path": {+ "type": "string",+ "required": false,+ "desc": "URL to a FLUX 3 Klein LoRA (.safetensors), e.g. from flux-3-image-klein-trainer."+ }+ },+ "itemRequired": [+ "path"+ ],+ "maxItems": 3,+ "required": false,+ "default": [],+ "desc": "LoRA weights to apply (maximum 3)."+ },+ "prompt": {+ "type": "string",+ "required": true,+ "desc": "The prompt to generate an image from. The model is trained on detailed captions: describe framing, subject, background and lighting.",+ "examples": [+ "A red fox standing in fresh snow at sunrise, its breath visible in the cold air. Soft golden light rakes across the snowfield from the left, pine forest softly blurred in the background, shot at eye level with a telephoto lens."+ ]+ },+ "enable_prompt_expansion": {+ "type": "boolean",+ "required": false,+ "default": true,+ "desc": "If set to true, the prompt is expanded into a detailed caption (grounded in the reference images when editing) before generation."+ },+ "seed": {+ "nullable": true,+ "type": "integer",+ "required": false,+ "desc": "The same seed and the same prompt given to the same version of the model will output the same image every time."+ },+ "num_images": {+ "type": "integer",+ "required": false,+ "default": 1,+ "minimum": 1,+ "maximum": 4,+ "desc": "The number of images to generate."+ },+ "enable_safety_checker": {+ "type": "boolean",+ "required": false,+ "default": true,+ "desc": "If set to true, the safety checker will be enabled."+ },+ "output_format": {+ "type": "enum",+ "values": [+ "jpeg",+ "png",+ "webp"+ ],+ "valueType": "string",+ "required": false,+ "default": "png",+ "desc": "The format of the generated image."+ },+ "sync_mode": {+ "type": "boolean",+ "required": false,+ "default": false,+ "desc": "If `True`, the media will be returned as a data URI and the output data won't be available in the request history."+ },+ "image_size": {+ "type": "union",+ "variants": [+ {+ "type": "object",+ "fields": {+ "width": {+ "type": "integer",+ "required": false,+ "default": 512,+ "maximum": 14142,+ "minimumExclusive": 0,+ "desc": "The width of the generated image."+ },+ "height": {+ "type": "integer",+ "required": false,+ "default": 512,+ "maximum": 14142,+ "minimumExclusive": 0,+ "desc": "The height of the generated image."+ }+ },+ "required": false+ },+ {+ "type": "enum",+ "values": [+ "square_hd",+ "square",+ "portrait_4_3",+ "portrait_16_9",+ "landscape_4_3",+ "landscape_16_9"+ ],+ "valueType": "string",+ "required": false+ }+ ],+ "default": "square_hd",+ "desc": "The size of the generated image. Each side can be 256 to 4096 pixels (native 4K)."+ },+ "bounding_boxes": {+ "nullable": true,+ "type": "array",+ "items": "object",+ "itemSchema": {+ "box": {+ "type": "object",+ "fields": {+ "y_max": {+ "type": "number",+ "required": false,+ "minimum": 0,+ "maximum": 1,+ "desc": "Bottom edge as a fraction of the image height (0-1).",+ "examples": [+ 0.9+ ]+ },+ "x_max": {+ "type": "number",+ "required": false,+ "minimum": 0,+ "maximum": 1,+ "desc": "Right edge as a fraction of the image width (0-1).",+ "examples": [+ 0.7+ ]+ },+ "x_min": {+ "type": "number",+ "required": false,+ "minimum": 0,+ "maximum": 1,+ "desc": "Left edge as a fraction of the image width (0-1).",+ "examples": [+ 0.3+ ]+ },+ "y_min": {+ "type": "number",+ "required": false,+ "minimum": 0,+ "maximum": 1,+ "desc": "Top edge as a fraction of the image height (0-1).",+ "examples": [+ 0.4+ ]+ }+ },+ "required": false+ },+ "label": {+ "nullable": true,+ "type": "string",+ "required": false,+ "maxLength": 64,+ "desc": "Short name for the object in this box, e.g. `fox`. Write `<fox>` in the prompt to tie the box to those words; a box the prompt doesn't name is added to the scene. Defaults to `obj_<n>`.",+ "examples": [+ "fox"+ ]+ },+ "description": {+ "type": "string",+ "required": false,+ "maxLength": 500,+ "desc": "What to draw in this box: the object and its look.",+ "examples": [+ "a red fox with thick orange fur and a white-tipped tail"+ ]+ }+ },+ "itemRequired": [+ "description",+ "box"+ ],+ "maxItems": 32,+ "required": false,+ "desc": "Optional layout: draw each described object inside its box. Box edges are fractions of the image size, with (0, 0) at the top-left. Name boxes in the prompt by label, e.g. `A red fox <fox> sits under a red umbrella <umbrella>`."+ }+ },+ "output": "images[].url",+ "price": "Your request will cost $0.012 per megapixel of output. A 1024x1024 image costs $0.012.",+ "pricing": {+ "usd": 0.012,+ "unit": "megapixel"+ },+ "license": "FLUX Kommunity License v1.0: non-commercial use, plus commercial outputs for Qualifying Users under US$5M gross annual revenue (affiliates included); other commercial use needs a BFL licence. Its commercial-use exception is not blanket permission for commercial fine-tuning or distribution. The Qwen3-VL-4B-Instruct text encoder is Apache-2.0",+ "notes": "Send enable_prompt_expansion false with a Fuobe layout; the boxes go as bounding_boxes ({box: {x_min, y_min, x_max, y_max} as 0-1 fractions, label, description}), the prompt naming each box as <label>. image_size takes 256-4096 px a side.",+ "verified": true,+ "sourceUrl": "https://fal.ai/models/blackforestlabs/flux-3/klein/text-to-image/lora",+ "schemaUrl": "https://fal.ai/api/openapi/queue/openapi.json?endpoint_id=blackforestlabs/flux-3/klein/text-to-image/lora",+ "capability": "t2i",+ "fetched": "2026-11-01"+ },+ {+ "family": "flux-3-klein",+ "model": "FLUX 3 Klein LoRA",+ "title": "FLUX 3 Klein Edit LoRA",+ "vendor": "Black Forest Labs",+ "operation": "edit",+ "provider": "fal",+ "endpoint": "blackforestlabs/flux-3/klein/edit-image/lora",+ "falCategory": "image-to-image",+ "status": "active",+ "keyFields": {+ "prompt": "prompt",+ "aspectRatio": "image_size",+ "seed": "seed",+ "numOutputs": "num_images",+ "enhancePrompt": "enable_prompt_expansion",+ "boundingBoxes": "bounding_boxes",+ "images": "image_urls",+ "loras": "loras"+ },+ "inputs": {+ "loras": {+ "type": "array",+ "items": "object",+ "itemSchema": {+ "scale": {+ "type": "number",+ "required": false,+ "default": 1,+ "minimum": 0,+ "maximum": 4,+ "desc": "Scale factor for LoRA application (0.0 to 4.0)."+ },+ "path": {+ "type": "string",+ "required": false,+ "desc": "URL to a FLUX 3 Klein LoRA (.safetensors), e.g. from flux-3-image-klein-trainer."+ }+ },+ "itemRequired": [+ "path"+ ],+ "maxItems": 3,+ "required": false,+ "default": [],+ "desc": "LoRA weights to apply (maximum 3)."+ },+ "prompt": {+ "type": "string",+ "required": true,+ "desc": "A complete caption of the target image with the edit folded in. Refer to the references by their order: the first image, the second image.",+ "examples": [+ "A miniature grey amigurumi knight figure crocheted from thick woolen yarn stands on a cliff of stacked yarn skeins at night, lit by a full moon, next to a large fluffy knitted dragon in terracotta and mustard yarn, with a soft out-of-focus backdrop of indigo knitted yarn."+ ]+ },+ "enable_prompt_expansion": {+ "type": "boolean",+ "required": false,+ "default": true,+ "desc": "If set to true, the prompt is expanded into a detailed caption (grounded in the reference images when editing) before generation."+ },+ "seed": {+ "nullable": true,+ "type": "integer",+ "required": false,+ "desc": "The same seed and the same prompt given to the same version of the model will output the same image every time."+ },+ "num_images": {+ "type": "integer",+ "required": false,+ "default": 1,+ "minimum": 1,+ "maximum": 4,+ "desc": "The number of images to generate."+ },+ "enable_safety_checker": {+ "type": "boolean",+ "required": false,+ "default": true,+ "desc": "If set to true, the safety checker will be enabled."+ },+ "output_format": {+ "type": "enum",+ "values": [+ "jpeg",+ "png",+ "webp"+ ],+ "valueType": "string",+ "required": false,+ "default": "png",+ "desc": "The format of the generated image."+ },+ "sync_mode": {+ "type": "boolean",+ "required": false,+ "default": false,+ "desc": "If `True`, the media will be returned as a data URI and the output data won't be available in the request history."+ },+ "image_urls": {+ "type": "array",+ "items": "string",+ "minItems": 1,+ "maxItems": 10,+ "required": true,+ "desc": "The reference images to edit or compose from (up to 10).",+ "examples": [+ [+ "https://storage.googleapis.com/falserverless/example_inputs/z-image-turbo-i2i-input.png"+ ]+ ]+ },+ "image_size": {+ "nullable": true,+ "type": "union",+ "variants": [+ {+ "type": "object",+ "fields": {+ "width": {+ "type": "integer",+ "required": false,+ "default": 512,+ "maximum": 14142,+ "minimumExclusive": 0,+ "desc": "The width of the generated image."+ },+ "height": {+ "type": "integer",+ "required": false,+ "default": 512,+ "maximum": 14142,+ "minimumExclusive": 0,+ "desc": "The height of the generated image."+ }+ },+ "required": false+ },+ {+ "type": "enum",+ "values": [+ "square_hd",+ "square",+ "portrait_4_3",+ "portrait_16_9",+ "landscape_4_3",+ "landscape_16_9"+ ],+ "valueType": "string",+ "required": false+ }+ ],+ "desc": "The size of the generated image, 256 to 4096 pixels per side. If not set, a single reference image's own size (scaled to at most 4 megapixels) is used, or the first reference image's size (at most 1 megapixel) when several are given."+ },+ "bounding_boxes": {+ "nullable": true,+ "type": "array",+ "items": "object",+ "itemSchema": {+ "box": {+ "nullable": true,+ "type": "object",+ "fields": {+ "y_max": {+ "type": "number",+ "required": false,+ "minimum": 0,+ "maximum": 1,+ "desc": "Bottom edge as a fraction of the image height (0-1).",+ "examples": [+ 0.9+ ]+ },+ "x_max": {+ "type": "number",+ "required": false,+ "minimum": 0,+ "maximum": 1,+ "desc": "Right edge as a fraction of the image width (0-1).",+ "examples": [+ 0.7+ ]+ },+ "x_min": {+ "type": "number",+ "required": false,+ "minimum": 0,+ "maximum": 1,+ "desc": "Left edge as a fraction of the image width (0-1).",+ "examples": [+ 0.3+ ]+ },+ "y_min": {+ "type": "number",+ "required": false,+ "minimum": 0,+ "maximum": 1,+ "desc": "Top edge as a fraction of the image height (0-1).",+ "examples": [+ 0.4+ ]+ }+ },+ "required": false,+ "desc": "Where the object goes in the output image, as on text-to-image. Use instead of `source_box`/`target_box`."+ },+ "source_box": {+ "nullable": true,+ "type": "object",+ "fields": {+ "y_max": {+ "type": "number",+ "required": false,+ "minimum": 0,+ "maximum": 1,+ "desc": "Bottom edge as a fraction of the image height (0-1).",+ "examples": [+ 0.9+ ]+ },+ "x_max": {+ "type": "number",+ "required": false,+ "minimum": 0,+ "maximum": 1,+ "desc": "Right edge as a fraction of the image width (0-1).",+ "examples": [+ 0.7+ ]+ },+ "x_min": {+ "type": "number",+ "required": false,+ "minimum": 0,+ "maximum": 1,+ "desc": "Left edge as a fraction of the image width (0-1).",+ "examples": [+ 0.3+ ]+ },+ "y_min": {+ "type": "number",+ "required": false,+ "minimum": 0,+ "maximum": 1,+ "desc": "Top edge as a fraction of the image height (0-1).",+ "examples": [+ 0.4+ ]+ }+ },+ "required": false,+ "desc": "Where the object is in the reference image. Requires `source_image_index`."+ },+ "label": {+ "nullable": true,+ "type": "string",+ "required": false,+ "maxLength": 64,+ "desc": "Short name for the object in this box, e.g. `dragon`. Write `<dragon>` in the prompt to tie the box to those words; a box the prompt doesn't name is added to the scene. Defaults to `obj_<n>`.",+ "examples": [+ "dragon"+ ]+ },+ "description": {+ "type": "string",+ "required": false,+ "maxLength": 500,+ "desc": "What to draw in this box: the object and its look.",+ "examples": [+ "a large fluffy knitted dragon in terracotta and mustard yarn"+ ]+ },+ "target_box": {+ "nullable": true,+ "type": "object",+ "fields": {+ "y_max": {+ "type": "number",+ "required": false,+ "minimum": 0,+ "maximum": 1,+ "desc": "Bottom edge as a fraction of the image height (0-1).",+ "examples": [+ 0.9+ ]+ },+ "x_max": {+ "type": "number",+ "required": false,+ "minimum": 0,+ "maximum": 1,+ "desc": "Right edge as a fraction of the image width (0-1).",+ "examples": [+ 0.7+ ]+ },+ "x_min": {+ "type": "number",+ "required": false,+ "minimum": 0,+ "maximum": 1,+ "desc": "Left edge as a fraction of the image width (0-1).",+ "examples": [+ 0.3+ ]+ },+ "y_min": {+ "type": "number",+ "required": false,+ "minimum": 0,+ "maximum": 1,+ "desc": "Top edge as a fraction of the image height (0-1).",+ "examples": [+ 0.4+ ]+ }+ },+ "required": false,+ "desc": "Where the object goes in the output image. Leave unset to remove a referenced object; set both boxes to move or resize it."+ },+ "source_image_index": {+ "nullable": true,+ "type": "integer",+ "required": false,+ "minimum": 0,+ "desc": "0-based index into `image_urls` of the reference the object comes from. Leave unset for a new object."+ }+ },+ "itemRequired": [+ "description"+ ],+ "maxItems": 32,+ "required": false,+ "desc": "Optional layout, with (0, 0) at the top-left of each image: keep, move, resize or remove objects from the references, or place new ones. Name boxes in the prompt by label, e.g. `<dragon>`."+ }+ },+ "output": "images[].url",+ "price": "Your request will cost $0.012 per megapixel of output. A 1024x1024 image costs $0.012.",+ "pricing": {+ "usd": 0.012,+ "unit": "megapixel"+ },+ "license": "FLUX Kommunity License v1.0: non-commercial use, plus commercial outputs for Qualifying Users under US$5M gross annual revenue (affiliates included); other commercial use needs a BFL licence. Its commercial-use exception is not blanket permission for commercial fine-tuning or distribution. The Qwen3-VL-4B-Instruct text encoder is Apache-2.0",+ "notes": "Send enable_prompt_expansion false with a Fuobe layout; the boxes go as bounding_boxes ({box: {x_min, y_min, x_max, y_max} as 0-1 fractions, label, description}), the prompt naming each box as <label>. image_size takes 256-4096 px a side.",+ "verified": true,+ "sourceUrl": "https://fal.ai/models/blackforestlabs/flux-3/klein/edit-image/lora",+ "schemaUrl": "https://fal.ai/api/openapi/queue/openapi.json?endpoint_id=blackforestlabs/flux-3/klein/edit-image/lora",+ "capability": "edit",+ "fetched": "2026-11-01"+ },+ {+ "family": "flux-3-klein",+ "model": "FLUX 3 Klein Base LoRA",+ "title": "FLUX 3 Klein Base Text to Image LoRA",+ "vendor": "Black Forest Labs",+ "operation": "t2i",+ "provider": "fal",+ "endpoint": "blackforestlabs/flux-3/klein/base/text-to-image/lora",+ "falCategory": "text-to-image",+ "status": "active",+ "keyFields": {+ "prompt": "prompt",+ "aspectRatio": "image_size",+ "seed": "seed",+ "numOutputs": "num_images",+ "enhancePrompt": "enable_prompt_expansion",+ "boundingBoxes": "bounding_boxes",+ "loras": "loras"+ },+ "inputs": {+ "loras": {+ "type": "array",+ "items": "object",+ "itemSchema": {+ "scale": {+ "type": "number",+ "required": false,+ "default": 1,+ "minimum": 0,+ "maximum": 4,+ "desc": "Scale factor for LoRA application (0.0 to 4.0)."+ },+ "path": {+ "type": "string",+ "required": false,+ "desc": "URL to a FLUX 3 Klein LoRA (.safetensors), e.g. from flux-3-image-klein-trainer."+ }+ },+ "itemRequired": [+ "path"+ ],+ "maxItems": 3,+ "required": false,+ "default": [],+ "desc": "LoRA weights to apply (maximum 3)."+ },+ "prompt": {+ "type": "string",+ "required": true,+ "desc": "The prompt to generate an image from. The model is trained on detailed captions: describe framing, subject, background and lighting.",+ "examples": [+ "A red fox standing in fresh snow at sunrise, its breath visible in the cold air. Soft golden light rakes across the snowfield from the left, pine forest softly blurred in the background, shot at eye level with a telephoto lens."+ ]+ },+ "enable_prompt_expansion": {+ "type": "boolean",+ "required": false,+ "default": true,+ "desc": "If set to true, the prompt is expanded into a detailed caption (grounded in the reference images when editing) before generation."+ },+ "seed": {+ "nullable": true,+ "type": "integer",+ "required": false,+ "desc": "The same seed and the same prompt given to the same version of the model will output the same image every time."+ },+ "num_images": {+ "type": "integer",+ "required": false,+ "default": 1,+ "minimum": 1,+ "maximum": 4,+ "desc": "The number of images to generate."+ },+ "enable_safety_checker": {+ "type": "boolean",+ "required": false,+ "default": true,+ "desc": "If set to true, the safety checker will be enabled."+ },+ "output_format": {+ "type": "enum",+ "values": [+ "jpeg",+ "png",+ "webp"+ ],+ "valueType": "string",+ "required": false,+ "default": "png",+ "desc": "The format of the generated image."+ },+ "sync_mode": {+ "type": "boolean",+ "required": false,+ "default": false,+ "desc": "If `True`, the media will be returned as a data URI and the output data won't be available in the request history."+ },+ "image_size": {+ "type": "union",+ "variants": [+ {+ "type": "object",+ "fields": {+ "width": {+ "type": "integer",+ "required": false,+ "default": 512,+ "maximum": 14142,+ "minimumExclusive": 0,+ "desc": "The width of the generated image."+ },+ "height": {+ "type": "integer",+ "required": false,+ "default": 512,+ "maximum": 14142,+ "minimumExclusive": 0,+ "desc": "The height of the generated image."+ }+ },+ "required": false+ },+ {+ "type": "enum",+ "values": [+ "square_hd",+ "square",+ "portrait_4_3",+ "portrait_16_9",+ "landscape_4_3",+ "landscape_16_9"+ ],+ "valueType": "string",+ "required": false+ }+ ],+ "default": "square_hd",+ "desc": "The size of the generated image. Each side can be 256 to 4096 pixels (native 4K)."+ },+ "bounding_boxes": {+ "nullable": true,+ "type": "array",+ "items": "object",+ "itemSchema": {+ "box": {+ "type": "object",+ "fields": {+ "y_max": {+ "type": "number",+ "required": false,+ "minimum": 0,+ "maximum": 1,+ "desc": "Bottom edge as a fraction of the image height (0-1).",+ "examples": [+ 0.9+ ]+ },+ "x_max": {+ "type": "number",+ "required": false,+ "minimum": 0,+ "maximum": 1,+ "desc": "Right edge as a fraction of the image width (0-1).",+ "examples": [+ 0.7+ ]+ },+ "x_min": {+ "type": "number",+ "required": false,+ "minimum": 0,+ "maximum": 1,+ "desc": "Left edge as a fraction of the image width (0-1).",+ "examples": [+ 0.3+ ]+ },+ "y_min": {+ "type": "number",+ "required": false,+ "minimum": 0,+ "maximum": 1,+ "desc": "Top edge as a fraction of the image height (0-1).",+ "examples": [+ 0.4+ ]+ }+ },+ "required": false+ },+ "label": {+ "nullable": true,+ "type": "string",+ "required": false,+ "maxLength": 64,+ "desc": "Short name for the object in this box, e.g. `fox`. Write `<fox>` in the prompt to tie the box to those words; a box the prompt doesn't name is added to the scene. Defaults to `obj_<n>`.",+ "examples": [+ "fox"+ ]+ },+ "description": {+ "type": "string",+ "required": false,+ "maxLength": 500,+ "desc": "What to draw in this box: the object and its look.",+ "examples": [+ "a red fox with thick orange fur and a white-tipped tail"+ ]+ }+ },+ "itemRequired": [+ "description",+ "box"+ ],+ "maxItems": 32,+ "required": false,+ "desc": "Optional layout: draw each described object inside its box. Box edges are fractions of the image size, with (0, 0) at the top-left. Name boxes in the prompt by label, e.g. `A red fox <fox> sits under a red umbrella <umbrella>`."+ }+ },+ "output": "images[].url",+ "price": "Your request will cost $0.035 per megapixel of output. A 1024x1024 image costs $0.035.",+ "pricing": {+ "usd": 0.035,+ "unit": "megapixel"+ },+ "license": "FLUX Kommunity License v1.0: non-commercial use, plus commercial outputs for Qualifying Users under US$5M gross annual revenue (affiliates included); other commercial use needs a BFL licence. Its commercial-use exception is not blanket permission for commercial fine-tuning or distribution. The Qwen3-VL-4B-Instruct text encoder is Apache-2.0",+ "notes": "Send enable_prompt_expansion false with a Fuobe layout; the boxes go as bounding_boxes ({box: {x_min, y_min, x_max, y_max} as 0-1 fractions, label, description}), the prompt naming each box as <label>. image_size takes 256-4096 px a side.",+ "verified": true,+ "sourceUrl": "https://fal.ai/models/blackforestlabs/flux-3/klein/base/text-to-image/lora",+ "schemaUrl": "https://fal.ai/api/openapi/queue/openapi.json?endpoint_id=blackforestlabs/flux-3/klein/base/text-to-image/lora",+ "capability": "t2i",+ "fetched": "2026-11-01"+ },+ {+ "family": "flux-3-klein",+ "model": "FLUX 3 Klein Base LoRA",+ "title": "FLUX 3 Klein Base Edit LoRA",+ "vendor": "Black Forest Labs",+ "operation": "edit",+ "provider": "fal",+ "endpoint": "blackforestlabs/flux-3/klein/base/edit-image/lora",+ "falCategory": "image-to-image",+ "status": "active",+ "keyFields": {+ "prompt": "prompt",+ "aspectRatio": "image_size",+ "seed": "seed",+ "numOutputs": "num_images",+ "enhancePrompt": "enable_prompt_expansion",+ "boundingBoxes": "bounding_boxes",+ "images": "image_urls",+ "loras": "loras"+ },+ "inputs": {+ "loras": {+ "type": "array",+ "items": "object",+ "itemSchema": {+ "scale": {+ "type": "number",+ "required": false,+ "default": 1,+ "minimum": 0,+ "maximum": 4,+ "desc": "Scale factor for LoRA application (0.0 to 4.0)."+ },+ "path": {+ "type": "string",+ "required": false,+ "desc": "URL to a FLUX 3 Klein LoRA (.safetensors), e.g. from flux-3-image-klein-trainer."+ }+ },+ "itemRequired": [+ "path"+ ],+ "maxItems": 3,+ "required": false,+ "default": [],+ "desc": "LoRA weights to apply (maximum 3)."+ },+ "prompt": {+ "type": "string",+ "required": true,+ "desc": "A complete caption of the target image with the edit folded in. Refer to the references by their order: the first image, the second image.",+ "examples": [+ "A miniature grey amigurumi knight figure crocheted from thick woolen yarn stands on a cliff of stacked yarn skeins at night, lit by a full moon, next to a large fluffy knitted dragon in terracotta and mustard yarn, with a soft out-of-focus backdrop of indigo knitted yarn."+ ]+ },+ "enable_prompt_expansion": {+ "type": "boolean",+ "required": false,+ "default": true,+ "desc": "If set to true, the prompt is expanded into a detailed caption (grounded in the reference images when editing) before generation."+ },+ "seed": {+ "nullable": true,+ "type": "integer",+ "required": false,+ "desc": "The same seed and the same prompt given to the same version of the model will output the same image every time."+ },+ "num_images": {+ "type": "integer",+ "required": false,+ "default": 1,+ "minimum": 1,+ "maximum": 4,+ "desc": "The number of images to generate."+ },+ "enable_safety_checker": {+ "type": "boolean",+ "required": false,+ "default": true,+ "desc": "If set to true, the safety checker will be enabled."+ },+ "output_format": {+ "type": "enum",+ "values": [+ "jpeg",+ "png",+ "webp"+ ],+ "valueType": "string",+ "required": false,+ "default": "png",+ "desc": "The format of the generated image."+ },+ "sync_mode": {+ "type": "boolean",+ "required": false,+ "default": false,+ "desc": "If `True`, the media will be returned as a data URI and the output data won't be available in the request history."+ },+ "image_urls": {+ "type": "array",+ "items": "string",+ "minItems": 1,+ "maxItems": 10,+ "required": true,+ "desc": "The reference images to edit or compose from (up to 10).",+ "examples": [+ [+ "https://storage.googleapis.com/falserverless/example_inputs/z-image-turbo-i2i-input.png"+ ]+ ]+ },+ "image_size": {+ "nullable": true,+ "type": "union",+ "variants": [+ {+ "type": "object",+ "fields": {+ "width": {+ "type": "integer",+ "required": false,+ "default": 512,+ "maximum": 14142,+ "minimumExclusive": 0,+ "desc": "The width of the generated image."+ },+ "height": {+ "type": "integer",+ "required": false,+ "default": 512,+ "maximum": 14142,+ "minimumExclusive": 0,+ "desc": "The height of the generated image."+ }+ },+ "required": false+ },+ {+ "type": "enum",+ "values": [+ "square_hd",+ "square",+ "portrait_4_3",+ "portrait_16_9",+ "landscape_4_3",+ "landscape_16_9"+ ],+ "valueType": "string",+ "required": false+ }+ ],+ "desc": "The size of the generated image, 256 to 4096 pixels per side. If not set, a single reference image's own size (scaled to at most 4 megapixels) is used, or the first reference image's size (at most 1 megapixel) when several are given."+ },+ "bounding_boxes": {+ "nullable": true,+ "type": "array",+ "items": "object",+ "itemSchema": {+ "box": {+ "nullable": true,+ "type": "object",+ "fields": {+ "y_max": {+ "type": "number",+ "required": false,+ "minimum": 0,+ "maximum": 1,+ "desc": "Bottom edge as a fraction of the image height (0-1).",+ "examples": [+ 0.9+ ]+ },+ "x_max": {+ "type": "number",+ "required": false,+ "minimum": 0,+ "maximum": 1,+ "desc": "Right edge as a fraction of the image width (0-1).",+ "examples": [+ 0.7+ ]+ },+ "x_min": {+ "type": "number",+ "required": false,+ "minimum": 0,+ "maximum": 1,+ "desc": "Left edge as a fraction of the image width (0-1).",+ "examples": [+ 0.3+ ]+ },+ "y_min": {+ "type": "number",+ "required": false,+ "minimum": 0,+ "maximum": 1,+ "desc": "Top edge as a fraction of the image height (0-1).",+ "examples": [+ 0.4+ ]+ }+ },+ "required": false,+ "desc": "Where the object goes in the output image, as on text-to-image. Use instead of `source_box`/`target_box`."+ },+ "source_box": {+ "nullable": true,+ "type": "object",+ "fields": {+ "y_max": {+ "type": "number",+ "required": false,+ "minimum": 0,+ "maximum": 1,+ "desc": "Bottom edge as a fraction of the image height (0-1).",+ "examples": [+ 0.9+ ]+ },+ "x_max": {+ "type": "number",+ "required": false,+ "minimum": 0,+ "maximum": 1,+ "desc": "Right edge as a fraction of the image width (0-1).",+ "examples": [+ 0.7+ ]+ },+ "x_min": {+ "type": "number",+ "required": false,+ "minimum": 0,+ "maximum": 1,+ "desc": "Left edge as a fraction of the image width (0-1).",+ "examples": [+ 0.3+ ]+ },+ "y_min": {+ "type": "number",+ "required": false,+ "minimum": 0,+ "maximum": 1,+ "desc": "Top edge as a fraction of the image height (0-1).",+ "examples": [+ 0.4+ ]+ }+ },+ "required": false,+ "desc": "Where the object is in the reference image. Requires `source_image_index`."+ },+ "label": {+ "nullable": true,+ "type": "string",+ "required": false,+ "maxLength": 64,+ "desc": "Short name for the object in this box, e.g. `dragon`. Write `<dragon>` in the prompt to tie the box to those words; a box the prompt doesn't name is added to the scene. Defaults to `obj_<n>`.",+ "examples": [+ "dragon"+ ]+ },+ "description": {+ "type": "string",+ "required": false,+ "maxLength": 500,+ "desc": "What to draw in this box: the object and its look.",+ "examples": [+ "a large fluffy knitted dragon in terracotta and mustard yarn"+ ]+ },+ "target_box": {+ "nullable": true,+ "type": "object",+ "fields": {+ "y_max": {+ "type": "number",+ "required": false,+ "minimum": 0,+ "maximum": 1,+ "desc": "Bottom edge as a fraction of the image height (0-1).",+ "examples": [+ 0.9+ ]+ },+ "x_max": {+ "type": "number",+ "required": false,+ "minimum": 0,+ "maximum": 1,+ "desc": "Right edge as a fraction of the image width (0-1).",+ "examples": [+ 0.7+ ]+ },+ "x_min": {+ "type": "number",+ "required": false,+ "minimum": 0,+ "maximum": 1,+ "desc": "Left edge as a fraction of the image width (0-1).",+ "examples": [+ 0.3+ ]+ },+ "y_min": {+ "type": "number",+ "required": false,+ "minimum": 0,+ "maximum": 1,+ "desc": "Top edge as a fraction of the image height (0-1).",+ "examples": [+ 0.4+ ]+ }+ },+ "required": false,+ "desc": "Where the object goes in the output image. Leave unset to remove a referenced object; set both boxes to move or resize it."+ },+ "source_image_index": {+ "nullable": true,+ "type": "integer",+ "required": false,+ "minimum": 0,+ "desc": "0-based index into `image_urls` of the reference the object comes from. Leave unset for a new object."+ }+ },+ "itemRequired": [+ "description"+ ],+ "maxItems": 32,+ "required": false,+ "desc": "Optional layout, with (0, 0) at the top-left of each image: keep, move, resize or remove objects from the references, or place new ones. Name boxes in the prompt by label, e.g. `<dragon>`."+ }+ },+ "output": "images[].url",+ "price": "Your request will cost $0.035 per megapixel of output. A 1024x1024 image costs $0.035.",+ "pricing": {+ "usd": 0.035,+ "unit": "megapixel"+ },+ "license": "FLUX Kommunity License v1.0: non-commercial use, plus commercial outputs for Qualifying Users under US$5M gross annual revenue (affiliates included); other commercial use needs a BFL licence. Its commercial-use exception is not blanket permission for commercial fine-tuning or distribution. The Qwen3-VL-4B-Instruct text encoder is Apache-2.0",+ "notes": "Send enable_prompt_expansion false with a Fuobe layout; the boxes go as bounding_boxes ({box: {x_min, y_min, x_max, y_max} as 0-1 fractions, label, description}), the prompt naming each box as <label>. image_size takes 256-4096 px a side.",+ "verified": true,+ "sourceUrl": "https://fal.ai/models/blackforestlabs/flux-3/klein/base/edit-image/lora",+ "schemaUrl": "https://fal.ai/api/openapi/queue/openapi.json?endpoint_id=blackforestlabs/flux-3/klein/base/edit-image/lora",+ "capability": "edit",+ "fetched": "2026-11-01"+ }]}diff --git a/scripts/fetch-hosted-schemas.py b/scripts/fetch-hosted-schemas.pyindex cc4d81bb..c441a226 100644--- a/scripts/fetch-hosted-schemas.py+++ b/scripts/fetch-hosted-schemas.py@@ -22,6 +22,7 @@ Run: python3 scripts/fetch-hosted-schemas.pypython3 scripts/fetch-hosted-schemas.py --base-only [endpoint …] (Genjutsu's plain endpoints, or O11's / BASE ones by id, the rest kept)python3 scripts/fetch-hosted-schemas.py --partner (partner routes in partnerEndpoints, the rest kept)python3 scripts/fetch-hosted-schemas.py --part4 [endpoint …] (PART4's records in paid-model-apis-4.json, the rest kept)+ python3 scripts/fetch-hosted-schemas.py --new10 (FLUX 3 Klein: NEW10's records in new-models-10.json, its trainers)--part4 re-reads endpoints that research part 4 recorded (docs/research/paid-model-apis-4.json) and refreshes them inplace: their inputs, the price lines of their llms.txt, their status in fal's catalog (active / playground-only, read@@ -175,6 +176,29 @@ PART4 = {}+# Research #10 (build package nm10-flux3-klein): FLUX 3 Image Klein on fal, read with --new10 into docs/research/new-models-10.json+# endpointRecords (part 4's record shape), and its two LoRA trainers into fuobe-originals-recipes-5.json trainers[] (gen-trainers.py's+# source). Klein reads a layout as fal's bounding_boxes (fractions of the picture) and turns prompt expansion off for one.+KLEIN_T2I = {"prompt": "prompt", "aspectRatio": "image_size", "seed": "seed", "numOutputs": "num_images",+ "enhancePrompt": "enable_prompt_expansion", "boundingBoxes": "bounding_boxes"}+KLEIN_EDIT = {**KLEIN_T2I, "images": "image_urls"}+KLEIN_LICENCE = ("FLUX Kommunity License v1.0: non-commercial use, plus commercial outputs for Qualifying Users under US$5M gross annual revenue "+ "(affiliates included); other commercial use needs a BFL licence. Its commercial-use exception is not blanket permission for "+ "commercial fine-tuning or distribution. The Qwen3-VL-4B-Instruct text encoder is Apache-2.0")+NEW10 = {+ "blackforestlabs/flux-3/klein/text-to-image": ("t2i", KLEIN_T2I, "FLUX 3 Klein", "FLUX.3 Klein"),+ "blackforestlabs/flux-3/klein/edit-image": ("edit", KLEIN_EDIT, "FLUX 3 Klein", "FLUX.3 Klein Image Editing"),+ "blackforestlabs/flux-3/klein/text-to-image/lora": ("t2i", {**KLEIN_T2I, "loras": "loras"}, "FLUX 3 Klein LoRA", "FLUX 3 Klein Text to Image LoRA"),+ "blackforestlabs/flux-3/klein/edit-image/lora": ("edit", {**KLEIN_EDIT, "loras": "loras"}, "FLUX 3 Klein LoRA", "FLUX 3 Klein Edit LoRA"),+ "blackforestlabs/flux-3/klein/base/text-to-image/lora": ("t2i", {**KLEIN_T2I, "loras": "loras"}, "FLUX 3 Klein Base LoRA", "FLUX 3 Klein Base Text to Image LoRA"),+ "blackforestlabs/flux-3/klein/base/edit-image/lora": ("edit", {**KLEIN_EDIT, "loras": "loras"}, "FLUX 3 Klein Base LoRA", "FLUX 3 Klein Base Edit LoRA"),+}+NEW10_TRAINERS = {+ "blackforestlabs/flux-3/klein/base/trainer": ("FLUX 3 Klein base", "Soul ID on FLUX 3 Image Klein (nm10-flux3-klein; FLUX Kommunity licence, shown as information)"),+ "blackforestlabs/flux-3/klein/base/trainer/edit": ("FLUX 3 Klein base", "Edit LoRAs from before / after pairs on FLUX 3 Image Klein (recorded; Soul ID trains subjects with the plain trainer)"),+}++def get(url):req = urllib.request.Request(url, headers={"User-Agent": "fuobe-research/1.0"})with urllib.request.urlopen(req, timeout=60) as r:@@ -406,7 +430,88 @@ def trainer_outputs(data):print(f"{ep}: {files}")+def llms_price(ep):+ """The "## Pricing" section of an endpoint's llms.txt, in one line (its later lines price fal's own GPUs)."""+ page = get(f"https://fal.ai/models/{ep}/llms.txt")+ section = re.search(r"(?ims)^## Pricing\s*$(.*?)(?=^## |\Z)", page)+ lines = [l.replace("**", "").strip(" -*") for l in (section.group(1) if section else "").splitlines()]+ return " ".join(l for l in lines if "$" in l) or None+++def trainer_field(s):+ """One OpenAPI field as the trainers[] records write it: "integer default=1000 minimum=100 maximum=10000", enums kept."""+ t = s.get("valueType") if s.get("type") == "enum" else s.get("type", "string")+ out = [str(t).replace("(uri)", "")]+ if "default" in s:+ out.append(f"default={json.dumps(s['default'])}")+ if s.get("type") == "enum":+ out.append(f"enum={json.dumps(s.get('values'))}")+ for k in ("minimum", "maximum"):+ if k in s:+ out.append(f"{k}={s[k]}")+ return " ".join(out)+++def new10():+ """Research #10's FLUX 3 Klein records: its fal endpoints (endpointRecords in new-models-10.json) and LoRA trainers."""+ path = ROOT / "docs/research/new-models-10.json"+ data = json.loads(path.read_text(encoding="utf-8"))+ records = {e["endpoint"]: e for e in data.get("endpointRecords") or []}+ for ep, (op, kf, model, title) in NEW10.items():+ inputs = fal(ep)+ missing = [f for f in kf.values() if f not in inputs]+ if missing:+ sys.exit(f"{ep}: keyFields {missing} are not inputs")+ price = llms_price(ep)+ per_mp = re.search(r"\$(\d+(?:\.\d+)?) per megapixel", price or "")+ tiers = re.findall(r"\$(\d+(?:\.\d+)?) at (\d+(?:\.\d+)?K)\b", price or "")+ if per_mp:+ pricing = {"usd": float(per_mp.group(1)), "unit": "megapixel"}+ elif tiers:+ by_res = {k: float(v) for v, k in tiers}+ pricing = {"usd": by_res.get("1K", float(tiers[0][0])), "unit": "image", "byResolution": by_res}+ else:+ pricing = {"usd": None, "unit": "unknown"}+ records[ep] = {+ "family": "flux-3-klein", "model": model, "title": title, "vendor": "Black Forest Labs", "operation": op, "provider": "fal", "endpoint": ep,+ "falCategory": "text-to-image" if op == "t2i" else "image-to-image", "status": fal_catalog_status(ep), "keyFields": kf,+ "inputs": inputs, "output": "images[].url", "price": price, "pricing": pricing, "license": KLEIN_LICENCE,+ "notes": ("Send enable_prompt_expansion false with a Fuobe layout; the boxes go as bounding_boxes ({box: {x_min, y_min, x_max, y_max} as 0-1 "+ "fractions, label, description}), the prompt naming each box as <label>. image_size takes 256-4096 px a side."),+ "verified": True, "sourceUrl": f"https://fal.ai/models/{ep}", "schemaUrl": f"https://fal.ai/api/openapi/queue/openapi.json?endpoint_id={ep}",+ "capability": op, "fetched": TODAY,+ }+ print(f"{ep}: {records[ep]['status']}, {len(inputs)} inputs, {price}")+ data["endpointRecords"] = list(records.values())+ path.write_text(json.dumps(data, indent=1, ensure_ascii=False) + "\n", encoding="utf-8")+ # The trainers, in trainers[] of the Originals research (scripts/gen-trainers.py reads it).+ raw = json.loads(FILE.read_text(encoding="utf-8"))+ by_id = {t["id"]: t for t in raw["trainers"]}+ for ep, (family, role) in NEW10_TRAINERS.items():+ inputs = fal(ep)+ root = json.loads(get(f"https://fal.ai/api/openapi/queue/openapi.json?endpoint_id={ep}"))+ result = root["paths"][f"/{ep}/requests/{{request_id}}"]["get"]["responses"]["200"]["content"]["application/json"]["schema"]+ lora_out = [k for k in (resolve(result, root).get("properties") or {}) if "lora" in k]+ rec = by_id.get(ep) or {"provider": "fal", "id": ep}+ rec.update({+ "family": family, "role": role, "required": [k for k, s in inputs.items() if s.get("required")],+ "fields": {k: trainer_field(s) for k, s in inputs.items()}, "price": llms_price(ep),+ "baseLicence": "FLUX Kommunity License v1.0 (non-commercial; commercial outputs for Qualifying Users under US$5M revenue)",+ "commercialWeights": None,+ "licenceNote": "Not blanket permission for commercial fine-tuning or distribution (the model card); information, never a gate",+ "status": fal_catalog_status(ep), "schemaUrl": f"https://fal.ai/api/openapi/queue/openapi.json?endpoint_id={ep}", "checked": TODAY,+ "loraOutput": lora_out, "outputChecked": TODAY,+ })+ if ep not in by_id:+ raw["trainers"].append(rec)+ print(f"{ep}: {rec['status']}, fields {list(rec['fields'])}, LoRA in {lora_out}, {rec['price']}")+ FILE.write_text(json.dumps(raw, indent=1, ensure_ascii=False) + "\n", encoding="utf-8")++def main():+ if "--new10" in sys.argv:+ new10()+ returnif "--part4" in sys.argv:part4(sys.argv[sys.argv.index("--part4") + 1:])returndiff --git a/scripts/gen-cloud-models.py b/scripts/gen-cloud-models.pyindex 6a518e12..4fa13926 100644--- a/scripts/gen-cloud-models.py+++ b/scripts/gen-cloud-models.py@@ -2,7 +2,7 @@"""Generate src/lib/catalog/cloud-models.generated.ts from docs/research/paid-model-apis.json(merged with parts 2, 3 and 4: paid-model-apis-2.json, paid-model-apis-3.json, paid-model-apis-4.json, and the-endpointRecords of research #7, new-models-7.json).+endpointRecords of research #7 and #10, new-models-7.json and new-models-10.json).The research file holds verified fal/Replicate input schemas (field names, enums, defaults,prices). This script turns a curated list of models (MODELS below) into ModelDef objects with@@ -44,6 +44,12 @@ NEW_MODELS_7 = json.loads((ROOT / "docs/research/new-models-7.json").read_text(efor e in NEW_MODELS_7.get("endpointRecords") or []:prev = EPS.get((e["provider"], e["endpoint"]))EPS[(e["provider"], e["endpoint"])] = {**e, "keyFields": {**((prev or {}).get("keyFields") or {}), **(e.get("keyFields") or {})}}+# Research #10 (docs/research/new-models-10.json endpointRecords, read by scripts/fetch-hosted-schemas.py --new10): FLUX 3 Image+# Klein's fal routes, their /lora twins and Klein Base's LoRA routes (package nm10-flux3-klein). Same merge.+NEW_MODELS_10 = json.loads((ROOT / "docs/research/new-models-10.json").read_text(encoding="utf-8"))+for e in NEW_MODELS_10.get("endpointRecords") or []:+ prev = EPS.get((e["provider"], e["endpoint"]))+ EPS[(e["provider"], e["endpoint"])] = {**e, "keyFields": {**((prev or {}).get("keyFields") or {}), **(e.get("keyFields") or {})}}# Originals (docs/research/fuobe-originals-recipes-5.json): the hosted open-weight endpoints that take LoRAs# (hostedLoraEndpoints: the LoRA field's shape, maximum and whether it's required, plus the full inputs where@@ -83,7 +89,7 @@ M = []def model(id, name, vendor, family, kind, tagline, routes, badges=None, pricing=None, defaults=None, options=None, fixed=None, hidden=False,sliders=None, controls=None, api_defaults=None, formats=None, ranged_durations=False, fit_values=False, fps_targets=None, upscale_tiers=None,frame_step=None, original=False, sizes=None, keep_shape=False, licence=None, frame_fps=None, frame_multiple=None,- exact_size=False):+ exact_size=False, tier_size=None):"""sliders / controls: [(field, label)] read from each route's research inputs (dotted = nested field; a slider'sthird item is its step, when the generic one is too coarse):numeric fields with minimum/maximum become sliders, enums become composer controls; both travel as params.extra.@@ -110,6 +116,9 @@ def model(id, name, vendor, family, kind, tagline, routes, badges=None, pricing=exact_size: the API takes its size as one {width, height} object and rounds it itself ("rounded to multiples of 16between 512 and 2048 pixels": fal's MOSS-Image): FieldMap.size from the aspect ratio with the grid and limits the field'sdescription states, so a layout drawn on that canvas is the picture the API makes.+ tier_size: the endpoint whose price names resolution tiers ("$0.009 at 1K … $0.036 at 4K": fal's FLUX 3 Klein): the size goes+ as one {width, height} object, the aspect ratio's shape on the tier's square (FieldMap.size.bases), on a 16 px grid within+ the limits the field's description states ("256 to 4096 pixels"); the tiers become the resolutions.A route's options dict may also set max_images (FieldMap.maxImages), note, loraEndpoint (the same model with LoRAs:FieldMap.loras comes from its research record) and pin (a Replicate model run by version: the research's version)."""M.append(dict(id=id, name=name, vendor=vendor, family=family, kind=kind, tagline=tagline, routes=routes,@@ -117,7 +126,7 @@ def model(id, name, vendor, family, kind, tagline, routes, badges=None, pricing=sliders=sliders or [], controls=controls or [], api_defaults=api_defaults or {}, formats=formats or {},ranged_durations=ranged_durations, fit_values=fit_values, fps_targets=fps_targets or [], upscale_tiers=upscale_tiers or [],frame_step=frame_step, original=original, sizes=sizes, keep_shape=keep_shape, licence=licence, frame_fps=frame_fps,- frame_multiple=frame_multiple, exact_size=exact_size))+ frame_multiple=frame_multiple, exact_size=exact_size, tier_size=tier_size))# ----- Image@@ -209,6 +218,25 @@ model("moss-image", "MOSS-Image", "OpenMOSS", "moss", "image",licence={"licence": re.match(r"[\w.-]+", MOSS_FAL["license"]).group(0), "commercial": True,"note": f"{MOSS_FAL['license']}. fal's safety checker returns a black image when it flags an output","checked": MOSS_FAL["fetched"]})+# FLUX 3 Image Klein (research #10 §6.3, package nm10-flux3-klein): BFL's open 5.6B model on fal, priced per image by tier+# ($0.009 at 1K … $0.036 at 4K, fal's planned rates); a run with LoRAs goes to its /lora twin ($0.012 per megapixel, up to 3 LoRAs+# at 0-4). FLUX 3 Klein Base (the checkpoint BFL and fal's trainer train LoRAs on, which fal recommends running them on) has LoRA+# routes only, $0.035 per megapixel. A layout goes as bounding_boxes with prompt expansion off. Licence: information, never a gate.+KLEIN_FAL = "blackforestlabs/flux-3/klein"+KLEIN_REC = next(e for e in NEW_MODELS_10["endpointRecords"] if e["endpoint"] == f"{KLEIN_FAL}/text-to-image")+KLEIN_LICENCE = {"licence": KLEIN_REC["license"].split(":")[0], "commercial": None, "note": KLEIN_REC["license"], "checked": KLEIN_REC["fetched"]}+model("flux-3-klein", "FLUX 3 Klein", "Black Forest Labs", "flux", "image",+ "BFL's open 5.6B model: text to image, edits with up to 10 references, layout boxes",+ [("t2i", f"{KLEIN_FAL}/text-to-image", "fal", {"loraEndpoint": f"{KLEIN_FAL}/text-to-image/lora"}),+ ("edit", f"{KLEIN_FAL}/edit-image", "fal", {"loraEndpoint": f"{KLEIN_FAL}/edit-image/lora"})],+ badges=["new"], defaults={"aspectRatio": "1:1", "resolution": "1K"}, tier_size=f"{KLEIN_FAL}/text-to-image", options={"layout": "flux3"},+ pricing=("image", KLEIN_REC["pricing"]["usd"], "per image at 1K (fal's planned rates by size)", {"byResolution": KLEIN_REC["pricing"]["byResolution"]}),+ licence=KLEIN_LICENCE)+model("flux-3-klein-base", "FLUX 3 Klein Base with LoRAs", "Black Forest Labs", "flux", "image",+ "The undistilled Klein your FLUX 3 Klein LoRAs are trained on: text to image and edits with them",+ [("t2i", f"{KLEIN_FAL}/base/text-to-image/lora"), ("edit", f"{KLEIN_FAL}/base/edit-image/lora")],+ badges=["new"], defaults={"aspectRatio": "1:1", "resolution": "1K"}, tier_size=f"{KLEIN_FAL}/text-to-image", options={"layout": "flux3"},+ licence=KLEIN_LICENCE)model("wan-2-7-image", "Wan 2.7 Image", "Alibaba Wan", "wan", "image","Wan's image model — cinematic stills that animate well",[("t2i", "fal-ai/wan/v2.7/pro/text-to-image"), ("edit", "fal-ai/wan/v2.7/pro/edit")], defaults={"aspectRatio": "16:9"})@@ -1896,6 +1924,22 @@ def build_route(op, ep, provider, m, opts, ropts=None):opts["aspectRatios"] = union(opts.get("aspectRatios", []), IMG_AR)else:warn(f"{m['id']}: {ep} states no size grid and limits for its {key} object")+ elif m.get("tier_size"):+ # Resolution tiers from the price line of the endpoint named ("$0.009 at 1K"): each tier's square, the aspect ratio's+ # shape on it, as one {width, height} object within the limits the size field states (FieldMap.size.bases).+ key = kf.get("aspectRatio") or "image_size"+ spec = inputs.get(key) or {}+ takes_object = spec.get("type") == "union" and any(isinstance(v, dict) and v.get("type") == "object" for v in spec.get("variants") or [])+ lim = re.search(r"(\d+) to (\d+) pixels", spec.get("desc") or "")+ tiers = re.findall(r"\$\d+(?:\.\d+)? at (\d+(?:\.\d+)?)K\b", (EPS.get((provider, m["tier_size"])) or {}).get("price") or "")+ if takes_object and lim and tiers:+ bases = {f"{t}K": int(float(t) * 1024) for t in tiers}+ fmap["size"] = {"key": key, "multiple": 16, "min": int(lim.group(1)), "max": int(lim.group(2)), "bases": bases}+ kf.pop("aspectRatio", None)+ opts["aspectRatios"] = union(opts.get("aspectRatios", []), IMG_AR)+ opts["resolutions"] = union(opts.get("resolutions", []), list(bases))+ else:+ warn(f"{m['id']}: {ep} states no size limits for its {key} object, or {m['tier_size']} no tiers")part4_slots(op, kf, inputs, m, opts, fmap)# Frame rates an upscaler (or FPS Boost) can reach: params.targetFps -> its target_fps field.if m.get("fps_targets") and op in ("interpolate", "upscale-video"):@@ -2037,6 +2081,11 @@ def build_route(op, ep, provider, m, opts, ropts=None):pe = kf.get("enhancePrompt") or ("enable_prompt_expansion" if "enable_prompt_expansion" in inputs else None)if pe and (inputs.get(pe) or {}).get("type") == "boolean":fmap["promptExpansion"] = pe+ # A layout the API takes as boxes of its own (fal's FLUX 3 Klein bounding_boxes: fractions of the picture, a label the+ # prompt names as <label>): FieldMap.boundingBoxes, filled by the plan from the draft.+ bb = kf.get("boundingBoxes")+ if bb and (inputs.get(bb) or {}).get("type") == "array" and {"box", "label", "description"} <= set((inputs[bb].get("itemSchema") or {})):+ fmap["boundingBoxes"] = {"key": bb, **({"max": int(num(inputs[bb]["maxItems"]))} if num(inputs[bb].get("maxItems")) else {})}# LoRAs (O1): the field the route's LoRA endpoint (or the endpoint itself) takes them in, from the research.# Read before the required-inputs check below: an endpoint whose LoRAs are required (MiniMax H3's /lora) fills them here.lora_ep = ropts.get("loraEndpoint")@@ -2160,6 +2209,10 @@ for m in M:lp = parse_price(le)if lp and lp["unit"] == pricing["unit"]:pricing["withLoras"] = lp["usd"]+ elif lp and lp["unit"] == "megapixel" and pricing["unit"] == "image" and m.get("tier_size"):+ # Priced per image by tier, its /lora twin per megapixel (fal's FLUX 3 Klein): a run with LoRAs costs the twin's+ # rate times the megapixels of the size sent. (Fuobe Try-On's hand price already counts its LoRA.)+ pricing["withLorasPerMegapixel"] = lp["usd"]elif (le.get("pricing") or {}).get("unit") == "unknown":# No published price (fal's MOSS-Image /lora shows "$0 per compute second"): a run with LoRAs is priced as# unknown, never as free.diff --git a/scripts/gen-trainers.py b/scripts/gen-trainers.pyindex 14bf2271..82ff0e10 100644--- a/scripts/gen-trainers.py+++ b/scripts/gen-trainers.py@@ -40,6 +40,8 @@ USED = {"fal-ai/flux-2-trainer-v2": ["steps", "default_caption", "learning_rate"],"fal-ai/flux-lora-portrait-trainer": ["steps", "trigger_phrase", "learning_rate"],"fal-ai/krea-2-trainer": ["steps", "trigger_phrase", "learning_rate"],+ # FLUX 3 Image Klein's own trainer (nm10-flux3-klein): it trains on Klein Base; read by fetch-hosted-schemas.py --new10.+ "blackforestlabs/flux-3/klein/base/trainer": ["steps", "trigger_phrase", "learning_rate"],}# Where each trainer's dataset zip goes (the first of these its schema requires).DATA_FIELDS = ("image_data_url", "images_data_url", "training_data_url")@@ -93,16 +95,18 @@ def pricing(text):(r"\$(\d[\d,]*(?:\.\d+)?) per 1000-step", 1000),(r"\$(\d[\d,]*(?:\.\d+)?) for 1,000 requested steps", 1000),(r"\$(\d[\d,]*(?:\.\d+)?) per steps?\b", 1),+ (r"\$(\d[\d,]*(?:\.\d+)?) per training steps?\b", 1),(r"(\d+(?:\.\d+)?) \* steps", 1),):m = re.search(pat, t)if m:per = float(m.group(1).replace(",", "")) / divbreak- if per is None:+ # A price that grows with something else as well (the Klein edit trainer's references per pair) has no one rate per step.+ if per is None or re.search(r"multiplied by", t):return Nonefloor = 1- for pat in (r"(\d[\d,]*) step floor", r"minimum of (\d[\d,]*) steps", r"(\d[\d,]*) steps is the minimum"):+ for pat in (r"(\d[\d,]*) step floor", r"minimum of (\d[\d,]*) steps", r"(\d[\d,]*) steps is the minimum", r"minimum (\d[\d,]*) steps"):m = re.search(pat, t)if m:floor = int(m.group(1).replace(",", ""))diff --git a/src/lib/catalog/cloud-models.generated.ts b/src/lib/catalog/cloud-models.generated.tsindex f9f35498..f614afea 100644--- a/src/lib/catalog/cloud-models.generated.ts+++ b/src/lib/catalog/cloud-models.generated.ts@@ -1759,6 +1759,262 @@ export const CLOUD_MODELS: ModelDef[] = ["lorasUnknown": true}},+ {+ "id": "flux-3-klein",+ "name": "FLUX 3 Klein",+ "vendor": "Black Forest Labs",+ "family": "flux",+ "engine": "cloud",+ "kind": "image",+ "tagline": "BFL's open 5.6B model: text to image, edits with up to 10 references, layout boxes",+ "routes": [+ {+ "op": "t2i",+ "provider": "fal",+ "endpoint": "blackforestlabs/flux-3/klein/text-to-image",+ "map": {+ "numOutputs": "num_images",+ "seed": "seed",+ "size": {+ "key": "image_size",+ "multiple": 16,+ "min": 256,+ "max": 4096,+ "bases": {+ "1K": 1024,+ "1.5K": 1536,+ "2K": 2048,+ "4K": 4096+ }+ },+ "promptExpansion": "enable_prompt_expansion",+ "boundingBoxes": {+ "key": "bounding_boxes",+ "max": 32+ },+ "loras": {+ "shape": "items",+ "key": "loras",+ "max": 3,+ "range": {+ "min": 0,+ "max": 4+ }+ }+ },+ "loraEndpoint": "blackforestlabs/flux-3/klein/text-to-image/lora"+ },+ {+ "op": "edit",+ "provider": "fal",+ "endpoint": "blackforestlabs/flux-3/klein/edit-image",+ "map": {+ "images": "image_urls",+ "numOutputs": "num_images",+ "seed": "seed",+ "size": {+ "key": "image_size",+ "multiple": 16,+ "min": 256,+ "max": 4096,+ "bases": {+ "1K": 1024,+ "1.5K": 1536,+ "2K": 2048,+ "4K": 4096+ }+ },+ "promptExpansion": "enable_prompt_expansion",+ "boundingBoxes": {+ "key": "bounding_boxes",+ "max": 32+ },+ "loras": {+ "shape": "items",+ "key": "loras",+ "max": 3,+ "range": {+ "min": 0,+ "max": 4+ }+ }+ },+ "loraEndpoint": "blackforestlabs/flux-3/klein/edit-image/lora"+ }+ ],+ "options": {+ "aspectRatios": [+ "1:1",+ "4:3",+ "3:4",+ "16:9",+ "9:16",+ "3:2",+ "2:3",+ "21:9",+ "5:4",+ "4:5"+ ],+ "resolutions": [+ "1K",+ "1.5K",+ "2K",+ "4K"+ ],+ "seed": true,+ "maxOutputs": 4,+ "maxImages": 10,+ "layout": "flux3"+ },+ "badges": [+ "new"+ ],+ "licence": {+ "licence": "FLUX Kommunity License v1.0",+ "commercial": null,+ "note": "FLUX Kommunity License v1.0: non-commercial use, plus commercial outputs for Qualifying Users under US$5M gross annual revenue (affiliates included); other commercial use needs a BFL licence. Its commercial-use exception is not blanket permission for commercial fine-tuning or distribution. The Qwen3-VL-4B-Instruct text encoder is Apache-2.0",+ "checked": "2026-11-01"+ },+ "defaults": {+ "aspectRatio": "1:1",+ "resolution": "1K"+ },+ "pricing": {+ "unit": "image",+ "usd": 0.009,+ "note": "per image at 1K (fal's planned rates by size)",+ "byResolution": {+ "1K": 0.009,+ "1.5K": 0.011,+ "2K": 0.014,+ "4K": 0.036+ },+ "withLorasPerMegapixel": 0.012+ }+ },+ {+ "id": "flux-3-klein-base",+ "name": "FLUX 3 Klein Base with LoRAs",+ "vendor": "Black Forest Labs",+ "family": "flux",+ "engine": "cloud",+ "kind": "image",+ "tagline": "The undistilled Klein your FLUX 3 Klein LoRAs are trained on: text to image and edits with them",+ "routes": [+ {+ "op": "t2i",+ "provider": "fal",+ "endpoint": "blackforestlabs/flux-3/klein/base/text-to-image/lora",+ "map": {+ "numOutputs": "num_images",+ "seed": "seed",+ "size": {+ "key": "image_size",+ "multiple": 16,+ "min": 256,+ "max": 4096,+ "bases": {+ "1K": 1024,+ "1.5K": 1536,+ "2K": 2048,+ "4K": 4096+ }+ },+ "promptExpansion": "enable_prompt_expansion",+ "boundingBoxes": {+ "key": "bounding_boxes",+ "max": 32+ },+ "loras": {+ "shape": "items",+ "key": "loras",+ "max": 3,+ "range": {+ "min": 0,+ "max": 4+ }+ }+ }+ },+ {+ "op": "edit",+ "provider": "fal",+ "endpoint": "blackforestlabs/flux-3/klein/base/edit-image/lora",+ "map": {+ "images": "image_urls",+ "numOutputs": "num_images",+ "seed": "seed",+ "size": {+ "key": "image_size",+ "multiple": 16,+ "min": 256,+ "max": 4096,+ "bases": {+ "1K": 1024,+ "1.5K": 1536,+ "2K": 2048,+ "4K": 4096+ }+ },+ "promptExpansion": "enable_prompt_expansion",+ "boundingBoxes": {+ "key": "bounding_boxes",+ "max": 32+ },+ "loras": {+ "shape": "items",+ "key": "loras",+ "max": 3,+ "range": {+ "min": 0,+ "max": 4+ }+ }+ }+ }+ ],+ "options": {+ "aspectRatios": [+ "1:1",+ "4:3",+ "3:4",+ "16:9",+ "9:16",+ "3:2",+ "2:3",+ "21:9",+ "5:4",+ "4:5"+ ],+ "resolutions": [+ "1K",+ "1.5K",+ "2K",+ "4K"+ ],+ "seed": true,+ "maxOutputs": 4,+ "maxImages": 10,+ "layout": "flux3"+ },+ "badges": [+ "new"+ ],+ "licence": {+ "licence": "FLUX Kommunity License v1.0",+ "commercial": null,+ "note": "FLUX Kommunity License v1.0: non-commercial use, plus commercial outputs for Qualifying Users under US$5M gross annual revenue (affiliates included); other commercial use needs a BFL licence. Its commercial-use exception is not blanket permission for commercial fine-tuning or distribution. The Qwen3-VL-4B-Instruct text encoder is Apache-2.0",+ "checked": "2026-11-01"+ },+ "defaults": {+ "aspectRatio": "1:1",+ "resolution": "1K"+ },+ "pricing": {+ "unit": "megapixel",+ "usd": 0.035+ }+ },{"id": "wan-2-7-image","name": "Wan 2.7 Image",diff --git a/src/lib/catalog/payload.ts b/src/lib/catalog/payload.tsindex 74bc7181..dda9dd08 100644--- a/src/lib/catalog/payload.ts+++ b/src/lib/catalog/payload.ts@@ -120,7 +120,8 @@ export function framedLength(f: FieldMap["numFrames"] | undefined, seconds: numb/*** Width and height for an aspect ratio (FieldMap.size): the table's size for the tier and shape when it has one- * (Fuobe Soul: its first tier when the tier is unknown), else the shape on a `base`×`base` pixel budget; or the size+ * (Fuobe Soul: its first tier when the tier is unknown), else the shape on a `base`×`base` pixel budget (the tier's own square+ * when `bases` names it: fal's FLUX 3 Klein 2K is 2048 × 2048); or the size* the request asks for (`asked`: a layout's canvas) on the route's grid. Neither side above `max` (Replicate's Z-Image* takes 1440) nor below `min` (fal's MOSS-Image takes 512–2048): the shape is scaled to fit, then a side that still* can't keep it is held at the limit.@@ -131,7 +132,7 @@ export function sizeValue(resolution?: string,asked?: { width: number; height: number },): { width: number; height: number } {- const base = f.base ?? 1024;+ const base = (resolution !== undefined ? f.bases?.[resolution] : undefined) ?? f.base ?? 1024;const ratio = (aspectRatio && ratioOf(aspectRatio)) || 1;const round = (v: number) => Math.max(f.multiple, Math.round(v / f.multiple) * f.multiple);const tier = f.table && (f.table[resolution ?? ""] ?? Object.values(f.table)[0]);diff --git a/src/lib/catalog/plan.ts b/src/lib/catalog/plan.tsindex 45a07f7f..b4d6f661 100644--- a/src/lib/catalog/plan.ts+++ b/src/lib/catalog/plan.ts@@ -17,7 +17,7 @@ import { anglesPrompt, anglesWords, ANGLES_ORIGINAL } from "./open-tools";import { askedSize, clipWords, numFramesValue, sizeValue } from "./payload";import { characterScale, CINEMA_CROP, soulKind, soulMegapixels, soulRecipe, soulSize, type SoulOverlay } from "./soul";import { computeDimensions, fitCanvas } from "@/lib/comfy";-import { carriesLayout, layoutCompilerFor, LAYOUT_MAX_SIDE, LAYOUT_MULTIPLE, LAYOUT_PARAM, readLayout, validateLayout, type LayoutDraft, type LayoutFormat } from "@/lib/layout-prompt";+import { carriesLayout, flux3Boxes, flux3Caption, layoutCompilerFor, LAYOUT_MAX_SIDE, LAYOUT_MULTIPLE, LAYOUT_PARAM, readLayout, validateLayout, type LayoutDraft, type LayoutFormat } from "@/lib/layout-prompt";import { pricingOn, type PriceClock } from "./promo";import { presetRoutes } from "./preset-recipe-routes";@@ -612,10 +612,17 @@ function planLayout(model: ModelDef, op: Operation, prompt: string, drawn: Layouconst canvas = layoutCanvas(model, params, op);// Only a pixel layout depends on the canvas (its sides on MOSS's 16 px grid); the others place boxes on a 0-1000 grid or in words.const checkedAt = pixels ? canvas : { width: 1024, height: 1024 };- const problem = validateLayout(draft, checkedAt.width, checkedAt.height, format ?? "words").find((i) => i.level === "error");+ // A route that takes the boxes as a field of their own (fal's FLUX 3 Klein bounding_boxes) gets them there, and the+ // caption that names them as its prompt; everything else reads the boxes in its prompt.+ const boxes = routesFor(model, op)[0]?.map?.boundingBoxes;+ const problem = validateLayout(draft, checkedAt.width, checkedAt.height, boxes ? "flux3-boxes" : (format ?? "words")).find((i) => i.level === "error");if (problem) throw new Error(problem.message);- const compiled = layoutCompilerFor(model)(draft, canvas.width, canvas.height);+ const compiled = boxes && draft.items.length ? { format: "flux3" as const, prompt: flux3Caption(draft) } : layoutCompilerFor(model)(draft, canvas.width, canvas.height);const extra: Record<string, unknown> = { ...params.extra };+ if (boxes) {+ if (draft.items.length) extra[boxes.key] = flux3Boxes(draft).slice(0, boxes.max);+ else delete extra[boxes.key];+ }if (pixels && draft.items.length) {const route = routesFor(model, op)[0];const key = (route?.map?.size ?? route?.preview?.size)?.key;@@ -1006,6 +1013,8 @@ export function estimateCost(model: ModelDef, params: GenParams, jobs = 1, op?:// A talking avatar is as long as its voice (params.sourceDuration: the voice's header, read by the studio or the server).const voice = op === "avatar" && params.sourceDuration && params.sourceDuration > 0 ? avatarSeconds(model, params.sourceDuration, params.fps) : undefined;if (p.unit === "image") per = usd * n;+ // Per image by tier, but per megapixel with LoRAs (fal's FLUX 3 Klein /lora): the route's size in megapixels.+ if (withLoras && p.withLorasPerMegapixel !== undefined) per = p.withLorasPerMegapixel * (routeMegapixels(model, params, op) ?? sentMegapixels(params) ?? 1) * n;// Per megapixel of every image made: Soul's sizes are known (about 1 or 2 MP), so is a size sent as fal's image_size// {width, height} (Fuobe Mixed Media's frames); other models are taken as 1 MP.if (p.unit === "megapixel") {diff --git a/src/lib/catalog/trainers.generated.ts b/src/lib/catalog/trainers.generated.tsindex ae879b3a..3cf3780b 100644--- a/src/lib/catalog/trainers.generated.ts+++ b/src/lib/catalog/trainers.generated.ts@@ -1386,5 +1386,103 @@ export const HOSTED_TRAINERS: HostedTrainer[] = ["priceText": "Your request will cost $0.0048 per step. For example, the default 2000-step training will cost $9.60.","usdPerStep": 0.0048,"minBilledSteps": 1+ },+ {+ "id": "blackforestlabs/flux-3/klein/base/trainer",+ "provider": "fal",+ "family": "FLUX 3 Klein base",+ "base": "flux-3-klein-base",+ "media": "image",+ "role": "Soul ID on FLUX 3 Image Klein (nm10-flux3-klein; FLUX Kommunity licence, shown as information)",+ "dataField": "images_data_url",+ "loraOutput": [+ "lora_file"+ ],+ "fields": {+ "images_data_url": {+ "type": "string"+ },+ "learning_rate": {+ "type": "number",+ "default": 0.0001,+ "min": 1e-06,+ "max": 0.01+ },+ "resolution": {+ "type": "integer",+ "enum": [+ 512,+ 768,+ 1024+ ],+ "default": 1024+ },+ "steps": {+ "type": "integer",+ "default": 1000,+ "min": 100,+ "max": 10000+ },+ "trigger_phrase": {+ "type": "string",+ "default": ""+ }+ },+ "licence": "FLUX Kommunity License v1.0 (non-commercial; commercial outputs for Qualifying Users under US$5M revenue)",+ "commercial": null,+ "status": "active",+ "checked": "2026-11-01",+ "schemaUrl": "https://fal.ai/api/openapi/queue/openapi.json?endpoint_id=blackforestlabs/flux-3/klein/base/trainer",+ "priceText": "Your request will cost $0.0043 per training step (minimum 100 steps). The default 1000 steps cost $4.30.",+ "usdPerStep": 0.0043,+ "minBilledSteps": 100+ },+ {+ "id": "blackforestlabs/flux-3/klein/base/trainer/edit",+ "provider": "fal",+ "family": "FLUX 3 Klein base",+ "base": "flux-3-klein-base",+ "media": "image",+ "role": "Edit LoRAs from before / after pairs on FLUX 3 Image Klein (recorded; Soul ID trains subjects with the plain trainer)",+ "dataField": "images_data_url",+ "loraOutput": [+ "lora_file"+ ],+ "fields": {+ "images_data_url": {+ "type": "string"+ },+ "learning_rate": {+ "type": "number",+ "default": 0.0001,+ "min": 1e-06,+ "max": 0.01+ },+ "resolution": {+ "type": "integer",+ "enum": [+ 512,+ 768,+ 1024+ ],+ "default": 1024+ },+ "steps": {+ "type": "integer",+ "default": 1000,+ "min": 100,+ "max": 10000+ },+ "trigger_phrase": {+ "type": "string",+ "default": ""+ }+ },+ "licence": "FLUX Kommunity License v1.0 (non-commercial; commercial outputs for Qualifying Users under US$5M revenue)",+ "commercial": null,+ "status": "active",+ "checked": "2026-11-01",+ "schemaUrl": "https://fal.ai/api/openapi/queue/openapi.json?endpoint_id=blackforestlabs/flux-3/klein/base/trainer/edit",+ "priceText": "Your request will cost $0.002 per training step, multiplied by the reference images per pair: x2.11 with 1, x3.44 with 2, x5.09 with 3, x6.95 with 4 (up to x23.44 with 10). 1000 steps cost $4.22 with 1 reference image and $13.90 with 4."}];diff --git a/src/lib/catalog/types.ts b/src/lib/catalog/types.tsindex 03086f25..e76bf86b 100644--- a/src/lib/catalog/types.ts+++ b/src/lib/catalog/types.ts@@ -464,6 +464,8 @@ export interface FieldMap {max?: number;min?: number;base?: number;+ /** The square each resolution tier is (fal's FLUX 3 Klein: 1K = 1024 … 4K = 4096), over `base`. */+ bases?: Record<string, number>;/** Exact sizes per resolution tier and aspect ratio (Fuobe Soul's table); the computed size where it has none. */table?: Record<string, Record<string, [number, number]>>;};@@ -480,6 +482,12 @@ export interface FieldMap {* layout (params.extra.layout), which expansion would rewrite; a plain prompt leaves the API's default.*/promptExpansion?: string;+ /**+ * A layout the API takes as boxes of its own (fal's FLUX 3 Klein bounding_boxes: {label, description, box: {x_min, y_min,+ * x_max, y_max} as 0-1 fractions}, at most `max`): the plan writes them into params.extra[key] from the draft, and the+ * prompt names each box as <label> (src/lib/layout-prompt.ts flux3Boxes).+ */+ boundingBoxes?: { key: string; max?: number };/*** A camera path (params.cameraPath, build plan N7-5) as the API's keyframes [{time, azimuth, elevation, distance}]:* `min`–`max` of them, the height kept inside `elevation`, at most `maxTurns` turns of travel. `free`: the API's fixed@@ -682,6 +690,11 @@ export interface Pricing {factors?: { param: string; values: Record<string, number> }[];/** The price per unit when the run carries LoRAs and goes to the route's LoRA endpoint (fal's /lora variants cost more). */withLoras?: number;+ /**+ * The LoRA endpoint bills per megapixel of what it makes while the plain one bills per image (fal's FLUX 3 Klein: $0.012+ * per megapixel with LoRAs): a run with LoRAs costs this times the megapixels of the size the route sends.+ */+ withLorasPerMegapixel?: number;/** The LoRA endpoint publishes no price yet (fal's MOSS-Image /lora): a run with LoRAs is priced as unknown, never as free. */lorasUnknown?: true;/** withLoras at each resolution, when it differs (Fuobe Cinema's LTX-2.3 bills per megapixel of video). */diff --git a/src/lib/layout-prompt.ts b/src/lib/layout-prompt.tsindex a6e6804e..8765d901 100644--- a/src/lib/layout-prompt.ts+++ b/src/lib/layout-prompt.ts@@ -428,7 +428,8 @@ export function parseLayout(input: string | object, canvas: { width: number; hei// ---------------------------------------------------------------------------// Checks-export type LayoutTarget = LayoutFormat | "words" | "mosi";+/** What a layout is checked for: a model's form, plain words, MOSI, or fal's FLUX 3 Klein boxes ("flux3-boxes"). */+export type LayoutTarget = LayoutFormat | "words" | "mosi" | "flux3-boxes";export interface LayoutIssue {level: "error" | "warning";@@ -458,6 +459,13 @@ export function validateLayout(draft: LayoutDraft, width: number, height: numberif (Math.max(width, height) > LAYOUT_MAX_SIDE || width * height > LAYOUT_MAX_PIXELS) {issues.push({ level: "warning", message: `${width} × ${height} is past what MOSS-Image was made for (${LAYOUT_MAX_SIDE} px a side, 4 megapixels): the boxes may drift` });}+ // fal's FLUX 3 Klein boxes ("flux3-boxes"): 32 at most, each described in up to 500 characters.+ if (target === "flux3-boxes") {+ if (draft.items.length > FLUX3_BOX_LIMITS.boxes) issues.push({ level: "error", message: `FLUX 3 Klein takes up to ${FLUX3_BOX_LIMITS.boxes} boxes (this layout has ${draft.items.length})` });+ draft.items.forEach((it, i) => {+ if (flux3Desc(it).length > FLUX3_BOX_LIMITS.description) issues.push({ level: "error", message: `Box ${i + 1}'s words are past the ${FLUX3_BOX_LIMITS.description} characters FLUX 3 Klein reads for a box: shorten them`, item: i });+ });+ }const limit = LAYOUT_PROMPT_LIMITS[target];if (limit && !issues.some((x) => x.level === "error")) {const compiled = target === "ideogram" ? compileIdeogram(draft) : compileMoss(draft, width, height);@@ -509,14 +517,48 @@ function itemWords(it: LayoutItem): string {* table [{"id": "obj_N", "bbox": [0-1000, y before x], "desc": …}] with a text box's words quoted after its desc.*/export function compileFlux3(draft: LayoutDraft): string {+ const caption = flux3Caption(draft);+ if (!draft.items.length) return caption;+ const rows = draft.items.map((it, i) => ({ id: flux3Label(i), bbox: gridBox(it.box), desc: flux3Desc(it) }));+ return `${caption} ${pyJson(rows)}`;+}++/** A FLUX.3 box's id, the <id> the caption names it by: obj_1, obj_2… */+const flux3Label = (i: number) => `obj_${i + 1}`;++/** What a FLUX.3 box holds: its caption, with a text box's words quoted after it. */+const flux3Desc = (it: LayoutItem) => (it.label === "text" && it.text ? `${it.caption} "${it.text}"`.trim() : it.caption);++/**+ * The words of FLUX.3's layout prompt without its table: the caption, then a sentence citing each box as <obj_N>. The+ * prompt fal's FLUX 3 Klein gets beside its bounding_boxes (flux3Boxes), which carry the table's boxes.+ */+export function flux3Caption(draft: LayoutDraft): string {const caption = draft.summary.caption.trim();if (!draft.items.length) return caption;- const rows = draft.items.map((it, i) => {- const desc = it.label === "text" && it.text ? `${it.caption} "${it.text}"`.trim() : it.caption;- return { id: `obj_${i + 1}`, bbox: gridBox(it.box), desc };+ const cites = draft.items.map((it, i) => `<${flux3Label(i)}> ${itemWords(it)}`).join(", ");+ return [sentence(caption), `${cites}.`].filter(Boolean).join(" ");+}++/** One of fal's FLUX 3 Klein bounding_boxes: where an element goes as 0-1 fractions of the picture, from its top-left corner. */+export interface Flux3Box {+ label: string;+ description: string;+ box: { x_min: number; y_min: number; x_max: number; y_max: number };+}++/** fal takes a box's description up to 500 characters and up to 32 boxes (the FLUX 3 Klein schemas, read 2026-11-01). */+export const FLUX3_BOX_LIMITS = { boxes: 32, description: 500 } as const;++/**+ * compileFlux3's table as fal's FLUX 3 Klein bounding_boxes: the same boxes (the 0-1000 grid's, as fractions, so both engines+ * place an element at the same spot), labels and descriptions, which the caption (flux3Caption) names as <obj_N>.+ */+export function flux3Boxes(draft: LayoutDraft): Flux3Box[] {+ return draft.items.map((it, i) => {+ const [y0, x0, y1, x1] = gridBox(it.box).map((v) => v / 1000);+ return { label: flux3Label(i), description: flux3Desc(it), box: { x_min: x0, y_min: y0, x_max: x1, y_max: y1 } };});- const cites = draft.items.map((it, i) => `<obj_${i + 1}> ${itemWords(it)}`).join(", ");- return `${[sentence(caption), `${cites}.`].filter(Boolean).join(" ")} ${pyJson(rows)}`;}/** The share of the canvas a box covers that reads as its background (ComfyUI's Ideogram node takes one apart from the elements). */diff --git a/src/server/assist/tools.ts b/src/server/assist/tools.tsindex d537c833..89e2153d 100644--- a/src/server/assist/tools.ts+++ b/src/server/assist/tools.ts@@ -65,7 +65,7 @@ function summarize(m: ModelDef) {? "free (your machine)": "free (your GPU)": p- ? `$${p.usd} per ${p.unit}${p.note ? ` — ${p.note}` : ""}${p.lorasUnknown ? "; with LoRAs the price is unknown (not published yet)" : ""}`+ ? `$${p.usd} per ${p.unit}${p.note ? ` — ${p.note}` : ""}${p.lorasUnknown ? "; with LoRAs the price is unknown (not published yet)" : ""}${p.withLorasPerMegapixel ? `; with LoRAs $${p.withLorasPerMegapixel} per megapixel` : ""}`: "unknown",connected: configured,...(o.aspectRatios && { aspectRatios: o.aspectRatios }),@@ -80,6 +80,9 @@ function summarize(m: ModelDef) {...(o.voiceClone && { voiceClone: true }),...(o.languages?.length && { languages: o.languages.length > 12 ? `${o.languages.slice(0, 12).join(", ")}…` : o.languages.join(", ") }),...(o.looks && { looks: "139 Soul looks: pass a look id as presetId (v1-general, v2-y2k-studio…), presetStrength 0–1 scales its LoRAs" }),+ // A model that places a layout's boxes (FLUX 3 Klein, MOSS-Image, Ideogram 4.x), and the weights' licence as information.+ ...(o.layout && { readsLayoutBoxes: o.layout }),+ ...(m.licence && { licence: `${m.licence.licence}${m.licence.commercial === false ? " (non-commercial weights)" : m.licence.commercial === null ? " (revenue tiers decide commercial use)" : ""}` }),};}diff --git a/tests/cloud-catalog.test.ts b/tests/cloud-catalog.test.tsindex ffd5cb3c..3dc061a0 100644--- a/tests/cloud-catalog.test.ts+++ b/tests/cloud-catalog.test.ts@@ -12,8 +12,11 @@ const research = ["paid-model-apis.json", "paid-model-apis-2.json", "paid-model-const byId = new Map<string, Endpoint>();for (const e of research) byId.set(`${e.provider}:${e.endpoint}`, { ...byId.get(`${e.provider}:${e.endpoint}`), ...e });// Research #7 (MOSS-Image on fal and its /lora twin): endpointRecords in the shape of part 4's endpoints.-for (const e of (JSON.parse(fs.readFileSync("docs/research/new-models-7.json", "utf8")) as { endpointRecords: Endpoint[] }).endpointRecords) {- byId.set(`${e.provider}:${e.endpoint}`, { ...byId.get(`${e.provider}:${e.endpoint}`), ...e });+// Research #10 (FLUX 3 Image Klein on fal, its /lora twins and Klein Base's LoRA routes): the same shape.+for (const f of ["new-models-7.json", "new-models-10.json"]) {+ for (const e of (JSON.parse(fs.readFileSync(`docs/research/${f}`, "utf8")) as { endpointRecords: Endpoint[] }).endpointRecords) {+ byId.set(`${e.provider}:${e.endpoint}`, { ...byId.get(`${e.provider}:${e.endpoint}`), ...e });+ }}// Originals (O1): the hosted open-weight endpoints that take LoRAs, and the plain endpoints of the same models.const originals = JSON.parse(fs.readFileSync("docs/research/fuobe-originals-recipes-5.json", "utf8")) as {