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
No Higgsfield (O7): the provider, its catalog and key go; REPLACED_BY resolves what they named
Claude32222f607dec
diff --git a/docs/research/fuobe-originals-recipes-5.json b/docs/research/fuobe-originals-recipes-5.jsonindex e701a89d..ff8c2085 100644--- a/docs/research/fuobe-originals-recipes-5.json+++ b/docs/research/fuobe-originals-recipes-5.json@@ -22164,5 +22164,295 @@"schemaUrl": "https://fal.ai/api/openapi/queue/openapi.json?endpoint_id=minimax/h3-max/recast","checked": "2026-10-27"}+ ],+ "partnerEndpoints": [+ {+ "provider": "fal",+ "endpoint": "alibaba/happy-horse/v1.1/text-to-video",+ "operation": "t2v",+ "status": "active",+ "inputs": {+ "prompt": {+ "type": "string",+ "required": true,+ "desc": "Text prompt describing the desired video. Max 2500 characters.",+ "examples": [+ "A little girl walking on the road at sunset, cinematic lighting, smooth camera movement."+ ]+ },+ "aspect_ratio": {+ "type": "enum",+ "values": [+ "16:9",+ "9:16",+ "1:1",+ "4:3",+ "3:4",+ "21:9",+ "9:21",+ "5:4",+ "4:5"+ ],+ "valueType": "string",+ "required": false,+ "default": "16:9",+ "desc": "Aspect ratio of the generated video."+ },+ "resolution": {+ "type": "enum",+ "values": [+ "720p",+ "1080p"+ ],+ "valueType": "string",+ "required": false,+ "default": "1080p",+ "desc": "Output video resolution tier."+ },+ "duration": {+ "type": "enum",+ "values": [+ 3,+ 4,+ 5,+ 6,+ 7,+ 8,+ 9,+ 10,+ 11,+ 12,+ 13,+ 14,+ 15+ ],+ "valueType": "integer",+ "required": false,+ "default": 5,+ "desc": "Output video duration in seconds (3-15).",+ "examples": [+ 5+ ]+ },+ "seed": {+ "nullable": true,+ "type": "integer",+ "required": false,+ "desc": "Random seed for reproducibility (0-2147483647)."+ },+ "enable_safety_checker": {+ "type": "boolean",+ "required": false,+ "default": true,+ "desc": "Enable content moderation for input and output. Disabling it requires account authorization; unauthorized requests are always checked."+ }+ },+ "keyFields": {+ "prompt": "prompt",+ "seed": "seed",+ "duration": "duration",+ "resolution": "resolution",+ "aspectRatio": "aspect_ratio"+ },+ "output": "video.url",+ "price": "For every second of 720p video you generated, you will be charged $0.14/second. For 1080p video you will be charged $0.18/second.",+ "verified": true,+ "schemaUrl": "https://fal.ai/api/openapi/queue/openapi.json?endpoint_id=alibaba/happy-horse/v1.1/text-to-video",+ "checked": "2026-10-27",+ "replaces": "a route Fuobe ran on Higgsfield's API until build plan O7"+ },+ {+ "provider": "fal",+ "endpoint": "alibaba/happy-horse/v1.1/image-to-video",+ "operation": "i2v",+ "status": "active",+ "inputs": {+ "image_url": {+ "type": "string",+ "required": true,+ "desc": "URL of the first frame image. Formats: JPEG, JPG, PNG, BMP, WEBP. Dimensions must be at least 300px. Aspect ratio must be between 1:2.5 and 2.5:1. Max 20 MB.",+ "examples": [+ "https://help-static-aliyun-doc.aliyuncs.com/file-manage-files/zh-CN/20250925/wpimhv/rap.png"+ ]+ },+ "prompt": {+ "nullable": true,+ "type": "string",+ "required": false,+ "desc": "Optional text prompt guiding the animation. Max 2500 characters.",+ "examples": [+ "Bring the scene in the image to life."+ ]+ },+ "resolution": {+ "type": "enum",+ "values": [+ "720p",+ "1080p"+ ],+ "valueType": "string",+ "required": false,+ "default": "1080p",+ "desc": "Output video resolution tier."+ },+ "duration": {+ "type": "enum",+ "values": [+ 3,+ 4,+ 5,+ 6,+ 7,+ 8,+ 9,+ 10,+ 11,+ 12,+ 13,+ 14,+ 15+ ],+ "valueType": "integer",+ "required": false,+ "default": 5,+ "desc": "Output video duration in seconds (3-15).",+ "examples": [+ 5+ ]+ },+ "seed": {+ "nullable": true,+ "type": "integer",+ "required": false,+ "desc": "Random seed for reproducibility (0-2147483647)."+ },+ "enable_safety_checker": {+ "type": "boolean",+ "required": false,+ "default": true,+ "desc": "Enable content moderation for input and output. Disabling it requires account authorization; unauthorized requests are always checked."+ }+ },+ "keyFields": {+ "prompt": "prompt",+ "seed": "seed",+ "duration": "duration",+ "resolution": "resolution",+ "image": "image_url"+ },+ "output": "video.url",+ "price": "For every second of 720p video you generated, you will be charged $0.14/second. For 1080p video you will be charged $0.18/second.",+ "verified": true,+ "schemaUrl": "https://fal.ai/api/openapi/queue/openapi.json?endpoint_id=alibaba/happy-horse/v1.1/image-to-video",+ "checked": "2026-10-27",+ "replaces": "a route Fuobe ran on Higgsfield's API until build plan O7"+ },+ {+ "provider": "fal",+ "endpoint": "alibaba/happy-horse/v1.1/reference-to-video",+ "operation": "ref2v",+ "status": "active",+ "inputs": {+ "prompt": {+ "type": "string",+ "required": true,+ "desc": "Text prompt describing the desired video. Reference subjects from your images using ``character1``, ``character2``, ... up to ``character9`` (the order matches the order of ``image_urls``). Max 2500 characters.",+ "examples": [+ "A dance battle between character1 and character2, cinematic lighting, smooth camera movement."+ ]+ },+ "image_urls": {+ "type": "array",+ "items": "string",+ "required": true,+ "desc": "Reference images for subject consistency (1-9 images). Formats: JPEG, JPG, PNG, WEBP. Shortest side must be at least 400 px (720P or higher recommended). Max 20 MB each.",+ "examples": [+ [+ "https://help-static-aliyun-doc.aliyuncs.com/file-manage-files/zh-CN/20250925/wpimhv/rap.png"+ ]+ ]+ },+ "aspect_ratio": {+ "type": "enum",+ "values": [+ "16:9",+ "9:16",+ "1:1",+ "4:3",+ "3:4",+ "21:9",+ "9:21",+ "5:4",+ "4:5"+ ],+ "valueType": "string",+ "required": false,+ "default": "16:9",+ "desc": "Aspect ratio of the generated video."+ },+ "resolution": {+ "type": "enum",+ "values": [+ "720p",+ "1080p"+ ],+ "valueType": "string",+ "required": false,+ "default": "1080p",+ "desc": "Output video resolution tier."+ },+ "duration": {+ "type": "enum",+ "values": [+ 3,+ 4,+ 5,+ 6,+ 7,+ 8,+ 9,+ 10,+ 11,+ 12,+ 13,+ 14,+ 15+ ],+ "valueType": "integer",+ "required": false,+ "default": 5,+ "desc": "Output video duration in seconds (3-15).",+ "examples": [+ 5+ ]+ },+ "seed": {+ "nullable": true,+ "type": "integer",+ "required": false,+ "desc": "Random seed for reproducibility (0-2147483647)."+ },+ "enable_safety_checker": {+ "type": "boolean",+ "required": false,+ "default": true,+ "desc": "Enable content moderation for input and output. Disabling it requires account authorization; unauthorized requests are always checked."+ }+ },+ "keyFields": {+ "prompt": "prompt",+ "seed": "seed",+ "duration": "duration",+ "resolution": "resolution",+ "aspectRatio": "aspect_ratio",+ "images": "image_urls"+ },+ "output": "video.url",+ "price": "For every second of 720p video you generated, you will be charged $0.14/second. For 1080p video you will be charged $0.18/second.",+ "verified": true,+ "schemaUrl": "https://fal.ai/api/openapi/queue/openapi.json?endpoint_id=alibaba/happy-horse/v1.1/reference-to-video",+ "checked": "2026-10-27",+ "replaces": "a route Fuobe ran on Higgsfield's API until build plan O7"+ }]}diff --git a/package.json b/package.jsonindex cbb49b56..fc09910c 100644--- a/package.json+++ b/package.json@@ -16,7 +16,7 @@"test:e2e:library": "node tests/e2e/library-flows.mjs","test:e2e:mobile": "node tests/e2e/no-horizontal-scroll.mjs","test:e2e:shell": "node tests/e2e/shell.mjs",- "gen:catalog": "python3 scripts/gen-cloud-models.py && python3 scripts/gen-higgsfield-models.py && python3 scripts/gen-higgsfield-presets.py && python3 scripts/gen-oss-loras.py && python3 scripts/gen-lora-library.py && python3 scripts/gen-influencer-options.py && python3 scripts/gen-soul-originals.py && python3 scripts/gen-trainers.py && node scripts/gen-icon-map.mjs",+ "gen:catalog": "python3 scripts/gen-cloud-models.py && python3 scripts/gen-studio-packs.py && python3 scripts/gen-oss-loras.py && python3 scripts/gen-lora-library.py && python3 scripts/gen-influencer-options.py && python3 scripts/gen-soul-originals.py && python3 scripts/gen-trainers.py && node scripts/gen-icon-map.mjs","typecheck": "tsc --noEmit","eval:run": "node scripts/eval/eval.mjs run","eval:report": "node scripts/eval/eval.mjs report",diff --git a/scripts/eval/README.md b/scripts/eval/README.mdindex 4d98b6b2..e80b0d59 100644--- a/scripts/eval/README.md+++ b/scripts/eval/README.md@@ -52,13 +52,9 @@ harness measures what a user gets.- `--engine open` / `cloud` refuse a server whose engine mode excludes them. A job that would comeback as demo media is skipped and says why: Demo mode is On, no ComfyUI is connected, or there isno cloud key.-- **Never Higgsfield.** Fuobe uses no Higgsfield API: a job whose route would go through Higgsfield's- API is skipped, not measured. A generation's preview names its route; a studio route's estimate- lists where its steps run. A studio route that doesn't say (an older Fuobe) is skipped when that- Fuobe has a Higgsfield key. Connect fal or Replicate and set **Settings → Cloud provider** to Auto,- fal or Replicate.- **The model it names.** A job the server would run on another model than the one the case names- (a studio's default maker, say) is skipped, since it wouldn't measure that model.+ (a studio's default maker, or a retired model the server runs on the Original that replaced it) is+ skipped, since it wouldn't measure that model.- **Your Library stays yours.** Every generation the harness starts has the feature `eval`, a helperlike a studio's steps: the Library and Home feeds leave it out unless **Show steps** is on. A studioroute's steps (Genjutsu, Mixed Media) carry that studio's feature instead. `pnpm eval:trash <runId>`@@ -100,7 +96,7 @@ Useful `run` options:- A cloud job or training the server can't price is skipped, because the cap can't cover it.`--allow-unpriced` runs it anyway: it holds whatever is left of the cap while it runs, so nothingstarts beside it, and its cost counts once the server reports it. Such a job can take the run over- the cap by its own cost. A training target on Higgsfield's API never runs.+ the cap by its own cost.- `--concurrency`: open 1, others 4.- `--resume <runId>`: runs only the failed and missing jobs again. Ctrl+C stops new jobs fromstarting; the jobs already running finish on the server.diff --git a/scripts/eval/lib/run.mjs b/scripts/eval/lib/run.mjsindex a39510ed..215d5112 100644--- a/scripts/eval/lib/run.mjs+++ b/scripts/eval/lib/run.mjs@@ -75,21 +75,6 @@ export function lorasMissing(jobs, installed) {return [...missing.values()];}-/** Why a job is refused: it would run through Higgsfield's API (Fuobe measures its own Originals and partners on fal / Replicate). */-export const HIGGSFIELD_SKIP =- "would run on Higgsfield's API: the evaluation never uses it (connect fal or Replicate on that Fuobe, and set Settings → Cloud provider to Auto, fal or Replicate)";--/**- * Whether a priced job would go through Higgsfield's API: a generation's route says so; a studio route's- * estimate lists its steps' providers. A studio route that doesn't (an older Fuobe) counts as Higgsfield- * when that Fuobe has a Higgsfield key, since its default makers may pick Higgsfield's own models.- */-export function viaHiggsfield(preview, facts) {- if (preview.providerId === "higgsfield" || preview.route?.provider === "higgsfield") return true;- if (Array.isArray(preview.providers)) return preview.providers.includes("higgsfield");- return preview.studio ? !!facts.providers?.higgsfield : false;-}-/** Run `fn` over `items` with at most `n` at a time, in order of start. */async function pool(items, n, fn) {let next = 0;@@ -178,8 +163,8 @@ export async function runEval(opts, io) {const why = trainingProblem(j, engine);if (why) for (const x of jobs.filter((y) => y.caseId === j.caseId && !y.skip)) x.skip = why;}- // What each training would cost (cloud): the server's price for its target. A Higgsfield target never runs- // (Fuobe measures its own Originals), and one without a price can't sit under the spend cap. On either real engine,+ // What each training would cost (cloud): the server's price for its target. One without a price can't sit under+ // the spend cap. On either real engine,// a training the server would run as a demo (no trainer or key connected) or can't start is skipped: its "trained"// results would measure an element that was never trained.const trainingUsd = new Map();@@ -192,8 +177,7 @@ export async function runEval(opts, io) {const t = targets.find((x) => x.id === j.train.target);const usd = trainingPrice(t);let why = null;- if (t?.provider === "higgsfield") why = `training target ${j.train.target} runs on Higgsfield's API: Fuobe's evaluation never uses it (train on fal or your GPU)`;- else if (t?.demo) why = `training on ${j.train.target} would run as a demo on that Fuobe (${facts.demoMode === "on" ? "Demo mode is On" : `no ${t.provider === "fal" ? "fal.ai key" : "AI-Toolkit"} connected`}), so nothing would be trained`;+ if (t?.demo) why = `training on ${j.train.target} would run as a demo on that Fuobe (${facts.demoMode === "on" ? "Demo mode is On" : `no ${t.provider === "fal" ? "fal.ai key" : "AI-Toolkit"} connected`}), so nothing would be trained`;else if (t?.blocker) why = `training on ${j.train.target} can't start there: ${t.blocker}`;else if (engine === "cloud" && usd == null && !opts.allowUnpriced) why = `training on ${j.train.target} has no price${t ? ` (the server says “${t.price}”)` : ""}, so the spend cap can't cover it: --allow-unpriced runs it anyway`;if (why) for (const x of jobs.filter((y) => y.caseId === j.caseId && !y.skip)) x.skip = why;@@ -218,7 +202,6 @@ export async function runEval(opts, io) {: `would run as a demo: ${p.modelName ?? job.model.id} has no ${engine === "open" ? "ComfyUI" : "cloud provider"} connected on that Fuobe`;}else if (engine !== "demo" && p.engine && p.engine !== engine) job.skip = `${p.modelName ?? job.model.id} is ${p.engine === "open" ? "an open-source" : "a cloud"} model, not ${engine}`;- else if (engine !== "demo" && viaHiggsfield(p, facts)) job.skip = HIGGSFIELD_SKIP;// The server picks another model when it can't run the one asked for (a studio's default maker): that wouldn't measure it.else if (p.modelId && p.modelId !== job.model.id) job.skip = `the server would run ${p.modelId} instead of ${job.model.id}, so this wouldn't measure ${job.model.id}`;else if (engine === "cloud" && p.costUsd == null && !opts.allowUnpriced) job.skip = "the server can't price it, so the spend cap can't cover it: --allow-unpriced runs it anyway (it counts once its cost is known)";diff --git a/scripts/fetch-hosted-schemas.py b/scripts/fetch-hosted-schemas.pyindex 781c75eb..44ab70c0 100644--- a/scripts/fetch-hosted-schemas.py+++ b/scripts/fetch-hosted-schemas.py@@ -20,6 +20,7 @@ Run: python3 scripts/fetch-hosted-schemas.pypython3 scripts/fetch-hosted-schemas.py --only fal-ai/z-image/turbo/image-to-image/lora (one endpoint, the rest kept)python3 scripts/fetch-hosted-schemas.py --trainers (only the trainers' outputs)python3 scripts/fetch-hosted-schemas.py --base-only [endpoint …] (Genjutsu's plain endpoints, the rest kept)+ python3 scripts/fetch-hosted-schemas.py --partner (partner routes in partnerEndpoints, the rest kept)"""import datetimeimport json@@ -112,6 +113,14 @@ GENJUTSU = {"minimax/h3-max/recast": ("video-swap", {"prompt": "prompt", "video": "video_url", "images": "reference_image_urls", "resolution": "resolution", "seed": "seed"}),}+# Partner models' fal routes that take over a route Fuobe dropped with the Higgsfield provider (build plan O7: Happy+# Horse 1.1 ran only on Higgsfield). Read with --partner; stored in partnerEndpoints, which gen-cloud-models.py reads.+HAPPY_HORSE = {"prompt": "prompt", "seed": "seed", "duration": "duration", "resolution": "resolution"}+PARTNER = {+ "alibaba/happy-horse/v1.1/text-to-video": ("t2v", {**HAPPY_HORSE, "aspectRatio": "aspect_ratio"}),+ "alibaba/happy-horse/v1.1/image-to-video": ("i2v", {**HAPPY_HORSE, "image": "image_url"}),+ "alibaba/happy-horse/v1.1/reference-to-video": ("ref2v", {**HAPPY_HORSE, "aspectRatio": "aspect_ratio", "images": "image_urls"}),+}def get(url):req = urllib.request.Request(url, headers={"User-Agent": "fuobe-research/1.0"})@@ -258,6 +267,14 @@ def main():trainer_outputs(data)FILE.write_text(json.dumps(data, indent=1, ensure_ascii=False) + "\n", encoding="utf-8")return+ if "--partner" in sys.argv:+ # Add or refresh the partner routes (PARTNER) and keep every other record as it is.+ records = {e["endpoint"]: e for e in data.get("partnerEndpoints") or []}+ for ep, (op, kf) in PARTNER.items():+ records[ep] = {**base_record(ep, op, kf, fal_prices(ep)), "replaces": "a route Fuobe ran on Higgsfield's API until build plan O7"}+ data["partnerEndpoints"] = list(records.values())+ FILE.write_text(json.dumps(data, indent=1, ensure_ascii=False) + "\n", encoding="utf-8")+ returnif "--base-only" in sys.argv:# Add or refresh these plain endpoints (GENJUTSU, or BASE by id) and keep every other record as it is.ids = sys.argv[sys.argv.index("--base-only") + 1:] or list(GENJUTSU)diff --git a/scripts/gen-cloud-models.py b/scripts/gen-cloud-models.pyindex 2b6190f7..066604df 100644--- a/scripts/gen-cloud-models.py+++ b/scripts/gen-cloud-models.py@@ -4,8 +4,8 @@ Generate src/lib/catalog/cloud-models.generated.ts from docs/research/paid-model(merged with parts 2, 3 and 4: paid-model-apis-2.json, paid-model-apis-3.json, paid-model-apis-4.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, mirroring Higgsfield's-lineup) into ModelDef objects with correct FieldMaps, so no field name is typed by hand.+prices). This script turns a curated list of models (MODELS below) into ModelDef objects with+correct FieldMaps, so no field name is typed by hand.Run: python3 scripts/gen-cloud-models.py"""@@ -32,7 +32,6 @@ for e in RESEARCH_3["endpoints"]:prev = EPS.get((e["provider"], e["endpoint"]))EPS[(e["provider"], e["endpoint"])] = {**e, "keyFields": {**((prev or {}).get("keyFields") or {}), **(e.get("keyFields") or {})}}# Part 4 (video erase / swap, FPS / HDR / codecs, FFmpeg compose, OCR, 3D scenes, new models): same merge.-# Its Higgsfield records (Genjutsu Light) are copied into higgsfield-api.json for gen-higgsfield-models.py.RESEARCH_4 = json.loads((ROOT / "docs/research/paid-model-apis-4.json").read_text())for e in RESEARCH_4["endpoints"]:prev = EPS.get((e["provider"], e["endpoint"]))@@ -49,6 +48,10 @@ for e in ORIGINALS["hostedLoraEndpoints"]:"inputs": e["inputs"], "keyFields": e.get("keyFields") or {}, "output": e.get("output"), "price": e.get("price")}for e in ORIGINALS.get("hostedBaseEndpoints") or []:EPS[(e["provider"], e["endpoint"])] = e+# Partner models' fal routes read for build plan O7 (scripts/fetch-hosted-schemas.py --partner): Happy Horse 1.1 ran+# only on Higgsfield's API before.+for e in ORIGINALS.get("partnerEndpoints") or []:+ EPS[(e["provider"], e["endpoint"])] = eIMG_AR = ["1:1", "4:3", "3:4", "16:9", "9:16", "3:2", "2:3", "21:9", "5:4", "4:5"]IMAGE_SIZE_MAP = {@@ -57,7 +60,7 @@ IMAGE_SIZE_MAP = {"5:4": "landscape_4_3", "4:5": "portrait_4_3",}RATIO = re.compile(r"^\d+(\.\d+)?:\d+(\.\d+)?$")-# Duration picks for APIs that take any whole number of seconds in a range (the Higgsfield generator's list).+# Duration picks for APIs that take any whole number of seconds in a range.NICE_DURATIONS = [3, 4, 5, 6, 8, 10, 12, 15, 20, 30]# ---------------------------------------------------------------------------@@ -76,7 +79,7 @@ def model(id, name, vendor, family, kind, tagline, routes, badges=None, pricing=formats: {canonical VideoFormat: the API's value} for its output-format field (params.format), checked against the enum.ranged_durations: a duration that takes any whole second in a range gets the usual picks inside it.fit_values: the model offers the union of its routes' aspect ratios and resolutions, so each route lists the- ones it takes (EnumField.accepts) and gets the closest of them (Grok Imagine on fal and Higgsfield).+ ones it takes (EnumField.accepts) and gets the closest of them (Grok Imagine's text and reference routes).controls entries may carry a third item: labels for values that read badly ({0: "Precise", 1: "Creative"}).fps_targets: frame rates offered for the API's target_fps (params.targetFps; ModelOptions.fpsTargets).upscale_tiers: resolutions offered to an upscaler that takes a factor ("Original", "1080p", "4K"): FieldMap.upscaleFactor@@ -336,7 +339,7 @@ model("seedance-2-5", "Seedance 2.5", "ByteDance", "seedance", "video",("extend", "bytedance/seedance-2.5/reference-to-video", "fal", {"fixed": {"task": "extension"}, "videoArray": True}),("finalize", "bytedance/seedance-2.5/draft/complete")],badges=["top", "audio", "new"], pricing=("second", 0.473, "720p"), defaults={"aspectRatio": "16:9", "duration": 5, "resolution": "720p"},- # fal's schema gives no count for 2.5's reference clips; Higgsfield's and Replicate's 2.5 schemas say up to 10 (30 s in all).+ # fal's schema gives no count for 2.5's reference clips; Replicate's 2.5 schema says up to 10 (30 s in all), as the research found.options={"multiShot": {"mode": "prompt", "maxShots": 6}, "maxVideos": 10, "maxAudios": 10})model("seedance-2-0", "Seedance 2.0", "ByteDance", "seedance", "video","Smooth multi-shot motion with audio",@@ -607,6 +610,13 @@ model("happy-horse-video-edit", "Happy Horse Video Edit", "Alibaba", "happy-hors[("v2v", "alibaba/happy-horse/video-edit")], badges=["new", "audio"], defaults={"resolution": "720p"},pricing=("second", 0.28, "720p, input + output seconds; 1080p $0.56", {"byResolution": {"720p": 0.28, "1080p": 0.56}, "inputSeconds": True}),controls=[("audio_setting", "Audio")])+# Happy Horse 1.1 (build plan O7): Higgsfield resold it; fal hosts the same three endpoints (partnerEndpoints, read+# 2026-10-27): $0.14/s at 720p, $0.18/s at 1080p; 3-15 s; up to 9 reference images.+model("happy-horse-1-1", "Happy Horse 1.1", "Alibaba", "happy-horse", "video", "Alibaba's expressive character-animation video model",+ [("t2v", "alibaba/happy-horse/v1.1/text-to-video"), ("i2v", "alibaba/happy-horse/v1.1/image-to-video"),+ ("ref2v", "alibaba/happy-horse/v1.1/reference-to-video", "fal", {"max_images": 9})],+ defaults={"aspectRatio": "16:9", "duration": 5, "resolution": "720p"},+ pricing=("second", 0.14, "720p; 1080p $0.18/s", {"byResolution": {"720p": 0.14, "1080p": 0.18}}), options={"maxImages": 9})model("lucy-edit-pro", "Lucy Edit Pro", "Decart", "lucy", "video","Text-guided video edits that keep motion and identity — outfits, props, styles",[("v2v", "decart/lucy-edit/pro")], defaults={"resolution": "720p"}, fixed={"sync_mode": False}, pricing=("second", 0.15, "720p"))@@ -719,7 +729,7 @@ model("heygen-translate-fast", "HeyGen Translate Speed", "HeyGen", "heygen", "vimodel("elevenlabs-dubbing", "ElevenLabs Dubbing", "ElevenLabs", "elevenlabs", "video", "Dub video or audio while keeping each speaker's voice",[("dub", "fal-ai/elevenlabs/dubbing")], pricing=("minute", 0.6))# Sound effects and music (research part 3): Mirelo and Sonilo are the jobs Higgsfield's Audio runs.-model("mirelo-sfx-2", "Mirelo SFX 2.0", "Mirelo", "mirelo", "audio", "Higgsfield's sound-effects model — layered, cinematic SFX up to 10 minutes",+model("mirelo-sfx-2", "Mirelo SFX 2.0", "Mirelo", "mirelo", "audio", "Layered, cinematic sound effects for a clip or a prompt, up to 10 minutes",[("sfx", "mirelo-ai/sfx2.0/text-to-audio")], badges=["top", "new"], defaults={"duration": 5}, options={"durations": [2, 5, 10, 30, 60]},pricing=("second", 0.01, "intro price until 2026-12-13, then $0.015"))# Sonilo answers in AAC unless asked: MP3 plays and downloads everywhere.@@ -730,9 +740,9 @@ model("stable-audio-3-sfx", "Stable Audio 3 SFX", "Stability AI", "stable-audio"[("sfx", "fal-ai/stable-audio-3/small/sfx/text-to-audio")], defaults={"duration": 10}, options={"durations": [5, 10, 30, 60]})model("cassette-sfx", "CassetteAI Sound Effects", "CassetteAI", "cassette", "audio", "One-cent sound effects up to 30 s",[("sfx", "cassetteai/sound-effects-generator")], badges=["fast"], defaults={"duration": 5}, options={"durations": [2, 5, 10, 30]})-model("seed-audio", "Seed Audio 1.0", "ByteDance", "seed-audio", "audio", "Higgsfield's Seed Audio: speech, ambience, music and Foley from one prompt",+model("seed-audio", "Seed Audio 1.0", "ByteDance", "seed-audio", "audio", "Speech, ambience, music and Foley from one prompt",[("sfx", "bytedance/seed-audio-1.0"), ("tts", "bytedance/seed-audio-1.0")], badges=["new"])-model("sonilo-music", "Sonilo Music 1.1", "Sonilo", "sonilo", "audio", "Higgsfield's music model — full tracks up to 10 minutes",+model("sonilo-music", "Sonilo Music 1.1", "Sonilo", "sonilo", "audio", "Full music tracks up to 10 minutes",[("music", "sonilo/v1.1/text-to-music")], badges=["top", "new"], defaults={"duration": 30}, options={"durations": [15, 30, 60, 120, 240]})model("lyria-3", "Lyria 3", "Google", "lyria", "audio", "Google DeepMind's music model, from a prompt or an image",[("music", "fal-ai/lyria3"), ("music", "google/lyria-3", "replicate")])@@ -780,7 +790,7 @@ model("mirelo-sfx-2-video", "Mirelo SFX 2.0 for video", "Mirelo", "mirelo", "vid# ----- Image tools: layers, text layers, cut-outs, vectors (research part 3; Higgsfield Layers)model("seedream-5-layers", "Seedream 5.0 Layers", "ByteDance", "seedream", "image",- "The model Higgsfield Layers runs on: background + up to 16 named, positioned layers",+ "Splits a picture into a background and up to 16 named, positioned layers",[("layers", "bytedance/seedream/v5/pro/layerize")], badges=["top", "new"], defaults={"resolution": "auto"},pricing=("request", 0.17, "$0.034 per layer, ≈5 layers; double above 1536²"))model("seedream-5-flash-layers", "Seedream 5.0 Flash Layers", "ByteDance", "seedream", "image", "Faster, cheaper Seedream layer split",@@ -1026,7 +1036,6 @@ model("heygen-video", "HeyGen Video", "HeyGen", "heygen", "video",badges=["new", "fast"], defaults={"aspectRatio": "16:9", "duration": 5, "resolution": "768p"}, ranged_durations=True,pricing=("second", 0.02, "480p and 768p; 1080p and 2K $0.06", {"byResolution": {"480p": 0.02, "768p": 0.02, "1080p": 0.06, "2k": 0.06}}),controls=[("prompt_enhancement", "Prompt boost")])-# Higgsfield offers Grok Imagine Video 1.5 too (its Higgsfield route is added by gen-higgsfield-models.py).# Its routes take different values (fal's reference-to-video stops at 720p), so each lists its own (fit_values).model("grok-imagine-video-1-5", "Grok Imagine Video 1.5", "xAI", "grok", "video", "xAI's video model with references and audio",[("t2v", "xai/grok-imagine-video/v1.5/text-to-video"), ("i2v", "xai/grok-imagine-video/v1.5/image-to-video"),@@ -1076,15 +1085,14 @@ model("krea-3", "Krea 3", "Krea", "krea", "image", "Krea's new image model — gbadges=["new"], defaults={"aspectRatio": "1:1"}, pricing=("megapixel", 0.025, "output + each reference; Replicate $0.03–0.08 per image"),# Both APIs take up to 8 images.options={"maxImages": 8})-# Higgsfield offers Grok Imagine Image 2.0 too (its Higgsfield route is added by gen-higgsfield-models.py).-# fal's text-to-image has no "auto" and Higgsfield no 20:9 / 19.5:9 / 9:19.5 / 9:20: each route lists what it takes (fit_values).+# fal's text-to-image has no "auto": each route lists what it takes (fit_values).model("grok-imagine-image-2", "Grok Imagine Image 2.0", "xAI", "grok", "image", "xAI's image model — bold, fast, few refusals",- # fal's edit takes "a maximum of 5 images"; Higgsfield's route takes 10, so a run with more than 5 goes there.+ # fal's edit takes "a maximum of 5 images".[("t2i", "xai/grok-imagine-image/v2.0/text-to-image"), ("edit", "xai/grok-imagine-image/v2.0/edit", "fal", {"max_images": 5})],defaults={"aspectRatio": "1:1", "resolution": "1k"}, fit_values=True,- pricing=("image", 0.06, "1K medium on fal; low $0.04; 2K $0.06–0.08; +$0.01 per input image; Higgsfield $0.04 (1K) / $0.08 (2K)",+ pricing=("image", 0.06, "1K medium on fal; low $0.04; 2K $0.06–0.08; +$0.01 per input image",{"byResolution": {"1k": 0.06, "2k": 0.08}}),- controls=[("quality", "Quality")], options={"maxImages": 10})+ controls=[("quality", "Quality")], options={"maxImages": 5})model("bria-fibo-2", "Bria FIBO 2", "Bria", "bria", "image", "Structured prompts; Bria says it is trained on licensed data only",[("t2i", "bria/fibo-2/generate"), ("edit", "bria/fibo-2/edit")], badges=["new"], defaults={"aspectRatio": "1:1"})model("ideogram-vector", "Ideogram Vector", "Ideogram", "ideogram", "image", "Editable SVGs from a prompt, or any image traced to SVG",@@ -1165,7 +1173,7 @@ def palette_format(spec):if {"r", "g", "b"} <= set(item):return "rgb-object" # Recraft on fal: [{r, g, b}]if "rgb" in (item.get("fields") or item):- return "rgb-array" # Recraft on Higgsfield: [{rgb: [r, g, b]}]+ return "rgb-array" # [{rgb: [r, g, b]}]if spec.get("items") == "string":return "hex"return Nonediff --git a/scripts/gen-higgsfield-models.py b/scripts/gen-higgsfield-models.pydeleted file mode 100644index f0939fa8..00000000--- a/scripts/gen-higgsfield-models.py+++ /dev/null@@ -1,329 +0,0 @@-#!/usr/bin/env python3-"""-Generate src/lib/catalog/higgsfield-models.generated.ts from docs/research/higgsfield-api.json.--Two outputs:- HIGGSFIELD_MODELS — models only Higgsfield hosts (Soul, Soul Cinema, Genjutsu and Genjutsu Lite, Cinema- Studio, Marketing/Ads Studio, Happy Horse)- HIGGSFIELD_ROUTES — extra `higgsfield` routes for models Fuobe already offers through fal /- Replicate (Seedance, Kling, Wan, MiniMax, LTX, PixVerse, Grok Imagine…), so a- Higgsfield key alone can run them.--Field names, enums, defaults and prices come from the verified research file; nothing is typed-by hand except the curated list below.--Run: python3 scripts/gen-higgsfield-models.py-"""-import json-import re-from pathlib import Path--ROOT = Path(__file__).resolve().parent.parent-RESEARCH = json.loads((ROOT / "docs/research/higgsfield-api.json").read_text())-EPS = {e["path"].lstrip("/"): e for e in RESEARCH["endpoints"] if e["method"] == "POST"}-RATIO = re.compile(r"^\d+(\.\d+)?:\d+(\.\d+)?$")-NICE_DURATIONS = [3, 4, 5, 6, 8, 10, 12, 15, 20, 30]---def warn(msg):- print(f"warning: {msg}")---# Director-style enum fields exposed as composer controls.-CONTROL_LABELS = {- "genre": "Genre", "era": "Era", "light": "Lighting", "pacing": "Pacing", "camera_model": "Camera",- "camera_lens": "Lens", "camera_aperture": "Aperture", "camera_movement": "Camera move",- "color_palette": "Color grade", "bitrate_mode": "Bitrate", "character_orientation": "Orientation",- "quality": "Detail", "rendering_speed": "Speed", "shot_type": "Shot type",-}---# Operations that edit the one video they are given (the clip goes in video_urls, not the reference clips).-EDIT_OPS = ("v2v", "extend", "remove-object", "video-swap", "video-insert")---def field_map(op, ep, inputs, opts):- # Read-only fields (Genjutsu Light's duration, computed from the source) are never sent.- inputs = {k: v for k, v in inputs.items() if not v.get("readOnly")}- fm = {}- if "prompt" not in inputs:- fm["prompt"] = False- elif op in ("video-swap", "video-insert") and not inputs["prompt"].get("required"):- # The references say what goes in; words are optional (Genjutsu object swap), and an empty prompt is left out.- opts["promptOptional"] = True- fm["omitEmptyPrompt"] = True- pick = lambda *names: next((n for n in names if n in inputs), None) # noqa: E731- img = pick("image_url", "first_frame_url")- imgs = "image_urls" if "image_urls" in inputs else None- if op in ("t2i", "t2v"):- img = imgs = None # same endpoint may also serve edit/ref2v; keep text-only routes clean- if img:- fm["image"] = img- if imgs:- fm["images"] = imgs- end = pick("end_image_url", "last_image_url", "last_frame_url")- if end and op in ("i2v", "flf2v"):- fm["endImage"] = end- opts["endFrame"] = True- clips = op not in ("t2i", "t2v", "i2v", "flf2v") # text/frame routes stay clean, as with image_urls- if "video_url" in inputs:- fm["video"] = "video_url"- # Seedance 2.5 edit / extend take reference clips beside the video they work on.- if "video_urls" in inputs and clips:- fm["videos"] = "video_urls"- elif "video_urls" in inputs and op in EDIT_OPS:- fm["videoArray"] = "video_urls"- elif "video_urls" in inputs and clips:- # Reference videos (Cinema Studio 4.0, Seedance, Wan, MiniMax reference-to-video): inputs.videos.- fm["videos"] = "video_urls"- if "audio_urls" in inputs and clips:- fm["audios"] = "audio_urls"- for field, key, canon in (("video_urls", "maxVideos", "videos"), ("audio_urls", "maxAudios", "audios")):- if fm.get(canon) == field:- opts[key] = max(opts.get(key, 0), int(inputs[field].get("maxItems") or 3))- if "audio_url" in inputs and inputs["audio_url"].get("required"):- fm["audio"] = "audio_url"- if "negative_prompt" in inputs:- fm["negativePrompt"] = "negative_prompt"- opts["negativePrompt"] = True- # Recraft's palette on Higgsfield: colors [{rgb: [r, g, b]}] and background_color {rgb: [r, g, b]} (Soul HEX).- colors = (inputs.get("colors") or {}).get("items") or {}- if "rgb" in (colors.get("fields") or {}):- fm["palette"] = {"key": "colors", "format": "rgb-array"}- if "rgb" in ((inputs.get("background_color") or {}).get("fields") or {}):- fm["palette"]["background"] = "background_color"- if "seed" in inputs:- fm["seed"] = "seed"- opts["seed"] = True- lo, hi = inputs["seed"].get("min"), inputs["seed"].get("max")- if hi is not None and hi < 2**31 - 1:- fm["seedRange"] = [lo or 0, hi]- if "aspect_ratio" in inputs:- fm["aspectRatio"] = "aspect_ratio"- vals = [v for v in inputs["aspect_ratio"].get("enum", []) if RATIO.match(str(v)) or v == "auto"]- if vals:- opts["aspectRatios"] = union(opts.get("aspectRatios", []), vals)- if "resolution" in inputs:- fm["resolution"] = "resolution"- opts["resolutions"] = union(opts.get("resolutions", []), [str(v) for v in inputs["resolution"].get("enum", [])])- if "duration" in inputs:- d = inputs["duration"]- fm["duration"] = {"key": "duration", "type": "number" if d.get("type") in ("integer", "number") else "string"}- if d.get("enum"):- vals = [v for v in d["enum"] if isinstance(v, (int, float))]- else:- lo, hi = d.get("min", 5), d.get("max", 5)- vals = [v for v in NICE_DURATIONS if lo <= v <= hi] or [lo]- opts["durations"] = union(opts.get("durations", []), vals)- if "generate_audio" in inputs:- fm["generateAudio"] = "generate_audio"- opts["audio"] = True- elif "sound" in inputs and inputs["sound"].get("enum") == ["on", "off"]:- fm["generateAudio"] = {"key": "sound", "on": "on", "off": "off"}- opts["audio"] = True- if "multi_prompt" in inputs and op in ("t2v", "i2v", "flf2v", "ref2v"):- item = (inputs["multi_prompt"].get("items") or {}).get("fields") or {}- dtype = "number" if (item.get("duration") or {}).get("type") in ("integer", "number") else "string"- fm["multiShot"] = {"key": "multi_prompt", "durationType": dtype, **({"flag": "multi_shots"} if "multi_shots" in inputs else {})}- opts["multiShot"] = {"mode": "native", "maxShots": int(inputs["multi_prompt"].get("maxItems", 6))}- if "batch_size" in inputs:- b = inputs["batch_size"]- if b.get("enum"):- pass # 1|4 only: Fuobe runs one job per image instead of an invalid batch of 2–3- else:- fm["numOutputs"] = "batch_size"- opts["maxOutputs"] = max(opts.get("maxOutputs", 1), min(4, int(b.get("max", 4))))- if imgs:- opts["maxImages"] = max(opts.get("maxImages", 1), int(inputs["image_urls"].get("maxItems", 4)))- elif img:- opts["maxImages"] = max(opts.get("maxImages", 0), 1)- controls = opts.setdefault("controls", [])- for k, label in CONTROL_LABELS.items():- spec = inputs.get(k)- if not spec or not spec.get("enum") or any(c["param"] == k for c in controls):- continue- controls.append({"param": k, "label": label, "values": spec["enum"], **({"default": spec["default"]} if "default" in spec else {})})- if not controls:- del opts["controls"]- return fm---def union(a, b):- out = list(a)- for x in b:- if x not in out:- out.append(x)- return out---def price(ep, default_res=None):- p = EPS[ep].get("priceUsd") or {}- tiers = p.get("tiers") or []- if not tiers or p.get("unit") not in ("image", "second", "video", "request"):- return None- t = next((t for t in tiers if default_res and t.get("resolution") == default_res), tiers[0])- usd = t.get("listUsd")- return {"unit": p["unit"], "usd": usd, "note": "Higgsfield list price"} if usd else None---def routes_for(spec, opts, fit=False):- """spec: (op, endpoint) or (op, endpoint, {drop: [canonical keys], accepts: {aspectRatio | resolution: [values]}}).- fit: the model's aspect ratios and resolutions come from its fal routes, so each route lists the ones it- takes (EnumField.accepts) and gets the closest of them."""- out = []- for r in spec:- op, ep = r[0], r[1]- ro = r[2] if len(r) > 2 else {}- if ep not in EPS:- warn(f"{ep} not in research")- continue- e = EPS[ep]- if not e.get("verified"):- warn(f"{ep} not verified")- inputs = e.get("inputs") or {}- fm = field_map(op, ep, inputs, opts)- for k in ro.get("drop") or []:- fm.pop(k, None)- if fit:- for canon, field in (("aspectRatio", "aspect_ratio"), ("resolution", "resolution")):- if fm.get(canon) != field:- continue- vals = (ro.get("accepts") or {}).get(canon) or [- str(v) for v in inputs[field].get("enum", []) if canon == "resolution" or RATIO.match(str(v)) or v == "auto"]- if vals:- fm[canon] = {"key": field, "accepts": vals}- out.append({"op": op, "provider": "higgsfield", "endpoint": ep, "map": fm})- if op == "i2v" and "endImage" in fm:- out.append({"op": "flf2v", "provider": "higgsfield", "endpoint": ep, "map": fm})- return out---# ----------------------------------------------------------------------------# Higgsfield-only models--EXCLUSIVE = [- dict(id="soul-2", name="Higgsfield Soul 2.0", vendor="Higgsfield", family="soul", kind="image",- tagline="Higgsfield's fashion-grade photo model — real skin, real light, 100+ styles",- badges=["top", "new"], routes=[("t2i", "higgsfield-ai/soul/v2/standard"), ("edit", "higgsfield-ai/soul/v2/image-to-image")],- presets={"source": "soul-v2", "param": "style_id", "label": "Style"}, identity="v2",- defaults={"aspectRatio": "3:4", "resolution": "1080p"}),- dict(id="soul-cinema", name="Higgsfield Soul Cinema", vendor="Higgsfield", family="soul", kind="image",- tagline="Cinematic stills with film-set lighting and composition",- badges=["new"], routes=[("t2i", "higgsfield-ai/soul/cinema")], identity="cinema",- defaults={"aspectRatio": "16:9", "resolution": "1080p"}),- dict(id="soul-1", name="Higgsfield Soul", vendor="Higgsfield", family="soul", kind="image",- tagline="The original Soul look with the full style library",- routes=[("t2i", "higgsfield-ai/soul/standard")], presets={"source": "soul-v1", "param": "style_id", "label": "Style"}, identity="v1",- defaults={"aspectRatio": "3:4", "resolution": "720p"}),- dict(id="marketing-studio-image", name="Marketing Studio Image", vendor="Higgsfield", family="marketing-studio", kind="image",- tagline="Ad-ready product shots and posters from a product photo and a template",- routes=[("t2i", "marketing-studio/image"), ("edit", "marketing-studio/image")],- presets={"source": "marketing-studio", "param": "preset_id", "label": "Template"}, defaults={"aspectRatio": "auto", "resolution": "2k"}),- dict(id="ads-studio", name="Ads Studio", vendor="Higgsfield", family="ads-studio", kind="image",- tagline="A brief and a product photo in, a batch of static ad concepts out",- routes=[("t2i", "higgsfield/ads-studio/v1.0"), ("edit", "higgsfield/ads-studio/v1.0")], defaults={"aspectRatio": "1:1"}),- dict(id="cinema-studio-4", name="Cinema Studio 4.0", vendor="Higgsfield", family="cinema-studio", kind="video",- tagline="Higgsfield's director model on Seedance 2.5 — genre, lens, light, grade and camera move controls",- badges=["top", "audio", "new"], routes=[("t2v", "higgsfield/cinema-studio/4.0"), ("ref2v", "higgsfield/cinema-studio/4.0")],- defaults={"aspectRatio": "16:9", "duration": 5, "resolution": "720p"}),- dict(id="genjutsu-motion-transfer", name="Genjutsu Motion Transfer", vendor="Higgsfield", family="genjutsu", kind="video",- tagline="Keep a clip's motion, swap in your characters and world",- badges=["new"], routes=[("motion-transfer", "higgsfield/genjutsu/motion-transfer/v1.0")], defaults={"resolution": "720p"}),- dict(id="genjutsu-object-swap", name="Genjutsu Object Swap", vendor="Higgsfield", family="genjutsu", kind="video",- tagline="Replace one thing in a video and keep everything else",- # Also listed as round 4's video-swap, beside Genjutsu Lite, for the swap tools that pick models by operation.- routes=[("v2v", "higgsfield/genjutsu/object-swap/v1.0"), ("video-swap", "higgsfield/genjutsu/object-swap/v1.0")],- defaults={"resolution": "720p"}),- dict(id="genjutsu-restyle", name="Genjutsu Restyle", vendor="Higgsfield", family="genjutsu", kind="video",- tagline="Restyle footage with 30+ looks while keeping motion and audio",- routes=[("v2v", "higgsfield/genjutsu/restyle/v1.0")],- presets={"source": "genjutsu-restyle", "param": "preset_id", "label": "Style", "required": True}, defaults={"resolution": "720p"}),- # Genjutsu Lite (API name Genjutsu Light, 2026-10-20): the first 15 s of the source at a fraction of the price.- dict(id="genjutsu-lite-object-swap", name="Genjutsu Lite Object Swap", vendor="Higgsfield", family="genjutsu", kind="video",- tagline="Swap objects, characters or clothes from 1–8 references in clips up to 15 s",- badges=["new"], routes=[("video-swap", "higgsfield/genjutsu-light/object-swap/v1.0")], defaults={"resolution": "720p"}),- dict(id="genjutsu-lite-motion-transfer", name="Genjutsu Lite Motion Transfer", vendor="Higgsfield", family="genjutsu", kind="video",- tagline="A clip's motion on your characters, for clips up to 15 s",- badges=["new"], routes=[("motion-transfer", "higgsfield/genjutsu-light/motion-transfer/v1.0")], defaults={"resolution": "720p"}),- dict(id="happy-horse-1-1", name="Happy Horse 1.1", vendor="Alibaba", family="happy-horse", kind="video",- tagline="Alibaba's expressive character-animation video model",- routes=[("t2v", "alibaba/happy-horse/v1.1/text-to-video"), ("i2v", "alibaba/happy-horse/v1.1/image-to-video"),- ("ref2v", "alibaba/happy-horse/v1.1/reference-to-video")], defaults={"aspectRatio": "16:9", "duration": 5}),-]--# Existing Fuobe models that Higgsfield also hosts.-EXTRA = {- "seedance-2-5": [("t2v", "bytedance/seedance-2.5/text-to-video"), ("i2v", "bytedance/seedance-2.5/image-to-video"),- ("ref2v", "bytedance/seedance-2.5/reference-to-video"), ("v2v", "bytedance/seedance-2.5/video-edit"),- ("extend", "bytedance/seedance-2.5/video-extend")],- "seedance-2-0": [("t2v", "bytedance/seedance-2.0/text-to-video"), ("i2v", "bytedance/seedance-2.0/image-to-video"),- ("ref2v", "bytedance/seedance-2.0/reference-to-video")],- "kling-3": [("t2v", "kling-video/v3.0/pro/text-to-video"), ("i2v", "kling-video/v3.0/pro/image-to-video")],- "kling-3-4k": [("t2v", "kling-video/v3.0/4k/text-to-video"), ("i2v", "kling-video/v3.0/4k/image-to-video")],- "kling-3-turbo": [("t2v", "kling-video/v3.0-turbo/text-to-video"), ("i2v", "kling-video/v3.0-turbo/image-to-video")],- # Higgsfield's Remove Object page is this edit with a removal prompt (research part 4); swaps and inserts too.- "kling-o3": [("flf2v", "kling-video/o3/first-last-frame"), ("ref2v", "kling-video/o3/image-reference"), ("v2v", "kling-video/o3/video-edit"),- ("remove-object", "kling-video/o3/video-edit"), ("video-swap", "kling-video/o3/video-edit"), ("video-insert", "kling-video/o3/video-edit")],- "kling-o1": [("flf2v", "kling-video/omni/first-last-frame"), ("ref2v", "kling-video/omni/image-reference"), ("v2v", "kling-video/omni/video-edit")],- "kling-motion-control": [("motion-transfer", "kling-video/v3/motion-control/pro")],- "kling-2-6-pro": [("t2v", "kling-video/v2.6/pro/text-to-video"), ("i2v", "kling-video/v2.6/pro/image-to-video")],- "kling-2-5-turbo": [("t2v", "kling-video/v2.5-turbo/pro/text-to-video"), ("i2v", "kling-video/v2.5-turbo/pro/image-to-video")],- "minimax-h3": [("t2v", "minimax/h3/text-to-video"), ("i2v", "minimax/h3/image-to-video"), ("ref2v", "minimax/h3/reference-to-video")],- "hailuo-2-3": [("t2v", "minimax/hailuo-2.3/standard/text-to-video"), ("i2v", "minimax/hailuo-2.3/standard/image-to-video")],- "ltx-2-5": [("t2v", "lightricks/ltx-2.5/text-to-video/pro"), ("i2v", "lightricks/ltx-2.5/image-to-video/pro")],- "pixverse-v6": [("t2v", "pixverse/v6/text-to-video"), ("i2v", "pixverse/v6/image-to-video")],- "wan-3": [("t2v", "alibaba/wan-3.0/text-to-video"), ("i2v", "alibaba/wan-3.0/image-to-video"), ("ref2v", "alibaba/wan-3.0/reference-to-video")],- "wan-3-prime": [("t2v", "alibaba/wan-3.0-prime/text-to-video"), ("i2v", "alibaba/wan-3.0-prime/image-to-video"),- ("ref2v", "alibaba/wan-3.0-prime/reference-to-video")],- "wan-2-7": [("t2v", "wan/v2.7/text-to-video"), ("i2v", "wan/v2.7/image-to-video"), ("ref2v", "wan/v2.7/reference-to-video")],- "wan-2-6": [("t2v", "wan/v2.6/text-to-video"), ("i2v", "wan/v2.6/image-to-video")],- "qwen-image-3": [("t2i", "alibaba/qwen-image-3/text-to-image"), ("edit", "alibaba/qwen-image-3/edit")],- "z-image-turbo-cloud": [("t2i", "z-image/turbo")],- "recraft-4-1": [("t2i", "recraft/v4.1/text-to-image")],- "recraft-4-1-pro": [("t2i", "recraft/v4.1/pro/text-to-image")],- # Grok Imagine on fal since round 4 (gen-cloud-models.py); Higgsfield is the second route. "Choose either image_url- # or reference media (image_urls/audio_url); do not combine these modes", and "when image_urls or audio_url is- # provided, resolution must be 480p or 720p" (the shared schema lists 1080p).- "grok-imagine-video-1-5": [("t2v", "xai/grok-imagine-video/v1.5/reference-to-video"),- ("i2v", "xai/grok-imagine-video/v1.5/reference-to-video", {"drop": ["images"]}),- ("ref2v", "xai/grok-imagine-video/v1.5/reference-to-video",- {"drop": ["image"], "accepts": {"resolution": ["480p", "720p"]}})],- "grok-imagine-image-2": [("t2i", "xai/grok-imagine-image-2.0"), ("edit", "xai/grok-imagine-image-2.0")],-}--# Models whose fal and Higgsfield routes take different aspect ratios or resolutions (see routes_for's fit).-FIT = {"grok-imagine-video-1-5", "grok-imagine-image-2"}--models = []-for m in EXCLUSIVE:- opts = {}- routes = routes_for(m["routes"], opts)- if not routes:- continue- if m.get("presets"):- opts["presets"] = m["presets"]- d = {- "id": m["id"], "name": m["name"], "vendor": m["vendor"], "family": m["family"], "engine": "cloud", "kind": m["kind"],- "tagline": m["tagline"], "badges": m.get("badges", []), "routes": routes, "options": opts, "defaults": m.get("defaults", {}),- }- if m.get("identity"):- d["identity"] = {"provider": "higgsfield", "version": m["identity"]}- p = price(m["routes"][0][1], m.get("defaults", {}).get("resolution"))- if p:- d["pricing"] = p- models.append(d)--extra = {}-for mid, spec in EXTRA.items():- opts = {}- # The model keeps its own enums and controls: Higgsfield-only fields would break its fal routes.- extra[mid] = routes_for(spec, opts, fit=mid in FIT)--out = ROOT / "src/lib/catalog/higgsfield-models.generated.ts"-out.write_text(- "// GENERATED by scripts/gen-higgsfield-models.py from docs/research/higgsfield-api.json — do not edit.\n"- 'import type { ModelDef, ModelRoute } from "./types";\n\n'- f"export const HIGGSFIELD_MODELS: ModelDef[] = {json.dumps(models, indent=2, ensure_ascii=False)};\n\n"- f"export const HIGGSFIELD_ROUTES: Record<string, ModelRoute[]> = {json.dumps(extra, indent=2, ensure_ascii=False)};\n"-)-print(f"wrote {len(models)} Higgsfield models and {sum(len(v) for v in extra.values())} extra routes for {len(extra)} models")diff --git a/scripts/gen-higgsfield-presets.py b/scripts/gen-higgsfield-presets.pydeleted file mode 100644index c149fc70..00000000--- a/scripts/gen-higgsfield-presets.py+++ /dev/null@@ -1,130 +0,0 @@-#!/usr/bin/env python3-"""-Generate src/lib/catalog/higgsfield-presets.generated.ts from docs/research/higgsfield-image-studios.json.--Outputs (all static, used when there is no Higgsfield key or the live list fails):- SOUL_PRESETS — the 106 Soul (v1) presets and the 33 Soul 2.0 presets / curated moodboards:- id (the API's style_id), name, categories, description, whether the description- is ours (inferred) and, for Soul 2.0, whether it's one of the curated moodboards.- SOUL_CATEGORIES — the picker's category tabs per model, in Higgsfield's order.- PHOTODUMP_PACKS — Soul 2.0 Photodump packs and Instadump packs: name, photo count, description.- FASHION_TEMPLATES — Fashion Factory templates: name, preview shot count, description.--No preview URLs are copied: Fuobe draws its own previews, so nothing is hot-linked from Higgsfield's CDN.--Run: python3 scripts/gen-higgsfield-presets.py-"""-import json-import re-from pathlib import Path--ROOT = Path(__file__).resolve().parent.parent-RESEARCH = json.loads((ROOT / "docs/research/higgsfield-image-studios.json").read_text())-OUT = ROOT / "src/lib/catalog/higgsfield-presets.generated.ts"--V1_TABS = ["New", "TikTok Core", "Instagram Aesthetics", "Camera Presets", "Beauty", "Mood", "Surreal", "Graphic Art"]-V2_TABS = ["Mood", "Styles", "Camera"]---def warn(msg):- print(f"warning: {msg}")---def slug(s):- return re.sub(r"[^a-z0-9]+", "-", s.lower()).strip("-")---def clean(s):- return re.sub(r"\s+", " ", s or "").strip()---presets = []-for p in RESEARCH["soulPresets"]:- model = p["model"]- if model not in ("soul-v1", "soul-v2"):- warn(f"unknown preset model {model}")- continue- cats = list(p.get("categories") or [])- if model == "soul-v2" and p.get("category") and p["category"] != "All presets":- cats = [p["category"]]- tabs = V1_TABS if model == "soul-v1" else V2_TABS- for c in cats:- if c not in tabs:- warn(f"{p['name']}: category {c} not in the {model} tabs")- entry = {- "id": p["id"],- "name": clean(p["name"]),- "model": model,- "categories": cats,- "description": clean(p["description"]),- "inferred": p.get("descriptionSource") == "inferred",- }- if model == "soul-v2":- entry["curated"] = bool(p.get("curatedMoodboard"))- presets.append(entry)--ids = [p["id"] for p in presets]-if len(ids) != len(set(ids)):- warn("duplicate preset ids")-counts = RESEARCH["counts"]-v1 = [p for p in presets if p["model"] == "soul-v1"]-v2 = [p for p in presets if p["model"] == "soul-v2"]-if len(v1) != counts["soulV1Presets"] or len(v2) != counts["soulV2Presets"]:- warn(f"preset counts {len(v1)}/{len(v2)} differ from research counts {counts['soulV1Presets']}/{counts['soulV2Presets']}")--packs = []-for t in RESEARCH["photodump"]["templates"]:- version = t.get("version", "")- if version.startswith("legacy"):- continue # the fixed 26-shot Soul v1 set; superseded by the packs below- product = "instadump" if version.startswith("Instadump") else "photodump"- packs.append({- "id": slug(t["name"]),- "higgsfieldId": t.get("id"),- "name": t["name"],- "count": t["count"],- "description": clean(t["description"]),- "inferred": t.get("descriptionSource") == "inferred",- "product": product,- **({"author": t["author"]} if t.get("author") else {}),- })--templates = []-for t in sorted(RESEARCH["fashionFactory"]["templates"], key=lambda x: x.get("priority", 99)):- templates.append({- "id": slug(t["name"]),- "higgsfieldId": t.get("id"),- "name": t["name"],- "shots": t["previewCount"],- "description": clean(t["description"]),- "inferred": t.get("descriptionSource") == "inferred",- })-if len(templates) != counts["fashionFactoryTemplates"]:- warn("fashion template count differs from research")--defaults = {"soul-v1": next((p["id"] for p in v1 if p["name"] == "General"), None), "soul-v2": next((p["id"] for p in v2 if p["name"] == "General"), None)}---def ts(v):- return json.dumps(v, ensure_ascii=False, indent=2)---OUT.write_text(- "// GENERATED by scripts/gen-higgsfield-presets.py from docs/research/higgsfield-image-studios.json — do not edit.\n"- "// Higgsfield's own preset ids (the API's style_id), names and categories; descriptions marked `inferred` are ours.\n\n"- "export type SoulPresetModel = \"soul-v1\" | \"soul-v2\";\n\n"- "export interface SoulPreset {\n"- " id: string;\n name: string;\n model: SoulPresetModel;\n categories: string[];\n description: string;\n"- " /** The description is Fuobe's (Higgsfield publishes none for this preset). */\n inferred: boolean;\n"- " /** Soul 2.0: one of the curated moodboards in the Moodboard panel. */\n curated?: boolean;\n}\n\n"- "export interface PackMeta {\n id: string;\n higgsfieldId?: string;\n name: string;\n count: number;\n description: string;\n inferred: boolean;\n"- " product: \"photodump\" | \"instadump\";\n author?: string;\n}\n\n"- "export interface FashionTemplateMeta {\n id: string;\n higgsfieldId?: string;\n name: string;\n /** Shots in Higgsfield's preview carousel (Fuobe's photoset makes one photo per shot). */\n shots: number;\n"- " description: string;\n inferred: boolean;\n}\n\n"- f"export const SOUL_CATEGORIES: Record<SoulPresetModel, string[]> = {ts({'soul-v1': V1_TABS, 'soul-v2': V2_TABS})};\n\n"- f"/** The default (\"General\") preset of each model. */\nexport const SOUL_DEFAULT: Record<SoulPresetModel, string> = {ts(defaults)};\n\n"- f"export const SOUL_PRESETS: SoulPreset[] = {ts(presets)};\n\n"- f"export const PHOTODUMP_PACKS: PackMeta[] = {ts(packs)};\n\n"- f"export const FASHION_TEMPLATES: FashionTemplateMeta[] = {ts(templates)};\n"-)-print(f"wrote {OUT.relative_to(ROOT)}: {len(v1)} Soul + {len(v2)} Soul 2.0 presets, {len(packs)} packs, {len(templates)} fashion templates")diff --git a/scripts/gen-soul-originals.py b/scripts/gen-soul-originals.pyindex e624a029..70580ddf 100644--- a/scripts/gen-soul-originals.py+++ b/scripts/gen-soul-originals.py@@ -43,7 +43,7 @@ OUT = ROOT / "src/lib/catalog/soul-originals.generated.ts"# The pickers' slim list (no LoRA detail, safe for the browser bundle): cards, tabs and the old-id map.CARDS_OUT = ROOT / "src/lib/catalog/soul-looks.generated.ts"-# Soul's picker tabs, in Soul's order (generic words; scripts/gen-higgsfield-presets.py uses the same lists).+# Soul's picker tabs, in Soul's order (generic words).V1_TABS = ["New", "TikTok Core", "Instagram Aesthetics", "Camera Presets", "Beauty", "Mood", "Surreal", "Graphic Art"]V2_TABS = ["Mood", "Styles", "Camera"]BASES = {"z-image-turbo": "z-image", "qwen-image-2512": "qwen-2512"}diff --git a/scripts/gen-studio-packs.py b/scripts/gen-studio-packs.pynew file mode 100644index 00000000..e493ef0c--- /dev/null+++ b/scripts/gen-studio-packs.py@@ -0,0 +1,80 @@+#!/usr/bin/env python3+"""+Generate src/lib/catalog/studio-packs.generated.ts from docs/research/higgsfield-image-studios.json (the research+of the image studios: what each pack and template is, as facts about the product).++Outputs:+ PHOTODUMP_PACKS — Photodump packs and Instadump packs: name, photo count, description.+ FASHION_TEMPLATES — Fashion Factory templates: name, shot count, description.++Each photo's prompt is Fuobe's own (src/lib/catalog/packs.ts). Soul's looks are generated by gen-soul-originals.py.+No ids, preview URLs or prompts of the original product are copied; Fuobe draws its own covers.++Run: python3 scripts/gen-studio-packs.py+"""+import json+import re+from pathlib import Path++ROOT = Path(__file__).resolve().parent.parent+RESEARCH = json.loads((ROOT / "docs/research/higgsfield-image-studios.json").read_text())+OUT = ROOT / "src/lib/catalog/studio-packs.generated.ts"+++def warn(msg):+ print(f"warning: {msg}")+++def slug(s):+ return re.sub(r"[^a-z0-9]+", "-", s.lower()).strip("-")+++def clean(s):+ return re.sub(r"\s+", " ", s or "").strip()+++counts = RESEARCH["counts"]++packs = []+for t in RESEARCH["photodump"]["templates"]:+ version = t.get("version", "")+ if version.startswith("legacy"):+ continue # the fixed 26-shot Soul v1 set; superseded by the packs below+ product = "instadump" if version.startswith("Instadump") else "photodump"+ packs.append({+ "id": slug(t["name"]),+ "name": t["name"],+ "count": t["count"],+ "description": clean(t["description"]),+ "inferred": t.get("descriptionSource") == "inferred",+ "product": product,+ **({"author": t["author"]} if t.get("author") else {}),+ })++templates = []+for t in sorted(RESEARCH["fashionFactory"]["templates"], key=lambda x: x.get("priority", 99)):+ templates.append({+ "id": slug(t["name"]),+ "name": t["name"],+ "shots": t["previewCount"],+ "description": clean(t["description"]),+ "inferred": t.get("descriptionSource") == "inferred",+ })+if len(templates) != counts["fashionFactoryTemplates"]:+ warn("fashion template count differs from research")++def ts(v):+ return json.dumps(v, ensure_ascii=False, indent=2)+++OUT.write_text(+ "// GENERATED by scripts/gen-studio-packs.py from docs/research/higgsfield-image-studios.json — do not edit.\n"+ "// Photodump / Instadump packs and Fashion Factory templates: names, photo counts and descriptions (`inferred` = ours).\n\n"+ "export interface PackMeta {\n id: string;\n name: string;\n count: number;\n description: string;\n inferred: boolean;\n"+ " product: \"photodump\" | \"instadump\";\n author?: string;\n}\n\n"+ "export interface FashionTemplateMeta {\n id: string;\n name: string;\n /** Shots in the template (Fuobe's photoset makes one photo per shot). */\n shots: number;\n"+ " description: string;\n inferred: boolean;\n}\n\n"+ f"export const PHOTODUMP_PACKS: PackMeta[] = {ts(packs)};\n\n"+ f"export const FASHION_TEMPLATES: FashionTemplateMeta[] = {ts(templates)};\n"+)+print(f"wrote {OUT.relative_to(ROOT)}: {len(packs)} packs, {len(templates)} fashion templates")diff --git a/skills/README.md b/skills/README.mdindex a4733966..a5871986 100644--- a/skills/README.md+++ b/skills/README.md@@ -2,7 +2,7 @@Each folder holds one skill: a `SKILL.md` with YAML frontmatter and Markdown instructions, in the[Agent Skills](https://agentskills.io/specification) format that Claude Code, Codex, Cursor and-Higgsfield Supercomputer read. Assist lists them under **Assist → Skills → Built-in**, the agent+other agents read. Assist lists them under **Assist → Skills → Built-in**, the agentloads one with its `load_skill` tool when a request matches, and typing `/name` at the start of amessage loads it for that chat. MCP clients get them as prompts.diff --git a/skills/ad-multiplier/SKILL.md b/skills/ad-multiplier/SKILL.mdindex 49500ed1..0c94fe12 100644--- a/skills/ad-multiplier/SKILL.md+++ b/skills/ad-multiplier/SKILL.md@@ -25,7 +25,7 @@ Prompt is exclusive with Hook/CTA; Hook and CTA can be combined.## Whole-ad variants (Prompt)Op `v2v` with the ad in `video` and the change described precisely ("same shots and timing; thecreator is now in a sunny kitchen; the product is the green bottle from the image"), product or-subject photos in `images`. Cloud `seedance-2-5` (video edit with references), `kling-o3`,+subject photos in `images`. Cloud `kling-o3` (video edit with up to 4 references), `happy-horse-video-edit`,`gemini-omni-flash`; open `oss-mixed-media` or `oss-wan22-vace-restyle`. Resolution 1080p bydefault (480p for quick tests). 3–5 variants per batch, each one `generate` job.diff --git a/skills/character-sheet/SKILL.md b/skills/character-sheet/SKILL.mdindex 06556109..a6e61ac5 100644--- a/skills/character-sheet/SKILL.md+++ b/skills/character-sheet/SKILL.md@@ -27,9 +27,9 @@ metadata:## 2. The sheetOne image, 16:9, plain light-grey background, four views side by side: full-body front, full-bodyback, full-body side profile, and a head-and-shoulders portrait. Same lighting in every view.-- Cloud: `nano-banana-pro` (best consistency across views) or `seedream-5-pro`; Higgsfield's- `ai-influencer` for photoreal influencers. Open source: `oss-qwen-edit` from a portrait, or- `oss-qwen-image` from text.+- Cloud: `nano-banana-pro` (best consistency across views) or `seedream-5-pro`; `fuobe-soul`+ (Fuobe Soul, with a look as `presetId`) for photoreal influencers from text. Open source: `oss-qwen-edit`+ from a portrait, or `oss-qwen-image` from text.- Prompt: "Character reference sheet of <description>. Four views on one sheet: front, back,side, close portrait. Identical face, hairstyle and outfit in every view. Neutral pose, armsslightly away from the body. Plain light-grey background, even studio light, no text."diff --git a/skills/marketing-studio-cards/SKILL.md b/skills/marketing-studio-cards/SKILL.mdindex f1c3569b..8bc2d86a 100644--- a/skills/marketing-studio-cards/SKILL.md+++ b/skills/marketing-studio-cards/SKILL.md@@ -37,7 +37,7 @@ Keep brand and product names exact. If a project source has a brand guide, read- One job per card (op `edit` with the product photo in `images`, so the product stays exact).Quote every text element exactly and say "no other text".- Models: `nano-banana-pro` (best product fidelity + text), `ideogram-4-5` (best typography),- Higgsfield's `marketing-studio-image` when connected. Open source: `oss-qwen-edit`.+ `gpt-image-2-5` (exact text). Open source: `oss-qwen-edit`.- Ratios: 4:5 feed, 9:16 Stories, 1:1 marketplaces, 16:9 banners. For "the full set", 4:5 + 9:16 + 1:1.## 4. QCdiff --git a/skills/short-film/SKILL.md b/skills/short-film/SKILL.mdindex 8a444686..6b240c41 100644--- a/skills/short-film/SKILL.md+++ b/skills/short-film/SKILL.md@@ -35,7 +35,7 @@ Show the shot list compactly, then go — the approval card is the user's checkp## 3. Shots- Cloud: `seedance-2-5` (default; 5–12 s, native audio, multi-shot), `kling-3` for strong motion,- `veo-3-1` for dialogue with lip sync, `cinema-studio-4` for Higgsfield's camera controls.+ `veo-3-1` for dialogue with lip sync, `fuobe-cinema` (Fuobe Cinema) for named camera moves.- Open source: `oss-wan22-14b-fast` (i2v), `oss-wan22-14b` for quality.- One `generate` job per shot with op `i2v`, `after` pointing at that shot's still. Write theprompt as action in time order, then camera, then light: "She turns from the window as thediff --git a/src/app/(studio)/models/page.tsx b/src/app/(studio)/models/page.tsxindex c2901a17..24c81803 100644--- a/src/app/(studio)/models/page.tsx+++ b/src/app/(studio)/models/page.tsx@@ -11,7 +11,7 @@ export default function Page() {<PageShell wide><PageHeadertitle="Models"- description="Every model Fuobe can drive. Cloud models run through your fal.ai, Replicate or Higgsfield key; open-source models run as ComfyUI workflows on your own GPU."+ description="Every model Fuobe can drive. Cloud models run through your fal.ai or Replicate key; open-source models run as ComfyUI workflows on your own GPU."/>{/* Slim rows only: the catalog (field maps, options, LoRAs) stays on the server. */}<ModelsTable models={MODELS.map(toModelRow)} />diff --git a/src/app/(studio)/settings/about/page.tsx b/src/app/(studio)/settings/about/page.tsxindex 52573ef5..3df4ac47 100644--- a/src/app/(studio)/settings/about/page.tsx+++ b/src/app/(studio)/settings/about/page.tsx@@ -71,7 +71,7 @@ export default async function Page() {{about.workflowCount} ComfyUI workflows{about.comfyui ? `, built for ComfyUI ${about.comfyui}` : ""}{about.builtAt ? <span className="text-muted-foreground"> · {about.builtAt}</span> : null}</Fact>- <Fact label="Paid models">fal.ai, Replicate and Higgsfield with your key: their terms and prices apply</Fact>+ <Fact label="Paid models">fal.ai and Replicate with your key: their terms and prices apply</Fact></dl>{list.notices.length > 0 && (diff --git a/src/app/api/brands/[id]/chat/confirm/route.ts b/src/app/api/brands/[id]/chat/confirm/route.tsindex a8b1e7b1..24a9ddf2 100644--- a/src/app/api/brands/[id]/chat/confirm/route.ts+++ b/src/app/api/brands/[id]/chat/confirm/route.ts@@ -1,10 +1,9 @@import { after } from "next/server";import { z } from "zod";-import { AD_RATIOS } from "@/lib/catalog/marketing";import { confirmProposal } from "@/server/ads";import { failure, readBody } from "@/server/marketing";-const Body = z.object({ messageId: z.string().min(1).max(20), engine: z.enum(["cloud", "open"]), route: z.enum(["fuobe", "higgsfield"]).optional(), ratio: z.enum(AD_RATIOS).optional() });+const Body = z.object({ messageId: z.string().min(1).max(20), engine: z.enum(["cloud", "open"]) });/** The user said yes to a chat proposal: the ads start rendering. */export async function POST(request: Request, ctx: RouteContext<"/api/brands/[id]/chat/confirm">) {@@ -12,7 +11,7 @@ export async function POST(request: Request, ctx: RouteContext<"/api/brands/[id]const body = await readBody(request, Body);if (body instanceof Response) return body;try {- const r = confirmProposal(id, body.messageId, body.engine, body.route, body.ratio);+ const r = confirmProposal(id, body.messageId, body.engine);after(() => r.run);return Response.json({ batchId: r.batchId, messages: r.chat }, { status: 201 });} catch (e) {diff --git a/src/app/api/generations/route.ts b/src/app/api/generations/route.tsindex f581a566..c54fcfd7 100644--- a/src/app/api/generations/route.ts+++ b/src/app/api/generations/route.ts@@ -2,6 +2,7 @@ import { connection } from "next/server";import { z } from "zod";import { FORMAT_INFO } from "@/lib/av/formats";import { OPERATION_LABELS, type VideoFormat } from "@/lib/catalog/types";+import { migrateRequest } from "@/lib/catalog/replaced";import { createGenerations, listGenerations, outputKind, previewGeneration } from "@/server/generations";import { ensureTrashPurge, listOptionsFrom } from "@/server/library";import { SignatureSchema } from "@/server/palettes";@@ -154,14 +155,18 @@ export async function POST(request: Request) {if (!parsed.success) {return Response.json({ error: parsed.error.issues.map((i) => `${i.path.join(".")}: ${i.message}`).join("; ") }, { status: 400 });}+ // A retired model id (an older script, a saved CLI or MCP call) runs on the model that replaced it (replaced.ts).+ const moved = migrateRequest(parsed.data as Parameters<typeof createGenerations>[0]);+ const req = moved.request;try {if (new URL(request.url).searchParams.get("preview") === "1") {- const { model, ...p } = previewGeneration(parsed.data as Parameters<typeof previewGeneration>[0]);- return Response.json({ ...p, modelId: model.id, modelName: model.name, engine: model.engine, kind: outputKind(p.op, model), opLabel: OPERATION_LABELS[p.op] ?? p.op });+ const { model, ...p } = previewGeneration(req);+ const notes = [...(moved.note ? [moved.note] : []), ...(p.notes ?? [])];+ return Response.json({ ...p, ...(notes.length && { notes }), modelId: model.id, modelName: model.name, engine: model.engine, kind: outputKind(p.op, model), opLabel: OPERATION_LABELS[p.op] ?? p.op });}- const items = createGenerations(parsed.data as Parameters<typeof createGenerations>[0]);+ const items = createGenerations(req);// What the run leaves out or changes (a LoRA that runs only on a GPU, a length the API rounds).- const notes = [...new Set(items.flatMap((g) => g.notes ?? []))];+ const notes = [...new Set([...(moved.note ? [moved.note] : []), ...items.flatMap((g) => g.notes ?? [])])];return Response.json({ items, ...(notes.length && { notes }) }, { status: 201 });} catch (e) {return Response.json({ error: (e as Error).message }, { status: 422 });diff --git a/src/app/api/providers/higgsfield/presets/route.ts b/src/app/api/providers/higgsfield/presets/route.tsdeleted file mode 100644index d66bf76e..00000000--- a/src/app/api/providers/higgsfield/presets/route.ts+++ /dev/null@@ -1,31 +0,0 @@-import { connection } from "next/server";-import { presetFallback } from "@/lib/catalog/packs";-import { higgsfieldKey, higgsfieldPresets } from "@/server/providers/higgsfield";--/**- * Soul styles, Genjutsu looks and Marketing Studio templates, straight from Higgsfield. Soul and- * Soul 2.0 fall back to the researched list (same ids, with categories) when there's no key or the- * live list fails, so the picker always works and the id is right once a key is added.- */-export async function GET(request: Request) {- await connection();- const source = new URL(request.url).searchParams.get("source") ?? "";- const fallback = presetFallback(source);- if (!higgsfieldKey()) {- if (fallback) return Response.json({ ...fallback, fallback: true, note: "Built-in list · add a Higgsfield key in Settings for previews" });- return Response.json({ items: [], error: "Add a Higgsfield API key in Settings to load these" });- }- try {- const items = await higgsfieldPresets(source);- if (!items.length && fallback) return Response.json({ ...fallback, fallback: true, note: "Higgsfield returned no styles — showing the built-in list" });- // Live items get the researched categories and descriptions where the ids match.- const known = new Map(fallback?.items.map((p) => [p.id, p]));- return Response.json({- items: items.map((p) => ({ ...p, categories: known.get(p.id)?.categories ?? (p.group ? [p.group] : []), description: known.get(p.id)?.description })),- ...(fallback && { categories: fallback.categories }),- });- } catch (e) {- if (fallback) return Response.json({ ...fallback, fallback: true, note: `Higgsfield's list didn't load (${(e as Error).message}) — showing the built-in list` });- return Response.json({ items: [], error: (e as Error).message }, { status: 502 });- }-}diff --git a/src/components/ads/ad-chat.tsx b/src/components/ads/ad-chat.tsxindex bfdb71b3..db04a8d8 100644--- a/src/components/ads/ad-chat.tsx+++ b/src/components/ads/ad-chat.tsx@@ -11,7 +11,6 @@ import { formatCost } from "@/lib/format";import { cn } from "@/lib/utils";import { useBrandChat, useEstimate, type ChatMessage } from "@/components/marketing/hooks";import { insertMention, mentionMatches, mentionQuery } from "./mention";-import { RoutePicker, type AdRouteChoice } from "./new-ads";const NAME_KEY = "fuobe:first-name";const CHIPS = ["A lifestyle ad with the product in everyday use", "A clean studio shot with a bold headline", "A playful, colorful ad for social media"];@@ -45,14 +44,11 @@ function useFirstName(): [string, (n: string) => void] {];}-function Proposal({ msg, brand, products, engine, choice, onConfirmed }: { msg: ChatMessage; brand: BrandKit; products: Product[]; engine: "cloud" | "open"; choice: AdRouteChoice; onConfirmed: (batchId: string) => void }) {+function Proposal({ msg, brand, products, engine, onConfirmed }: { msg: ChatMessage; brand: BrandKit; products: Product[]; engine: "cloud" | "open"; onConfirmed: (batchId: string) => void }) {const { confirm } = useBrandChat(brand.id);const p = msg.proposal!;const total = p.items.reduce((n, i) => n + i.count, 0);- // The same route as New ads (Higgsfield's one-shot ads only when that's what's picked there).- const route = choice.route;- const ratio = route === "higgsfield" ? choice.ratio : undefined;- const est = useEstimate<{ costUsd: number | null; demo: boolean }>("/api/ads/estimate", msg.batchId ? null : { brandId: brand.id, engine, items: p.items, direction: p.direction, route, ratio });+ const est = useEstimate<{ costUsd: number | null; demo: boolean }>("/api/ads/estimate", msg.batchId ? null : { brandId: brand.id, engine, items: p.items, direction: p.direction });const names = p.items.map((i) => products.find((x) => x.id === i.productId)?.name).filter(Boolean);return (<div className="mt-2 rounded-xl border bg-background p-3">@@ -66,16 +62,11 @@ function Proposal({ msg, brand, products, engine, choice, onConfirmed }: { msg:</p>) : (<>- {choice.available && (- <div className="mt-2">- <RoutePicker choice={choice} compact />- </div>- )}<buttontype="button"onClick={() =>confirm.mutate(- { messageId: msg.id, engine, route, ratio },+ { messageId: msg.id, engine },{ onSuccess: (r) => (toast.success(`Generating ${total} ads`, { duration: 1500 }), onConfirmed(r.batchId)), onError: (e) => toast.error((e as Error).message) },)}@@ -97,7 +88,7 @@ function Proposal({ msg, brand, products, engine, choice, onConfirmed }: { msg:* puts "@Name" in place of what was typed. `onClose` (the phone sheet) adds a close button and moves* "Clear chat" into a menu, so the two never sit on top of each other.*/-export function AdChat({ brand, products, engine, choice, onBatch, onClose, className }: { brand: BrandKit; products: Product[]; engine: "cloud" | "open"; choice: AdRouteChoice; onBatch: (batchId: string) => void; onClose?: () => void; className?: string }) {+export function AdChat({ brand, products, engine, onBatch, onClose, className }: { brand: BrandKit; products: Product[]; engine: "cloud" | "open"; onBatch: (batchId: string) => void; onClose?: () => void; className?: string }) {const { query, say, clear } = useBrandChat(brand.id);const [name, setName] = useFirstName();const [text, setText] = useState("");@@ -209,7 +200,7 @@ export function AdChat({ brand, products, engine, choice, onBatch, onClose, clas<div key={m.id} className={cn("flex", m.role === "user" ? "justify-end" : "justify-start")}><div className={cn("max-w-[88%] rounded-2xl px-3 py-2 text-[13px] leading-relaxed", m.role === "user" ? "bg-brand-faint text-foreground" : "bg-muted")}><p className="whitespace-pre-wrap">{m.text}</p>- {m.role === "assistant" && m.proposal && <Proposal msg={m} brand={brand} products={products} engine={engine} choice={choice} onConfirmed={onBatch} />}+ {m.role === "assistant" && m.proposal && <Proposal msg={m} brand={brand} products={products} engine={engine} onConfirmed={onBatch} />}</div></div>))}diff --git a/src/components/ads/ad-editor.tsx b/src/components/ads/ad-editor.tsxindex c3a45a76..547c0db3 100644--- a/src/components/ads/ad-editor.tsx+++ b/src/components/ads/ad-editor.tsx@@ -109,7 +109,7 @@ export function AdEditor({<DialogContent className="max-h-[94svh] gap-0 overflow-y-auto p-0 sm:max-w-4xl"><DialogHeader className="border-b px-5 py-4"><DialogTitle className="truncate pr-8">{title}</DialogTitle>- <DialogDescription>{baked ? "Made whole by Higgsfield Ads Studio — download it as is." : "Edit the words and layout; every format updates as you type."}</DialogDescription>+ <DialogDescription>{baked ? "This ad was drawn whole, words included — download it as is." : "Edit the words and layout; every format updates as you type."}</DialogDescription></DialogHeader><div className="grid min-w-0 gap-5 p-5 md:grid-cols-[minmax(0,1fr)_320px]"><div className="min-w-0">diff --git a/src/components/ads/brand-workspace.tsx b/src/components/ads/brand-workspace.tsxindex 0b6230df..014d4d01 100644--- a/src/components/ads/brand-workspace.tsx+++ b/src/components/ads/brand-workspace.tsx@@ -15,7 +15,7 @@ import { useBrand, useBrandActions, useCreatives } from "@/components/marketing/import { MarketingHeader, useMarketingEngine } from "@/components/marketing/shell";import { AdChat } from "./ad-chat";import { CreativeGrid } from "./creative-grid";-import { NewAds, useAdRoute } from "./new-ads";+import { NewAds } from "./new-ads";type Step = "kit" | "new" | "ads";@@ -45,7 +45,6 @@ export function BrandWorkspace({ brandId }: { brandId: string }) {const actions = useBrandActions(brandId);const [step, setStep] = useState<Step | null>(null);const [chat, setChat] = useState(false);- const choice = useAdRoute(engine);const brand = view.data?.brand;// The chat works for any kit that isn't being researched (a canceled or failed research keeps what it found).const chatReady = !!brand && brand.status !== "researching";@@ -78,7 +77,7 @@ export function BrandWorkspace({ brandId }: { brandId: string }) {}const chatPanel = (inSheet: boolean) =>- brand && <AdChat brand={brand} products={products} engine={engine} choice={choice} onBatch={() => (setStep("ads"), setChat(false))} onClose={inSheet ? () => setChat(false) : undefined} className="h-full" />;+ brand && <AdChat brand={brand} products={products} engine={engine} onBatch={() => (setStep("ads"), setChat(false))} onClose={inSheet ? () => setChat(false) : undefined} className="h-full" />;return (<div className="flex min-h-svh min-w-0 flex-col">@@ -150,7 +149,7 @@ export function BrandWorkspace({ brandId }: { brandId: string }) {<BrandKitForm key={brand.id} brand={brand} /></>)}- {current === "new" && <NewAds brand={brand} products={products} engine={engine} choice={choice} onCreated={() => setStep("ads")} />}+ {current === "new" && <NewAds brand={brand} products={products} engine={engine} onCreated={() => setStep("ads")} />}{current === "ads" &&(creatives.isLoading ? (<div className="grid grid-cols-2 gap-3 sm:grid-cols-4">diff --git a/src/components/ads/multiplier.tsx b/src/components/ads/multiplier.tsxindex cf377bb8..fdf42d58 100644--- a/src/components/ads/multiplier.tsx+++ b/src/components/ads/multiplier.tsx@@ -18,7 +18,7 @@ import { probeBlob, probeUrl } from "@/lib/media-probe";import { useModelAccess } from "@/lib/api";import { keepOffered, offered } from "@/lib/model-access";import { cn } from "@/lib/utils";-import { addRuns, send, useEstimate, useStatusFlags } from "@/components/marketing/hooks";+import { addRuns, send, useEstimate } from "@/components/marketing/hooks";import type { ModelInfo } from "@/components/marketing/model-info";import { RunsList } from "@/components/marketing/runs";import { EmptyIcon, MarketingHeader, useMarketingEngine } from "@/components/marketing/shell";@@ -175,7 +175,6 @@ export function AdMultiplier({ models }: { models: Record<string, ModelInfo> })const qc = useQueryClient();const { engine, setEngine } = useMarketingEngine();const access = useModelAccess();- const { higgsfield } = useStatusFlags();const [video, setVideo] = useState<SlotValue | null>(null);const [duration, setDuration] = useState<number | null>(null);const [range, setRange] = useState<Range | null>(null);@@ -195,8 +194,7 @@ export function AdMultiplier({ models }: { models: Record<string, ModelInfo> })const sections = hookOn || ctaOn;// Models switched off in Settings → Models & licences leave the menu, and the pick falls back to one that is on.const choices = useMemo(() => keepOffered(MULTIPLIER_MODELS[engine], (c) => offered(access, c.id, engine)), [access, engine]);- const fallback = engine === "cloud" && !higgsfield && choices.some((c) => c.id === "kling-o3") ? "kling-o3" : choices[0].id;- const modelId = picked && choices.some((c) => c.id === picked) ? picked : fallback;+ const modelId = picked && choices.some((c) => c.id === picked) ? picked : choices[0].id;const model = models[modelId];const maxImages = engine === "open" ? 1 : (model?.maxImages ?? 0);const cut = range ?? (duration ? initialClip(duration) : null);@@ -430,7 +428,6 @@ export function AdMultiplier({ models }: { models: Record<string, ModelInfo> }){choices.map((c) => (<SelectItem key={c.id} value={c.id}>{models[c.id]?.name ?? c.id}- {c.id === "seedance-2-5" && !higgsfield ? " · needs Higgsfield" : ""}</SelectItem>))}</SelectContent>diff --git a/src/components/ads/new-ads.tsx b/src/components/ads/new-ads.tsxindex 18631cf4..3f321dfc 100644--- a/src/components/ads/new-ads.tsx+++ b/src/components/ads/new-ads.tsx@@ -5,13 +5,11 @@ import { useMemo, useState } from "react";import { toast } from "sonner";import { Button } from "@/components/ui/button";import { AddFromLink, ProductCard, ProductDialog, UploadProductButton } from "@/components/brand/products";-import { AD_RATIOS, MAX_ADS_PER_PRODUCT, MAX_PRODUCTS_PER_RUN, type AdRatio, type BrandKit, type Product } from "@/lib/catalog/marketing";+import { MAX_ADS_PER_PRODUCT, MAX_PRODUCTS_PER_RUN, type BrandKit, type Product } from "@/lib/catalog/marketing";import { formatCost } from "@/lib/format";-import { cn } from "@/lib/utils";-import { useCreativeActions, useEstimate, useProductActions, useStatusFlags } from "@/components/marketing/hooks";+import { useCreativeActions, useEstimate, useProductActions } from "@/components/marketing/hooks";interface BatchEstimate {- route: "fuobe" | "higgsfield";modelName: string;total: number;costUsd: number | null;@@ -44,68 +42,16 @@ function Stepper({ value, onChange, label }: { value: number; onChange: (n: numb);}-/** Who makes a brand's ads: Fuobe (copy + visual + browser compositing) or Higgsfield's one-shot Ads Studio. */-export interface AdRouteChoice {- /** Higgsfield's route is on offer (cloud engine, Higgsfield key set). */- available: boolean;- route: "fuobe" | "higgsfield";- /** The one format Higgsfield renders per ad. */- ratio: AdRatio;- setRoute: (r: "fuobe" | "higgsfield") => void;- setRatio: (r: AdRatio) => void;-}--/**- * One route choice for New ads and the brand chat. It's derived from the status until the user picks,- * so it doesn't freeze at "Fuobe" while the status is still loading.- */-export function useAdRoute(engine: "cloud" | "open"): AdRouteChoice {- const { higgsfield } = useStatusFlags();- const [picked, setPicked] = useState<"fuobe" | "higgsfield" | null>(null);- const [ratio, setRatio] = useState<AdRatio>("4:5");- const available = engine === "cloud" && higgsfield;- return { available, route: available ? (picked ?? "higgsfield") : "fuobe", ratio, setRoute: setPicked, setRatio };-}--/** The route radios (and Higgsfield's format), shared by New ads and a chat proposal. */-export function RoutePicker({ choice, compact }: { choice: AdRouteChoice; compact?: boolean }) {- if (!choice.available) return null;- return (- <div className="flex flex-wrap items-center gap-2">- {!compact && <span className="text-[12px] font-medium text-muted-foreground">Made by</span>}- <div role="radiogroup" aria-label="Who makes the ads" className="inline-flex rounded-full bg-muted p-0.5">- {(["higgsfield", "fuobe"] as const).map((r) => (- <button key={r} type="button" role="radio" aria-checked={choice.route === r} onClick={() => choice.setRoute(r)} className={cn("h-7 rounded-full px-3 text-[12px] font-medium text-muted-foreground", choice.route === r && "bg-background text-foreground shadow-soft")}>- {r === "higgsfield" ? (compact ? "Higgsfield" : "Higgsfield Ads Studio") : compact ? "Fuobe" : "Fuobe (your fonts, editable words)"}- </button>- ))}- </div>- {choice.route === "higgsfield" && (- <div role="radiogroup" aria-label="Format" className="inline-flex rounded-full bg-muted p-0.5">- {AD_RATIOS.map((r) => (- <button key={r} type="button" role="radio" aria-checked={choice.ratio === r} onClick={() => choice.setRatio(r)} className={cn("h-7 rounded-full px-2.5 text-[12px] font-medium text-muted-foreground", choice.ratio === r && "bg-background text-foreground shadow-soft")}>- {r}- </button>- ))}- </div>- )}- {choice.route === "higgsfield" && !compact && <span className="text-[12px] text-muted-foreground">One format per ad, words drawn into the picture</span>}- </div>- );-}-/** Select products (≤10) → "How many ads to create?" (≤20 each, total price first) → Create. */-export function NewAds({ brand, products, engine, choice, onCreated }: { brand: BrandKit; products: Product[]; engine: "cloud" | "open"; choice: AdRouteChoice; onCreated: (batchId: string) => void }) {+export function NewAds({ brand, products, engine, onCreated }: { brand: BrandKit; products: Product[]; engine: "cloud" | "open"; onCreated: (batchId: string) => void }) {const { createBatch } = useCreativeActions(brand.id);const { remove } = useProductActions();const [selected, setSelected] = useState<string[]>(() => products.slice(0, MAX_PRODUCTS_PER_RUN).map((p) => p.id));const [counts, setCounts] = useState<Record<string, number>>({});const [editing, setEditing] = useState<Product | null>(null);- const effectiveRoute = choice.route;- const ratio = choice.ratio;const items = selected.filter((id) => products.some((p) => p.id === id)).map((productId) => ({ productId, count: counts[productId] ?? 4 }));const total = items.reduce((n, i) => n + i.count, 0);- const body = useMemo(() => (items.length ? { brandId: brand.id, engine, route: effectiveRoute, items, ratio: effectiveRoute === "higgsfield" ? ratio : undefined } : null), [brand.id, engine, effectiveRoute, items, ratio]);+ const body = useMemo(() => (items.length ? { brandId: brand.id, engine, items } : null), [brand.id, engine, items]);const est = useEstimate<BatchEstimate>("/api/ads/estimate", body);const toggle = (id: string) =>setSelected((s) => {@@ -162,7 +108,7 @@ export function NewAds({ brand, products, engine, choice, onCreated }: { brand:{items.length > 0 && (<section className="rounded-2xl border bg-background p-4 sm:p-5"><h3 className="text-[16px] font-semibold">How many ads to create?</h3>- <p className="text-[13px] text-muted-foreground">{effectiveRoute === "higgsfield" ? `Each ad comes in ${ratio}, made in one go by Higgsfield's Ads Studio.` : "Each ad comes in 1:1, 4:5 and 9:16, with a headline, copy and a call to action."}</p>+ <p className="text-[13px] text-muted-foreground">Each ad comes in 1:1, 4:5 and 9:16, with a headline, copy and a call to action.</p><ul className="mt-4 divide-y">{items.map((i) => {const p = products.find((x) => x.id === i.productId)!;@@ -178,11 +124,6 @@ export function NewAds({ brand, products, engine, choice, onCreated }: { brand:);})}</ul>- {choice.available && (- <div className="mt-4">- <RoutePicker choice={choice} />- </div>- )}<div className="mt-5 flex flex-wrap items-center justify-between gap-3 rounded-xl bg-muted/60 px-4 py-3"><div className="min-w-0 text-[13px]"><p className="font-medium">@@ -195,7 +136,7 @@ export function NewAds({ brand, products, engine, choice, onCreated }: { brand:{items.length > 3 && ` +${items.length - 3}`} and the brand</p><p className="text-[12px] text-muted-foreground">- {est.data?.blocker ?? (est.data ? `${est.data.modelName}${est.data.perAd != null && !est.data.demo ? ` · ${formatCost(est.data.perAd)} per ad` : ""}${effectiveRoute === "fuobe" ? ` · copy by ${est.data.copyBy === "llm" ? "your LLM" : "Fuobe's rules"}` : ""}` : "Pricing…")}+ {est.data?.blocker ?? (est.data ? `${est.data.modelName}${est.data.perAd != null && !est.data.demo ? ` · ${formatCost(est.data.perAd)} per ad` : ""} · copy by ${est.data.copyBy === "llm" ? "your LLM" : "Fuobe's rules"}` : "Pricing…")}</p></div><div className="flex items-center gap-3">diff --git a/src/components/ads/render.ts b/src/components/ads/render.tsindex bef54b22..53e3069c 100644--- a/src/components/ads/render.ts+++ b/src/components/ads/render.ts@@ -145,7 +145,7 @@ export interface RenderInput {theme: AdTheme;image?: string | null;logo?: string | null;- /** The visual already holds the words (Higgsfield Ads Studio): draw it alone. */+ /** The visual already holds the words (a baked ad, drawn whole before build plan O7): draw it alone. */baked?: boolean;}diff --git a/src/components/app-sidebar.tsx b/src/components/app-sidebar.tsxindex 1a417827..d8f6496d 100644--- a/src/components/app-sidebar.tsx+++ b/src/components/app-sidebar.tsx@@ -323,7 +323,7 @@ export function AppSidebar() {};const content = useMoreBelow<HTMLDivElement>();const status = useStatus().data;- const cloud = status && (status.providers.fal?.configured || status.providers.replicate?.configured || status.providers.higgsfield?.configured);+ const cloud = status && (status.providers.fal?.configured || status.providers.replicate?.configured);const comfy = status?.providers.comfyui?.configured;const mode = useEngineMode();const ready = mode === "open" ? comfy : mode === "cloud" ? cloud : cloud || comfy;diff --git a/src/components/command-palette.tsx b/src/components/command-palette.tsxindex 1b6ef782..3788bbdf 100644--- a/src/components/command-palette.tsx+++ b/src/components/command-palette.tsx@@ -47,7 +47,7 @@ export function CommandPaletteProvider({ children }: { children: React.ReactNode/** Settings sections the palette jumps to (ids in settings-form.tsx). */const SETTINGS: { id: string; label: string; icon: LucideIcon; keywords: string; href?: string }[] = [- { id: "cloud", label: "API keys", icon: KeyRound, keywords: "fal replicate higgsfield paid cloud connect" },+ { id: "cloud", label: "API keys", icon: KeyRound, keywords: "fal replicate paid cloud connect" },{ id: "comfyui", label: "ComfyUI server", icon: Server, keywords: "open source gpu url connect local" },{ id: "engine", label: "Engine mode", icon: Cpu, keywords: "open source cloud both" },{ id: "loras", label: "LoRAs", icon: Layers, keywords: "lora folder civitai key looks motions effects download licence" },diff --git a/src/components/elements-view.tsx b/src/components/elements-view.tsxindex f921001b..633a5fdf 100644--- a/src/components/elements-view.tsx+++ b/src/components/elements-view.tsx@@ -248,7 +248,7 @@ function HandleCopy({ handle }: { handle: string }) {);}-/** Training, Soul ID (a LoRA that runs), Retrain (only a Higgsfield Soul ID) or Demo (only a demo training's stand-in). */+/** Training, Soul ID (a LoRA that runs), Retrain (only an older Soul ID kept by reference) or Demo (only a demo training's stand-in). */function TrainedBadge({ el }: { el: StudioElement }) {const real = el.loras.some((l) => !l.demo && !isLegacySoulId(l));const legacy = !real && el.loras.some(isLegacySoulId);@@ -260,7 +260,7 @@ function TrainedBadge({ el }: { el: StudioElement }) {"pointer-events-none absolute top-2 left-2 inline-flex items-center gap-1 rounded-full bg-background/90 px-2 py-0.5 text-[11px] font-medium shadow-soft backdrop-blur",real || el.status === "training" ? "text-success" : "text-warning",)}- title={legacy ? "A Higgsfield Soul ID: retrain it for Fuobe Soul on the same photos" : undefined}+ title={legacy ? "An older Soul ID that no longer runs: retrain it for Fuobe Soul on the same photos" : undefined}>{el.status === "training" ? <Loader2 className="size-3 animate-spin" /> : <GraduationCap className="size-3" />}{label}diff --git a/src/components/get-started.tsx b/src/components/get-started.tsxindex 5f46d45e..79f8acef 100644--- a/src/components/get-started.tsx+++ b/src/components/get-started.tsx@@ -123,7 +123,7 @@ export function GetStarted({<div className={cn("mt-4 grid gap-3", mode === "both" ? "lg:grid-cols-3" : "md:grid-cols-2")}>{mode !== "open" && (<GuideCard icon={Cloud} title="Use paid models" cost={prices ? `Pay per run with your own key: ${prices}` : "Pay per run with your own key"}>- <p className="text-[13px] leading-relaxed text-muted-foreground">Nano Banana, Seedance, Kling, Veo and many more through one fal.ai key. Replicate and Higgsfield keys work too (Settings).</p>+ <p className="text-[13px] leading-relaxed text-muted-foreground">The Fuobe Originals hosted on open weights, plus Nano Banana, Seedance, Kling, Veo and many more, through one fal.ai key. A Replicate token works too (Settings).</p><ConnectFieldname="falKey"setting={get("falKey")}diff --git a/src/components/marketing/hooks.ts b/src/components/marketing/hooks.tsindex a5a762c7..85a0b5ec 100644--- a/src/components/marketing/hooks.ts+++ b/src/components/marketing/hooks.ts@@ -2,7 +2,7 @@import { keepPreviousData, useIsMutating, useMutation, useQuery, useQueryClient, type QueryClient } from "@tanstack/react-query";import { useEffect, useRef, useState } from "react";-import { useGenerationEvents, useStatus } from "@/lib/api";+import { useGenerationEvents } from "@/lib/api";import type { AdCreative, BrandKit, BrandKitFields, MarketingRun, Product, RunEstimate, RunFeature } from "@/lib/catalog/marketing";import type { Generation } from "@/lib/catalog/types";@@ -238,7 +238,7 @@ export function useCreativeActions(brandId: string) {retry: useMutation({ mutationFn: (id: string) => send<AdCreative>(`/api/ads/creatives/${id}/retry`, "POST"), onSuccess: done }),save: useMutation({ mutationFn: ({ id, url, ratio }: { id: string; url: string; ratio: string }) => send<{ generation: Generation }>(`/api/ads/creatives/${id}/save`, "POST", { url, ratio }) }),createBatch: useMutation({- mutationFn: (body: { brandId: string; engine: "cloud" | "open"; route?: "fuobe" | "higgsfield"; items: { productId: string; count: number }[]; direction?: string; ratio?: string }) =>+ mutationFn: (body: { brandId: string; engine: "cloud" | "open"; items: { productId: string; count: number }[]; direction?: string }) =>send<{ batchId: string; creatives: AdCreative[] }>("/api/ads/batches", "POST", body),onSuccess: (r) => {qc.setQueryData<AdCreative[]>(key, (old) => [...r.creatives, ...(old ?? [])]);@@ -272,7 +272,7 @@ export function useBrandChat(brandId: string) {onError: () => void qc.invalidateQueries({ queryKey: key }),}),confirm: useMutation({- mutationFn: (b: { messageId: string; engine: "cloud" | "open"; route?: "fuobe" | "higgsfield"; ratio?: string }) => send<{ batchId: string; messages: ChatMessage[] }>(`/api/brands/${brandId}/chat/confirm`, "POST", b),+ mutationFn: (b: { messageId: string; engine: "cloud" | "open" }) => send<{ batchId: string; messages: ChatMessage[] }>(`/api/brands/${brandId}/chat/confirm`, "POST", b),onSuccess: (r) => {set(r.messages);void qc.invalidateQueries({ queryKey: ["ads", brandId] });@@ -282,8 +282,3 @@ export function useBrandChat(brandId: string) {};}-/** What's connected, for picking routes in the UI (Higgsfield's own Ads Studio / Seedance edit). */-export function useStatusFlags() {- const s = useStatus().data;- return { higgsfield: !!s?.providers.higgsfield?.configured, demoMode: s?.demoMode };-}diff --git a/src/components/marketing/marketing-studio.tsx b/src/components/marketing/marketing-studio.tsxindex 7c42dcc3..4039308a 100644--- a/src/components/marketing/marketing-studio.tsx+++ b/src/components/marketing/marketing-studio.tsx@@ -16,7 +16,7 @@ import { formatCost } from "@/lib/format";import { useModelAccess } from "@/lib/api";import { keepOffered, offered } from "@/lib/model-access";import { cn } from "@/lib/utils";-import { addRuns, send, useBrands, useEstimate, useStatusFlags } from "./hooks";+import { addRuns, send, useBrands, useEstimate } from "./hooks";import type { MarketingRun } from "@/lib/catalog/marketing";import type { ModelInfo } from "./model-info";import { AvatarSlot, HookPicker, ProductSlot, SettingPicker, VoiceControl, type ProductChoice } from "./pickers";@@ -99,12 +99,12 @@ function withTemplate(d: Draft, t: MarketingTemplate | null, format?: FormatId):};}-function SettingsPanel({ draft, set, models, higgsfield, engine }: { draft: Draft; set: (p: Partial<Draft>) => void; models: Record<string, ModelInfo>; higgsfield: boolean; engine: "cloud" | "open" }) {+function SettingsPanel({ draft, set, models, engine }: { draft: Draft; set: (p: Partial<Draft>) => void; models: Record<string, ModelInfo>; engine: "cloud" | "open" }) {const [open, setOpen] = useState(false);const f = FORMATS[draft.format];// Models switched off in Settings → Models & licences leave the menu, and the pick falls back to one that is on.const access = useModelAccess();- const choices = keepOffered(formatModels(f, engine, { product: !!draft.product, avatar: !!draft.avatar, higgsfield }), (c) => offered(access, c.id, engine));+ const choices = keepOffered(formatModels(f, engine, { product: !!draft.product, avatar: !!draft.avatar }), (c) => offered(access, c.id, engine));const model = choices.find((c) => c.id === draft.modelId) ?? choices[0];const summary = [draft.aspectRatio, f.durations && `${draft.duration}s`, draft.batch > 1 && `×${draft.batch}`].filter(Boolean).join(" · ");const seg = (active: boolean) => cn("h-7 rounded-full px-2.5 text-[12px] font-medium text-muted-foreground", active && "bg-background text-foreground shadow-soft");@@ -274,7 +274,6 @@ function UrlParams({ onTemplate, onTab }: { onTemplate: (t: MarketingTemplate) =export function MarketingStudio({ models }: { models: Record<string, ModelInfo> }) {const qc = useQueryClient();const { engine, setEngine } = useMarketingEngine();- const { higgsfield } = useStatusFlags();const [tab, setTab] = useState<"templates" | "generations">("templates");const [category, setCategory] = useState<MarketingCategory | "all">("all");const [media, setMedia] = useState<MediaFilter>("all");@@ -482,7 +481,7 @@ export function MarketingStudio({ models }: { models: Record<string, ModelInfo>{f.text && <TextPanel draft={draft} set={set} template={template} />}{f.oneOf?.includes("website") && <WebsitePanel draft={draft} set={set} />}{f.brandKit && <BrandChip value={brandId} onChange={pickBrand} />}- <SettingsPanel draft={draft} set={set} models={models} higgsfield={higgsfield} engine={engine} />+ <SettingsPanel draft={draft} set={set} models={models} engine={engine} /></div><span className="hidden shrink-0 font-mono text-[12px] text-muted-foreground tabular-nums sm:inline">{est.isFetching && !est.data ? "…" : cost}</span><Tooltip>diff --git a/src/components/marketing/model-info.ts b/src/components/marketing/model-info.tsindex e96bff97..5a889520 100644--- a/src/components/marketing/model-info.ts+++ b/src/components/marketing/model-info.ts@@ -32,7 +32,7 @@ export function marketingModelInfo(): Record<string, ModelInfo> {const ids = new Set<string>(["text-llm", "oss-text-llm", "oss-qwen-image", "oss-infinitetalk-long", "ads-studio", "nano-banana-pro", "oss-qwen-edit"]);for (const f of Object.keys(FORMATS) as FormatId[])for (const engine of ["cloud", "open"] as const)- for (const has of [{ product: true, avatar: true, higgsfield: true }, { product: false, avatar: false, higgsfield: true }]) for (const c of formatModels(FORMATS[f], engine, has)) ids.add(c.id);+ for (const has of [{ product: true, avatar: true }, { product: false, avatar: false }]) for (const c of formatModels(FORMATS[f], engine, has)) ids.add(c.id);for (const engine of ["cloud", "open"] as const) {Object.values(UGC_MODELS[engine]).forEach((id) => ids.add(id));MULTIPLIER_MODELS[engine].forEach((c) => ids.add(c.id));diff --git a/src/components/moodboards/moodboard-panel.tsx b/src/components/moodboards/moodboard-panel.tsxindex 973bd0b1..6e175185 100644--- a/src/components/moodboards/moodboard-panel.tsx+++ b/src/components/moodboards/moodboard-panel.tsx@@ -21,12 +21,12 @@ type CuratedSet = (typeof SETS)[number][0];/*** The composer's Moodboard panel: Curated (Fuobe Soul's looks: Soul 2.0's 33 and Soul's 106) and My- * moodboards, search, Create moodboard. It opens on the model's own preset list (Soul's styles on Soul).+ * moodboards, search, Create moodboard. It opens on Soul 2.0's looks, or on the set of the look already picked.*/-export function MoodboardPanel({ value, onPick, presetSource }: { value?: MoodboardPick; onPick: (m?: MoodboardPick) => void; presetSource?: string }) {+export function MoodboardPanel({ value, onPick }: { value?: MoodboardPick; onPick: (m?: MoodboardPick) => void }) {const { data, isLoading } = useMoodboards();const [tab, setTab] = useState<"curated" | "mine">(value?.kind === "personal" ? "mine" : "curated");- const [set, setSet] = useState<CuratedSet>(value?.kind === "curated" ? (value.source ?? "soul-v2") : presetSource === "soul-v1" ? "soul-v1" : "soul-v2");+ const [set, setSet] = useState<CuratedSet>(value?.kind === "curated" ? (value.source ?? "soul-v2") : "soul-v2");const [cat, setCat] = useState("All presets");const [q, setQ] = useState("");const [creating, setCreating] = useState(false);diff --git a/src/components/palettes/signature-chips.tsx b/src/components/palettes/signature-chips.tsxindex c076c43e..4743215a 100644--- a/src/components/palettes/signature-chips.tsx+++ b/src/components/palettes/signature-chips.tsx@@ -9,7 +9,7 @@ import { CuratedCover } from "@/components/moodboards/cards";import { useMoodboards } from "@/components/moodboards/hooks";import { curatedLook, curatedPick, soulPick, toPick } from "@/components/moodboards/logic";import { MoodboardPanel } from "@/components/moodboards/moodboard-panel";-import { cardStrip, type MoodboardPick, type Signature } from "@/lib/catalog/palettes";+import { cardStrip, type Signature } from "@/lib/catalog/palettes";import type { Engine } from "@/lib/catalog/types";import { ColorSignaturePanel, toPalettePick } from "./color-signature-panel";import { usePalettes } from "./hooks";@@ -54,33 +54,17 @@ export default function SignatureChips({onChange,engine,lockByDefault,- presetSource,- styleId,- onStyleIdTaken,}: {value: Signature | undefined;onChange: (update: (s: Signature | undefined) => Signature) => void;engine: Engine;/** The model locks a picked palette unless it's turned off (Fuobe Soul's HEX on the open engine). */lockByDefault?: boolean;- /** The model's own preset list (options.presets.source): the Moodboard panel opens on it ("soul-v1" = Soul's styles). */- presetSource?: string;- /** A Soul `style_id` in the draft's settings (a reused Soul run): shown and kept as the Moodboard pick. */- styleId?: string;- onStyleIdTaken?: () => void;}) {const [colorOpen, setColorOpen] = useState(false);const [boardOpen, setBoardOpen] = useState(false);const pal = value?.palette;const mb = value?.moodboard;- // Soul's style picker is this chip: a style id restored by Reuse becomes the curated pick (a picked moodboard wins).- useEffect(() => {- if (!styleId) return;- // A live Higgsfield style the built-in list doesn't know still shows (and clears) as one.- const pick: MoodboardPick = soulPick(styleId) ?? { id: styleId, kind: "curated", name: "Soul style", status: "complete", ...(presetSource === "soul-v1" && { source: "soul-v1" as const }) };- onChange((s) => (s?.moodboard ? { ...s } : { ...s, moodboard: pick }));- onStyleIdTaken?.();- }, [styleId, presetSource, onChange, onStyleIdTaken]);return (<><Suspense fallback={null}>@@ -134,7 +118,6 @@ export default function SignatureChips({><MoodboardPanelvalue={mb}- presetSource={presetSource}onPick={(m) => {onChange((s) => ({ ...s, moodboard: m }));setBoardOpen(false);diff --git a/src/components/settings-form.tsx b/src/components/settings-form.tsxindex 9566feae..c4d8deaa 100644--- a/src/components/settings-form.tsx+++ b/src/components/settings-form.tsx@@ -56,7 +56,7 @@ const ENGINE_MODES = [title: "Open source + paid APIs",icon: Layers,body: "Every studio gets a Cloud / Open source switch. Use frontier paid models when you want them, your own GPU when you don't.",- needs: "A fal.ai, Replicate or Higgsfield key and/or a ComfyUI server",+ needs: "A fal.ai or Replicate key and/or a ComfyUI server",},{value: "open",@@ -70,7 +70,7 @@ const ENGINE_MODES = [title: "Paid APIs only",icon: Cloud,body: "Only hosted frontier models (Nano Banana, Seedance, Kling, Veo…). No GPU needed; open-source models are hidden.",- needs: "A fal.ai, Replicate or Higgsfield key",+ needs: "A fal.ai or Replicate key",},] as const;@@ -266,7 +266,7 @@ export function SettingsForm({ prices }: { prices?: string }) {<Sectionid="cloud"title="Paid API configuration"- description="One fal.ai key unlocks Nano Banana, Seedream, GPT Image, FLUX, Kling, Seedance, Veo 3.1, Wan, MiniMax, avatars and more. Replicate hosts a subset and is used as a fallback (or first, if you prefer it). Save & test checks a key before saving it."+ description="One fal.ai key runs the Fuobe Originals in the cloud (Soul, DoP, Genjutsu, Cinema: open weights with their LoRAs) and the partner models: Nano Banana, Seedream, GPT Image, FLUX, Kling, Seedance, Veo 3.1, Wan, MiniMax, avatars and more. Replicate hosts a subset and is used as a fallback (or first, if you prefer it). Save & test checks a key before saving it."inactive={mode === "open" ? "Not used in Open source only mode" : undefined}><ConnectField@@ -295,32 +295,15 @@ export function SettingsForm({ prices }: { prices?: string }) {</a>}/>- <ConnectField- id="higgsfield"- name="higgsfieldKey"- setting={get("higgsfieldKey")}- provider="higgsfield"- label="Higgsfield API key"- placeholder="KEY_ID:KEY_SECRET"- hint={- <span>- Unlocks Higgsfield's own models — Soul 2.0, Soul Cinema, Soul ID, Genjutsu, Cinema Studio, Marketing & Ads Studio — and is another route for Seedance, Kling, Wan and MiniMax.{" "}- <a href="https://console.higgsfield.ai" target="_blank" rel="noreferrer" className="inline-flex items-center gap-1 text-brand-text hover:underline">- Get a key <ExternalLink className="size-3" />- </a>- </span>- }- /><ChoiceFieldid="setting-cloud-provider"label="Preferred provider"value={get("cloudProvider")?.value || "auto"}onChange={set("cloudProvider")}options={[- { value: "auto", label: "Automatic", hint: "Tries fal.ai, then Replicate, then Higgsfield when a model is on more than one. Models only one provider hosts always use that one." },+ { value: "auto", label: "Automatic", hint: "Tries fal.ai, then Replicate when a model is on both. Models only one provider hosts always use that one." },{ value: "fal", label: "fal.ai first", hint: "fal.ai whenever it hosts the model. Models only one provider hosts always use that one." },{ value: "replicate", label: "Replicate first", hint: "Replicate whenever it hosts the model. Models only one provider hosts always use that one." },- { value: "higgsfield", label: "Higgsfield first", hint: "Higgsfield whenever it hosts the model. Models only one provider hosts always use that one." },]}/></Section>diff --git a/src/components/studio/composer.tsx b/src/components/studio/composer.tsxindex a91a28e0..4c4030f4 100644--- a/src/components/studio/composer.tsx+++ b/src/components/studio/composer.tsx@@ -71,7 +71,7 @@ import { FramesStrip, type FramesNotice } from "./frames-strip";import { loadFullCatalog, useCatalog } from "./catalog";import { Chip, chipBase, chipIdle } from "./chip";import { MediaSlot, SlotPreview, type SlotValue } from "./media-slot";-import { ControlsChip, ProviderPresetChip } from "./model-controls";+import { ControlsChip } from "./model-controls";import { ModelPicker } from "./model-picker";import { ELEMENT_ICONS, PromptInput, type PromptInputHandle } from "./prompt-input";import { radioKeys, radioTab } from "./radio-keys";@@ -505,8 +505,6 @@ export function Composer({ docked }: { docked: boolean }) {else extra[key] = v;return { params: { ...d.params, extra: Object.keys(extra).length ? extra : undefined } };});- // Studios with the Moodboard chip pick Soul's styles there (its Curated tab), not in a second Style chip.- const soulStyles = !!config.signature && (opts.presets?.source === "soul-v1" || opts.presets?.source === "soul-v2");const opNote = op && model ? routesFor(model, op)[0]?.note : undefined;// Booleans in, not the model's options object: the React Compiler keeps the memos above.const showPrompt = showsPrompt({ hidePrompt: config.hidePrompt, modelPrompt: config.modelPrompt }, { promptless: !!opts.promptless, promptOptional: !!opts.promptOptional }, preset?.userPrompt);@@ -702,12 +700,8 @@ export function Composer({ docked }: { docked: boolean }) {onChange={(update) => setDraft((d) => ({ signature: update(d.signature) }))}engine={engine}lockByDefault={locksByDefault(model?.id)}- presetSource={opts.presets?.source}- styleId={soulStyles ? (p.extra?.[opts.presets!.param] as string | undefined) : undefined}- onStyleIdTaken={() => setExtra(opts.presets!.param, undefined)}/>)}- {opts.presets && !soulStyles && <ProviderPresetChip spec={opts.presets} value={p.extra?.[opts.presets.param] as string | undefined} onChange={(id) => setExtra(opts.presets!.param, id)} />}{opts.looks && (<LookChipvalue={draft.presetId}@@ -730,7 +724,7 @@ export function Composer({ docked }: { docked: boolean }) {);const hasSecondary =!!config.frames ||- (!!model && (!!opts.voices?.length || !!opts.voiceClone || !!opts.languages || !!opts.presets || !!opts.controls || !!opts.looks)) ||+ (!!model && (!!opts.voices?.length || !!opts.voiceClone || !!opts.languages || !!opts.controls || !!opts.looks)) ||!!config.presetPicker ||!!config.signature ||preset?.type === "motion" ||diff --git a/src/components/studio/model-controls.tsx b/src/components/studio/model-controls.tsxindex d8c8066e..e340a546 100644--- a/src/components/studio/model-controls.tsx+++ b/src/components/studio/model-controls.tsx@@ -1,55 +1,10 @@"use client";-import { useQuery } from "@tanstack/react-query";-import { Ban, Check, Clapperboard, Loader2, Palette, Settings2 } from "lucide-react";-import { useMemo, useState } from "react";+import { Check, Clapperboard, Settings2 } from "lucide-react";import { Popover, PopoverContent, PopoverTrigger } from "@/components/ui/popover";import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from "@/components/ui/select";import type { ModelOptions } from "@/lib/catalog/types";-import { cn } from "@/lib/utils";-import { Chip, ClearableChip } from "./chip";--interface ProviderPreset {- id: string;- name: string;- preview?: string;- group?: string;- /** Soul presets: Higgsfield's picker categories and a one-line description (from the research list). */- categories?: string[];- description?: string;- /** Built-in list: a hue for the drawn preview (no images are hot-linked). */- hue?: number;-}--interface PresetList {- items: ProviderPreset[];- error?: string;- /** Category tabs (All is added in front). */- categories?: string[];- /** The built-in list stands in for Higgsfield's (no key, or the live list failed). */- fallback?: boolean;- note?: string;-}--/** A preset tile without a preview image: a soft gradient in the preset's hue with its initials. */-function DrawnPreview({ name, hue }: { name: string; hue: number }) {- const initials = name- .replace(/[^\p{L}\p{N} ]/gu, "")- .split(/\s+/)- .filter(Boolean)- .slice(0, 2)- .map((w) => w[0]?.toUpperCase())- .join("");- return (- <span- aria-hidden- className="grid size-full place-items-center font-heading text-[22px] text-white/90"- style={{ background: `linear-gradient(150deg, oklch(0.74 0.12 ${hue}), oklch(0.46 0.15 ${(hue + 50) % 360}))` }}- >- {initials}- </span>- );-}+import { Chip } from "./chip";const label = (v: string | number) =>String(v)@@ -59,129 +14,6 @@ const label = (v: string | number) =>.replace(/^f(\d)(\d)?/, (_, a, b) => `f/${a}${b ? `.${b}` : ""}`).replace(/^\w/, (c) => c.toUpperCase());-/** Style / template picker backed by the provider's own list (Soul styles, Genjutsu looks…). */-export function ProviderPresetChip({- spec,- value,- onChange,-}: {- spec: NonNullable<ModelOptions["presets"]>;- value?: string;- onChange: (id?: string, name?: string) => void;-}) {- const [open, setOpen] = useState(false);- const [q, setQ] = useState("");- const [tab, setTab] = useState("All");- const list = useQuery({- queryKey: ["provider-presets", spec.source],- queryFn: async () => (await (await fetch(`/api/providers/higgsfield/presets?source=${spec.source}`)).json()) as PresetList,- staleTime: 60 * 60 * 1000,- enabled: open || !!value,- });- const tabs = useMemo(() => {- const cats = list.data?.categories;- return cats?.length ? ["All", ...cats.filter((c) => list.data!.items.some((p) => p.categories?.includes(c)))] : [];- }, [list.data]);- const items = useMemo(- () =>- (list.data?.items ?? []).filter(- (p) => (!q || p.name.toLowerCase().includes(q.toLowerCase()) || p.description?.toLowerCase().includes(q.toLowerCase())) && (q || tab === "All" || p.categories?.includes(tab)),- ),- [list.data, q, tab],- );- const selected = list.data?.items.find((p) => p.id === value);- return (- <ClearableChip active={!!value && !spec.required} onClear={() => onChange(undefined)} clearLabel={`Clear ${spec.label.toLowerCase()}`}>- <Popover open={open} onOpenChange={setOpen}>- <PopoverTrigger asChild>- <Chip icon={Palette} active={!!value}>- {selected?.name ?? (value ? spec.label : `${spec.label}${spec.required ? "" : ": default"}`)}- </Chip>- </PopoverTrigger>- <PopoverContent className="w-[min(92vw,460px)] p-2" align="start" side="top" collisionPadding={12}>- <input- value={q}- onChange={(e) => setQ(e.target.value)}- placeholder={`Search ${spec.label.toLowerCase()}s`}- aria-label={`Search ${spec.label.toLowerCase()}s`}- className="mb-2 h-8 w-full rounded-md border bg-background px-2 text-sm outline-none focus:border-primary"- />- {tabs.length > 0 && !q && (- <div role="tablist" aria-label={`${spec.label} categories`} className="scrollbar-none -mx-0.5 mb-2 flex gap-1 overflow-x-auto px-0.5">- {tabs.map((t) => (- <button- key={t}- type="button"- role="tab"- aria-selected={tab === t}- onClick={() => setTab(t)}- className={cn(- "h-7 shrink-0 rounded-full px-2.5 text-[12px] font-medium transition-colors outline-none focus-visible:ring-2 focus-visible:ring-ring/50",- tab === t ? "bg-brand-faint text-brand-text" : "text-muted-foreground hover:bg-accent",- )}- >- {t}- </button>- ))}- </div>- )}- {list.data?.note && <p className="mb-2 px-0.5 text-[11.5px] text-muted-foreground">{list.data.note}</p>}- {list.isLoading ? (- <div className="grid h-40 place-items-center">- <Loader2 className="size-4 animate-spin text-muted-foreground" />- </div>- ) : list.data?.error && !items.length ? (- <p className="px-1 py-8 text-center text-[13px] text-muted-foreground">{list.data.error}</p>- ) : (- <div className="grid max-h-80 grid-cols-3 gap-1.5 overflow-y-auto">- {!spec.required && !q && (- <button- type="button"- aria-pressed={!value}- onClick={() => {- onChange(undefined);- setOpen(false);- }}- className={cn("group flex flex-col gap-1 rounded-lg p-1 text-left ring-primary transition hover:bg-accent", !value && "ring-2")}- >- <span className="grid aspect-[3/4] w-full place-items-center rounded-md bg-muted text-muted-foreground">- <Ban className="size-5" />- </span>- <span className="truncate px-0.5 text-[12px] font-medium">Default</span>- </button>- )}- {items.map((p) => (- <button- key={p.id}- type="button"- aria-pressed={value === p.id}- title={p.description}- onClick={() => {- onChange(p.id, p.name);- setOpen(false);- }}- className={cn("group flex flex-col gap-1 rounded-lg p-1 text-left ring-primary transition hover:bg-accent", value === p.id && "ring-2")}- >- <span className="aspect-[3/4] w-full overflow-hidden rounded-md bg-muted">- {p.preview ? (- // eslint-disable-next-line @next/next/no-img-element- <img src={p.preview} alt="" loading="lazy" className="size-full object-cover transition-transform duration-300 group-hover:scale-105" />- ) : p.hue !== undefined ? (- <DrawnPreview name={p.name} hue={p.hue} />- ) : null}- </span>- <span className="truncate px-0.5 text-[12px] font-medium">{p.name}</span>- </button>- ))}- {!items.length && q && <p className="col-span-3 py-8 text-center text-[13px] text-muted-foreground">No styles match “{q}”</p>}- </div>- )}- </PopoverContent>- </Popover>- </ClearableChip>- );-}-/** "Director" popover for enum settings such as genre, lens, light, grade and camera move. */export function ControlsChip({controls,diff --git a/src/components/studio/studio-page.tsx b/src/components/studio/studio-page.tsxindex 9b5a1ef7..26df094a 100644--- a/src/components/studio/studio-page.tsx+++ b/src/components/studio/studio-page.tsx@@ -13,6 +13,7 @@ import { useEngine, useGenerations } from "@/lib/api";import { claimStartToken, followEngineDefault, handoffKey, mergeHandoff, presetModel, promptShown, START_PARAM, withoutStart } from "@/lib/composer";import { positionsFrom } from "@/lib/catalog/keyframes";import { reuseSignature, withSignatureWords } from "@/lib/catalog/palettes";+import { migrateRequest, replacedBy } from "@/lib/catalog/replaced";import { matchSpokenLanguage } from "@/lib/speech-languages";import { SoulPresetCards } from "@/components/moodboards/soul-preset-cards";import type { StudioCatalog } from "@/lib/studio-catalog";@@ -86,7 +87,10 @@ function draftFromGeneration(g: Generation, config: StudioConfig, getModel: (id:// A run styled by the Color signature / Moodboard chips comes back as it was before they routed it,// with the picks on the chips (studios without the chips get the styled prompt instead).const signed = config.signature ? reuseSignature(g.request) : null;- const r = signed ? { ...g.request, modelId: signed.modelId, params: signed.params } : config.signature ? g.request : withSignatureWords(g.request);+ const asked = signed ? { ...g.request, modelId: signed.modelId, params: signed.params } : config.signature ? g.request : withSignatureWords(g.request);+ // A run on a model Fuobe retired comes back on the one that replaced it (src/lib/catalog/replaced.ts): a Soul style+ // becomes its Fuobe look, the retired API's own settings are dropped.+ const r = migrateRequest(asked).request;const imgs = signed ? signed.images : (r.inputs?.images ?? []);const imageKeys = config.slots.filter((s) => s.accept === "image" && s.key !== "endImage" && s.key !== "mask").map((s) => s.key);const slots: Draft["slots"] = {};@@ -261,6 +265,8 @@ function StudioBody({ header, tabs }: { header?: React.ReactNode; tabs?: React.Rconst reuse = useCallback((g: Generation) => {setDraft(draftFromGeneration(g, config, catalog.getModel));+ const moved = replacedBy(g.request.modelId);+ if (moved) toast(moved.note);if (g.engine !== engine) setEngine(g.engine);requestAnimationFrame(() => document.querySelector<HTMLTextAreaElement>("[data-composer] textarea")?.focus());},diff --git a/src/components/studio/vendor-mark.tsx b/src/components/studio/vendor-mark.tsxindex ccacfb13..4e1d96cf 100644--- a/src/components/studio/vendor-mark.tsx+++ b/src/components/studio/vendor-mark.tsx@@ -12,7 +12,6 @@ const MARKS: [RegExp, string, number][] = [[/^bytedance/i, "B", 200],[/^black forest/i, "F", 250],[/^kuaishou/i, "K", 30],- [/^higgsfield/i, "H", 155],[/^google/i, "G", 230],[/^elevenlabs/i, "11", 0],[/^openai/i, "O", 160],diff --git a/src/components/train-dialog.tsx b/src/components/train-dialog.tsxindex b1ca9925..62946435 100644--- a/src/components/train-dialog.tsx+++ b/src/components/train-dialog.tsx@@ -141,7 +141,7 @@ export function TrainDialog({ element, open, onOpenChange }: { element: StudioElconst originals = families.filter((f) => TRAINING_FAMILIES[f].original);const more = families.filter((f) => !TRAINING_FAMILIES[f].original);const busyAny = q.data?.items.some((t) => t.status === "queued" || t.status === "running");- // "Retrain for Fuobe Soul" on a Higgsfield Soul ID: the first option that can run now. Once a real Fuobe Soul LoRA+ // "Retrain for Fuobe Soul" on an older Soul ID: the first option that can run now. Once a real Fuobe Soul LoRA// is trained, the old Soul ID is only there to remove.const retrainTarget = targets.find((t) => t.family === "z-image-turbo" && !t.blocker && !t.demo) ?? targets.find((t) => t.family === "z-image-turbo" && !t.blocker);const replaced = hasFamily("z-image-turbo");@@ -304,7 +304,7 @@ export function TrainDialog({ element, open, onOpenChange }: { element: StudioEl{replaced ? <CircleCheck className="size-4 shrink-0 text-muted-foreground" /> : <AlertTriangle className="size-4 shrink-0 text-warning" />}{/* Wide enough to read on a phone: the buttons wrap under it there. */}<span className="min-w-0 flex-1 basis-48">- <span className="block font-medium">Higgsfield Soul ID</span>+ <span className="block font-medium">Older Soul ID</span><span className="block text-[12px] text-muted-foreground">{replaced ? "Your Fuobe Soul ID replaces it: remove it when you no longer need it." : "It can't be exported. Retrain on the same photos for Fuobe Soul."}</span>@@ -319,7 +319,7 @@ export function TrainDialog({ element, open, onOpenChange }: { element: StudioEl<RotateCcw /> Retrain for Fuobe Soul</Button>)}- <button onClick={() => void remove(l)} className="shrink-0 p-1 text-muted-foreground hover:text-destructive" aria-label="Remove the Higgsfield Soul ID">+ <button onClick={() => void remove(l)} className="shrink-0 p-1 text-muted-foreground hover:text-destructive" aria-label="Remove the older Soul ID"><Trash2 className="size-3.5" /></button></div>diff --git a/src/lib/av/katana.ts b/src/lib/av/katana.tsindex 8871c389..dcefd187 100644--- a/src/lib/av/katana.ts+++ b/src/lib/av/katana.ts@@ -1,3 +1,4 @@+import { currentModelId } from "@/lib/catalog/replaced";import type { ChainSlot, Engine, Generation, GenerationRequest } from "@/lib/catalog/types";import { FRAME_MODEL, frameParams } from "./frames";@@ -42,11 +43,14 @@ export const MOTION_MODELS: Record<Engine, MotionModel[]> = {export const KEYFRAME_MODEL: Record<Engine, string> = { cloud: "nano-banana-pro", open: "oss-qwen-edit" };-/** Katana's earlier motion models, now Fuobe Genjutsu's Original (a saved job or an API call may still name them). */-export const RETIRED_MOTION_MODELS: Record<string, string> = { "genjutsu-motion-transfer": "fuobe-genjutsu-motion", "oss-wan22-animate": "fuobe-genjutsu-motion" };+/** Katana's earlier open motion model, now Fuobe Genjutsu's Original (a saved job or an API call may still name it). */+export const RETIRED_MOTION_MODELS: Record<string, string> = { "oss-wan22-animate": "fuobe-genjutsu-motion" };++/** The motion model a saved job or an API call means: a retired one (src/lib/catalog/replaced.ts too) gives way to what replaced it. */+export const currentMotionModel = (id: string): string => RETIRED_MOTION_MODELS[id] ?? currentModelId(id);export const motionModel = (engine: Engine, id?: string): MotionModel => {- const want = id && (RETIRED_MOTION_MODELS[id] ?? id);+ const want = id && currentMotionModel(id);return MOTION_MODELS[engine].find((m) => m.id === want) ?? MOTION_MODELS[engine][0];};diff --git a/src/lib/catalog/apps.ts b/src/lib/catalog/apps.tsindex 95665391..87a78c18 100644--- a/src/lib/catalog/apps.ts+++ b/src/lib/catalog/apps.ts@@ -409,7 +409,15 @@ export const APPS: Preset[] = [userPrompt: "required",placeholder: "Who are they? e.g. “a 26-year-old surfer and photographer from Lisbon, freckles, sun-bleached curls”",prompt: "{prompt}",- cloud: { modelId: "ai-influencer", op: "t2i" },+ // Nano Banana Pro draws the sheet in the cloud, as the AI Influencer builder does (build plan O7; O10 moves it to+ // Fuobe Soul's sheet).+ cloud: {+ modelId: "nano-banana-pro",+ op: "t2i",+ params: { aspectRatio: "16:9" },+ promptTemplate:+ "A character sheet of an original character: {prompt}. Front, three-quarter, profile and back views side by side on a plain light studio background, full body, the same face, hairstyle and outfit in every view, photorealistic, high detail.",+ },// The Soul Cast sheet workflow: Z-Image Turbo draws the turnaround (front, three-quarter, profile, back) and// cuts it into the four views, which make a better character element than one wide sheet.open: {diff --git a/src/lib/catalog/canvas.ts b/src/lib/catalog/canvas.tsindex 564deb27..a8c1ae87 100644--- a/src/lib/catalog/canvas.ts+++ b/src/lib/catalog/canvas.ts@@ -12,6 +12,7 @@ import { getModel, getPreset, MODELS, supportsOp } from "./index";import { dualEngine, onEngine, runsOn } from "./engines";import { chainedWaitMessage, keyframeChain } from "./keyframes";import { estimateCost, inferOperation, planGeneration, routesFor, type Plan } from "./plan";+import { replacedBy } from "./replaced";import {OPERATION_LABELS,OPERATION_OUTPUT,@@ -1640,9 +1641,27 @@ export function withCurrentElements(graph: CanvasGraph, elements: readonly Elemeconst NODE_TYPES = new Set(Object.keys(NODE_SPECS));-/** Drop unknown node types, dangling edges and edges into handles that don't exist (after a model or op change). */+/**+ * A node saved on a model Fuobe retired (src/lib/catalog/replaced.ts) moves to the one that replaced it, keeping the+ * settings it offers; an Original runs in the cloud, where the retired model ran.+ */+function currentNode(n: CanvasNode): CanvasNode {+ const to = replacedBy(n.data.modelId);+ const m = to && getModel(to.id);+ if (!m) return n;+ return { ...n, data: { ...n.data, modelId: m.id, params: sanitizeParams(m, n.data.params), engine: dualEngine(m) ? (n.data.engine ?? "cloud") : undefined } };+}++/** A stored board with its nodes on retired models moved to the ones that replaced them (read before any save). */+export const withCurrentModels = (graph: CanvasGraph): CanvasGraph =>+ graph.nodes.some((n) => replacedBy(n.data.modelId)) ? { ...graph, nodes: graph.nodes.map(currentNode) } : graph;++/**+ * Drop unknown node types, dangling edges and edges into handles that don't exist (after a model or op change), and+ * move nodes on a retired model to the one that replaced it.+ */export function cleanGraph(graph: CanvasGraph): CanvasGraph {- const nodes = graph.nodes.filter((n) => NODE_TYPES.has(n.type));+ const nodes = graph.nodes.filter((n) => NODE_TYPES.has(n.type)).map(currentNode);const g: CanvasGraph = { ...graph, nodes, edges: [] };const ids = new Set(nodes.map((n) => n.id));const seen = new Set<string>();diff --git a/src/lib/catalog/cinema.ts b/src/lib/catalog/cinema.tsindex 92fef899..2eb0925b 100644--- a/src/lib/catalog/cinema.ts+++ b/src/lib/catalog/cinema.ts@@ -1654,7 +1654,7 @@ function planLocation(input: CinemaGenerateInput, ctx: CinemaContext): CinemaPlafunction videoModelFor(op: Operation, input: CinemaGenerateInput, notes: string[]): ModelDef {if (input.engine === "open") return op === "extend" ? getModel("oss-wan22-vace-extend")! : modelOn(CINEMA_MODEL, "open")!;const picked = pickModel("video", input);- if (picked.routes.some((r) => r.op === op && r.provider !== "higgsfield")) return picked;+ if (picked.routes.some((r) => r.op === op)) return picked;const cinema = modelOn(CINEMA_MODEL, "cloud")!;notes.push(`${picked.name} ${op === "extend" ? "extends" : "makes prequels"} through ${cinema.name}`);return cinema;diff --git a/src/lib/catalog/cloud-models.generated.ts b/src/lib/catalog/cloud-models.generated.tsindex 582de357..1ceefeb3 100644--- a/src/lib/catalog/cloud-models.generated.ts+++ b/src/lib/catalog/cloud-models.generated.ts@@ -7582,6 +7582,103 @@ export const CLOUD_MODELS: ModelDef[] = ["inputSeconds": true}},+ {+ "id": "happy-horse-1-1",+ "name": "Happy Horse 1.1",+ "vendor": "Alibaba",+ "family": "happy-horse",+ "engine": "cloud",+ "kind": "video",+ "tagline": "Alibaba's expressive character-animation video model",+ "routes": [+ {+ "op": "t2v",+ "provider": "fal",+ "endpoint": "alibaba/happy-horse/v1.1/text-to-video",+ "map": {+ "seed": "seed",+ "aspectRatio": "aspect_ratio",+ "resolution": "resolution",+ "duration": {+ "key": "duration",+ "type": "number"+ }+ }+ },+ {+ "op": "i2v",+ "provider": "fal",+ "endpoint": "alibaba/happy-horse/v1.1/image-to-video",+ "map": {+ "image": "image_url",+ "seed": "seed",+ "resolution": "resolution",+ "duration": {+ "key": "duration",+ "type": "number"+ }+ }+ },+ {+ "op": "ref2v",+ "provider": "fal",+ "endpoint": "alibaba/happy-horse/v1.1/reference-to-video",+ "map": {+ "images": "image_urls",+ "seed": "seed",+ "aspectRatio": "aspect_ratio",+ "resolution": "resolution",+ "duration": {+ "key": "duration",+ "type": "number"+ },+ "maxImages": 9+ }+ }+ ],+ "options": {+ "seed": true,+ "aspectRatios": [+ "16:9",+ "9:16",+ "1:1",+ "4:3",+ "3:4",+ "21:9",+ "9:21",+ "5:4",+ "4:5"+ ],+ "resolutions": [+ "720p",+ "1080p"+ ],+ "durations": [+ 3,+ 4,+ 5,+ 6,+ 8,+ 10,+ 15+ ],+ "maxImages": 9+ },+ "defaults": {+ "aspectRatio": "16:9",+ "duration": 5,+ "resolution": "720p"+ },+ "pricing": {+ "unit": "second",+ "usd": 0.14,+ "note": "720p; 1080p $0.18/s",+ "byResolution": {+ "720p": 0.14,+ "1080p": 0.18+ }+ }+ },{"id": "lucy-edit-pro","name": "Lucy Edit Pro",@@ -11039,7 +11136,7 @@ export const CLOUD_MODELS: ModelDef[] = ["family": "mirelo","engine": "cloud","kind": "audio",- "tagline": "Higgsfield's sound-effects model \u2014 layered, cinematic SFX up to 10 minutes",+ "tagline": "Layered, cinematic sound effects for a clip or a prompt, up to 10 minutes","routes": [{"op": "sfx",@@ -11213,7 +11310,7 @@ export const CLOUD_MODELS: ModelDef[] = ["family": "seed-audio","engine": "cloud","kind": "audio",- "tagline": "Higgsfield's Seed Audio: speech, ambience, music and Foley from one prompt",+ "tagline": "Speech, ambience, music and Foley from one prompt","routes": [{"op": "sfx",@@ -11282,7 +11379,7 @@ export const CLOUD_MODELS: ModelDef[] = ["family": "sonilo","engine": "cloud","kind": "audio",- "tagline": "Higgsfield's music model \u2014 full tracks up to 10 minutes",+ "tagline": "Full music tracks up to 10 minutes","routes": [{"op": "music",@@ -11904,7 +12001,7 @@ export const CLOUD_MODELS: ModelDef[] = ["family": "seedream","engine": "cloud","kind": "image",- "tagline": "The model Higgsfield Layers runs on: background + up to 16 named, positioned layers",+ "tagline": "Splits a picture into a background and up to 16 named, positioned layers","routes": [{"op": "layers",@@ -16396,7 +16493,7 @@ export const CLOUD_MODELS: ModelDef[] = ["2k"],"maxOutputs": 4,- "maxImages": 10+ "maxImages": 5},"defaults": {"aspectRatio": "1:1",@@ -16405,7 +16502,7 @@ export const CLOUD_MODELS: ModelDef[] = ["pricing": {"unit": "image","usd": 0.06,- "note": "1K medium on fal; low $0.04; 2K $0.06\u20130.08; +$0.01 per input image; Higgsfield $0.04 (1K) / $0.08 (2K)",+ "note": "1K medium on fal; low $0.04; 2K $0.06\u20130.08; +$0.01 per input image","byResolution": {"1k": 0.06,"2k": 0.08diff --git a/src/lib/catalog/elements.ts b/src/lib/catalog/elements.tsindex 4f1a6875..998ae052 100644--- a/src/lib/catalog/elements.ts+++ b/src/lib/catalog/elements.ts@@ -45,7 +45,7 @@ export interface ElementLora {trainedAt?: number;/** A demo training's stand-in (no key, no GPU): nothing was trained, so no run uses it. */demo?: true;- /** A Higgsfield Soul ID (before O3): a `custom_reference_id` only Higgsfield's Soul models take. Retrain for Fuobe Soul. */+ /** An older Soul ID (Higgsfield's, before O3): a reference id no current model takes. Retrain for Fuobe Soul. */referenceId?: string;}@@ -133,16 +133,9 @@ export function applyMentions(req: GenerationRequest, model: ModelDef, elements:// LoRAs win over references for the model they were trained on.const loras: LoraRef[] = [...(req.loras ?? [])];const viaLora = new Set<string>();- let extra = req.params?.extra;for (const el of mentioned) {- // A Higgsfield Soul ID on Higgsfield's own Soul models (until build plan O7 removes them): one character per run.- const legacy = el.loras.find((x) => x.referenceId && x.modelId === model.id && x.engine === model.engine);- if (legacy?.referenceId && !extra?.custom_reference_id) {- extra = { ...extra, custom_reference_id: legacy.referenceId, custom_reference_strength: legacy.strength ?? 1 };- viaLora.add(el.id);- continue;- }- // A trained LoRA of this model's family, on the engine it runs on (Fuobe Soul ID).+ // A trained LoRA of this model's family, on the engine it runs on (Fuobe Soul ID). An older Soul ID kept only by+ // a reference id runs nowhere: the element is retrained on its photos.const l = identityFor(el.loras, model);if (!l) continue;loras.push({ file: l.file, ...(l.url && { url: l.url }), strength: l.strength ?? 1, trigger: l.trigger, ...(l.own && { own: true as const }) });@@ -227,7 +220,7 @@ export function applyMentions(req: GenerationRequest, model: ModelDef, elements:prompt,inputs: { ...req.inputs, images: images.length ? images : undefined },loras: loras.length ? loras : undefined,- params: extra !== req.params?.extra || newShots ? { ...req.params, extra, ...(newShots ? { shots: newShots } : {}) } : req.params,+ params: newShots ? { ...req.params, shots: newShots } : req.params,},mentioned,notes,diff --git a/src/lib/catalog/genjutsu.ts b/src/lib/catalog/genjutsu.tsindex 8fbd9a85..963e56fe 100644--- a/src/lib/catalog/genjutsu.ts+++ b/src/lib/catalog/genjutsu.ts@@ -57,6 +57,7 @@ import {} from "./remove-object";import { firstFramePrompt, getShortsPreset, lookFromPreset, planShorts, segmentPrompt, type PlanStep, type ShortsLook } from "./shorts";import { getModel } from "./index";+import { REPLACED_BY } from "./replaced";import { soulLook } from "./soul";import type { ChainSlot, Engine, GenerationRequest, PixelPoint } from "./types";@@ -576,15 +577,11 @@ export const MAKERS: Maker[] = [export const getMaker = (id: string | undefined, engine?: Engine) => MAKERS.find((m) => m.id === id && (!engine || m.engine === engine));/**- * Setups and links made before the Originals name Higgsfield's Genjutsu or the round-4 open models: the Original that- * replaced each (the look and tier are kept where they still mean something).+ * Setups and links made before the Originals name a retired Genjutsu model (src/lib/catalog/replaced.ts) or the+ * round-4 open models: the Original that replaced each (the look and tier are kept where they still mean something).*/export const LEGACY_MAKERS: Record<string, string> = {- "genjutsu-motion-transfer": ORIGINALS.motion,- "genjutsu-lite-motion-transfer": ORIGINALS.motionLite,- "genjutsu-object-swap": ORIGINALS.swap,- "genjutsu-lite-object-swap": ORIGINALS.swapLite,- "genjutsu-restyle": ORIGINALS.restyle,+ ...Object.fromEntries(Object.entries(REPLACED_BY).flatMap(([id, r]) => (Object.values(ORIGINALS).includes(r.id as never) ? [[id, r.id]] : []))),"oss-wan22-animate": ORIGINALS.motion,"oss-vace-swap": ORIGINALS.swap,"oss-wan22-vace-restyle": ORIGINALS.restyle,@@ -1523,7 +1520,7 @@ export function decodeSetup(input: string): GenjutsuSetup | null {const out: GenjutsuSetup = { mode };if (o.e === "cloud" || o.e === "open") out.engine = o.e;const model = str(o.x, 80);- // Codes from before the Originals name Higgsfield's Genjutsu or the round-4 open models: the Original that replaced it.+ // Codes from before the Originals name a retired Genjutsu model or the round-4 open models: the Original that replaced it.const current = model && (LEGACY_MAKERS[model] ?? model);if (current && getMaker(current)) out.model = current;if (o.t === "standard" || o.t === "high") out.tier = o.t;@@ -1541,7 +1538,7 @@ export function decodeSetup(input: string): GenjutsuSetup | null {const images = files(l.i, GENJUTSU.maxLookImages);if (images.length) out.look = { kind: "custom", images, ...(str(l.w, 300) ? { words: str(l.w, 300) } : {}) };}- // Higgsfield's looks ("h") are gone: the code opens without a look.+ // The retired provider's looks ("h") are gone: the code opens without a look.}const refs = files(o.r, GENJUTSU.maxReferences);if (refs.length) out.references = refs;diff --git a/src/lib/catalog/higgsfield-models.generated.ts b/src/lib/catalog/higgsfield-models.generated.tsdeleted file mode 100644index c6bf58ec..00000000--- a/src/lib/catalog/higgsfield-models.generated.ts+++ /dev/null@@ -1,2099 +0,0 @@-// GENERATED by scripts/gen-higgsfield-models.py from docs/research/higgsfield-api.json — do not edit.-import type { ModelDef, ModelRoute } from "./types";--export const HIGGSFIELD_MODELS: ModelDef[] = [- {- "id": "soul-2",- "name": "Higgsfield Soul 2.0",- "vendor": "Higgsfield",- "family": "soul",- "engine": "cloud",- "kind": "image",- "tagline": "Higgsfield's fashion-grade photo model — real skin, real light, 100+ styles",- "badges": [- "top",- "new"- ],- "routes": [- {- "op": "t2i",- "provider": "higgsfield",- "endpoint": "higgsfield-ai/soul/v2/standard",- "map": {- "seed": "seed",- "seedRange": [- 1,- 1000000- ],- "aspectRatio": "aspect_ratio",- "resolution": "resolution"- }- },- {- "op": "edit",- "provider": "higgsfield",- "endpoint": "higgsfield-ai/soul/v2/image-to-image",- "map": {- "image": "image_url",- "seed": "seed",- "seedRange": [- 1,- 1000000- ],- "aspectRatio": "aspect_ratio",- "resolution": "resolution"- }- }- ],- "options": {- "seed": true,- "aspectRatios": [- "9:16",- "16:9",- "4:3",- "3:4",- "1:1",- "2:3",- "3:2"- ],- "resolutions": [- "720p",- "1080p"- ],- "maxImages": 1,- "presets": {- "source": "soul-v2",- "param": "style_id",- "label": "Style"- }- },- "defaults": {- "aspectRatio": "3:4",- "resolution": "1080p"- },- "identity": {- "provider": "higgsfield",- "version": "v2"- },- "pricing": {- "unit": "image",- "usd": 0.0057,- "note": "Higgsfield list price"- }- },- {- "id": "soul-cinema",- "name": "Higgsfield Soul Cinema",- "vendor": "Higgsfield",- "family": "soul",- "engine": "cloud",- "kind": "image",- "tagline": "Cinematic stills with film-set lighting and composition",- "badges": [- "new"- ],- "routes": [- {- "op": "t2i",- "provider": "higgsfield",- "endpoint": "higgsfield-ai/soul/cinema",- "map": {- "seed": "seed",- "seedRange": [- 1,- 1000000- ],- "aspectRatio": "aspect_ratio",- "resolution": "resolution"- }- }- ],- "options": {- "seed": true,- "aspectRatios": [- "9:16",- "16:9",- "4:3",- "3:4",- "1:1",- "2:3",- "3:2"- ],- "resolutions": [- "720p",- "1080p"- ]- },- "defaults": {- "aspectRatio": "16:9",- "resolution": "1080p"- },- "identity": {- "provider": "higgsfield",- "version": "cinema"- }- },- {- "id": "soul-1",- "name": "Higgsfield Soul",- "vendor": "Higgsfield",- "family": "soul",- "engine": "cloud",- "kind": "image",- "tagline": "The original Soul look with the full style library",- "badges": [],- "routes": [- {- "op": "t2i",- "provider": "higgsfield",- "endpoint": "higgsfield-ai/soul/standard",- "map": {- "seed": "seed",- "seedRange": [- 1,- 1000000- ],- "aspectRatio": "aspect_ratio",- "resolution": "resolution"- }- }- ],- "options": {- "seed": true,- "aspectRatios": [- "9:16",- "16:9",- "4:3",- "3:4",- "1:1",- "2:3",- "3:2"- ],- "resolutions": [- "720p",- "1080p"- ],- "presets": {- "source": "soul-v1",- "param": "style_id",- "label": "Style"- }- },- "defaults": {- "aspectRatio": "3:4",- "resolution": "720p"- },- "identity": {- "provider": "higgsfield",- "version": "v1"- },- "pricing": {- "unit": "image",- "usd": 0.0938,- "note": "Higgsfield list price"- }- },- {- "id": "marketing-studio-image",- "name": "Marketing Studio Image",- "vendor": "Higgsfield",- "family": "marketing-studio",- "engine": "cloud",- "kind": "image",- "tagline": "Ad-ready product shots and posters from a product photo and a template",- "badges": [],- "routes": [- {- "op": "t2i",- "provider": "higgsfield",- "endpoint": "marketing-studio/image",- "map": {- "aspectRatio": "aspect_ratio",- "resolution": "resolution"- }- },- {- "op": "edit",- "provider": "higgsfield",- "endpoint": "marketing-studio/image",- "map": {- "images": "image_urls",- "aspectRatio": "aspect_ratio",- "resolution": "resolution"- }- }- ],- "options": {- "aspectRatios": [- "auto",- "1:1",- "3:2",- "2:3",- "4:3",- "3:4",- "16:9",- "9:16",- "21:9"- ],- "resolutions": [- "1k",- "2k",- "4k"- ],- "controls": [- {- "param": "quality",- "label": "Detail",- "values": [- "low",- "medium",- "high"- ],- "default": "high"- }- ],- "maxImages": 16,- "presets": {- "source": "marketing-studio",- "param": "preset_id",- "label": "Template"- }- },- "defaults": {- "aspectRatio": "auto",- "resolution": "2k"- },- "pricing": {- "unit": "image",- "usd": 0.0162,- "note": "Higgsfield list price"- }- },- {- "id": "ads-studio",- "name": "Ads Studio",- "vendor": "Higgsfield",- "family": "ads-studio",- "engine": "cloud",- "kind": "image",- "tagline": "A brief and a product photo in, a batch of static ad concepts out",- "badges": [],- "routes": [- {- "op": "t2i",- "provider": "higgsfield",- "endpoint": "higgsfield/ads-studio/v1.0",- "map": {- "aspectRatio": "aspect_ratio",- "numOutputs": "batch_size"- }- },- {- "op": "edit",- "provider": "higgsfield",- "endpoint": "higgsfield/ads-studio/v1.0",- "map": {- "images": "image_urls",- "aspectRatio": "aspect_ratio",- "numOutputs": "batch_size"- }- }- ],- "options": {- "aspectRatios": [- "1:1",- "4:5",- "5:4",- "16:9",- "9:16",- "4:3",- "3:4",- "21:9",- "3:2",- "2:3",- "2:1",- "1:2",- "3:1",- "1:3"- ],- "maxOutputs": 4,- "maxImages": 10- },- "defaults": {- "aspectRatio": "1:1"- },- "pricing": {- "unit": "image",- "usd": 0.084,- "note": "Higgsfield list price"- }- },- {- "id": "cinema-studio-4",- "name": "Cinema Studio 4.0",- "vendor": "Higgsfield",- "family": "cinema-studio",- "engine": "cloud",- "kind": "video",- "tagline": "Higgsfield's director model on Seedance 2.5 — genre, lens, light, grade and camera move controls",- "badges": [- "top",- "audio",- "new"- ],- "routes": [- {- "op": "t2v",- "provider": "higgsfield",- "endpoint": "higgsfield/cinema-studio/4.0",- "map": {- "aspectRatio": "aspect_ratio",- "resolution": "resolution",- "duration": {- "key": "duration",- "type": "number"- },- "generateAudio": "generate_audio"- }- },- {- "op": "ref2v",- "provider": "higgsfield",- "endpoint": "higgsfield/cinema-studio/4.0",- "map": {- "images": "image_urls",- "videos": "video_urls",- "audios": "audio_urls",- "aspectRatio": "aspect_ratio",- "resolution": "resolution",- "duration": {- "key": "duration",- "type": "number"- },- "generateAudio": "generate_audio"- }- }- ],- "options": {- "aspectRatios": [- "16:9",- "4:3",- "1:1",- "3:4",- "9:16",- "21:9"- ],- "resolutions": [- "480p",- "720p"- ],- "durations": [- 4,- 5,- 6,- 8,- 10,- 12,- 15,- 20,- 30- ],- "audio": true,- "controls": [- {- "param": "genre",- "label": "Genre",- "values": [- "epic",- "drama",- "noir",- "comedy",- "horror",- "action"- ]- },- {- "param": "era",- "label": "Era",- "values": [- "1960s",- "1980s",- "1990s",- "2000s",- "2020s"- ]- },- {- "param": "light",- "label": "Lighting",- "values": [- "silhouette",- "practicals",- "window",- "overhead-fall",- "contre-jour",- "soft-cross"- ]- },- {- "param": "pacing",- "label": "Pacing",- "values": [- "chaotic",- "dynamic",- "calm",- "single-shot"- ]- },- {- "param": "camera_model",- "label": "Camera",- "values": [- "modern",- "35mm-film",- "8mm-film",- "dv-camcorder"- ]- },- {- "param": "camera_lens",- "label": "Lens",- "values": [- "clean-sharp",- "anamorphic",- "vintage-anamorphic",- "warm-vintage",- "halation-vintage"- ]- },- {- "param": "camera_aperture",- "label": "Aperture",- "values": [- "f14-wide-open",- "f4-moderate",- "f11-deep-focus"- ]- },- {- "param": "camera_movement",- "label": "Camera move",- "values": [- "snorricam",- "robot-arm",- "tilt-up",- "rack-focus",- "tilt-down",- "pov",- "pan-left",- "crane-up",- "pan-right",- "crane-down",- "side-tracking",- "pedestal-up",- "pedestal-down",- "handheld",- "tracking",- "drone-orbit",- "dolly-zoom",- "aerial-pullback",- "static-shot",- "bullet-time",- "whip-pan",- "slow-zoom-in",- "arc-left",- "slow-zoom-out",- "arc-right",- "truck-right",- "dolly-in",- "truck-left",- "dolly-out",- "slider-right",- "crush-zoom",- "slider-left",- "helicopter-shot"- ]- },- {- "param": "color_palette",- "label": "Color grade",- "values": [- "static-noon",- "twilight-fable",- "back-row-kissing-seats",- "on-the-other-side-of-the-porthole",- "the-emerald-ambush",- "highway-standoff",- "the-faded-fresco",- "oil-ochre",- "the-mountain-convent",- "ghost-in-the-code",- "pink-velvet",- "two-days-to-the-horizon",- "industrial-fog",- "stairs-go-up",- "field-post",- "home-is-the-next-gas-station",- "glossy-flesh",- "the-crimson-ballet",- "neon-rain-at-midnight",- "the-morning-after-rain",- "the-iron-borough",- "the-ground",- "the-investigation",- "turquoise-mirage",- "a-dream-in-color",- "breakfast-on-schedule",- "favela-gold",- "a-hotel-for-one",- "after-dark",- "crimson-vigi",- "the-neighbors-saw-everything",- "the-grey-channel",- "mirage-at-noon",- "bubblegum-boulevard",- "yellow-room",- "the-earth-keeps-things-reluctantly",- "tropic-fever-dream",- "bioluminescent-night",- "dont-turn-it-off-im-watching",- "the-silk-curtain-falls",- "the-butterfly",- "playtime",- "wallpaper-romance",- "overtime",- "the-way-home-is-longer",- "everyone-speaks-in-whispers",- "runaway-summer",- "amber-wasteland",- "the-circus",- "gasoline-sunset"- ]- }- ],- "maxVideos": 10,- "maxAudios": 10,- "maxImages": 30- },- "defaults": {- "aspectRatio": "16:9",- "duration": 5,- "resolution": "720p"- },- "pricing": {- "unit": "second",- "usd": 0.4623,- "note": "Higgsfield list price"- }- },- {- "id": "genjutsu-motion-transfer",- "name": "Genjutsu Motion Transfer",- "vendor": "Higgsfield",- "family": "genjutsu",- "engine": "cloud",- "kind": "video",- "tagline": "Keep a clip's motion, swap in your characters and world",- "badges": [- "new"- ],- "routes": [- {- "op": "motion-transfer",- "provider": "higgsfield",- "endpoint": "higgsfield/genjutsu/motion-transfer/v1.0",- "map": {- "images": "image_urls",- "video": "video_url",- "resolution": "resolution"- }- }- ],- "options": {- "resolutions": [- "720p",- "480p",- "1080p"- ],- "maxImages": 8- },- "defaults": {- "resolution": "720p"- },- "pricing": {- "unit": "second",- "usd": 0.681,- "note": "Higgsfield list price"- }- },- {- "id": "genjutsu-object-swap",- "name": "Genjutsu Object Swap",- "vendor": "Higgsfield",- "family": "genjutsu",- "engine": "cloud",- "kind": "video",- "tagline": "Replace one thing in a video and keep everything else",- "badges": [],- "routes": [- {- "op": "v2v",- "provider": "higgsfield",- "endpoint": "higgsfield/genjutsu/object-swap/v1.0",- "map": {- "images": "image_urls",- "video": "video_url",- "resolution": "resolution"- }- },- {- "op": "video-swap",- "provider": "higgsfield",- "endpoint": "higgsfield/genjutsu/object-swap/v1.0",- "map": {- "omitEmptyPrompt": true,- "images": "image_urls",- "video": "video_url",- "resolution": "resolution"- }- }- ],- "options": {- "resolutions": [- "720p",- "480p",- "1080p"- ],- "maxImages": 8,- "promptOptional": true- },- "defaults": {- "resolution": "720p"- },- "pricing": {- "unit": "second",- "usd": 0.681,- "note": "Higgsfield list price"- }- },- {- "id": "genjutsu-restyle",- "name": "Genjutsu Restyle",- "vendor": "Higgsfield",- "family": "genjutsu",- "engine": "cloud",- "kind": "video",- "tagline": "Restyle footage with 30+ looks while keeping motion and audio",- "badges": [],- "routes": [- {- "op": "v2v",- "provider": "higgsfield",- "endpoint": "higgsfield/genjutsu/restyle/v1.0",- "map": {- "images": "image_urls",- "video": "video_url",- "resolution": "resolution"- }- }- ],- "options": {- "resolutions": [- "480p",- "720p",- "1080p"- ],- "maxImages": 5,- "presets": {- "source": "genjutsu-restyle",- "param": "preset_id",- "label": "Style",- "required": true- }- },- "defaults": {- "resolution": "720p"- }- },- {- "id": "genjutsu-lite-object-swap",- "name": "Genjutsu Lite Object Swap",- "vendor": "Higgsfield",- "family": "genjutsu",- "engine": "cloud",- "kind": "video",- "tagline": "Swap objects, characters or clothes from 1–8 references in clips up to 15 s",- "badges": [- "new"- ],- "routes": [- {- "op": "video-swap",- "provider": "higgsfield",- "endpoint": "higgsfield/genjutsu-light/object-swap/v1.0",- "map": {- "omitEmptyPrompt": true,- "images": "image_urls",- "video": "video_url",- "resolution": "resolution"- }- }- ],- "options": {- "promptOptional": true,- "resolutions": [- "720p",- "480p",- "1080p"- ],- "maxImages": 8- },- "defaults": {- "resolution": "720p"- },- "pricing": {- "unit": "second",- "usd": 0.1,- "note": "Higgsfield list price"- }- },- {- "id": "genjutsu-lite-motion-transfer",- "name": "Genjutsu Lite Motion Transfer",- "vendor": "Higgsfield",- "family": "genjutsu",- "engine": "cloud",- "kind": "video",- "tagline": "A clip's motion on your characters, for clips up to 15 s",- "badges": [- "new"- ],- "routes": [- {- "op": "motion-transfer",- "provider": "higgsfield",- "endpoint": "higgsfield/genjutsu-light/motion-transfer/v1.0",- "map": {- "images": "image_urls",- "video": "video_url",- "resolution": "resolution"- }- }- ],- "options": {- "resolutions": [- "720p",- "480p",- "1080p"- ],- "maxImages": 8- },- "defaults": {- "resolution": "720p"- },- "pricing": {- "unit": "second",- "usd": 0.1,- "note": "Higgsfield list price"- }- },- {- "id": "happy-horse-1-1",- "name": "Happy Horse 1.1",- "vendor": "Alibaba",- "family": "happy-horse",- "engine": "cloud",- "kind": "video",- "tagline": "Alibaba's expressive character-animation video model",- "badges": [],- "routes": [- {- "op": "t2v",- "provider": "higgsfield",- "endpoint": "alibaba/happy-horse/v1.1/text-to-video",- "map": {- "seed": "seed",- "seedRange": [- 1,- 2147483646- ],- "aspectRatio": "aspect_ratio",- "resolution": "resolution",- "duration": {- "key": "duration",- "type": "number"- }- }- },- {- "op": "i2v",- "provider": "higgsfield",- "endpoint": "alibaba/happy-horse/v1.1/image-to-video",- "map": {- "image": "image_url",- "seed": "seed",- "seedRange": [- 1,- 2147483646- ],- "resolution": "resolution",- "duration": {- "key": "duration",- "type": "number"- }- }- },- {- "op": "ref2v",- "provider": "higgsfield",- "endpoint": "alibaba/happy-horse/v1.1/reference-to-video",- "map": {- "images": "image_urls",- "seed": "seed",- "seedRange": [- 1,- 2147483646- ],- "resolution": "resolution",- "duration": {- "key": "duration",- "type": "number"- }- }- }- ],- "options": {- "seed": true,- "aspectRatios": [- "16:9",- "9:16",- "1:1",- "4:3",- "3:4"- ],- "resolutions": [- "720p",- "1080p"- ],- "durations": [- 3,- 4,- 5,- 6,- 8,- 10,- 12,- 15- ],- "maxImages": 4- },- "defaults": {- "aspectRatio": "16:9",- "duration": 5- },- "pricing": {- "unit": "second",- "usd": 0.14,- "note": "Higgsfield list price"- }- }-];--export const HIGGSFIELD_ROUTES: Record<string, ModelRoute[]> = {- "seedance-2-5": [- {- "op": "t2v",- "provider": "higgsfield",- "endpoint": "bytedance/seedance-2.5/text-to-video",- "map": {- "aspectRatio": "aspect_ratio",- "resolution": "resolution",- "duration": {- "key": "duration",- "type": "number"- },- "generateAudio": "generate_audio"- }- },- {- "op": "i2v",- "provider": "higgsfield",- "endpoint": "bytedance/seedance-2.5/image-to-video",- "map": {- "image": "image_url",- "endImage": "end_image_url",- "resolution": "resolution",- "duration": {- "key": "duration",- "type": "number"- },- "generateAudio": "generate_audio"- }- },- {- "op": "flf2v",- "provider": "higgsfield",- "endpoint": "bytedance/seedance-2.5/image-to-video",- "map": {- "image": "image_url",- "endImage": "end_image_url",- "resolution": "resolution",- "duration": {- "key": "duration",- "type": "number"- },- "generateAudio": "generate_audio"- }- },- {- "op": "ref2v",- "provider": "higgsfield",- "endpoint": "bytedance/seedance-2.5/reference-to-video",- "map": {- "images": "image_urls",- "videos": "video_urls",- "audios": "audio_urls",- "aspectRatio": "aspect_ratio",- "resolution": "resolution",- "duration": {- "key": "duration",- "type": "number"- },- "generateAudio": "generate_audio"- }- },- {- "op": "v2v",- "provider": "higgsfield",- "endpoint": "bytedance/seedance-2.5/video-edit",- "map": {- "images": "image_urls",- "video": "video_url",- "videos": "video_urls",- "audios": "audio_urls",- "resolution": "resolution",- "generateAudio": "generate_audio"- }- },- {- "op": "extend",- "provider": "higgsfield",- "endpoint": "bytedance/seedance-2.5/video-extend",- "map": {- "images": "image_urls",- "video": "video_url",- "videos": "video_urls",- "audios": "audio_urls",- "resolution": "resolution",- "duration": {- "key": "duration",- "type": "number"- },- "generateAudio": "generate_audio"- }- }- ],- "seedance-2-0": [- {- "op": "t2v",- "provider": "higgsfield",- "endpoint": "bytedance/seedance-2.0/text-to-video",- "map": {- "aspectRatio": "aspect_ratio",- "resolution": "resolution",- "duration": {- "key": "duration",- "type": "number"- },- "generateAudio": "generate_audio"- }- },- {- "op": "i2v",- "provider": "higgsfield",- "endpoint": "bytedance/seedance-2.0/image-to-video",- "map": {- "image": "image_url",- "endImage": "end_image_url",- "resolution": "resolution",- "duration": {- "key": "duration",- "type": "number"- },- "generateAudio": "generate_audio"- }- },- {- "op": "flf2v",- "provider": "higgsfield",- "endpoint": "bytedance/seedance-2.0/image-to-video",- "map": {- "image": "image_url",- "endImage": "end_image_url",- "resolution": "resolution",- "duration": {- "key": "duration",- "type": "number"- },- "generateAudio": "generate_audio"- }- },- {- "op": "ref2v",- "provider": "higgsfield",- "endpoint": "bytedance/seedance-2.0/reference-to-video",- "map": {- "images": "image_urls",- "videos": "video_urls",- "audios": "audio_urls",- "aspectRatio": "aspect_ratio",- "resolution": "resolution",- "duration": {- "key": "duration",- "type": "number"- },- "generateAudio": "generate_audio"- }- }- ],- "kling-3": [- {- "op": "t2v",- "provider": "higgsfield",- "endpoint": "kling-video/v3.0/pro/text-to-video",- "map": {- "aspectRatio": "aspect_ratio",- "duration": {- "key": "duration",- "type": "number"- },- "generateAudio": {- "key": "sound",- "on": "on",- "off": "off"- },- "multiShot": {- "key": "multi_prompt",- "durationType": "number",- "flag": "multi_shots"- }- }- },- {- "op": "i2v",- "provider": "higgsfield",- "endpoint": "kling-video/v3.0/pro/image-to-video",- "map": {- "image": "image_url",- "endImage": "last_image_url",- "duration": {- "key": "duration",- "type": "number"- },- "generateAudio": {- "key": "sound",- "on": "on",- "off": "off"- },- "multiShot": {- "key": "multi_prompt",- "durationType": "number",- "flag": "multi_shots"- }- }- },- {- "op": "flf2v",- "provider": "higgsfield",- "endpoint": "kling-video/v3.0/pro/image-to-video",- "map": {- "image": "image_url",- "endImage": "last_image_url",- "duration": {- "key": "duration",- "type": "number"- },- "generateAudio": {- "key": "sound",- "on": "on",- "off": "off"- },- "multiShot": {- "key": "multi_prompt",- "durationType": "number",- "flag": "multi_shots"- }- }- }- ],- "kling-3-4k": [- {- "op": "t2v",- "provider": "higgsfield",- "endpoint": "kling-video/v3.0/4k/text-to-video",- "map": {- "aspectRatio": "aspect_ratio",- "duration": {- "key": "duration",- "type": "number"- },- "generateAudio": {- "key": "sound",- "on": "on",- "off": "off"- },- "multiShot": {- "key": "multi_prompt",- "durationType": "number",- "flag": "multi_shots"- }- }- },- {- "op": "i2v",- "provider": "higgsfield",- "endpoint": "kling-video/v3.0/4k/image-to-video",- "map": {- "image": "image_url",- "endImage": "last_image_url",- "duration": {- "key": "duration",- "type": "number"- },- "generateAudio": {- "key": "sound",- "on": "on",- "off": "off"- },- "multiShot": {- "key": "multi_prompt",- "durationType": "number",- "flag": "multi_shots"- }- }- },- {- "op": "flf2v",- "provider": "higgsfield",- "endpoint": "kling-video/v3.0/4k/image-to-video",- "map": {- "image": "image_url",- "endImage": "last_image_url",- "duration": {- "key": "duration",- "type": "number"- },- "generateAudio": {- "key": "sound",- "on": "on",- "off": "off"- },- "multiShot": {- "key": "multi_prompt",- "durationType": "number",- "flag": "multi_shots"- }- }- }- ],- "kling-3-turbo": [- {- "op": "t2v",- "provider": "higgsfield",- "endpoint": "kling-video/v3.0-turbo/text-to-video",- "map": {- "aspectRatio": "aspect_ratio",- "resolution": "resolution",- "duration": {- "key": "duration",- "type": "number"- }- }- },- {- "op": "i2v",- "provider": "higgsfield",- "endpoint": "kling-video/v3.0-turbo/image-to-video",- "map": {- "image": "image_url",- "resolution": "resolution",- "duration": {- "key": "duration",- "type": "number"- }- }- }- ],- "kling-o3": [- {- "op": "flf2v",- "provider": "higgsfield",- "endpoint": "kling-video/o3/first-last-frame",- "map": {- "image": "first_frame_url",- "endImage": "last_frame_url",- "aspectRatio": "aspect_ratio",- "duration": {- "key": "duration",- "type": "number"- },- "generateAudio": {- "key": "sound",- "on": "on",- "off": "off"- },- "multiShot": {- "key": "multi_prompt",- "durationType": "number",- "flag": "multi_shots"- }- }- },- {- "op": "ref2v",- "provider": "higgsfield",- "endpoint": "kling-video/o3/image-reference",- "map": {- "image": "first_frame_url",- "images": "image_urls",- "aspectRatio": "aspect_ratio",- "duration": {- "key": "duration",- "type": "number"- },- "generateAudio": {- "key": "sound",- "on": "on",- "off": "off"- },- "multiShot": {- "key": "multi_prompt",- "durationType": "number",- "flag": "multi_shots"- }- }- },- {- "op": "v2v",- "provider": "higgsfield",- "endpoint": "kling-video/o3/video-edit",- "map": {- "images": "image_urls",- "videoArray": "video_urls"- }- },- {- "op": "remove-object",- "provider": "higgsfield",- "endpoint": "kling-video/o3/video-edit",- "map": {- "images": "image_urls",- "videoArray": "video_urls"- }- },- {- "op": "video-swap",- "provider": "higgsfield",- "endpoint": "kling-video/o3/video-edit",- "map": {- "images": "image_urls",- "videoArray": "video_urls"- }- },- {- "op": "video-insert",- "provider": "higgsfield",- "endpoint": "kling-video/o3/video-edit",- "map": {- "images": "image_urls",- "videoArray": "video_urls"- }- }- ],- "kling-o1": [- {- "op": "flf2v",- "provider": "higgsfield",- "endpoint": "kling-video/omni/first-last-frame",- "map": {- "image": "first_frame_url",- "endImage": "last_frame_url",- "aspectRatio": "aspect_ratio",- "duration": {- "key": "duration",- "type": "number"- }- }- },- {- "op": "ref2v",- "provider": "higgsfield",- "endpoint": "kling-video/omni/image-reference",- "map": {- "images": "image_urls",- "aspectRatio": "aspect_ratio",- "duration": {- "key": "duration",- "type": "number"- }- }- },- {- "op": "v2v",- "provider": "higgsfield",- "endpoint": "kling-video/omni/video-edit",- "map": {- "images": "image_urls",- "videoArray": "video_urls"- }- }- ],- "kling-motion-control": [- {- "op": "motion-transfer",- "provider": "higgsfield",- "endpoint": "kling-video/v3/motion-control/pro",- "map": {- "image": "image_url",- "video": "video_url"- }- }- ],- "kling-2-6-pro": [- {- "op": "t2v",- "provider": "higgsfield",- "endpoint": "kling-video/v2.6/pro/text-to-video",- "map": {- "aspectRatio": "aspect_ratio",- "duration": {- "key": "duration",- "type": "number"- },- "generateAudio": {- "key": "sound",- "on": "on",- "off": "off"- }- }- },- {- "op": "i2v",- "provider": "higgsfield",- "endpoint": "kling-video/v2.6/pro/image-to-video",- "map": {- "image": "image_url",- "aspectRatio": "aspect_ratio",- "duration": {- "key": "duration",- "type": "number"- },- "generateAudio": {- "key": "sound",- "on": "on",- "off": "off"- }- }- }- ],- "kling-2-5-turbo": [- {- "op": "t2v",- "provider": "higgsfield",- "endpoint": "kling-video/v2.5-turbo/pro/text-to-video",- "map": {- "negativePrompt": "negative_prompt",- "duration": {- "key": "duration",- "type": "number"- }- }- },- {- "op": "i2v",- "provider": "higgsfield",- "endpoint": "kling-video/v2.5-turbo/pro/image-to-video",- "map": {- "image": "image_url",- "negativePrompt": "negative_prompt",- "duration": {- "key": "duration",- "type": "number"- }- }- }- ],- "minimax-h3": [- {- "op": "t2v",- "provider": "higgsfield",- "endpoint": "minimax/h3/text-to-video",- "map": {- "aspectRatio": "aspect_ratio",- "resolution": "resolution",- "duration": {- "key": "duration",- "type": "number"- }- }- },- {- "op": "i2v",- "provider": "higgsfield",- "endpoint": "minimax/h3/image-to-video",- "map": {- "image": "image_url",- "endImage": "end_image_url",- "aspectRatio": "aspect_ratio",- "resolution": "resolution",- "duration": {- "key": "duration",- "type": "number"- }- }- },- {- "op": "flf2v",- "provider": "higgsfield",- "endpoint": "minimax/h3/image-to-video",- "map": {- "image": "image_url",- "endImage": "end_image_url",- "aspectRatio": "aspect_ratio",- "resolution": "resolution",- "duration": {- "key": "duration",- "type": "number"- }- }- },- {- "op": "ref2v",- "provider": "higgsfield",- "endpoint": "minimax/h3/reference-to-video",- "map": {- "images": "image_urls",- "videos": "video_urls",- "audios": "audio_urls",- "aspectRatio": "aspect_ratio",- "resolution": "resolution",- "duration": {- "key": "duration",- "type": "number"- }- }- }- ],- "hailuo-2-3": [- {- "op": "t2v",- "provider": "higgsfield",- "endpoint": "minimax/hailuo-2.3/standard/text-to-video",- "map": {- "duration": {- "key": "duration",- "type": "number"- }- }- },- {- "op": "i2v",- "provider": "higgsfield",- "endpoint": "minimax/hailuo-2.3/standard/image-to-video",- "map": {- "image": "image_url",- "duration": {- "key": "duration",- "type": "number"- }- }- }- ],- "ltx-2-5": [- {- "op": "t2v",- "provider": "higgsfield",- "endpoint": "lightricks/ltx-2.5/text-to-video/pro",- "map": {- "aspectRatio": "aspect_ratio",- "resolution": "resolution",- "duration": {- "key": "duration",- "type": "number"- },- "generateAudio": "generate_audio"- }- },- {- "op": "i2v",- "provider": "higgsfield",- "endpoint": "lightricks/ltx-2.5/image-to-video/pro",- "map": {- "image": "image_url",- "endImage": "end_image_url",- "aspectRatio": "aspect_ratio",- "resolution": "resolution",- "duration": {- "key": "duration",- "type": "number"- },- "generateAudio": "generate_audio"- }- },- {- "op": "flf2v",- "provider": "higgsfield",- "endpoint": "lightricks/ltx-2.5/image-to-video/pro",- "map": {- "image": "image_url",- "endImage": "end_image_url",- "aspectRatio": "aspect_ratio",- "resolution": "resolution",- "duration": {- "key": "duration",- "type": "number"- },- "generateAudio": "generate_audio"- }- }- ],- "pixverse-v6": [- {- "op": "t2v",- "provider": "higgsfield",- "endpoint": "pixverse/v6/text-to-video",- "map": {- "negativePrompt": "negative_prompt",- "seed": "seed",- "aspectRatio": "aspect_ratio",- "resolution": "resolution",- "duration": {- "key": "duration",- "type": "number"- },- "generateAudio": "generate_audio"- }- },- {- "op": "i2v",- "provider": "higgsfield",- "endpoint": "pixverse/v6/image-to-video",- "map": {- "image": "image_url",- "endImage": "end_image_url",- "negativePrompt": "negative_prompt",- "seed": "seed",- "resolution": "resolution",- "duration": {- "key": "duration",- "type": "number"- },- "generateAudio": "generate_audio"- }- },- {- "op": "flf2v",- "provider": "higgsfield",- "endpoint": "pixverse/v6/image-to-video",- "map": {- "image": "image_url",- "endImage": "end_image_url",- "negativePrompt": "negative_prompt",- "seed": "seed",- "resolution": "resolution",- "duration": {- "key": "duration",- "type": "number"- },- "generateAudio": "generate_audio"- }- }- ],- "wan-3": [- {- "op": "t2v",- "provider": "higgsfield",- "endpoint": "alibaba/wan-3.0/text-to-video",- "map": {- "seed": "seed",- "aspectRatio": "aspect_ratio",- "resolution": "resolution",- "duration": {- "key": "duration",- "type": "number"- },- "generateAudio": "generate_audio"- }- },- {- "op": "i2v",- "provider": "higgsfield",- "endpoint": "alibaba/wan-3.0/image-to-video",- "map": {- "image": "image_url",- "endImage": "end_image_url",- "seed": "seed",- "aspectRatio": "aspect_ratio",- "resolution": "resolution",- "duration": {- "key": "duration",- "type": "number"- },- "generateAudio": "generate_audio"- }- },- {- "op": "flf2v",- "provider": "higgsfield",- "endpoint": "alibaba/wan-3.0/image-to-video",- "map": {- "image": "image_url",- "endImage": "end_image_url",- "seed": "seed",- "aspectRatio": "aspect_ratio",- "resolution": "resolution",- "duration": {- "key": "duration",- "type": "number"- },- "generateAudio": "generate_audio"- }- },- {- "op": "ref2v",- "provider": "higgsfield",- "endpoint": "alibaba/wan-3.0/reference-to-video",- "map": {- "images": "image_urls",- "videos": "video_urls",- "audios": "audio_urls",- "seed": "seed",- "aspectRatio": "aspect_ratio",- "resolution": "resolution",- "duration": {- "key": "duration",- "type": "number"- },- "generateAudio": "generate_audio"- }- }- ],- "wan-3-prime": [- {- "op": "t2v",- "provider": "higgsfield",- "endpoint": "alibaba/wan-3.0-prime/text-to-video",- "map": {- "seed": "seed",- "aspectRatio": "aspect_ratio",- "resolution": "resolution",- "duration": {- "key": "duration",- "type": "number"- },- "generateAudio": "generate_audio"- }- },- {- "op": "i2v",- "provider": "higgsfield",- "endpoint": "alibaba/wan-3.0-prime/image-to-video",- "map": {- "image": "image_url",- "endImage": "end_image_url",- "seed": "seed",- "aspectRatio": "aspect_ratio",- "resolution": "resolution",- "duration": {- "key": "duration",- "type": "number"- },- "generateAudio": "generate_audio"- }- },- {- "op": "flf2v",- "provider": "higgsfield",- "endpoint": "alibaba/wan-3.0-prime/image-to-video",- "map": {- "image": "image_url",- "endImage": "end_image_url",- "seed": "seed",- "aspectRatio": "aspect_ratio",- "resolution": "resolution",- "duration": {- "key": "duration",- "type": "number"- },- "generateAudio": "generate_audio"- }- },- {- "op": "ref2v",- "provider": "higgsfield",- "endpoint": "alibaba/wan-3.0-prime/reference-to-video",- "map": {- "images": "image_urls",- "videos": "video_urls",- "audios": "audio_urls",- "seed": "seed",- "aspectRatio": "aspect_ratio",- "resolution": "resolution",- "duration": {- "key": "duration",- "type": "number"- },- "generateAudio": "generate_audio"- }- }- ],- "wan-2-7": [- {- "op": "t2v",- "provider": "higgsfield",- "endpoint": "wan/v2.7/text-to-video",- "map": {- "negativePrompt": "negative_prompt",- "seed": "seed",- "seedRange": [- 1,- 2147483646- ],- "aspectRatio": "aspect_ratio",- "resolution": "resolution",- "duration": {- "key": "duration",- "type": "number"- }- }- },- {- "op": "i2v",- "provider": "higgsfield",- "endpoint": "wan/v2.7/image-to-video",- "map": {- "image": "image_url",- "endImage": "end_image_url",- "negativePrompt": "negative_prompt",- "seed": "seed",- "seedRange": [- 1,- 2147483646- ],- "resolution": "resolution",- "duration": {- "key": "duration",- "type": "number"- }- }- },- {- "op": "flf2v",- "provider": "higgsfield",- "endpoint": "wan/v2.7/image-to-video",- "map": {- "image": "image_url",- "endImage": "end_image_url",- "negativePrompt": "negative_prompt",- "seed": "seed",- "seedRange": [- 1,- 2147483646- ],- "resolution": "resolution",- "duration": {- "key": "duration",- "type": "number"- }- }- },- {- "op": "ref2v",- "provider": "higgsfield",- "endpoint": "wan/v2.7/reference-to-video",- "map": {- "images": "image_urls",- "videos": "video_urls",- "negativePrompt": "negative_prompt",- "seed": "seed",- "seedRange": [- 1,- 2147483646- ],- "aspectRatio": "aspect_ratio",- "resolution": "resolution",- "duration": {- "key": "duration",- "type": "number"- }- }- }- ],- "wan-2-6": [- {- "op": "t2v",- "provider": "higgsfield",- "endpoint": "wan/v2.6/text-to-video",- "map": {- "seed": "seed",- "seedRange": [- -1,- 10000000- ],- "resolution": "resolution",- "duration": {- "key": "duration",- "type": "number"- }- }- },- {- "op": "i2v",- "provider": "higgsfield",- "endpoint": "wan/v2.6/image-to-video",- "map": {- "image": "image_url",- "negativePrompt": "negative_prompt",- "seed": "seed",- "seedRange": [- -1,- 10000000- ],- "resolution": "resolution",- "duration": {- "key": "duration",- "type": "number"- }- }- }- ],- "qwen-image-3": [- {- "op": "t2i",- "provider": "higgsfield",- "endpoint": "alibaba/qwen-image-3/text-to-image",- "map": {- "negativePrompt": "negative_prompt",- "seed": "seed",- "aspectRatio": "aspect_ratio",- "resolution": "resolution"- }- },- {- "op": "edit",- "provider": "higgsfield",- "endpoint": "alibaba/qwen-image-3/edit",- "map": {- "images": "image_urls",- "negativePrompt": "negative_prompt",- "seed": "seed",- "aspectRatio": "aspect_ratio",- "resolution": "resolution"- }- }- ],- "z-image-turbo-cloud": [- {- "op": "t2i",- "provider": "higgsfield",- "endpoint": "z-image/turbo",- "map": {- "seed": "seed",- "aspectRatio": "aspect_ratio",- "resolution": "resolution"- }- }- ],- "recraft-4-1": [- {- "op": "t2i",- "provider": "higgsfield",- "endpoint": "recraft/v4.1/text-to-image",- "map": {- "palette": {- "key": "colors",- "format": "rgb-array",- "background": "background_color"- },- "aspectRatio": "aspect_ratio",- "resolution": "resolution"- }- }- ],- "recraft-4-1-pro": [- {- "op": "t2i",- "provider": "higgsfield",- "endpoint": "recraft/v4.1/pro/text-to-image",- "map": {- "palette": {- "key": "colors",- "format": "rgb-array",- "background": "background_color"- },- "aspectRatio": "aspect_ratio",- "resolution": "resolution"- }- }- ],- "grok-imagine-video-1-5": [- {- "op": "t2v",- "provider": "higgsfield",- "endpoint": "xai/grok-imagine-video/v1.5/reference-to-video",- "map": {- "aspectRatio": {- "key": "aspect_ratio",- "accepts": [- "auto",- "1:1",- "16:9",- "9:16",- "4:3",- "3:4",- "3:2",- "2:3"- ]- },- "resolution": {- "key": "resolution",- "accepts": [- "480p",- "720p",- "1080p"- ]- },- "duration": {- "key": "duration",- "type": "number"- }- }- },- {- "op": "i2v",- "provider": "higgsfield",- "endpoint": "xai/grok-imagine-video/v1.5/reference-to-video",- "map": {- "image": "image_url",- "aspectRatio": {- "key": "aspect_ratio",- "accepts": [- "auto",- "1:1",- "16:9",- "9:16",- "4:3",- "3:4",- "3:2",- "2:3"- ]- },- "resolution": {- "key": "resolution",- "accepts": [- "480p",- "720p",- "1080p"- ]- },- "duration": {- "key": "duration",- "type": "number"- }- }- },- {- "op": "ref2v",- "provider": "higgsfield",- "endpoint": "xai/grok-imagine-video/v1.5/reference-to-video",- "map": {- "images": "image_urls",- "aspectRatio": {- "key": "aspect_ratio",- "accepts": [- "auto",- "1:1",- "16:9",- "9:16",- "4:3",- "3:4",- "3:2",- "2:3"- ]- },- "resolution": {- "key": "resolution",- "accepts": [- "480p",- "720p"- ]- },- "duration": {- "key": "duration",- "type": "number"- }- }- }- ],- "grok-imagine-image-2": [- {- "op": "t2i",- "provider": "higgsfield",- "endpoint": "xai/grok-imagine-image-2.0",- "map": {- "aspectRatio": {- "key": "aspect_ratio",- "accepts": [- "auto",- "1:1",- "1:2",- "2:1",- "3:2",- "2:3",- "4:3",- "3:4",- "16:9",- "9:16"- ]- },- "resolution": {- "key": "resolution",- "accepts": [- "1k",- "2k"- ]- }- }- },- {- "op": "edit",- "provider": "higgsfield",- "endpoint": "xai/grok-imagine-image-2.0",- "map": {- "images": "image_urls",- "aspectRatio": {- "key": "aspect_ratio",- "accepts": [- "auto",- "1:1",- "1:2",- "2:1",- "3:2",- "2:3",- "4:3",- "3:4",- "16:9",- "9:16"- ]- },- "resolution": {- "key": "resolution",- "accepts": [- "1k",- "2k"- ]- }- }- }- ]-};diff --git a/src/lib/catalog/higgsfield-presets.generated.ts b/src/lib/catalog/higgsfield-presets.generated.tsdeleted file mode 100644index 6572a151..00000000--- a/src/lib/catalog/higgsfield-presets.generated.ts+++ /dev/null@@ -1,1537 +0,0 @@-// GENERATED by scripts/gen-higgsfield-presets.py from docs/research/higgsfield-image-studios.json — do not edit.-// Higgsfield's own preset ids (the API's style_id), names and categories; descriptions marked `inferred` are ours.--export type SoulPresetModel = "soul-v1" | "soul-v2";--export interface SoulPreset {- id: string;- name: string;- model: SoulPresetModel;- categories: string[];- description: string;- /** The description is Fuobe's (Higgsfield publishes none for this preset). */- inferred: boolean;- /** Soul 2.0: one of the curated moodboards in the Moodboard panel. */- curated?: boolean;-}--export interface PackMeta {- id: string;- higgsfieldId?: string;- name: string;- count: number;- description: string;- inferred: boolean;- product: "photodump" | "instadump";- author?: string;-}--export interface FashionTemplateMeta {- id: string;- higgsfieldId?: string;- name: string;- /** Shots in Higgsfield's preview carousel (Fuobe's photoset makes one photo per shot). */- shots: number;- description: string;- inferred: boolean;-}--export const SOUL_CATEGORIES: Record<SoulPresetModel, string[]> = {- "soul-v1": [- "New",- "TikTok Core",- "Instagram Aesthetics",- "Camera Presets",- "Beauty",- "Mood",- "Surreal",- "Graphic Art"- ],- "soul-v2": [- "Mood",- "Styles",- "Camera"- ]-};--/** The default ("General") preset of each model. */-export const SOUL_DEFAULT: Record<SoulPresetModel, string> = {- "soul-v1": "464ea177-8d40-4940-8d9d-b438bab269c7",- "soul-v2": "3db34ab5-3439-4317-9e03-08dc30852e69"-};--export const SOUL_PRESETS: SoulPreset[] = [- {- "id": "464ea177-8d40-4940-8d9d-b438bab269c7",- "name": "General",- "model": "soul-v1",- "categories": [],- "description": "Clean, balanced, and natural—your go-to look with true-to-life colors and soft lighting. Effortlessly versatile for any style",- "inferred": false- },- {- "id": "1b798b54-03da-446a-93bf-12fcba1050d7",- "name": "iPhone",- "model": "soul-v1",- "categories": [- "Instagram Aesthetics",- "Camera Presets",- "Beauty"- ],- "description": "Natural light, casual framing, soft HDR glow. Looks real, but a little better",- "inferred": false- },- {- "id": "1cb4b936-77bf-4f9a-9039-f3d349a4cdbe",- "name": "Realistic",- "model": "soul-v1",- "categories": [- "Instagram Aesthetics"- ],- "description": "No filters, just flawless clarity. Light, pores, fabric—everything exactly as it is, but better",- "inferred": false- },- {- "id": "ca4e6ad3-3e93-4e03-81a0-d1722d2c128b",- "name": "DigitalCam",- "model": "soul-v1",- "categories": [- "TikTok Core",- "Camera Presets",- "Beauty"- ],- "description": "Harsh flash, timestamp corner, and raw textures. Feels like 2007 captured forever",- "inferred": false- },- {- "id": "3f90dc5b-f474-4259-95c4-d29fbd6be645",- "name": "Flight mode",- "model": "soul-v1",- "categories": [- "New",- "TikTok Core",- "Instagram Aesthetics"- ],- "description": "Airports, terminals — everything designed to feel like you're traveling. Modern architecture, clean lines, and a subtle “main character leaves town” aura.",- "inferred": false- },- {- "id": "26241c54-ed78-4ea7-b1bf-d881737c9feb",- "name": "Sunset beach",- "model": "soul-v1",- "categories": [- "New",- "TikTok Core",- "Instagram Aesthetics",- "Camera Presets",- "Beauty"- ],- "description": "Golden-hour dreams. The sky melts from purple to peach while you pose like you don’t know the sun’s watching. Glowy skin, backlit outlines, and luxury vacation stillness.",- "inferred": false- },- {- "id": "de0118ba-7c27-49f7-9841-38abe2aae8e1",- "name": "Mt. Fuji",- "model": "soul-v1",- "categories": [- "New",- "Mood",- "Surreal"- ],- "description": "Postcard surrealism. Crystal-blue skies, iconic mountain symmetry, and convenience store drama.",- "inferred": false- },- {- "id": "a13917c7-02a4-450f-b007-e72d53151980",- "name": "Street view",- "model": "soul-v1",- "categories": [- "New",- "TikTok Core",- "Mood"- ],- "description": "Candid street-level shot, as if caught by a passing camera on a city sidewalk",- "inferred": true- },- {- "id": "99de6fc5-1177-49b9-b2e9-19e17d95bcaf",- "name": "Tokyo Streetstyle",- "model": "soul-v1",- "categories": [],- "description": "Layered looks, sharp silhouettes, and fearless color. A street-level runway of innovation and self-expression",- "inferred": false- },- {- "id": "f96913e8-2fcf-4358-8545-75dd6c34c518",- "name": "Bimbocore",- "model": "soul-v1",- "categories": [- "TikTok Core"- ],- "description": "Hyperfeminine overload: glossed lips, tiny skirts, and confidence cranked to 100. Plastic fantastic, but make it powerful",- "inferred": false- },- {- "id": "07a85fb3-4407-4122-a4eb-42124e57734c",- "name": "CCTV",- "model": "soul-v1",- "categories": [- "TikTok Core",- "Instagram Aesthetics",- "Camera Presets",- "Beauty"- ],- "description": "Grainy surveillance vibe. Raw, unfiltered and highly realistic",- "inferred": false- },- {- "id": "524be50a-4388-4ff5-a843-a73d2dd7ef87",- "name": "Elevator Mirror",- "model": "soul-v1",- "categories": [],- "description": "Full-body mirror selfie in a metallic elevator, phone in hand",- "inferred": true- },- {- "id": "6b9e6b4d-325a-4a78-a0fb-a00ddf612380",- "name": "Y2K",- "model": "soul-v1",- "categories": [- "TikTok Core"- ],- "description": "Gloss, glitter, and baby tees. A shiny reboot of early 2000s maximalism—flip phones and all",- "inferred": false- },- {- "id": "9de8ed26-c8dd-413c-a5e3-47eec97bc243",- "name": "RingSelfie",- "model": "soul-v1",- "categories": [],- "description": "Manicured hands, glossy lips, and a flash that catches the sparkle. Casual flex, maximal impact",- "inferred": false- },- {- "id": "40ff999c-f576-443c-b5b3-c7d1391a666e",- "name": "Spotlight",- "model": "soul-v1",- "categories": [- "Mood"- ],- "description": "Direct light creating high-contrast drama, paparazzi flash, and instant icon energy",- "inferred": false- },- {- "id": "cbefda85-0f76-49bd-82d7-9bcd65be00ca",- "name": "Y2K Posters",- "model": "soul-v1",- "categories": [- "TikTok Core"- ],- "description": "Chrome text, airbrushed skin, and floating objects. Early internet meets teen bedroom wall",- "inferred": false- },- {- "id": "4b66c2db-8166-4293-b1aa-5269c9effb07",- "name": "Nail Check",- "model": "soul-v1",- "categories": [- "Surreal"- ],- "description": "Close-up hands showing off nail art, rings, and textures. Precision beauty with attitude",- "inferred": false- },- {- "id": "96758335-d1d1-42b7-9c21-5ac38c433485",- "name": "Gorpcore",- "model": "soul-v1",- "categories": [],- "description": "Function becomes fashion. Technical fabrics, bulky sneakers, and colorblocked gear that looks runway-ready - on a hike or in the city",- "inferred": false- },- {- "id": "f5c094c7-4671-4d86-90d2-369c8fdbd7a5",- "name": "90s Grain",- "model": "soul-v1",- "categories": [- "Beauty"- ],- "description": "Warm tones, film texture, and a soft blur—retro mood in every pixel",- "inferred": false- },- {- "id": "8dd89de9-1cff-402e-88a8-580c29d91473",- "name": "0.5 Selfie",- "model": "soul-v1",- "categories": [],- "description": "Front cam, half-body, mirror or not. Unfiltered fits and real-life lighting - effortlessly authentic",- "inferred": false- },- {- "id": "71fecd8c-6696-42df-b5eb-f69e4150ca01",- "name": "0.5 Outfit",- "model": "soul-v1",- "categories": [],- "description": "Shot from the waist down with wide-angle distortion. Casual, candid, and effortlessly cool—your fit, half-framed, full vibe",- "inferred": false- },- {- "id": "1fc861ed-5923-41a6-9963-b9f04681dddd",- "name": "Medieval",- "model": "soul-v1",- "categories": [],- "description": "Chainmail chic, velvet drapes, and candlelit intrigue. Courtly vibes with cinematic weight",- "inferred": false- },- {- "id": "0089e17c-d0f0-4d0c-b522-6d25c88a29fc",- "name": "Japandi",- "model": "soul-v1",- "categories": [],- "description": "Minimalism with warmth. Clean lines, natural light, and a serene sense of balance between form and feeling",- "inferred": false- },- {- "id": "bd78cfc6-9b92-4889-9347-f21dbf0a269c",- "name": "Coquette core",- "model": "soul-v1",- "categories": [],- "description": "Soft focus and lace daydreams. Bows, blush, and a wink - sweetness laced with irony",- "inferred": false- },- {- "id": "ba3d7634-447e-455c-98e3-63705d5403b8",- "name": "Sand",- "model": "soul-v1",- "categories": [- "Mood"- ],- "description": "Sculptural silhouettes in windswept dunes. Neutral tones, survivalist edge-high fashion lost in a dust storm",- "inferred": false- },- {- "id": "181b3796-008a-403b-b31e-a9b760219f17",- "name": "2000s Cam",- "model": "soul-v1",- "categories": [- "Camera Presets",- "Beauty"- ],- "description": "Low-rise everything, rhinestones, and visible thongs. Nostalgia wrapped in early paparazzi glam",- "inferred": false- },- {- "id": "ff1ad8a2-94e7-4e70-a12f-e992ca9a0d36",- "name": "Quiet luxury",- "model": "soul-v1",- "categories": [],- "description": "Understated old-money styling: neutral cashmere, tailored lines, no logos",- "inferred": true- },- {- "id": "70fbb531-5ee2-492e-8c53-5dbd6923e8c2",- "name": "Giant Accessory",- "model": "soul-v1",- "categories": [- "Surreal"- ],- "description": "One item exaggerated to surreal scale—bags, bows, or earrings blown up for visual drama",- "inferred": false- },- {- "id": "ea6f4dc0-d6dd-4bdf-a8cf-94ed1db91ab2",- "name": "HairClips",- "model": "soul-v1",- "categories": [],- "description": "Chunky, colorful, or pearl-lined-accessories that turn heads and frame the face with playful precision",- "inferred": false- },- {- "id": "673cf0d4-c193-4fa2-8ad3-b4db4611e3ae",- "name": "505room",- "model": "soul-v1",- "categories": [],- "description": "Moody hotel-room scene in low warm lamp light",- "inferred": true- },- {- "id": "7df83cc9-1e13-4bd0-b6ff-1e6a456b9e5a",- "name": "Eating Food",- "model": "soul-v1",- "categories": [],- "description": "Candid close-up mid-bite, casual food-diary energy",- "inferred": true- },- {- "id": "53bdadfa-8eb6-4eaa-8923-ebece4faa91c",- "name": "Rainy Day",- "model": "soul-v1",- "categories": [- "Mood"- ],- "description": "Moody skies, reflections in wet pavement, soft sweaters. A slow, cinematic quiet",- "inferred": false- },- {- "id": "0fe8ad66-ff61-411f-9186-b392e140b18c",- "name": "Foggy Morning",- "model": "soul-v1",- "categories": [- "Mood"- ],- "description": "Muted colors, blurred horizons, and quiet light. Dreamlike stillness in early hours",- "inferred": false- },- {- "id": "0c636e12-3411-4a65-8d86-67858caf2fa7",- "name": "Avant-garde",- "model": "soul-v1",- "categories": [- "Mood"- ],- "description": "Sculptural beauty, unexpected forms. A look that speaks in bold shapes and silent statements",- "inferred": false- },- {- "id": "0367d609-dfa1-4a81-a983-b2b19ecd6480",- "name": "Tumblr",- "model": "soul-v1",- "categories": [],- "description": "Grainy gifs, soft blur, and blue-toned melancholy—effortlessly curated and emotionally charged",- "inferred": false- },- {- "id": "1900111a-4ce8-42a7-9394-7367f0e0385c",- "name": "Through The Glass",- "model": "soul-v1",- "categories": [],- "description": "Shot behind fogged-up windows or café panes. A quiet moment seen, not staged",- "inferred": false- },- {- "id": "83caff04-691c-468c-b4a0-fd6bbabe062b",- "name": "Vintage PhotoBooth",- "model": "soul-v1",- "categories": [],- "description": "Flash-lit nostalgia in strip form. Grain, glare, and a kiss of chaos",- "inferred": false- },- {- "id": "cc4e7248-dcfe-4c93-b264-2ab418a7556b",- "name": "Fisheye",- "model": "soul-v1",- "categories": [- "Camera Presets",- "Beauty"- ],- "description": "Exaggerated depth and playful proportions. Face or object up close, background stretched to infinity",- "inferred": false- },- {- "id": "372cc37b-9add-4952-a415-53db3998139f",- "name": "Geominimal",- "model": "soul-v1",- "categories": [],- "description": "Clean lines, geometric overlays. Sharp, modern, minimalist settings",- "inferred": false- },- {- "id": "5659c554-9367-4a27-8c66-333c072cbbc2",- "name": "7\\",- "model": "soul-v1",- "categories": [],- "description": "Distorted realism of Aphex Twin with eerie edits, glitch vibes, cult-classic weirdness",- "inferred": false- },- {- "id": "d24c016c-9fb1-47d0-9909-19f57a2830d4",- "name": "Selfcare",- "model": "soul-v1",- "categories": [],- "description": "Candles, skincare, robes. Glowing peace in muted tones and soft light",- "inferred": false- },- {- "id": "b7c621b5-9d3c-46a3-8efb-4cdfbc592271",- "name": "Babydoll MakeUp",- "model": "soul-v1",- "categories": [],- "description": "Fluttery lashes, pouty lips, and porcelain skin-sweet meets surreal in a hyper-feminine glow-up",- "inferred": false- },- {- "id": "7f21e7bd-4df6-4cef-a9a9-9746bceaea1d",- "name": "Fairycore",- "model": "soul-v1",- "categories": [- "Mood"- ],- "description": "Glittery woodland fantasy. Soft pastels, magical sparkles, enchanted innocence",- "inferred": false- },- {- "id": "e454956b-caf2-4913-a398-dbc03f1cbedf",- "name": "Office beach",- "model": "soul-v1",- "categories": [],- "description": "Corporate meets coastal. Suits and sand, spreadsheets with sunglasses - chaotic and sun-bleached",- "inferred": false- },- {- "id": "5b6f467e-f509-4afe-a8db-4c07a6f3770d",- "name": "Swords Hill",- "model": "soul-v1",- "categories": [],- "description": "High fantasy on a mountain slope. Capes, steel, wind-blown drama—part legend, part editorial",- "inferred": false- },- {- "id": "dab472a6-23f4-4cf8-98fe-f3e256f1b549",- "name": "Amalfi Summer",- "model": "soul-v1",- "categories": [],- "description": "Lemon light, sunkissed skin, linen dresses fluttering on cobblestone-luxury by the sea",- "inferred": false- },- {- "id": "b3c8075a-cb4c-42de-b8b3-7099dd2df672",- "name": "Creatures",- "model": "soul-v1",- "categories": [- "Surreal"- ],- "description": "Animalistic details fused with human edge, strange, eerie and beautiful",- "inferred": false- },- {- "id": "ad9de607-3941-4540-81ea-ba978ef1550b",- "name": "Grunge",- "model": "soul-v1",- "categories": [],- "description": "Distressed denim, oversized flannel, and don’t-care hair. Moody, messy, iconic",- "inferred": false- },- {- "id": "a2a42ada-75cc-42a9-be12-cb16c1dec2a8",- "name": "Glazed doll skin makeup",- "model": "soul-v1",- "categories": [],- "description": "Glass-like skin with high-shine finish. Dewy, doll-like, and flawlessly unreal",- "inferred": false- },- {- "id": "82edba1e-b093-4484-a25e-9276e0454999",- "name": "Invertethereal",- "model": "soul-v1",- "categories": [- "Graphic Art"- ],- "description": "Negative tones and ghostly hues. Dreamlike, eerie, and light turned inside out",- "inferred": false- },- {- "id": "5a72fec7-a12e-43db-8ef3-1d193b4f7ab4",- "name": "Indie sleaze",- "model": "soul-v1",- "categories": [],- "description": "Flash-lit chaos, smudged eyeliner, and blurry rebellion. Tumblr-era nightlife energy in its rawest, hottest form",- "inferred": false- },- {- "id": "2fcf02e2-919a-4642-8b31-d58bde5e6bd9",- "name": "Mixed Media",- "model": "soul-v1",- "categories": [- "Graphic Art"- ],- "description": "Layers of photo, paint, text, and texture. A visual collage with chaotic elegance",- "inferred": false- },- {- "id": "7fa63380-64b7-48b1-b684-4c9ef37560a9",- "name": "Paper Face",- "model": "soul-v1",- "categories": [- "Graphic Art"- ],- "description": "A face collaged from torn paper, textures, and cutouts-raw edges meet artistic expression. Mixed media magic with a surreal twist",- "inferred": false- },- {- "id": "facaafeb-4ab5-4384-92a1-b4086180e9ac",- "name": "2000s Fashion",- "model": "soul-v1",- "categories": [- "Graphic Art"- ],- "description": "Flashy fits, shiny textures, and Y2K icons—low-rise, high-attitude, totally throwback",- "inferred": false- },- {- "id": "811de7ab-7aaf-4a6b-b352-cdea6c34c8f1",- "name": "Movie",- "model": "soul-v1",- "categories": [],- "description": "Widescreen film-still look with cinematic lighting and grade",- "inferred": true- },- {- "id": "d8a35238-ba42-48a0-a76a-186a97734b9d",- "name": "Overexposed",- "model": "soul-v1",- "categories": [- "Mood"- ],- "description": "Washed-out whites, crushed detail, and intense brightness. A raw visual effect that feels accidental, emotional, and unfiltered",- "inferred": false- },- {- "id": "12eda704-18e5-4783-aa0f-deba5296cc83",- "name": "Long legs",- "model": "soul-v1",- "categories": [- "Graphic Art"- ],- "description": "Elongated limbs and stretched proportions. Stylized drama with a runway edge",- "inferred": false- },- {- "id": "62ba1751-63af-4648-a11c-711ac64e216a",- "name": "Night Beach",- "model": "soul-v1",- "categories": [],- "description": "Moonlit waves, dark silhouettes, and salt in the air. Intimate and a little unreal",- "inferred": false- },- {- "id": "710f9073-f580-48dc-b5c3-9bbc7cbb7f37",- "name": "90’s Editorial",- "model": "soul-v1",- "categories": [],- "description": "Retro fashion magazine style image with film grain, soft blur, moody colors, and pure nostalgia",- "inferred": false- },- {- "id": "7696fd45-6e67-47d7-b800-096ce21cd449",- "name": "Sitting on the Street",- "model": "soul-v1",- "categories": [],- "description": "Laid-back pose meets city grit. Candid, cool, and consciously unbothered",- "inferred": false- },- {- "id": "62355e77-7096-45ae-9bea-e7c5b88c3b70",- "name": "Glitch",- "model": "soul-v1",- "categories": [- "Graphic Art"- ],- "description": "Pixel drag, color distortion, and digital noise. Beautiful errors in motion",- "inferred": false- },- {- "id": "86fc814e-856a-4af0-98b0-d4da75d0030b",- "name": "FashionShow",- "model": "soul-v1",- "categories": [],- "description": "Backstage flashes, bold looks, and runway energy—where chaos meets couture",- "inferred": false- },- {- "id": "b9e2d7dc-78e6-4f7d-95dd-b62690e7b200",- "name": "Artwork",- "model": "soul-v1",- "categories": [- "Graphic Art"- ],- "description": "Framed moments with painterly depth. A still life of emotion, texture, and light",- "inferred": false- },- {- "id": "0b4dac9a-f73a-4e5b-a5a7-1a40ee40d6ac",- "name": "Graffiti",- "model": "soul-v1",- "categories": [- "Graphic Art"- ],- "description": "Spray textures, bold lines, and rebellious color. Raw energy in every frame",- "inferred": false- },- {- "id": "4c24b43b-1984-407a-a0ae-c514f29b7e66",- "name": "Angel Wings",- "model": "soul-v1",- "categories": [],- "description": "Soft look with delicate wings giving dreamy and weightless",- "inferred": false- },- {- "id": "34c50302-83ff-487d-b3a9-e35e501d80a7",- "name": "PixeletedFace",- "model": "soul-v1",- "categories": [],- "description": "Retro-glitch vibe with a pixelated face—playful, edgy, straight out of an early-internet dream",- "inferred": false- },- {- "id": "255f4045-d68b-42b1-9e4c-f49d3263a9d7",- "name": "Grillz Selfie",- "model": "soul-v1",- "categories": [],- "description": "Flash-heavy close-up of shiny teeth, with grills, bold attitude, underground luxury",- "inferred": false- },- {- "id": "30458874-d9c0-4d5a-b2b7-597e0eee2404",- "name": "Shoe Check",- "model": "soul-v1",- "categories": [- "Surreal"- ],- "description": "A visual trend where the focus is on footwear, often captured from a top-down or ground-level angle",- "inferred": false- },- {- "id": "cc099663-9621-422e-8626-c8ee68953a0c",- "name": "Bleached Brows",- "model": "soul-v1",- "categories": [],- "description": "Barely-there brows, futuristic face. A blank canvas for bold energy and alien glam",- "inferred": false- },- {- "id": "b7908955-2868-4e35-87a0-35e50cb92e5d",- "name": "Object Makeup",- "model": "soul-v1",- "categories": [],- "description": "Collage-style layers. An object below, makeup above, colors duplicated for surreal, editorial face art",- "inferred": false- },- {- "id": "294bb3ee-eaef-4d2a-93e3-164268803db4",- "name": "360 cam",- "model": "soul-v1",- "categories": [- "Camera Presets",- "Beauty"- ],- "description": "Wrap-around perspective with immersive distortion. Captures everything-warped, wide, and wonderfully weird",- "inferred": false- },- {- "id": "a5f63c3b-70eb-4979-af5e-98c7ee1e18e8",- "name": "Giant People",- "model": "soul-v1",- "categories": [],- "description": "Surreal scale play: the subject towers over a miniature world",- "inferred": true- },- {- "id": "5ad23bca-4a4b-4316-8c59-b80d7709d8ee",- "name": "Help It's Too Big",- "model": "soul-v1",- "categories": [],- "description": "Comedic oversized prop or garment dwarfing the subject",- "inferred": true- },- {- "id": "88126a43-86fb-4047-a2d6-c9146d6ca6ce",- "name": "Duplicate",- "model": "soul-v1",- "categories": [- "Graphic Art"- ],- "description": "Echoed figures, mirrored forms, or repeated poses-surreal symmetry that bends perception",- "inferred": false- },- {- "id": "6fb3e1f5-d721-4523-ac38-9902f2b2b850",- "name": "Library",- "model": "soul-v1",- "categories": [- "New"- ],- "description": "Soft indoor lighting meets cozy academia. Perfect for quiet power, timeless knits, and capturing the stillness of thought between the shelves.",- "inferred": false- },- {- "id": "bab6e4bd-9093-4bb5-a371-01ef6cbd58ad",- "name": "Escalator",- "model": "soul-v1",- "categories": [- "New"- ],- "description": "Gliding style in motion. This preset captures that effortless mall paparazzi look — structured outfits, steel gradients, and motion frozen in frame.",- "inferred": false- },- {- "id": "36061eb7-4907-4cba-afb1-47afcf699873",- "name": "Gallery",- "model": "soul-v1",- "categories": [- "New"- ],- "description": "Neutral walls, high taste. This preset frames your subject like a work of art — minimal, polished, and modern.",- "inferred": false- },- {- "id": "d3e2b71d-b24b-462e-bd96-12f7a22b5142",- "name": "Crossing the street",- "model": "soul-v1",- "categories": [- "New"- ],- "description": "Boss walk energy. Overhead angles, harsh midday shadows, and that perfect step mid-cross. Looks stolen from a fashion mag.",- "inferred": false- },- {- "id": "bc00b419-f8ca-4887-a990-e2760c3cb761",- "name": "Sunbathing",- "model": "soul-v1",- "categories": [- "New"- ],- "description": "Clear turquoise water, woven bags, towel texture, and heat-soaked skin.",- "inferred": false- },- {- "id": "d2e8ba04-9935-4dee-8bc4-39ac789746fc",- "name": "Subway",- "model": "soul-v1",- "categories": [- "New"- ],- "description": "Fluorescent-lit subway car or platform, candid commuter vibe",- "inferred": true- },- {- "id": "2d47f079-c021-4b8e-b2c0-3b927a80fc31",- "name": "birthday mess",- "model": "soul-v1",- "categories": [],- "description": "Flash-lit party aftermath with cake, balloons and confetti",- "inferred": true- },- {- "id": "fb9cee2b-632f-4fd4-ae4f-4664deecc0f4",- "name": "static glow",- "model": "soul-v1",- "categories": [],- "description": "Soft TV-static haze and analog light bloom",- "inferred": true- },- {- "id": "493bda5b-bb4b-46fe-9343-7d5e414534ef",- "name": "Clouded Dream",- "model": "soul-v1",- "categories": [],- "description": "Dreamy pastel sky, soft clouds and airy haze",- "inferred": true- },- {- "id": "2a1898d0-548f-4433-8503-5721157b93a1",- "name": "Double take",- "model": "soul-v1",- "categories": [],- "description": "The same subject appears twice in one frame",- "inferred": true- },- {- "id": "3de71b9e-3973-4828-b246-a34c606e25a7",- "name": "Red balloon",- "model": "soul-v1",- "categories": [],- "description": "Minimal scene with a single red balloon as the accent",- "inferred": true- },- {- "id": "ce9a88c2-c962-45e2-abaa-c8979d48f8d5",- "name": "tokyo drift",- "model": "soul-v1",- "categories": [],- "description": "Neon Tokyo night streets and car culture, motion-blurred lights",- "inferred": true- },- {- "id": "c7ea4e7a-c40c-498d-948c-1f6919631f60",- "name": "Rhyme & blues",- "model": "soul-v1",- "categories": [],- "description": "Moody 90s R&B album-cover look, deep blues and a soft spotlight",- "inferred": true- },- {- "id": "90df2935-3ded-477f-8253-1d67dd939cbe",- "name": "Bike mafia",- "model": "soul-v1",- "categories": [],- "description": "Crew posing with motorbikes, gritty street attitude",- "inferred": true- },- {- "id": "923e4fb0-d4ea-480c-876d-ac7cad862b9d",- "name": "dmv",- "model": "soul-v1",- "categories": [],- "description": "Flat, harsh ID-photo lighting like a driver's-licence portrait",- "inferred": true- },- {- "id": "71ac929c-4002-4640-9b65-cb06402844c6",- "name": "Sea breeze",- "model": "soul-v1",- "categories": [],- "description": "Windswept seaside portrait, linen and salt air",- "inferred": true- },- {- "id": "79bfaa63-4e12-4ea2-8ada-7d4406eecece",- "name": "It’s french",- "model": "soul-v1",- "categories": [],- "description": "Parisian chic: stripes, berets, cafe terraces",- "inferred": true- },- {- "id": "d4775423-d214-4862-b061-47baa1978208",- "name": "Fish-eye twin",- "model": "soul-v1",- "categories": [],- "description": "Fisheye close-up with a mirrored twin",- "inferred": true- },- {- "id": "a643a36a-85e6-4e3d-80db-13e4997203cc",- "name": "hallway noir",- "model": "soul-v1",- "categories": [],- "description": "Dark hallway, hard single-source light, noir shadows",- "inferred": true- },- {- "id": "84c23cef-7eda-4f8f-9931-e3e6af8192d9",- "name": "burgundy suit",- "model": "soul-v1",- "categories": [],- "description": "Tailored burgundy suit editorial on a muted backdrop",- "inferred": true- },- {- "id": "5dbb6a20-0541-4f06-8352-a2408d8781dc",- "name": "Nicotine glow",- "model": "soul-v1",- "categories": [],- "description": "Warm smoky low light, amber haze, late-night mood",- "inferred": true- },- {- "id": "91abc4fe-1cf8-4a77-8ade-d36d46699014",- "name": "green editorial",- "model": "soul-v1",- "categories": [],- "description": "Fashion editorial built around saturated greens",- "inferred": true- },- {- "id": "5765d07d-1525-4d4d-ae06-9091e2bdac2d",- "name": "afterparty cam",- "model": "soul-v1",- "categories": [],- "description": "Direct-flash point-and-shoot snaps from the after-party",- "inferred": true- },- {- "id": "53959c8a-4323-4b78-9888-e9f6fb0f6b98",- "name": "2049",- "model": "soul-v1",- "categories": [],- "description": "Dystopian sci-fi haze in orange and teal",- "inferred": true- },- {- "id": "373420f7-489e-4a5d-930e-cc4ecfcc23cc",- "name": "Fireproof",- "model": "soul-v1",- "categories": [],- "description": "Posing amid flames and sparks, heat-haze drama",- "inferred": true- },- {- "id": "1fba888b-9ab0-447f-a6a4-9ce5251ec2a6",- "name": "Night rider",- "model": "soul-v1",- "categories": [],- "description": "Night ride under streetlights with motion streaks",- "inferred": true- },- {- "id": "5e01339d-745e-4bba-96f7-e8ce4af79f17",- "name": "chrome exit",- "model": "soul-v1",- "categories": [],- "description": "Chrome and metallic surfaces, futuristic styling",- "inferred": true- },- {- "id": "f3968a4f-a125-4c16-8673-45ce9874520e",- "name": "brick shade",- "model": "soul-v1",- "categories": [],- "description": "Streetwear portrait against a brick wall in hard shade",- "inferred": true- },- {- "id": "f8dac072-d11f-438a-b283-fd52fe8aa744",- "name": "blackout fit",- "model": "soul-v1",- "categories": [],- "description": "All-black monochrome outfit",- "inferred": true- },- {- "id": "aed71142-673c-4908-a6a7-326d5252eb06",- "name": "cocktail",- "model": "soul-v1",- "categories": [],- "description": "Glamorous cocktail-bar scene in warm bar light",- "inferred": true- },- {- "id": "3c975998-cb5b-4980-80fc-7977e4c60972",- "name": "mount view",- "model": "soul-v1",- "categories": [],- "description": "Mountain-top portrait with a panoramic vista",- "inferred": true- },- {- "id": "e439bd89-8176-4729-b6a4-a9977120507d",- "name": "Sunburnt",- "model": "soul-v1",- "categories": [],- "description": "Sun-baked warm tones, flushed skin, harsh midday light",- "inferred": true- },- {- "id": "3db34ab5-3439-4317-9e03-08dc30852e69",- "name": "General",- "model": "soul-v2",- "categories": [],- "description": "Soul 2.0's neutral default look",- "inferred": true,- "curated": true- },- {- "id": "fafd3087-0d0f-4fb1-9af6-91b7d304687c",- "name": "Warm ambient",- "model": "soul-v2",- "categories": [- "Styles"- ],- "description": "Soft warm interior ambience with golden practical light",- "inferred": true,- "curated": true- },- {- "id": "7ee16ff3-c0b0-4f5f-a0e1-e7fc46144230",- "name": "Y2K studio",- "model": "soul-v2",- "categories": [- "Camera"- ],- "description": "Glossy early-2000s studio shoot on coloured seamless",- "inferred": true,- "curated": true- },- {- "id": "6dffca48-f9fe-43f2-8589-da58a172fa3e",- "name": "Swag era",- "model": "soul-v2",- "categories": [- "Mood"- ],- "description": "2010s swag streetwear: snapbacks, bling, flash",- "inferred": true,- "curated": true- },- {- "id": "7876c2a5-aa83-4530-ad09-2b368bbb5e95",- "name": "Theatrical light",- "model": "soul-v2",- "categories": [- "Styles"- ],- "description": "Stage-style spotlighting and deep shadows",- "inferred": true,- "curated": true- },- {- "id": "d7e58c26-b74e-4a72-8c78-d061d600c9a5",- "name": "Y2K street",- "model": "soul-v2",- "categories": [- "Styles"- ],- "description": "Early-2000s street fashion snapped outdoors",- "inferred": true,- "curated": true- },- {- "id": "5e87c5bd-86b6-491a-94ab-046891d1e35e",- "name": "Flash editorial",- "model": "soul-v2",- "categories": [- "Styles"- ],- "description": "Direct on-camera flash fashion editorial",- "inferred": true,- "curated": true- },- {- "id": "a7cb654b-eba7-4e9b-af41-8eaa482bf7c9",- "name": "Old smartphone",- "model": "soul-v2",- "categories": [- "Camera"- ],- "description": "Low-res early phone camera: noise, soft focus, blown highlights",- "inferred": true,- "curated": true- },- {- "id": "95151de0-e0e5-4e04-bd45-c58c8a4ac023",- "name": "Street photography",- "model": "soul-v2",- "categories": [- "Camera"- ],- "description": "Candid documentary street photography",- "inferred": true,- "curated": true- },- {- "id": "069f5a5f-8c4b-4591-a3dd-bde488672228",- "name": "Retro BW",- "model": "soul-v2",- "categories": [- "Camera"- ],- "description": "Grainy black-and-white film portrait",- "inferred": true,- "curated": true- },- {- "id": "99716f25-c133-438a-829a-ec53258980b4",- "name": "Asian nostalgia",- "model": "soul-v2",- "categories": [- "Mood"- ],- "description": "Nostalgic East Asian film tones and settings",- "inferred": true,- "curated": true- },- {- "id": "26bb19d1-25cc-4455-9a80-522eb136a4de",- "name": "Surreal solarization",- "model": "soul-v2",- "categories": [- "Mood"- ],- "description": "Solarised, partly inverted tones for a surreal glow",- "inferred": true,- "curated": true- },- {- "id": "e62e75c2-b1bb-433d-9192-f1196faed74e",- "name": "Subtle flash",- "model": "soul-v2",- "categories": [- "Styles"- ],- "description": "Gentle fill flash for natural editorial snaps",- "inferred": true,- "curated": true- },- {- "id": "74abc530-cec8-4c13-88a6-2b3f78bfd0ff",- "name": "Digital camera",- "model": "soul-v2",- "categories": [- "Camera"- ],- "description": "2000s compact digicam look with harsh flash",- "inferred": true,- "curated": true- },- {- "id": "cfd92ced-4801-42c4-b8ca-e096a405ff1a",- "name": "Siren",- "model": "soul-v2",- "categories": [- "Mood"- ],- "description": "Dark alluring siren make-up and moody glamour",- "inferred": true,- "curated": true- },- {- "id": "d6371f60-a70c-4a43-9393-6e3d8206590c",- "name": "Mystique city",- "model": "soul-v2",- "categories": [- "Mood"- ],- "description": "Mysterious night city, haze and neon",- "inferred": true,- "curated": true- },- {- "id": "cd55643f-812c-461d-9837-baa9a88dff2e",- "name": "Candy pop",- "model": "soul-v2",- "categories": [- "Styles"- ],- "description": "Bright candy-coloured pop styling",- "inferred": true,- "curated": true- },- {- "id": "7a42d44e-0dab-4dd1-be49-c83fec827251",- "name": "Double exposure",- "model": "soul-v2",- "categories": [- "Mood"- ],- "description": "Two images blended in-camera",- "inferred": true,- "curated": true- },- {- "id": "330789e8-cb50-410c-a31f-b1ba10188176",- "name": "2000s band",- "model": "soul-v2",- "categories": [- "Styles"- ],- "description": "Early-2000s band promo photo",- "inferred": true,- "curated": true- },- {- "id": "599d96ce-be5b-4071-9ee0-5b3494f6c757",- "name": "Frutiger aero",- "model": "soul-v2",- "categories": [- "Styles"- ],- "description": "Glossy aqua, bubbles and sky-blue 2000s tech optimism",- "inferred": true,- "curated": true- },- {- "id": "8261de31-258b-4a58-997c-b65bbd6d367f",- "name": "Drain",- "model": "soul-v2",- "categories": [- "Styles"- ],- "description": "Washed-out, melancholic emo-rap aesthetic",- "inferred": true,- "curated": true- },- {- "id": "82e55816-3b41-4f01-8500-d36f235e08e6",- "name": "Extraterrestrial",- "model": "soul-v2",- "categories": [],- "description": "Otherworldly sci-fi light and alien landscapes",- "inferred": true,- "curated": false- },- {- "id": "3d5584b2-4d15-48d2-8a09-c1073259f4c6",- "name": "Editorial street style",- "model": "soul-v2",- "categories": [- "Styles"- ],- "description": "Fashion-week street-style snaps",- "inferred": true,- "curated": true- },- {- "id": "dbe816eb-c651-4361-aee3-9386f8372121",- "name": "Nature light",- "model": "soul-v2",- "categories": [],- "description": "Natural outdoor daylight, soft and true to life",- "inferred": true,- "curated": false- },- {- "id": "184401c9-65d8-4d4b-b2e1-fd6a87a5b60c",- "name": "New Indie",- "model": "soul-v2",- "categories": [],- "description": "Modern indie look: film grain, candid framing, soft colour",- "inferred": true,- "curated": false- },- {- "id": "04022c41-6164-47d9-b33f-cf241f0b5e15",- "name": "Underwater",- "model": "soul-v2",- "categories": [],- "description": "Submerged portrait with caustic light",- "inferred": true,- "curated": false- },- {- "id": "313f3e05-0d79-4d2f-a56a-d9d289321fd8",- "name": "80s horror",- "model": "soul-v2",- "categories": [],- "description": "1980s horror lighting: red and blue gels, fog",- "inferred": true,- "curated": false- },- {- "id": "7ef8747e-c925-4851-b9e9-6400ddb19df9",- "name": "Disposable camera",- "model": "soul-v2",- "categories": [],- "description": "Disposable film camera flash snapshots",- "inferred": true,- "curated": false- },- {- "id": "adbca234-bfff-4c19-835f-f8647655d295",- "name": "Neutral pastel film",- "model": "soul-v2",- "categories": [],- "description": "Film stock with neutral pastel tones",- "inferred": true,- "curated": false- },- {- "id": "dbaabc25-7fee-438c-bd65-ae4d1775d4ab",- "name": "Warm vivid film",- "model": "soul-v2",- "categories": [],- "description": "Saturated warm film stock",- "inferred": true,- "curated": false- },- {- "id": "3ece570b-a9a3-4b86-8c20-8eaa7c58cc4f",- "name": "BW film",- "model": "soul-v2",- "categories": [],- "description": "Classic black-and-white film stock",- "inferred": true,- "curated": false- },- {- "id": "2c109e42-bf29-47a2-ae16-aa6cbbba8b8a",- "name": "Warm contrast film",- "model": "soul-v2",- "categories": [],- "description": "Warm, high-contrast film",- "inferred": true,- "curated": false- },- {- "id": "a15510bf-2439-4964-a2cc-0e35d1b5e70f",- "name": "Muted cool film",- "model": "soul-v2",- "categories": [],- "description": "Desaturated cool-toned film",- "inferred": true,- "curated": false- }-];--export const PHOTODUMP_PACKS: PackMeta[] = [- {- "id": "sleepy-head",- "higgsfieldId": "5bab1c9f-b8f6-4dfa-9b24-d9ad44655f96",- "name": "Sleepy Head",- "count": 17,- "description": "Cosy in-bed / slow-morning set: pyjamas, rumpled sheets, soft window light",- "inferred": true,- "product": "photodump"- },- {- "id": "zen",- "higgsfieldId": "b6fc607f-e56a-4afb-8208-7cd692422173",- "name": "Zen",- "count": 10,- "description": "Calm wellness set: yoga, tea, quiet natural spaces",- "inferred": true,- "product": "photodump"- },- {- "id": "candid-glow",- "higgsfieldId": "09c85832-bc13-4681-88aa-1386d492a369",- "name": "Candid Glow",- "count": 12,- "description": "Sun-lit candid lifestyle snaps with golden glow",- "inferred": true,- "product": "photodump"- },- {- "id": "office-dresscode",- "higgsfieldId": "b0548ae3-df8f-4231-a20f-14e55df25231",- "name": "Office dresscode",- "count": 11,- "description": "Workwear set: office looks, desks, city commute",- "inferred": true,- "product": "photodump"- },- {- "id": "surreal-self",- "higgsfieldId": "d18022e7-8095-4580-9250-cd22fc41164a",- "name": "Surreal Self",- "count": 12,- "description": "Surreal edits of you: scale play, doubles, impossible scenes",- "inferred": true,- "product": "photodump"- },- {- "id": "surreal-self-ii",- "higgsfieldId": "de32178c-a24c-445e-aa05-6e8d3604f99e",- "name": "Surreal Self II",- "count": 10,- "description": "Second surreal set with new impossible scenes",- "inferred": true,- "product": "photodump"- },- {- "id": "alter-ego",- "higgsfieldId": "56674954-ade3-4b3e-837b-eececda86267",- "name": "Alter ego",- "count": 12,- "description": "Dramatic alter-ego personas and costume looks",- "inferred": true,- "product": "photodump"- },- {- "id": "cool-girl-dump",- "higgsfieldId": "417116dd-21e0-4b9c-b215-56dd880200c4",- "name": "Cool Girl Dump",- "count": 15,- "description": "Tailored compositions, settings, and styling for female characters",- "inferred": false,- "product": "photodump"- },- {- "id": "male-archive",- "higgsfieldId": "14d68d47-3946-4a31-83e6-88df9ad62db6",- "name": "Male Archive",- "count": 15,- "description": "Tailored compositions, settings, and styling for male characters",- "inferred": false,- "product": "photodump"- },- {- "id": "winter-special",- "higgsfieldId": "2f6029e9-16f0-474e-9ae3-917b5d2de60d",- "name": "Winter special",- "count": 9,- "description": "Seasonal winter set (snow, knitwear, holiday lights)",- "inferred": true,- "product": "instadump"- },- {- "id": "aura-farming",- "higgsfieldId": "f3c76708-107e-4444-8918-72b25560e415",- "name": "Aura farming",- "count": 14,- "description": "Effortless-cool \"aura farming\" poses and moody vibes",- "inferred": true,- "product": "instadump",- "author": "neonfluke"- },- {- "id": "looksmaxing",- "higgsfieldId": "cb271bcc-81cb-482b-ac9f-47547a534779",- "name": "Looksmaxing",- "count": 15,- "description": "Sharp, flattering glow-up portraits",- "inferred": true,- "product": "instadump",- "author": "wispomatic"- },- {- "id": "2000s-nostalgia",- "higgsfieldId": "0c7bcb83-64c6-48f9-ad18-4924b7d93868",- "name": "2000s nostalgia",- "count": 15,- "description": "Y2K flash snaps and 2000s styling",- "inferred": true,- "product": "instadump",- "author": "trunxel"- },- {- "id": "editorial-shots",- "higgsfieldId": "e32f5a1f-febf-4edf-9fb3-678f1092ecf5",- "name": "Editorial shots",- "count": 15,- "description": "Magazine-style editorial portraits",- "inferred": true,- "product": "instadump",- "author": "lostsignal"- }-];--export const FASHION_TEMPLATES: FashionTemplateMeta[] = [- {- "id": "ultra-bold",- "higgsfieldId": "6dfebdbd-c474-4366-8e53-f3a96ea8d143",- "name": "Ultra bold",- "shots": 11,- "description": "Bold, saturated colour-blocked studio fashion",- "inferred": true- },- {- "id": "blue-green-gradient",- "higgsfieldId": "cc02bdd1-3701-4095-9c29-302075bdb78f",- "name": "Blue-Green Gradient",- "shots": 10,- "description": "Studio set on a blue-to-green gradient backdrop",- "inferred": true- },- {- "id": "street-style-paparazzi",- "higgsfieldId": "72e4c773-dafa-475b-b3d2-bd34828e7d1e",- "name": "Street style Paparazzi",- "shots": 9,- "description": "Street-style shots with paparazzi flash energy",- "inferred": true- },- {- "id": "view-from-the-top",- "higgsfieldId": "5fa94115-b1b9-494b-8e5d-cf1079d93918",- "name": "View from the top",- "shots": 6,- "description": "High-angle / top-down fashion framing",- "inferred": true- },- {- "id": "light-blue-studio",- "higgsfieldId": "e8375a6b-a192-45da-9492-a3ee867d9689",- "name": "Light blue studio",- "shots": 10,- "description": "Clean pale-blue studio seamless",- "inferred": true- },- {- "id": "red-room",- "higgsfieldId": "b22b05c2-549f-49d1-85fd-afeb8bed80a0",- "name": "Red room",- "shots": 9,- "description": "Monochrome all-red set",- "inferred": true- }-];diff --git a/src/lib/catalog/marketing.ts b/src/lib/catalog/marketing.tsindex 1d5be98b..64f14dcf 100644--- a/src/lib/catalog/marketing.ts+++ b/src/lib/catalog/marketing.ts@@ -755,11 +755,11 @@ export interface AdCreative extends AdConcept {message?: string | null;error?: string | null;generationId?: string | null;- /** The rendered visual (or the whole ad on the Higgsfield route). */+ /** The rendered visual (or, for a baked ad, the whole ad). */image?: string | null;- /** The visual already holds the text (Higgsfield Ads Studio): don't draw over it. */+ /** The visual already holds the text (an ad drawn whole in one call before build plan O7): don't draw over it. */baked?: boolean;- /** A baked creative's one format (Higgsfield renders a single ratio per ad). */+ /** A baked creative's one format. */ratio?: "1:1" | "4:5" | "9:16";layout?: string | null;engine: Engine;@@ -935,12 +935,12 @@ export function shotPlan(seconds: number, allowed: number[] | undefined): numberexport interface ModelChoice {id: string;- /** Why it's the pick ("exact text", "Higgsfield's own"). */+ /** Why it's the pick ("exact text", "keeps the product pixel-exact"). */note?: string;}/** The models a Marketing Studio format can use on an engine, the default first. */-export function formatModels(format: FormatDef, engine: Engine, has: { product: boolean; avatar: boolean; higgsfield: boolean }): ModelChoice[] {+export function formatModels(format: FormatDef, engine: Engine, has: { product: boolean; avatar: boolean }): ModelChoice[] {if (engine === "open") {switch (format.pipeline) {case "motion":@@ -952,15 +952,14 @@ export function formatModels(format: FormatDef, engine: Engine, has: { product:return [{ id: "oss-qwen-edit", note: format.text ? "Qwen-Image-Edit; your text is set on top" : "Qwen-Image-Edit with your references" }];}}- const hf: ModelChoice[] = has.higgsfield ? [{ id: "marketing-studio-image", note: "Higgsfield's own" }] : [];switch (format.id) {case "product-standalone":- return [{ id: "bria-product-shot", note: "Keeps the product pixel-exact" }, { id: "nano-banana-pro" }, ...hf, { id: "gpt-image-2-5" }, { id: "product-photography", note: "One-tap studio shot" }];+ return [{ id: "bria-product-shot", note: "Keeps the product pixel-exact" }, { id: "nano-banana-pro" }, { id: "gpt-image-2-5" }, { id: "product-photography", note: "One-tap studio shot" }];case "product-with-model":- return [{ id: "nano-banana-pro", note: "Product + person references" }, ...hf, { id: "gpt-image-2-5" }];+ return [{ id: "nano-banana-pro", note: "Product + person references" }, { id: "gpt-image-2-5" }];case "ads":case "marketplace":- return [{ id: "gpt-image-2-5", note: "Exact text" }, { id: "nano-banana-pro" }, { id: "ideogram-4-5" }, ...hf];+ return [{ id: "gpt-image-2-5", note: "Exact text" }, { id: "nano-banana-pro" }, { id: "ideogram-4-5" }];case "poster":return has.product? [{ id: "gpt-image-2-5", note: "Exact text" }, { id: "nano-banana-pro" }, { id: "ideogram-4-5" }]@@ -969,7 +968,7 @@ export function formatModels(format: FormatDef, engine: Engine, has: { product:case "tiktok":return [{ id: "omnihuman-2", note: "Full-body presenter" }, { id: "kling-avatar" }];default:- return [{ id: "seedance-2-5", note: "Higgsfield's default video model" }, { id: "kling-o3" }, { id: "gemini-omni-flash" }];+ return [{ id: "seedance-2-5", note: "Multi-shot with sound" }, { id: "kling-o3" }, { id: "gemini-omni-flash" }];}}@@ -994,8 +993,8 @@ export const OPEN_SOUND_JOIN = { first: "oss-join-sound1", second: "oss-join-sou/** The models the Ad Multiplier can recreate with, per engine (the first that's usable is the default). */export const MULTIPLIER_MODELS: Record<Engine, ModelChoice[]> = {cloud: [- { id: "seedance-2-5", note: "Seedance 2.5 edit — what Higgsfield runs (needs a Higgsfield key)" },{ id: "kling-o3", note: "Kling O3 edit, up to 4 @images" },+ { id: "happy-horse-video-edit", note: "Happy Horse video edit, up to 4 @images" },{ id: "gemini-omni-flash", note: "Gemini Omni Flash edit, prompt only" },],open: [{ id: "fuobe-genjutsu-motion", note: "Fuobe Genjutsu · Motion (Wan Animate 2): your @image_1 takes over the performance" }],diff --git a/src/lib/catalog/models.ts b/src/lib/catalog/models.tsindex 109d56ba..f4ce28c8 100644--- a/src/lib/catalog/models.ts+++ b/src/lib/catalog/models.ts@@ -1,5 +1,4 @@import { CLOUD_MODELS, ORIGINAL_CLOUD } from "./cloud-models.generated";-import { HIGGSFIELD_MODELS, HIGGSFIELD_ROUTES } from "./higgsfield-models.generated";import { pricingAt } from "./plan";import { DEFAULT_FPS_TARGET, FPS_TARGETS, SLOW_MOTION } from "@/lib/av/fps";import { ASR_LANGUAGES, WHISPER_LANGUAGES } from "../speech-languages";@@ -1521,39 +1520,11 @@ function withLastFrameExtend(m: ModelDef): ModelDef {return { ...m, routes: [...m.routes, { op: "extend", provider: "fal", endpoint: LAST_FRAME_CHAIN, note: "last frame → Kling image-to-video → joined" }] };}-/**- * Higgsfield's AI Influencer character sheet. Not in Higgsfield's docs catalog (console docs and- * the pricing API only — docs/research/higgsfield-api.json), so it's defined here, not generated.- */-const AI_INFLUENCER: ModelDef = {- id: "ai-influencer",- name: "AI Influencer",- vendor: "Higgsfield",- family: "soul",- engine: "cloud",- kind: "image",- tagline: "An original character sheet from a short brief — human or creature",- badges: ["new"],- routes: [{ op: "t2i", provider: "higgsfield", endpoint: "higgsfield/ai-influencer", map: { prompt: "brief", seed: "seed", seedRange: [1, 1000000] } }],- options: {- seed: true,- controls: [{ param: "tier", label: "Look", values: ["normal", "freak", "total", "insects", "frogs", "cats", "dogs", "capybaras", "birds"], default: "normal" }],- },- pricing: { unit: "image", usd: 0.05 },-};-/** A launch price while it lasts, the list price after (FLUX 3 Max); read once, when the catalog loads. */const withCurrentPrice = (m: ModelDef): ModelDef => (m.pricing?.promo ? { ...m, pricing: pricingAt(m.pricing) } : m);-/** Cloud models with their Higgsfield routes attached, plus the models only Higgsfield hosts. */-const cloud: ModelDef[] = [- ...CLOUD_MODELS.map((m) => (HIGGSFIELD_ROUTES[m.id] ? { ...m, routes: [...m.routes, ...HIGGSFIELD_ROUTES[m.id]] } : m))- .map(withLastFrameExtend)- .map(withCurrentPrice),- ...HIGGSFIELD_MODELS,- AI_INFLUENCER,- ...cloudTools,-];+/** Cloud models (fal and Replicate) and the cloud tools. */+const cloud: ModelDef[] = [...CLOUD_MODELS.map(withLastFrameExtend).map(withCurrentPrice), ...cloudTools];// ---------------------------------------------------------------------------// Fuobe Originals: one model on both enginesdiff --git a/src/lib/catalog/packs.ts b/src/lib/catalog/packs.tsindex bf20b038..6f7ce340 100644--- a/src/lib/catalog/packs.ts+++ b/src/lib/catalog/packs.ts@@ -1,36 +1,24 @@/*** Prompt packs for the image studios (docs/research/higgsfield-image-studios.md §2, §3, §6, §7):- * the Soul preset fallback (and its open-source prompt template), Photodump / Instadump packs,- * Fashion Factory templates, Character Sheet prompts, and the pure planning steps that turn them- * into generation requests.+ * Photodump / Instadump packs, Fashion Factory templates, Character Sheet prompts, the drawn covers' hues and+ * tones, and the pure planning steps that turn them into generation requests.** Catalog-free on purpose: the pages import it in the browser. What depends on the catalog or- * the install (a Higgsfield key, trained identities, model options) comes in as `PlanCaps`; the- * server (src/server/photodump.ts) fills those in and validates every request before creating it.+ * the install (the models it has) comes in as `PlanCaps`; the server (src/server/photodump.ts)+ * fills those in and validates every request before creating it.*- * Pack names, photo counts and template shot counts come from the generated research file; the- * per-photo prompts are Fuobe's (Higgsfield's are opaque style ids). tests/image-studios.test.ts- * checks that every pack has exactly as many prompts as Higgsfield has photos.+ * Pack names, photo counts and template shot counts come from the generated research file+ * (studio-packs.generated.ts); the per-photo prompts are Fuobe's own. tests/image-studios.test.ts+ * checks that every pack has exactly as many prompts as its photo count.*/import type { ElementLora } from "./elements";-import { styleWords } from "./palettes";+import { SOUL_MODEL_IDS } from "./soul-cards";import { identityFor } from "./training";-import { FASHION_TEMPLATES, PHOTODUMP_PACKS, SOUL_CATEGORIES, SOUL_PRESETS, type FashionTemplateMeta, type PackMeta, type SoulPreset, type SoulPresetModel } from "./higgsfield-presets.generated";+import { FASHION_TEMPLATES, PHOTODUMP_PACKS, type FashionTemplateMeta, type PackMeta } from "./studio-packs.generated";import type { Engine, GenerationRequest } from "./types";// ----------------------------------------------------------------------------// Soul presets: the static fallback for the style picker, and the open-source prompt template--export interface PresetItem {- id: string;- name: string;- /** First category (the live list's `group`). */- group?: string;- categories: string[];- description: string;- /** Hue for the drawn preview (no Higgsfield images are hot-linked). */- hue: number;-}+// Drawn covers/** A stable 0–359 hue from a string (FNV-1a). */export function hueOf(s: string): number {@@ -67,48 +55,6 @@ export function coverTone(...words: (string | undefined)[]): CoverTone {return TONES.find(([re]) => re.test(text))?.[1] ?? "plain";}-const isSoulSource = (s: string): s is SoulPresetModel => s === "soul-v1" || s === "soul-v2";--/**- * The preset list for a style picker source when Higgsfield can't be asked (no key, or the live- * list failed): Higgsfield's own ids, so `style_id` still works once a key is added. Null for- * sources that have no static list (Genjutsu, Marketing Studio).- */-export function presetFallback(source: string): { items: PresetItem[]; categories: string[] } | null {- if (!isSoulSource(source)) return null;- const items = SOUL_PRESETS.filter((p) => p.model === source).map((p) => ({- id: p.id,- name: p.name,- group: p.categories[0],- categories: p.categories,- description: p.description,- hue: hueOf(p.id),- }));- return { items, categories: SOUL_CATEGORIES[source] };-}--/** Category tabs: All first, then the model's categories that have presets. */-export function presetTabs(items: Pick<PresetItem, "categories">[], categories: string[]): string[] {- return ["All", ...categories.filter((c) => items.some((i) => i.categories.includes(c)))];-}--export const inTab = (item: Pick<PresetItem, "categories">, tab: string) => tab === "All" || item.categories.includes(tab);--export const getSoulPreset = (id: string): SoulPreset | undefined => SOUL_PRESETS.find((p) => p.id === id);--/** Soul 2.0's curated moodboards (the 33 Soul 2.0 presets), in Higgsfield's order. */-export const CURATED_MOODBOARDS: SoulPreset[] = SOUL_PRESETS.filter((p) => p.model === "soul-v2");--/**- * The open route of a Soul preset: its description as a prompt template on Z-Image Turbo- * ("{prompt}. In the style of “Retro BW”: grainy black-and-white film portrait.").- */-export function presetPrompt(preset: Pick<SoulPreset, "name" | "description">, userPrompt: string): string {- const style = styleWords(preset);- const p = userPrompt.trim().replace(/[.\s]+$/, "");- return p ? `${p}. ${style}` : `A photo. ${style}`;-}-// ---------------------------------------------------------------------------// Photodump / Instadump packs@@ -408,8 +354,6 @@ export type PhotoSubject =/** What the server knows about this install, for planning. */export interface PlanCaps {- /** A Higgsfield key is set (the Character Sheet's Soul 2.0 builder can run for real until build plan O7). */- higgsfield: boolean;/** Models this install has (open-source workflows can be missing). */has?: (id: string) => boolean;}@@ -809,10 +753,13 @@ export function sheetFromReference(images: string[], engine: Engine, details?: s};}-/** Build from scratch: the Soul Cast form → its casting sheet model on each engine. */+/**+ * Build from scratch: the Soul Cast form → its casting sheet model on each engine: the Soul Cast sheet graph on your+ * GPU, Fuobe Soul in the cloud (Nano Banana Pro when this install has switched Fuobe Soul off).+ */export function castSheetModel(engine: Engine, caps: PlanCaps): string {if (engine === "open") return !caps.has || caps.has("oss-zimage-soul-cast") ? "oss-zimage-soul-cast" : "oss-z-image-turbo";- return caps.higgsfield ? "soul-2" : "nano-banana-pro";+ return !caps.has || caps.has(SOUL_MODEL_IDS.soul) ? SOUL_MODEL_IDS.soul : "nano-banana-pro";}/** Soul Cast fields that only make sense for some answers (mirrors SOUL_CAST_FIELDS[].when in cinema.ts). */diff --git a/src/lib/catalog/palettes.ts b/src/lib/catalog/palettes.tsindex 6ce046b4..5c48e286 100644--- a/src/lib/catalog/palettes.ts+++ b/src/lib/catalog/palettes.ts@@ -8,8 +8,8 @@** Routing (docs/research/higgsfield-image-studios.md §4, §5):* - Palette → models with a palette field (Recraft V4.1 / Pro / Styles: ≤10 colours, Ideogram 3.0):- * `params.palette` (+ the background colour in its own field); Cinema Studio 4.0: the built-in- * palette's slug as `color_palette`; every other model: the hex list written into the prompt. Open+ * `params.palette` (+ the background colour in its own field); every other model: the hex list written into+ * the prompt (Fuobe Cinema too: a built-in palette's slug is no longer sent anywhere). Open* engine: Z-Image Turbo becomes Z-Image Turbo · Palette (hex in the prompt + a ColorTransfer lock to* a swatch); other open models can add a palette-transfer post-step (oss-palette-image, chained).* - Moodboard → curated: a Fuobe Soul look (Soul 2.0's 33, Soul's 106; src/lib/catalog/soul-cards.ts). On a model@@ -401,9 +401,6 @@ export const SIGNATURE_MODELS = {/** A personal moodboard trained as a style LoRA runs here, the LoRA as its look (both engines). */soul: SOUL_MODEL_IDS.soul,paletteLock: "oss-palette-image",- soul2: "soul-2",- soul1: "soul-1",- cinema: "cinema-studio-4",} as const;const NOT_READY = "This moodboard is still training. Try again once it is ready.";@@ -590,8 +587,6 @@ export function applySignature(req: GenerationRequest, sig: Signature | undefineif (pal.background && nativeNow.background) r = setExtra(r, nativeNow.background, pal.background.toUpperCase());} else if (model.id === SIGNATURE_MODELS.openPalette) {r = { ...r, params: { ...r.params, palette: all } };- } else if (model.id === SIGNATURE_MODELS.cinema && pal.slug) {- r = setExtra(r, "color_palette", pal.slug);} else {words.push(palettePrompt(pal));r = { ...r, params: { ...r.params, palette: all.slice(0, 16) } };diff --git a/src/lib/catalog/plan.ts b/src/lib/catalog/plan.tsindex 882d6fde..69aa1a63 100644--- a/src/lib/catalog/plan.ts+++ b/src/lib/catalog/plan.ts@@ -336,8 +336,6 @@ export function planGeneration(const missing = missingInputs(op, req) ?? unreadInputs(model, op, req) ?? missingImages(model, req);if (missing) throw new Error(missing);- const presets = model.options.presets;- if (presets?.required && !params.extra?.[presets.param]) throw new Error(`Pick a ${presets.label.toLowerCase()} first`);// Soul Cinema's 21:9 (research §4.5: a crop option): made at 16:9 on both engines, then cropped to 21:9 with// its grade after generation (meta.crop).diff --git a/src/lib/catalog/replaced.ts b/src/lib/catalog/replaced.tsnew file mode 100644index 00000000..f2798be1--- /dev/null+++ b/src/lib/catalog/replaced.ts@@ -0,0 +1,85 @@+/**+ * What replaced each retired model, look and training target when Fuobe stopped calling Higgsfield's API (build plan O7,+ * docs/research/fuobe-originals-recipes-5.md, "What replaces each Higgsfield model when the provider is removed").+ *+ * One way only: an id stored before the switch — a past generation's Reuse, a saved Cinema or Canvas project, an Assist+ * plan, a Genjutsu setup code, a Katana job, a moodboard pick, a training — resolves here to the model that does the job+ * now, a Fuobe Original where there is one, else a partner model on fal or Replicate. Nothing here is ever sent to a+ * provider. Past generations stay viewable as they are: the Library reads their saved outputs, not a provider.+ *+ * Soul's old style ids resolve to Fuobe looks through lookCard() (each look keeps the id it replaces, never sent);+ * Genjutsu's old looks are dropped (a Soul look or your own images replace them).+ *+ * Pure and browser-safe (cards only, no recipes); shared by the browser and the server. tests/no-higgsfield.test.ts checks every target exists.+ */+import { lookCard } from "./soul-cards";++export interface Replacement {+ /** The model (or training target) that does the job now. */+ id: string;+ /** What the retired item was called, for history (the Library, Assist, an old setup). */+ was: string;+ /** One line on what changed, shown where an old setup or run is opened again. */+ note: string;+ /** A Fuobe Original (both engines): a stored cloud run stays in the cloud unless it says otherwise. */+ original?: true;+}++/** Retired model id → the model that replaced it. */+export const REPLACED_BY: Readonly<Record<string, Replacement>> = {+ "soul-1": { id: "fuobe-soul", was: "Soul (Higgsfield)", note: "Soul now runs as Fuobe Soul, with Soul's 106 looks on open weights", original: true },+ "soul-2": { id: "fuobe-soul", was: "Soul 2.0 (Higgsfield)", note: "Soul 2.0 now runs as Fuobe Soul, with Soul 2.0's 33 looks on open weights", original: true },+ "soul-cinema": { id: "fuobe-soul-cinema", was: "Soul Cinema (Higgsfield)", note: "Soul Cinema now runs as Fuobe Soul Cinema on open weights", original: true },+ "cinema-studio-4": { id: "fuobe-cinema", was: "Cinema Studio 4.0 (Higgsfield)", note: "Cinema Studio's clips now run on Fuobe Cinema, with the Director panel compiled into the run", original: true },+ "genjutsu-motion-transfer": { id: "fuobe-genjutsu-motion", was: "Genjutsu Motion Transfer (Higgsfield)", note: "Motion transfer now runs on Fuobe Genjutsu (Wan Animate)", original: true },+ "genjutsu-lite-motion-transfer": { id: "fuobe-genjutsu-motion-lite", was: "Genjutsu Lite Motion Transfer (Higgsfield)", note: "Motion transfer Lite now runs on Fuobe Genjutsu Lite", original: true },+ "genjutsu-object-swap": { id: "fuobe-genjutsu-swap", was: "Genjutsu Object Swap (Higgsfield)", note: "Object swap now runs on Fuobe Genjutsu (SAM 3.1 + Wan VACE)", original: true },+ "genjutsu-lite-object-swap": { id: "fuobe-genjutsu-swap-lite", was: "Genjutsu Lite Object Swap (Higgsfield)", note: "Object swap Lite now runs on Fuobe Genjutsu Lite", original: true },+ "genjutsu-restyle": { id: "fuobe-genjutsu-restyle", was: "Genjutsu Restyle (Higgsfield)", note: "Restyle now runs on Fuobe Genjutsu with a Fuobe look", original: true },+ // O10 builds Fuobe's own Marketing image on Qwen-Image-Edit; until then the partner model Higgsfield ran underneath.+ "marketing-studio-image": { id: "gpt-image-2-5", was: "Marketing Studio Image (Higgsfield)", note: "Marketing images now run on GPT Image 2.5 with Fuobe's format prompts" },+ // Ads Studio's one-shot ad became Fuobe's Ads pipeline (copy, then a visual, composited in the browser); a single run reuses its visual model.+ "ads-studio": { id: "nano-banana-pro", was: "Ads Studio (Higgsfield)", note: "Ads now come from Fuobe's Ads pipeline: written copy, a Nano Banana Pro visual and your fonts" },+ // The AI Influencer app draws its sheet on Nano Banana Pro, as the builder does, until O10 moves it to Fuobe Soul.+ "ai-influencer": { id: "nano-banana-pro", was: "AI Influencer (Higgsfield)", note: "The AI Influencer sheet now runs on Nano Banana Pro (the Soul Cast sheet on your GPU)" },+};++/** Retired training targets (Higgsfield Soul ID) → the trainer that makes a Fuobe Soul ID from the same photos. */+export const TRAINING_REPLACED_BY: Readonly<Record<string, Replacement>> = {+ "soul-id-v2": { id: "fal-z-image", was: "Soul ID for Soul 2.0 (Higgsfield)", note: "Train the character again for Fuobe Soul on the same photos" },+ "soul-id-cinema": { id: "fal-z-image", was: "Soul ID for Soul Cinema (Higgsfield)", note: "Train the character again for Fuobe Soul on the same photos" },+};++/** The replacement of a retired model id, or undefined for a current one. */+export const replacedBy = (id: string | undefined | null): Replacement | undefined => (id && Object.hasOwn(REPLACED_BY, id) ? REPLACED_BY[id] : undefined);++/** The id to use for a stored model id: its replacement when it was retired, else itself. */+export const currentModelId = (id: string): string => replacedBy(id)?.id ?? id;++/** The settings keys a retired model's request carried that mean nothing to its replacement (style ids, Soul ID refs, looks). */+const RETIRED_EXTRA = ["style_id", "custom_reference_id", "custom_reference_strength", "preset_id", "color_palette", "template_id"] as const;++interface StoredRequest {+ modelId: string;+ engine?: "cloud" | "open";+ presetId?: string;+ params?: { extra?: Record<string, unknown> };+}++/**+ * A stored request (Reuse, a saved project's step, an Assist plan) moved to the model that replaced its own, with what+ * still means something kept: a Soul style id becomes the Fuobe look that replaced it (`presetId`), the retired API's+ * own settings (style, Soul ID reference, palette slug, Genjutsu look) are dropped. A current model's request is+ * returned as it is. `note` says what changed, for a toast.+ */+export function migrateRequest<T extends StoredRequest>(req: T): { request: T; note?: string } {+ const r = replacedBy(req.modelId);+ if (!r) return { request: req };+ const extra = { ...(req.params?.extra ?? {}) };+ const look = typeof extra.style_id === "string" ? lookCard(extra.style_id) : undefined;+ for (const k of RETIRED_EXTRA) delete extra[k];+ const params = req.params ? { ...req.params, ...(req.params.extra && { extra }) } : undefined;+ if (params?.extra && !Object.keys(params.extra).length) delete params.extra;+ const request = { ...req, modelId: r.id, ...(params && { params }), ...(look && { presetId: look.id }), ...(r.original && { engine: req.engine ?? "cloud" }) };+ return { request, note: r.note };+}diff --git a/src/lib/catalog/studio-packs.generated.ts b/src/lib/catalog/studio-packs.generated.tsnew file mode 100644index 00000000..b91b780b--- /dev/null+++ b/src/lib/catalog/studio-packs.generated.ts@@ -0,0 +1,185 @@+// GENERATED by scripts/gen-studio-packs.py from docs/research/higgsfield-image-studios.json — do not edit.+// Photodump / Instadump packs and Fashion Factory templates: names, photo counts and descriptions (`inferred` = ours).++export interface PackMeta {+ id: string;+ name: string;+ count: number;+ description: string;+ inferred: boolean;+ product: "photodump" | "instadump";+ author?: string;+}++export interface FashionTemplateMeta {+ id: string;+ name: string;+ /** Shots in the template (Fuobe's photoset makes one photo per shot). */+ shots: number;+ description: string;+ inferred: boolean;+}++export const PHOTODUMP_PACKS: PackMeta[] = [+ {+ "id": "sleepy-head",+ "name": "Sleepy Head",+ "count": 17,+ "description": "Cosy in-bed / slow-morning set: pyjamas, rumpled sheets, soft window light",+ "inferred": true,+ "product": "photodump"+ },+ {+ "id": "zen",+ "name": "Zen",+ "count": 10,+ "description": "Calm wellness set: yoga, tea, quiet natural spaces",+ "inferred": true,+ "product": "photodump"+ },+ {+ "id": "candid-glow",+ "name": "Candid Glow",+ "count": 12,+ "description": "Sun-lit candid lifestyle snaps with golden glow",+ "inferred": true,+ "product": "photodump"+ },+ {+ "id": "office-dresscode",+ "name": "Office dresscode",+ "count": 11,+ "description": "Workwear set: office looks, desks, city commute",+ "inferred": true,+ "product": "photodump"+ },+ {+ "id": "surreal-self",+ "name": "Surreal Self",+ "count": 12,+ "description": "Surreal edits of you: scale play, doubles, impossible scenes",+ "inferred": true,+ "product": "photodump"+ },+ {+ "id": "surreal-self-ii",+ "name": "Surreal Self II",+ "count": 10,+ "description": "Second surreal set with new impossible scenes",+ "inferred": true,+ "product": "photodump"+ },+ {+ "id": "alter-ego",+ "name": "Alter ego",+ "count": 12,+ "description": "Dramatic alter-ego personas and costume looks",+ "inferred": true,+ "product": "photodump"+ },+ {+ "id": "cool-girl-dump",+ "name": "Cool Girl Dump",+ "count": 15,+ "description": "Tailored compositions, settings, and styling for female characters",+ "inferred": false,+ "product": "photodump"+ },+ {+ "id": "male-archive",+ "name": "Male Archive",+ "count": 15,+ "description": "Tailored compositions, settings, and styling for male characters",+ "inferred": false,+ "product": "photodump"+ },+ {+ "id": "winter-special",+ "name": "Winter special",+ "count": 9,+ "description": "Seasonal winter set (snow, knitwear, holiday lights)",+ "inferred": true,+ "product": "instadump"+ },+ {+ "id": "aura-farming",+ "name": "Aura farming",+ "count": 14,+ "description": "Effortless-cool \"aura farming\" poses and moody vibes",+ "inferred": true,+ "product": "instadump",+ "author": "neonfluke"+ },+ {+ "id": "looksmaxing",+ "name": "Looksmaxing",+ "count": 15,+ "description": "Sharp, flattering glow-up portraits",+ "inferred": true,+ "product": "instadump",+ "author": "wispomatic"+ },+ {+ "id": "2000s-nostalgia",+ "name": "2000s nostalgia",+ "count": 15,+ "description": "Y2K flash snaps and 2000s styling",+ "inferred": true,+ "product": "instadump",+ "author": "trunxel"+ },+ {+ "id": "editorial-shots",+ "name": "Editorial shots",+ "count": 15,+ "description": "Magazine-style editorial portraits",+ "inferred": true,+ "product": "instadump",+ "author": "lostsignal"+ }+];++export const FASHION_TEMPLATES: FashionTemplateMeta[] = [+ {+ "id": "ultra-bold",+ "name": "Ultra bold",+ "shots": 11,+ "description": "Bold, saturated colour-blocked studio fashion",+ "inferred": true+ },+ {+ "id": "blue-green-gradient",+ "name": "Blue-Green Gradient",+ "shots": 10,+ "description": "Studio set on a blue-to-green gradient backdrop",+ "inferred": true+ },+ {+ "id": "street-style-paparazzi",+ "name": "Street style Paparazzi",+ "shots": 9,+ "description": "Street-style shots with paparazzi flash energy",+ "inferred": true+ },+ {+ "id": "view-from-the-top",+ "name": "View from the top",+ "shots": 6,+ "description": "High-angle / top-down fashion framing",+ "inferred": true+ },+ {+ "id": "light-blue-studio",+ "name": "Light blue studio",+ "shots": 10,+ "description": "Clean pale-blue studio seamless",+ "inferred": true+ },+ {+ "id": "red-room",+ "name": "Red room",+ "shots": 9,+ "description": "Monochrome all-red set",+ "inferred": true+ }+];diff --git a/src/lib/catalog/training.ts b/src/lib/catalog/training.tsindex 68bb434e..e3c8cdce 100644--- a/src/lib/catalog/training.ts+++ b/src/lib/catalog/training.ts@@ -475,7 +475,7 @@ export function usableOn(l: Pick<ElementLora, "file" | "url" | "own" | "referencreturn engine === "open" ? !!l.file : !!l.url || (!!l.own && !!l.file);}-/** A Higgsfield Soul ID (from before O3): it can't be exported, so the element is retrained on its photos. */+/** An older Soul ID (Higgsfield's, from before O3): it can't be exported, so the element is retrained on its photos. */export const isLegacySoulId = (l: Pick<ElementLora, "referenceId">): boolean => !!l.referenceId;/**@@ -492,13 +492,13 @@ export function identityFor(loras: ElementLora[], model: Pick<ModelDef, "id" | "}/**- * How the Train dialog names one of an element's LoRAs to remove it: a Higgsfield Soul ID by its id, a trained LoRA by+ * How the Train dialog names one of an element's LoRAs to remove it: an older Soul ID by its reference id, a trained LoRA by* its family and file (one file attached for two families is two LoRAs).*/export const identityKey = (l: Pick<ElementLora, "file" | "referenceId" | "modelId" | "family">): string =>l.referenceId || `${loraFamily(l) ?? l.modelId}:${l.file || l.modelId}`;-/** A trained LoRA some run can use (not a demo's stand-in or a Higgsfield Soul ID, and on an engine where its family has a model). */+/** A trained LoRA some run can use (not a demo's stand-in or an older Soul ID, and on an engine where its family has a model). */export function runsSomewhere(l: Pick<ElementLora, "file" | "url" | "own" | "referenceId" | "demo" | "family" | "modelId">): boolean {const fam = loraFamily(l);const lead = fam ? TRAINING_FAMILIES[fam].lead : { open: l.modelId, cloud: l.modelId };diff --git a/src/lib/catalog/types.ts b/src/lib/catalog/types.tsindex da27b268..d5c2460e 100644--- a/src/lib/catalog/types.ts+++ b/src/lib/catalog/types.ts@@ -246,7 +246,7 @@ export interface FocusPoint {}/** "llm" runs text steps (translate, write) on the configured LLM (Claude or Ollama) inside the server. */-export type ProviderId = "fal" | "replicate" | "higgsfield" | "openai" | "google" | "comfyui" | "mock" | "local" | "llm";+export type ProviderId = "fal" | "replicate" | "openai" | "google" | "comfyui" | "mock" | "local" | "llm";/** Duration encodings differ between APIs ("5" vs 5 vs "5s"). */export interface DurationField {@@ -263,7 +263,7 @@ export interface EnumField {values?: Record<string, string | number | boolean>;/*** The canonical values this route takes, when they differ from the model's own list (a model on two- * APIs, e.g. Grok Imagine on fal and Higgsfield). Any other value is sent as the closest one it takes+ * APIs that take different lists). Any other value is sent as the closest one it takes* (aspect ratios by shape, resolutions by size) and left out when none is close ("auto" on an API* without it), so the API's default applies.*/@@ -321,7 +321,7 @@ export interface FieldMap {fps?: string;/*** Colour palette: hex strings converted to the API's shape ("rgb-object" = Recraft on fal [{r,g,b}],- * "rgb-array" = Recraft on Higgsfield [{rgb:[r,g,b]}], "ideogram" = {members:[{rgb:{r,g,b}, color_weight}]}).+ * "rgb-array" = [{rgb:[r,g,b]}], "ideogram" = {members:[{rgb:{r,g,b}, color_weight}]}).* `background` names the API's background-colour field: a hex string sent as params.extra[background]* is converted to the same shape.*/@@ -501,8 +501,6 @@ export interface ModelOptions {multiShot?: { mode: "native" | "prompt" | "concat"; maxShots: number };/** Draft mode (cheap preview, then a full render of the take you like). */draft?: boolean;- /** A style/template list fetched from the provider (Soul styles, Genjutsu looks, Marketing Studio templates). */- presets?: { source: string; param: string; label: string; required?: boolean };/*** Takes a Fuobe Soul look (src/lib/catalog/soul.ts) as GenerationRequest.presetId, with presetStrength scaling* its LoRAs; `label` names the picker.@@ -617,8 +615,6 @@ export interface ModelDef {options: ModelOptions;defaults?: Partial<Pick<GenParams, "aspectRatio" | "resolution" | "duration" | "numOutputs" | "generateAudio" | "voice" | "targetFps" | "format">>;pricing?: Pricing;- /** Trained identities this model accepts by id (Higgsfield Soul ID). */- identity?: { provider: "higgsfield"; version: "v1" | "v2" | "cinema" };/*** The licence of the open weights a hosted model runs (generated from the research), as information: nothing is* hidden or refused for it; the admin turns models on or off in Settings.diff --git a/src/lib/connections.ts b/src/lib/connections.tsindex 8b104c70..ef08214a 100644--- a/src/lib/connections.ts+++ b/src/lib/connections.ts@@ -4,13 +4,12 @@* address looks like, when to offer the first-run guide, and each connection's one-line status.*/-export type TestProvider = "fal" | "replicate" | "higgsfield" | "comfyui" | "llm" | "civitai";+export type TestProvider = "fal" | "replicate" | "comfyui" | "llm" | "civitai";/** The settings each provider's connection test reads; an unsaved value for one of them can be tested before it's saved. */export const PROVIDER_SETTINGS = {fal: ["falKey"],replicate: ["replicateToken"],- higgsfield: ["higgsfieldKey"],comfyui: ["comfyUrl", "comfyToken", "comfyIsolatedUrl"],llm: ["anthropicKey", "ollamaUrl", "ollamaModel", "enhanceProvider"],// Not a model provider: the key that downloads a recipe's civitai LoRAs (Settings → LoRAs).@@ -70,9 +69,6 @@ export function settingProblem(name: string, raw: string): string | null {case "falKey":if (KEY_PAIR.test(v)) return null;return v.includes(":") ? "Both halves of key_id:key_secret are needed, without spaces — copy the key again" : "fal.ai keys look like key_id:key_secret — paste the whole key, with the part after the colon";- case "higgsfieldKey":- if (KEY_PAIR.test(v)) return null;- return "Higgsfield keys look like KEY_ID:KEY_SECRET (both parts from console.higgsfield.ai)";case "replicateToken":return /^r8_\S+$/.test(v) ? null : "Replicate tokens start with r8_";case "anthropicKey":@@ -101,7 +97,7 @@ export interface ConnectionState {demoMode?: string;}-const CLOUD_PROVIDERS = ["fal", "replicate", "higgsfield"] as const;+const CLOUD_PROVIDERS = ["fal", "replicate"] as const;/** Whether a paid API and ComfyUI are connected. */export function connectedEngines(s: ConnectionState): { cloud: boolean; open: boolean } {@@ -125,7 +121,7 @@ export interface StartQuote {open: { name: string; providers: string[] } | null;}-const PROVIDER_LABEL: Record<string, string> = { fal: "fal.ai", replicate: "Replicate", higgsfield: "Higgsfield", comfyui: "ComfyUI" };+const PROVIDER_LABEL: Record<string, string> = { fal: "fal.ai", replicate: "Replicate", comfyui: "ComfyUI" };/*** The line under Home's composer, before Start is pressed: the model it runs and its price, or why@@ -164,7 +160,7 @@ export const FIRST_RUN_SCRIPT = `(function(){try{if(localStorage.getItem("${FIRSexport const ENGINE_MODE_LABEL: Record<EngineModeName, string> = { both: "Open source + paid", open: "Open source only", cloud: "Paid APIs only" };export interface ConnectionItem {- id: "fal" | "replicate" | "higgsfield" | "comfyui" | "llm";+ id: "fal" | "replicate" | "comfyui" | "llm";label: string;ok: boolean;/** "Key set", "Online", "Off"… */@@ -177,7 +173,7 @@ export interface ConnectionItem {/** One line per connection for Settings' status strip, in the order the page lists them. */export function connectionSummary(s: ConnectionState): ConnectionItem[] {- const key = (id: "fal" | "replicate" | "higgsfield", label: string): ConnectionItem => {+ const key = (id: "fal" | "replicate", label: string): ConnectionItem => {const ok = !!s.providers[id]?.configured;return { id, label, ok, text: ok ? "Key set" : "Not set", href: `#${id}`, unused: s.engineMode === "open" };};@@ -186,7 +182,6 @@ export function connectionSummary(s: ConnectionState): ConnectionItem[] {return [key("fal", "fal.ai"),key("replicate", "Replicate"),- key("higgsfield", "Higgsfield"),{ id: "comfyui", label: "ComfyUI", ok: comfy, text: comfy ? "Online" : "Offline", href: "#comfyui", unused: s.engineMode === "cloud" },{ id: "llm", label: "Claude / Ollama", ok: llm, text: llm ? "On" : "Off", href: "#text-ai", unused: false },];diff --git a/src/lib/licences.ts b/src/lib/licences.tsindex a8b269c5..f1690323 100644--- a/src/lib/licences.ts+++ b/src/lib/licences.ts@@ -335,7 +335,6 @@ export function providerPage(provider: string, endpoint: string): string | undefexport const PROVIDER_NAME: Record<string, string> = {fal: "fal.ai",replicate: "Replicate",- higgsfield: "Higgsfield",comfyui: "ComfyUI (your GPU)",llm: "Claude or Ollama",local: "Your browser",diff --git a/src/lib/model-access.ts b/src/lib/model-access.tsindex 247e7b6c..68b9ae49 100644--- a/src/lib/model-access.ts+++ b/src/lib/model-access.ts@@ -18,7 +18,7 @@ export interface ModelAccess {/** Model ids. */models: string[];classes: LicenceClass[];- /** Provider ids (fal, replicate, higgsfield, comfyui, llm, local). */+ /** Provider ids (fal, replicate, comfyui, llm, local). */providers: string[];/** ComfyUI node packs by name (src/lib/licences.ts NODE_PACKS). */packs: string[];diff --git a/src/server/ads.ts b/src/server/ads.tsindex 0c833bc9..59cb6e9e 100644--- a/src/server/ads.ts+++ b/src/server/ads.ts@@ -20,7 +20,6 @@ import { getBrand, getProduct, listProducts, parseJsonObject } from "./brand";import { db } from "./db";import { llmText } from "./enhance";import { createGenerations, getGeneration, previewGeneration, recordLocalGeneration } from "./generations";-import { provider } from "./providers";import { llmBackends } from "./providers/llm";import { engineMode } from "./settings";@@ -29,35 +28,24 @@ import { engineMode } from "./settings";* Each ad = a selling angle with headline, body copy and CTA (LLM, or rules offline) + one visual* from an image model (product photo as reference, no text in it). The finished creative is* composited in the browser (canvas) in 1:1, 4:5 and 9:16 with the brand's logo, colours and fonts.- * With a Higgsfield key, Higgsfield's own Ads Studio can render whole ads in one call instead.+ * Ads drawn whole in one call (words included) before build plan O7 stay as they were ("baked"); a retry makes+ * them the Fuobe way.*/export const BatchBody = z.object({brandId: z.string().min(1).max(40),engine: z.enum(["cloud", "open"]),- route: z.enum(["fuobe", "higgsfield"]).optional(),items: z.array(z.object({ productId: z.string().min(1).max(40), count: z.number().int().min(1).max(MAX_ADS_PER_PRODUCT) })).min(1).max(MAX_PRODUCTS_PER_RUN),/** What the user asked for in the chat ("holiday setting for our winter sale"). */direction: z.string().max(1000).optional(),- /** Higgsfield renders one format per ad. */- ratio: z.enum(AD_RATIOS).optional(),});export type BatchInput = z.infer<typeof BatchBody>;export class AdsError extends Error {}-const higgsfieldReady = () => provider("higgsfield").isConfigured();--/** The route a batch takes: Higgsfield's one-shot Ads Studio when asked for (or by default with a key), else Fuobe's. */-export function batchRoute(input: Pick<BatchInput, "engine" | "route">): "fuobe" | "higgsfield" {- if (input.engine === "open") return "fuobe";- if (input.route) return input.route === "higgsfield" && higgsfieldReady() ? "higgsfield" : "fuobe";- return higgsfieldReady() ? "higgsfield" : "fuobe";-}-// ---------------------------------------------------------------------------// Copy@@ -183,33 +171,6 @@ export function visualRequest(c: Pick<AdConcept, "visual" | "headline">, product};}-export function higgsfieldRequest(product: Product | null, brand: BrandKit, ratio: string, direction?: string, n = 0): GenerationRequest {- const angle = AD_ANGLES[n % AD_ANGLES.length];- return {- feature: "ads",- modelId: "ads-studio",- op: product?.images.length ? "edit" : "t2i",- prompt: [- `A static social ad for ${product?.name ?? brand.name} by ${brand.name}`,- `Angle: ${angle.name} — ${angle.copy}`,- product?.description && `Product: ${product.description.slice(0, 600)}`,- product?.sellingPoints.length && `Selling points: ${product.sellingPoints.join("; ")}`,- (product?.audience || brand.audience) && `Audience: ${product?.audience || brand.audience}`,- brand.tone.length && `Tone: ${brand.tone.join(", ")}`,- brandLine(brand),- direction && `Direction: ${direction}`,- "Include a short headline and a call to action",- ]- .filter(Boolean)- .join(". ")- .slice(0, 7900),- inputs: product?.images.length ? { images: product.images.slice(0, 10) } : undefined,- params: { aspectRatio: ratio, numOutputs: 1 },- title: `${product?.name ?? brand.name} ad`,- batchTitle: `${brand.name} · ads`,- };-}-// ---------------------------------------------------------------------------// Batches@@ -236,8 +197,10 @@ interface CreativeRow {interface CreativeMeta {engine: Engine;modelId: string;- route: "fuobe" | "higgsfield";+ /** "baked": drawn whole, words included, in one format by a one-shot ad model before build plan O7 (history). */+ route: "fuobe" | "baked";direction?: string;+ /** A baked ad's one format. */ratio?: string;/** Composited PNGs saved to the Library, by ratio. */saved?: Record<string, string>;@@ -249,7 +212,6 @@ declare global {const running = () => (globalThis.__fuobeAdRuns ??= new Set<string>());export interface BatchEstimate {- route: "fuobe" | "higgsfield";modelId: string;modelName: string;total: number;@@ -266,22 +228,17 @@ export interface BatchEstimate {export function estimateBatch(input: BatchInput, draft?: { brand: BrandKit; product: Product | null }): BatchEstimate {const brand = draft?.brand ?? getBrand(input.brandId);if (!brand) throw new AdsError("That brand no longer exists");- const route = batchRoute(input);const total = input.items.reduce((n, i) => n + i.count, 0);const product = draft ? draft.product : getProduct(input.items[0].productId);- const req = route === "higgsfield" ? higgsfieldRequest(product, brand, input.ratio ?? "4:5") : visualRequest({ visual: "the product", headline: "Ad" }, product, brand, input.engine);- const p = previewGeneration(req);+ const p = previewGeneration(visualRequest({ visual: "the product", headline: "Ad" }, product, brand, input.engine));let copy = 0;- if (route === "fuobe") {- try {- copy = previewGeneration({ feature: "ads", modelId: input.engine === "open" ? "oss-text-llm" : "text-llm", op: "write", prompt: "copy" }).costUsd ?? 0;- } catch {- copy = 0;- }+ try {+ copy = previewGeneration({ feature: "ads", modelId: input.engine === "open" ? "oss-text-llm" : "text-llm", op: "write", prompt: "copy" }).costUsd ?? 0;+ } catch {+ copy = 0;}const perAd = p.costUsd;return {- route,modelId: p.model.id,modelName: p.model.name,total,@@ -289,7 +246,7 @@ export function estimateBatch(input: BatchInput, draft?: { brand: BrandKit; prodcostUsd: perAd === null ? null : Math.round((perAd * total + copy * input.items.length) * 1000) / 1000,demo: p.demo,// Who writes the words: an LLM this install can reach (as llmText picks one), else the rules.- copyBy: route === "fuobe" && llmBackends({ endpoint: "claude" }).length ? "llm" : "rules",+ copyBy: llmBackends({ endpoint: "claude" }).length ? "llm" : "rules",};}@@ -312,11 +269,11 @@ export function createBatch(input: BatchInput, fixed: FixedCopy = {}): { batchIdreturn { product: p, count: i.count };});const est = estimateBatch(input); // validates the model, engine mode and price now- const route = est.route;+ const route = "fuobe";const batchId = nanoid(10);const now = Date.now();db().prepare("INSERT INTO ad_batches (id, brand_id, engine, route, model_id, direction, created_at) VALUES (?, ?, ?, ?, ?, ?, ?)").run(batchId, brand.id, input.engine, route, est.modelId, input.direction ?? null, now);- const meta: CreativeMeta = { engine: input.engine, modelId: est.modelId, route, direction: input.direction, ratio: input.ratio };+ const meta: CreativeMeta = { engine: input.engine, modelId: est.modelId, route, direction: input.direction };const insert = db().prepare("INSERT INTO ad_creatives (id, batch_id, brand_id, product_id, position, status, generation_id, meta_json, created_at, updated_at) VALUES (?, ?, ?, ?, ?, ?, NULL, ?, ?, ?)",);@@ -326,29 +283,19 @@ export function createBatch(input: BatchInput, fixed: FixedCopy = {}): { batchIdfor (const { product, count } of products) {for (let k = 0; k < count; k++) {const id = nanoid(10);- insert.run(id, batchId, brand.id, product.id, pos++, route === "fuobe" ? "writing" : "queued", JSON.stringify(meta), now + pos, now + pos);+ insert.run(id, batchId, brand.id, product.id, pos++, "writing", JSON.stringify(meta), now + pos, now + pos);ids.push({ id, product, index: k });}}})();running().add(batchId);- const run = fillBatch(batchId, brand, ids, input, route, fixed).finally(() => running().delete(batchId));+ const run = fillBatch(batchId, brand, ids, input, fixed).finally(() => running().delete(batchId));return { batchId, creatives: listCreatives({ brandId: brand.id, batchId }), run };}-async function fillBatch(batchId: string, brand: BrandKit, ids: { id: string; product: Product; index: number }[], input: BatchInput, route: "fuobe" | "higgsfield", fixed: FixedCopy = {}): Promise<void> {+async function fillBatch(batchId: string, brand: BrandKit, ids: { id: string; product: Product; index: number }[], input: BatchInput, fixed: FixedCopy = {}): Promise<void> {const setGen = (id: string, g: Generation) => db().prepare("UPDATE ad_creatives SET generation_id = ?, status = 'queued', updated_at = ? WHERE id = ?").run(g.id, Date.now(), id);const fail = (id: string, error: string) => db().prepare("UPDATE ad_creatives SET status = 'failed', error = ?, updated_at = ? WHERE id = ?").run(error, Date.now(), id);- if (route === "higgsfield") {- for (const c of ids) {- try {- setGen(c.id, createGenerations(higgsfieldRequest(c.product, brand, input.ratio ?? "4:5", input.direction, c.index), { batchId })[0]);- } catch (e) {- fail(c.id, (e as Error).message);- }- }- return;- }// Copy per product (one LLM call each), then one visual per ad.const byProduct = new Map<string, typeof ids>();for (const c of ids) byProduct.set(c.product.id, [...(byProduct.get(c.product.id) ?? []), c]);@@ -415,8 +362,8 @@ function toCreative(r: CreativeRow): AdCreative {error: s.error,generationId: r.generation_id,image: s.image,- baked: meta.route === "higgsfield",- ...(meta.route === "higgsfield" && { ratio: (AD_RATIOS as readonly string[]).includes(meta.ratio ?? "") ? (meta.ratio as AdCreative["ratio"]) : "4:5" }),+ baked: meta.route === "baked",+ ...(meta.route === "baked" && { ratio: (AD_RATIOS as readonly string[]).includes(meta.ratio ?? "") ? (meta.ratio as AdCreative["ratio"]) : "4:5" }),layout: r.layout,engine: meta.engine,modelId: meta.modelId,@@ -495,15 +442,14 @@ export async function retryCreative(id: string): Promise<AdCreative> {const meta = parseMeta(r.meta_json);const mode = engineMode();if (mode !== "both" && mode !== meta.engine) throw new AdsError(`This ad was made on the ${meta.engine === "open" ? "open-source" : "cloud"} engine, which Settings has turned off`);- let g: Generation;- if (meta.route === "higgsfield") {- g = createGenerations(higgsfieldRequest(product, brand, meta.ratio ?? "4:5", meta.direction, r.position), { batchId: r.batch_id })[0];- } else {- let concept: AdConcept = { angle: r.angle ?? "", headline: r.headline ?? "", body: r.body ?? "", cta: r.cta ?? "", visual: r.visual ?? "" };- if (!concept.headline || !concept.visual) concept = (await writeConcepts(brand, product ?? fakeProduct(brand), 1, meta.direction, r.position))[0];- g = createGenerations(visualRequest(concept, product, brand, meta.engine), { batchId: r.batch_id })[0];- db().prepare("UPDATE ad_creatives SET angle = ?, headline = ?, body = ?, cta = ?, visual = ? WHERE id = ?").run(concept.angle, concept.headline, concept.body, concept.cta, concept.visual, id);- }+ // A baked ad (one drawn whole before build plan O7) is made again the Fuobe way: copy, a visual, your fonts.+ let concept: AdConcept = { angle: r.angle ?? "", headline: r.headline ?? "", body: r.body ?? "", cta: r.cta ?? "", visual: r.visual ?? "" };+ if (!concept.headline || !concept.visual) concept = (await writeConcepts(brand, product ?? fakeProduct(brand), 1, meta.direction, r.position))[0];+ const g = createGenerations(visualRequest(concept, product, brand, meta.engine), { batchId: r.batch_id })[0];+ const fresh: CreativeMeta = { ...meta, route: "fuobe", ratio: undefined };+ db()+ .prepare("UPDATE ad_creatives SET angle = ?, headline = ?, body = ?, cta = ?, visual = ?, meta_json = ? WHERE id = ?")+ .run(concept.angle, concept.headline, concept.body, concept.cta, concept.visual, JSON.stringify(fresh), id);db().prepare("UPDATE ad_creatives SET generation_id = ?, status = 'queued', error = NULL, updated_at = ? WHERE id = ?").run(g.id, Date.now(), id);return getCreative(id)!;}@@ -675,12 +621,12 @@ export async function chat(brandId: string, text: string): Promise<ChatMessage[]}/** The user said yes to a proposal: run it and remember the batch on the message. */-export function confirmProposal(brandId: string, messageId: string, engine: Engine, route?: "fuobe" | "higgsfield", ratio?: BatchInput["ratio"]): { batchId: string; run: Promise<void>; chat: ChatMessage[] } {+export function confirmProposal(brandId: string, messageId: string, engine: Engine): { batchId: string; run: Promise<void>; chat: ChatMessage[] } {const history = getChat(brandId);const msg = history.find((m) => m.id === messageId);if (!msg?.proposal) throw new AdsError("That suggestion is no longer available");if (msg.batchId) throw new AdsError("Those ads are already on their way");- const r = createBatch({ brandId, engine, route, items: msg.proposal.items, direction: msg.proposal.direction, ratio });+ const r = createBatch({ brandId, engine, items: msg.proposal.items, direction: msg.proposal.direction });const next = history.map((m) => (m.id === messageId ? { ...m, batchId: r.batchId } : m));saveChat(brandId, next);return { batchId: r.batchId, run: r.run, chat: next };diff --git a/src/server/assist/studio-routes.ts b/src/server/assist/studio-routes.tsindex 0fbddacf..852e9e65 100644--- a/src/server/assist/studio-routes.ts+++ b/src/server/assist/studio-routes.ts@@ -7,7 +7,7 @@ import { DUB_STEP_MODELS, prepareSteps, translateKey, type OneShotModel } from "import { getModel } from "@/lib/catalog";import { routesFor } from "@/lib/catalog/plan";import { defaultSettings, genreInfo, PART_LABELS, type EpisodeAspect, type EpisodeSettings, type NarratorVoice, type StepPart } from "@/lib/catalog/faceless";-import { AD_RATIOS, emptyKit, type AdRatio, type BrandKit, type Product } from "@/lib/catalog/marketing";+import { AD_RATIOS, emptyKit, type BrandKit, type Product } from "@/lib/catalog/marketing";import { lookFromPreset, SHORTS, SHORTS_MODELS, type ShortsLook } from "@/lib/catalog/shorts";import type { Engine, GenerationRequest, MediaKind, Operation } from "@/lib/catalog/types";import { modeHref } from "@/lib/hubs";@@ -495,12 +495,9 @@ function adsJob(i: AdsToolInput, ctx: ToolContext): Checked<{ input: BatchInput;const input: BatchInput = {brandId: kit?.id ?? "draft",engine,- // Several formats, or words to use as given, need Fuobe's compositor (every ad in 1:1, 4:5 and 9:16, its- // headline and call to action editable); Higgsfield renders one format per ad and writes its own copy into the picture.- ...((ratios.length > 1 || !!i.headline?.trim() || !!i.cta?.trim()) && { route: "fuobe" as const }),+ // Every ad comes in 1:1, 4:5 and 9:16 from Fuobe's compositor, its headline and call to action editable.items: [{ productId: draftProduct.id, count: Math.max(1, Math.min(8, i.count ?? 4)) }],direction,- ratio: ratios[0] as AdRatio,};try {estimateBatch(input, { brand: draftBrand, product: draftProduct });@@ -541,17 +538,14 @@ const adsRoute: StudioRoute<AdsToolInput> = {const job: PlannedJob = {tool: "create_ads",modelId: est.modelId,- modelName: est.route === "higgsfield" ? "Higgsfield Ads Studio" : est.modelName,+ modelName: est.modelName,kind: "image",op: draft.product?.images.length ? "edit" : "t2i",prompt: i.brief,count: est.total,costUsd: est.costUsd,demo: est.demo,- note:- est.route === "higgsfield"- ? `${est.total} finished ad${est.total === 1 ? "" : "s"} in ${input.ratio}`- : `${est.total} ad${est.total === 1 ? "" : "s"} · copy by ${est.copyBy === "llm" ? "the AI copywriter" : "the offline copywriter"} · each in 1:1, 4:5 and 9:16`,+ note: `${est.total} ad${est.total === 1 ? "" : "s"} · copy by ${est.copyBy === "llm" ? "the AI copywriter" : "the offline copywriter"} · each in 1:1, 4:5 and 9:16`,atomic: true,};return [job];diff --git a/src/server/assist/tools.ts b/src/server/assist/tools.tsindex 533df109..470fa143 100644--- a/src/server/assist/tools.ts+++ b/src/server/assist/tools.ts@@ -5,6 +5,7 @@ import { z } from "zod";import { getModel, modelsFor } from "@/lib/catalog";import { offeredModels } from "../model-access";import { dualEngine, runsOn } from "@/lib/catalog/engines";+import { currentModelId } from "@/lib/catalog/replaced";import { OPERATION_LABELS, type ChainSlot, type GenerationRequest, type MediaKind, type ModelDef, type Operation } from "@/lib/catalog/types";import { type PlannedJob, totalCost } from "@/lib/assist";import { STORYBOARD_MODELS } from "@/lib/catalog/storyboard";@@ -75,7 +76,6 @@ function summarize(m: ModelDef) {...(o.voices?.length && { voices: o.voices.slice(0, 12).map((v) => v.id) }),...(o.voiceClone && { voiceClone: true }),...(o.languages?.length && { languages: o.languages.length > 12 ? `${o.languages.slice(0, 12).join(", ")}…` : o.languages.join(", ") }),- ...(o.presets && { needs: o.presets.required ? `a ${o.presets.label} (pick in the studio)` : undefined }),...(o.looks && { looks: "139 Soul looks: pass a look id as presetId (v1-general, v2-y2k-studio…), presetStrength 0–1 scales its LoRAs" }),};}@@ -141,7 +141,7 @@ const listElementsTool = defineTool({description: e.description,referencePhotos: e.references.length,// The models its trained LoRAs run on (every model of each family), from LoRAs a run can use: not a demo- // training's stand-in or an old Higgsfield Soul ID.+ // training's stand-in or an older Soul ID.trainedFor: [...new Set(e.loras.filter(runsSomewhere).flatMap((l) => familyModels(l)))],})),),@@ -304,8 +304,12 @@ function shotList(model: ModelDef | undefined, n: number): { prompt: string; dur/** The engine the user works on (the install's only one when Settings → Engine mode allows one). */const engineOf = (ctx: ToolContext): "cloud" | "open" => (engineMode() === "both" ? ctx.engine : (engineMode() as "cloud" | "open"));-/** A job as a request; `engine` is the user's, which a Fuobe Original (both engines) runs on unless the job names one. */-function toRequest(j: JobInput, engine?: "cloud" | "open"): GenerationRequest {+/**+ * A job as a request; `engine` is the user's, which a Fuobe Original (both engines) runs on unless the job names one.+ * A retired model id (an older plan, an MCP client's saved call) runs on the model that replaced it (replaced.ts).+ */+function toRequest(job: JobInput, engine?: "cloud" | "open"): GenerationRequest {+ const j = { ...job, model_id: currentModelId(job.model_id) };const inputs = {...(j.images?.length && { images: j.images }),...(j.end_image && { endImage: j.end_image }),diff --git a/src/server/canvas.ts b/src/server/canvas.tsindex 6a07db8e..0179dfee 100644--- a/src/server/canvas.ts+++ b/src/server/canvas.ts@@ -33,6 +33,7 @@ import {planCanvas,rowSignature,silenceSeconds,+ withCurrentModels,withCurrentElements,type Canvas,type CanvasGraph,@@ -73,7 +74,7 @@ interface Row {const toCanvas = (r: Row): Canvas => ({id: r.id,name: r.name,- pages: readPages(JSON.parse(r.graph_json)),+ pages: readPages(JSON.parse(r.graph_json)).map((p) => ({ ...p, graph: withCurrentModels(p.graph) })),runs: JSON.parse(r.runs_json) as CanvasRuns,templateId: r.template_id,createdAt: r.created_at,diff --git a/src/server/cinema-director.ts b/src/server/cinema-director.tsindex b223e435..da226c7a 100644--- a/src/server/cinema-director.ts+++ b/src/server/cinema-director.ts@@ -31,7 +31,7 @@ import { llmText } from "./enhance";const slugs = (xs: { slug: string | null }[]) => xs.flatMap((x) => (x.slug ? [x.slug] : []));-const SYSTEM = `You are the AI Director of a film studio app (like Higgsfield Cinema Studio's "Mr. Higgs").+const SYSTEM = `You are the AI Director of a film studio app (Fuobe Cinema).You break ideas and scripts into shots, pick the camera, light the scene and write prompts. You never generate anything yourself: the user reviews each shot and presses Generate.Answer with ONE JSON object and nothing else:diff --git a/src/server/generations.ts b/src/server/generations.tsindex dd99afaa..b9b287c0 100644--- a/src/server/generations.ts+++ b/src/server/generations.ts@@ -386,7 +386,7 @@ export function deleteGeneration(id: string): void {/*** Pick the provider for a run: a configured real provider, else the demo provider (unless demo is off).* `images` is how many images the run sends: a route whose list takes fewer (FieldMap.maxImages: Grok- * Imagine Image takes 5 on fal, 10 on Higgsfield) gives way to one that takes them all, or says so.+ * Imagine Image takes 5 on fal) gives way to one that takes them all, or says so.* `loras` and `seconds` (the clip length asked for) prefer a route that carries every LoRA and makes that* length (Replicate's Wan 2.2 fast renders only 81–121 frames, fal's 17–161).*/@@ -526,7 +526,7 @@ function prepare(original: GenerationRequest) {const span = f.min !== undefined && f.max !== undefined ? ` makes ${half(f.min / fps)}–${half(f.max / fps)} s clips,` : "";notes.push(`${plan.model.name} on ${provider(route.provider).label}${span} so this one is about ${half(made)} s, not ${seconds} s`);}- // A route that can't batch (Higgsfield's Grok Imagine Image beside fal's num_images; a ComfyUI graph, which makes+ // A route that can't batch (Replicate's Nano Banana Pro beside fal's num_images; a ComfyUI graph, which makes// one picture a run: Fuobe Soul on the open engine) runs one job per output.if (!demo && !route.map?.numOutputs && plan.perJobOutputs > 1) {plan = { ...plan, jobs: plan.jobs * plan.perJobOutputs, perJobOutputs: 1, params: { ...plan.params, numOutputs: 1 } };diff --git a/src/server/katana.ts b/src/server/katana.tsindex 6a1a45ed..f2b4b5c9 100644--- a/src/server/katana.ts+++ b/src/server/katana.ts@@ -2,7 +2,7 @@ import "server-only";import { nanoid } from "nanoid";import { z } from "zod";import type { PlannedJob } from "@/lib/assist";-import { finalKey, KATANA_FEATURE, KATANA_LIMITS, katanaSteps, katanaStage, motionModel, MOTION_MODELS, planSegments, RETIRED_MOTION_MODELS, stepsToRedo, type KatanaInput, type KatanaJob, type KatanaJobView, type Segment } from "@/lib/av/katana";+import { finalKey, KATANA_FEATURE, KATANA_LIMITS, katanaSteps, katanaStage, motionModel, MOTION_MODELS, planSegments, currentMotionModel, stepsToRedo, type KatanaInput, type KatanaJob, type KatanaJobView, type Segment } from "@/lib/av/katana";import { getModel } from "@/lib/catalog";import type { Engine, Generation } from "@/lib/catalog/types";import { probeMedia } from "@/lib/media-probe";@@ -178,7 +178,7 @@ export function planKatana(body: KatanaRequest): { input: KatanaInput; engine: Eif (duration < KATANA_LIMITS.minReference) throw new Error("The reference is too short");// Without one asked for: the first motion model switched on in Settings → Models & licences.const m = motionModel(engine, body.motionModel ?? firstOn(MOTION_MODELS[engine].map((x) => x.id), engine));- if (body.motionModel && m.id !== (RETIRED_MOTION_MODELS[body.motionModel] ?? body.motionModel)) throw new Error(`${getModel(body.motionModel)?.name ?? body.motionModel} isn't a ${engine === "open" ? "open-source" : "cloud"} motion model for Katana`);+ if (body.motionModel && m.id !== currentMotionModel(body.motionModel)) throw new Error(`${getModel(body.motionModel)?.name ?? body.motionModel} isn't a ${engine === "open" ? "open-source" : "cloud"} motion model for Katana`);const segments = body.segments?.length ? validSegments(body.segments, duration) : planSegments({ duration, mode: "fixed", length: body.length ?? m.max, min: m.min, max: m.max });const title = body.title?.trim().slice(0, 120) || "Katana edit";return {diff --git a/src/server/marketing.ts b/src/server/marketing.tsindex 6364483a..bf80d599 100644--- a/src/server/marketing.ts+++ b/src/server/marketing.ts@@ -52,7 +52,6 @@ import { llmText } from "./enhance";import { createGenerations, getGeneration, listGenerations, previewChained, recordLocalGeneration } from "./generations";import { isOffered } from "./model-access";import { keepOffered } from "@/lib/model-access";-import { provider } from "./providers";import { engineMode } from "./settings";import { encodePng } from "./png";import { readRef, saveFile } from "./storage";@@ -216,7 +215,6 @@ function textLine(f: FormatDef, open: boolean, headline?: string, cta?: string,export interface PlanContext {product?: Product | null;brand?: BrandKit | null;- higgsfield: boolean;/** The words the presenter says (UGC). */script?: string;}@@ -243,7 +241,7 @@ export function planMarketing(input: MarketingInput, ctx: PlanContext): RunPlan}}// Models switched off in Settings → Models & licences aren't picked while another choice is on.- const choices = keepOffered(formatModels(f, input.engine, { product: hasProduct, avatar: !!input.avatar, higgsfield: ctx.higgsfield }), (c) => isOffered(c.id, input.engine));+ const choices = keepOffered(formatModels(f, input.engine, { product: hasProduct, avatar: !!input.avatar }), (c) => isOffered(c.id, input.engine));const name = tpl?.name ?? f.name;const title = [name, product?.name ?? brand?.name].filter(Boolean).join(" · ");const meta: MarketingRunMeta = { format: f.id, templateId: tpl?.id, productId: product?.id ?? null, brandId: brand?.id ?? null };@@ -790,15 +788,13 @@ function planAd(input: ClickToAdInput, ctx: { product: Product; brand?: BrandKit// ---------------------------------------------------------------------------// Ad Multiplier: a reference ad (4–30 s) → new versions (whole ad, or a new hook / CTA around it)-export function multiplierModel(input: Pick<MultiplierInput, "engine" | "modelId">, higgsfield: boolean): ModelDef {+export function multiplierModel(input: Pick<MultiplierInput, "engine" | "modelId">): ModelDef {const choices = keepOffered(MULTIPLIER_MODELS[input.engine], (c) => isOffered(c.id, input.engine));- const fallback = input.engine === "cloud" && !higgsfield && choices.some((c) => c.id === "kling-o3") ? "kling-o3" : choices[0].id;- const id = input.modelId && choices.some((c) => c.id === input.modelId) ? input.modelId : fallback;+ const id = input.modelId && choices.some((c) => c.id === input.modelId) ? input.modelId : choices[0].id;return need(id);}export interface MultiplierContext {- higgsfield: boolean;extractFrame?: boolean;/** The reference has a soundtrack (null or missing: its header couldn't be read). */referenceSound?: boolean | null;@@ -829,7 +825,7 @@ export function planMultiplier(input: MultiplierInput, ctx: MultiplierContext):trimmed ? { after: ["clip"], chain: [{ slot }] } : { inputs: { video: input.video } };if (input.mode === "prompt") {- const model = multiplierModel(input, ctx.higgsfield);+ const model = multiplierModel(input);const title = `Recreated ad · ${model.name}`;if (open) {// Wan Animate: the first image takes over the reference's performance; the original sound is laid back on.@@ -883,7 +879,6 @@ export function planMultiplier(input: MultiplierInput, ctx: MultiplierContext):},after: src.after,});- if (model.id === "seedance-2-5" && !ctx.higgsfield) notes.push("Seedance 2.5 edit runs on Higgsfield — connect a Higgsfield key in Settings");}return { feature: "ad-multiplier", engine: input.engine, title, steps, finals: [steps[steps.length - 1].key], meta, notes };}@@ -1032,13 +1027,11 @@ export function deleteRun(id: string): boolean {return db().prepare("DELETE FROM marketing_runs WHERE id = ?").run(id).changes > 0;}-const higgsfieldReady = () => provider("higgsfield").isConfigured();-function context(input: { productId?: string; brandId?: string }) {const product = input.productId ? getProduct(input.productId) : null;if (input.productId && !product) throw new PlanError("This product is no longer available. Choose another one.");const brand = input.brandId ? getBrand(input.brandId) : product?.brandId ? getBrand(product.brandId) : null;- return { product, brand, higgsfield: higgsfieldReady() };+ return { product, brand };}/** The shortest talking part a UGC film gets, however short the length asked for. */@@ -1185,7 +1178,7 @@ export async function referenceFacts(ref: string): Promise<{ sound: boolean | nuasync function multiplierContext(input: MultiplierInput): Promise<MultiplierContext> {const facts = await referenceFacts(input.video);- return { higgsfield: higgsfieldReady(), referenceSound: facts.sound, referenceAspect: facts.aspect };+ return { referenceSound: facts.sound, referenceAspect: facts.aspect };}export async function estimateMultiplier(input: MultiplierInput): Promise<RunEstimate> {diff --git a/src/server/photodump.ts b/src/server/photodump.tsindex 10a0d9c0..ec8d598b 100644--- a/src/server/photodump.ts+++ b/src/server/photodump.ts@@ -1,7 +1,7 @@import "server-only";import { nanoid } from "nanoid";import { getModel, getPreset } from "@/lib/catalog";-import { castPrompt, type CastValues } from "@/lib/catalog/cinema";+import { CAST_LOOK, castPrompt, SOUL_BUILDER_MODEL, type CastValues } from "@/lib/catalog/cinema";import {castSheetModel,customPack,@@ -23,7 +23,6 @@ import { db } from "./db";import { getElement } from "./elements";import { createGenerations, getGeneration, pickOutput, previewGeneration } from "./generations";import { trashGenerations } from "./library";-import { higgsfieldKey } from "./providers/higgsfield";import { engineMode } from "./settings";import { isOffered } from "./model-access";@@ -82,7 +81,7 @@ export function deleteUserPack(id: string): boolean {/** What this install can do, for the pure planners. */export function planCaps(): PlanCaps {- return { higgsfield: !!higgsfieldKey() && engineMode() !== "open", has: (id) => !!getModel(id) && isOffered(id) };+ return { has: (id) => !!getModel(id) && isOffered(id) };}/** The engine a run uses: the one asked for, unless Settings locks the other. */@@ -316,15 +315,25 @@ function sheetRequest(input: SheetRun): { request: GenerationRequest; notes: strconst m = getModel(modelId);const aspect = m?.options.aspectRatios?.includes("16:9") ? "16:9" : undefined;const resolution = m?.options.resolutions?.includes("2K") ? "2K" : m?.options.resolutions?.includes("1080p") ? "1080p" : undefined;+ // Fuobe Soul runs on both engines (the run's engine picks its half) and draws the cast in Cinema's casting look.+ const soul = modelId === SOUL_BUILDER_MODEL;return {- request: { feature: "character-sheet", modelId, prompt: castPrompt(input.cast, input.details), params: { numOutputs: 1, ...(aspect && { aspectRatio: aspect }), ...(resolution && { resolution }) } },- notes: modelId === "nano-banana-pro" ? ["Soul 2.0 needs a Higgsfield key — Nano Banana Pro draws the sheet"] : [],+ request: {+ feature: "character-sheet",+ modelId,+ ...(soul && { engine, presetId: CAST_LOOK }),+ prompt: castPrompt(input.cast, input.details),+ params: { numOutputs: 1, ...(aspect && { aspectRatio: aspect }), ...(resolution && { resolution }) },+ },+ notes: modelId === "nano-banana-pro" ? ["Fuobe Soul is switched off in Settings → Models & licences — Nano Banana Pro draws the sheet"] : [],};}- // A description: the AI Influencer app (Higgsfield's character-sheet model, or Z-Image Turbo).+ // A description: the AI Influencer app (Nano Banana Pro in the cloud, the Soul Cast sheet graph on your GPU).if (!input.prompt.trim()) throw new Error("Describe your character first");+ const route = engine === "open" ? getPreset(AI_INFLUENCER)?.open : getPreset(AI_INFLUENCER)?.cloud;+ const modelId = route?.modelId ?? (engine === "open" ? "oss-zimage-soul-cast" : "nano-banana-pro");return {- request: { feature: "app:app-ai-influencer", presetId: AI_INFLUENCER, modelId: (engine === "open" ? getPreset(AI_INFLUENCER)?.open : getPreset(AI_INFLUENCER)?.cloud)?.modelId ?? "ai-influencer", prompt: input.prompt.trim() },+ request: { feature: "app:app-ai-influencer", presetId: AI_INFLUENCER, modelId, prompt: input.prompt.trim() },notes: [],};}diff --git a/src/server/providers/higgsfield.ts b/src/server/providers/higgsfield.tsdeleted file mode 100644index 05a4e7ab..00000000--- a/src/server/providers/higgsfield.ts+++ /dev/null@@ -1,194 +0,0 @@-import "server-only";-import { buildPayload, extractOutputs, noOutputsError } from "@/lib/catalog/payload";-import type { Operation } from "@/lib/catalog/types";-import { getSetting } from "../settings";-import { ProviderError, type ProviderAdapter, type RemoteOutput } from "./types";--/**- * Higgsfield's pay-per-use API (docs.higgsfield.ai, see docs/research/higgsfield-api.md).- * submit: POST https://api.higgsfield.ai/<endpoint> flat JSON → { request_id, status_url, cancel_url }- * status: GET <status_url> → { status: queued|in_progress|completed|failed|nsfw|canceled, images[], video }- * cancel: POST <cancel_url> (only while queued)- * upload: POST /files/generate-upload-url → PUT bytes with the returned headers → public_url- * Auth is `Authorization: Key <id>:<secret>`.- */-const API = "https://api.higgsfield.ai";--/** Same env names the official SDKs read. */-export function higgsfieldKey(): string {- const k = getSetting("higgsfieldKey") || process.env.HF_KEY || "";- if (k) return k;- return process.env.HF_API_KEY && process.env.HF_API_SECRET ? `${process.env.HF_API_KEY}:${process.env.HF_API_SECRET}` : "";-}--function describe(body: unknown): string {- if (typeof body === "string") return body.slice(0, 400);- const d = (body as { detail?: unknown; error?: unknown })?.detail ?? (body as { error?: unknown })?.error ?? body;- if (Array.isArray(d)) return d.map((e: { loc?: unknown[]; msg?: string }) => `${(e.loc ?? []).slice(1).join(".")}: ${e.msg ?? JSON.stringify(e)}`).join("; ");- return typeof d === "string" ? d : JSON.stringify(d).slice(0, 400);-}--const HINTS: Record<number, string> = {- 401: "Higgsfield rejected the API key — check Settings (format: KEY_ID:KEY_SECRET)",- 403: "Not enough Higgsfield balance — top up at console.higgsfield.ai",- 423: "Higgsfield has temporarily blocked this model — try again later or pick another one",- 503: "Higgsfield has disabled this model for now",-};--export async function hfFetch(pathOrUrl: string, init: RequestInit = {}): Promise<unknown> {- const url = pathOrUrl.startsWith("http") ? pathOrUrl : `${API}/${pathOrUrl.replace(/^\//, "")}`;- const res = await fetch(url, {- ...init,- headers: { Authorization: `Key ${higgsfieldKey()}`, "Content-Type": "application/json", Accept: "application/json", ...(init.headers ?? {}) },- });- const text = await res.text();- let body: unknown = text;- try {- body = JSON.parse(text);- } catch {}- if (!res.ok) {- const hint = HINTS[res.status];- throw new ProviderError(hint ? `${hint} (${describe(body)})` : `Higgsfield ${res.status}: ${describe(body)}`, res.status);- }- return body;-}--const UPLOAD_TYPES = new Set(["image/jpeg", "image/jpg", "image/png", "image/webp", "image/gif", "audio/wav", "audio/x-wav", "video/mp4"]);--/** Upload bytes through Higgsfield's signed-URL flow and return the public URL models accept. */-export async function hfUpload(data: Buffer, contentType: string): Promise<string> {- if (!UPLOAD_TYPES.has(contentType)) {- throw new Error(`Higgsfield only accepts JPEG, PNG, WebP, GIF, WAV and MP4 files — this one is ${contentType}`);- }- const slot = (await hfFetch("files/generate-upload-url", { method: "POST", body: JSON.stringify({ content_type: contentType }) })) as {- public_url: string;- upload_url: string;- upload_headers?: Record<string, string>;- };- const put = await fetch(slot.upload_url, { method: "PUT", body: new Uint8Array(data), headers: slot.upload_headers ?? { "Content-Type": contentType } });- if (!put.ok) throw new Error(`Higgsfield upload failed (${put.status})`);- return slot.public_url;-}--/** RequestStatus fields that hold results (docs/research/higgsfield-api.json → lifecycle.status.outputs). */-const MEDIA_FIELDS = ["images", "image", "video", "videos", "audio", "audios"] as const;-/** Extra artifacts some video/3D jobs attach; kept as links on the first output, not shown as media. */-const ARTIFACT_FIELDS = ["zip", "mov", "jsx", "fbx", "ply"] as const;--/**- * The outputs of a completed RequestStatus. The body also carries status_url and cancel_url (API links,- * not results), so only the documented media fields are read.- */-export function higgsfieldOutputs(status: Record<string, unknown>, op?: Operation): RemoteOutput[] {- const media = Object.fromEntries(MEDIA_FIELDS.filter((k) => status[k] != null).map((k) => [k, status[k]]));- const outputs: RemoteOutput[] = extractOutputs(media, op);- const artifacts = Object.fromEntries(- ARTIFACT_FIELDS.flatMap((k) => {- const v = status[k] as { url?: unknown } | string | undefined;- const url = typeof v === "string" ? v : typeof v?.url === "string" ? v.url : undefined;- return url ? [[k, url]] : [];- }),- );- if (outputs.length && Object.keys(artifacts).length) outputs[0] = { ...outputs[0], meta: { ...outputs[0].meta, artifacts } };- return outputs;-}--export const higgsfieldProvider: ProviderAdapter = {- id: "higgsfield",- label: "Higgsfield",- isConfigured: () => !!higgsfieldKey(),-- prepareFile: (data, contentType) => hfUpload(data, contentType),-- async submit({ route, input, generationId }) {- const payload = buildPayload(route.map ?? {}, input);- const res = (await hfFetch(route.endpoint, {- method: "POST",- body: JSON.stringify(payload),- // A retried submit of the same generation is never billed twice.- headers: { "Idempotency-Key": `fuobe-${generationId}` },- })) as { request_id: string; status_url?: string; cancel_url?: string };- return {- externalId: res.request_id,- meta: { statusUrl: res.status_url ?? `${API}/requests/${res.request_id}/status`, cancelUrl: res.cancel_url ?? `${API}/requests/${res.request_id}/cancel` },- payload,- };- },-- async poll({ meta, route }) {- const s = (await hfFetch(meta.statusUrl as string)) as { status: string; error?: string | null } & Record<string, unknown>;- switch (s.status) {- case "queued":- return { state: "queued", message: "In queue" };- case "in_progress":- return { state: "running", message: "Generating" };- case "completed": {- const outputs = higgsfieldOutputs(s, route?.op);- return outputs.length ? { state: "succeeded", outputs } : { state: "failed", error: noOutputsError(s) };- }- case "nsfw":- return { state: "failed", error: "Higgsfield's moderation blocked this prompt or result (not charged)" };- case "canceled":- return { state: "failed", error: "Canceled on Higgsfield" };- case "failed":- return { state: "failed", error: s.error || "Higgsfield couldn't generate this (not charged)" };- default:- return { state: "running", message: s.status };- }- },-- async cancel({ meta }) {- if (meta.cancelUrl) await hfFetch(meta.cancelUrl as string, { method: "POST" }).catch(() => {});- },-- async test() {- if (!higgsfieldKey()) return { ok: false, detail: "No key set" };- if (!higgsfieldKey().includes(":")) return { ok: false, detail: "Use the KEY_ID:KEY_SECRET format from console.higgsfield.ai" };- try {- await hfFetch("v1/custom-references/list?page=1&page_size=1");- return { ok: true, detail: "Key accepted" };- } catch (e) {- const status = (e as ProviderError).status;- if (status === 401 || status === 403) return { ok: false, detail: `Key rejected (${status})` };- // The key got past auth, the list call itself failed.- if (status === 400 || status === 404 || status === 422) return { ok: true, detail: `Key accepted (list returned ${status})` };- return { ok: false, detail: status ? `Couldn't check the key: Higgsfield answered ${status}. Try again in a moment` : `Can't reach Higgsfield (${(e as Error).message})` };- }- },-};--// ----------------------------------------------------------------------------// Style / template lists shown in the composer--export interface HiggsfieldPreset {- id: string;- name: string;- preview?: string;- group?: string;-}--const PRESET_SOURCES: Record<string, string> = {- "soul-v1": "v1/text2image/soul-styles",- "soul-v2": "v1/text2image/soul-styles/v2",- "genjutsu-restyle": "models/higgsfield/genjutsu/restyle/v1.0/presets",- "marketing-studio": "marketing-studio/image/presets?size=200&cursor=0",-};--const cache = new Map<string, { at: number; items: HiggsfieldPreset[] }>();--export async function higgsfieldPresets(source: string): Promise<HiggsfieldPreset[]> {- const path = PRESET_SOURCES[source];- if (!path) throw new Error(`Unknown preset list ${source}`);- const hit = cache.get(source);- if (hit && Date.now() - hit.at < 60 * 60 * 1000) return hit.items;- const body = (await hfFetch(path)) as unknown;- const raw = (Array.isArray(body) ? body : ((body as { items?: unknown[] }).items ?? [])) as Record<string, unknown>[];- const items = raw.map((r) => ({- id: String(r.id),- name: String(r.name ?? r.id),- preview: (r.preview_url ?? r.cover_image) as string | undefined,- group: ((r.metadata as { group_name?: string } | undefined)?.group_name ?? (r.type as string | undefined)) || undefined,- }));- cache.set(source, { at: Date.now(), items });- return items;-}diff --git a/src/server/providers/index.ts b/src/server/providers/index.tsindex 3c6fec67..c19b12b9 100644--- a/src/server/providers/index.ts+++ b/src/server/providers/index.ts@@ -2,7 +2,6 @@ import "server-only";import type { ProviderId } from "@/lib/catalog/types";import { comfyProvider } from "./comfyui";import { falProvider } from "./fal";-import { higgsfieldProvider } from "./higgsfield";import { llmProvider } from "./llm";import { mockProvider } from "./mock";import { replicateProvider } from "./replicate";@@ -38,7 +37,6 @@ const localProvider: ProviderAdapter = {export const PROVIDERS: Record<ProviderId, ProviderAdapter> = {fal: falProvider,replicate: replicateProvider,- higgsfield: higgsfieldProvider,comfyui: comfyProvider,mock: mockProvider,local: localProvider,@@ -47,6 +45,28 @@ export const PROVIDERS: Record<ProviderId, ProviderAdapter> = {llm: llmProvider,};+/**+ * A job or training stored under a provider Fuobe no longer has (one removed since, e.g. by build plan O7): it+ * can't be submitted, polled or cancelled any more, so a poll fails it with a way forward instead of throwing on+ * every runner tick. Its outputs, if any were saved, stay in the Library.+ */+export const RETIRED_PROVIDER_ERROR = "This job ran on a provider Fuobe no longer uses, so its result can't be collected: run it again (Reuse picks the model that replaced it)";++const retiredProvider = (id: string): ProviderAdapter => ({+ id: id as ProviderId,+ label: "a retired provider",+ isConfigured: () => false,+ prepareFile: async () => {+ throw new Error(RETIRED_PROVIDER_ERROR);+ },+ submit: async () => {+ throw new Error(RETIRED_PROVIDER_ERROR);+ },+ poll: async () => ({ state: "failed", error: RETIRED_PROVIDER_ERROR }),+ cancel: async () => {},+});++/** The adapter for a provider id; one read from storage that Fuobe no longer has gets the retired stand-in. */export function provider(id: ProviderId): ProviderAdapter {- return PROVIDERS[id];+ return Object.hasOwn(PROVIDERS, id) ? PROVIDERS[id] : retiredProvider(id);}diff --git a/src/server/settings.ts b/src/server/settings.tsindex e1027b92..c691914e 100644--- a/src/server/settings.ts+++ b/src/server/settings.ts@@ -20,11 +20,9 @@ export const SETTINGS = {/** Which engines this install offers: open-source only, paid cloud APIs only, or both. */engineMode: { key: "engine.mode", env: "FUOBE_ENGINE_MODE", default: "both", options: ["both", "open", "cloud"] },/** Which aggregator to try first when a cloud model is on several. */- cloudProvider: { key: "cloud.provider", env: "FUOBE_CLOUD_PROVIDER", default: "auto", options: ["auto", "fal", "replicate", "higgsfield"] },+ cloudProvider: { key: "cloud.provider", env: "FUOBE_CLOUD_PROVIDER", default: "auto", options: ["auto", "fal", "replicate"] },falKey: { key: "fal.key", env: "FAL_KEY", secret: true },replicateToken: { key: "replicate.token", env: "REPLICATE_API_TOKEN", secret: true },- /** "KEY_ID:KEY_SECRET" from console.higgsfield.ai (HF_KEY / HF_API_KEY + HF_API_SECRET also work). */- higgsfieldKey: { key: "higgsfield.key", env: "HIGGSFIELD_API_KEY", secret: true },openaiKey: { key: "openai.key", env: "OPENAI_API_KEY", secret: true },googleKey: { key: "google.key", env: "GEMINI_API_KEY", secret: true },anthropicKey: { key: "anthropic.key", env: "ANTHROPIC_API_KEY", secret: true },diff --git a/src/server/training.ts b/src/server/training.tsindex a00a95ee..5914380a 100644--- a/src/server/training.ts+++ b/src/server/training.ts@@ -25,6 +25,7 @@ import {type TrainingFamily,type TrainingTarget,} from "@/lib/catalog/training";+import { TRAINING_REPLACED_BY } from "@/lib/catalog/replaced";import { DATA_DIR, db } from "./db";import { getElement, updateElement } from "./elements";import { keepTrainedLora, lorasPath, ownCopy, recordTrainedMirror } from "./loras";@@ -45,7 +46,8 @@ export interface Training {id: string;elementId: string;target: string;- provider: TrainingTarget["provider"] | "demo" | "higgsfield";+ /** fal, AI-Toolkit or a demo; a training stored by a trainer Fuobe has retired keeps that trainer's id. */+ provider: TrainingTarget["provider"] | "demo" | (string & {});family: TrainingFamily | null;status: "queued" | "running" | "succeeded" | "failed";progress: number | null;@@ -345,8 +347,11 @@ async function submit(id: string, el: StudioElement, t: TrainingTarget, trigger:/** A provider answer that won't change by asking again: the job failed or is gone (not auth, timeouts or rate limits). */const permanent = (e: unknown) => e instanceof ProviderError && e.status !== undefined && e.status >= 400 && e.status < 500 && ![401, 403, 408, 429].includes(e.status);-/** Higgsfield's Soul ID training ended with build plan O3. */-export const RETIRED_SOUL_ID = "Higgsfield Soul ID training was retired: train this character for Fuobe Soul instead (same photos)";+/** Why a training stored with a retired target (an older Soul ID, src/lib/catalog/replaced.ts) can't finish, and what to do. */+export const retiredTraining = (target: string): string | undefined => {+ const r = TRAINING_REPLACED_BY[target];+ return r && `${r.was} was retired: ${r.note.charAt(0).toLowerCase()}${r.note.slice(1)}`;+};export async function pollTrainings(): Promise<void> {// Trainings a restart cut off mid-upload never reach the trainer: fail them so the element can retrain.@@ -354,7 +359,10 @@ export async function pollTrainings(): Promise<void> {.prepare("SELECT * FROM trainings WHERE status = 'queued' AND external_id IS NULL AND created_at < ?").all(Date.now() - STALE_TRAINING_MS) as Row[];for (const r of stale) if (!submittingTrainings().has(r.id)) fail(r.id, r.element_id, "Interrupted before it reached the trainer — start it again");- for (const r of db().prepare("SELECT * FROM trainings WHERE provider = 'higgsfield' AND status IN ('queued','running')").all() as Row[]) fail(r.id, r.element_id, RETIRED_SOUL_ID);+ // A training on a target Fuobe retired (an older Soul ID) can't finish: fail it with what replaced it.+ const retired = Object.keys(TRAINING_REPLACED_BY);+ const sql = `SELECT * FROM trainings WHERE status IN ('queued','running') AND target IN (${retired.map(() => "?").join(", ")})`;+ for (const r of db().prepare(sql).all(...retired) as Row[]) fail(r.id, r.element_id, retiredTraining(r.target)!);// Copies of hosted LoRAs a restart cut off: start them again.for (const r of db().prepare(`SELECT * FROM trainings WHERE status = 'succeeded' AND meta_json LIKE '%"keep":"pending"%'`).all() as Row[]) keepInBackground(r);const rows = db().prepare("SELECT * FROM trainings WHERE status = 'running' AND external_id IS NOT NULL").all() as Row[];@@ -426,7 +434,7 @@ function trainedLora(r: Row, t: TrainingTarget, file: string, fields: Partial<Elasync function pollOne(r: Row) {const t = getTrainingTarget(r.target);- if (!t) return fail(r.id, r.element_id, `Unknown training target ${r.target}`);+ if (!t) return fail(r.id, r.element_id, retiredTraining(r.target) ?? `Unknown training target ${r.target}`);if (Date.now() - r.created_at > MAX_TRAINING_MS) return fail(r.id, r.element_id, `Training didn't finish within ${MAX_TRAINING_MS / 3_600_000} hours`);const meta = metaOf(r);const el = getElement(r.element_id);diff --git a/tests/assist-studio-routes.test.ts b/tests/assist-studio-routes.test.tsindex 5df83050..98f11afc 100644--- a/tests/assist-studio-routes.test.ts+++ b/tests/assist-studio-routes.test.ts@@ -368,17 +368,12 @@ describe("Ads Studio", () => {expect(brand.listProducts(acme.id).filter((p) => p.name === "Running shoes")).toHaveLength(2);});- it("keeps a given headline on Fuobe's compositor, even with a Higgsfield key", async () => {- setSetting("higgsfieldKey", "id:secret");- try {- const own = await priced(() => plan("create_ads", { brief: "Sneakers for city runs", aspect_ratios: ["4:5"] }));- expect(own.jobs[0].modelName).toBe("Higgsfield Ads Studio");- const fixed = await priced(() => plan("create_ads", { brief: "Sneakers for city runs", aspect_ratios: ["4:5"], headline: "Run the city" }));- expect(fixed.jobs[0].modelName).not.toBe("Higgsfield Ads Studio");- expect(fixed.jobs[0].note).toMatch(/each in 1:1, 4:5 and 9:16/);- } finally {- setSetting("higgsfieldKey", "");- }+ it("makes every ad on Fuobe's compositor, with or without a given headline", async () => {+ const own = await priced(() => plan("create_ads", { brief: "Sneakers for city runs", aspect_ratios: ["4:5"] }));+ expect(own.jobs[0].note).toMatch(/each in 1:1, 4:5 and 9:16/);+ const fixed = await priced(() => plan("create_ads", { brief: "Sneakers for city runs", aspect_ratios: ["4:5"], headline: "Run the city" }));+ expect(fixed.jobs[0].modelName).toBe(own.jobs[0].modelName);+ expect(fixed.jobs[0].note).toMatch(/each in 1:1, 4:5 and 9:16/);});it("falls back for formats it doesn't make", () => {diff --git a/tests/canvas.test.ts b/tests/canvas.test.tsindex fdb7a258..913d00e3 100644--- a/tests/canvas.test.ts+++ b/tests/canvas.test.ts@@ -433,7 +433,6 @@ describe("round-4 models on the canvas", () => {expect(ports("kling-o3", "video-swap")).toEqual(["prompt", "elements", "images", "video"]);expect(ports("bria-video-erase")).toEqual(["prompt", "video"]);expect(ports("p-video-replace")).toEqual(["prompt", "elements", "images", "video"]);- expect(ports("genjutsu-lite-object-swap")).toEqual(["prompt", "elements", "images", "video"]);expect(ports("florence-2-ocr")).toEqual(["images"]);expect(ports("topaz-sdr-to-hdr")).toEqual(["video"]);expect(ports("triposplat")).toEqual(["images"]);diff --git a/tests/cinema.test.ts b/tests/cinema.test.tsindex 1e061bb7..8be0969a 100644--- a/tests/cinema.test.ts+++ b/tests/cinema.test.ts@@ -71,20 +71,6 @@ describe("Cinema Studio data matches the research", () => {expect(LIGHT_DIRECTIONS).toContain("back-bottom-left");});- it("every native value is one cinema-studio-4 accepts", () => {- const cs4 = getModel("cinema-studio-4")!;- const values = (param: string) => cs4.options.controls!.find((c) => c.param === param)!.values;- expect(values("genre")).toEqual(expect.arrayContaining(GENRES.flatMap((g) => (g.slug ? [g.slug] : []))));- expect(values("era")).toEqual(expect.arrayContaining(ERAS.flatMap((g) => (g.slug ? [g.slug] : []))));- expect(values("pacing")).toEqual(expect.arrayContaining(TEMPOS.flatMap((g) => (g.slug ? [g.slug] : []))));- expect(values("camera_model")).toEqual(expect.arrayContaining(CAMERA_BODIES.flatMap((g) => (g.slug ? [g.slug] : []))));- expect(values("camera_lens")).toEqual(expect.arrayContaining(LENSES.flatMap((g) => (g.slug ? [g.slug] : []))));- expect(values("camera_aperture")).toEqual(expect.arrayContaining(APERTURES.flatMap((g) => (g.slug ? [g.slug] : []))));- expect(values("light")).toEqual(expect.arrayContaining(LIGHTING_PRESETS.flatMap((g) => (g.slug ? [g.slug] : []))));- expect(values("camera_movement")).toEqual(CAMERA_MOVES.map((m) => m.slug));- expect(values("color_palette")).toEqual(PALETTES.map((p) => p.slug));- });-it("the 17 Soul Cast fields with their options and defaults", () => {expect(SOUL_CAST_FIELDS).toHaveLength(17);const f = imageResearch.characterSheet.soulCast.fields as Record<string, (string | number)[]>;diff --git a/tests/cloud-catalog-4.test.ts b/tests/cloud-catalog-4.test.tsindex 47ff45e0..3e38d497 100644--- a/tests/cloud-catalog-4.test.ts+++ b/tests/cloud-catalog-4.test.ts@@ -9,12 +9,6 @@ import { OPERATION_LABELS, OPERATION_OUTPUT, type GenerationRequest, type ModelRtype Endpoint = { provider: string; endpoint: string; status?: string; verified?: boolean; inputs?: Record<string, { values?: unknown[] }> };const research4 = (JSON.parse(fs.readFileSync("docs/research/paid-model-apis-4.json", "utf8")) as { endpoints: Endpoint[] }).endpoints;const byId = new Map(research4.map((e) => [`${e.provider}:${e.endpoint}`, e]));-type HiggsfieldEndpoint = { path: string; method: string; inputs?: Record<string, { enum?: unknown[] }> };-const higgsfield = new Map(- (JSON.parse(fs.readFileSync("docs/research/higgsfield-api.json", "utf8")) as { endpoints: HiggsfieldEndpoint[] }).endpoints- .filter((e) => e.method === "POST")- .map((e) => [e.path.replace(/^\//, ""), e]),-);/** The models round 4 added (research part 4), with the operation each is for. */const ROUND4: Record<string, Operation> = {@@ -58,9 +52,6 @@ const ROUND4: Record<string, Operation> = {"bria-expand": "outpaint","heygen-voice-turbo": "tts","gemini-3-8-flash-tts": "tts",- // Higgsfield (gen-higgsfield-models.py)- "genjutsu-lite-object-swap": "video-swap",- "genjutsu-lite-motion-transfer": "motion-transfer",};/** Chain helpers that never show in a picker (SAM 3.1's mask is also Remove background's "keep what you name" on the cloud). */@@ -139,7 +130,7 @@ describe("round-4 cloud models", () => {expect(ids("video", ["t2v", "i2v", "flf2v", "ref2v"])).not.toEqual(expect.arrayContaining(["wan-22-vace-inpaint"]));expect(ids("video", ["avatar", "lipsync"])).toContain("p-video-2-pro-avatar");expect(ids("video", ["reframe"])).toContain("minimax-h3-max-reframe");- expect(ids("video", ["motion-transfer"])).toContain("genjutsu-lite-motion-transfer");+ expect(ids("video", ["motion-transfer"])).toContain("fuobe-genjutsu-motion-lite");// Image studio (t2i), Edit (edit), Inpaint, Vectorize, Audio (tts).expect(ids("image", ["t2i"])).toEqual(expect.arrayContaining(["krea-3", "grok-imagine-image-2", "bria-fibo-2", "ideogram-vector"]));expect(ids("image", ["edit"])).toEqual(expect.arrayContaining(["krea-3", "grok-imagine-image-2", "bria-fibo-2"]));@@ -148,7 +139,7 @@ describe("round-4 cloud models", () => {expect(ids("audio", ["tts"])).toEqual(expect.arrayContaining(["heygen-voice-turbo", "gemini-3-8-flash-tts"]));// The round-4 tools by operation (their studios come with the feature packages).expect(ids("video", ["remove-object"])).toEqual(expect.arrayContaining(["kling-o3", "kling-o3-4k-edit", "bria-video-erase", "void-video-inpainting", "ltx-2-3-clean-plate", "wan-22-vace-inpaint"]));- expect(ids("video", ["video-swap"])).toEqual(expect.arrayContaining(["kling-o3", "wan-22-vace-inpaint", "p-video-replace", "genjutsu-lite-object-swap", "genjutsu-object-swap"]));+ expect(ids("video", ["video-swap"])).toEqual(expect.arrayContaining(["kling-o3", "wan-22-vace-inpaint", "p-video-replace", "fuobe-genjutsu-swap-lite", "fuobe-genjutsu-swap"]));expect(ids("video", ["video-insert"])).toEqual(expect.arrayContaining(["kling-o3", "wan-22-vace-inpaint"]));expect(ids("video", ["interpolate"])).toEqual(["topaz-fps-boost", "rife-video-cloud"]);expect(ids("video", ["sdr-to-hdr"])).toEqual(["topaz-sdr-to-hdr", "ltx-2-3-hdr"]);@@ -159,33 +150,19 @@ describe("round-4 cloud models", () => {expect(ids("video", ["keyframes"])).toEqual(["flux-3-max"]);});- it("keeps the Higgsfield routes of the Grok models now generated from fal, and adds Genjutsu Lite", () => {+ it("runs the Grok models on fal alone, and Genjutsu Lite as the Original's Lite tier", () => {for (const [id, ops] of [["grok-imagine-video-1-5", ["t2v", "i2v", "ref2v"]],["grok-imagine-image-2", ["t2i", "edit"]],] as const) {const m = getModel(id)!;- for (const op of ops) {- expect(m.routes.some((r) => r.op === op && r.provider === "fal"), `${id} fal ${op}`).toBe(true);- expect(m.routes.some((r) => r.op === op && r.provider === "higgsfield"), `${id} higgsfield ${op}`).toBe(true);- }+ for (const op of ops) expect(m.routes.some((r) => r.op === op && r.provider === "fal"), `${id} fal ${op}`).toBe(true);+ expect(m.routes.every((r) => r.provider === "fal")).toBe(true);}expect(MODELS.filter((m) => m.id === "grok-imagine-video-1-5")).toHaveLength(1);- const lite = getModel("genjutsu-lite-object-swap")!;- expect(lite.routes).toEqual([- {- op: "video-swap",- provider: "higgsfield",- endpoint: "higgsfield/genjutsu-light/object-swap/v1.0",- map: { omitEmptyPrompt: true, images: "image_urls", video: "video_url", resolution: "resolution" },- },- ]);- // Duration is read-only on Genjutsu Light (taken from the source): never sent, never offered.- expect(lite.options.durations).toBeUndefined();- expect(lite.options.maxImages).toBe(8);- expect(lite.pricing).toMatchObject({ unit: "second", usd: 0.1 });- expect(getModel("genjutsu-lite-motion-transfer")!.routes[0]).toMatchObject({ op: "motion-transfer", endpoint: "higgsfield/genjutsu-light/motion-transfer/v1.0" });- expect(route("kling-o3", "remove-object", "higgsfield").endpoint).toBe("kling-video/o3/video-edit");+ expect(getModel("genjutsu-lite-object-swap")).toBeUndefined();+ expect(getModel("fuobe-genjutsu-swap-lite")!.engines).toEqual(["open", "cloud"]);+ expect(route("kling-o3", "remove-object", "fal").endpoint).toMatch(/kling-video\/o3/);});it("prices FLUX 3 Max at its launch rate until 2026-11-07, then at the list price", () => {@@ -388,8 +365,8 @@ describe("round-4 planning", () => {expect(op("wan-22-vace-inpaint", { video, images: ["/r.png"] })).toBe("video-swap");expect(op("wan-22-vace-inpaint", { video, mask: "/m.png" })).toBe("remove-object");expect(op("bria-video-erase", { video })).toBe("remove-object");- expect(op("genjutsu-lite-object-swap", { video, images: ["/r.png"] })).toBe("video-swap");- expect(op("genjutsu-lite-motion-transfer", { video, images: ["/r.png"] })).toBe("motion-transfer");+ expect(op("fuobe-genjutsu-swap-lite", { video, images: ["/r.png"] })).toBe("video-swap");+ expect(op("fuobe-genjutsu-motion-lite", { video, images: ["/r.png"] })).toBe("motion-transfer");// A general video editor keeps plain edits unless the studio asks for the tool.expect(op("kling-o3", { video })).toBe("v2v");expect(op("flux-3-max", { images: ["/a.png", "/b.png", "/c.png"] })).toBe("keyframes");@@ -461,11 +438,7 @@ describe("round-4 planning", () => {it("lets a swap run without words where the API does, and asks for words where it doesn't", () => {expect(promptOptional(getModel("p-video-replace")!, "video-swap")).toBe(true);- expect(promptOptional(getModel("genjutsu-lite-object-swap")!, "video-swap")).toBe(true);- expect(promptOptional(getModel("genjutsu-object-swap")!, "video-swap")).toBe(true);expect(getModel("p-video-replace")!.options.promptless).toBeFalsy();- expect(plan({ modelId: "genjutsu-lite-object-swap", inputs: { video, images: ["/r.png"] } }).op).toBe("video-swap");- expect(buildPayload(map("genjutsu-lite-object-swap", "video-swap", "higgsfield"), { prompt: "", video: "v.mp4", images: ["r.png"] })).toEqual({ image_urls: ["r.png"], video_url: "v.mp4" });expect(fails({ modelId: "kling-o3", op: "video-swap", inputs: { video, images: ["/r.png"] } })).toBe("Write a prompt first");expect(fails({ modelId: "sam-3d-objects", inputs: { images: ["/room.png"] } })).toBe("Name the objects to rebuild, e.g. “chair, lamp”");expect(plan({ modelId: "pixelcut-looping-video", inputs: { images: ["/bottle.png"] } }).op).toBe("i2v");@@ -495,13 +468,12 @@ describe("round-4 review fixes", () => {expect(fitValue(["480p"], "very_low", "tier")).toBeUndefined();});- it("sends Grok Imagine on fal and Higgsfield only values each route's API lists", () => {+ it("sends Grok Imagine on fal only values each route's API lists", () => {const bad: string[] = [];for (const id of ["grok-imagine-video-1-5", "grok-imagine-image-2"]) {const m = getModel(id)!;for (const r of m.routes) {- const enumOf = (field: string): unknown[] | undefined =>- r.provider === "higgsfield" ? higgsfield.get(r.endpoint)?.inputs?.[field]?.enum : byId.get(`${r.provider}:${r.endpoint}`)?.inputs?.[field]?.values;+ const enumOf = (field: string): unknown[] | undefined => byId.get(`${r.provider}:${r.endpoint}`)?.inputs?.[field]?.values;const images = r.op === "ref2v" || r.op === "edit" ? ["a.png", "b.png"] : r.op === "i2v" ? ["a.png"] : [];for (const aspectRatio of m.options.aspectRatios ?? []) {const sent = buildPayload(r.map!, { prompt: "p", images, aspectRatio }).aspect_ratio;@@ -517,19 +489,12 @@ describe("round-4 review fixes", () => {// fal's reference-to-video stops at 720p; text-to-video makes 1080p.expect(buildPayload(map("grok-imagine-video-1-5", "ref2v"), { prompt: "p", images: ["a.png", "b.png"], resolution: "1080p" })).toMatchObject({ reference_image_urls: ["a.png", "b.png"], resolution: "720p" });expect(buildPayload(map("grok-imagine-video-1-5", "t2v"), { prompt: "p", resolution: "1080p" }).resolution).toBe("1080p");- // Higgsfield: a start frame or references, never both; references up to 720p.- expect(buildPayload(map("grok-imagine-video-1-5", "i2v", "higgsfield"), { prompt: "p", images: ["a.png"], resolution: "1080p" })).toEqual({ prompt: "p", image_url: "a.png", resolution: "1080p" });- expect(buildPayload(map("grok-imagine-video-1-5", "ref2v", "higgsfield"), { prompt: "p", images: ["a.png", "b.png"], resolution: "1080p" })).toEqual({ prompt: "p", image_urls: ["a.png", "b.png"], resolution: "720p" });- // fal's text-to-image has no "auto" (its edit does); Higgsfield takes the nearest of its shapes.+ // fal's text-to-image has no "auto" (its edit does).expect(buildPayload(map("grok-imagine-image-2", "t2i"), { prompt: "p", aspectRatio: "auto" })).toEqual({ prompt: "p" });expect(buildPayload(map("grok-imagine-image-2", "edit"), { prompt: "p", images: ["a.png"], aspectRatio: "auto" }).aspect_ratio).toBe("auto");- for (const [want, sent] of [["20:9", "2:1"], ["19.5:9", "2:1"], ["9:19.5", "1:2"], ["9:20", "1:2"], ["16:9", "16:9"], ["auto", "auto"]]) {- expect(buildPayload(map("grok-imagine-image-2", "t2i", "higgsfield"), { prompt: "p", aspectRatio: want }).aspect_ratio, want).toBe(sent);- }- // Up to 10 references (Higgsfield); fal's edit route says it takes 5, so a run with more goes to Higgsfield.- expect(getModel("grok-imagine-image-2")!.options.maxImages).toBe(10);+ // fal's edit route takes 5 references, and the model offers no more.+ expect(getModel("grok-imagine-image-2")!.options.maxImages).toBe(5);expect(map("grok-imagine-image-2", "edit").maxImages).toBe(5);- expect(map("grok-imagine-image-2", "edit", "higgsfield").maxImages).toBeUndefined();});it("asks frame-count routes for as many frames as the clip has", () => {diff --git a/tests/cloud-catalog-fixes.test.ts b/tests/cloud-catalog-fixes.test.tsindex de6f9a46..95ae83bf 100644--- a/tests/cloud-catalog-fixes.test.ts+++ b/tests/cloud-catalog-fixes.test.ts@@ -116,25 +116,20 @@ describe("planning the new operations", () => {});});-describe("reference clips (Cinema Studio, Seedance 2.5)", () => {+describe("reference clips (Seedance 2.5, Wan 3.0)", () => {it("sends reference videos and audio as the API's clip lists", () => {const refs = { prompt: "@Video1 dances to @Audio1", images: ["face.png"], videos: ["moves.mp4", "cam.mp4"], audios: ["song.mp3"] };const clips = { video_urls: ["moves.mp4", "cam.mp4"], audio_urls: ["song.mp3"] };expect(buildPayload(route("seedance-2-5", "ref2v").map!, refs)).toMatchObject({ image_urls: ["face.png"], ...clips });- expect(buildPayload(route("cinema-studio-4", "ref2v", "higgsfield").map!, refs)).toMatchObject({ image_urls: ["face.png"], ...clips });- expect(buildPayload(route("seedance-2-5", "ref2v", "higgsfield").map!, refs)).toMatchObject(clips);expect(buildPayload(route("wan-3", "ref2v").map!, refs)).toMatchObject({ reference_video_urls: ["moves.mp4", "cam.mp4"], reference_audio_urls: ["song.mp3"] });- // Higgsfield's Seedance edit keeps the clip it edits apart from the reference clips.- expect(buildPayload(route("seedance-2-5", "v2v", "higgsfield").map!, { prompt: "p", video: "take.mp4", videos: ["ref.mp4"] })).toMatchObject({ video_url: "take.mp4", video_urls: ["ref.mp4"] });// The fal extend route sends the clip it continues as its one-item list.expect(buildPayload(route("seedance-2-5", "extend").map!, { prompt: "p", video: "take.mp4", audios: ["a.mp3"] })).toMatchObject({ video_urls: ["take.mp4"], audio_urls: ["a.mp3"], task: "extension" });// Text-to-video routes never carry clips.- expect(buildPayload(route("cinema-studio-4", "t2v", "higgsfield").map!, refs)).not.toHaveProperty("video_urls");+ expect(buildPayload(route("seedance-2-5", "t2v").map!, refs)).not.toHaveProperty("video_urls");});it("says how many clips each model takes", () => {expect(getModel("seedance-2-5")!.options).toMatchObject({ maxVideos: 10, maxAudios: 10 });- expect(getModel("cinema-studio-4")!.options).toMatchObject({ maxVideos: 10, maxAudios: 10 });expect(getModel("wan-3")!.options).toMatchObject({ maxVideos: 5, maxAudios: 5 });expect(getModel("seedance-2-0")!.options).toMatchObject({ maxVideos: 3, maxAudios: 3 });expect(getModel("kling-3")!.options.maxVideos).toBeUndefined();@@ -142,7 +137,7 @@ describe("reference clips (Cinema Studio, Seedance 2.5)", () => {it("plans clips as reference-to-video, and turns them away where they can't go", () => {expect(plan({ modelId: "seedance-2-5", prompt: "x", inputs: { videos: ["/v.mp4"] } }).op).toBe("ref2v");- expect(plan({ modelId: "cinema-studio-4", prompt: "x", inputs: { audios: ["/a.mp3"] } }).op).toBe("ref2v");+ expect(plan({ modelId: "seedance-2-5", prompt: "x", inputs: { audios: ["/a.mp3"] } }).op).toBe("ref2v");expect(plan({ modelId: "seedance-2-5", prompt: "x", inputs: { images: ["/a.png"], videos: ["/v.mp4"] } }).op).toBe("ref2v");// One image and no clips is still a start frame.expect(plan({ modelId: "seedance-2-5", prompt: "x", inputs: { images: ["/a.png"] } }).op).toBe("i2v");diff --git a/tests/cloud-catalog.test.ts b/tests/cloud-catalog.test.tsindex 4b99b8e8..70da06d0 100644--- a/tests/cloud-catalog.test.ts+++ b/tests/cloud-catalog.test.ts@@ -15,9 +15,11 @@ for (const e of research) byId.set(`${e.provider}:${e.endpoint}`, { ...byId.get(const originals = JSON.parse(fs.readFileSync("docs/research/fuobe-originals-recipes-5.json", "utf8")) as {hostedLoraEndpoints: (Endpoint & { id: string })[];hostedBaseEndpoints: Endpoint[];+ /** Partner routes read for build plan O7 (Happy Horse 1.1 on fal). */+ partnerEndpoints?: Endpoint[];};for (const e of originals.hostedLoraEndpoints) if (e.inputs) byId.set(`${e.provider}:${e.id}`, { ...e, endpoint: e.id, verified: true });-for (const e of originals.hostedBaseEndpoints) byId.set(`${e.provider}:${e.endpoint}`, e);+for (const e of [...originals.hostedBaseEndpoints, ...(originals.partnerEndpoints ?? [])]) byId.set(`${e.provider}:${e.endpoint}`, e);/** A Replicate model run by version ("owner/name:<version>") is researched under its name. */const researched = (r: ModelRoute, endpoint = r.endpoint) => byId.get(`${r.provider}:${endpoint}`) ?? byId.get(`${r.provider}:${endpoint.split(":")[0]}`);@@ -211,7 +213,8 @@ describe("round-3 payloads", () => {colors: [{ r: 255, g: 0, b: 0 }, { r: 0, g: 255, b: 128 }, { r: 18, g: 52, b: 86 }],background_color: { r: 255, g: 255, b: 255 },});- expect(buildPayload(route("recraft-4-1", "t2i", "higgsfield").map!, { prompt: "p", palette, extra: { background_color: "#000000" } })).toMatchObject({+ // The [{rgb: [r, g, b]}] shape some APIs take.+ expect(buildPayload({ palette: { key: "colors", format: "rgb-array", background: "background_color" } }, { prompt: "p", palette, extra: { background_color: "#000000" } })).toMatchObject({colors: [{ rgb: [255, 0, 0] }, { rgb: [0, 255, 128] }, { rgb: [18, 52, 86] }],background_color: { rgb: [0, 0, 0] },});diff --git a/tests/connections.test.ts b/tests/connections.test.tsindex c0d35930..dc7e9652 100644--- a/tests/connections.test.ts+++ b/tests/connections.test.ts@@ -56,7 +56,6 @@ describe("key and address checks", () => {});it("knows the other keys' shapes and wants web addresses for servers", () => {- expect(settingProblem("higgsfieldKey", "KEY")).toMatch(/KEY_ID:KEY_SECRET/);expect(settingProblem("replicateToken", "abc")).toMatch(/r8_/);expect(settingProblem("replicateToken", "r8_abc")).toBeNull();expect(settingProblem("anthropicKey", "sk-ant-api03-x")).toBeNull();@@ -80,7 +79,7 @@ describe("key and address checks", () => {describe("first-run guide and status strip", () => {const state = (configured: string[], engineMode: ConnectionState["engineMode"] = "both", onboarded = false): ConnectionState => ({- providers: Object.fromEntries(["fal", "replicate", "higgsfield", "comfyui", "llm", "mock"].map((p) => [p, { configured: configured.includes(p) || p === "mock" }])),+ providers: Object.fromEntries(["fal", "replicate", "comfyui", "llm", "mock"].map((p) => [p, { configured: configured.includes(p) || p === "mock" }])),engineMode,onboarded,});@@ -96,7 +95,7 @@ describe("first-run guide and status strip", () => {// A key doesn't help an open-source-only install, nor ComfyUI a paid-only one.expect(nothingConnected(state(["fal"], "open"))).toBe(true);expect(nothingConnected(state(["comfyui"], "cloud"))).toBe(true);- expect(nothingConnected(state(["higgsfield"], "cloud"))).toBe(false);+ expect(nothingConnected(state(["replicate"], "cloud"))).toBe(false);});it("hides Home's shell guide before the first paint only where this browser put it away", () => {@@ -125,11 +124,10 @@ describe("first-run guide and status strip", () => {expect(s.map((c) => [c.id, c.text, c.ok, c.unused])).toEqual([["fal", "Not set", false, true],["replicate", "Key set", true, true],- ["higgsfield", "Not set", false, true],["comfyui", "Online", true, false],["llm", "Off", false, false],]);- expect(s.map((c) => c.href)).toEqual(["#fal", "#replicate", "#higgsfield", "#comfyui", "#text-ai"]);+ expect(s.map((c) => c.href)).toEqual(["#fal", "#replicate", "#comfyui", "#text-ai"]);});it("quotes a first image and clip on the default paid models", () => {diff --git a/tests/engine-mode.test.ts b/tests/engine-mode.test.tsindex 561b4037..0f97bb39 100644--- a/tests/engine-mode.test.ts+++ b/tests/engine-mode.test.ts@@ -55,24 +55,20 @@ describe("preferred cloud provider", () => {describe("routes that take fewer images or can't batch", () => {const edit = () => getModel("grok-imagine-image-2")!.routes.filter((r) => r.op === "edit");- it("sends more images than fal's Grok edit takes to Higgsfield, or says why it can't", () => {+ it("says when a run sends more images than the model's only route takes", () => {setSetting("falKey", "fal_test_key_123456");expect(chooseRoute(edit(), 3).route.provider).toBe("fal");- expect(() => chooseRoute(edit(), 8)).toThrow("This model takes up to 5 images on fal.ai — remove some, or connect Higgsfield for more");- setSetting("higgsfieldKey", "key_id:key_secret");- expect(chooseRoute(edit(), 8).route.provider).toBe("higgsfield");- expect(chooseRoute(edit(), 3).route.provider).toBe("fal");+ expect(() => chooseRoute(edit(), 8)).toThrow("This model takes up to 5 images on fal.ai — remove some");setSetting("falKey", "");- setSetting("higgsfieldKey", "");});it("runs one job per take on a route without a batch count", () => {- setSetting("higgsfieldKey", "key_id:key_secret");- const req = { feature: "image", modelId: "grok-imagine-image-2", prompt: "a fox", params: { numOutputs: 4 } };- expect(previewGeneration(req)).toMatchObject({ providerId: "higgsfield", jobs: 4, outputs: 4 });+ setSetting("replicateToken", "r8_test_token_123456");+ const req = { feature: "image", modelId: "nano-banana-pro", prompt: "a fox", params: { numOutputs: 4 } };+ expect(previewGeneration(req)).toMatchObject({ providerId: "replicate", jobs: 4, outputs: 4 });setSetting("falKey", "fal_test_key_123456");expect(previewGeneration(req)).toMatchObject({ providerId: "fal", jobs: 1, outputs: 4 });setSetting("falKey", "");- setSetting("higgsfieldKey", "");+ setSetting("replicateToken", "");});});diff --git a/tests/eval-harness.test.ts b/tests/eval-harness.test.tsindex 37033327..94825723 100644--- a/tests/eval-harness.test.ts+++ b/tests/eval-harness.test.ts@@ -268,24 +268,12 @@ describe("the runner on the demo provider", () => {expect(look?.kind).toBe("style");});- it("never runs a job through Higgsfield's API, and runs each Genjutsu mode's own partner model", async () => {+ it("runs each Genjutsu mode's own partner model on fal", async () => {type Plan = { jobs: { case: string; variant: string; model: string; skip?: string }[] };const dry = async (args: string[]) => JSON.parse((await cli(["run", ...args, "--dry-run", "--json"])).stdout) as Plan;setSetting("falKey", "fal-test-key");- setSetting("higgsfieldKey", "hf-id:hf-secret");try {- // Cloud provider: Higgsfield. The hosted Z-Image route would go there, so the job is refused, not measured.- setSetting("cloudProvider", "higgsfield");- const soul = await dry(["--suite", "soul", "--engine", "cloud", "--looks", "v1-general", "--variants", "plain", "--prompts", "1"]);- expect(soul.jobs.map((j) => j.skip)).toEqual([expect.stringMatching(/would run on Higgsfield's API/)]);- // Genjutsu's studio route lists its steps' providers: Motion Control goes to Higgsfield, the 4K edit is fal-only.- const gh = await dry(["--suite", "genjutsu", "--engine", "cloud", "--variants", "partner", "--allow-fixtures"]);- const by = (p: Plan) => Object.fromEntries(p.jobs.map((j) => [j.case, j]));- expect(by(gh)["genjutsu/move"].skip).toMatch(/Higgsfield's API/);- expect(by(gh)["genjutsu/restyle"]).toMatchObject({ model: "kling-o3-4k-edit" });- expect(by(gh)["genjutsu/restyle"].skip).toBeUndefined();- // On Auto with fal connected, each mode runs its own partner on fal, even with a Higgsfield key set.- setSetting("cloudProvider", "auto");+ // With fal connected, each mode runs its own partner on fal.const g = await dry(["--suite", "genjutsu", "--engine", "cloud", "--variants", "partner", "--allow-fixtures"]);expect(g.jobs.map((j) => [j.case, j.model, j.skip ?? null])).toEqual([["genjutsu/move", "kling-motion-control", null],@@ -317,8 +305,6 @@ describe("the runner on the demo provider", () => {const open = await dry(["--suite", "genjutsu", "--engine", "open", "--variants", "partner", "--allow-fixtures"]);expect(open.jobs.every((j) => j.skip === "the partner variant runs on cloud only")).toBe(true);} finally {- setSetting("cloudProvider", "auto");- setSetting("higgsfieldKey", "");setSetting("falKey", "");}});@@ -961,7 +947,7 @@ describe("the cloud spend cap", () => {expect(r.run.spentUsd).toBeCloseTo(1.5, 6);});- it("prices cloud training before anything starts, and never trains on Higgsfield", async () => {+ it("prices cloud training before anything starts, and skips a target the server no longer trains", async () => {const suiteFile = path.join(dir, "train-suite.json");const train = (target: string) => ({ photos: path.join(process.cwd(), "scripts/eval/fixtures/character"), targets: { cloud: target }, minPhotos: 3, consent: true });fs.writeFileSync(@@ -975,19 +961,20 @@ describe("the cloud spend cap", () => {targets: { cloud: { models: ["z-image-turbo-cloud"] } },cases: [{ id: "t/fal", title: "fal", train: train("fal-z-image"), prompts: [{ id: "p", text: "{character} in a cafe", seed: 1 }] },- { id: "t/hf", title: "hf", train: train("soul-id-v2"), prompts: [{ id: "p", text: "{character} in a cafe", seed: 1 }] },+ { id: "t/old", title: "old", train: train("soul-id-v2"), prompts: [{ id: "p", text: "{character} in a cafe", seed: 1 }] },],}),);- const stub = cloudStub({ previewUsd: 0.01, actualUsd: 0.01, models: ["z-image-turbo-cloud"], trainingTargets: [{ id: "fal-z-image", provider: "fal", price: "≈ $0.85 (1,000 steps)" }, { id: "soul-id-v2", provider: "higgsfield", price: "Higgsfield balance" }] });+ const stub = cloudStub({ previewUsd: 0.01, actualUsd: 0.01, models: ["z-image-turbo-cloud"], trainingTargets: [{ id: "fal-z-image", provider: "fal", price: "≈ $0.85 (1,000 steps)" }] });const suite = cases.loadSuite(suiteFile);const dry = (await runner.runEval({ suite, engine: "cloud", dryRun: true, root }, { client: stub.client })) as { estimateUsd: number; trainingUsd: number; jobs: { case: string; skip?: string }[] };expect(dry.trainingUsd).toBe(0.85);expect(dry.estimateUsd).toBeCloseTo(0.86, 6);- expect(dry.jobs.find((j) => j.case === "t/hf")?.skip).toMatch(/Higgsfield's API/);+ // An older Soul ID target isn't among the server's targets: it has no price, so it can't run under the cap.+ expect(dry.jobs.find((j) => j.case === "t/old")?.skip).toMatch(/training on soul-id-v2 has no price/);await expect(runner.runEval({ suite, engine: "cloud", maxUsd: 0.5, root }, { client: stub.client })).rejects.toThrow(/about \$0\.86, over the spend cap/);expect(runner.trainingPrice({ price: "Free" })).toBe(0);- expect(runner.trainingPrice({ price: "Higgsfield balance" })).toBeNull();+ expect(runner.trainingPrice({ price: "Pay as you go" })).toBeNull();});it("trains a character with the consent line the case confirms, and a look without one", async () => {const suiteFile = path.join(dir, "train-consent.json");@@ -1099,17 +1086,16 @@ describe("what a job measures", () => {runner.runEval({ suite: cases.loadSuite("genjutsu"), engine: "cloud", variants: ["partner"], cases: ["genjutsu/move"], allowFixtures: true, dryRun: true, root: path.join(dir, "measure") }, { client }) as Promise<{ jobs: { skip?: string }[] }>;it("skips a job the server would run on another model than the one named", async () => {- const swapped = await plan(studioStub({ costUsd: 1, demo: false, modelId: "genjutsu-lite-motion-transfer", providers: ["higgsfield"] }, { fal: { configured: true } }));- expect(swapped.jobs[0].skip).toMatch(/Higgsfield's API/);+ const swapped = await plan(studioStub({ costUsd: 1, demo: false, modelId: "fuobe-genjutsu-motion", providers: ["fal"] }, { fal: { configured: true } }));+ expect(swapped.jobs[0].skip).toMatch(/would run fuobe-genjutsu-motion instead of kling-motion-control/);const other = await plan(studioStub({ costUsd: 1, demo: false, modelId: "kling-o3", providers: ["fal"] }, { fal: { configured: true } }));expect(other.jobs[0].skip).toBe("the server would run kling-o3 instead of kling-motion-control, so this wouldn't measure kling-motion-control");const same = await plan(studioStub({ costUsd: 1, demo: false, modelId: "kling-motion-control", providers: ["fal"] }, { fal: { configured: true } }));expect(same.jobs[0].skip).toBeUndefined();});- it("refuses a studio route that doesn't say where its steps run when that Fuobe has a Higgsfield key", async () => {+ it("measures a studio route that doesn't say where its steps run (an older Fuobe)", async () => {const older = { costUsd: 1, demo: false, modelId: "kling-motion-control" };- expect((await plan(studioStub(older, { fal: { configured: true }, higgsfield: { configured: true } }))).jobs[0].skip).toMatch(/Higgsfield's API/);- expect((await plan(studioStub(older, { fal: { configured: true }, higgsfield: { configured: false } }))).jobs[0].skip).toBeUndefined();+ expect((await plan(studioStub(older, { fal: { configured: true } }))).jobs[0].skip).toBeUndefined();});});diff --git a/tests/genjutsu.test.ts b/tests/genjutsu.test.tsindex 2eb2d01a..2026194d 100644--- a/tests/genjutsu.test.ts+++ b/tests/genjutsu.test.ts@@ -60,10 +60,9 @@ describe("Genjutsu: which model runs", () => {expect(makersFor("cloud", "motion").map((m) => m.id)).not.toContain(ORIGINALS.motion);});- it("no Higgsfield model is offered, and old setups naming one open the Original that replaced it", () => {+ it("only current models are offered, and old setups naming a retired one open the Original that replaced it", () => {expect(MAKERS.some((m) => m.id.startsWith("genjutsu-"))).toBe(false);- // Every maker runs without Higgsfield (Kling's own models may also list Higgsfield as one more provider).- expect(MAKERS.every((m) => onEngine(getModel(m.id)!, m.engine).routes.some((r) => r.provider !== "higgsfield"))).toBe(true);+ expect(MAKERS.every((m) => onEngine(getModel(m.id)!, m.engine).routes.length > 0)).toBe(true);expect(chooseMaker({ engine: "cloud", mode: "motion", modelId: "genjutsu-motion-transfer" })).toEqual({ maker: maker(ORIGINALS.motion) });expect(chooseMaker({ engine: "cloud", mode: "swap", modelId: "genjutsu-lite-object-swap" })).toEqual({ maker: maker(ORIGINALS.swapLite) });expect(chooseMaker({ engine: "open", mode: "motion", modelId: "oss-wan22-animate" })).toEqual({ maker: maker(ORIGINALS.motion, "open") });diff --git a/tests/higgsfield.test.ts b/tests/higgsfield.test.tsdeleted file mode 100644index 497d7000..00000000--- a/tests/higgsfield.test.ts+++ /dev/null@@ -1,72 +0,0 @@-import fs from "node:fs";-import { describe, expect, it } from "vitest";-import { getModel, getPreset, MODELS } from "@/lib/catalog";-import { applyMentions, type StudioElement } from "@/lib/catalog/elements";-import { buildPayload } from "@/lib/catalog/payload";-import { planGeneration } from "@/lib/catalog/plan";--const research = JSON.parse(fs.readFileSync("docs/research/higgsfield-api.json", "utf8")) as {- endpoints: { path: string; method: string; inputs?: Record<string, unknown> }[];-};-const byPath = new Map(research.endpoints.map((e) => [e.path.replace(/^\//, ""), e]));--describe("Higgsfield catalog", () => {- const routes = MODELS.flatMap((m) => m.routes.filter((r) => r.provider === "higgsfield").map((r) => ({ m, r })));-- it("only routes to researched endpoints, with fields the schema has", () => {- expect(routes.length).toBeGreaterThan(50);- for (const { m, r } of routes) {- const e = byPath.get(r.endpoint);- expect(e, `${m.id} → ${r.endpoint}`).toBeDefined();- const fields = Object.values(r.map ?? {}).flatMap((v) => (typeof v === "string" ? [v] : v && typeof v === "object" && "key" in v ? [(v as { key: string }).key] : []));- for (const f of fields) expect(Object.keys(e!.inputs ?? {}), `${r.endpoint}.${f}`).toContain(f);- }- });-- it("adds Higgsfield as another route for models fal already hosts", () => {- const providers = new Set(getModel("seedance-2-5")!.routes.map((r) => r.provider));- expect(providers).toEqual(new Set(["fal", "higgsfield"]));- expect(getModel("seedance-2-5")!.routes.some((r) => r.op === "extend")).toBe(true);- });-- it("builds Soul, Kling and Genjutsu payloads in each API's own shape", () => {- const soul = getModel("soul-2")!.routes.find((r) => r.op === "t2i")!;- expect(buildPayload(soul.map!, { prompt: "p", seed: 123456789, aspectRatio: "3:4", extra: { style_id: "s" } })).toEqual({- prompt: "p",- seed: 1 + (123456789 % 1_000_000),- aspect_ratio: "3:4",- style_id: "s",- });- const kling = getModel("kling-3")!.routes.find((r) => r.provider === "higgsfield" && r.op === "t2v")!;- expect(buildPayload(kling.map!, { prompt: "p", generateAudio: false, duration: 10 })).toMatchObject({ sound: "off", duration: 10 });- const o3 = getModel("kling-o3")!.routes.find((r) => r.provider === "higgsfield" && r.op === "v2v")!;- expect(buildPayload(o3.map!, { prompt: "p", video: "https://v.mp4" })).toMatchObject({ video_urls: ["https://v.mp4"] });- });-- it("requires a style for Genjutsu Restyle and exposes Cinema Studio's director controls", () => {- expect(() => planGeneration({ feature: "x", modelId: "genjutsu-restyle", inputs: { video: "/v.mp4" }, prompt: "x" }, getModel, getPreset)).toThrow(/Pick a style/);- const params = { extra: { preset_id: "abc" } };- expect(planGeneration({ feature: "x", modelId: "genjutsu-restyle", inputs: { video: "/v.mp4" }, prompt: "x", params }, getModel, getPreset).op).toBe("v2v");- const cs = getModel("cinema-studio-4")!;- expect(cs.options.controls?.map((c) => c.param)).toEqual(expect.arrayContaining(["genre", "camera_movement", "color_palette"]));- });-- it("sends a trained Soul ID instead of reference photos", () => {- const m = getModel("soul-2")!;- const maya: StudioElement = {- id: "1",- name: "Maya",- handle: "Maya",- kind: "character",- description: null,- references: ["/a.png"],- loras: [{ engine: "cloud", modelId: "soul-2", file: "", trigger: "", referenceId: "ref-uuid" }],- status: "ready",- createdAt: 0,- };- const { request } = applyMentions({ feature: "image", modelId: m.id, prompt: "@Maya in Paris" }, m, [maya]);- expect(request.prompt).toBe("Maya in Paris");- expect(request.inputs?.images).toBeUndefined();- expect(request.params?.extra).toEqual({ custom_reference_id: "ref-uuid", custom_reference_strength: 1 });- });-});diff --git a/tests/home-start.test.ts b/tests/home-start.test.tsindex 9dc32696..e3253f8a 100644--- a/tests/home-start.test.ts+++ b/tests/home-start.test.ts@@ -70,7 +70,7 @@ describe("the start token", () => {describe("the line under Home's composer", () => {const q = startQuotes();const state = (configured: string[], extra: Partial<ConnectionState> = {}): ConnectionState => ({- providers: Object.fromEntries(["fal", "replicate", "higgsfield", "comfyui", "llm"].map((p) => [p, { configured: configured.includes(p) }])),+ providers: Object.fromEntries(["fal", "replicate", "comfyui", "llm"].map((p) => [p, { configured: configured.includes(p) }])),engineMode: "both",demoMode: "auto",...extra,@@ -83,12 +83,10 @@ describe("the line under Home's composer", () => {});it("says it's a demo when the key set is for a provider that doesn't host the model", () => {- // Only Replicate: Seedance 2.5 is on fal.ai and Higgsfield.- expect(startLine(state(["replicate"]), q.video, "cloud", "video")).toEqual({ text: "Seedance 2.5 needs a fal.ai or Higgsfield key, so Start runs a free demo" });- // Only Higgsfield: Nano Banana Pro is on fal.ai and Replicate.- expect(startLine(state(["higgsfield"]), q.image, "cloud", "image")?.text).toMatch(/^Nano Banana Pro needs a fal\.ai or Replicate key, so Start runs a free demo$/);+ // Only Replicate: Seedance 2.5 is on fal.ai alone.+ expect(startLine(state(["replicate"]), q.video, "cloud", "video")).toEqual({ text: "Seedance 2.5 needs a fal.ai key, so Start runs a free demo" });// Demo mode off: it won't run at all.- expect(startLine(state(["higgsfield"], { demoMode: "off" }), q.image, "cloud", "image")?.text).toMatch(/so Start can't run it yet$/);+ expect(startLine(state(["replicate"], { demoMode: "off" }), q.video, "cloud", "video")?.text).toMatch(/so Start can't run it yet$/);expect(startLine(state(["fal"], { demoMode: "on" }), q.image, "cloud", "image")?.text).toMatch(/Demo mode is on/);});diff --git a/tests/image-studios-api.test.ts b/tests/image-studios-api.test.tsindex 1c045879..c7cd4b0f 100644--- a/tests/image-studios-api.test.ts+++ b/tests/image-studios-api.test.ts@@ -9,8 +9,6 @@ vi.mock("next/server", async (importOriginal) => ({ ...(await importOriginal<typconst dir = fs.mkdtempSync(path.join(os.tmpdir(), "fuobe-image-studios-"));process.env.FUOBE_DATA_DIR = dir;process.env.COMFYUI_URL = "http://127.0.0.1:9";-delete process.env.HF_KEY;-delete process.env.HF_API_KEY;const { setSetting } = await import("@/server/settings");const gens = await import("@/server/generations");@@ -41,7 +39,6 @@ const { getModel } = await import("@/lib/catalog");beforeAll(() => {setSetting("demoMode", "auto");- setSetting("higgsfieldKey", "");});afterAll(() => fs.rmSync(dir, { recursive: true, force: true }));@@ -345,9 +342,13 @@ describe("photodump, fashion factory and character sheet runs", () => {const cast = await (await characterRoute.POST(json("POST", { mode: "cast", engine: "open", cast: { genre: "Western", gender: "Female", age: 30, archetype: "Rebel" } }))).json();expect(cast.items[0].modelId).toBe("oss-zimage-soul-cast");expect(cast.items[0].prompt).toMatch(/30-year-old woman, the rebel archetype/);- const noKey = await (await characterRoute.POST(json("POST", { mode: "cast", engine: "cloud", cast: { genre: "Drama" } }))).json();- expect(noKey.items[0].modelId).toBe("nano-banana-pro");- expect(noKey.notes[0]).toMatch(/Higgsfield key/);+ // In the cloud the cast sheet is Fuobe Soul's, in Cinema's casting look.+ const soul = await (await characterRoute.POST(json("POST", { mode: "cast", engine: "cloud", cast: { genre: "Drama" } }))).json();+ expect(soul.items[0]).toMatchObject({ modelId: "fuobe-soul", engine: "cloud", presetId: "v1-realistic" });+ expect(soul.notes ?? []).toEqual([]);+ const described = await (await characterRoute.POST(json("POST", { mode: "describe", engine: "cloud", prompt: "a surfer from Lisbon" }))).json();+ expect(described.error).toBeUndefined();+ expect(described.items[0]).toMatchObject({ presetId: "app-ai-influencer", modelId: "nano-banana-pro", feature: "app:app-ai-influencer" });const app = await (await characterRoute.POST(json("POST", { mode: "describe", engine: "open", prompt: "a surfer from Lisbon" }))).json();expect(app.items[0]).toMatchObject({ presetId: "app-ai-influencer", modelId: "oss-zimage-soul-cast", feature: "app:app-ai-influencer" });});diff --git a/tests/image-studios.test.ts b/tests/image-studios.test.tsindex 5d1deedb..674e927a 100644--- a/tests/image-studios.test.ts+++ b/tests/image-studios.test.ts@@ -3,14 +3,16 @@ import { getModel, getPreset } from "@/lib/catalog";import { castName, randomizeCast, SOUL_CAST_FIELDS } from "@/lib/catalog/cinema";import { applyMentions, type StudioElement } from "@/lib/catalog/elements";import { onEngine } from "@/lib/catalog/engines";-import { PHOTODUMP_PACKS, SOUL_DEFAULT, SOUL_PRESETS } from "@/lib/catalog/higgsfield-presets.generated";+import fs from "node:fs";+import { PHOTODUMP_PACKS } from "@/lib/catalog/studio-packs.generated";+import { SOUL_LEGACY_IDS } from "@/lib/catalog/soul-looks.generated";+import { lookCard } from "@/lib/catalog/soul-cards";import {castFieldVisible,castNameFor,castSheetModel,coverTone,customPack,- CURATED_MOODBOARDS,FASHION,FASHION_START,fashionBaseRequest,@@ -19,13 +21,9 @@ import {fashionPhotosetRequests,fashionReducer,getPack,- inTab,PACKS,photodumpModel,planPhotodump,- presetFallback,- presetPrompt,- presetTabs,randomCast,sheetFromReference,shotPrompt,@@ -45,6 +43,7 @@ import {rng,samplePixels,SIGNATURE_MODELS,+ styleWords,suggestName,type MoodboardPick,type PalettePick,@@ -90,6 +89,12 @@ const ctx = { caps: CAPS, getModel };const plan = (r: GenerationRequest) => planGeneration(r, getModel, getPreset);/** The prompt as the server runs it: the user's words plus the signature's sentences. */const said = (s: { request: GenerationRequest }) => withSignatureWords(s.request).prompt;+/** A look described in words after the user's prompt (how a model without Fuobe Soul's looks gets one). */+const lookPrompt = (look: { name: string; description?: string }, prompt: string) => `${prompt}. ${styleWords(look)}`;+/** Soul's 139 presets as the research recorded them (their ids are the old style ids). */+const SOUL_RESEARCH = (JSON.parse(fs.readFileSync("docs/research/higgsfield-image-studios.json", "utf8")) as { soulPresets: { id: string; name: string; model: string; description: string }[] }).soulPresets.filter(+ (p) => p.model === "soul-v1" || p.model === "soul-v2",+);const fill = (rgb: RGB, n: number): RGB[] => Array.from({ length: n }, () => [...rgb] as RGB);const PAL: PalettePick = { id: "p1", name: "Teal Dusk", colors: ["#102030", "#2A9D8F", "#E9C46A", "#F4A261"], background: "#264653", slug: null };@@ -192,8 +197,8 @@ describe("palettes: routing per model", () => {expect(ideo.request.params?.extra).toBeUndefined();});- it("writes the hex list into the prompt for other cloud models (Soul 2.0, Nano Banana Pro)", () => {- for (const id of ["nano-banana-pro", "soul-2", "gpt-image-2-5"]) {+ it("writes the hex list into the prompt for other cloud models (Nano Banana Pro, GPT Image)", () => {+ for (const id of ["nano-banana-pro", "imagen-4", "gpt-image-2-5"]) {const r = applySignature(req(id), { palette: PAL }, ctx);expect(r.modelId).toBe(id);// The user's words stay in the prompt; the server adds the palette sentence when it plans the run.@@ -204,10 +209,11 @@ describe("palettes: routing per model", () => {}});- it("passes a built-in palette's slug to Cinema Studio 4.0", () => {- const r = applySignature({ feature: "video", modelId: "cinema-studio-4", prompt: "a chase" }, { palette: CINEMA_PAL }, ctx);- expect(r.request.params?.extra?.color_palette).toBe("static-noon");+ it("gives Fuobe Cinema a built-in palette's colours in words: its slug is sent nowhere", () => {+ const r = applySignature({ feature: "video", modelId: "fuobe-cinema", engine: "cloud", prompt: "a chase" }, { palette: CINEMA_PAL }, ctx);+ expect(r.request.params?.extra?.color_palette).toBeUndefined();expect(r.request.prompt).toBe("a chase");+ expect(said(r)).toMatch(/^a chase\. Color palette: use only these colors/);});it("moves open Z-Image Turbo to Z-Image Turbo · Palette, and locks other open models with a post-step", () => {@@ -245,14 +251,14 @@ describe("moodboards: routing per model", () => {expect(soul.request.prompt).toBe("a rooftop party");expect(soul.request.signature?.words).toBeUndefined();expect(soul.notes).toEqual([]);- // Higgsfield's Soul 2.0 gets the words (never a Fuobe id as its style_id), and a hint where the look runs whole.- const higgs = applySignature(req("soul-2"), { moodboard: curated }, ctx);- expect(higgs.request.params?.extra?.style_id).toBeUndefined();- expect(higgs.notes[0]).toMatch(/General is a Fuobe Soul look — described in words on .*Fuobe Soul applies it with its LoRAs/);+ // A partner model gets the words, and a hint where the look runs whole.+ const nano = applySignature(req("nano-banana-pro"), { moodboard: curated }, ctx);+ expect(nano.request.params?.extra?.style_id).toBeUndefined();+ expect(nano.notes[0]).toMatch(/General is a Fuobe Soul look — described in words on Nano Banana Pro .*Fuobe Soul applies it with its LoRAs/);const open = applySignature(req("oss-z-image-turbo"), { moodboard: curated }, ctx);expect(open.modelId).toBe("oss-z-image-turbo");expect(open.request.prompt).toBe("a rooftop party");- expect(said(open)).toBe(presetPrompt({ name: curated.name, description: curated.description! }, "a rooftop party"));+ expect(said(open)).toBe(lookPrompt({ name: curated.name, description: curated.description! }, "a rooftop party"));});it("personal boards: style references on multi-reference cloud models, Nano Banana Pro for the rest", () => {@@ -262,10 +268,10 @@ describe("moodboards: routing per model", () => {expect(said(nano)).toMatch(/Use images 2–7 only as a style reference/);expect(plan(nano.request).op).toBe("edit");- const soul = applySignature(req("soul-2"), { moodboard: board }, ctx);- expect(soul.modelId).toBe("nano-banana-pro");- expect(soul.notes[0]).toMatch(/can't take style references/);- expect(soul.request.inputs?.images).toHaveLength(6);+ const imagen = applySignature(req("imagen-4"), { moodboard: board }, ctx);+ expect(imagen.modelId).toBe("nano-banana-pro");+ expect(imagen.notes[0]).toMatch(/can't take style references/);+ expect(imagen.request.inputs?.images).toHaveLength(6);});it("Recraft models use the board's saved style id, or its 10 images on Recraft V4 Styles", () => {@@ -307,24 +313,23 @@ describe("moodboards: routing per model", () => {const pick = curatedPick(sunset);expect(pick.source).toBe("soul-v1");expect(soulPick(sunset.id)).toEqual(pick);- // A pick saved with Higgsfield's old style id reads as its Fuobe look.- expect(soulPick(CURATED_MOODBOARDS.find((p) => p.name === "General")!.id)?.id).toBe("v2-general");+ // A pick saved with the retired provider's old style id reads as its Fuobe look.+ const oldGeneral = Object.entries(SOUL_LEGACY_IDS).find(([, id]) => id === "v2-general")![0];+ expect(soulPick(oldGeneral)?.id).toBe("v2-general");expect(soulPick("not-a-preset")).toBeUndefined();const soul = applySignature(req("fuobe-soul"), { moodboard: pick }, ctx);expect(soul.request.presetId).toBe("v1-sunset-beach");- const soul1 = applySignature(req("soul-1"), { moodboard: pick }, ctx);- expect(soul1.request.params?.extra?.style_id).toBeUndefined();const turbo = applySignature(req("oss-z-image-turbo"), { moodboard: pick }, ctx);- expect(said(turbo)).toBe(presetPrompt(sunset, "a rooftop party"));+ expect(said(turbo)).toBe(lookPrompt(sunset, "a rooftop party"));});it("curated sets are Fuobe's own looks: Fuobe ids and words, no Higgsfield description or preview", () => {const base = CURATED_SETS["soul-v2"];expect(base).toHaveLength(33);expect(base.every((c) => c.id.startsWith("v2-") && !c.preview)).toBe(true);- const higgs = new Map(CURATED_MOODBOARDS.map((p) => [p.name, p.description]));- expect(base.every((c) => c.description !== higgs.get(c.name))).toBe(true);+ const theirs = new Map(SOUL_RESEARCH.filter((p) => p.model === "soul-v2").map((p) => [p.name, p.description]));+ expect(base.every((c) => c.description !== theirs.get(c.name))).toBe(true);});it("an older run that kept the sentences in its prompt isn't styled twice; Run again doesn't add the board twice", () => {@@ -425,27 +430,12 @@ describe("style signature: the request record and Reuse", () => {});});-describe("Soul presets fallback", () => {- it("maps the researched list per source with Higgsfield's categories", () => {- const v1 = presetFallback("soul-v1")!;- expect(v1.items).toHaveLength(106);- expect(v1.categories).toEqual(["New", "TikTok Core", "Instagram Aesthetics", "Camera Presets", "Beauty", "Mood", "Surreal", "Graphic Art"]);- const tabs = presetTabs(v1.items, v1.categories);- expect(tabs[0]).toBe("All");- expect(v1.items.filter((p) => inTab(p, "Graphic Art")).map((p) => p.name)).toContain("Glitch");- expect(v1.items.filter((p) => inTab(p, "New"))).toHaveLength(10);- expect(v1.items.find((p) => p.id === SOUL_DEFAULT["soul-v1"])?.name).toBe("General");- const v2 = presetFallback("soul-v2")!;- expect(v2.items).toHaveLength(33);- expect(v2.categories).toEqual(["Mood", "Styles", "Camera"]);- expect(v2.items.every((p) => p.hue >= 0 && p.hue < 360)).toBe(true);- expect(presetFallback("genjutsu-restyle")).toBeNull();- expect(new Set(SOUL_PRESETS.map((p) => p.id)).size).toBe(SOUL_PRESETS.length);- });-- it("turns a preset into a prompt template for the open route", () => {- expect(presetPrompt({ name: "Retro BW", description: "Grainy black-and-white film portrait" }, "a dancer ")).toBe("a dancer. In the style of “Retro BW”: grainy black-and-white film portrait.");- expect(presetPrompt({ name: "Retro BW", description: "" }, "")).toBe("A photo. In the style of “Retro BW”.");+describe("Soul's old style ids", () => {+ it("open their Fuobe look, one way: all 139 from the research, and nothing else", () => {+ expect(SOUL_RESEARCH).toHaveLength(139);+ for (const p of SOUL_RESEARCH) expect(lookCard(p.id)?.id, p.name).toMatch(p.model === "soul-v1" ? /^v1-/ : /^v2-/);+ expect(Object.keys(SOUL_LEGACY_IDS)).toHaveLength(139);+ expect(lookCard("not-a-style")).toBeUndefined();});});@@ -479,7 +469,7 @@ describe("Photodump packs and planning", () => {it("plans one single-image request per photo, on the identity's own model when it has one", () => {const pack = getPack("winter-special")!;- const cloud = planPhotodump({ pack, subject: maya, engine: "cloud", aspectRatio: "3:4" }, { higgsfield: false });+ const cloud = planPhotodump({ pack, subject: maya, engine: "cloud", aspectRatio: "3:4" }, {});expect(cloud.modelId).toBe("nano-banana-pro");expect(cloud.requests).toHaveLength(9);expect(cloud.requests[2].step).toEqual({ label: "Photo 3 of 9", index: 2, of: 9 });@@ -488,41 +478,41 @@ describe("Photodump packs and planning", () => {// A trained Soul ID (build plan O3): Fuobe Soul with the character's LoRA on either engine; Higgsfield's is gone.const soulMaya: PhotoSubject = { ...maya, loras: [{ engine: "cloud", modelId: "fuobe-soul", family: "z-image-turbo", file: "fuobe/maya-a1.safetensors", url: "https://v3.fal.media/maya.safetensors", own: true, trigger: "mayfz" }] };for (const engine of ["cloud", "open"] as const) {- const run = planPhotodump({ pack, subject: soulMaya, engine }, { higgsfield: true });+ const run = planPhotodump({ pack, subject: soulMaya, engine }, {});expect(run.modelId).toBe("fuobe-soul");expect(run.requests.every((r) => r.engine === engine)).toBe(true);}const oldSoulId: PhotoSubject = { ...maya, loras: [{ engine: "cloud", modelId: "soul-2", file: "", trigger: "", referenceId: "ref-123" }] };- expect(planPhotodump({ pack, subject: oldSoulId, engine: "cloud" }, { higgsfield: true }).modelId).toBe("nano-banana-pro");- const untrained = planPhotodump({ pack, subject: maya, engine: "cloud", modelId: "fuobe-soul" }, { higgsfield: false });+ expect(planPhotodump({ pack, subject: oldSoulId, engine: "cloud" }, {}).modelId).toBe("nano-banana-pro");+ const untrained = planPhotodump({ pack, subject: maya, engine: "cloud", modelId: "fuobe-soul" }, {});expect(untrained.modelId).toBe("nano-banana-pro");expect(untrained.notes[0]).toMatch(/No Soul ID yet/);- expect(planPhotodump({ pack, subject: soulMaya, engine: "cloud", modelId: "seedream-5-pro" }, { higgsfield: false }).modelId).toBe("seedream-5-pro");- expect(planPhotodump({ pack, subject: maya, engine: "cloud", modelId: "seedream-5-pro" }, { higgsfield: false }).modelId).toBe("seedream-5-pro");+ expect(planPhotodump({ pack, subject: soulMaya, engine: "cloud", modelId: "seedream-5-pro" }, {}).modelId).toBe("seedream-5-pro");+ expect(planPhotodump({ pack, subject: maya, engine: "cloud", modelId: "seedream-5-pro" }, {}).modelId).toBe("seedream-5-pro");// A LoRA trained before O3 for plain Z-Image Turbo is the same family: it runs on Fuobe Soul too.const loraMaya: PhotoSubject = { ...maya, loras: [{ engine: "open", modelId: "oss-z-image-turbo", file: "maya.safetensors", trigger: "mayfz" }] };- expect(planPhotodump({ pack, subject: loraMaya, engine: "open" }, { higgsfield: false }).modelId).toBe("fuobe-soul");+ expect(planPhotodump({ pack, subject: loraMaya, engine: "open" }, {}).modelId).toBe("fuobe-soul");// A GPU-only LoRA (no copy Fuobe can send) stays off the cloud: reference photos there.- expect(planPhotodump({ pack, subject: loraMaya, engine: "cloud" }, { higgsfield: false }).modelId).toBe("nano-banana-pro");- const qwen = planPhotodump({ pack, subject: selfie, engine: "open", aspectRatio: "auto" }, { higgsfield: false });+ expect(planPhotodump({ pack, subject: loraMaya, engine: "cloud" }, {}).modelId).toBe("nano-banana-pro");+ const qwen = planPhotodump({ pack, subject: selfie, engine: "open", aspectRatio: "auto" }, {});expect(qwen.modelId).toBe("oss-qwen-edit");expect(qwen.requests[0].inputs?.images).toEqual([selfie.url]);expect(qwen.requests[0].params?.aspectRatio).toBeUndefined();const mine = customPack({ id: "user-1", name: "Mine", refs: ["/api/files/uploads/a.png", "/api/files/uploads/b.png"] });- const custom = planPhotodump({ pack: mine, subject: selfie, engine: "cloud" }, { higgsfield: true });+ const custom = planPhotodump({ pack: mine, subject: selfie, engine: "cloud" }, {});expect(custom.requests.map((r) => r.inputs?.images)).toEqual([[selfie.url, "/api/files/uploads/a.png"],[selfie.url, "/api/files/uploads/b.png"],]);- expect(() => planPhotodump({ pack, subject: { ...maya, references: [] }, engine: "cloud" }, { higgsfield: false })).toThrow(/Add a photo of Maya/);+ expect(() => planPhotodump({ pack, subject: { ...maya, references: [] }, engine: "cloud" }, {})).toThrow(/Add a photo of Maya/);});it("each planned photo resolves and plans (mentions become references, LoRAs or a Soul ID)", () => {const el = (loras: StudioElement["loras"]): StudioElement => ({ id: "e1", name: "Maya", handle: "Maya", kind: "character", description: null, references: ["/api/files/uploads/m1.png"], loras, status: "ready", createdAt: 0 });const check = (subject: PhotoSubject, engine: "cloud" | "open", element: StudioElement) => {- const p = planPhotodump({ pack: getPack("zen")!, subject, engine, aspectRatio: "3:4" }, { higgsfield: true });+ const p = planPhotodump({ pack: getPack("zen")!, subject, engine, aspectRatio: "3:4" }, {});const r = p.requests[0];const resolved = applyMentions(r, getModel(r.modelId)!, [element]).request;return { resolved, plan: plan(resolved) };@@ -533,7 +523,7 @@ describe("Photodump packs and planning", () => {// The Soul ID's LoRA on Fuobe Soul, first in its slots, on the engine the run asked for.const trained = [{ engine: "cloud" as const, modelId: "fuobe-soul", family: "z-image-turbo" as const, file: "fuobe/maya-a1.safetensors", url: "https://v3.fal.media/maya.safetensors", own: true as const, trigger: "mayfz" }];for (const engine of ["cloud", "open"] as const) {- const p = planPhotodump({ pack: getPack("zen")!, subject: { ...maya, loras: trained }, engine, aspectRatio: "3:4" }, { higgsfield: false });+ const p = planPhotodump({ pack: getPack("zen")!, subject: { ...maya, loras: trained }, engine, aspectRatio: "3:4" }, {});const r = p.requests[0];const model = onEngine(getModel(r.modelId)!, r.engine!);const resolved = applyMentions(r, model, [el(trained)]).request;@@ -550,13 +540,13 @@ describe("Photodump: model choice and retries", () => {const selfie: PhotoSubject = { kind: "selfie", url: "/api/files/uploads/me.png" };it("says why a pick that can't run ends up on another model", () => {- expect(photodumpModel(selfie, "open", { higgsfield: false }, "fuobe-soul")).toEqual({ modelId: "oss-qwen-edit", note: "Fuobe Soul needs a character with a trained Soul ID — Qwen-Image-Edit works from your photo" });- expect(photodumpModel(selfie, "cloud", { higgsfield: false }, "fuobe-soul").note).toMatch(/Nano Banana Pro works from your photo/);- expect(photodumpModel(selfie, "open", { higgsfield: false }, "fuobe-soul", true).note).toMatch(/Your own packs recreate each reference photo/);- expect(photodumpModel(selfie, "open", { higgsfield: false }).note).toBeUndefined();+ expect(photodumpModel(selfie, "open", {}, "fuobe-soul")).toEqual({ modelId: "oss-qwen-edit", note: "Fuobe Soul needs a character with a trained Soul ID — Qwen-Image-Edit works from your photo" });+ expect(photodumpModel(selfie, "cloud", {}, "fuobe-soul").note).toMatch(/Nano Banana Pro works from your photo/);+ expect(photodumpModel(selfie, "open", {}, "fuobe-soul", true).note).toMatch(/Your own packs recreate each reference photo/);+ expect(photodumpModel(selfie, "open", {}).note).toBeUndefined();// A demo training's stand-in isn't a Soul ID.const demo: PhotoSubject = { kind: "element", handle: "Maya", name: "Maya", references: ["/a.png"], loras: [{ engine: "cloud", modelId: "fuobe-soul", family: "z-image-turbo", file: "fuobe/x.safetensors", trigger: "t", demo: true }] };- expect(photodumpModel(demo, "open", { higgsfield: false }).modelId).toBe("oss-qwen-edit");+ expect(photodumpModel(demo, "open", {}).modelId).toBe("oss-qwen-edit");});it("a retried base shot or outfit takes the failed one's place in the wizard", () => {@@ -579,10 +569,10 @@ describe("Fashion Factory", () => {it("plans the three generating steps on both engines", () => {const t = FASHION[0];- const base = fashionBaseRequest(t, maya, "cloud", { higgsfield: false });+ const base = fashionBaseRequest(t, maya, "cloud", {});expect(base).toMatchObject({ modelId: "nano-banana-pro", params: { aspectRatio: "3:4", numOutputs: 4 } });expect(base.prompt).toMatch(/@Maya in a bold, saturated colour-blocked studio set/);- expect(fashionBaseRequest(t, maya, "open", { higgsfield: false }).modelId).toBe("oss-qwen-edit");+ expect(fashionBaseRequest(t, maya, "open", {}).modelId).toBe("oss-qwen-edit");const outfit = fashionOutfitRequest(t, "/api/files/base.png", "/api/files/shirt.png", "cloud");expect(outfit).toMatchObject({ modelId: "fashn-tryon", op: "edit", inputs: { images: ["/api/files/base.png", "/api/files/shirt.png"] } });@@ -648,11 +638,12 @@ describe("Character Sheet", () => {expect(() => plan(open.request)).not.toThrow();});- it("Build from scratch runs on Soul 2.0 / Nano Banana Pro or the Soul Cast sheet workflow", () => {- expect(castSheetModel("cloud", { higgsfield: true })).toBe("soul-2");- expect(castSheetModel("cloud", { higgsfield: false })).toBe("nano-banana-pro");- expect(castSheetModel("open", { higgsfield: false, has: () => true })).toBe("oss-zimage-soul-cast");- expect(castSheetModel("open", { higgsfield: false, has: () => false })).toBe("oss-z-image-turbo");+ it("Build from scratch runs on Fuobe Soul (Nano Banana Pro when it is switched off) or the Soul Cast sheet workflow", () => {+ expect(castSheetModel("cloud", {})).toBe("fuobe-soul");+ expect(castSheetModel("cloud", { has: () => true })).toBe("fuobe-soul");+ expect(castSheetModel("cloud", { has: (id) => id !== "fuobe-soul" })).toBe("nano-banana-pro");+ expect(castSheetModel("open", { has: () => true })).toBe("oss-zimage-soul-cast");+ expect(castSheetModel("open", { has: () => false })).toBe("oss-z-image-turbo");});it("randomizes and names a cast like Cinema Studio", () => {diff --git a/tests/influencer-api.test.ts b/tests/influencer-api.test.tsindex 93988723..48574a14 100644--- a/tests/influencer-api.test.ts+++ b/tests/influencer-api.test.ts@@ -6,8 +6,6 @@ import { afterAll, afterEach, beforeAll, describe, expect, it } from "vitest";const dir = fs.mkdtempSync(path.join(os.tmpdir(), "fuobe-influencer-"));process.env.FUOBE_DATA_DIR = dir;process.env.COMFYUI_URL = "http://127.0.0.1:9";-delete process.env.HF_KEY;-delete process.env.HF_API_KEY;const { setSetting } = await import("@/server/settings");const { db } = await import("@/server/db");@@ -19,11 +17,9 @@ const { retryPhoto } = await import("@/server/photodump");beforeAll(() => {setSetting("demoMode", "auto");- setSetting("higgsfieldKey", "");});afterEach(() => {setSetting("engineMode", "both");- setSetting("higgsfieldKey", "");});afterAll(() => fs.rmSync(dir, { recursive: true, force: true }));@@ -44,12 +40,9 @@ async function settle(id: string, ms = 40_000) {}describe("/api/influencer", () => {- it("prices a cloud sheet on Nano Banana Pro (Seedream 5.0 Pro when asked), with or without a Higgsfield key", async () => {+ it("prices a cloud sheet on Nano Banana Pro (Seedream 5.0 Pro when asked); a retired model id runs the default", async () => {const cloud = await (await post({ engine: "cloud", state, start: "scratch" }, true)).json();expect(cloud).toMatchObject({ modelId: "nano-banana-pro", modelName: "Nano Banana Pro", count: 1, steps: 1, demo: true });- // Fuobe uses no Higgsfield API: a key changes nothing here.- setSetting("higgsfieldKey", "key:secret");- expect(await (await post({ engine: "cloud", state, start: "scratch" }, true)).json()).toMatchObject({ modelId: "nano-banana-pro", demo: true });expect((await (await post({ engine: "cloud", state, start: "scratch", modelId: "ai-influencer" }, true)).json()).modelId).toBe("nano-banana-pro");const seedream = await (await post({ engine: "cloud", state, start: "scratch", modelId: "seedream-5-pro" }, true)).json();expect(seedream.modelId).toBe("seedream-5-pro");diff --git a/tests/marketing-api.test.ts b/tests/marketing-api.test.tsindex 986d6e3b..cdf8f5ee 100644--- a/tests/marketing-api.test.ts+++ b/tests/marketing-api.test.ts@@ -254,7 +254,7 @@ describe("brand kits", () => {it("plans Marketing Studio runs per format and engine", () => {const b = brand.getBrand(brandId)!;const product = brand.listProducts(brandId)[0];- const ctx = { product, brand: b, higgsfield: false };+ const ctx = { product, brand: b };const cloudAd = mk.planMarketing({ engine: "cloud", format: "ads", templateId: "ad-hero-headline" }, ctx);const r = cloudAd.steps[0].request;expect(r).toMatchObject({ modelId: "gpt-image-2-5", op: "edit", feature: "marketing", params: { aspectRatio: "4:5", numOutputs: 1 } });@@ -294,7 +294,7 @@ describe("brand kits", () => {const b = brand.getBrand(brandId)!;const product = brand.listProducts(brandId)[0];const script = "Okay so I have to tell you about this granola. It is crunchy, not too sweet, and I eat it every single morning now. Try it.";- const cloud = mk.planMarketing({ engine: "cloud", format: "ugc-talking", hookId: "product-hit", settingId: "kitchen" }, { product, brand: b, higgsfield: false, script });+ const cloud = mk.planMarketing({ engine: "cloud", format: "ugc-talking", hookId: "product-hit", settingId: "kitchen" }, { product, brand: b, script });expect(cloud.steps.map((s) => s.key)).toEqual(["voice", "still", "talk", "captions", "hook", "broll", "film"]);const step = (k: string) => cloud.steps.find((s) => s.key === k)!;expect(step("voice").request).toMatchObject({ modelId: "elevenlabs-v4", op: "tts", prompt: script });@@ -306,8 +306,8 @@ describe("brand kits", () => {expect(cloud.finals).toEqual(["film"]);expect(cloud.meta.script).toBe(script);- expect(() => mk.planMarketing({ engine: "open", format: "ugc-talking" }, { product, brand: b, higgsfield: false, script })).toThrow(/voice sample/);- const open = mk.planMarketing({ engine: "open", format: "tiktok", hookId: null, voiceSample: upload("voice.png") }, { product, brand: b, higgsfield: false, script });+ expect(() => mk.planMarketing({ engine: "open", format: "ugc-talking" }, { product, brand: b, script })).toThrow(/voice sample/);+ const open = mk.planMarketing({ engine: "open", format: "tiktok", hookId: null, voiceSample: upload("voice.png") }, { product, brand: b, script });expect(open.steps.map((s) => s.key)).toEqual(["voice", "still", "talk", "captions", "broll", "film"]);expect(open.steps[0].request).toMatchObject({ modelId: "oss-chatterbox", inputs: { voiceAudio: expect.stringMatching(/^\/api\/files\//) } });expect(open.steps[2].request.modelId).toBe("oss-infinitetalk-long");@@ -379,28 +379,28 @@ describe("Ad Multiplier", () => {it("recreates the whole ad: Kling with renumbered @images (keeps audio), Wan Animate + original sound on open", () => {const imgs = [upload("a.png"), upload("b.png")];- const cloud = mk.planMultiplier({ engine: "cloud", video: video(), duration: 12, images: imgs, mode: "prompt", prompt: "Swap the bottle for @image_2", quality: "1080p" }, { higgsfield: false });+ const cloud = mk.planMultiplier({ engine: "cloud", video: video(), duration: 12, images: imgs, mode: "prompt", prompt: "Swap the bottle for @image_2", quality: "1080p" }, {});expect(cloud.steps).toHaveLength(1);expect(cloud.steps[0].request).toMatchObject({ modelId: "kling-o3", op: "v2v", prompt: "Swap the bottle for @Image1", inputs: { images: [imgs[1], imgs[0]] }, params: { extra: { keep_audio: true } } });- const open = mk.planMultiplier({ engine: "open", video: video(), duration: 12, images: imgs, mode: "prompt", prompt: "", quality: "1080p" }, { higgsfield: false });+ const open = mk.planMultiplier({ engine: "open", video: video(), duration: 12, images: imgs, mode: "prompt", prompt: "", quality: "1080p" }, {});expect(open.steps.map((s) => [s.key, s.request.modelId])).toEqual([["edit", "fuobe-genjutsu-motion"], ["sound", "oss-mux"]]);- expect(() => mk.planMultiplier({ engine: "open", video: video(), duration: 12, mode: "prompt", quality: "720p" }, { higgsfield: false })).toThrow(/Add an image/);+ expect(() => mk.planMultiplier({ engine: "open", video: video(), duration: 12, mode: "prompt", quality: "720p" }, {})).toThrow(/Add an image/);});it("adds a hook and a CTA around the original (trimmed first), from the frames the browser grabbed", () => {const v = video();- const plain = mk.planMultiplier({ engine: "cloud", video: v, duration: 20, mode: "sections", hook: "Wait for it", cta: "Shop today", quality: "720p", firstFrame: upload("f.png"), lastFrame: upload("l.png") }, { higgsfield: false });+ const plain = mk.planMultiplier({ engine: "cloud", video: v, duration: 20, mode: "sections", hook: "Wait for it", cta: "Shop today", quality: "720p", firstFrame: upload("f.png"), lastFrame: upload("l.png") }, {});expect(plain.steps.map((s) => s.key)).toEqual(["hook", "cta", "film"]);const film = plain.steps.at(-1)!;expect(film.request.inputs).toEqual({ videos: [v] });expect(film.request.chain).toEqual([{ slot: "videos", position: "first" }, { slot: "videos", position: "last" }]);expect(plain.steps[0].request.prompt).toContain("“Wait for it”");- const trimmed = mk.planMultiplier({ engine: "cloud", video: v, duration: 40, start: 5, end: 20, mode: "sections", cta: "Shop today", hook: null, quality: "720p" }, { higgsfield: false });+ const trimmed = mk.planMultiplier({ engine: "cloud", video: v, duration: 40, start: 5, end: 20, mode: "sections", cta: "Shop today", hook: null, quality: "720p" }, {});expect(trimmed.steps.map((s) => s.key)).toEqual(["clip", "last", "cta", "film"]);expect(trimmed.steps[0].request).toMatchObject({ modelId: "trim-video", params: { startTime: 5, endTime: 20 } });expect(trimmed.steps.at(-1)).toMatchObject({ after: ["clip", "cta"], request: { inputs: undefined } });- expect(() => mk.planMultiplier({ engine: "cloud", video: v, duration: 3, mode: "prompt", quality: "720p" }, { higgsfield: false })).toThrow("Video duration: 4-30 seconds");+ expect(() => mk.planMultiplier({ engine: "cloud", video: v, duration: 3, mode: "prompt", quality: "720p" }, {})).toThrow("Video duration: 4-30 seconds");});it("prices a version per second and says what blocks it", async () => {@@ -470,7 +470,7 @@ describe("Ads Studio", () => {{ productId: products[1].id, count: 2 },];const est = await (await adsEstimate.POST(json("POST", { brandId, engine: "open", items }))).json();- expect(est).toMatchObject({ route: "fuobe", modelId: "oss-qwen-edit", total: 5, demo: true });+ expect(est).toMatchObject({ modelId: "oss-qwen-edit", total: 5, demo: true });const { batchId, creatives, run } = ads.createBatch({ brandId, engine: "open", items });expect(creatives).toHaveLength(5);expect(creatives.every((c) => c.status === "writing")).toBe(true);diff --git a/tests/marketing-fixes.test.ts b/tests/marketing-fixes.test.tsindex 6416d059..bbbcd703 100644--- a/tests/marketing-fixes.test.ts+++ b/tests/marketing-fixes.test.ts@@ -4,7 +4,7 @@ import path from "node:path";import { afterAll, beforeAll, describe, expect, it } from "vitest";/**- * The review fixes of the marketing suite: open joins keep the voice, plans with a Higgsfield key,+ * The review fixes of the marketing suite: open joins keep the voice, plans on fal and Replicate alone,* offline scripts that keep the call to action and the instructions, chat directions without "@"* leftovers, a research bar that never goes back, and the sound-keeping join workflows bound for real.*/@@ -68,7 +68,6 @@ beforeAll(() => {setSetting("enhanceProvider", "none");});afterAll(() => {- setSetting("higgsfieldKey", "");fs.rmSync(dir, { recursive: true, force: true });});@@ -92,7 +91,7 @@ describe("open joins keep the voice", () => {it("UGC with a hook: the presenter's own sound starts after the silent hook (sound of clip 2)", () => {const plan = mk.planMarketing({ engine: "open", format: "ugc-talking", templateId: "ugc-honest-review", hookId: "camera-bump", voiceSample: upload("v.png") },- { product: product(), higgsfield: false, script: SCRIPT },+ { product: product(), script: SCRIPT },);const film = filmOf(plan);expect(plan.finals).toEqual(["film"]);@@ -107,7 +106,7 @@ describe("open joins keep the voice", () => {});it("UGC without a hook and Click to Ad's presenter: the first clip's sound from the start", () => {- const ugc = mk.planMarketing({ engine: "open", format: "ugc-talking", hookId: null, voiceSample: upload("v.png") }, { product: product(), higgsfield: false, script: SCRIPT });+ const ugc = mk.planMarketing({ engine: "open", format: "ugc-talking", hookId: null, voiceSample: upload("v.png") }, { product: product(), script: SCRIPT });expect(filmOf(ugc).request.modelId).toBe(cat.OPEN_SOUND_JOIN.first);expect(filmOf(ugc).after).toEqual(["captions", "broll"]);const c2a = mk.planClickToAd({ engine: "open", productId: "p1", styleId: "simple-ugc", voiceSample: upload("v.png"), quality: "720p" }, { product: product(), script: SCRIPT });@@ -128,24 +127,24 @@ describe("open joins keep the voice", () => {it("Ad Multiplier hook / CTA: the reference's own sound when it has one, the plain join otherwise", () => {const base = { engine: "open" as const, video: upload("ref.png"), duration: 12, mode: "sections" as const, quality: "1080p" as const, firstFrame: upload("f.png"), lastFrame: upload("l.png") };- const both = mk.planMultiplier({ ...base, hook: "Wait", cta: "Shop" }, { higgsfield: false, referenceSound: true, referenceAspect: "9:16" });+ const both = mk.planMultiplier({ ...base, hook: "Wait", cta: "Shop" }, { referenceSound: true, referenceAspect: "9:16" });const film = filmOf(both);expect(film.request).toMatchObject({ modelId: cat.OPEN_SOUND_JOIN.second, inputs: { videos: [base.video] }, params: { aspectRatio: "9:16", resolution: "720p" } });expect(both.steps.find((s) => s.key === "hook")!.request.params).toMatchObject({ aspectRatio: "9:16" });- const ctaOnly = mk.planMultiplier({ ...base, hook: null, cta: "Shop" }, { higgsfield: false, referenceSound: true });+ const ctaOnly = mk.planMultiplier({ ...base, hook: null, cta: "Shop" }, { referenceSound: true });expect(filmOf(ctaOnly).request.modelId).toBe(cat.OPEN_SOUND_JOIN.first);- const silent = mk.planMultiplier({ ...base, hook: "Wait", cta: null }, { higgsfield: false, referenceSound: false });+ const silent = mk.planMultiplier({ ...base, hook: "Wait", cta: null }, { referenceSound: false });expect(filmOf(silent).request.modelId).toBe("oss-join-clips");expect(silent.notes).toEqual([]);- const unknown = mk.planMultiplier({ ...base, hook: "Wait", cta: null }, { higgsfield: false });+ const unknown = mk.planMultiplier({ ...base, hook: "Wait", cta: null }, {});expect(filmOf(unknown).request.modelId).toBe("oss-join-clips");expect(unknown.notes.join(" ")).toMatch(/soundtrack couldn't be read/);});it("Ad Multiplier prompt mode: no 'Original sound' step for a silent reference", () => {const base = { engine: "open" as const, video: upload("ref.png"), duration: 12, mode: "prompt" as const, quality: "720p" as const, images: [upload("star.png")], prompt: "Recreate with @image_1" };- expect(mk.planMultiplier(base, { higgsfield: false, referenceSound: true }).steps.map((s) => s.key)).toEqual(["edit", "sound"]);- const silent = mk.planMultiplier(base, { higgsfield: false, referenceSound: false });+ expect(mk.planMultiplier(base, { referenceSound: true }).steps.map((s) => s.key)).toEqual(["edit", "sound"]);+ const silent = mk.planMultiplier(base, { referenceSound: false });expect(silent.steps.map((s) => s.key)).toEqual(["edit"]);expect(silent.steps[0].request).toMatchObject({ feature: "ad-multiplier", title: silent.title });});@@ -187,29 +186,15 @@ describe("the sound-keeping join workflows", () => {// ----------------------------------------------------------------------------describe("plans with a Higgsfield key", () => {- it("Ads Studio goes one-shot through Higgsfield's ads-studio; the Multiplier defaults to Seedance 2.5 edit", () => {- setSetting("higgsfieldKey", "key:secret");- try {- expect(ads.batchRoute({ engine: "cloud" })).toBe("higgsfield");- expect(ads.batchRoute({ engine: "cloud", route: "fuobe" })).toBe("fuobe");- expect(ads.batchRoute({ engine: "open", route: "higgsfield" })).toBe("fuobe");- const kit = brand.kitForSite("https://hf.example/p/1", { name: "HF Brand", colors: ["#123456"], fonts: {} });- const req = ads.higgsfieldRequest(product(), kit, "9:16", "winter sale", 3);- expect(req).toMatchObject({ modelId: "ads-studio", op: "edit", params: { aspectRatio: "9:16", numOutputs: 1 } });- expect(req.prompt).toMatch(/Direction: winter sale/);- const model = mk.multiplierModel({ engine: "cloud" }, true);- expect(model.id).toBe("seedance-2-5");- const plan = mk.planMultiplier({ engine: "cloud", video: upload("ref.png"), duration: 10, mode: "prompt", quality: "720p" }, { higgsfield: true });- expect(plan.steps[0].request).toMatchObject({ modelId: "seedance-2-5", op: "v2v" });- expect(model.routes.some((r) => r.op === "v2v" && r.provider === "higgsfield")).toBe(true);- expect(plan.notes.join(" ")).not.toMatch(/connect a Higgsfield key/);- brand.deleteBrand(kit.id);- } finally {- setSetting("higgsfieldKey", "");- }- expect(ads.batchRoute({ engine: "cloud" })).toBe("fuobe");- expect(mk.multiplierModel({ engine: "cloud" }, false).id).toBe("kling-o3");+describe("plans on fal and Replicate alone", () => {+ it("the Multiplier recreates on Kling O3 edit by default, or Happy Horse's edit with your images", () => {+ expect(mk.multiplierModel({ engine: "cloud" }).id).toBe("kling-o3");+ expect(mk.multiplierModel({ engine: "cloud", modelId: "happy-horse-video-edit" }).id).toBe("happy-horse-video-edit");+ // An old pick (Seedance 2.5's edit, which no longer has a route) falls back to the default.+ expect(mk.multiplierModel({ engine: "cloud", modelId: "seedance-2-5" }).id).toBe("kling-o3");+ const plan = mk.planMultiplier({ engine: "cloud", video: upload("ref.png"), duration: 10, mode: "prompt", quality: "720p", modelId: "happy-horse-video-edit", images: [upload("a.png")], prompt: "Swap the bottle for @image_1" }, {});+ expect(plan.steps[0].request).toMatchObject({ modelId: "happy-horse-video-edit", op: "v2v", inputs: { images: [expect.any(String)] } });+ expect(getModel("happy-horse-video-edit")!.routes.every((r) => r.provider === "fal")).toBe(true);});it("says the rules write the copy when no LLM is reachable", () => {@@ -345,20 +330,20 @@ describe("composer details", () => {});it("SaaS motion uses the brand kit's website when no link or product is given", () => {const b = { ...cat.emptyKit("Northbound"), id: "b1", website: "https://northbound.example/" } as import("@/lib/catalog/marketing").BrandKit;- const plan = mk.planMarketing({ engine: "cloud", format: "motion-saas" }, { brand: b, higgsfield: false });+ const plan = mk.planMarketing({ engine: "cloud", format: "motion-saas" }, { brand: b });expect(plan.steps[0].request.prompt).toMatch(/For the product at https:\/\/northbound\.example\//);- expect(() => mk.planMarketing({ engine: "cloud", format: "motion-saas" }, { higgsfield: false })).toThrow(/website/);+ expect(() => mk.planMarketing({ engine: "cloud", format: "motion-saas" }, {})).toThrow(/website/);});it("open posters and ads ask for room where the words go", () => {- const ad = mk.planMarketing({ engine: "open", format: "ads", templateId: "ad-hero-headline", productImages: [upload()] }, { higgsfield: false });+ const ad = mk.planMarketing({ engine: "open", format: "ads", templateId: "ad-hero-headline", productImages: [upload()] }, {});expect(cat.overlayLayout("ads")).toBe("overlay");expect(ad.steps[0].request.prompt).toMatch(/lower third/);- const poster = mk.planMarketing({ engine: "open", format: "poster", prompt: "A summer concert" }, { higgsfield: false });+ const poster = mk.planMarketing({ engine: "open", format: "poster", prompt: "A summer concert" }, {});expect(cat.overlayLayout("poster")).toBe("frame");expect(poster.steps[0].request.prompt).not.toMatch(/third/);});it("keeps the browser's own composite on the run once (a second automatic one returns it)", () => {- const plan = mk.planMarketing({ engine: "open", format: "poster", prompt: "A summer concert", headline: "Live at dusk" }, { higgsfield: false });+ const plan = mk.planMarketing({ engine: "open", format: "poster", prompt: "A summer concert", headline: "Live at dusk" }, {});const run = mk.launch(plan);expect(run.meta.overlay).toEqual({ headline: "Live at dusk" });const first = mk.saveRunComposite(run.id, { url: upload("c1.png"), ratio: "3:4", text: "Live at dusk", auto: true });diff --git a/tests/model-access-listings.test.ts b/tests/model-access-listings.test.tsindex a4e9cfac..9c1b4f9d 100644--- a/tests/model-access-listings.test.ts+++ b/tests/model-access-listings.test.ts@@ -55,7 +55,7 @@ describe("Models & licences in listings and picks", () => {it("tells the browser what is off through /api/status, and nothing while everything is on", async () => {expect(((await (await status()).json()) as { access?: unknown }).access).toBeUndefined();- changeAccess([{ kind: "provider", id: "higgsfield", on: false }, { kind: "class", id: "research", on: false }]);+ changeAccess([{ kind: "provider", id: "replicate", on: false }, { kind: "class", id: "research", on: false }]);const body = (await (await status()).json()) as { access: { off: string[] } };expect(body.access.off).toContain("oss-reactor");expect(body.access.off.length).toBeGreaterThan(5);diff --git a/tests/model-access-studios.test.ts b/tests/model-access-studios.test.tsindex cf723fe4..a58d347d 100644--- a/tests/model-access-studios.test.ts+++ b/tests/model-access-studios.test.ts@@ -84,9 +84,9 @@ describe("a studio's default on the server", () => {});it("Ad Multiplier and Faceless fall back past a switched-off default", () => {- expect(multiplierModel({ engine: "cloud" }, false).id).toBe("kling-o3");+ expect(multiplierModel({ engine: "cloud" }).id).toBe("kling-o3");changeAccess([{ kind: "model", id: "kling-o3", on: false }]);- expect(multiplierModel({ engine: "cloud" }, false).id).not.toBe("kling-o3");+ expect(multiplierModel({ engine: "cloud" }).id).not.toBe("kling-o3");const settings = { engine: "cloud" as const, animation: "animated" } as Parameters<typeof withOfferedVideo>[0];expect(withOfferedVideo(settings)).toBe(settings);diff --git a/tests/providers.test.ts b/tests/providers.test.tsindex f32ca1b7..6de6defb 100644--- a/tests/providers.test.ts+++ b/tests/providers.test.ts@@ -8,7 +8,6 @@ import type { ModelDef, ModelRoute } from "@/lib/catalog/types";const dir = fs.mkdtempSync(path.join(os.tmpdir(), "fuobe-providers-"));process.env.FUOBE_DATA_DIR = dir;-const { higgsfieldProvider } = await import("@/server/providers/higgsfield");const { falProvider } = await import("@/server/providers/fal");const { replicateProvider } = await import("@/server/providers/replicate");@@ -41,55 +40,6 @@ const ctx = (route: Partial<ModelRoute>, meta: Record<string, unknown> = {}) =>createdAt: 0,});-describe("Higgsfield poll (S1)", () => {- it("returns only the media of a completed RequestStatus, not its status/cancel links", async () => {- const statusUrl = "https://api.higgsfield.ai/requests/req-1/status";- // RequestStatus as docs.higgsfield.ai/docs/openapi.json documents it.- const body = {- status: "completed",- request_id: "req-1",- status_url: statusUrl,- cancel_url: "https://api.higgsfield.ai/requests/req-1/cancel",- images: [{ url: "https://cdn.higgsfield.ai/out/a.png" }],- };- const { result } = await withFetch({ [statusUrl]: body }, () =>- higgsfieldProvider.poll(ctx({ provider: "higgsfield", endpoint: "higgsfield-ai/soul/v2/standard" }, { statusUrl })),- );- expect(result).toEqual({ state: "succeeded", outputs: [{ url: "https://cdn.higgsfield.ai/out/a.png", kind: "image" }] });- });-- it("keeps videos first and extra artifacts as links on the output", async () => {- const statusUrl = "https://api.higgsfield.ai/requests/req-2/status";- const body = {- status: "completed",- request_id: "req-2",- status_url: statusUrl,- cancel_url: "https://api.higgsfield.ai/requests/req-2/cancel",- video: { url: "https://cdn.higgsfield.ai/out/v.mp4" },- zip: { url: "https://cdn.higgsfield.ai/out/frames.zip" },- };- const { result } = await withFetch({ [statusUrl]: body }, () => higgsfieldProvider.poll(ctx({ provider: "higgsfield", op: "t2v" }, { statusUrl })));- expect(result).toEqual({- state: "succeeded",- outputs: [{ url: "https://cdn.higgsfield.ai/out/v.mp4", kind: "video", meta: { artifacts: { zip: "https://cdn.higgsfield.ai/out/frames.zip" } } }],- });- });-- it("keeps a layer's structure through the Higgsfield route too", async () => {- const statusUrl = "https://api.higgsfield.ai/requests/req-4/status";- const body = { status: "completed", request_id: "req-4", status_url: statusUrl, cancel_url: "x", images: [{ url: "https://cdn.higgsfield.ai/a.png" }, { url: "https://cdn.higgsfield.ai/b.png" }] };- const { result } = await withFetch({ [statusUrl]: body }, () => higgsfieldProvider.poll(ctx({ provider: "higgsfield", op: "layers" }, { statusUrl })));- expect(result).toMatchObject({ state: "succeeded", outputs: [{ meta: { name: "Background", z: 0 } }, { meta: { name: "Layer 1", z: 1 } }] });- });-- it("fails cleanly when a completed status has no media", async () => {- const statusUrl = "https://api.higgsfield.ai/requests/req-3/status";- const body = { status: "completed", request_id: "req-3", status_url: statusUrl, cancel_url: "https://api.higgsfield.ai/requests/req-3/cancel" };- const { result } = await withFetch({ [statusUrl]: body }, () => higgsfieldProvider.poll(ctx({ provider: "higgsfield" }, { statusUrl })));- expect(result.state).toBe("failed");- });-});-describe("fal poll: structured results", () => {const meta = { statusUrl: "https://queue.fal.run/fal-ai/x/requests/r1/status", responseUrl: "https://queue.fal.run/fal-ai/x/requests/r1" };diff --git a/tests/soul-id-runtime.test.ts b/tests/soul-id-runtime.test.tsindex b281eb51..8520ce7c 100644--- a/tests/soul-id-runtime.test.ts+++ b/tests/soul-id-runtime.test.ts@@ -27,7 +27,7 @@ const dir = fs.mkdtempSync(path.join(os.tmpdir(), "fuobe-soul-id-"));process.env.FUOBE_DATA_DIR = dir;const { db } = await import("@/server/db");const { createElement, getElement, updateElement } = await import("@/server/elements");-const { startTraining, pollTrainings, listTrainings, trainingKit, attachLora, trainedCopiesSettled, RETIRED_SOUL_ID } = await import("@/server/training");+const { startTraining, pollTrainings, listTrainings, trainingKit, attachLora, trainedCopiesSettled, retiredTraining } = await import("@/server/training");const { ensureLorasOnComfy, prepareCloudLoras, listLoraCopies, TRAINED_DIR } = await import("@/server/loras");const { setSetting } = await import("@/server/settings");afterAll(() => fs.rmSync(dir, { recursive: true, force: true }));@@ -331,10 +331,11 @@ describe("a finished training", () => {expect(listTrainings(z.el.id)[0].message).toMatch(/^Copy \/elsewhere\/output\/maya_z\.safetensors to ComfyUI/);});- it("retires a Higgsfield Soul ID training that was still running", async () => {- const { id, el } = running({ target: "soul-id-v2", provider: "higgsfield", externalId: "hf-ref" });+ it("retires a training on an older Soul ID target that was still running, saying what replaced it", async () => {+ const { id, el } = running({ target: "soul-id-v2", provider: "retired", externalId: "old-ref" });await pollTrainings();- expect(listTrainings(el.id).find((t) => t.id === id)).toMatchObject({ status: "failed", error: RETIRED_SOUL_ID });+ expect(retiredTraining("soul-id-v2")).toMatch(/was retired: train the character again for Fuobe Soul on the same photos/);+ expect(listTrainings(el.id).find((t) => t.id === id)).toMatchObject({ status: "failed", error: retiredTraining("soul-id-v2") });expect(getElement(el.id)!.status).toBe("ready");});});