Skip to content

armgit / fuobe

Public Imported from GitHub
0

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.

Hosted routes: requests and results checked against the providers' schemas

Adarsh017a67c9e888
diff --git a/package.json b/package.json
index 67a91fdf..0d2db85a 100644
--- a/package.json
+++ b/package.json
@@ -81,6 +81,7 @@
"@types/react": "^19",
"@types/react-dom": "^19",
"@types/three": "0.183.1",
+ "ajv": "8.20.0",
"eslint": "^9",
"eslint-config-next": "16.4.2",
"tailwindcss": "^4",
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index d6c13f16..006eb68b 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -123,6 +123,9 @@ importers:
'@types/three':
specifier: 0.183.1
version: 0.183.1
+ ajv:
+ specifier: 8.20.0
+ version: 8.20.0
eslint:
specifier: ^9
version: 9.39.5([email protected])
diff --git a/scripts/refresh-provider-schemas.mjs b/scripts/refresh-provider-schemas.mjs
new file mode 100644
index 00000000..b93b2637
--- /dev/null
+++ b/scripts/refresh-provider-schemas.mjs
@@ -0,0 +1,143 @@
+#!/usr/bin/env node
+/**
+ * Download the providers' own API schemas for the hosted routes that tests/provider-conformance.test.ts checks, into
+ * tests/fixtures/provider-schemas/. A provider that changes an endpoint shows up as a diff of these files, and the test
+ * then says which request or answer no longer fits.
+ *
+ * Public GETs only. No key is read or sent, and no model is run:
+ * fal.ai https://fal.ai/api/openapi/queue/openapi.json?endpoint_id=<endpoint> (the endpoint's queue OpenAPI)
+ * Replicate https://replicate.com/<owner>/<model>/api/schema (the model page's latest version:
+ * its OpenAPI schema and its example prediction, as the page embeds them)
+ *
+ * Run: node scripts/refresh-provider-schemas.mjs (every endpoint in index.json)
+ * node scripts/refresh-provider-schemas.mjs --only <endpoint> … (those only; the rest are kept)
+ * node scripts/refresh-provider-schemas.mjs --add fal:<endpoint> --add replicate:<owner>/<model>
+ *
+ * Files are written with sorted keys, so a refresh with no change upstream leaves no diff.
+ */
+import fs from "node:fs";
+import path from "node:path";
+import { fileURLToPath } from "node:url";
+
+const ROOT = path.resolve(path.dirname(fileURLToPath(import.meta.url)), "..");
+const DIR = path.join(ROOT, "tests/fixtures/provider-schemas");
+const INDEX = path.join(DIR, "index.json");
+const UNTESTED = path.join(ROOT, "src/lib/catalog/hosted-untested.ts");
+
+const args = process.argv.slice(2);
+const flagValues = (flag) => args.flatMap((a, i) => (args[i - 1] === flag ? [a] : []));
+const only = new Set(args.includes("--only") ? args.slice(args.indexOf("--only") + 1).filter((a) => !a.startsWith("--")) : []);
+const adds = flagValues("--add");
+
+/** The file a schema is kept in: the endpoint with each "/" as "__". */
+export const fileFor = (provider, endpoint) => path.join(DIR, provider, `${endpoint.replaceAll("/", "__")}.json`);
+
+/** Objects with their keys sorted (arrays keep their order): the same schema always writes the same bytes. */
+function sorted(v) {
+ if (Array.isArray(v)) return v.map(sorted);
+ if (v && typeof v === "object") return Object.fromEntries(Object.keys(v).sort().map((k) => [k, sorted(v[k])]));
+ return v;
+}
+
+async function get(url, accept) {
+ for (let attempt = 1; ; attempt++) {
+ try {
+ // No Authorization header: these are public pages.
+ const res = await fetch(url, { headers: { accept, "user-agent": "fuobe-schema-refresh" }, signal: AbortSignal.timeout(30_000) });
+ if (res.status === 429 || res.status >= 500) throw new Error(`HTTP ${res.status}`);
+ if (!res.ok) throw Object.assign(new Error(`HTTP ${res.status} for ${url}`), { final: true });
+ return await res.text();
+ } catch (e) {
+ if (e.final || attempt >= 3) throw e;
+ await new Promise((r) => setTimeout(r, 1500 * attempt));
+ }
+ }
+}
+
+async function falSchema(endpoint) {
+ const text = await get(`https://fal.ai/api/openapi/queue/openapi.json?endpoint_id=${encodeURIComponent(endpoint)}`, "application/json");
+ const doc = JSON.parse(text);
+ if (!doc?.paths?.[`/${endpoint}`]?.post) throw new Error(`fal.ai has no queue submit for ${endpoint}`);
+ return doc;
+}
+
+const decode = (s) => s.replace(/&quot;/g, '"').replace(/&#x27;/g, "'").replace(/&lt;/g, "<").replace(/&gt;/g, ">").replace(/&amp;/g, "&");
+const parse = (s) => {
+ try {
+ return JSON.parse(s);
+ } catch {
+ try {
+ return JSON.parse(decode(s));
+ } catch {
+ return null;
+ }
+ }
+};
+
+async function replicateSchema(model) {
+ const html = await get(`https://replicate.com/${model}/api/schema`, "text/html");
+ const blobs = [...html.matchAll(/<script id="react-component-props-[^"]+" type="application\/json">([\s\S]*?)<\/script>/g)].map((m) => parse(m[1])).filter(Boolean);
+ const withVersion = blobs.find((b) => b.version?.id && b.version?._extras?.dereferenced_openapi_schema);
+ if (!withVersion) throw new Error(`replicate.com/${model}/api/schema shows no version schema`);
+ const api = blobs.find((b) => b && typeof b === "object" && "usesVersionlessApi" in b);
+ const v = withVersion.version;
+ const ex = api?.example;
+ return {
+ model,
+ source: `https://replicate.com/${model}/api/schema`,
+ uses_versionless_api: api?.usesVersionlessApi ?? null,
+ version_id: v.id,
+ version_created_at: v.created_at ?? null,
+ openapi_schema: v._extras.dereferenced_openapi_schema,
+ example_prediction: ex ? { status: ex.status ?? null, input: ex.input ?? null, output: ex.output ?? null } : null,
+ };
+}
+
+function readIndex() {
+ try {
+ return JSON.parse(fs.readFileSync(INDEX, "utf8"));
+ } catch {
+ return { fal: [], replicate: [] };
+ }
+}
+
+async function main() {
+ const index = readIndex();
+ index.fal ??= [];
+ index.replicate ??= [];
+ for (const a of adds) {
+ const [provider, ...rest] = a.split(":");
+ const id = rest.join(":");
+ if (!["fal", "replicate"].includes(provider) || !id) throw new Error(`--add takes fal:<endpoint> or replicate:<owner>/<model>, not ${a}`);
+ if (!index[provider].includes(id)) index[provider].push(id);
+ if (only.size) only.add(id);
+ }
+ index.fal.sort();
+ index.replicate.sort();
+ const jobs = [...index.fal.map((e) => ["fal", e]), ...index.replicate.map((e) => ["replicate", e])].filter(([, e]) => !only.size || only.has(e));
+ const results = { unchanged: [], updated: [], new: [], failed: [] };
+ for (const [provider, endpoint] of jobs) {
+ try {
+ const doc = provider === "fal" ? await falSchema(endpoint) : await replicateSchema(endpoint);
+ const file = fileFor(provider, endpoint);
+ const text = `${JSON.stringify(sorted(doc), null, 2)}\n`;
+ const before = fs.existsSync(file) ? fs.readFileSync(file, "utf8") : null;
+ fs.mkdirSync(path.dirname(file), { recursive: true });
+ if (before !== text) fs.writeFileSync(file, text);
+ results[before === null ? "new" : before === text ? "unchanged" : "updated"].push(`${provider}:${endpoint}`);
+ } catch (e) {
+ results.failed.push(`${provider}:${endpoint} (${e.message})`);
+ }
+ }
+ const about = "The providers' own schemas for tests/provider-conformance.test.ts, written by scripts/refresh-provider-schemas.mjs (public GETs only).";
+ fs.writeFileSync(INDEX, `${JSON.stringify({ about, fal: index.fal, replicate: index.replicate }, null, 2)}\n`);
+ // Endpoints the untested list names that no schema is kept for (the provider can't be told from the name: --add it).
+ const listed = new Set([...index.fal, ...index.replicate]);
+ const untested = fs.existsSync(UNTESTED) ? [...fs.readFileSync(UNTESTED, "utf8").matchAll(/^\s*"([a-z0-9.\-]+\/[a-z0-9.\-/]+)",\s*$/gim)].map((m) => m[1]) : [];
+ const missing = untested.filter((e) => !listed.has(e));
+ for (const [k, list] of Object.entries(results)) if (list.length) console.log(`${k} (${list.length}):\n ${list.join("\n ")}`);
+ if (missing.length) console.log(`not kept yet (add with --add fal:<endpoint> or --add replicate:<owner>/<model>):\n ${missing.join("\n ")}`);
+ if (results.failed.length) process.exitCode = 1;
+}
+
+await main();
diff --git a/src/lib/catalog/clip-lengths.ts b/src/lib/catalog/clip-lengths.ts
index e906cf49..3ad5187e 100644
--- a/src/lib/catalog/clip-lengths.ts
+++ b/src/lib/catalog/clip-lengths.ts
@@ -17,6 +17,8 @@ export const LENGTH_RANGES: Readonly<Record<string, readonly [number, number]>>
"oss-minimax-h3": [3, 15],
// Kling 4.0 in the cloud: any whole second from 3 to 30 (fal's and Replicate's duration field).
"kling-4": [3, 30],
+ // MiniMax H3 Max Turbo on fal: duration is any number from 0.92 to 15 s (its text-to-video and image-to-video schemas).
+ "minimax-h3-max-turbo": [1, 15],
};
/** The clip lengths a studio plans with on a model: PLANNED_DURATIONS, else the catalog's own. */
diff --git a/src/lib/catalog/clip-windows.ts b/src/lib/catalog/clip-windows.ts
index ba8a6b48..13344cff 100644
--- a/src/lib/catalog/clip-windows.ts
+++ b/src/lib/catalog/clip-windows.ts
@@ -30,11 +30,27 @@ const VOICE_SECONDS: Record<string, { min: number; max: number }> = { "minimax-h
export function voiceWindowProblem(model: { id: string; name: string }, seconds: number): string | null {
const w = VOICE_SECONDS[model.id];
if (!w || !(seconds > 0)) return null;
- if (seconds < w.min - 0.05) return `${model.name} needs at least ${w.min} s of audio, and this is ${secs(seconds)}: use a longer recording`;
+ // fal: "at least 5 seconds long". No slack below: a header runs past the cut, never short of it, so 4.95-4.99 s is short.
+ if (seconds < w.min) return `${model.name} needs at least ${w.min} s of audio, and this is ${Math.floor(seconds * 100) / 100} s: use a longer recording`;
if (seconds > w.max + 0.05) return `${model.name} takes up to ${w.max / 60} minutes of audio, and this is ${minutes(seconds)}: trim it first`;
return null;
}
+/** How long each reference voice a model takes (fal's Vidu Q4 reference to video: "mp3 reference audio clips (3-12 seconds each)"). */
+const REFERENCE_VOICE_SECONDS: Record<string, { min: number; max: number }> = { "vidu-q4": { min: 3, max: 12 } };
+
+/** Whether the model holds each reference voice to a length (REFERENCE_VOICE_SECONDS): its headers are read before the run. */
+export const hasReferenceVoiceWindow = (model: { id: string }): boolean => model.id in REFERENCE_VOICE_SECONDS;
+
+/** Why reference voice `n` (1-based), `seconds` long, is outside what the model takes, in Generate's words, or null. */
+export function referenceVoiceProblem(model: { id: string; name: string }, seconds: number, n = 1): string | null {
+ const w = REFERENCE_VOICE_SECONDS[model.id];
+ if (!w || !(seconds > 0)) return null;
+ if (seconds < w.min - 0.05) return `${model.name} needs voice clips of at least ${w.min} s, and Voice ${n} is ${secs(seconds)}: use a longer one`;
+ if (seconds > w.max + 0.05) return `${model.name} takes voice clips up to ${w.max} s, and Voice ${n} is ${secs(seconds)}: trim it first`;
+ return null;
+}
+
/** The picture a talking-avatar model animates: width ÷ height (fal's H3 Max lip sync: "between 0.4 and 2.5"). */
const PORTRAIT_RATIO: Record<string, [number, number]> = { "minimax-h3-max-lipsync": [0.4, 2.5] };
@@ -94,9 +110,17 @@ const SOURCE_FRAME: Record<string, { min: number; max: number; ratio: [number, n
"kling-4": { min: 700, max: 4553, ratio: [0.4, 2.5], fps: [23.9, 60.05] },
};
+/**
+ * The shape a clip must have where only its shape is held, width ÷ height (fal's H3 Max Turbo extend, video_url: "aspect
+ * ratio between 0.4 and 2.5"), and the file size it may have (the same field: "up to 50 MB", read as 50,000,000 bytes).
+ */
+const SOURCE_RATIO: Record<string, [number, number]> = { "minimax-h3-max-turbo-extend": [0.4, 2.5] };
+const SOURCE_BYTES: Record<string, number> = { "minimax-h3-max-turbo-extend": 50_000_000 };
+
/** Why a clip `width`×`height` is outside the sides or shape the model takes, in Generate's words, or null. */
export function clipSizeProblem(model: { id: string; name: string }, width: number, height: number): string | null {
- const s = SOURCE_FRAME[model.id];
+ const shape = SOURCE_RATIO[model.id];
+ const s = SOURCE_FRAME[model.id] ?? (shape && { min: 0, max: Infinity, ratio: shape });
if (!s || !(width > 0) || !(height > 0)) return null;
if (Math.min(width, height) < s.min) return `${model.name} needs a clip at least ${s.min} px on each side, and this one is ${width}×${height}: upscale it first or pick another model`;
if (Math.max(width, height) > s.max) return `${model.name} takes clips up to ${s.max} px on a side, and this one is ${width}×${height}: scale it down first`;
@@ -115,6 +139,50 @@ export function clipFpsProblem(model: { id: string; name: string }, fps: number)
return `${model.name} takes clips at ${range}, and this one is ${Math.round(fps * 100) / 100} fps: save it at ${fps < s.fps[0] ? Math.round(s.fps[0]) : Math.round(s.fps[1])} fps first`;
}
+/** Why a clip file of `bytes` is larger than the model takes (fal's H3 Max Turbo extend: 50 MB), or null. */
+export function clipBytesProblem(model: { id: string; name: string }, bytes: number | undefined): string | null {
+ const max = SOURCE_BYTES[model.id];
+ if (max === undefined || bytes === undefined || bytes <= max) return null;
+ return `${model.name} takes clips up to ${max / 1e6} MB, and this one is ${Math.round(bytes / 1e5) / 10} MB: trim it or save it smaller first`;
+}
+
+/**
+ * Reference clips and sound a hosted route holds to a window, per kind (fal's MiniMax H3 and H3 Max Turbo reference to video,
+ * reference_video_urls and reference_audio_urls: "2-15 seconds each, combined duration at most 15 seconds"; the H3 Max Turbo
+ * extend's reference_audio_urls: "2–15 seconds each, 15 seconds combined"). A header's length can run a frame or so past the
+ * cut that made it, so a few hundredths over are let through.
+ */
+type ReferenceWindow = { min: number; max: number; total: number; kinds: readonly ("videos" | "audios")[] };
+const H3_REFERENCES: ReferenceWindow = { min: 2, max: 15, total: 15, kinds: ["videos", "audios"] };
+const REFERENCE_SECONDS: Record<string, ReferenceWindow> = {
+ "minimax-h3": H3_REFERENCES,
+ "minimax-h3-max-turbo-refs": H3_REFERENCES,
+ "minimax-h3-max-turbo-extend": { ...H3_REFERENCES, kinds: ["audios"] },
+};
+
+/** The window a model holds its reference clips and sound to, or undefined. */
+export function referenceSeconds(modelId: string): ReferenceWindow | undefined {
+ return REFERENCE_SECONDS[modelId];
+}
+
+/**
+ * Why reference clips (`kind` "videos") or sound clips ("audios") this long are outside the model's window, in Generate's
+ * words, or null. A length not known (undefined) is let through.
+ */
+export function referenceClipsProblem(model: { id: string; name: string }, kind: "videos" | "audios", seconds: readonly (number | undefined)[]): string | null {
+ const w = REFERENCE_SECONDS[model.id];
+ if (!w || !w.kinds.includes(kind)) return null;
+ const one = kind === "videos" ? "Reference clip" : "Sound clip";
+ for (const [i, s] of seconds.entries()) {
+ if (s === undefined || !(s > 0)) continue;
+ if (s < w.min - 0.05) return `${one} ${i + 1} is ${secs(s)}, and ${model.name} needs at least ${w.min} s: use a longer one`;
+ if (s > w.max + 0.05) return `${one} ${i + 1} is ${secs(s)}, and ${model.name} takes up to ${w.max} s: trim it first`;
+ }
+ const sum = seconds.reduce<number>((a, s) => a + (s ?? 0), 0);
+ if (sum > w.total + 0.05) return `${kind === "videos" ? "The reference clips" : "The sound clips"} add up to ${secs(sum)}, and ${model.name} takes ${w.total} s of them together: trim them first`;
+ return null;
+}
+
/** How long a clip given as one of the model's elements may be (Kling 4.0's video elements: 3–8 s). */
const ELEMENT_CLIP_SECONDS: Record<string, { min: number; max: number }> = { "kling-4": { min: 3, max: 8 } };
diff --git a/src/lib/catalog/models.ts b/src/lib/catalog/models.ts
index 1b69f291..1a490f0a 100644
--- a/src/lib/catalog/models.ts
+++ b/src/lib/catalog/models.ts
@@ -2872,6 +2872,12 @@ function original(spec: { id: string; open: ModelRoute[]; options: ModelOptions;
};
}
+/**
+ * Fuobe Animation's hosted gap clip (fal's Wan 2.2 A14B start/end-frame route): the cloud film's chained route takes
+ * LoRAs the way each gap's clip does, so the run keeps AniSora when it is planned and each gap sends it to `/lora`.
+ */
+const ANIMATION_GAP = ORIGINAL_HALVES.get("fuobe-animation")?.routes.find((r) => r.op === "flf2v" && r.provider === "fal");
+
/** Fuobe DoP on both engines: a start frame (and an end frame for a transition), 3 or 5 s (49 or 81 frames at 16 fps on Wan). */
const DOP_OPTIONS: ModelOptions = {
aspectRatios: ["auto", ...VID_AR],
@@ -2976,7 +2982,15 @@ const originals: ModelDef[] = [
routes: [
comfy("keyframes", "wan22-inbetween-anisora", "every gap on one set of loaders: AniSora 3.2 + lightx2v 4 steps, every Nth frame, one video"),
...(ORIGINAL_HALVES.get("fuobe-animation")?.routes ?? []),
- { op: "keyframes", provider: "fal", endpoint: "fal-ai/wan/v2.2-a14b/image-to-video", chained: true, note: "one hosted clip per gap with AniSora, joined" },
+ {
+ op: "keyframes",
+ provider: "fal",
+ endpoint: "fal-ai/wan/v2.2-a14b/image-to-video",
+ chained: true,
+ note: "one hosted clip per gap with AniSora, joined",
+ // Without a LoRA field here the planner leaves AniSora out of the film and refuses it (prepare's lost-LoRA check).
+ ...(ANIMATION_GAP?.map?.loras && { loraEndpoint: ANIMATION_GAP.loraEndpoint, map: { loras: ANIMATION_GAP.map.loras } }),
+ },
],
engineDefaults: { open: { resolution: "720p" } },
// The GPU graph needs two keyframes; in the cloud each gap's clip runs on its own (a start and an end frame).
diff --git a/src/lib/catalog/payload.ts b/src/lib/catalog/payload.ts
index 54f1f373..48f195c4 100644
--- a/src/lib/catalog/payload.ts
+++ b/src/lib/catalog/payload.ts
@@ -586,7 +586,10 @@ export function guessKind(url: string, contentType?: string, hint?: string): Med
* carries status_url and cancel_url next to the media, fal's queue receipts carry response_url.
*/
const LIFECYCLE_KEYS = new Set(["status_url", "cancel_url", "response_url", "logs_url", "webhook_url", "request_id"]);
-const SKIP_KEYS = new Set(["seed", "timings", "has_nsfw_concepts", "logs", ...LIFECYCLE_KEYS]);
+// A still the API makes beside a video (fal's Vidu Q4 cover_image) is no result of its own, and neither is the prompt it echoes
+// (fal's Wan 2.2 returns `prompt` next to the video): words that happen to be a media link are never taken for a file.
+const PROMPT_ECHOES = ["prompt", "negative_prompt", "actual_prompt", "revised_prompt", "expanded_prompt"];
+const SKIP_KEYS = new Set(["seed", "timings", "has_nsfw_concepts", "logs", "cover_image", ...PROMPT_ECHOES, ...LIFECYCLE_KEYS]);
/**
* Extract media URLs from an arbitrary provider response. Handles the common shapes:
@@ -615,7 +618,7 @@ export function extractMedia(response: unknown): { url: string; kind: MediaKind;
const obj = node as Record<string, unknown>;
if (typeof obj.url === "string" && !seen.has(obj.url)) {
seen.add(obj.url);
- const ct = typeof obj.content_type === "string" ? obj.content_type : undefined;
+ const ct = fileType(obj.content_type);
found.push({ url: obj.url, kind: guessKind(obj.url, ct, keyHint), contentType: ct });
return;
}
@@ -665,10 +668,19 @@ export function textDataUri(text: string): string {
return `data:text/plain;base64,${btoa(bin)}`;
}
+/**
+ * A result file's type as the API gives it. fal's generic "application/octet-stream" (extract-audio's documented answer for
+ * its MP3) says nothing about the file: it is left out, so the file is typed by its download or its name, not kept as .bin.
+ */
+function fileType(v: unknown): string | undefined {
+ const t = typeof v === "string" ? v.trim() : "";
+ return t && t.split(";")[0].trim().toLowerCase() !== "application/octet-stream" ? t : undefined;
+}
+
/** A file object ({url, content_type}) or a bare URL string. */
function fileOf(v: unknown): { url: string; contentType?: string } | undefined {
if (typeof v === "string" && /^(https?:|data:)/.test(v)) return { url: v };
- if (isObj(v) && typeof v.url === "string") return { url: v.url, contentType: str(v.content_type) };
+ if (isObj(v) && typeof v.url === "string") return { url: v.url, contentType: fileType(v.content_type) };
return undefined;
}
@@ -1064,6 +1076,13 @@ export function extractOutputs(response: unknown, op?: Operation): ExtractedOutp
case "face-mosaic":
out = faceMaskOutputs(response);
break;
+ case "insert-moment":
+ case "extend": {
+ // fal's H3 Max insert and Turbo extend return `source`, the clip that went in (its size, frame rate, length): never a result.
+ const r = body(response);
+ out = extractMedia(isObj(r) && "source" in r ? { ...r, source: undefined } : response);
+ break;
+ }
default:
out = extractMedia(response);
}
@@ -1075,6 +1094,10 @@ export function extractOutputs(response: unknown, op?: Operation): ExtractedOutp
if (!out.length && (op === undefined || OPERATION_OUTPUT[op] === "text") && textOf(response)?.trim()) out = transcriptOutputs(response);
const r = body(response);
if (isObj(r)) {
+ // fal's safety checker (Z-Image, FLUX and others: has_nsfw_concepts, one flag per picture in images[]) sends a flagged
+ // picture back black: it is no result. When every picture was flagged, noOutputsError says so.
+ const flagged = flaggedUrls(r);
+ if (flagged.size) out = out.filter((o) => !flagged.has(o.url));
// Recraft makes a style from reference images on the fly and returns its id: keep it to reuse the style.
const styleId = str(r.style_id);
if (styleId) out = out.map((o) => ({ ...o, meta: { ...o.meta, styleId } }));
@@ -1099,8 +1122,20 @@ export function extractOutputs(response: unknown, op?: Operation): ExtractedOutp
return out;
}
+/** The pictures a response's safety flags mark (has_nsfw_concepts[i] for images[i]): fal returns them black. */
+function flaggedUrls(r: Obj): Set<string> {
+ const flags = r.has_nsfw_concepts;
+ const images = r.images;
+ if (!Array.isArray(flags) || !Array.isArray(images) || flags.length !== images.length) return new Set();
+ return new Set(images.flatMap((im, i) => (flags[i] === true ? [fileOf(im)?.url ?? ""] : [])).filter(Boolean));
+}
+
/** The job's error when a response held no result: the model's own words when it answered in text. */
export function noOutputsError(response: unknown): string {
+ const r = body(response);
+ if (isObj(r) && Array.isArray(r.has_nsfw_concepts) && r.has_nsfw_concepts.length && r.has_nsfw_concepts.every((f) => f === true)) {
+ return "The safety checker flagged every picture, so none came back. Try different words or another picture.";
+ }
const text = textOf(response)?.trim();
if (text) return `The model replied: ${text.length > 300 ? `${text.slice(0, 300)}…` : text}`;
return `No media in response: ${JSON.stringify(response).slice(0, 300)}`;
diff --git a/src/lib/catalog/plan.ts b/src/lib/catalog/plan.ts
index 226089c4..5c391c16 100644
--- a/src/lib/catalog/plan.ts
+++ b/src/lib/catalog/plan.ts
@@ -1033,7 +1033,16 @@ export function hostedInputProblem(model: Pick<ModelDef, "name" | "routes" | "op
}
const refs = referenceProblem(model, op, req);
if (refs) return refs;
- if (op === "insert-moment") return insertRangeProblem(params.startTime, params.endTime, params.sourceDuration);
+ if (op === "insert-moment") {
+ // fal's insert-video takes a new moment of 5-13 s (duration: minimum 5, maximum 13); the composer offers only those, an API
+ // call or Assist may ask for any length.
+ const d = model.options.durations ?? [];
+ const [lo, hi] = [Math.min(...d), Math.max(...d)];
+ if (params.duration !== undefined && d.length && (params.duration < lo || params.duration > hi)) {
+ return `${model.name} makes a new moment of ${lo}–${hi} s, and this run asks for ${params.duration} s: pick a length in that range`;
+ }
+ return insertRangeProblem(params.startTime, params.endTime, params.sourceDuration);
+ }
if (op === "relight-video" && model.options.lightSphere && !req.inputs?.images?.length) return `Pick a light: ${model.name} matches the light on a sphere you choose`;
if (op === "retexture-3d" && !prompt.trim() && !req.inputs?.images?.length) return "Describe the new look, or add a style picture";
return null;
@@ -1043,11 +1052,18 @@ export function hostedInputProblem(model: Pick<ModelDef, "name" | "routes" | "op
const REFERENCE_OPS = new Set<Operation>(["ref2v", "insert-moment", "extend"]);
const plural = (n: number, [one, many]: readonly [string, string]) => `${n} ${n === 1 ? one : many}`;
+/**
+ * Endpoints whose reference sound clips work only beside a reference picture or clip in the same run (Replicate's H3 Lite and
+ * HighSpeed READMEs: "Reference audio needs to be combined with a reference image or video").
+ */
+const REFERENCE_AUDIO_NEEDS_VISUAL = new Set(["replicate:minimax/h3-lite", "replicate:minimax/h3-highspeed"]);
+
/**
* Reference lists past what the endpoint's lists take (their schema's maxItems, or the count its description gives: H3 Max insert
* 9 pictures and 3 clips, Vidu Q4 12 pictures and 3 voices), past a total across the lists (ModelOptions.maxReferences: H3 Max
- * Turbo's 12 files), or a voice in a format the endpoint doesn't read (ModelOptions.referenceAudio: Vidu Q4's mp3). Only lists a
- * route of `op` sends whole, so a start frame or an element's pictures are never counted; needs the routes' field maps.
+ * Turbo's 12 files), sound clips alone where the endpoint needs a picture or clip beside them (REFERENCE_AUDIO_NEEDS_VISUAL), or a
+ * voice in a format the endpoint doesn't read (ModelOptions.referenceAudio: Vidu Q4's mp3). Only lists a route of `op` sends whole,
+ * so a start frame or an element's pictures are never counted; needs the routes' field maps.
*/
function referenceProblem(model: Pick<ModelDef, "name" | "routes" | "options">, op: Operation, req: Pick<GenerationRequest, "inputs">): string | null {
if (!REFERENCE_OPS.has(op)) return null;
@@ -1065,6 +1081,9 @@ function referenceProblem(model: Pick<ModelDef, "name" | "routes" | "options">,
const total = counts.images + counts.videos + counts.audios;
const cap = model.options.maxReferences;
if (cap !== undefined && total > cap) return `${model.name} takes up to ${cap} references in all — pictures, clips and sound together — and this run has ${total}: remove ${total - cap}`;
+ if (counts.audios && !counts.images && !counts.videos && routes.some((r) => REFERENCE_AUDIO_NEEDS_VISUAL.has(`${r.provider}:${r.endpoint.split(":")[0]}`))) {
+ return `${model.name} uses sound clips together with a reference picture or clip: add one of those too`;
+ }
const format = model.options.referenceAudio;
if (format && counts.audios) {
const ext = (u: string) => (u.startsWith("data:") ? (/^data:audio\/(mpeg|mp3)[;,]/i.test(u) ? "mp3" : "other") : /\.([a-z0-9]{2,5})(?:[?#]|$)/i.exec(u)?.[1]?.toLowerCase());
diff --git a/tests/fal-403-reason.test.ts b/tests/fal-403-reason.test.ts
new file mode 100644
index 00000000..cd1681b6
--- /dev/null
+++ b/tests/fal-403-reason.test.ts
@@ -0,0 +1,73 @@
+import { afterAll, beforeAll, describe, expect, it } from "vitest";
+import { startFakeFal, type FakeCloud } from "./helpers/fake-cloud";
+import { tempDir } from "./helpers/temp-dir";
+
+/**
+ * fal.ai's 403 says why in `type` (Queue API reference, DetailError.type: rejected_key, permission_denied,
+ * resource_restricted; the Forbidden answer: "missing permissions, a model restriction on the key, a locked account, or a
+ * spending limit"). A key that may not run this model, or that hit a spending limit, isn't a key to replace.
+ * Stand-in fal.ai (tests/helpers/fake-cloud.ts): no real key, no paid call.
+ */
+const dir = tempDir("fuobe-fal-403-reason-");
+process.env.FUOBE_DATA_DIR = dir;
+delete process.env.FUOBE_PASSWORD;
+
+const auth = await import("@/server/auth");
+const keys = await import("@/server/account-keys");
+const { setSetting } = await import("@/server/settings");
+const { runAsTenant } = await import("@/server/tenant");
+const { falProvider } = await import("@/server/providers/fal");
+const { diagnoseKey } = await import("@/lib/diagnose");
+const { getModel } = await import("@/lib/catalog");
+
+let fal: FakeCloud;
+let A = "";
+beforeAll(async () => {
+ fal = await startFakeFal();
+ globalThis.__fuobeTestFalUrl = fal.url;
+ fal.keys["owner-good"] = "good";
+ fal.keys["acct-good"] = "good";
+ setSetting("falKey", "owner-good");
+ auth.setPassword("install password");
+ A = auth.createAccount("[email protected]", "long enough").id;
+ keys.saveAccountKey(A, "fal", "acct-good");
+});
+afterAll(async () => {
+ fal.script = null;
+ globalThis.__fuobeTestFalUrl = undefined;
+ await fal.close();
+});
+
+/** Every submit is refused with fal.ai's 403 DetailError of this `type`. */
+async function refusedSubmit(type: string, asAccount: boolean) {
+ fal.script = (r) => (r.method === "POST" ? { status: 403, body: { detail: "Forbidden", type } } : null);
+ const model = getModel("nano-banana-pro")!;
+ const route = model.routes.find((r) => r.provider === "fal" && r.op === "t2i")!;
+ const send = () => falProvider.submit({ generationId: "g", model, route, input: { prompt: "p" } as never });
+ const e = (await (asAccount ? runAsTenant({ kind: "account", id: A }, send) : send()).catch((x: unknown) => x)) as Error & { status?: number; said?: string };
+ fal.script = null;
+ return e;
+}
+
+// Skipped until the server side lands: src/server/providers/fal.ts describeError keeps a 403's type, and src/lib/diagnose.ts reads permission_denied and resource_restricted. It fails without that change.
+describe.skip("fal.ai's 403 keeps its reason", () => {
+ it("the owner's error names it", async () => {
+ const e = await refusedSubmit("permission_denied", false);
+ expect(e.message).toBe("fal 403: Forbidden (permission_denied)");
+ });
+
+ it("an account's permission_denied reads as a model its key may not run, not a key to replace", async () => {
+ const e = await refusedSubmit("permission_denied", true);
+ expect(diagnoseKey({ stage: "submit", status: e.status, text: e.said ?? e.message }, { provider: "fal" }).cause).toBe("key-permission");
+ });
+
+ it("an account's resource_restricted (a model restriction, a spending limit) too", async () => {
+ const e = await refusedSubmit("resource_restricted", true);
+ expect(diagnoseKey({ stage: "submit", status: e.status, text: e.said ?? e.message }, { provider: "fal" }).cause).toBe("key-permission");
+ });
+
+ it("rejected_key is still a key to replace", async () => {
+ const e = await refusedSubmit("rejected_key", true);
+ expect(diagnoseKey({ stage: "submit", status: e.status, text: e.said ?? e.message }, { provider: "fal" }).cause).toBe("key-rejected");
+ });
+});
diff --git a/tests/fal-error-types.test.ts b/tests/fal-error-types.test.ts
new file mode 100644
index 00000000..83c4a801
--- /dev/null
+++ b/tests/fal-error-types.test.ts
@@ -0,0 +1,72 @@
+import { afterAll, beforeAll, describe, expect, it } from "vitest";
+import { startFakeFal, type FakeCloud } from "./helpers/fake-cloud";
+import { tempDir } from "./helpers/temp-dir";
+
+/**
+ * fal.ai's errors carry a machine-readable kind, and fal.ai says to rely on it, never on the words:
+ * - Model Errors (https://fal.ai/docs/documentation/model-apis/errors): each detail[] item's `type`
+ * (content_policy_violation, image_too_large...); "Client code should not parse and rely on the msg field".
+ * - Request Error Types (https://fal.ai/docs/documentation/model-apis/request-errors): `error_type` (startup_timeout,
+ * runner_disconnected...), "Use error_type to decide whether to retry".
+ * A partner's content refusal whose words say nothing of a content checker still reads as a content flag.
+ * Stand-in fal.ai (tests/helpers/fake-cloud.ts): no real key, no paid call.
+ */
+const dir = tempDir("fuobe-fal-error-types-");
+process.env.FUOBE_DATA_DIR = dir;
+delete process.env.FUOBE_PASSWORD;
+
+const auth = await import("@/server/auth");
+const keys = await import("@/server/account-keys");
+const { setSetting } = await import("@/server/settings");
+const { runAsTenant } = await import("@/server/tenant");
+const { falProvider } = await import("@/server/providers/fal");
+const { diagnoseKey } = await import("@/lib/diagnose");
+const { getModel } = await import("@/lib/catalog");
+
+let fal: FakeCloud;
+let A = "";
+beforeAll(async () => {
+ fal = await startFakeFal();
+ globalThis.__fuobeTestFalUrl = fal.url;
+ fal.keys["owner-good"] = "good";
+ fal.keys["acct-good"] = "good";
+ setSetting("falKey", "owner-good");
+ auth.setPassword("install password");
+ A = auth.createAccount("[email protected]", "long enough").id;
+ keys.saveAccountKey(A, "fal", "acct-good");
+});
+afterAll(async () => {
+ fal.script = null;
+ globalThis.__fuobeTestFalUrl = undefined;
+ await fal.close();
+});
+
+async function refusedSubmit(status: number, body: unknown, asAccount: boolean) {
+ fal.script = (r) => (r.method === "POST" ? { status, body } : null);
+ const model = getModel("nano-banana-pro")!;
+ const route = model.routes.find((r) => r.provider === "fal" && r.op === "t2i")!;
+ const send = () => falProvider.submit({ generationId: "g", model, route, input: { prompt: "p" } as never });
+ const e = (await (asAccount ? runAsTenant({ kind: "account", id: A }, send) : send()).catch((x: unknown) => x)) as Error & { status?: number; said?: string };
+ fal.script = null;
+ return e;
+}
+
+const PARTNER_REFUSAL = { detail: [{ loc: ["body", "prompt"], msg: "Request rejected by the partner.", type: "content_policy_violation", url: "https://docs.fal.ai/errors#content_policy_violation" }] };
+
+// Skipped until the server side lands: src/server/providers/fal.ts describeError (each detail's type, a request's error_type) and src/lib/diagnose.ts (content_policy_violation). It fails without that change.
+describe.skip("fal.ai's error kinds are kept", () => {
+ it("the owner's 422 names each error's type", async () => {
+ const e = await refusedSubmit(422, PARTNER_REFUSAL, false);
+ expect(e.message).toBe("fal 422: body.prompt: Request rejected by the partner. (content_policy_violation)");
+ });
+
+ it("an account's content_policy_violation reads as a content flag, whatever its words", async () => {
+ const e = await refusedSubmit(422, PARTNER_REFUSAL, true);
+ expect(diagnoseKey({ stage: "submit", status: e.status, text: e.said ?? e.message }, { provider: "fal" }).cause).toBe("content-flag");
+ });
+
+ it("a request error keeps its error_type", async () => {
+ const e = await refusedSubmit(500, { detail: "Runner failed", error_type: "runner_server_error" }, false);
+ expect(e.message).toBe("fal 500: Runner failed (runner_server_error)");
+ });
+});
diff --git a/tests/fal-failed-job-words.test.ts b/tests/fal-failed-job-words.test.ts
new file mode 100644
index 00000000..e21f5bd3
--- /dev/null
+++ b/tests/fal-failed-job-words.test.ts
@@ -0,0 +1,99 @@
+import { afterAll, beforeAll, describe, expect, it } from "vitest";
+import { startFakeFal, type FakeCloud } from "./helpers/fake-cloud";
+import { tempDir } from "./helpers/temp-dir";
+
+/**
+ * A job fal.ai finished as failed keeps fal.ai's reason. fal.ai's status is COMPLETED for a failed job too, with only
+ * `error`, which is "Invalid status code: 422" when the model refused the input (fal.ai docs: Webhooks, Response errors).
+ * The result answers the job's own error (Queue API reference, Get result: "If the model returned an error, this operation
+ * returns the same error"): here a content_policy_violation's detail[]. A content flag must read as one.
+ * Stand-in fal.ai (tests/helpers/fake-cloud.ts): no real key, no paid call.
+ */
+const dir = tempDir("fuobe-fal-failed-job-");
+process.env.FUOBE_DATA_DIR = dir;
+delete process.env.FUOBE_PASSWORD;
+
+const auth = await import("@/server/auth");
+const keys = await import("@/server/account-keys");
+const { setSetting } = await import("@/server/settings");
+const { runAsTenant } = await import("@/server/tenant");
+const { falProvider, cloneVoice } = await import("@/server/providers/fal");
+const { diagnoseKey } = await import("@/lib/diagnose");
+const { getModel } = await import("@/lib/catalog");
+
+const FLAGGED = {
+ detail: [
+ {
+ loc: ["body", "prompt"],
+ msg: "The content could not be processed because it contained material flagged by a content checker.",
+ type: "content_policy_violation",
+ url: "https://docs.fal.ai/errors#content_policy_violation",
+ },
+ ],
+};
+
+let fal: FakeCloud;
+let A = "";
+beforeAll(async () => {
+ fal = await startFakeFal();
+ globalThis.__fuobeTestFalUrl = fal.url;
+ fal.keys["owner-good"] = "good";
+ fal.keys["acct-good"] = "good";
+ setSetting("falKey", "owner-good");
+ auth.setPassword("install password");
+ A = auth.createAccount("[email protected]", "long enough").id;
+ keys.saveAccountKey(A, "fal", "acct-good");
+});
+afterAll(async () => {
+ fal.script = null;
+ globalThis.__fuobeTestFalUrl = undefined;
+ await fal.close();
+});
+
+/** Every job fails: its status COMPLETED with fal.ai's short error, its result `result`. */
+function failingJobs(result: { status: number; body?: unknown }) {
+ fal.script = (r) => {
+ const path = r.path.split("?")[0];
+ if (r.method !== "GET" || !path.includes("/requests/")) return null;
+ if (path.endsWith("/status")) return { status: 200, body: { status: "COMPLETED", request_id: "x", logs: [], metrics: {}, error: "Invalid status code: 422" } };
+ return result;
+ };
+}
+
+async function failedRun() {
+ const model = getModel("nano-banana-pro")!;
+ const route = model.routes.find((r) => r.provider === "fal" && r.op === "t2i")!;
+ const sent = await falProvider.submit({ generationId: "g", model, route, input: { prompt: "p" } as never });
+ return falProvider.poll({ externalId: sent.externalId, meta: sent.meta!, route, model, createdAt: Date.now() });
+}
+
+// Skipped until the server side lands: src/server/providers/fal.ts poll() and cloneVoice() read a failed job's result for the model's own error. It fails without that change.
+describe.skip("a job fal.ai finished as failed keeps fal.ai's reason", () => {
+ it("the owner's run says what the model refused", async () => {
+ failingJobs({ status: 422, body: FLAGGED });
+ const r = await failedRun();
+ expect(r).toEqual({ state: "failed", error: expect.stringMatching(/^fal 422: body\.prompt: The content could not be processed because it contained material flagged/) });
+ });
+
+ it("an account's run reads as a content flag, not as a run fal.ai couldn't finish", async () => {
+ failingJobs({ status: 422, body: FLAGGED });
+ const r = await runAsTenant({ kind: "account", id: A }, failedRun);
+ expect(r.state).toBe("failed");
+ const d = diagnoseKey({ stage: "poll", failed: true, text: (r as { error: string }).error }, { provider: "fal" });
+ expect(d.cause).toBe("content-flag");
+ });
+
+ it("a result that can't be read for a passing reason keeps the status's words, and the poll still ends", async () => {
+ failingJobs({ status: 503, body: { detail: "Service unavailable" } });
+ const r = await runAsTenant({ kind: "account", id: A }, failedRun);
+ expect(r).toEqual({ state: "failed", error: "Invalid status code: 422" });
+ });
+
+ it("a voice clone step that failed keeps the model's words in its details", async () => {
+ failingJobs({ status: 422, body: FLAGGED });
+ const e = (await cloneVoice({ endpoint: "fal-ai/qwen-3-tts/clone-voice/1.7b", audio: "audio_url", output: "speaker_embedding" } as never, "https://v3b.fal.media/files/b/x/v.mp3").catch(
+ (x: unknown) => x,
+ )) as Error & { said?: string };
+ expect(e.said).toMatch(/^fal 422: body\.prompt: The content could not be processed/);
+ });
+});
diff --git a/tests/fal-nsfw-flags.test.ts b/tests/fal-nsfw-flags.test.ts
new file mode 100644
index 00000000..406c4af4
--- /dev/null
+++ b/tests/fal-nsfw-flags.test.ts
@@ -0,0 +1,28 @@
+import { describe, expect, it } from "vitest";
+import { extractOutputs, noOutputsError } from "@/lib/catalog/payload";
+
+/**
+ * fal.ai's safety checker on Z-Image Turbo (and FLUX, others): "images flagged as unsafe are returned as black images"
+ * (fal-ai/z-image/turbo OpenAPI, enable_safety_checker; ZImageTurboOutput.has_nsfw_concepts: "Whether the generated images
+ * contain NSFW concepts", one flag per images[i]). A flagged picture is no result.
+ * Source: https://fal.ai/api/openapi/queue/openapi.json?endpoint_id=fal-ai/z-image/turbo (fetched 2026-11-06).
+ */
+const img = (n: number) => ({ url: `https://v3b.fal.media/files/b/x/${n}.png`, content_type: "image/png", width: 896, height: 1152 });
+
+describe("fal.ai's has_nsfw_concepts", () => {
+ it("a flagged (black) picture is left out; the others are kept", () => {
+ const out = extractOutputs({ images: [img(1), img(2)], has_nsfw_concepts: [true, false], seed: 7, timings: {}, prompt: "p" }, "t2i");
+ expect(out.map((o) => o.url)).toEqual([img(2).url]);
+ });
+
+ it("every picture flagged: no result, and the error says the safety check stopped it", () => {
+ const r = { images: [img(1)], has_nsfw_concepts: [true], seed: 7, timings: {}, prompt: "p" };
+ expect(extractOutputs(r, "t2i")).toEqual([]);
+ expect(noOutputsError(r)).toMatch(/safety checker flagged/i);
+ });
+
+ it("no flags set: every picture is kept (the control route's normal answer)", () => {
+ const out = extractOutputs({ images: [img(1), img(2)], has_nsfw_concepts: [false, false], seed: 7, timings: {}, prompt: "p" }, "t2i");
+ expect(out).toHaveLength(2);
+ });
+});
diff --git a/tests/fal-octet-stream-result.test.ts b/tests/fal-octet-stream-result.test.ts
new file mode 100644
index 00000000..4e0b8978
--- /dev/null
+++ b/tests/fal-octet-stream-result.test.ts
@@ -0,0 +1,108 @@
+import http from "node:http";
+import { afterAll, beforeAll, describe, expect, it } from "vitest";
+import { startFakeFal, type FakeCloud } from "./helpers/fake-cloud";
+import { tempDir } from "./helpers/temp-dir";
+
+/**
+ * A result file fal.ai types as "application/octet-stream" is typed by its download or its name. fal's extract-audio
+ * documents its answer that way (its OpenAPI output example: {"audio": {"url": "…_extracted.mp3", "content_type":
+ * "application/octet-stream", "file_name": "extracted.mp3"}}), and Clean dialogue on a video with DeepFilterNet 3 chains that
+ * soundtrack into the denoiser as audio. Kept as the type fal gave, it was stored as a .bin picture and the denoiser's
+ * step failed with "An earlier step has no audio to use", after the extract was paid for. Stand-in fal.ai: no paid call.
+ */
+const dir = tempDir("fuobe-fal-octet-");
+process.env.FUOBE_DATA_DIR = dir;
+delete process.env.FUOBE_PASSWORD;
+globalThis.__fuobeTestDiskFree = 1e13;
+
+const { extractMedia, extractOutputs } = await import("@/lib/catalog/payload");
+const { setSetting } = await import("@/server/settings");
+const { saveFile } = await import("@/server/storage");
+const gens = await import("@/server/generations");
+const route = await import("@/app/api/audio-tools/route");
+
+const DOCUMENTED = {
+ audio: { url: "https://v3b.fal.media/files/b/elephant/Ttx6ckshlpIFIDsP1_8YH_extracted.mp3", file_size: 123256, content_type: "application/octet-stream", file_name: "extracted.mp3" },
+};
+
+describe("fal's application/octet-stream on a result file", () => {
+ it("is left out, so the file's own type is used; the kind comes from the field and the name", () => {
+ const [stem] = extractOutputs(DOCUMENTED, "separate-audio");
+ expect(stem).toMatchObject({ url: DOCUMENTED.audio.url, kind: "audio", meta: { stem: "audio" } });
+ expect(stem.contentType).toBeUndefined();
+ const [media] = extractMedia(DOCUMENTED);
+ expect(media).toMatchObject({ url: DOCUMENTED.audio.url, kind: "audio" });
+ expect(media.contentType).toBeUndefined();
+ // A real type is kept as given.
+ expect(extractMedia({ audio: { url: "https://v3b.fal.media/files/b/x/a", content_type: "audio/flac" } })[0].contentType).toBe("audio/flac");
+ });
+});
+
+describe("Clean dialogue on a video with DeepFilterNet 3 (extract-audio's documented answer)", () => {
+ let fal: FakeCloud;
+ let files: http.Server;
+ let base = "";
+ const at = new Map<string, string>();
+ let n = 0;
+ const RESULTS: Record<string, () => unknown> = {
+ "fal-ai/workflow-utilities/extract-audio": () => ({ audio: { url: `${base}/Ttx6_extracted.mp3`, file_size: 4, content_type: "application/octet-stream", file_name: "extracted.mp3" } }),
+ "fal-ai/deepfilternet3": () => ({ audio_file: { url: `${base}/clean.flac`, content_type: "audio/flac", file_name: "clean.flac" }, timings: { preprocess: 0, inference: 0, postprocess: 0 } }),
+ "fal-ai/ffmpeg-api/merge-audio-video": () => ({ video: { url: `${base}/merged.mp4`, content_type: "video/mp4", file_name: "merged.mp4" } }),
+ };
+ beforeAll(async () => {
+ // fal's CDN: every file as application/octet-stream, the worst case.
+ files = http.createServer((_q, s) => {
+ s.writeHead(200, { "Content-Type": "application/octet-stream" });
+ s.end(Buffer.from("FAKE"));
+ });
+ await new Promise<void>((r) => files.listen(0, "127.0.0.1", r));
+ base = `http://127.0.0.1:${(files.address() as { port: number }).port}`;
+ fal = await startFakeFal();
+ fal.pollsToFinish = 0;
+ globalThis.__fuobeTestFalUrl = fal.url;
+ fal.keys["owner-fal"] = "good";
+ setSetting("falKey", "owner-fal");
+ fal.script = (r) => {
+ const p = r.path.split("?")[0];
+ if (r.method === "POST" && RESULTS[p.slice(1)]) {
+ const id = `octet-${++n}`;
+ at.set(id, p.slice(1));
+ const app = p.slice(1).split("/").slice(0, 2).join("/");
+ const u = `${fal.url}/${app}/requests/${id}`;
+ return { status: 200, body: { request_id: id, status_url: `${u}/status`, response_url: u, cancel_url: `${u}/cancel` } };
+ }
+ const m = /\/requests\/([^/]+)$/.exec(p);
+ if (r.method === "GET" && m && at.has(m[1])) return { status: 200, body: RESULTS[at.get(m[1])!]() };
+ return null;
+ };
+ });
+ afterAll(async () => {
+ globalThis.__fuobeTestFalUrl = undefined;
+ globalThis.__fuobeTestDiskFree = undefined;
+ await fal.close();
+ await new Promise<void>((r) => files.close(() => r()));
+ });
+
+ it("keeps the soundtrack as audio, so the denoiser and the merge run", async () => {
+ const media = saveFile({ data: Buffer.from("not a real mp4"), contentType: "video/mp4", name: "vlog.mp4", source: "upload" }).url;
+ const res = await route.POST(new Request("http://x/api/audio-tools", { method: "POST", headers: { "Content-Type": "application/json" }, body: JSON.stringify({ tool: "clean-dialogue", engine: "cloud", cleaner: "deepfilternet", media, kind: "video" }) }));
+ expect(res.status, await res.clone().text()).toBe(201);
+ const run = (await res.json()) as { items: { id: string }[] };
+ const end = Date.now() + 30_000;
+ let all = run.items.map((g) => gens.getGeneration(g.id)!);
+ while (!all.every((g) => ["succeeded", "failed", "canceled"].includes(g.status)) && Date.now() < end) {
+ await new Promise((r) => setTimeout(r, 150));
+ all = run.items.map((g) => gens.getGeneration(g.id)!);
+ }
+ expect(all.map((g) => [g.modelId, g.status, g.error ?? null])).toEqual([
+ ["extract-soundtrack", "succeeded", null],
+ ["deepfilternet3", "succeeded", null],
+ ["merge-audio-video", "succeeded", null],
+ ]);
+ expect(all[0].outputs[0]).toMatchObject({ kind: "audio", contentType: "audio/mpeg" });
+ const sent = fal.log.filter((r) => r.method === "POST" && r.path === "/fal-ai/deepfilternet3").map((r) => JSON.parse(r.body));
+ expect(sent).toHaveLength(1);
+ expect(sent[0]).toMatchObject({ audio_format: "flac" });
+ expect(typeof sent[0].audio_url).toBe("string");
+ }, 60_000);
+});
diff --git a/tests/fixtures/provider-schemas/fal/bria__guided-remove-background.json b/tests/fixtures/provider-schemas/fal/bria__guided-remove-background.json
new file mode 100644
index 00000000..294162f3
--- /dev/null
+++ b/tests/fixtures/provider-schemas/fal/bria__guided-remove-background.json
@@ -0,0 +1,371 @@
+{
+ "components": {
+ "schemas": {
+ "GuidedRemoveBackgroundInput": {
+ "properties": {
+ "autocrop": {
+ "default": false,
+ "description": "Tighten the output canvas to the kept content.",
+ "title": "Autocrop",
+ "type": "boolean"
+ },
+ "image_url": {
+ "default": "https://labs-assets.bria.ai/api-examples/guided-remove-background/yoga_studio_input.jpg",
+ "description": "Source image as a public URL, a base64 data URI (data:image/png;base64,...) or raw base64-encoded image bytes.",
+ "examples": [
+ "https://labs-assets.bria.ai/api-examples/guided-remove-background/yoga_studio_input.jpg"
+ ],
+ "title": "Image Url",
+ "type": "string"
+ },
+ "prompt": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "Optional. Plain words for how to change the default cutout of the photo's obvious subject: add something ('the person with the mat and the plant'), drop something ('the woman at her desk without the lamp') or narrow it ('only the chair'). Everything kept is the original pixels with a new alpha channel. Leave it empty for the plain cutout of the obvious subject.",
+ "examples": [
+ "the person with the mat and the plant"
+ ],
+ "title": "Prompt"
+ },
+ "sync_mode": {
+ "default": false,
+ "description": "\n If true, the function waits for the image to be generated and uploaded\n before returning, so the image is returned directly (base64) instead of\n via the CDN. Increases latency.\n ",
+ "title": "Sync Mode",
+ "type": "boolean"
+ }
+ },
+ "title": "GuidedRemoveBackgroundInput",
+ "type": "object",
+ "x-fal-order-properties": [
+ "image_url",
+ "prompt",
+ "autocrop",
+ "sync_mode"
+ ]
+ },
+ "GuidedRemoveBackgroundOutput": {
+ "properties": {
+ "image": {
+ "$ref": "#/components/schemas/Image",
+ "description": "The original photo with a new alpha channel: the obvious subject, adjusted by the prompt (RGBA PNG)."
+ }
+ },
+ "required": [
+ "image"
+ ],
+ "title": "GuidedRemoveBackgroundOutput",
+ "type": "object",
+ "x-fal-order-properties": [
+ "image"
+ ]
+ },
+ "Image": {
+ "description": "Represents an image file.",
+ "properties": {
+ "content_type": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "The mime type of the file.",
+ "examples": [
+ "image/png"
+ ],
+ "title": "Content Type"
+ },
+ "file_name": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "The name of the file. It will be auto-generated if not provided.",
+ "examples": [
+ "z9RV14K95DvU.png"
+ ],
+ "title": "File Name"
+ },
+ "file_size": {
+ "anyOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "The size of the file in bytes.",
+ "examples": [
+ 4404019
+ ],
+ "title": "File Size"
+ },
+ "height": {
+ "anyOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "The height of the image in pixels.",
+ "examples": [
+ 1024
+ ],
+ "title": "Height"
+ },
+ "url": {
+ "description": "The URL where the file can be downloaded from.",
+ "title": "Url",
+ "type": "string"
+ },
+ "width": {
+ "anyOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "The width of the image in pixels.",
+ "examples": [
+ 1024
+ ],
+ "title": "Width"
+ }
+ },
+ "required": [
+ "url"
+ ],
+ "title": "Image",
+ "type": "object",
+ "x-fal-order-properties": [
+ "url",
+ "content_type",
+ "file_name",
+ "file_size",
+ "width",
+ "height"
+ ]
+ },
+ "QueueStatus": {
+ "properties": {
+ "cancel_url": {
+ "description": "The cancel url.",
+ "type": "string"
+ },
+ "logs": {
+ "additionalProperties": true,
+ "description": "The logs.",
+ "type": "object"
+ },
+ "metrics": {
+ "additionalProperties": true,
+ "description": "The metrics.",
+ "type": "object"
+ },
+ "queue_position": {
+ "description": "The queue position.",
+ "type": "integer"
+ },
+ "request_id": {
+ "description": "The request id.",
+ "type": "string"
+ },
+ "response_url": {
+ "description": "The response url.",
+ "type": "string"
+ },
+ "status": {
+ "enum": [
+ "IN_QUEUE",
+ "IN_PROGRESS",
+ "COMPLETED"
+ ],
+ "type": "string"
+ },
+ "status_url": {
+ "description": "The status url.",
+ "type": "string"
+ }
+ },
+ "required": [
+ "status",
+ "request_id"
+ ],
+ "type": "object"
+ }
+ },
+ "securitySchemes": {
+ "apiKeyAuth": {
+ "description": "Fal Key",
+ "in": "header",
+ "name": "Authorization",
+ "type": "apiKey"
+ }
+ }
+ },
+ "info": {
+ "description": "The OpenAPI schema for the bria/guided-remove-background queue.",
+ "title": "Queue OpenAPI for bria/guided-remove-background",
+ "version": "1.0.0",
+ "x-fal-metadata": {
+ "about": "Guided Remove Background",
+ "category": "image-to-image",
+ "documentationUrl": "https://fal.ai/models/bria/guided-remove-background/api",
+ "endpointId": "bria/guided-remove-background",
+ "playgroundUrl": "https://fal.ai/models/bria/guided-remove-background",
+ "thumbnailUrl": "https://v3b.fal.media/files/b/0aadc4dc/D9ulN3wgO07-NaBAQb9zk.jpg"
+ }
+ },
+ "openapi": "3.1.0",
+ "paths": {
+ "/bria/guided-remove-background": {
+ "post": {
+ "requestBody": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/GuidedRemoveBackgroundInput"
+ }
+ }
+ },
+ "required": true
+ },
+ "responses": {
+ "200": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/QueueStatus"
+ }
+ }
+ },
+ "description": "The request status."
+ }
+ }
+ }
+ },
+ "/bria/guided-remove-background/requests/{request_id}": {
+ "get": {
+ "parameters": [
+ {
+ "in": "path",
+ "name": "request_id",
+ "required": true,
+ "schema": {
+ "description": "Request ID",
+ "type": "string"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/GuidedRemoveBackgroundOutput"
+ }
+ }
+ },
+ "description": "Result of the request."
+ }
+ }
+ }
+ },
+ "/bria/guided-remove-background/requests/{request_id}/cancel": {
+ "put": {
+ "parameters": [
+ {
+ "in": "path",
+ "name": "request_id",
+ "required": true,
+ "schema": {
+ "description": "Request ID",
+ "type": "string"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "properties": {
+ "success": {
+ "description": "Whether the request was cancelled successfully.",
+ "type": "boolean"
+ }
+ },
+ "type": "object"
+ }
+ }
+ },
+ "description": "The request was cancelled."
+ }
+ }
+ }
+ },
+ "/bria/guided-remove-background/requests/{request_id}/status": {
+ "get": {
+ "parameters": [
+ {
+ "in": "path",
+ "name": "request_id",
+ "required": true,
+ "schema": {
+ "description": "Request ID",
+ "type": "string"
+ }
+ },
+ {
+ "in": "query",
+ "name": "logs",
+ "required": false,
+ "schema": {
+ "description": "Whether to include logs (`1`) in the response or not (`0`).",
+ "type": "number"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/QueueStatus"
+ }
+ }
+ },
+ "description": "The request status."
+ }
+ }
+ }
+ }
+ },
+ "security": [
+ {
+ "apiKeyAuth": []
+ }
+ ],
+ "servers": [
+ {
+ "url": "https://queue.fal.run"
+ }
+ ]
+}
diff --git a/tests/fixtures/provider-schemas/fal/bria__video__background-removal__green-screen-despill.json b/tests/fixtures/provider-schemas/fal/bria__video__background-removal__green-screen-despill.json
new file mode 100644
index 00000000..32dffadf
--- /dev/null
+++ b/tests/fixtures/provider-schemas/fal/bria__video__background-removal__green-screen-despill.json
@@ -0,0 +1,372 @@
+{
+ "components": {
+ "schemas": {
+ "QueueStatus": {
+ "properties": {
+ "cancel_url": {
+ "description": "The cancel url.",
+ "type": "string"
+ },
+ "logs": {
+ "additionalProperties": true,
+ "description": "The logs.",
+ "type": "object"
+ },
+ "metrics": {
+ "additionalProperties": true,
+ "description": "The metrics.",
+ "type": "object"
+ },
+ "queue_position": {
+ "description": "The queue position.",
+ "type": "integer"
+ },
+ "request_id": {
+ "description": "The request id.",
+ "type": "string"
+ },
+ "response_url": {
+ "description": "The response url.",
+ "type": "string"
+ },
+ "status": {
+ "enum": [
+ "IN_QUEUE",
+ "IN_PROGRESS",
+ "COMPLETED"
+ ],
+ "type": "string"
+ },
+ "status_url": {
+ "description": "The status url.",
+ "type": "string"
+ }
+ },
+ "required": [
+ "status",
+ "request_id"
+ ],
+ "type": "object"
+ },
+ "Video": {
+ "properties": {
+ "content_type": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "The mime type of the file.",
+ "examples": [
+ "image/png"
+ ],
+ "title": "Content Type"
+ },
+ "file_name": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "The name of the file. It will be auto-generated if not provided.",
+ "examples": [
+ "z9RV14K95DvU.png"
+ ],
+ "title": "File Name"
+ },
+ "file_size": {
+ "anyOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "The size of the file in bytes.",
+ "examples": [
+ 4404019
+ ],
+ "title": "File Size"
+ },
+ "url": {
+ "description": "The URL where the file can be downloaded from.",
+ "title": "Url",
+ "type": "string"
+ }
+ },
+ "required": [
+ "url"
+ ],
+ "title": "Video",
+ "type": "object",
+ "x-fal-order-properties": [
+ "url",
+ "content_type",
+ "file_name",
+ "file_size"
+ ]
+ },
+ "VideoBackgroundRemovalGreenScreenDespillInput": {
+ "properties": {
+ "output_container_and_codec": {
+ "default": "webm_vp9",
+ "description": "Output container and codec. Options: mp4_h265, mp4_h264, webm_vp9, mov_h265, mov_proresks, mkv_h265, mkv_h264, mkv_vp9, gif.",
+ "enum": [
+ "mp4_h265",
+ "mp4_h264",
+ "webm_vp9",
+ "mov_h265",
+ "mov_proresks",
+ "mkv_h265",
+ "mkv_h264",
+ "mkv_vp9",
+ "gif"
+ ],
+ "title": "Output Container And Codec",
+ "type": "string"
+ },
+ "preserve_audio": {
+ "default": true,
+ "description": "If true, audio will be preserved in the output video.",
+ "title": "Preserve Audio",
+ "type": "boolean"
+ },
+ "spill_suppression": {
+ "default": 1,
+ "description": "Strength of green-spill suppression. Higher values pull the green channel toward the red/blue average on green-dominant pixels, removing the green fringe around the subject. 0 disables it.",
+ "maximum": 1,
+ "minimum": 0,
+ "title": "Spill Suppression",
+ "type": "number"
+ },
+ "video_url": {
+ "description": "Input video filmed on a green screen.",
+ "examples": [
+ "https://bria-datasets.s3.us-east-1.amazonaws.com/rmbg_tests/videos/green_screen_video.webm"
+ ],
+ "title": "Video Url",
+ "type": "string"
+ }
+ },
+ "required": [
+ "video_url"
+ ],
+ "title": "InputGreenScreenModel",
+ "type": "object",
+ "x-fal-order-properties": [
+ "output_container_and_codec",
+ "preserve_audio",
+ "video_url",
+ "spill_suppression"
+ ]
+ },
+ "VideoBackgroundRemovalGreenScreenDespillOutput": {
+ "properties": {
+ "request_id": {
+ "description": "Bria request ID.",
+ "title": "Request Id",
+ "type": "string"
+ },
+ "video": {
+ "$ref": "#/components/schemas/Video",
+ "description": "Video with the green-screen background removed, on a transparent background.",
+ "examples": [
+ {
+ "content_type": "video/webm",
+ "file_name": "green_screen_video_output.webm",
+ "file_size": 2884142,
+ "url": "https://bria-datasets.s3.us-east-1.amazonaws.com/rmbg_tests/videos/green_screen_video_output.webm"
+ }
+ ]
+ },
+ "warning": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "Set when the request was served with an adjusted parameter, e.g. a transparent background falling back to black on a codec that cannot carry alpha.",
+ "title": "Warning"
+ }
+ },
+ "required": [
+ "video",
+ "request_id"
+ ],
+ "title": "OutputGreenScreenModel",
+ "type": "object",
+ "x-fal-order-properties": [
+ "video",
+ "request_id",
+ "warning"
+ ]
+ }
+ },
+ "securitySchemes": {
+ "apiKeyAuth": {
+ "description": "Fal Key",
+ "in": "header",
+ "name": "Authorization",
+ "type": "apiKey"
+ }
+ }
+ },
+ "info": {
+ "description": "The OpenAPI schema for the bria/video/background-removal/green-screen-despill queue.",
+ "title": "Queue OpenAPI for bria/video/background-removal/green-screen-despill",
+ "version": "1.0.0",
+ "x-fal-metadata": {
+ "about": "Green Screen",
+ "category": "video-to-video",
+ "documentationUrl": "https://fal.ai/models/bria/video/background-removal/green-screen-despill/api",
+ "endpointId": "bria/video/background-removal/green-screen-despill",
+ "playgroundUrl": "https://fal.ai/models/bria/video/background-removal/green-screen-despill",
+ "thumbnailUrl": "https://v3b.fal.media/files/b/0aa801c6/u_DXz91DFUNXwRfOfy4YR.jpg"
+ }
+ },
+ "openapi": "3.1.0",
+ "paths": {
+ "/bria/video/background-removal/green-screen-despill": {
+ "post": {
+ "requestBody": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/VideoBackgroundRemovalGreenScreenDespillInput"
+ }
+ }
+ },
+ "required": true
+ },
+ "responses": {
+ "200": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/QueueStatus"
+ }
+ }
+ },
+ "description": "The request status."
+ }
+ }
+ }
+ },
+ "/bria/video/background-removal/green-screen-despill/requests/{request_id}": {
+ "get": {
+ "parameters": [
+ {
+ "in": "path",
+ "name": "request_id",
+ "required": true,
+ "schema": {
+ "description": "Request ID",
+ "type": "string"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/VideoBackgroundRemovalGreenScreenDespillOutput"
+ }
+ }
+ },
+ "description": "Result of the request."
+ }
+ }
+ }
+ },
+ "/bria/video/background-removal/green-screen-despill/requests/{request_id}/cancel": {
+ "put": {
+ "parameters": [
+ {
+ "in": "path",
+ "name": "request_id",
+ "required": true,
+ "schema": {
+ "description": "Request ID",
+ "type": "string"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "properties": {
+ "success": {
+ "description": "Whether the request was cancelled successfully.",
+ "type": "boolean"
+ }
+ },
+ "type": "object"
+ }
+ }
+ },
+ "description": "The request was cancelled."
+ }
+ }
+ }
+ },
+ "/bria/video/background-removal/green-screen-despill/requests/{request_id}/status": {
+ "get": {
+ "parameters": [
+ {
+ "in": "path",
+ "name": "request_id",
+ "required": true,
+ "schema": {
+ "description": "Request ID",
+ "type": "string"
+ }
+ },
+ {
+ "in": "query",
+ "name": "logs",
+ "required": false,
+ "schema": {
+ "description": "Whether to include logs (`1`) in the response or not (`0`).",
+ "type": "number"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/QueueStatus"
+ }
+ }
+ },
+ "description": "The request status."
+ }
+ }
+ }
+ }
+ },
+ "security": [
+ {
+ "apiKeyAuth": []
+ }
+ ],
+ "servers": [
+ {
+ "url": "https://queue.fal.run"
+ }
+ ]
+}
diff --git a/tests/fixtures/provider-schemas/fal/elevenlabs__music__v2.5.json b/tests/fixtures/provider-schemas/fal/elevenlabs__music__v2.5.json
new file mode 100644
index 00000000..fba7df07
--- /dev/null
+++ b/tests/fixtures/provider-schemas/fal/elevenlabs__music__v2.5.json
@@ -0,0 +1,581 @@
+{
+ "components": {
+ "schemas": {
+ "File": {
+ "properties": {
+ "content_type": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "The mime type of the file.",
+ "examples": [
+ "image/png"
+ ],
+ "title": "Content Type"
+ },
+ "file_name": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "The name of the file. It will be auto-generated if not provided.",
+ "examples": [
+ "z9RV14K95DvU.png"
+ ],
+ "title": "File Name"
+ },
+ "file_size": {
+ "anyOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "The size of the file in bytes.",
+ "examples": [
+ 4404019
+ ],
+ "title": "File Size"
+ },
+ "url": {
+ "description": "The URL where the file can be downloaded from.",
+ "title": "Url",
+ "type": "string"
+ }
+ },
+ "required": [
+ "url"
+ ],
+ "title": "File",
+ "type": "object",
+ "x-fal-order-properties": [
+ "url",
+ "content_type",
+ "file_name",
+ "file_size"
+ ]
+ },
+ "MusicAudioReference": {
+ "description": "An audio clip whose style conditions a ``music_v2`` / ``music_v2.5`` chunk.\n\nElevenLabs conditions on a *song id*, which only exists after the clip has\nbeen uploaded to them, so the app uploads on the caller's behalf and caches\nthe resulting id (see ``ElevenLabsTTS._resolve_audio_reference``).",
+ "properties": {
+ "audio_url": {
+ "description": "URL of the audio clip to use as the style reference.",
+ "examples": [
+ "https://storage.googleapis.com/falserverless/example_outputs/elevenlabs/music_generated.mp3"
+ ],
+ "title": "Audio Url",
+ "type": "string"
+ },
+ "end_ms": {
+ "anyOf": [
+ {
+ "exclusiveMinimum": 0,
+ "type": "integer"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "Offset into the clip where the referenced window ends, in milliseconds. Defaults to 30000ms after start_ms, or the end of the clip if it is shorter. The window must be at most 30000ms long.",
+ "title": "End Ms"
+ },
+ "start_ms": {
+ "default": 0,
+ "description": "Offset into the clip where the referenced window starts, in milliseconds.",
+ "minimum": 0,
+ "title": "Start Ms",
+ "type": "integer"
+ },
+ "strength": {
+ "anyOf": [
+ {
+ "enum": [
+ "low",
+ "medium",
+ "high",
+ "xhigh"
+ ],
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "How strongly the model follows the reference. Low lets it deviate and be more creative, high keeps it close to the reference.",
+ "title": "Strength"
+ }
+ },
+ "required": [
+ "audio_url"
+ ],
+ "title": "MusicAudioReference",
+ "type": "object",
+ "x-fal-order-properties": [
+ "audio_url",
+ "start_ms",
+ "end_ms",
+ "strength"
+ ]
+ },
+ "MusicGenerationChunk": {
+ "description": "One generation chunk of a ``music_v2`` / ``music_v2.5`` composition plan.\n\nThe v2 models replaced v1's ``sections`` (``MusicPrompt``) with ``chunks``\n(``CompositionPlan``); the two shapes are not interchangeable -- sending a\nv1 section plan to a v2 model (or vice versa) is rejected by ElevenLabs.",
+ "properties": {
+ "audio_reference": {
+ "anyOf": [
+ {
+ "$ref": "#/components/schemas/MusicAudioReference"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "An audio clip whose style conditions this chunk. The reference on the first chunk matters most: it influences every later chunk, so condition from the first chunk to style the whole song."
+ },
+ "context_adherence": {
+ "anyOf": [
+ {
+ "enum": [
+ "low",
+ "medium",
+ "high"
+ ],
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "How closely this chunk follows the context of its surrounding chunks. Low adherence lets the model deviate and be more creative, high adherence keeps it consistent with the surrounding context.",
+ "title": "Context Adherence"
+ },
+ "duration_ms": {
+ "description": "The duration of the chunk in milliseconds. Must be between 3000ms and 120000ms.",
+ "maximum": 120000,
+ "minimum": 3000,
+ "title": "Duration Ms",
+ "type": "integer"
+ },
+ "negative_styles": {
+ "anyOf": [
+ {
+ "items": {
+ "type": "string"
+ },
+ "type": "array"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "The styles and musical directions that should not be present in this chunk. Leaving this empty is a good default; only set it to explicitly avoid a particular style or direction.",
+ "title": "Negative Styles"
+ },
+ "positive_styles": {
+ "description": "The styles and musical directions that should be present in this chunk. Use English for best results. The styles of the first chunk matter most as they set the overall tone and genre; later chunks can add nuance, progression or change direction.",
+ "examples": [
+ [
+ "synthwave",
+ "analog drum machine",
+ "great production quality"
+ ]
+ ],
+ "items": {
+ "type": "string"
+ },
+ "title": "Positive Styles",
+ "type": "array"
+ },
+ "text": {
+ "description": "The text to generate for this chunk. Can start with an optional section name in square brackets, e.g. [Verse 1], followed by lyric lines, plus inline directions in curly braces, e.g. {scratching}. Section names must be between 1 and 100 characters. At most 30 lines are allowed, each at most 200 characters.",
+ "examples": [
+ "[Verse 1]\nNeon rain on empty streets\nI keep walking to the beat"
+ ],
+ "title": "Text",
+ "type": "string"
+ }
+ },
+ "required": [
+ "text",
+ "duration_ms",
+ "positive_styles"
+ ],
+ "title": "MusicGenerationChunk",
+ "type": "object",
+ "x-fal-order-properties": [
+ "text",
+ "duration_ms",
+ "positive_styles",
+ "negative_styles",
+ "context_adherence",
+ "audio_reference"
+ ]
+ },
+ "MusicV25Input": {
+ "description": "Request format for the ElevenLabs Music v2 / v2.5 API.",
+ "properties": {
+ "composition_plan": {
+ "anyOf": [
+ {
+ "$ref": "#/components/schemas/MusicV2CompositionPlan"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "The chunk-based composition plan for the music"
+ },
+ "force_instrumental": {
+ "default": false,
+ "description": "If true, guarantees that the generated song will be instrumental. If false, the song may or may not be instrumental depending on the prompt. Can only be used with prompt.",
+ "title": "Force Instrumental",
+ "type": "boolean"
+ },
+ "music_length_ms": {
+ "anyOf": [
+ {
+ "maximum": 600000,
+ "minimum": 3000,
+ "type": "integer"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "The length of the song to generate in milliseconds. Used only in conjunction with prompt. Must be between 3000ms and 600000ms. Optional - if not provided, the model will choose a length based on the prompt.",
+ "title": "Music Length Ms"
+ },
+ "output_format": {
+ "default": "mp3_48000_192",
+ "description": "Output format of the generated audio. Formatted as codec_sample_rate_bitrate. So an mp3 with 22.05kHz sample rate at 32kbs is represented as mp3_22050_32. Note that the μ-law format (sometimes written mu-law, often approximated as u-law) is commonly used for Twilio audio inputs.",
+ "enum": [
+ "mp3_22050_32",
+ "mp3_24000_48",
+ "mp3_44100_32",
+ "mp3_44100_64",
+ "mp3_44100_96",
+ "mp3_44100_128",
+ "mp3_44100_192",
+ "mp3_48000_128",
+ "mp3_48000_192",
+ "mp3_48000_240",
+ "mp3_48000_320",
+ "pcm_8000",
+ "pcm_16000",
+ "pcm_22050",
+ "pcm_24000",
+ "pcm_32000",
+ "pcm_44100",
+ "pcm_48000",
+ "ulaw_8000",
+ "alaw_8000",
+ "opus_48000_32",
+ "opus_48000_64",
+ "opus_48000_96",
+ "opus_48000_128",
+ "opus_48000_192"
+ ],
+ "title": "Output Format",
+ "type": "string"
+ },
+ "prompt": {
+ "anyOf": [
+ {
+ "maxLength": 4100,
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "The text prompt describing the music to generate",
+ "examples": [
+ "Mysterious original soundtrack, themes of jungle, rainforest, nature, woodwinds, busy rhythmic tribal percussion."
+ ],
+ "title": "Prompt"
+ },
+ "seed": {
+ "anyOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "Random seed to initialize the music generation process. Can only be used with composition_plan. The same seed with the same parameters gives more consistent results, but exact reproducibility is not guaranteed.",
+ "title": "Seed"
+ }
+ },
+ "title": "MusicV2Request",
+ "type": "object",
+ "x-fal-order-properties": [
+ "prompt",
+ "composition_plan",
+ "music_length_ms",
+ "force_instrumental",
+ "seed",
+ "output_format"
+ ]
+ },
+ "MusicV25Output": {
+ "properties": {
+ "audio": {
+ "$ref": "#/components/schemas/File",
+ "description": "The generated music audio file in MP3 format",
+ "examples": [
+ {
+ "content_type": "audio/mpeg",
+ "file_name": "music_generated.mp3",
+ "url": "https://storage.googleapis.com/falserverless/example_outputs/elevenlabs/music_generated.mp3"
+ }
+ ]
+ }
+ },
+ "required": [
+ "audio"
+ ],
+ "title": "MusicOutput",
+ "type": "object",
+ "x-fal-order-properties": [
+ "audio"
+ ]
+ },
+ "MusicV2CompositionPlan": {
+ "properties": {
+ "chunks": {
+ "description": "The chunks that make up the generation, in order. At most 30 chunks, totalling between 3000ms and 600000ms.",
+ "items": {
+ "$ref": "#/components/schemas/MusicGenerationChunk"
+ },
+ "maxItems": 30,
+ "minItems": 1,
+ "title": "Chunks",
+ "type": "array"
+ }
+ },
+ "required": [
+ "chunks"
+ ],
+ "title": "MusicV2CompositionPlan",
+ "type": "object",
+ "x-fal-order-properties": [
+ "chunks"
+ ]
+ },
+ "QueueStatus": {
+ "properties": {
+ "cancel_url": {
+ "description": "The cancel url.",
+ "type": "string"
+ },
+ "logs": {
+ "additionalProperties": true,
+ "description": "The logs.",
+ "type": "object"
+ },
+ "metrics": {
+ "additionalProperties": true,
+ "description": "The metrics.",
+ "type": "object"
+ },
+ "queue_position": {
+ "description": "The queue position.",
+ "type": "integer"
+ },
+ "request_id": {
+ "description": "The request id.",
+ "type": "string"
+ },
+ "response_url": {
+ "description": "The response url.",
+ "type": "string"
+ },
+ "status": {
+ "enum": [
+ "IN_QUEUE",
+ "IN_PROGRESS",
+ "COMPLETED"
+ ],
+ "type": "string"
+ },
+ "status_url": {
+ "description": "The status url.",
+ "type": "string"
+ }
+ },
+ "required": [
+ "status",
+ "request_id"
+ ],
+ "type": "object"
+ }
+ },
+ "securitySchemes": {
+ "apiKeyAuth": {
+ "description": "Fal Key",
+ "in": "header",
+ "name": "Authorization",
+ "type": "apiKey"
+ }
+ }
+ },
+ "info": {
+ "description": "The OpenAPI schema for the elevenlabs/music/v2.5 queue.",
+ "title": "Queue OpenAPI for elevenlabs/music/v2.5",
+ "version": "1.0.0",
+ "x-fal-metadata": {
+ "about": "ElevenLabs Music v2.5.\n\nGenerates a song from a text prompt or a chunk-based composition plan\nwith the ``music_v2_5`` model -- ElevenLabs' most capable music model,\nbuilding on v2 with improved audio quality and prompt adherence.",
+ "category": "text-to-audio",
+ "documentationUrl": "https://fal.ai/models/elevenlabs/music/v2.5/api",
+ "endpointId": "elevenlabs/music/v2.5",
+ "playgroundUrl": "https://fal.ai/models/elevenlabs/music/v2.5",
+ "thumbnailUrl": "https://v3b.fal.media/files/b/0aaa6adb/-Z3Ays503mRIC-atq70g8.jpg"
+ }
+ },
+ "openapi": "3.1.0",
+ "paths": {
+ "/elevenlabs/music/v2.5": {
+ "post": {
+ "requestBody": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/MusicV25Input"
+ }
+ }
+ },
+ "required": true
+ },
+ "responses": {
+ "200": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/QueueStatus"
+ }
+ }
+ },
+ "description": "The request status."
+ }
+ }
+ }
+ },
+ "/elevenlabs/music/v2.5/requests/{request_id}": {
+ "get": {
+ "parameters": [
+ {
+ "in": "path",
+ "name": "request_id",
+ "required": true,
+ "schema": {
+ "description": "Request ID",
+ "type": "string"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/MusicV25Output"
+ }
+ }
+ },
+ "description": "Result of the request."
+ }
+ }
+ }
+ },
+ "/elevenlabs/music/v2.5/requests/{request_id}/cancel": {
+ "put": {
+ "parameters": [
+ {
+ "in": "path",
+ "name": "request_id",
+ "required": true,
+ "schema": {
+ "description": "Request ID",
+ "type": "string"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "properties": {
+ "success": {
+ "description": "Whether the request was cancelled successfully.",
+ "type": "boolean"
+ }
+ },
+ "type": "object"
+ }
+ }
+ },
+ "description": "The request was cancelled."
+ }
+ }
+ }
+ },
+ "/elevenlabs/music/v2.5/requests/{request_id}/status": {
+ "get": {
+ "parameters": [
+ {
+ "in": "path",
+ "name": "request_id",
+ "required": true,
+ "schema": {
+ "description": "Request ID",
+ "type": "string"
+ }
+ },
+ {
+ "in": "query",
+ "name": "logs",
+ "required": false,
+ "schema": {
+ "description": "Whether to include logs (`1`) in the response or not (`0`).",
+ "type": "number"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/QueueStatus"
+ }
+ }
+ },
+ "description": "The request status."
+ }
+ }
+ }
+ }
+ },
+ "security": [
+ {
+ "apiKeyAuth": []
+ }
+ ],
+ "servers": [
+ {
+ "url": "https://queue.fal.run"
+ }
+ ]
+}
diff --git a/tests/fixtures/provider-schemas/fal/fal-ai__deepfilternet3.json b/tests/fixtures/provider-schemas/fal/fal-ai__deepfilternet3.json
new file mode 100644
index 00000000..bb2a57d9
--- /dev/null
+++ b/tests/fixtures/provider-schemas/fal/fal-ai__deepfilternet3.json
@@ -0,0 +1,443 @@
+{
+ "components": {
+ "schemas": {
+ "AudioFile": {
+ "properties": {
+ "bitrate": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "integer"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "The bitrate of the audio (e.g., '192k' or 192000)",
+ "title": "Bitrate"
+ },
+ "channels": {
+ "anyOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "The number of channels in the audio",
+ "title": "Channels"
+ },
+ "content_type": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "The mime type of the file.",
+ "examples": [
+ "image/png"
+ ],
+ "title": "Content Type"
+ },
+ "duration": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "The duration of the audio",
+ "title": "Duration"
+ },
+ "file_name": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "The name of the file. It will be auto-generated if not provided.",
+ "examples": [
+ "z9RV14K95DvU.png"
+ ],
+ "title": "File Name"
+ },
+ "file_size": {
+ "anyOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "The size of the file in bytes.",
+ "examples": [
+ 4404019
+ ],
+ "title": "File Size"
+ },
+ "sample_rate": {
+ "anyOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "The sample rate of the audio",
+ "title": "Sample Rate"
+ },
+ "url": {
+ "description": "The URL where the file can be downloaded from.",
+ "title": "Url",
+ "type": "string"
+ }
+ },
+ "required": [
+ "url"
+ ],
+ "title": "AudioFile",
+ "type": "object",
+ "x-fal-order-properties": [
+ "url",
+ "content_type",
+ "file_name",
+ "file_size",
+ "duration",
+ "channels",
+ "sample_rate",
+ "bitrate"
+ ]
+ },
+ "DeepFilterNetTimings": {
+ "properties": {
+ "inference": {
+ "description": "Inference time.",
+ "title": "Inference",
+ "type": "number"
+ },
+ "postprocess": {
+ "description": "Postprocessing time.",
+ "title": "Postprocess",
+ "type": "number"
+ },
+ "preprocess": {
+ "description": "Preprocessing time.",
+ "title": "Preprocess",
+ "type": "number"
+ }
+ },
+ "required": [
+ "preprocess",
+ "inference",
+ "postprocess"
+ ],
+ "title": "DeepFilterNetTimings",
+ "type": "object",
+ "x-fal-order-properties": [
+ "preprocess",
+ "inference",
+ "postprocess"
+ ]
+ },
+ "Deepfilternet3Input": {
+ "properties": {
+ "audio_format": {
+ "default": "mp3",
+ "description": "The format for the output audio.",
+ "enum": [
+ "mp3",
+ "aac",
+ "m4a",
+ "ogg",
+ "opus",
+ "flac",
+ "wav"
+ ],
+ "title": "Audio Format",
+ "type": "string"
+ },
+ "audio_url": {
+ "description": "The URL of the audio to enhance.",
+ "examples": [
+ "https://v3b.fal.media/files/b/0a8a4022/DLoZhabKeVjd3urncoRE4_dirty.mp3"
+ ],
+ "title": "Audio URL",
+ "type": "string"
+ },
+ "bitrate": {
+ "default": "192k",
+ "description": "The bitrate of the output audio.",
+ "title": "Bitrate",
+ "type": "string"
+ },
+ "sync_mode": {
+ "default": false,
+ "description": "If `True`, the media will be returned as a data URI and the output data won't be available in the request history.",
+ "title": "Sync Mode",
+ "type": "boolean"
+ }
+ },
+ "required": [
+ "audio_url"
+ ],
+ "title": "DeepFilterNet3Input",
+ "type": "object",
+ "x-fal-order-properties": [
+ "audio_url",
+ "sync_mode",
+ "audio_format",
+ "bitrate"
+ ]
+ },
+ "Deepfilternet3Output": {
+ "properties": {
+ "audio_file": {
+ "$ref": "#/components/schemas/AudioFile",
+ "description": "The audio file that was enhanced.",
+ "examples": [
+ {
+ "bitrate": "192k",
+ "channels": 1,
+ "content_type": "audio/mpeg",
+ "duration": 6.9544375,
+ "file_name": "-2cD9CyGEjYsyVQ5lEERh_9qwIkJjf.mp3",
+ "sample_rate": 48000,
+ "url": "https://v3b.fal.media/files/b/0a8a4024/-2cD9CyGEjYsyVQ5lEERh_9qwIkJjf.mp3"
+ }
+ ]
+ },
+ "timings": {
+ "$ref": "#/components/schemas/DeepFilterNetTimings",
+ "description": "Timings for each step in the pipeline."
+ }
+ },
+ "required": [
+ "audio_file",
+ "timings"
+ ],
+ "title": "DeepFilterNet3Output",
+ "type": "object",
+ "x-fal-order-properties": [
+ "audio_file",
+ "timings"
+ ]
+ },
+ "QueueStatus": {
+ "properties": {
+ "cancel_url": {
+ "description": "The cancel url.",
+ "type": "string"
+ },
+ "logs": {
+ "additionalProperties": true,
+ "description": "The logs.",
+ "type": "object"
+ },
+ "metrics": {
+ "additionalProperties": true,
+ "description": "The metrics.",
+ "type": "object"
+ },
+ "queue_position": {
+ "description": "The queue position.",
+ "type": "integer"
+ },
+ "request_id": {
+ "description": "The request id.",
+ "type": "string"
+ },
+ "response_url": {
+ "description": "The response url.",
+ "type": "string"
+ },
+ "status": {
+ "enum": [
+ "IN_QUEUE",
+ "IN_PROGRESS",
+ "COMPLETED"
+ ],
+ "type": "string"
+ },
+ "status_url": {
+ "description": "The status url.",
+ "type": "string"
+ }
+ },
+ "required": [
+ "status",
+ "request_id"
+ ],
+ "type": "object"
+ }
+ },
+ "securitySchemes": {
+ "apiKeyAuth": {
+ "description": "Fal Key",
+ "in": "header",
+ "name": "Authorization",
+ "type": "apiKey"
+ }
+ }
+ },
+ "info": {
+ "description": "The OpenAPI schema for the fal-ai/deepfilternet3 queue.",
+ "title": "Queue OpenAPI for fal-ai/deepfilternet3",
+ "version": "1.0.0",
+ "x-fal-metadata": {
+ "about": "Enhance an audio file using the DeepFilterNet3 model.",
+ "category": "audio-to-audio",
+ "documentationUrl": "https://fal.ai/models/fal-ai/deepfilternet3/api",
+ "endpointId": "fal-ai/deepfilternet3",
+ "playgroundUrl": "https://fal.ai/models/fal-ai/deepfilternet3",
+ "thumbnailUrl": "https://v3b.fal.media/files/b/0a897e1b/SwkqYGPNn2Yyk6Cc-BBvO_a988f255be3a41c0a47b5cdc3568453c.jpg"
+ }
+ },
+ "openapi": "3.1.0",
+ "paths": {
+ "/fal-ai/deepfilternet3": {
+ "post": {
+ "requestBody": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/Deepfilternet3Input"
+ }
+ }
+ },
+ "required": true
+ },
+ "responses": {
+ "200": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/QueueStatus"
+ }
+ }
+ },
+ "description": "The request status."
+ }
+ }
+ }
+ },
+ "/fal-ai/deepfilternet3/requests/{request_id}": {
+ "get": {
+ "parameters": [
+ {
+ "in": "path",
+ "name": "request_id",
+ "required": true,
+ "schema": {
+ "description": "Request ID",
+ "type": "string"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/Deepfilternet3Output"
+ }
+ }
+ },
+ "description": "Result of the request."
+ }
+ }
+ }
+ },
+ "/fal-ai/deepfilternet3/requests/{request_id}/cancel": {
+ "put": {
+ "parameters": [
+ {
+ "in": "path",
+ "name": "request_id",
+ "required": true,
+ "schema": {
+ "description": "Request ID",
+ "type": "string"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "properties": {
+ "success": {
+ "description": "Whether the request was cancelled successfully.",
+ "type": "boolean"
+ }
+ },
+ "type": "object"
+ }
+ }
+ },
+ "description": "The request was cancelled."
+ }
+ }
+ }
+ },
+ "/fal-ai/deepfilternet3/requests/{request_id}/status": {
+ "get": {
+ "parameters": [
+ {
+ "in": "path",
+ "name": "request_id",
+ "required": true,
+ "schema": {
+ "description": "Request ID",
+ "type": "string"
+ }
+ },
+ {
+ "in": "query",
+ "name": "logs",
+ "required": false,
+ "schema": {
+ "description": "Whether to include logs (`1`) in the response or not (`0`).",
+ "type": "number"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/QueueStatus"
+ }
+ }
+ },
+ "description": "The request status."
+ }
+ }
+ }
+ }
+ },
+ "security": [
+ {
+ "apiKeyAuth": []
+ }
+ ],
+ "servers": [
+ {
+ "url": "https://queue.fal.run"
+ }
+ ]
+}
diff --git a/tests/fixtures/provider-schemas/fal/fal-ai__kandinsky6-lite__image-to-video.json b/tests/fixtures/provider-schemas/fal/fal-ai__kandinsky6-lite__image-to-video.json
new file mode 100644
index 00000000..dbd64c28
--- /dev/null
+++ b/tests/fixtures/provider-schemas/fal/fal-ai__kandinsky6-lite__image-to-video.json
@@ -0,0 +1,418 @@
+{
+ "components": {
+ "schemas": {
+ "File": {
+ "properties": {
+ "content_type": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "The mime type of the file.",
+ "examples": [
+ "image/png"
+ ],
+ "title": "Content Type"
+ },
+ "file_name": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "The name of the file. It will be auto-generated if not provided.",
+ "examples": [
+ "z9RV14K95DvU.png"
+ ],
+ "title": "File Name"
+ },
+ "file_size": {
+ "anyOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "The size of the file in bytes.",
+ "examples": [
+ 4404019
+ ],
+ "title": "File Size"
+ },
+ "url": {
+ "description": "The URL where the file can be downloaded from.",
+ "title": "Url",
+ "type": "string"
+ }
+ },
+ "required": [
+ "url"
+ ],
+ "title": "File",
+ "type": "object",
+ "x-fal-order-properties": [
+ "url",
+ "content_type",
+ "file_name",
+ "file_size"
+ ]
+ },
+ "Kandinsky6LiteImageToVideoInput": {
+ "properties": {
+ "aspect_ratio": {
+ "anyOf": [
+ {
+ "enum": [
+ "16:9",
+ "9:16",
+ "1:1",
+ "4:3",
+ "3:4"
+ ],
+ "type": "string"
+ },
+ {
+ "const": "auto",
+ "type": "string"
+ }
+ ],
+ "default": "auto",
+ "description": "The aspect ratio of the generated video. `auto` picks the supported ratio closest to the image's; the image is center-cropped to it.",
+ "title": "Aspect Ratio"
+ },
+ "enable_prompt_expansion": {
+ "default": false,
+ "description": "Whether to rewrite the prompt into a detailed video+audio description with the model's own Qwen2.5-VL text encoder before generating.",
+ "title": "Enable Prompt Expansion",
+ "type": "boolean"
+ },
+ "enable_safety_checker": {
+ "default": true,
+ "description": "Authorized callers may set false to request relaxed screening.",
+ "title": "Enable Safety Checker",
+ "type": "boolean"
+ },
+ "generate_audio": {
+ "default": true,
+ "description": "Whether to generate a synchronized audio track.",
+ "title": "Generate Audio",
+ "type": "boolean"
+ },
+ "image_url": {
+ "description": "The image used as the first frame of the video.",
+ "examples": [
+ "https://storage.googleapis.com/falserverless/example_inputs/ltxv-2-i2v-input.jpg"
+ ],
+ "title": "Image Url",
+ "type": "string"
+ },
+ "num_inference_steps": {
+ "default": 10,
+ "description": "The number of denoising steps. Lite is tuned for 10.",
+ "maximum": 16,
+ "minimum": 4,
+ "title": "Num Inference Steps",
+ "type": "integer"
+ },
+ "prompt": {
+ "description": "The text prompt describing the video and its sound.",
+ "examples": [
+ "A cat and a dog baking a cake together in a kitchen. The cat whisks batter while the dog sniffs the flour; a kitchen timer ticks and a mixer hums in the background."
+ ],
+ "title": "Prompt",
+ "type": "string"
+ },
+ "seed": {
+ "anyOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "The random seed used for the generation process.",
+ "title": "Seed"
+ },
+ "sync_mode": {
+ "default": false,
+ "description": "If `True`, the media will be returned as a data URI and the output data won't be available in the request history.",
+ "title": "Sync Mode",
+ "type": "boolean"
+ },
+ "upscale_factor": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "If set, upscale the generated video by this factor with Kandinsky 6 video super-resolution. One of 2, 2.25 or 4; 2.25 turns the 480p output into 1080p.",
+ "enum": [
+ 2,
+ 2.25,
+ 4,
+ null
+ ],
+ "title": "Upscale Factor"
+ }
+ },
+ "required": [
+ "prompt",
+ "image_url"
+ ],
+ "title": "Kandinsky6LiteImageToVideoInput",
+ "type": "object",
+ "x-fal-order-properties": [
+ "prompt",
+ "image_url",
+ "aspect_ratio",
+ "generate_audio",
+ "enable_prompt_expansion",
+ "upscale_factor",
+ "seed",
+ "sync_mode",
+ "num_inference_steps",
+ "enable_safety_checker"
+ ]
+ },
+ "Kandinsky6LiteImageToVideoOutput": {
+ "properties": {
+ "seed": {
+ "description": "The random seed used for the generation process.",
+ "title": "Seed",
+ "type": "integer"
+ },
+ "video": {
+ "$ref": "#/components/schemas/File",
+ "description": "The generated video, with its audio track when requested."
+ }
+ },
+ "required": [
+ "video",
+ "seed"
+ ],
+ "title": "Kandinsky6ProOutput",
+ "type": "object",
+ "x-fal-order-properties": [
+ "video",
+ "seed"
+ ]
+ },
+ "QueueStatus": {
+ "properties": {
+ "cancel_url": {
+ "description": "The cancel url.",
+ "type": "string"
+ },
+ "logs": {
+ "additionalProperties": true,
+ "description": "The logs.",
+ "type": "object"
+ },
+ "metrics": {
+ "additionalProperties": true,
+ "description": "The metrics.",
+ "type": "object"
+ },
+ "queue_position": {
+ "description": "The queue position.",
+ "type": "integer"
+ },
+ "request_id": {
+ "description": "The request id.",
+ "type": "string"
+ },
+ "response_url": {
+ "description": "The response url.",
+ "type": "string"
+ },
+ "status": {
+ "enum": [
+ "IN_QUEUE",
+ "IN_PROGRESS",
+ "COMPLETED"
+ ],
+ "type": "string"
+ },
+ "status_url": {
+ "description": "The status url.",
+ "type": "string"
+ }
+ },
+ "required": [
+ "status",
+ "request_id"
+ ],
+ "type": "object"
+ }
+ },
+ "securitySchemes": {
+ "apiKeyAuth": {
+ "description": "Fal Key",
+ "in": "header",
+ "name": "Authorization",
+ "type": "apiKey"
+ }
+ }
+ },
+ "info": {
+ "description": "Kandinsky 6.0 Lite brings still images to life. From a start frame and a motion prompt, it generates a consistent clip that preserves the source composition and identity. It is optimized for speed and cost, which makes it a strong fit for animating product shots, illustrations, and social content at scale.",
+ "title": "Queue OpenAPI for fal-ai/kandinsky6-lite/image-to-video",
+ "version": "1.0.0",
+ "x-fal-metadata": {
+ "about": "Image To Video",
+ "category": "image-to-video",
+ "documentationUrl": "https://fal.ai/models/fal-ai/kandinsky6-lite/image-to-video/api",
+ "endpointId": "fal-ai/kandinsky6-lite/image-to-video",
+ "playgroundUrl": "https://fal.ai/models/fal-ai/kandinsky6-lite/image-to-video",
+ "thumbnailUrl": "https://v3b.fal.media/files/b/0aad2911/goVXKMn3c-B2VrICV43Ls.jpg"
+ }
+ },
+ "openapi": "3.1.0",
+ "paths": {
+ "/fal-ai/kandinsky6-lite/image-to-video": {
+ "post": {
+ "requestBody": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/Kandinsky6LiteImageToVideoInput"
+ }
+ }
+ },
+ "required": true
+ },
+ "responses": {
+ "200": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/QueueStatus"
+ }
+ }
+ },
+ "description": "The request status."
+ }
+ }
+ }
+ },
+ "/fal-ai/kandinsky6-lite/image-to-video/requests/{request_id}": {
+ "get": {
+ "parameters": [
+ {
+ "in": "path",
+ "name": "request_id",
+ "required": true,
+ "schema": {
+ "description": "Request ID",
+ "type": "string"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/Kandinsky6LiteImageToVideoOutput"
+ }
+ }
+ },
+ "description": "Result of the request."
+ }
+ }
+ }
+ },
+ "/fal-ai/kandinsky6-lite/image-to-video/requests/{request_id}/cancel": {
+ "put": {
+ "parameters": [
+ {
+ "in": "path",
+ "name": "request_id",
+ "required": true,
+ "schema": {
+ "description": "Request ID",
+ "type": "string"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "properties": {
+ "success": {
+ "description": "Whether the request was cancelled successfully.",
+ "type": "boolean"
+ }
+ },
+ "type": "object"
+ }
+ }
+ },
+ "description": "The request was cancelled."
+ }
+ }
+ }
+ },
+ "/fal-ai/kandinsky6-lite/image-to-video/requests/{request_id}/status": {
+ "get": {
+ "parameters": [
+ {
+ "in": "path",
+ "name": "request_id",
+ "required": true,
+ "schema": {
+ "description": "Request ID",
+ "type": "string"
+ }
+ },
+ {
+ "in": "query",
+ "name": "logs",
+ "required": false,
+ "schema": {
+ "description": "Whether to include logs (`1`) in the response or not (`0`).",
+ "type": "number"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/QueueStatus"
+ }
+ }
+ },
+ "description": "The request status."
+ }
+ }
+ }
+ }
+ },
+ "security": [
+ {
+ "apiKeyAuth": []
+ }
+ ],
+ "servers": [
+ {
+ "url": "https://queue.fal.run"
+ }
+ ]
+}
diff --git a/tests/fixtures/provider-schemas/fal/fal-ai__kandinsky6-lite__text-to-video.json b/tests/fixtures/provider-schemas/fal/fal-ai__kandinsky6-lite__text-to-video.json
new file mode 100644
index 00000000..78d5c5c0
--- /dev/null
+++ b/tests/fixtures/provider-schemas/fal/fal-ai__kandinsky6-lite__text-to-video.json
@@ -0,0 +1,400 @@
+{
+ "components": {
+ "schemas": {
+ "File": {
+ "properties": {
+ "content_type": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "The mime type of the file.",
+ "examples": [
+ "image/png"
+ ],
+ "title": "Content Type"
+ },
+ "file_name": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "The name of the file. It will be auto-generated if not provided.",
+ "examples": [
+ "z9RV14K95DvU.png"
+ ],
+ "title": "File Name"
+ },
+ "file_size": {
+ "anyOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "The size of the file in bytes.",
+ "examples": [
+ 4404019
+ ],
+ "title": "File Size"
+ },
+ "url": {
+ "description": "The URL where the file can be downloaded from.",
+ "title": "Url",
+ "type": "string"
+ }
+ },
+ "required": [
+ "url"
+ ],
+ "title": "File",
+ "type": "object",
+ "x-fal-order-properties": [
+ "url",
+ "content_type",
+ "file_name",
+ "file_size"
+ ]
+ },
+ "Kandinsky6LiteTextToVideoInput": {
+ "properties": {
+ "aspect_ratio": {
+ "default": "16:9",
+ "description": "The aspect ratio of the generated video.",
+ "enum": [
+ "16:9",
+ "9:16",
+ "1:1",
+ "4:3",
+ "3:4"
+ ],
+ "title": "Aspect Ratio",
+ "type": "string"
+ },
+ "enable_prompt_expansion": {
+ "default": false,
+ "description": "Whether to rewrite the prompt into a detailed video+audio description with the model's own Qwen2.5-VL text encoder before generating.",
+ "title": "Enable Prompt Expansion",
+ "type": "boolean"
+ },
+ "enable_safety_checker": {
+ "default": true,
+ "description": "Authorized callers may set false to request relaxed screening.",
+ "title": "Enable Safety Checker",
+ "type": "boolean"
+ },
+ "generate_audio": {
+ "default": true,
+ "description": "Whether to generate a synchronized audio track.",
+ "title": "Generate Audio",
+ "type": "boolean"
+ },
+ "num_inference_steps": {
+ "default": 10,
+ "description": "The number of denoising steps. Lite is tuned for 10.",
+ "maximum": 16,
+ "minimum": 4,
+ "title": "Num Inference Steps",
+ "type": "integer"
+ },
+ "prompt": {
+ "description": "The text prompt describing the video and its sound.",
+ "examples": [
+ "A cat and a dog baking a cake together in a kitchen. The cat whisks batter while the dog sniffs the flour; a kitchen timer ticks and a mixer hums in the background."
+ ],
+ "title": "Prompt",
+ "type": "string"
+ },
+ "seed": {
+ "anyOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "The random seed used for the generation process.",
+ "title": "Seed"
+ },
+ "sync_mode": {
+ "default": false,
+ "description": "If `True`, the media will be returned as a data URI and the output data won't be available in the request history.",
+ "title": "Sync Mode",
+ "type": "boolean"
+ },
+ "upscale_factor": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "If set, upscale the generated video by this factor with Kandinsky 6 video super-resolution. One of 2, 2.25 or 4; 2.25 turns the 480p output into 1080p.",
+ "enum": [
+ 2,
+ 2.25,
+ 4,
+ null
+ ],
+ "title": "Upscale Factor"
+ }
+ },
+ "required": [
+ "prompt"
+ ],
+ "title": "Kandinsky6LiteTextToVideoInput",
+ "type": "object",
+ "x-fal-order-properties": [
+ "prompt",
+ "aspect_ratio",
+ "generate_audio",
+ "enable_prompt_expansion",
+ "upscale_factor",
+ "seed",
+ "sync_mode",
+ "num_inference_steps",
+ "enable_safety_checker"
+ ]
+ },
+ "Kandinsky6LiteTextToVideoOutput": {
+ "properties": {
+ "seed": {
+ "description": "The random seed used for the generation process.",
+ "title": "Seed",
+ "type": "integer"
+ },
+ "video": {
+ "$ref": "#/components/schemas/File",
+ "description": "The generated video, with its audio track when requested."
+ }
+ },
+ "required": [
+ "video",
+ "seed"
+ ],
+ "title": "Kandinsky6ProOutput",
+ "type": "object",
+ "x-fal-order-properties": [
+ "video",
+ "seed"
+ ]
+ },
+ "QueueStatus": {
+ "properties": {
+ "cancel_url": {
+ "description": "The cancel url.",
+ "type": "string"
+ },
+ "logs": {
+ "additionalProperties": true,
+ "description": "The logs.",
+ "type": "object"
+ },
+ "metrics": {
+ "additionalProperties": true,
+ "description": "The metrics.",
+ "type": "object"
+ },
+ "queue_position": {
+ "description": "The queue position.",
+ "type": "integer"
+ },
+ "request_id": {
+ "description": "The request id.",
+ "type": "string"
+ },
+ "response_url": {
+ "description": "The response url.",
+ "type": "string"
+ },
+ "status": {
+ "enum": [
+ "IN_QUEUE",
+ "IN_PROGRESS",
+ "COMPLETED"
+ ],
+ "type": "string"
+ },
+ "status_url": {
+ "description": "The status url.",
+ "type": "string"
+ }
+ },
+ "required": [
+ "status",
+ "request_id"
+ ],
+ "type": "object"
+ }
+ },
+ "securitySchemes": {
+ "apiKeyAuth": {
+ "description": "Fal Key",
+ "in": "header",
+ "name": "Authorization",
+ "type": "apiKey"
+ }
+ }
+ },
+ "info": {
+ "description": "Kandinsky 6.0 Lite is the speed-focused model in the Kandinsky 6.0 video lineup. It turns text prompts into smooth, consistent short clips at low latency, making it ideal for rapid iteration, drafts, and high-volume pipelines. It natively understands English and Russian prompts, including Russian cultural concepts.",
+ "title": "Queue OpenAPI for fal-ai/kandinsky6-lite/text-to-video",
+ "version": "1.0.0",
+ "x-fal-metadata": {
+ "about": "Text To Video",
+ "category": "text-to-video",
+ "documentationUrl": "https://fal.ai/models/fal-ai/kandinsky6-lite/text-to-video/api",
+ "endpointId": "fal-ai/kandinsky6-lite/text-to-video",
+ "playgroundUrl": "https://fal.ai/models/fal-ai/kandinsky6-lite/text-to-video",
+ "thumbnailUrl": "https://v3b.fal.media/files/b/0aad28fa/A2SiDGpqWJmGTm_X2yuqg.jpg"
+ }
+ },
+ "openapi": "3.1.0",
+ "paths": {
+ "/fal-ai/kandinsky6-lite/text-to-video": {
+ "post": {
+ "requestBody": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/Kandinsky6LiteTextToVideoInput"
+ }
+ }
+ },
+ "required": true
+ },
+ "responses": {
+ "200": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/QueueStatus"
+ }
+ }
+ },
+ "description": "The request status."
+ }
+ }
+ }
+ },
+ "/fal-ai/kandinsky6-lite/text-to-video/requests/{request_id}": {
+ "get": {
+ "parameters": [
+ {
+ "in": "path",
+ "name": "request_id",
+ "required": true,
+ "schema": {
+ "description": "Request ID",
+ "type": "string"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/Kandinsky6LiteTextToVideoOutput"
+ }
+ }
+ },
+ "description": "Result of the request."
+ }
+ }
+ }
+ },
+ "/fal-ai/kandinsky6-lite/text-to-video/requests/{request_id}/cancel": {
+ "put": {
+ "parameters": [
+ {
+ "in": "path",
+ "name": "request_id",
+ "required": true,
+ "schema": {
+ "description": "Request ID",
+ "type": "string"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "properties": {
+ "success": {
+ "description": "Whether the request was cancelled successfully.",
+ "type": "boolean"
+ }
+ },
+ "type": "object"
+ }
+ }
+ },
+ "description": "The request was cancelled."
+ }
+ }
+ }
+ },
+ "/fal-ai/kandinsky6-lite/text-to-video/requests/{request_id}/status": {
+ "get": {
+ "parameters": [
+ {
+ "in": "path",
+ "name": "request_id",
+ "required": true,
+ "schema": {
+ "description": "Request ID",
+ "type": "string"
+ }
+ },
+ {
+ "in": "query",
+ "name": "logs",
+ "required": false,
+ "schema": {
+ "description": "Whether to include logs (`1`) in the response or not (`0`).",
+ "type": "number"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/QueueStatus"
+ }
+ }
+ },
+ "description": "The request status."
+ }
+ }
+ }
+ }
+ },
+ "security": [
+ {
+ "apiKeyAuth": []
+ }
+ ],
+ "servers": [
+ {
+ "url": "https://queue.fal.run"
+ }
+ ]
+}
diff --git a/tests/fixtures/provider-schemas/fal/fal-ai__kandinsky6-pro__image-to-video.json b/tests/fixtures/provider-schemas/fal/fal-ai__kandinsky6-pro__image-to-video.json
new file mode 100644
index 00000000..60a35a6b
--- /dev/null
+++ b/tests/fixtures/provider-schemas/fal/fal-ai__kandinsky6-pro__image-to-video.json
@@ -0,0 +1,440 @@
+{
+ "components": {
+ "schemas": {
+ "File": {
+ "properties": {
+ "content_type": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "The mime type of the file.",
+ "examples": [
+ "image/png"
+ ],
+ "title": "Content Type"
+ },
+ "file_name": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "The name of the file. It will be auto-generated if not provided.",
+ "examples": [
+ "z9RV14K95DvU.png"
+ ],
+ "title": "File Name"
+ },
+ "file_size": {
+ "anyOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "The size of the file in bytes.",
+ "examples": [
+ 4404019
+ ],
+ "title": "File Size"
+ },
+ "url": {
+ "description": "The URL where the file can be downloaded from.",
+ "title": "Url",
+ "type": "string"
+ }
+ },
+ "required": [
+ "url"
+ ],
+ "title": "File",
+ "type": "object",
+ "x-fal-order-properties": [
+ "url",
+ "content_type",
+ "file_name",
+ "file_size"
+ ]
+ },
+ "Kandinsky6ProImageToVideoInput": {
+ "properties": {
+ "aspect_ratio": {
+ "anyOf": [
+ {
+ "enum": [
+ "16:9",
+ "9:16",
+ "1:1",
+ "4:3",
+ "3:4"
+ ],
+ "type": "string"
+ },
+ {
+ "const": "auto",
+ "type": "string"
+ }
+ ],
+ "default": "auto",
+ "description": "The aspect ratio of the generated video. `auto` picks the supported ratio closest to the image's; the image is center-cropped to it.",
+ "title": "Aspect Ratio"
+ },
+ "enable_prompt_expansion": {
+ "default": false,
+ "description": "Whether to rewrite the prompt into a detailed video+audio description with the model's own Qwen2.5-VL text encoder before generating.",
+ "title": "Enable Prompt Expansion",
+ "type": "boolean"
+ },
+ "enable_safety_checker": {
+ "default": true,
+ "description": "Authorized callers may set false to request relaxed screening.",
+ "title": "Enable Safety Checker",
+ "type": "boolean"
+ },
+ "generate_audio": {
+ "default": true,
+ "description": "Whether to generate a synchronized audio track.",
+ "title": "Generate Audio",
+ "type": "boolean"
+ },
+ "guidance_scale": {
+ "default": 5,
+ "description": "Classifier-free guidance strength.",
+ "maximum": 10,
+ "minimum": 1,
+ "title": "Guidance Scale",
+ "type": "number"
+ },
+ "image_url": {
+ "description": "The image used as the first frame of the video.",
+ "examples": [
+ "https://storage.googleapis.com/falserverless/example_inputs/ltxv-2-i2v-input.jpg"
+ ],
+ "title": "Image Url",
+ "type": "string"
+ },
+ "negative_prompt": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "What to avoid in the video. Defaults to the model's built-in negative prompt.",
+ "title": "Negative Prompt"
+ },
+ "num_inference_steps": {
+ "default": 50,
+ "description": "The number of denoising steps.",
+ "maximum": 50,
+ "minimum": 8,
+ "title": "Num Inference Steps",
+ "type": "integer"
+ },
+ "prompt": {
+ "description": "The text prompt describing the video and its sound.",
+ "examples": [
+ "A cat and a dog baking a cake together in a kitchen. The cat whisks batter while the dog sniffs the flour; a kitchen timer ticks and a mixer hums in the background."
+ ],
+ "title": "Prompt",
+ "type": "string"
+ },
+ "seed": {
+ "anyOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "The random seed used for the generation process.",
+ "title": "Seed"
+ },
+ "sync_mode": {
+ "default": false,
+ "description": "If `True`, the media will be returned as a data URI and the output data won't be available in the request history.",
+ "title": "Sync Mode",
+ "type": "boolean"
+ },
+ "upscale_factor": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "If set, upscale the generated video by this factor with Kandinsky 6 video super-resolution. One of 2, 2.25 or 4; 2.25 turns the 480p output into 1080p.",
+ "enum": [
+ 2,
+ 2.25,
+ 4,
+ null
+ ],
+ "title": "Upscale Factor"
+ }
+ },
+ "required": [
+ "prompt",
+ "image_url"
+ ],
+ "title": "Kandinsky6ProImageToVideoInput",
+ "type": "object",
+ "x-fal-order-properties": [
+ "prompt",
+ "image_url",
+ "negative_prompt",
+ "aspect_ratio",
+ "generate_audio",
+ "enable_prompt_expansion",
+ "upscale_factor",
+ "seed",
+ "sync_mode",
+ "num_inference_steps",
+ "guidance_scale",
+ "enable_safety_checker"
+ ]
+ },
+ "Kandinsky6ProImageToVideoOutput": {
+ "properties": {
+ "seed": {
+ "description": "The random seed used for the generation process.",
+ "title": "Seed",
+ "type": "integer"
+ },
+ "video": {
+ "$ref": "#/components/schemas/File",
+ "description": "The generated video, with its audio track when requested."
+ }
+ },
+ "required": [
+ "video",
+ "seed"
+ ],
+ "title": "Kandinsky6ProOutput",
+ "type": "object",
+ "x-fal-order-properties": [
+ "video",
+ "seed"
+ ]
+ },
+ "QueueStatus": {
+ "properties": {
+ "cancel_url": {
+ "description": "The cancel url.",
+ "type": "string"
+ },
+ "logs": {
+ "additionalProperties": true,
+ "description": "The logs.",
+ "type": "object"
+ },
+ "metrics": {
+ "additionalProperties": true,
+ "description": "The metrics.",
+ "type": "object"
+ },
+ "queue_position": {
+ "description": "The queue position.",
+ "type": "integer"
+ },
+ "request_id": {
+ "description": "The request id.",
+ "type": "string"
+ },
+ "response_url": {
+ "description": "The response url.",
+ "type": "string"
+ },
+ "status": {
+ "enum": [
+ "IN_QUEUE",
+ "IN_PROGRESS",
+ "COMPLETED"
+ ],
+ "type": "string"
+ },
+ "status_url": {
+ "description": "The status url.",
+ "type": "string"
+ }
+ },
+ "required": [
+ "status",
+ "request_id"
+ ],
+ "type": "object"
+ }
+ },
+ "securitySchemes": {
+ "apiKeyAuth": {
+ "description": "Fal Key",
+ "in": "header",
+ "name": "Authorization",
+ "type": "apiKey"
+ }
+ }
+ },
+ "info": {
+ "description": "Kandinsky 6.0 Pro animates images at high resolution while preserving the subject, style, and composition of the input frame. Text prompts guide the motion, camera behavior, and scene dynamics. It is built for production-grade results in ads, storytelling, and creative work.",
+ "title": "Queue OpenAPI for fal-ai/kandinsky6-pro/image-to-video",
+ "version": "1.0.0",
+ "x-fal-metadata": {
+ "about": "Image To Video",
+ "category": "image-to-video",
+ "documentationUrl": "https://fal.ai/models/fal-ai/kandinsky6-pro/image-to-video/api",
+ "endpointId": "fal-ai/kandinsky6-pro/image-to-video",
+ "playgroundUrl": "https://fal.ai/models/fal-ai/kandinsky6-pro/image-to-video",
+ "thumbnailUrl": "https://v3b.fal.media/files/b/0aad2920/FiHu80t1Zh-9BAHgeSSrG.jpg"
+ }
+ },
+ "openapi": "3.1.0",
+ "paths": {
+ "/fal-ai/kandinsky6-pro/image-to-video": {
+ "post": {
+ "requestBody": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/Kandinsky6ProImageToVideoInput"
+ }
+ }
+ },
+ "required": true
+ },
+ "responses": {
+ "200": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/QueueStatus"
+ }
+ }
+ },
+ "description": "The request status."
+ }
+ }
+ }
+ },
+ "/fal-ai/kandinsky6-pro/image-to-video/requests/{request_id}": {
+ "get": {
+ "parameters": [
+ {
+ "in": "path",
+ "name": "request_id",
+ "required": true,
+ "schema": {
+ "description": "Request ID",
+ "type": "string"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/Kandinsky6ProImageToVideoOutput"
+ }
+ }
+ },
+ "description": "Result of the request."
+ }
+ }
+ }
+ },
+ "/fal-ai/kandinsky6-pro/image-to-video/requests/{request_id}/cancel": {
+ "put": {
+ "parameters": [
+ {
+ "in": "path",
+ "name": "request_id",
+ "required": true,
+ "schema": {
+ "description": "Request ID",
+ "type": "string"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "properties": {
+ "success": {
+ "description": "Whether the request was cancelled successfully.",
+ "type": "boolean"
+ }
+ },
+ "type": "object"
+ }
+ }
+ },
+ "description": "The request was cancelled."
+ }
+ }
+ }
+ },
+ "/fal-ai/kandinsky6-pro/image-to-video/requests/{request_id}/status": {
+ "get": {
+ "parameters": [
+ {
+ "in": "path",
+ "name": "request_id",
+ "required": true,
+ "schema": {
+ "description": "Request ID",
+ "type": "string"
+ }
+ },
+ {
+ "in": "query",
+ "name": "logs",
+ "required": false,
+ "schema": {
+ "description": "Whether to include logs (`1`) in the response or not (`0`).",
+ "type": "number"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/QueueStatus"
+ }
+ }
+ },
+ "description": "The request status."
+ }
+ }
+ }
+ }
+ },
+ "security": [
+ {
+ "apiKeyAuth": []
+ }
+ ],
+ "servers": [
+ {
+ "url": "https://queue.fal.run"
+ }
+ ]
+}
diff --git a/tests/fixtures/provider-schemas/fal/fal-ai__kandinsky6-pro__text-to-video.json b/tests/fixtures/provider-schemas/fal/fal-ai__kandinsky6-pro__text-to-video.json
new file mode 100644
index 00000000..ebc899c7
--- /dev/null
+++ b/tests/fixtures/provider-schemas/fal/fal-ai__kandinsky6-pro__text-to-video.json
@@ -0,0 +1,422 @@
+{
+ "components": {
+ "schemas": {
+ "File": {
+ "properties": {
+ "content_type": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "The mime type of the file.",
+ "examples": [
+ "image/png"
+ ],
+ "title": "Content Type"
+ },
+ "file_name": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "The name of the file. It will be auto-generated if not provided.",
+ "examples": [
+ "z9RV14K95DvU.png"
+ ],
+ "title": "File Name"
+ },
+ "file_size": {
+ "anyOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "The size of the file in bytes.",
+ "examples": [
+ 4404019
+ ],
+ "title": "File Size"
+ },
+ "url": {
+ "description": "The URL where the file can be downloaded from.",
+ "title": "Url",
+ "type": "string"
+ }
+ },
+ "required": [
+ "url"
+ ],
+ "title": "File",
+ "type": "object",
+ "x-fal-order-properties": [
+ "url",
+ "content_type",
+ "file_name",
+ "file_size"
+ ]
+ },
+ "Kandinsky6ProTextToVideoInput": {
+ "properties": {
+ "aspect_ratio": {
+ "default": "16:9",
+ "description": "The aspect ratio of the generated video.",
+ "enum": [
+ "16:9",
+ "9:16",
+ "1:1",
+ "4:3",
+ "3:4"
+ ],
+ "title": "Aspect Ratio",
+ "type": "string"
+ },
+ "enable_prompt_expansion": {
+ "default": false,
+ "description": "Whether to rewrite the prompt into a detailed video+audio description with the model's own Qwen2.5-VL text encoder before generating.",
+ "title": "Enable Prompt Expansion",
+ "type": "boolean"
+ },
+ "enable_safety_checker": {
+ "default": true,
+ "description": "Authorized callers may set false to request relaxed screening.",
+ "title": "Enable Safety Checker",
+ "type": "boolean"
+ },
+ "generate_audio": {
+ "default": true,
+ "description": "Whether to generate a synchronized audio track.",
+ "title": "Generate Audio",
+ "type": "boolean"
+ },
+ "guidance_scale": {
+ "default": 5,
+ "description": "Classifier-free guidance strength.",
+ "maximum": 10,
+ "minimum": 1,
+ "title": "Guidance Scale",
+ "type": "number"
+ },
+ "negative_prompt": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "What to avoid in the video. Defaults to the model's built-in negative prompt.",
+ "title": "Negative Prompt"
+ },
+ "num_inference_steps": {
+ "default": 50,
+ "description": "The number of denoising steps.",
+ "maximum": 50,
+ "minimum": 8,
+ "title": "Num Inference Steps",
+ "type": "integer"
+ },
+ "prompt": {
+ "description": "The text prompt describing the video and its sound.",
+ "examples": [
+ "A cat and a dog baking a cake together in a kitchen. The cat whisks batter while the dog sniffs the flour; a kitchen timer ticks and a mixer hums in the background."
+ ],
+ "title": "Prompt",
+ "type": "string"
+ },
+ "seed": {
+ "anyOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "The random seed used for the generation process.",
+ "title": "Seed"
+ },
+ "sync_mode": {
+ "default": false,
+ "description": "If `True`, the media will be returned as a data URI and the output data won't be available in the request history.",
+ "title": "Sync Mode",
+ "type": "boolean"
+ },
+ "upscale_factor": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "If set, upscale the generated video by this factor with Kandinsky 6 video super-resolution. One of 2, 2.25 or 4; 2.25 turns the 480p output into 1080p.",
+ "enum": [
+ 2,
+ 2.25,
+ 4,
+ null
+ ],
+ "title": "Upscale Factor"
+ }
+ },
+ "required": [
+ "prompt"
+ ],
+ "title": "Kandinsky6ProTextToVideoInput",
+ "type": "object",
+ "x-fal-order-properties": [
+ "prompt",
+ "negative_prompt",
+ "aspect_ratio",
+ "generate_audio",
+ "enable_prompt_expansion",
+ "upscale_factor",
+ "seed",
+ "sync_mode",
+ "num_inference_steps",
+ "guidance_scale",
+ "enable_safety_checker"
+ ]
+ },
+ "Kandinsky6ProTextToVideoOutput": {
+ "properties": {
+ "seed": {
+ "description": "The random seed used for the generation process.",
+ "title": "Seed",
+ "type": "integer"
+ },
+ "video": {
+ "$ref": "#/components/schemas/File",
+ "description": "The generated video, with its audio track when requested."
+ }
+ },
+ "required": [
+ "video",
+ "seed"
+ ],
+ "title": "Kandinsky6ProOutput",
+ "type": "object",
+ "x-fal-order-properties": [
+ "video",
+ "seed"
+ ]
+ },
+ "QueueStatus": {
+ "properties": {
+ "cancel_url": {
+ "description": "The cancel url.",
+ "type": "string"
+ },
+ "logs": {
+ "additionalProperties": true,
+ "description": "The logs.",
+ "type": "object"
+ },
+ "metrics": {
+ "additionalProperties": true,
+ "description": "The metrics.",
+ "type": "object"
+ },
+ "queue_position": {
+ "description": "The queue position.",
+ "type": "integer"
+ },
+ "request_id": {
+ "description": "The request id.",
+ "type": "string"
+ },
+ "response_url": {
+ "description": "The response url.",
+ "type": "string"
+ },
+ "status": {
+ "enum": [
+ "IN_QUEUE",
+ "IN_PROGRESS",
+ "COMPLETED"
+ ],
+ "type": "string"
+ },
+ "status_url": {
+ "description": "The status url.",
+ "type": "string"
+ }
+ },
+ "required": [
+ "status",
+ "request_id"
+ ],
+ "type": "object"
+ }
+ },
+ "securitySchemes": {
+ "apiKeyAuth": {
+ "description": "Fal Key",
+ "in": "header",
+ "name": "Authorization",
+ "type": "apiKey"
+ }
+ }
+ },
+ "info": {
+ "description": "Kandinsky 6.0 Pro is the high-capacity model in the Kandinsky 6.0 lineup. It succeeds Kandinsky 5.0 Pro, which ranked #1 among open-source models on the Text-to-Video Arena. It handles long, structured prompts with multiple constraints, and it supports camera moves and complex scene dynamics. It natively understands English and Russian prompts.",
+ "title": "Queue OpenAPI for fal-ai/kandinsky6-pro/text-to-video",
+ "version": "1.0.0",
+ "x-fal-metadata": {
+ "about": "Text To Video",
+ "category": "text-to-video",
+ "documentationUrl": "https://fal.ai/models/fal-ai/kandinsky6-pro/text-to-video/api",
+ "endpointId": "fal-ai/kandinsky6-pro/text-to-video",
+ "playgroundUrl": "https://fal.ai/models/fal-ai/kandinsky6-pro/text-to-video",
+ "thumbnailUrl": "https://v3b.fal.media/files/b/0aad2929/Z9eM0SNw8Gulk3vXDU5K8.jpg"
+ }
+ },
+ "openapi": "3.1.0",
+ "paths": {
+ "/fal-ai/kandinsky6-pro/text-to-video": {
+ "post": {
+ "requestBody": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/Kandinsky6ProTextToVideoInput"
+ }
+ }
+ },
+ "required": true
+ },
+ "responses": {
+ "200": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/QueueStatus"
+ }
+ }
+ },
+ "description": "The request status."
+ }
+ }
+ }
+ },
+ "/fal-ai/kandinsky6-pro/text-to-video/requests/{request_id}": {
+ "get": {
+ "parameters": [
+ {
+ "in": "path",
+ "name": "request_id",
+ "required": true,
+ "schema": {
+ "description": "Request ID",
+ "type": "string"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/Kandinsky6ProTextToVideoOutput"
+ }
+ }
+ },
+ "description": "Result of the request."
+ }
+ }
+ }
+ },
+ "/fal-ai/kandinsky6-pro/text-to-video/requests/{request_id}/cancel": {
+ "put": {
+ "parameters": [
+ {
+ "in": "path",
+ "name": "request_id",
+ "required": true,
+ "schema": {
+ "description": "Request ID",
+ "type": "string"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "properties": {
+ "success": {
+ "description": "Whether the request was cancelled successfully.",
+ "type": "boolean"
+ }
+ },
+ "type": "object"
+ }
+ }
+ },
+ "description": "The request was cancelled."
+ }
+ }
+ }
+ },
+ "/fal-ai/kandinsky6-pro/text-to-video/requests/{request_id}/status": {
+ "get": {
+ "parameters": [
+ {
+ "in": "path",
+ "name": "request_id",
+ "required": true,
+ "schema": {
+ "description": "Request ID",
+ "type": "string"
+ }
+ },
+ {
+ "in": "query",
+ "name": "logs",
+ "required": false,
+ "schema": {
+ "description": "Whether to include logs (`1`) in the response or not (`0`).",
+ "type": "number"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/QueueStatus"
+ }
+ }
+ },
+ "description": "The request status."
+ }
+ }
+ }
+ }
+ },
+ "security": [
+ {
+ "apiKeyAuth": []
+ }
+ ],
+ "servers": [
+ {
+ "url": "https://queue.fal.run"
+ }
+ ]
+}
diff --git a/tests/fixtures/provider-schemas/fal/fal-ai__kandinsky6-vsr.json b/tests/fixtures/provider-schemas/fal/fal-ai__kandinsky6-vsr.json
new file mode 100644
index 00000000..f811f244
--- /dev/null
+++ b/tests/fixtures/provider-schemas/fal/fal-ai__kandinsky6-vsr.json
@@ -0,0 +1,371 @@
+{
+ "components": {
+ "schemas": {
+ "File": {
+ "properties": {
+ "content_type": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "The mime type of the file.",
+ "examples": [
+ "image/png"
+ ],
+ "title": "Content Type"
+ },
+ "file_name": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "The name of the file. It will be auto-generated if not provided.",
+ "examples": [
+ "z9RV14K95DvU.png"
+ ],
+ "title": "File Name"
+ },
+ "file_size": {
+ "anyOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "The size of the file in bytes.",
+ "examples": [
+ 4404019
+ ],
+ "title": "File Size"
+ },
+ "url": {
+ "description": "The URL where the file can be downloaded from.",
+ "title": "Url",
+ "type": "string"
+ }
+ },
+ "required": [
+ "url"
+ ],
+ "title": "File",
+ "type": "object",
+ "x-fal-order-properties": [
+ "url",
+ "content_type",
+ "file_name",
+ "file_size"
+ ]
+ },
+ "Kandinsky6VsrInput": {
+ "properties": {
+ "enable_safety_checker": {
+ "default": true,
+ "description": "Authorized callers may set false to request relaxed screening.",
+ "title": "Enable Safety Checker",
+ "type": "boolean"
+ },
+ "num_inference_steps": {
+ "default": 5,
+ "description": "The number of denoising steps used for each tile.",
+ "maximum": 50,
+ "minimum": 2,
+ "title": "Num Inference Steps",
+ "type": "integer"
+ },
+ "seed": {
+ "anyOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "The random seed used for the generation process.",
+ "title": "Seed"
+ },
+ "sync_mode": {
+ "default": false,
+ "description": "If `True`, the media will be returned as a data URI and the output data won't be available in the request history.",
+ "title": "Sync Mode",
+ "type": "boolean"
+ },
+ "upscale_factor": {
+ "default": 2.25,
+ "description": "Total upscale factor applied to the input resolution. One of 2, 2.25 or 4.",
+ "enum": [
+ 2,
+ 2.25,
+ 4
+ ],
+ "title": "Upscale Factor",
+ "type": "number"
+ },
+ "video_url": {
+ "description": "The input video to upscale. Clips are resampled to 24fps and capped at 121 frames (~5s). For 2x and 4x upscaling, width and height must be multiples of 16.",
+ "examples": [
+ "https://storage.googleapis.com/falserverless/example_inputs/seedvr-input.mp4"
+ ],
+ "title": "Video Url",
+ "type": "string"
+ }
+ },
+ "required": [
+ "video_url"
+ ],
+ "title": "Kandinsky6VSRInput",
+ "type": "object",
+ "x-fal-order-properties": [
+ "video_url",
+ "upscale_factor",
+ "num_inference_steps",
+ "seed",
+ "sync_mode",
+ "enable_safety_checker"
+ ]
+ },
+ "Kandinsky6VsrOutput": {
+ "properties": {
+ "seed": {
+ "description": "The random seed used for the generation process.",
+ "title": "Seed",
+ "type": "integer"
+ },
+ "video": {
+ "$ref": "#/components/schemas/File",
+ "description": "Upscaled video file after processing",
+ "examples": [
+ {
+ "content_type": "video/mp4",
+ "url": "https://storage.googleapis.com/falserverless/example_outputs/seedvr-output.mp4"
+ }
+ ]
+ }
+ },
+ "required": [
+ "video",
+ "seed"
+ ],
+ "title": "Kandinsky6VSROutput",
+ "type": "object",
+ "x-fal-order-properties": [
+ "video",
+ "seed"
+ ]
+ },
+ "QueueStatus": {
+ "properties": {
+ "cancel_url": {
+ "description": "The cancel url.",
+ "type": "string"
+ },
+ "logs": {
+ "additionalProperties": true,
+ "description": "The logs.",
+ "type": "object"
+ },
+ "metrics": {
+ "additionalProperties": true,
+ "description": "The metrics.",
+ "type": "object"
+ },
+ "queue_position": {
+ "description": "The queue position.",
+ "type": "integer"
+ },
+ "request_id": {
+ "description": "The request id.",
+ "type": "string"
+ },
+ "response_url": {
+ "description": "The response url.",
+ "type": "string"
+ },
+ "status": {
+ "enum": [
+ "IN_QUEUE",
+ "IN_PROGRESS",
+ "COMPLETED"
+ ],
+ "type": "string"
+ },
+ "status_url": {
+ "description": "The status url.",
+ "type": "string"
+ }
+ },
+ "required": [
+ "status",
+ "request_id"
+ ],
+ "type": "object"
+ }
+ },
+ "securitySchemes": {
+ "apiKeyAuth": {
+ "description": "Fal Key",
+ "in": "header",
+ "name": "Authorization",
+ "type": "apiKey"
+ }
+ }
+ },
+ "info": {
+ "description": "Kandinsky 6.0 VSR restores and upscales video, recovering fine detail and textures while keeping frames temporally consistent. It works on both generated and real footage, and it pairs naturally with Kandinsky 6.0 Lite and Pro to take drafts to final resolution.",
+ "title": "Queue OpenAPI for fal-ai/kandinsky6-vsr",
+ "version": "1.0.0",
+ "x-fal-metadata": {
+ "about": "Upscale",
+ "category": "video-to-video",
+ "documentationUrl": "https://fal.ai/models/fal-ai/kandinsky6-vsr/api",
+ "endpointId": "fal-ai/kandinsky6-vsr",
+ "playgroundUrl": "https://fal.ai/models/fal-ai/kandinsky6-vsr",
+ "thumbnailUrl": "https://v3b.fal.media/files/b/0aac3fba/vaoMsI4kVX1dEpryoFSID.jpg"
+ }
+ },
+ "openapi": "3.1.0",
+ "paths": {
+ "/fal-ai/kandinsky6-vsr": {
+ "post": {
+ "requestBody": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/Kandinsky6VsrInput"
+ }
+ }
+ },
+ "required": true
+ },
+ "responses": {
+ "200": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/QueueStatus"
+ }
+ }
+ },
+ "description": "The request status."
+ }
+ }
+ }
+ },
+ "/fal-ai/kandinsky6-vsr/requests/{request_id}": {
+ "get": {
+ "parameters": [
+ {
+ "in": "path",
+ "name": "request_id",
+ "required": true,
+ "schema": {
+ "description": "Request ID",
+ "type": "string"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/Kandinsky6VsrOutput"
+ }
+ }
+ },
+ "description": "Result of the request."
+ }
+ }
+ }
+ },
+ "/fal-ai/kandinsky6-vsr/requests/{request_id}/cancel": {
+ "put": {
+ "parameters": [
+ {
+ "in": "path",
+ "name": "request_id",
+ "required": true,
+ "schema": {
+ "description": "Request ID",
+ "type": "string"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "properties": {
+ "success": {
+ "description": "Whether the request was cancelled successfully.",
+ "type": "boolean"
+ }
+ },
+ "type": "object"
+ }
+ }
+ },
+ "description": "The request was cancelled."
+ }
+ }
+ }
+ },
+ "/fal-ai/kandinsky6-vsr/requests/{request_id}/status": {
+ "get": {
+ "parameters": [
+ {
+ "in": "path",
+ "name": "request_id",
+ "required": true,
+ "schema": {
+ "description": "Request ID",
+ "type": "string"
+ }
+ },
+ {
+ "in": "query",
+ "name": "logs",
+ "required": false,
+ "schema": {
+ "description": "Whether to include logs (`1`) in the response or not (`0`).",
+ "type": "number"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/QueueStatus"
+ }
+ }
+ },
+ "description": "The request status."
+ }
+ }
+ }
+ }
+ },
+ "security": [
+ {
+ "apiKeyAuth": []
+ }
+ ],
+ "servers": [
+ {
+ "url": "https://queue.fal.run"
+ }
+ ]
+}
diff --git a/tests/fixtures/provider-schemas/fal/fal-ai__vidu__q4__image-to-video.json b/tests/fixtures/provider-schemas/fal/fal-ai__vidu__q4__image-to-video.json
new file mode 100644
index 00000000..3acb04d7
--- /dev/null
+++ b/tests/fixtures/provider-schemas/fal/fal-ai__vidu__q4__image-to-video.json
@@ -0,0 +1,486 @@
+{
+ "components": {
+ "schemas": {
+ "File": {
+ "properties": {
+ "content_type": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "The mime type of the file.",
+ "examples": [
+ "image/png"
+ ],
+ "title": "Content Type"
+ },
+ "file_name": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "The name of the file. It will be auto-generated if not provided.",
+ "examples": [
+ "z9RV14K95DvU.png"
+ ],
+ "title": "File Name"
+ },
+ "file_size": {
+ "anyOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "The size of the file in bytes.",
+ "examples": [
+ 4404019
+ ],
+ "title": "File Size"
+ },
+ "url": {
+ "description": "The URL where the file can be downloaded from.",
+ "title": "Url",
+ "type": "string"
+ }
+ },
+ "required": [
+ "url"
+ ],
+ "title": "File",
+ "type": "object",
+ "x-fal-order-properties": [
+ "url",
+ "content_type",
+ "file_name",
+ "file_size"
+ ]
+ },
+ "Image": {
+ "description": "Represents an image file.",
+ "properties": {
+ "content_type": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "The mime type of the file.",
+ "examples": [
+ "image/png"
+ ],
+ "title": "Content Type"
+ },
+ "file_name": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "The name of the file. It will be auto-generated if not provided.",
+ "examples": [
+ "z9RV14K95DvU.png"
+ ],
+ "title": "File Name"
+ },
+ "file_size": {
+ "anyOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "The size of the file in bytes.",
+ "examples": [
+ 4404019
+ ],
+ "title": "File Size"
+ },
+ "height": {
+ "anyOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "The height of the image in pixels.",
+ "examples": [
+ 1024
+ ],
+ "title": "Height"
+ },
+ "url": {
+ "description": "The URL where the file can be downloaded from.",
+ "title": "Url",
+ "type": "string"
+ },
+ "width": {
+ "anyOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "The width of the image in pixels.",
+ "examples": [
+ 1024
+ ],
+ "title": "Width"
+ }
+ },
+ "required": [
+ "url"
+ ],
+ "title": "Image",
+ "type": "object",
+ "x-fal-order-properties": [
+ "url",
+ "content_type",
+ "file_name",
+ "file_size",
+ "width",
+ "height"
+ ]
+ },
+ "QueueStatus": {
+ "properties": {
+ "cancel_url": {
+ "description": "The cancel url.",
+ "type": "string"
+ },
+ "logs": {
+ "additionalProperties": true,
+ "description": "The logs.",
+ "type": "object"
+ },
+ "metrics": {
+ "additionalProperties": true,
+ "description": "The metrics.",
+ "type": "object"
+ },
+ "queue_position": {
+ "description": "The queue position.",
+ "type": "integer"
+ },
+ "request_id": {
+ "description": "The request id.",
+ "type": "string"
+ },
+ "response_url": {
+ "description": "The response url.",
+ "type": "string"
+ },
+ "status": {
+ "enum": [
+ "IN_QUEUE",
+ "IN_PROGRESS",
+ "COMPLETED"
+ ],
+ "type": "string"
+ },
+ "status_url": {
+ "description": "The status url.",
+ "type": "string"
+ }
+ },
+ "required": [
+ "status",
+ "request_id"
+ ],
+ "type": "object"
+ },
+ "ViduQ4ImageToVideoInput": {
+ "properties": {
+ "duration": {
+ "default": 5,
+ "description": "Duration of the video in seconds (3-16)",
+ "maximum": 16,
+ "minimum": 3,
+ "title": "Duration",
+ "type": "integer"
+ },
+ "enable_safety_checker": {
+ "default": true,
+ "description": "Authorized callers may set false to request relaxed screening.",
+ "title": "Enable Safety Checker",
+ "type": "boolean"
+ },
+ "image_url": {
+ "description": "URL or base64 data URI of the image to use as the first frame. Supports png, jpeg, jpg and webp up to 50 MB.",
+ "examples": [
+ "https://storage.googleapis.com/falserverless/web-examples/vidu/stylish_woman.webp"
+ ],
+ "title": "Image Url",
+ "type": "string"
+ },
+ "prompt": {
+ "default": "",
+ "description": "Text prompt for video generation, max 5000 characters",
+ "examples": [
+ "The woman turns toward the camera and smiles, then the shot cuts to a close-up as she says: \"Let's go.\""
+ ],
+ "maxLength": 5000,
+ "title": "Prompt",
+ "type": "string"
+ },
+ "resolution": {
+ "default": "720p",
+ "description": "Output video resolution",
+ "enum": [
+ "540p",
+ "720p",
+ "1080p",
+ "2K",
+ "4K"
+ ],
+ "title": "Resolution",
+ "type": "string"
+ },
+ "seed": {
+ "anyOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "Random seed for reproducibility. If None, a random seed is chosen.",
+ "title": "Seed"
+ }
+ },
+ "required": [
+ "image_url"
+ ],
+ "title": "Q4ImageToVideoRequest",
+ "type": "object",
+ "x-fal-order-properties": [
+ "prompt",
+ "image_url",
+ "duration",
+ "seed",
+ "resolution",
+ "enable_safety_checker"
+ ]
+ },
+ "ViduQ4ImageToVideoOutput": {
+ "properties": {
+ "cover_image": {
+ "anyOf": [
+ {
+ "$ref": "#/components/schemas/Image"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "Cover image of the generated video"
+ },
+ "seed": {
+ "description": "The random seed used for generation",
+ "title": "Seed",
+ "type": "integer"
+ },
+ "video": {
+ "$ref": "#/components/schemas/File",
+ "description": "The generated video from image using the Q4 model",
+ "examples": [
+ {
+ "url": "https://v3b.fal.media/files/b/0a8c9189/n9z3uUDPqmU2msAtqr25-_output.mp4"
+ }
+ ]
+ }
+ },
+ "required": [
+ "video",
+ "seed"
+ ],
+ "title": "Q4ImageToVideoOutput",
+ "type": "object",
+ "x-fal-order-properties": [
+ "video",
+ "cover_image",
+ "seed"
+ ]
+ }
+ },
+ "securitySchemes": {
+ "apiKeyAuth": {
+ "description": "Fal Key",
+ "in": "header",
+ "name": "Authorization",
+ "type": "apiKey"
+ }
+ }
+ },
+ "info": {
+ "description": "Vidu Q4 Image-to-Video animates a start frame into a high-fidelity clip while preserving the subject and composition of the source image. Prompts can direct motion, camera cuts, and spoken dialogue, and native audio adds synchronized speech and sound effects. It supports durations from 3 to 16 seconds and output from 540p up to 4K.",
+ "title": "Queue OpenAPI for fal-ai/vidu/q4/image-to-video",
+ "version": "1.0.0",
+ "x-fal-metadata": {
+ "about": "Vidu Q4 Image to Video API: Generate a video with audio from a first-frame image.",
+ "category": "image-to-video",
+ "documentationUrl": "https://fal.ai/models/fal-ai/vidu/q4/image-to-video/api",
+ "endpointId": "fal-ai/vidu/q4/image-to-video",
+ "playgroundUrl": "https://fal.ai/models/fal-ai/vidu/q4/image-to-video",
+ "thumbnailUrl": "https://v3b.fal.media/files/b/0aad2f3f/cmmJZ_YhOejfcxze6tBG6.jpg"
+ }
+ },
+ "openapi": "3.1.0",
+ "paths": {
+ "/fal-ai/vidu/q4/image-to-video": {
+ "post": {
+ "requestBody": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/ViduQ4ImageToVideoInput"
+ }
+ }
+ },
+ "required": true
+ },
+ "responses": {
+ "200": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/QueueStatus"
+ }
+ }
+ },
+ "description": "The request status."
+ }
+ }
+ }
+ },
+ "/fal-ai/vidu/q4/image-to-video/requests/{request_id}": {
+ "get": {
+ "parameters": [
+ {
+ "in": "path",
+ "name": "request_id",
+ "required": true,
+ "schema": {
+ "description": "Request ID",
+ "type": "string"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/ViduQ4ImageToVideoOutput"
+ }
+ }
+ },
+ "description": "Result of the request."
+ }
+ }
+ }
+ },
+ "/fal-ai/vidu/q4/image-to-video/requests/{request_id}/cancel": {
+ "put": {
+ "parameters": [
+ {
+ "in": "path",
+ "name": "request_id",
+ "required": true,
+ "schema": {
+ "description": "Request ID",
+ "type": "string"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "properties": {
+ "success": {
+ "description": "Whether the request was cancelled successfully.",
+ "type": "boolean"
+ }
+ },
+ "type": "object"
+ }
+ }
+ },
+ "description": "The request was cancelled."
+ }
+ }
+ }
+ },
+ "/fal-ai/vidu/q4/image-to-video/requests/{request_id}/status": {
+ "get": {
+ "parameters": [
+ {
+ "in": "path",
+ "name": "request_id",
+ "required": true,
+ "schema": {
+ "description": "Request ID",
+ "type": "string"
+ }
+ },
+ {
+ "in": "query",
+ "name": "logs",
+ "required": false,
+ "schema": {
+ "description": "Whether to include logs (`1`) in the response or not (`0`).",
+ "type": "number"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/QueueStatus"
+ }
+ }
+ },
+ "description": "The request status."
+ }
+ }
+ }
+ }
+ },
+ "security": [
+ {
+ "apiKeyAuth": []
+ }
+ ],
+ "servers": [
+ {
+ "url": "https://queue.fal.run"
+ }
+ ]
+}
diff --git a/tests/fixtures/provider-schemas/fal/fal-ai__vidu__q4__reference-to-video.json b/tests/fixtures/provider-schemas/fal/fal-ai__vidu__q4__reference-to-video.json
new file mode 100644
index 00000000..71bc7d86
--- /dev/null
+++ b/tests/fixtures/provider-schemas/fal/fal-ai__vidu__q4__reference-to-video.json
@@ -0,0 +1,522 @@
+{
+ "components": {
+ "schemas": {
+ "File": {
+ "properties": {
+ "content_type": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "The mime type of the file.",
+ "examples": [
+ "image/png"
+ ],
+ "title": "Content Type"
+ },
+ "file_name": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "The name of the file. It will be auto-generated if not provided.",
+ "examples": [
+ "z9RV14K95DvU.png"
+ ],
+ "title": "File Name"
+ },
+ "file_size": {
+ "anyOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "The size of the file in bytes.",
+ "examples": [
+ 4404019
+ ],
+ "title": "File Size"
+ },
+ "url": {
+ "description": "The URL where the file can be downloaded from.",
+ "title": "Url",
+ "type": "string"
+ }
+ },
+ "required": [
+ "url"
+ ],
+ "title": "File",
+ "type": "object",
+ "x-fal-order-properties": [
+ "url",
+ "content_type",
+ "file_name",
+ "file_size"
+ ]
+ },
+ "Image": {
+ "description": "Represents an image file.",
+ "properties": {
+ "content_type": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "The mime type of the file.",
+ "examples": [
+ "image/png"
+ ],
+ "title": "Content Type"
+ },
+ "file_name": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "The name of the file. It will be auto-generated if not provided.",
+ "examples": [
+ "z9RV14K95DvU.png"
+ ],
+ "title": "File Name"
+ },
+ "file_size": {
+ "anyOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "The size of the file in bytes.",
+ "examples": [
+ 4404019
+ ],
+ "title": "File Size"
+ },
+ "height": {
+ "anyOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "The height of the image in pixels.",
+ "examples": [
+ 1024
+ ],
+ "title": "Height"
+ },
+ "url": {
+ "description": "The URL where the file can be downloaded from.",
+ "title": "Url",
+ "type": "string"
+ },
+ "width": {
+ "anyOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "The width of the image in pixels.",
+ "examples": [
+ 1024
+ ],
+ "title": "Width"
+ }
+ },
+ "required": [
+ "url"
+ ],
+ "title": "Image",
+ "type": "object",
+ "x-fal-order-properties": [
+ "url",
+ "content_type",
+ "file_name",
+ "file_size",
+ "width",
+ "height"
+ ]
+ },
+ "QueueStatus": {
+ "properties": {
+ "cancel_url": {
+ "description": "The cancel url.",
+ "type": "string"
+ },
+ "logs": {
+ "additionalProperties": true,
+ "description": "The logs.",
+ "type": "object"
+ },
+ "metrics": {
+ "additionalProperties": true,
+ "description": "The metrics.",
+ "type": "object"
+ },
+ "queue_position": {
+ "description": "The queue position.",
+ "type": "integer"
+ },
+ "request_id": {
+ "description": "The request id.",
+ "type": "string"
+ },
+ "response_url": {
+ "description": "The response url.",
+ "type": "string"
+ },
+ "status": {
+ "enum": [
+ "IN_QUEUE",
+ "IN_PROGRESS",
+ "COMPLETED"
+ ],
+ "type": "string"
+ },
+ "status_url": {
+ "description": "The status url.",
+ "type": "string"
+ }
+ },
+ "required": [
+ "status",
+ "request_id"
+ ],
+ "type": "object"
+ },
+ "ViduQ4ReferenceToVideoInput": {
+ "properties": {
+ "aspect_ratio": {
+ "default": "16:9",
+ "description": "The aspect ratio of the output video",
+ "enum": [
+ "16:9",
+ "9:16",
+ "4:3",
+ "3:4",
+ "1:1"
+ ],
+ "title": "Aspect Ratio",
+ "type": "string"
+ },
+ "audio": {
+ "default": false,
+ "description": "Whether to generate audio (dialogue and sound effects) with the video. When false, the output video is silent.",
+ "title": "Audio",
+ "type": "boolean"
+ },
+ "duration": {
+ "default": 5,
+ "description": "Duration of the video in seconds (3-16)",
+ "maximum": 16,
+ "minimum": 3,
+ "title": "Duration",
+ "type": "integer"
+ },
+ "enable_safety_checker": {
+ "default": true,
+ "description": "Authorized callers may set false to request relaxed screening.",
+ "title": "Enable Safety Checker",
+ "type": "boolean"
+ },
+ "prompt": {
+ "description": "Text prompt for video generation, max 5000 characters. Refer to references by their position in the lists: [@reference_image_1], [@reference_image_2], ... for images and [reference_audio_1], [reference_audio_2], ... for audio clips.",
+ "examples": [
+ "[@reference_image_1] walks along the beach at sunset holding [@reference_image_2], then turns to the camera and speaks in the voice of [reference_audio_1]."
+ ],
+ "maxLength": 5000,
+ "minLength": 1,
+ "title": "Prompt",
+ "type": "string"
+ },
+ "reference_audio_urls": {
+ "description": "URLs or base64 data URIs of up to 3 mp3 reference audio clips (3-12 seconds each, max 50 MB) used to keep voices consistent.",
+ "items": {
+ "type": "string"
+ },
+ "title": "Reference Audio Urls",
+ "type": "array"
+ },
+ "reference_image_urls": {
+ "description": "URLs or base64 data URIs of up to 12 reference images (png, jpeg, jpg, webp) used to keep subjects consistent.",
+ "examples": [
+ [
+ "https://storage.googleapis.com/falserverless/web-examples/vidu/new-examples/reference1.png",
+ "https://storage.googleapis.com/falserverless/web-examples/vidu/new-examples/reference2.png"
+ ]
+ ],
+ "items": {
+ "type": "string"
+ },
+ "title": "Reference Image Urls",
+ "type": "array"
+ },
+ "resolution": {
+ "default": "720p",
+ "description": "Output video resolution",
+ "enum": [
+ "540p",
+ "720p",
+ "1080p",
+ "2K",
+ "4K"
+ ],
+ "title": "Resolution",
+ "type": "string"
+ },
+ "seed": {
+ "anyOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "Random seed for reproducibility. If None, a random seed is chosen.",
+ "title": "Seed"
+ }
+ },
+ "required": [
+ "prompt"
+ ],
+ "title": "Q4ReferenceToVideoRequest",
+ "type": "object",
+ "x-fal-order-properties": [
+ "prompt",
+ "reference_image_urls",
+ "reference_audio_urls",
+ "duration",
+ "seed",
+ "aspect_ratio",
+ "resolution",
+ "audio",
+ "enable_safety_checker"
+ ]
+ },
+ "ViduQ4ReferenceToVideoOutput": {
+ "properties": {
+ "cover_image": {
+ "anyOf": [
+ {
+ "$ref": "#/components/schemas/Image"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "Cover image of the generated video"
+ },
+ "seed": {
+ "description": "The random seed used for generation",
+ "title": "Seed",
+ "type": "integer"
+ },
+ "video": {
+ "$ref": "#/components/schemas/File",
+ "description": "The generated video from references using the Q4 Preview model",
+ "examples": [
+ {
+ "url": "https://v3b.fal.media/files/b/0a8c9189/n9z3uUDPqmU2msAtqr25-_output.mp4"
+ }
+ ]
+ }
+ },
+ "required": [
+ "video",
+ "seed"
+ ],
+ "title": "Q4ReferenceToVideoOutput",
+ "type": "object",
+ "x-fal-order-properties": [
+ "video",
+ "cover_image",
+ "seed"
+ ]
+ }
+ },
+ "securitySchemes": {
+ "apiKeyAuth": {
+ "description": "Fal Key",
+ "in": "header",
+ "name": "Authorization",
+ "type": "apiKey"
+ }
+ }
+ },
+ "info": {
+ "description": "Vidu Q4 Reference-to-Video builds a scene from your references. You tag up to 12 images (characters, products, objects, locations) and up to 3 voice clips directly in the prompt, and the model keeps each subject and voice consistent throughout the clip. It supports optional native audio with dialogue and sound effects, durations from 3 to 16 seconds, five aspect ratios, and output from 540p up to 4K, which makes it well suited for branded content, character-driven storytelling, and ads.",
+ "title": "Queue OpenAPI for fal-ai/vidu/q4/reference-to-video",
+ "version": "1.0.0",
+ "x-fal-metadata": {
+ "about": "Vidu Q4 Preview Reference to Video API: Generate a video from reference images and voices.",
+ "category": "image-to-video",
+ "documentationUrl": "https://fal.ai/models/fal-ai/vidu/q4/reference-to-video/api",
+ "endpointId": "fal-ai/vidu/q4/reference-to-video",
+ "playgroundUrl": "https://fal.ai/models/fal-ai/vidu/q4/reference-to-video",
+ "thumbnailUrl": "https://v3b.fal.media/files/b/0aad2f50/VDsdBXEj3Vk134o2SqAVM.jpg"
+ }
+ },
+ "openapi": "3.1.0",
+ "paths": {
+ "/fal-ai/vidu/q4/reference-to-video": {
+ "post": {
+ "requestBody": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/ViduQ4ReferenceToVideoInput"
+ }
+ }
+ },
+ "required": true
+ },
+ "responses": {
+ "200": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/QueueStatus"
+ }
+ }
+ },
+ "description": "The request status."
+ }
+ }
+ }
+ },
+ "/fal-ai/vidu/q4/reference-to-video/requests/{request_id}": {
+ "get": {
+ "parameters": [
+ {
+ "in": "path",
+ "name": "request_id",
+ "required": true,
+ "schema": {
+ "description": "Request ID",
+ "type": "string"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/ViduQ4ReferenceToVideoOutput"
+ }
+ }
+ },
+ "description": "Result of the request."
+ }
+ }
+ }
+ },
+ "/fal-ai/vidu/q4/reference-to-video/requests/{request_id}/cancel": {
+ "put": {
+ "parameters": [
+ {
+ "in": "path",
+ "name": "request_id",
+ "required": true,
+ "schema": {
+ "description": "Request ID",
+ "type": "string"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "properties": {
+ "success": {
+ "description": "Whether the request was cancelled successfully.",
+ "type": "boolean"
+ }
+ },
+ "type": "object"
+ }
+ }
+ },
+ "description": "The request was cancelled."
+ }
+ }
+ }
+ },
+ "/fal-ai/vidu/q4/reference-to-video/requests/{request_id}/status": {
+ "get": {
+ "parameters": [
+ {
+ "in": "path",
+ "name": "request_id",
+ "required": true,
+ "schema": {
+ "description": "Request ID",
+ "type": "string"
+ }
+ },
+ {
+ "in": "query",
+ "name": "logs",
+ "required": false,
+ "schema": {
+ "description": "Whether to include logs (`1`) in the response or not (`0`).",
+ "type": "number"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/QueueStatus"
+ }
+ }
+ },
+ "description": "The request status."
+ }
+ }
+ }
+ }
+ },
+ "security": [
+ {
+ "apiKeyAuth": []
+ }
+ ],
+ "servers": [
+ {
+ "url": "https://queue.fal.run"
+ }
+ ]
+}
diff --git a/tests/fixtures/provider-schemas/fal/fal-ai__wan__v2.2-a14b__image-to-video.json b/tests/fixtures/provider-schemas/fal/fal-ai__wan__v2.2-a14b__image-to-video.json
new file mode 100644
index 00000000..b394e661
--- /dev/null
+++ b/tests/fixtures/provider-schemas/fal/fal-ai__wan__v2.2-a14b__image-to-video.json
@@ -0,0 +1,594 @@
+{
+ "components": {
+ "schemas": {
+ "File": {
+ "properties": {
+ "content_type": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "The mime type of the file.",
+ "examples": [
+ "image/png"
+ ],
+ "title": "Content Type"
+ },
+ "file_name": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "The name of the file. It will be auto-generated if not provided.",
+ "examples": [
+ "z9RV14K95DvU.png"
+ ],
+ "title": "File Name"
+ },
+ "file_size": {
+ "anyOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "The size of the file in bytes.",
+ "examples": [
+ 4404019
+ ],
+ "title": "File Size"
+ },
+ "url": {
+ "description": "The URL where the file can be downloaded from.",
+ "title": "Url",
+ "type": "string"
+ }
+ },
+ "required": [
+ "url"
+ ],
+ "title": "File",
+ "type": "object",
+ "x-fal-order-properties": [
+ "url",
+ "content_type",
+ "file_name",
+ "file_size"
+ ]
+ },
+ "QueueStatus": {
+ "properties": {
+ "cancel_url": {
+ "description": "The cancel url.",
+ "type": "string"
+ },
+ "logs": {
+ "additionalProperties": true,
+ "description": "The logs.",
+ "type": "object"
+ },
+ "metrics": {
+ "additionalProperties": true,
+ "description": "The metrics.",
+ "type": "object"
+ },
+ "queue_position": {
+ "description": "The queue position.",
+ "type": "integer"
+ },
+ "request_id": {
+ "description": "The request id.",
+ "type": "string"
+ },
+ "response_url": {
+ "description": "The response url.",
+ "type": "string"
+ },
+ "status": {
+ "enum": [
+ "IN_QUEUE",
+ "IN_PROGRESS",
+ "COMPLETED"
+ ],
+ "type": "string"
+ },
+ "status_url": {
+ "description": "The status url.",
+ "type": "string"
+ }
+ },
+ "required": [
+ "status",
+ "request_id"
+ ],
+ "type": "object"
+ },
+ "WanV22A14bImageToVideoInput": {
+ "properties": {
+ "acceleration": {
+ "default": "regular",
+ "description": "Acceleration level to use. The more acceleration, the faster the generation, but with lower quality. The recommended value is 'regular'.",
+ "enum": [
+ "none",
+ "regular"
+ ],
+ "examples": [
+ "regular"
+ ],
+ "title": "Acceleration",
+ "type": "string"
+ },
+ "adjust_fps_for_interpolation": {
+ "default": true,
+ "description": "If true, the number of frames per second will be multiplied by the number of interpolated frames plus one. For example, if the generated frames per second is 16 and the number of interpolated frames is 1, the final frames per second will be 32. If false, the passed frames per second will be used as-is.",
+ "examples": [
+ true
+ ],
+ "title": "Adjust FPS for Interpolation",
+ "type": "boolean"
+ },
+ "aspect_ratio": {
+ "default": "auto",
+ "description": "Aspect ratio of the generated video. If 'auto', the aspect ratio will be determined automatically based on the input image.",
+ "enum": [
+ "auto",
+ "16:9",
+ "9:16",
+ "1:1"
+ ],
+ "title": "Aspect Ratio",
+ "type": "string"
+ },
+ "enable_output_safety_checker": {
+ "default": false,
+ "description": "If set to true, output video will be checked for safety after generation.",
+ "examples": [
+ false
+ ],
+ "title": "Enable Output Safety Checker",
+ "type": "boolean"
+ },
+ "enable_prompt_expansion": {
+ "default": false,
+ "description": "Whether to enable prompt expansion. This will use a large language model to expand the prompt with additional details while maintaining the original meaning.",
+ "examples": [
+ false
+ ],
+ "title": "Enable Prompt Expansion",
+ "type": "boolean"
+ },
+ "enable_safety_checker": {
+ "default": false,
+ "description": "If set to true, input data will be checked for safety before processing. Disabling it requires account authorization; unauthorized requests are always checked.",
+ "examples": [
+ true
+ ],
+ "title": "Enable Safety Checker",
+ "type": "boolean"
+ },
+ "end_image_url": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "URL of the end image.",
+ "title": "End Image URL"
+ },
+ "frames_per_second": {
+ "anyOf": [
+ {
+ "maximum": 60,
+ "minimum": 4,
+ "type": "integer"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": 16,
+ "description": "Frames per second of the generated video. Must be between 4 to 60. When using interpolation and `adjust_fps_for_interpolation` is set to true (default true,) the final FPS will be multiplied by the number of interpolated frames plus one. For example, if the generated frames per second is 16 and the number of interpolated frames is 1, the final frames per second will be 32. If `adjust_fps_for_interpolation` is set to false, this value will be used as-is.",
+ "examples": [
+ 16
+ ],
+ "title": "Frames per Second"
+ },
+ "guidance_scale": {
+ "default": 3.5,
+ "description": "Classifier-free guidance scale. Higher values give better adherence to the prompt but may decrease quality.",
+ "examples": [
+ 3.5
+ ],
+ "maximum": 10,
+ "minimum": 1,
+ "title": "Guidance Scale (1st Stage)",
+ "type": "number"
+ },
+ "guidance_scale_2": {
+ "default": 3.5,
+ "description": "Guidance scale for the second stage of the model. This is used to control the adherence to the prompt in the second stage of the model.",
+ "examples": [
+ 3.5
+ ],
+ "maximum": 10,
+ "minimum": 1,
+ "title": "Guidance Scale (2nd Stage)",
+ "type": "number"
+ },
+ "image_url": {
+ "description": "URL of the input image. If the input image does not match the chosen aspect ratio, it is resized and center cropped.",
+ "examples": [
+ "https://storage.googleapis.com/falserverless/model_tests/wan/dragon-warrior.jpg"
+ ],
+ "title": "Image URL",
+ "type": "string"
+ },
+ "interpolator_model": {
+ "default": "film",
+ "description": "The model to use for frame interpolation. If None, no interpolation is applied.",
+ "enum": [
+ "none",
+ "film",
+ "rife"
+ ],
+ "examples": [
+ "film"
+ ],
+ "title": "Interpolator Model",
+ "type": "string"
+ },
+ "negative_prompt": {
+ "default": "",
+ "description": "Negative prompt for video generation.",
+ "title": "Negative Prompt",
+ "type": "string"
+ },
+ "num_frames": {
+ "default": 81,
+ "description": "Number of frames to generate. Must be between 17 to 161 (inclusive).",
+ "examples": [
+ 81
+ ],
+ "maximum": 161,
+ "minimum": 17,
+ "title": "Number of Frames",
+ "type": "integer"
+ },
+ "num_inference_steps": {
+ "default": 27,
+ "description": "Number of inference steps for sampling. Higher values give better quality but take longer.",
+ "examples": [
+ 27
+ ],
+ "maximum": 40,
+ "minimum": 2,
+ "title": "Number of Inference Steps",
+ "type": "integer"
+ },
+ "num_interpolated_frames": {
+ "default": 1,
+ "description": "Number of frames to interpolate between each pair of generated frames. Must be between 0 and 4.",
+ "examples": [
+ 1
+ ],
+ "maximum": 4,
+ "minimum": 0,
+ "title": "Number of Interpolated Frames",
+ "type": "integer"
+ },
+ "prompt": {
+ "description": "The text prompt to guide video generation.",
+ "examples": [
+ "The white dragon warrior stands still, eyes full of determination and strength. The camera slowly moves closer or circles around the warrior, highlighting the powerful presence and heroic spirit of the character."
+ ],
+ "title": "Prompt",
+ "type": "string"
+ },
+ "resolution": {
+ "default": "720p",
+ "description": "Resolution of the generated video (480p, 580p, or 720p).",
+ "enum": [
+ "480p",
+ "580p",
+ "720p"
+ ],
+ "examples": [
+ "720p"
+ ],
+ "title": "Resolution",
+ "type": "string"
+ },
+ "seed": {
+ "anyOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "Random seed for reproducibility. If None, a random seed is chosen.",
+ "title": "Seed"
+ },
+ "shift": {
+ "default": 5,
+ "description": "Shift value for the video. Must be between 1.0 and 10.0.",
+ "examples": [
+ 5
+ ],
+ "maximum": 10,
+ "minimum": 1,
+ "title": "Shift",
+ "type": "number"
+ },
+ "video_quality": {
+ "default": "high",
+ "description": "The quality of the output video. Higher quality means better visual quality but larger file size.",
+ "enum": [
+ "low",
+ "medium",
+ "high",
+ "maximum"
+ ],
+ "examples": [
+ "high"
+ ],
+ "title": "Video Quality",
+ "type": "string"
+ },
+ "video_write_mode": {
+ "default": "balanced",
+ "description": "The write mode of the output video. Faster write mode means faster results but larger file size, balanced write mode is a good compromise between speed and quality, and small write mode is the slowest but produces the smallest file size.",
+ "enum": [
+ "fast",
+ "balanced",
+ "small"
+ ],
+ "examples": [
+ "balanced"
+ ],
+ "title": "Video Write Mode",
+ "type": "string"
+ }
+ },
+ "required": [
+ "prompt",
+ "image_url"
+ ],
+ "title": "WanI2VRequest",
+ "type": "object",
+ "x-fal-order-properties": [
+ "image_url",
+ "prompt",
+ "num_frames",
+ "frames_per_second",
+ "negative_prompt",
+ "seed",
+ "resolution",
+ "aspect_ratio",
+ "num_inference_steps",
+ "enable_safety_checker",
+ "enable_output_safety_checker",
+ "enable_prompt_expansion",
+ "acceleration",
+ "guidance_scale",
+ "guidance_scale_2",
+ "shift",
+ "interpolator_model",
+ "num_interpolated_frames",
+ "adjust_fps_for_interpolation",
+ "video_quality",
+ "video_write_mode",
+ "end_image_url"
+ ]
+ },
+ "WanV22A14bImageToVideoOutput": {
+ "properties": {
+ "prompt": {
+ "default": "",
+ "description": "The text prompt used for video generation.",
+ "examples": [
+ "The white dragon warrior stands still, eyes full of determination and strength. The camera slowly moves closer or circles around the warrior, highlighting the powerful presence and heroic spirit of the character."
+ ],
+ "title": "Prompt",
+ "type": "string"
+ },
+ "seed": {
+ "description": "The seed used for generation.",
+ "title": "Seed",
+ "type": "integer"
+ },
+ "video": {
+ "$ref": "#/components/schemas/File",
+ "description": "The generated video file.",
+ "examples": [
+ {
+ "url": "https://v3.fal.media/files/lion/Fbuh3lO_HMT-pS0DATbio_tmp08c3v477.mp4"
+ }
+ ]
+ }
+ },
+ "required": [
+ "video",
+ "seed"
+ ],
+ "title": "WanI2VResponse",
+ "type": "object",
+ "x-fal-order-properties": [
+ "video",
+ "prompt",
+ "seed"
+ ]
+ }
+ },
+ "securitySchemes": {
+ "apiKeyAuth": {
+ "description": "Fal Key",
+ "in": "header",
+ "name": "Authorization",
+ "type": "apiKey"
+ }
+ }
+ },
+ "info": {
+ "description": "The OpenAPI schema for the fal-ai/wan/v2.2-a14b/image-to-video queue.",
+ "title": "Queue OpenAPI for fal-ai/wan/v2.2-a14b/image-to-video",
+ "version": "1.0.0",
+ "x-fal-metadata": {
+ "about": "Endpoint for generating a video from an image.",
+ "category": "image-to-video",
+ "documentationUrl": "https://fal.ai/models/fal-ai/wan/v2.2-a14b/image-to-video/api",
+ "endpointId": "fal-ai/wan/v2.2-a14b/image-to-video",
+ "playgroundUrl": "https://fal.ai/models/fal-ai/wan/v2.2-a14b/image-to-video",
+ "thumbnailUrl": "https://v3.fal.media/files/penguin/xWl1TIQn-uRe7BsctByJk_3e01d1a4f7ff488c9483be0d81f5a3cc.jpg"
+ }
+ },
+ "openapi": "3.1.0",
+ "paths": {
+ "/fal-ai/wan/v2.2-a14b/image-to-video": {
+ "post": {
+ "requestBody": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/WanV22A14bImageToVideoInput"
+ }
+ }
+ },
+ "required": true
+ },
+ "responses": {
+ "200": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/QueueStatus"
+ }
+ }
+ },
+ "description": "The request status."
+ }
+ }
+ }
+ },
+ "/fal-ai/wan/v2.2-a14b/image-to-video/requests/{request_id}": {
+ "get": {
+ "parameters": [
+ {
+ "in": "path",
+ "name": "request_id",
+ "required": true,
+ "schema": {
+ "description": "Request ID",
+ "type": "string"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/WanV22A14bImageToVideoOutput"
+ }
+ }
+ },
+ "description": "Result of the request."
+ }
+ }
+ }
+ },
+ "/fal-ai/wan/v2.2-a14b/image-to-video/requests/{request_id}/cancel": {
+ "put": {
+ "parameters": [
+ {
+ "in": "path",
+ "name": "request_id",
+ "required": true,
+ "schema": {
+ "description": "Request ID",
+ "type": "string"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "properties": {
+ "success": {
+ "description": "Whether the request was cancelled successfully.",
+ "type": "boolean"
+ }
+ },
+ "type": "object"
+ }
+ }
+ },
+ "description": "The request was cancelled."
+ }
+ }
+ }
+ },
+ "/fal-ai/wan/v2.2-a14b/image-to-video/requests/{request_id}/status": {
+ "get": {
+ "parameters": [
+ {
+ "in": "path",
+ "name": "request_id",
+ "required": true,
+ "schema": {
+ "description": "Request ID",
+ "type": "string"
+ }
+ },
+ {
+ "in": "query",
+ "name": "logs",
+ "required": false,
+ "schema": {
+ "description": "Whether to include logs (`1`) in the response or not (`0`).",
+ "type": "number"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/QueueStatus"
+ }
+ }
+ },
+ "description": "The request status."
+ }
+ }
+ }
+ }
+ },
+ "security": [
+ {
+ "apiKeyAuth": []
+ }
+ ],
+ "servers": [
+ {
+ "url": "https://queue.fal.run"
+ }
+ ]
+}
diff --git a/tests/fixtures/provider-schemas/fal/fal-ai__wan__v2.2-a14b__image-to-video__lora.json b/tests/fixtures/provider-schemas/fal/fal-ai__wan__v2.2-a14b__image-to-video__lora.json
new file mode 100644
index 00000000..0b57cd6e
--- /dev/null
+++ b/tests/fixtures/provider-schemas/fal/fal-ai__wan__v2.2-a14b__image-to-video__lora.json
@@ -0,0 +1,662 @@
+{
+ "components": {
+ "schemas": {
+ "File": {
+ "properties": {
+ "content_type": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "The mime type of the file.",
+ "examples": [
+ "image/png"
+ ],
+ "title": "Content Type"
+ },
+ "file_name": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "The name of the file. It will be auto-generated if not provided.",
+ "examples": [
+ "z9RV14K95DvU.png"
+ ],
+ "title": "File Name"
+ },
+ "file_size": {
+ "anyOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "The size of the file in bytes.",
+ "examples": [
+ 4404019
+ ],
+ "title": "File Size"
+ },
+ "url": {
+ "description": "The URL where the file can be downloaded from.",
+ "title": "Url",
+ "type": "string"
+ }
+ },
+ "required": [
+ "url"
+ ],
+ "title": "File",
+ "type": "object",
+ "x-fal-order-properties": [
+ "url",
+ "content_type",
+ "file_name",
+ "file_size"
+ ]
+ },
+ "LoRAWeight": {
+ "properties": {
+ "path": {
+ "description": "URL or the path to the LoRA weights.",
+ "title": "Path",
+ "type": "string"
+ },
+ "scale": {
+ "default": 1,
+ "description": "\n The scale of the LoRA weight. This is used to scale the LoRA weight\n before merging it with the base model.\n ",
+ "maximum": 4,
+ "minimum": 0,
+ "title": "Scale",
+ "type": "number"
+ },
+ "transformer": {
+ "default": "high",
+ "description": "Specifies the transformer to load the lora weight into. 'high' loads into the high-noise transformer, 'low' loads it into the low-noise transformer, while 'both' loads the LoRA into both transformers.",
+ "enum": [
+ "high",
+ "low",
+ "both"
+ ],
+ "title": "Transformer",
+ "type": "string"
+ },
+ "weight_name": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "Name of the LoRA weight. Used only if `path` is a Hugging Face repository, and required only if you have more than 1 safetensors file in the repo.",
+ "title": "Weight Name"
+ }
+ },
+ "required": [
+ "path"
+ ],
+ "title": "LoRAWeight",
+ "type": "object",
+ "x-fal-order-properties": [
+ "path",
+ "weight_name",
+ "scale",
+ "transformer"
+ ]
+ },
+ "QueueStatus": {
+ "properties": {
+ "cancel_url": {
+ "description": "The cancel url.",
+ "type": "string"
+ },
+ "logs": {
+ "additionalProperties": true,
+ "description": "The logs.",
+ "type": "object"
+ },
+ "metrics": {
+ "additionalProperties": true,
+ "description": "The metrics.",
+ "type": "object"
+ },
+ "queue_position": {
+ "description": "The queue position.",
+ "type": "integer"
+ },
+ "request_id": {
+ "description": "The request id.",
+ "type": "string"
+ },
+ "response_url": {
+ "description": "The response url.",
+ "type": "string"
+ },
+ "status": {
+ "enum": [
+ "IN_QUEUE",
+ "IN_PROGRESS",
+ "COMPLETED"
+ ],
+ "type": "string"
+ },
+ "status_url": {
+ "description": "The status url.",
+ "type": "string"
+ }
+ },
+ "required": [
+ "status",
+ "request_id"
+ ],
+ "type": "object"
+ },
+ "WanV22A14bImageToVideoLoraInput": {
+ "properties": {
+ "acceleration": {
+ "default": "regular",
+ "description": "Acceleration level to use. The more acceleration, the faster the generation, but with lower quality. The recommended value is 'regular'.",
+ "enum": [
+ "none",
+ "regular"
+ ],
+ "examples": [
+ "regular"
+ ],
+ "title": "Acceleration",
+ "type": "string"
+ },
+ "adjust_fps_for_interpolation": {
+ "default": true,
+ "description": "If true, the number of frames per second will be multiplied by the number of interpolated frames plus one. For example, if the generated frames per second is 16 and the number of interpolated frames is 1, the final frames per second will be 32. If false, the passed frames per second will be used as-is.",
+ "examples": [
+ true
+ ],
+ "title": "Adjust FPS for Interpolation",
+ "type": "boolean"
+ },
+ "aspect_ratio": {
+ "default": "auto",
+ "description": "Aspect ratio of the generated video. If 'auto', the aspect ratio will be determined automatically based on the input image.",
+ "enum": [
+ "auto",
+ "16:9",
+ "9:16",
+ "1:1"
+ ],
+ "title": "Aspect Ratio",
+ "type": "string"
+ },
+ "enable_output_safety_checker": {
+ "default": false,
+ "description": "If set to true, output video will be checked for safety after generation.",
+ "examples": [
+ false
+ ],
+ "title": "Enable Output Safety Checker",
+ "type": "boolean"
+ },
+ "enable_prompt_expansion": {
+ "default": false,
+ "description": "Whether to enable prompt expansion. This will use a large language model to expand the prompt with additional details while maintaining the original meaning.",
+ "examples": [
+ false
+ ],
+ "title": "Enable Prompt Expansion",
+ "type": "boolean"
+ },
+ "enable_safety_checker": {
+ "default": false,
+ "description": "If set to true, input data will be checked for safety before processing. Disabling it requires account authorization; unauthorized requests are always checked.",
+ "examples": [
+ true
+ ],
+ "title": "Enable Safety Checker",
+ "type": "boolean"
+ },
+ "end_image_url": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "URL of the end image.",
+ "title": "End Image URL"
+ },
+ "frames_per_second": {
+ "anyOf": [
+ {
+ "maximum": 60,
+ "minimum": 4,
+ "type": "integer"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": 16,
+ "description": "Frames per second of the generated video. Must be between 4 to 60. When using interpolation and `adjust_fps_for_interpolation` is set to true (default true,) the final FPS will be multiplied by the number of interpolated frames plus one. For example, if the generated frames per second is 16 and the number of interpolated frames is 1, the final frames per second will be 32. If `adjust_fps_for_interpolation` is set to false, this value will be used as-is.",
+ "examples": [
+ 16
+ ],
+ "title": "Frames per Second"
+ },
+ "guidance_scale": {
+ "default": 3.5,
+ "description": "Classifier-free guidance scale. Higher values give better adherence to the prompt but may decrease quality.",
+ "examples": [
+ 3.5
+ ],
+ "maximum": 10,
+ "minimum": 1,
+ "title": "Guidance Scale (1st Stage)",
+ "type": "number"
+ },
+ "guidance_scale_2": {
+ "default": 4,
+ "description": "Guidance scale for the second stage of the model. This is used to control the adherence to the prompt in the second stage of the model.",
+ "examples": [
+ 4
+ ],
+ "maximum": 10,
+ "minimum": 1,
+ "title": "Guidance Scale (2nd Stage)",
+ "type": "number"
+ },
+ "image_url": {
+ "description": "URL of the input image. If the input image does not match the chosen aspect ratio, it is resized and center cropped.",
+ "examples": [
+ "https://storage.googleapis.com/falserverless/gallery/car_720p.png"
+ ],
+ "title": "Image URL",
+ "type": "string"
+ },
+ "interpolator_model": {
+ "default": "film",
+ "description": "The model to use for frame interpolation. If None, no interpolation is applied.",
+ "enum": [
+ "none",
+ "film",
+ "rife"
+ ],
+ "examples": [
+ "film"
+ ],
+ "title": "Interpolator Model",
+ "type": "string"
+ },
+ "loras": {
+ "default": [],
+ "description": "LoRA weights to be used in the inference.",
+ "items": {
+ "$ref": "#/components/schemas/LoRAWeight"
+ },
+ "title": "Loras",
+ "type": "array"
+ },
+ "negative_prompt": {
+ "default": "",
+ "description": "Negative prompt for video generation.",
+ "title": "Negative Prompt",
+ "type": "string"
+ },
+ "num_frames": {
+ "default": 81,
+ "description": "Number of frames to generate. Must be between 17 to 161 (inclusive).",
+ "examples": [
+ 81
+ ],
+ "maximum": 161,
+ "minimum": 17,
+ "title": "Number of Frames",
+ "type": "integer"
+ },
+ "num_inference_steps": {
+ "default": 27,
+ "description": "Number of inference steps for sampling. Higher values give better quality but take longer.",
+ "examples": [
+ 27
+ ],
+ "maximum": 40,
+ "minimum": 2,
+ "title": "Number of Inference Steps",
+ "type": "integer"
+ },
+ "num_interpolated_frames": {
+ "default": 1,
+ "description": "Number of frames to interpolate between each pair of generated frames. Must be between 0 and 4.",
+ "examples": [
+ 1
+ ],
+ "maximum": 4,
+ "minimum": 0,
+ "title": "Number of Interpolated Frames",
+ "type": "integer"
+ },
+ "prompt": {
+ "description": "The text prompt to guide video generation.",
+ "examples": [
+ "Cars racing in slow motion"
+ ],
+ "title": "Prompt",
+ "type": "string"
+ },
+ "resolution": {
+ "default": "720p",
+ "description": "Resolution of the generated video (480p, 580p, or 720p).",
+ "enum": [
+ "480p",
+ "580p",
+ "720p"
+ ],
+ "examples": [
+ "720p"
+ ],
+ "title": "Resolution",
+ "type": "string"
+ },
+ "reverse_video": {
+ "default": false,
+ "description": "If true, the video will be reversed.",
+ "title": "Reverse Video",
+ "type": "boolean"
+ },
+ "seed": {
+ "anyOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "Random seed for reproducibility. If None, a random seed is chosen.",
+ "title": "Seed"
+ },
+ "shift": {
+ "default": 5,
+ "description": "Shift value for the video. Must be between 1.0 and 10.0.",
+ "examples": [
+ 5
+ ],
+ "maximum": 10,
+ "minimum": 1,
+ "title": "Shift",
+ "type": "number"
+ },
+ "video_quality": {
+ "default": "high",
+ "description": "The quality of the output video. Higher quality means better visual quality but larger file size.",
+ "enum": [
+ "low",
+ "medium",
+ "high",
+ "maximum"
+ ],
+ "examples": [
+ "high"
+ ],
+ "title": "Video Quality",
+ "type": "string"
+ },
+ "video_write_mode": {
+ "default": "balanced",
+ "description": "The write mode of the output video. Faster write mode means faster results but larger file size, balanced write mode is a good compromise between speed and quality, and small write mode is the slowest but produces the smallest file size.",
+ "enum": [
+ "fast",
+ "balanced",
+ "small"
+ ],
+ "examples": [
+ "balanced"
+ ],
+ "title": "Video Write Mode",
+ "type": "string"
+ }
+ },
+ "required": [
+ "prompt",
+ "image_url"
+ ],
+ "title": "WanLoRAI2VRequest",
+ "type": "object",
+ "x-fal-order-properties": [
+ "image_url",
+ "prompt",
+ "num_frames",
+ "frames_per_second",
+ "negative_prompt",
+ "seed",
+ "resolution",
+ "aspect_ratio",
+ "num_inference_steps",
+ "enable_safety_checker",
+ "enable_output_safety_checker",
+ "enable_prompt_expansion",
+ "acceleration",
+ "guidance_scale",
+ "guidance_scale_2",
+ "shift",
+ "interpolator_model",
+ "num_interpolated_frames",
+ "adjust_fps_for_interpolation",
+ "video_quality",
+ "video_write_mode",
+ "loras",
+ "reverse_video",
+ "end_image_url"
+ ]
+ },
+ "WanV22A14bImageToVideoLoraOutput": {
+ "properties": {
+ "prompt": {
+ "default": "",
+ "description": "The text prompt used for video generation.",
+ "examples": [
+ "The white dragon warrior stands still, eyes full of determination and strength. The camera slowly moves closer or circles around the warrior, highlighting the powerful presence and heroic spirit of the character."
+ ],
+ "title": "Prompt",
+ "type": "string"
+ },
+ "seed": {
+ "description": "The seed used for generation.",
+ "title": "Seed",
+ "type": "integer"
+ },
+ "video": {
+ "$ref": "#/components/schemas/File",
+ "description": "The generated video file.",
+ "examples": [
+ {
+ "url": "https://v3.fal.media/files/lion/Fbuh3lO_HMT-pS0DATbio_tmp08c3v477.mp4"
+ }
+ ]
+ }
+ },
+ "required": [
+ "video",
+ "seed"
+ ],
+ "title": "WanI2VResponse",
+ "type": "object",
+ "x-fal-order-properties": [
+ "video",
+ "prompt",
+ "seed"
+ ]
+ }
+ },
+ "securitySchemes": {
+ "apiKeyAuth": {
+ "description": "Fal Key",
+ "in": "header",
+ "name": "Authorization",
+ "type": "apiKey"
+ }
+ }
+ },
+ "info": {
+ "description": "The OpenAPI schema for the fal-ai/wan/v2.2-a14b/image-to-video/lora queue.",
+ "title": "Queue OpenAPI for fal-ai/wan/v2.2-a14b/image-to-video/lora",
+ "version": "1.0.0",
+ "x-fal-metadata": {
+ "about": "Endpoint for generating a video from an image, with LoRA support.",
+ "category": "image-to-video",
+ "documentationUrl": "https://fal.ai/models/fal-ai/wan/v2.2-a14b/image-to-video/lora/api",
+ "endpointId": "fal-ai/wan/v2.2-a14b/image-to-video/lora",
+ "playgroundUrl": "https://fal.ai/models/fal-ai/wan/v2.2-a14b/image-to-video/lora",
+ "thumbnailUrl": "https://v3b.fal.media/files/b/0a9f9225/7ePaxzuYYt6ktoZnFABlb_e8tKm9D8.png"
+ }
+ },
+ "openapi": "3.1.0",
+ "paths": {
+ "/fal-ai/wan/v2.2-a14b/image-to-video/lora": {
+ "post": {
+ "requestBody": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/WanV22A14bImageToVideoLoraInput"
+ }
+ }
+ },
+ "required": true
+ },
+ "responses": {
+ "200": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/QueueStatus"
+ }
+ }
+ },
+ "description": "The request status."
+ }
+ }
+ }
+ },
+ "/fal-ai/wan/v2.2-a14b/image-to-video/lora/requests/{request_id}": {
+ "get": {
+ "parameters": [
+ {
+ "in": "path",
+ "name": "request_id",
+ "required": true,
+ "schema": {
+ "description": "Request ID",
+ "type": "string"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/WanV22A14bImageToVideoLoraOutput"
+ }
+ }
+ },
+ "description": "Result of the request."
+ }
+ }
+ }
+ },
+ "/fal-ai/wan/v2.2-a14b/image-to-video/lora/requests/{request_id}/cancel": {
+ "put": {
+ "parameters": [
+ {
+ "in": "path",
+ "name": "request_id",
+ "required": true,
+ "schema": {
+ "description": "Request ID",
+ "type": "string"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "properties": {
+ "success": {
+ "description": "Whether the request was cancelled successfully.",
+ "type": "boolean"
+ }
+ },
+ "type": "object"
+ }
+ }
+ },
+ "description": "The request was cancelled."
+ }
+ }
+ }
+ },
+ "/fal-ai/wan/v2.2-a14b/image-to-video/lora/requests/{request_id}/status": {
+ "get": {
+ "parameters": [
+ {
+ "in": "path",
+ "name": "request_id",
+ "required": true,
+ "schema": {
+ "description": "Request ID",
+ "type": "string"
+ }
+ },
+ {
+ "in": "query",
+ "name": "logs",
+ "required": false,
+ "schema": {
+ "description": "Whether to include logs (`1`) in the response or not (`0`).",
+ "type": "number"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/QueueStatus"
+ }
+ }
+ },
+ "description": "The request status."
+ }
+ }
+ }
+ }
+ },
+ "security": [
+ {
+ "apiKeyAuth": []
+ }
+ ],
+ "servers": [
+ {
+ "url": "https://queue.fal.run"
+ }
+ ]
+}
diff --git a/tests/fixtures/provider-schemas/fal/fal-ai__workflow-utilities__extract-audio.json b/tests/fixtures/provider-schemas/fal/fal-ai__workflow-utilities__extract-audio.json
new file mode 100644
index 00000000..f2f52159
--- /dev/null
+++ b/tests/fixtures/provider-schemas/fal/fal-ai__workflow-utilities__extract-audio.json
@@ -0,0 +1,319 @@
+{
+ "components": {
+ "schemas": {
+ "AudioFile": {
+ "description": "Audio file with url field",
+ "properties": {
+ "content_type": {
+ "description": "Content type of the audio file",
+ "title": "Content Type",
+ "type": "string"
+ },
+ "file_name": {
+ "description": "Name of the audio file",
+ "title": "File Name",
+ "type": "string"
+ },
+ "file_size": {
+ "description": "Size of the audio file in bytes",
+ "title": "File Size",
+ "type": "integer"
+ },
+ "url": {
+ "description": "URL of the audio file",
+ "title": "Url",
+ "type": "string"
+ }
+ },
+ "required": [
+ "url",
+ "content_type",
+ "file_name",
+ "file_size"
+ ],
+ "title": "AudioFile",
+ "type": "object",
+ "x-fal-order-properties": [
+ "url",
+ "content_type",
+ "file_name",
+ "file_size"
+ ]
+ },
+ "QueueStatus": {
+ "properties": {
+ "cancel_url": {
+ "description": "The cancel url.",
+ "type": "string"
+ },
+ "logs": {
+ "additionalProperties": true,
+ "description": "The logs.",
+ "type": "object"
+ },
+ "metrics": {
+ "additionalProperties": true,
+ "description": "The metrics.",
+ "type": "object"
+ },
+ "queue_position": {
+ "description": "The queue position.",
+ "type": "integer"
+ },
+ "request_id": {
+ "description": "The request id.",
+ "type": "string"
+ },
+ "response_url": {
+ "description": "The response url.",
+ "type": "string"
+ },
+ "status": {
+ "enum": [
+ "IN_QUEUE",
+ "IN_PROGRESS",
+ "COMPLETED"
+ ],
+ "type": "string"
+ },
+ "status_url": {
+ "description": "The status url.",
+ "type": "string"
+ }
+ },
+ "required": [
+ "status",
+ "request_id"
+ ],
+ "type": "object"
+ },
+ "WorkflowUtilitiesExtractAudioInput": {
+ "description": "Input model for extracting audio from video",
+ "properties": {
+ "audio_bitrate": {
+ "default": "192k",
+ "description": "Audio bitrate",
+ "enum": [
+ "128k",
+ "192k",
+ "256k",
+ "320k"
+ ],
+ "title": "Audio Bitrate",
+ "type": "string"
+ },
+ "audio_format": {
+ "default": "mp3",
+ "description": "Output audio format",
+ "enum": [
+ "mp3",
+ "wav",
+ "aac",
+ "flac"
+ ],
+ "title": "Audio Format",
+ "type": "string"
+ },
+ "video_url": {
+ "description": "URL of the video file to extract audio from",
+ "examples": [
+ "https://storage.googleapis.com/falserverless/example_outputs/wan-25-i2v-output.mp4"
+ ],
+ "max_file_size": 100000000,
+ "title": "Video Url",
+ "type": "string"
+ }
+ },
+ "required": [
+ "video_url"
+ ],
+ "title": "ExtractAudioInput",
+ "type": "object",
+ "x-fal-order-properties": [
+ "video_url",
+ "audio_format",
+ "audio_bitrate"
+ ]
+ },
+ "WorkflowUtilitiesExtractAudioOutput": {
+ "description": "Output model for extracted audio",
+ "properties": {
+ "audio": {
+ "$ref": "#/components/schemas/AudioFile",
+ "description": "The extracted audio file",
+ "examples": [
+ {
+ "content_type": "application/octet-stream",
+ "file_name": "extracted.mp3",
+ "file_size": 123256,
+ "url": "https://v3b.fal.media/files/b/elephant/Ttx6ckshlpIFIDsP1_8YH_extracted.mp3"
+ }
+ ]
+ }
+ },
+ "required": [
+ "audio"
+ ],
+ "title": "ExtractAudioOutput",
+ "type": "object",
+ "x-fal-order-properties": [
+ "audio"
+ ]
+ }
+ },
+ "securitySchemes": {
+ "apiKeyAuth": {
+ "description": "Fal Key",
+ "in": "header",
+ "name": "Authorization",
+ "type": "apiKey"
+ }
+ }
+ },
+ "info": {
+ "description": "The OpenAPI schema for the fal-ai/workflow-utilities/extract-audio queue.",
+ "title": "Queue OpenAPI for fal-ai/workflow-utilities/extract-audio",
+ "version": "1.0.0",
+ "x-fal-metadata": {
+ "about": "Extract audio from a video file.\n\nExtracts the audio track from a video file and saves it in the specified format.\nSupports mp3, wav, aac, flac formats with configurable bitrate (128k-320k).",
+ "documentationUrl": "https://fal.ai/models/fal-ai/workflow-utilities/extract-audio/api",
+ "endpointId": "fal-ai/workflow-utilities/extract-audio",
+ "playgroundUrl": "https://fal.ai/models/fal-ai/workflow-utilities/extract-audio"
+ }
+ },
+ "openapi": "3.1.0",
+ "paths": {
+ "/fal-ai/workflow-utilities/extract-audio": {
+ "post": {
+ "requestBody": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/WorkflowUtilitiesExtractAudioInput"
+ }
+ }
+ },
+ "required": true
+ },
+ "responses": {
+ "200": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/QueueStatus"
+ }
+ }
+ },
+ "description": "The request status."
+ }
+ }
+ }
+ },
+ "/fal-ai/workflow-utilities/extract-audio/requests/{request_id}": {
+ "get": {
+ "parameters": [
+ {
+ "in": "path",
+ "name": "request_id",
+ "required": true,
+ "schema": {
+ "description": "Request ID",
+ "type": "string"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/WorkflowUtilitiesExtractAudioOutput"
+ }
+ }
+ },
+ "description": "Result of the request."
+ }
+ }
+ }
+ },
+ "/fal-ai/workflow-utilities/extract-audio/requests/{request_id}/cancel": {
+ "put": {
+ "parameters": [
+ {
+ "in": "path",
+ "name": "request_id",
+ "required": true,
+ "schema": {
+ "description": "Request ID",
+ "type": "string"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "properties": {
+ "success": {
+ "description": "Whether the request was cancelled successfully.",
+ "type": "boolean"
+ }
+ },
+ "type": "object"
+ }
+ }
+ },
+ "description": "The request was cancelled."
+ }
+ }
+ }
+ },
+ "/fal-ai/workflow-utilities/extract-audio/requests/{request_id}/status": {
+ "get": {
+ "parameters": [
+ {
+ "in": "path",
+ "name": "request_id",
+ "required": true,
+ "schema": {
+ "description": "Request ID",
+ "type": "string"
+ }
+ },
+ {
+ "in": "query",
+ "name": "logs",
+ "required": false,
+ "schema": {
+ "description": "Whether to include logs (`1`) in the response or not (`0`).",
+ "type": "number"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/QueueStatus"
+ }
+ }
+ },
+ "description": "The request status."
+ }
+ }
+ }
+ }
+ },
+ "security": [
+ {
+ "apiKeyAuth": []
+ }
+ ],
+ "servers": [
+ {
+ "url": "https://queue.fal.run"
+ }
+ ]
+}
diff --git a/tests/fixtures/provider-schemas/fal/google__lyria-3.5.json b/tests/fixtures/provider-schemas/fal/google__lyria-3.5.json
new file mode 100644
index 00000000..9c34f329
--- /dev/null
+++ b/tests/fixtures/provider-schemas/fal/google__lyria-3.5.json
@@ -0,0 +1,362 @@
+{
+ "components": {
+ "schemas": {
+ "File": {
+ "properties": {
+ "content_type": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "The mime type of the file.",
+ "examples": [
+ "image/png"
+ ],
+ "title": "Content Type"
+ },
+ "file_name": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "The name of the file. It will be auto-generated if not provided.",
+ "examples": [
+ "z9RV14K95DvU.png"
+ ],
+ "title": "File Name"
+ },
+ "file_size": {
+ "anyOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "The size of the file in bytes.",
+ "examples": [
+ 4404019
+ ],
+ "title": "File Size"
+ },
+ "url": {
+ "description": "The URL where the file can be downloaded from.",
+ "title": "Url",
+ "type": "string"
+ }
+ },
+ "required": [
+ "url"
+ ],
+ "title": "File",
+ "type": "object",
+ "x-fal-order-properties": [
+ "url",
+ "content_type",
+ "file_name",
+ "file_size"
+ ]
+ },
+ "Lyria35Input": {
+ "properties": {
+ "enable_safety_checker": {
+ "default": true,
+ "description": "Authorized callers may set false to request relaxed screening.",
+ "title": "Enable Safety Checker",
+ "type": "boolean"
+ },
+ "image_url": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "Optional image URL to use as visual inspiration for music generation. The model will create music that matches the mood and theme of the image.",
+ "examples": [
+ "https://v3b.fal.media/files/b/0a93b559/qjT9o0CId1B65PbD6Yp06_9c94501900464c5aa98f302fa4b00375.png"
+ ],
+ "title": "Image Url"
+ },
+ "negative_prompt": {
+ "default": "",
+ "deprecated": true,
+ "description": "Negative prompting is not supported by Lyria 3.5.",
+ "title": "Negative Prompt",
+ "type": "string"
+ },
+ "prompt": {
+ "description": "The text prompt describing the music you want to generate. Include genre, mood, instrumentation, tempo, vocals, and structure for best results. Lyria 3.5 supports full-length songs up to a few minutes — use timestamps or duration hints in your prompt to control song length, e.g. 'a 2-minute track' or section markers like '[0:00-0:30] Intro: ...' / '[0:30-1:00] Verse: ...'. Supports English, German, Spanish, French, Hindi, Japanese, Korean, and Portuguese.",
+ "examples": [
+ "An uplifting pop song with driving electric guitar, energetic drums, and a catchy chorus singing 'Rise up and shine today'. 120 BPM. Two minutes long with a verse-chorus-verse-chorus-bridge-chorus structure."
+ ],
+ "maxLength": 5000,
+ "minLength": 1,
+ "title": "Prompt",
+ "type": "string"
+ }
+ },
+ "required": [
+ "prompt"
+ ],
+ "title": "TextToMusicInput",
+ "type": "object",
+ "x-fal-order-properties": [
+ "prompt",
+ "negative_prompt",
+ "image_url",
+ "enable_safety_checker"
+ ]
+ },
+ "Lyria35Output": {
+ "properties": {
+ "audio": {
+ "$ref": "#/components/schemas/File",
+ "description": "The generated music as an MP3 file.",
+ "examples": [
+ "https://v3b.fal.media/files/b/0a93b550/klduxmeWsmi304M3zsAlr_output.mp3"
+ ]
+ },
+ "lyrics": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "The generated or provided lyrics for the track, if applicable.",
+ "examples": [
+ "[[A0]]\n[[B1]]\n[12.0:] Dust motes dancing in the light,\n[:] Morning breaks so soft and white."
+ ],
+ "title": "Lyrics"
+ }
+ },
+ "required": [
+ "audio"
+ ],
+ "title": "TextToMusicOutput",
+ "type": "object",
+ "x-fal-order-properties": [
+ "audio",
+ "lyrics"
+ ]
+ },
+ "QueueStatus": {
+ "properties": {
+ "cancel_url": {
+ "description": "The cancel url.",
+ "type": "string"
+ },
+ "logs": {
+ "additionalProperties": true,
+ "description": "The logs.",
+ "type": "object"
+ },
+ "metrics": {
+ "additionalProperties": true,
+ "description": "The metrics.",
+ "type": "object"
+ },
+ "queue_position": {
+ "description": "The queue position.",
+ "type": "integer"
+ },
+ "request_id": {
+ "description": "The request id.",
+ "type": "string"
+ },
+ "response_url": {
+ "description": "The response url.",
+ "type": "string"
+ },
+ "status": {
+ "enum": [
+ "IN_QUEUE",
+ "IN_PROGRESS",
+ "COMPLETED"
+ ],
+ "type": "string"
+ },
+ "status_url": {
+ "description": "The status url.",
+ "type": "string"
+ }
+ },
+ "required": [
+ "status",
+ "request_id"
+ ],
+ "type": "object"
+ }
+ },
+ "securitySchemes": {
+ "apiKeyAuth": {
+ "description": "Fal Key",
+ "in": "header",
+ "name": "Authorization",
+ "type": "apiKey"
+ }
+ }
+ },
+ "info": {
+ "description": "The OpenAPI schema for the google/lyria-3.5 queue.",
+ "title": "Queue OpenAPI for google/lyria-3.5",
+ "version": "1.0.0",
+ "x-fal-metadata": {
+ "about": "Generate full-length songs using Google's Lyria 3.5 model.\n\nLyria 3.5 is Google's most capable music generation model, producing\ncomplete, structured songs up to a few minutes long from text or image\nprompts. It includes advanced controls for fully timed lyrics, precise\ntempo, and complex arrangement structure.\n\nFor best results, prompts should include:\n- Genre/Style: e.g., \"pop ballad\", \"jazz fusion\", \"cinematic orchestral\"\n- Mood/Emotion: e.g., \"triumphant\", \"intimate\", \"nostalgic\"\n- Instrumentation: e.g., \"full orchestra\", \"acoustic band\", \"electronic production\"\n- Tempo: e.g., \"90 BPM\", \"allegro\", \"moderate groove\"\n- Structure: use timestamp markers like '[0:00-0:30] Intro: soft piano...'\nor describe duration e.g. \"a 2-minute track\"\n- Vocal style: e.g., \"soulful female vocals\", \"male baritone\", \"choir\"\n- Language: supports English, German, Spanish, French, Hindi, Japanese,\nKorean, and Portuguese\n\nThe model outputs:\n- Full-length MP3 audio (44.1 kHz stereo)\n- Optional generated or user-specified lyrics\n- SynthID watermarking for content provenance\n\nSafety filters prevent generation of content mimicking real artists' voices.",
+ "category": "text-to-audio",
+ "documentationUrl": "https://fal.ai/models/google/lyria-3.5/api",
+ "endpointId": "google/lyria-3.5",
+ "playgroundUrl": "https://fal.ai/models/google/lyria-3.5",
+ "thumbnailUrl": "https://v3b.fal.media/files/b/0aaa8afe/VbJWL93MNQf7eBuxjBEJO.jpg"
+ }
+ },
+ "openapi": "3.1.0",
+ "paths": {
+ "/google/lyria-3.5": {
+ "post": {
+ "requestBody": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/Lyria35Input"
+ }
+ }
+ },
+ "required": true
+ },
+ "responses": {
+ "200": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/QueueStatus"
+ }
+ }
+ },
+ "description": "The request status."
+ }
+ }
+ }
+ },
+ "/google/lyria-3.5/requests/{request_id}": {
+ "get": {
+ "parameters": [
+ {
+ "in": "path",
+ "name": "request_id",
+ "required": true,
+ "schema": {
+ "description": "Request ID",
+ "type": "string"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/Lyria35Output"
+ }
+ }
+ },
+ "description": "Result of the request."
+ }
+ }
+ }
+ },
+ "/google/lyria-3.5/requests/{request_id}/cancel": {
+ "put": {
+ "parameters": [
+ {
+ "in": "path",
+ "name": "request_id",
+ "required": true,
+ "schema": {
+ "description": "Request ID",
+ "type": "string"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "properties": {
+ "success": {
+ "description": "Whether the request was cancelled successfully.",
+ "type": "boolean"
+ }
+ },
+ "type": "object"
+ }
+ }
+ },
+ "description": "The request was cancelled."
+ }
+ }
+ }
+ },
+ "/google/lyria-3.5/requests/{request_id}/status": {
+ "get": {
+ "parameters": [
+ {
+ "in": "path",
+ "name": "request_id",
+ "required": true,
+ "schema": {
+ "description": "Request ID",
+ "type": "string"
+ }
+ },
+ {
+ "in": "query",
+ "name": "logs",
+ "required": false,
+ "schema": {
+ "description": "Whether to include logs (`1`) in the response or not (`0`).",
+ "type": "number"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/QueueStatus"
+ }
+ }
+ },
+ "description": "The request status."
+ }
+ }
+ }
+ }
+ },
+ "security": [
+ {
+ "apiKeyAuth": []
+ }
+ ],
+ "servers": [
+ {
+ "url": "https://queue.fal.run"
+ }
+ ]
+}
diff --git a/tests/fixtures/provider-schemas/fal/meshy__v6__retexture.json b/tests/fixtures/provider-schemas/fal/meshy__v6__retexture.json
new file mode 100644
index 00000000..0089224f
--- /dev/null
+++ b/tests/fixtures/provider-schemas/fal/meshy__v6__retexture.json
@@ -0,0 +1,626 @@
+{
+ "components": {
+ "schemas": {
+ "File": {
+ "properties": {
+ "content_type": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "The mime type of the file.",
+ "examples": [
+ "image/png"
+ ],
+ "title": "Content Type"
+ },
+ "file_name": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "The name of the file. It will be auto-generated if not provided.",
+ "examples": [
+ "z9RV14K95DvU.png"
+ ],
+ "title": "File Name"
+ },
+ "file_size": {
+ "anyOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "The size of the file in bytes.",
+ "examples": [
+ 4404019
+ ],
+ "title": "File Size"
+ },
+ "url": {
+ "description": "The URL where the file can be downloaded from.",
+ "title": "Url",
+ "type": "string"
+ }
+ },
+ "required": [
+ "url"
+ ],
+ "title": "File",
+ "type": "object",
+ "x-fal-order-properties": [
+ "url",
+ "content_type",
+ "file_name",
+ "file_size"
+ ]
+ },
+ "ModelUrls": {
+ "description": "3D model files in various formats",
+ "properties": {
+ "blend": {
+ "anyOf": [
+ {
+ "$ref": "#/components/schemas/File"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "Blender format 3D model"
+ },
+ "fbx": {
+ "anyOf": [
+ {
+ "$ref": "#/components/schemas/File"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "FBX format 3D model"
+ },
+ "glb": {
+ "anyOf": [
+ {
+ "$ref": "#/components/schemas/File"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "GLB format 3D model"
+ },
+ "obj": {
+ "anyOf": [
+ {
+ "$ref": "#/components/schemas/File"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "OBJ format 3D model"
+ },
+ "stl": {
+ "anyOf": [
+ {
+ "$ref": "#/components/schemas/File"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "STL format 3D model"
+ },
+ "usdz": {
+ "anyOf": [
+ {
+ "$ref": "#/components/schemas/File"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "USDZ format 3D model"
+ }
+ },
+ "title": "ModelUrls",
+ "type": "object",
+ "x-fal-order-properties": [
+ "glb",
+ "fbx",
+ "obj",
+ "usdz",
+ "blend",
+ "stl"
+ ]
+ },
+ "QueueStatus": {
+ "properties": {
+ "cancel_url": {
+ "description": "The cancel url.",
+ "type": "string"
+ },
+ "logs": {
+ "additionalProperties": true,
+ "description": "The logs.",
+ "type": "object"
+ },
+ "metrics": {
+ "additionalProperties": true,
+ "description": "The metrics.",
+ "type": "object"
+ },
+ "queue_position": {
+ "description": "The queue position.",
+ "type": "integer"
+ },
+ "request_id": {
+ "description": "The request id.",
+ "type": "string"
+ },
+ "response_url": {
+ "description": "The response url.",
+ "type": "string"
+ },
+ "status": {
+ "enum": [
+ "IN_QUEUE",
+ "IN_PROGRESS",
+ "COMPLETED"
+ ],
+ "type": "string"
+ },
+ "status_url": {
+ "description": "The status url.",
+ "type": "string"
+ }
+ },
+ "required": [
+ "status",
+ "request_id"
+ ],
+ "type": "object"
+ },
+ "TextureFiles": {
+ "description": "Texture files downloaded and uploaded to CDN",
+ "properties": {
+ "base_color": {
+ "$ref": "#/components/schemas/File",
+ "description": "Base color texture"
+ },
+ "metallic": {
+ "anyOf": [
+ {
+ "$ref": "#/components/schemas/File"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "Metallic texture (PBR)"
+ },
+ "normal": {
+ "anyOf": [
+ {
+ "$ref": "#/components/schemas/File"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "Normal texture (PBR)"
+ },
+ "roughness": {
+ "anyOf": [
+ {
+ "$ref": "#/components/schemas/File"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "Roughness texture (PBR)"
+ }
+ },
+ "required": [
+ "base_color"
+ ],
+ "title": "TextureFiles",
+ "type": "object",
+ "x-fal-order-properties": [
+ "base_color",
+ "metallic",
+ "normal",
+ "roughness"
+ ]
+ },
+ "V6RetextureInput": {
+ "description": "Input for 3D Model Retexturing",
+ "properties": {
+ "enable_original_uv": {
+ "default": true,
+ "description": "Use the original UV mapping of the model instead of generating new UVs. If the model has no original UV, output quality may be reduced.",
+ "title": "Enable Original Uv",
+ "type": "boolean"
+ },
+ "enable_pbr": {
+ "default": false,
+ "description": "Generate PBR Maps (metallic, roughness, normal) in addition to base color.",
+ "title": "Enable Pbr",
+ "type": "boolean"
+ },
+ "enable_safety_checker": {
+ "default": true,
+ "description": "If set to true, input data will be checked for safety before processing.",
+ "title": "Enable Safety Checker",
+ "type": "boolean"
+ },
+ "image_style_url": {
+ "anyOf": [
+ {
+ "type": "string",
+ "ui": {
+ "field": "image"
+ }
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "2D image to guide the texturing process. Supports .jpg, .jpeg, .png, and .webp formats. Required if text_style_prompt is not provided. If both are provided, image_style_url takes precedence.",
+ "max_file_size": 20971520,
+ "max_pixels": 178956970,
+ "title": "Image Style Url"
+ },
+ "model_url": {
+ "description": "URL or base64 data URI of a 3D model to texture. Supports .glb, .gltf, .obj, .fbx, .stl formats. Can be a publicly accessible URL or data URI with MIME type application/octet-stream.",
+ "examples": [
+ "https://v3b.fal.media/files/b/penguin/DId89qXLu6BXu09RFAwAV_model.glb"
+ ],
+ "title": "Model Url",
+ "type": "string"
+ },
+ "text_style_prompt": {
+ "anyOf": [
+ {
+ "maxLength": 800,
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "Describe your desired texture style using text. Maximum 800 characters. Required if image_style_url is not provided.",
+ "examples": [
+ "red and black chest"
+ ],
+ "title": "Text Style Prompt"
+ },
+ "texture_resolution": {
+ "default": "2k",
+ "description": "Base color resolution: 2k (2048), 4k (4096), or 8k (8192). 4k and 8k require Meshy 6 or 7. At 8k, PBR maps are 4k and no emission map is generated.",
+ "enum": [
+ "2k",
+ "4k",
+ "8k"
+ ],
+ "title": "Texture Resolution",
+ "type": "string"
+ }
+ },
+ "required": [
+ "model_url"
+ ],
+ "title": "RetextureInput",
+ "type": "object",
+ "x-fal-order-properties": [
+ "model_url",
+ "text_style_prompt",
+ "image_style_url",
+ "texture_resolution",
+ "enable_original_uv",
+ "enable_pbr",
+ "enable_safety_checker"
+ ]
+ },
+ "V6RetextureOutput": {
+ "description": "Output for 3D Model Retexturing",
+ "properties": {
+ "image_style_url": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "The image URL used for texturing (if provided)",
+ "title": "Image Style Url"
+ },
+ "model_glb": {
+ "$ref": "#/components/schemas/File",
+ "description": "Retextured 3D object in GLB format.",
+ "examples": [
+ {
+ "content_type": "model/gltf-binary",
+ "file_name": "model.glb",
+ "file_size": 4097640,
+ "url": "https://v3b.fal.media/files/b/tiger/pU0TtsRTxXM6VnKEYTHSV_model.glb"
+ }
+ ]
+ },
+ "model_urls": {
+ "$ref": "#/components/schemas/ModelUrls",
+ "description": "URLs for different 3D model formats",
+ "examples": [
+ {
+ "fbx": {
+ "content_type": "application/octet-stream",
+ "file_name": "model.fbx",
+ "file_size": 4713692,
+ "url": "https://v3b.fal.media/files/b/rabbit/agzKf8N8zeVnteg72NiF4_model.fbx"
+ },
+ "glb": {
+ "content_type": "model/gltf-binary",
+ "file_name": "model.glb",
+ "file_size": 4097640,
+ "url": "https://v3b.fal.media/files/b/tiger/pU0TtsRTxXM6VnKEYTHSV_model.glb"
+ },
+ "obj": {
+ "content_type": "model/obj",
+ "file_name": "model.obj",
+ "file_size": 2964508,
+ "url": "https://v3b.fal.media/files/b/zebra/M5aK_b6vKH7KeGCZoSLq7_model.obj"
+ },
+ "usdz": {
+ "content_type": "model/vnd.usdz+zip",
+ "file_name": "model.usdz",
+ "file_size": 3886518,
+ "url": "https://v3b.fal.media/files/b/panda/4ItUhLHiH4foEw30qcWZv_model.usdz"
+ }
+ }
+ ]
+ },
+ "text_style_prompt": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "The text prompt used for texturing (if provided)",
+ "examples": [
+ "red and black chest"
+ ],
+ "title": "Text Style Prompt"
+ },
+ "texture_urls": {
+ "description": "Array of texture file objects",
+ "examples": [
+ [
+ {
+ "base_color": {
+ "content_type": "image/png",
+ "file_name": "texture_0.png",
+ "file_size": 3455709,
+ "url": "https://v3b.fal.media/files/b/zebra/opBcVy7AK-GOlCTUz-_GZ_texture_0.png"
+ }
+ }
+ ]
+ ],
+ "items": {
+ "$ref": "#/components/schemas/TextureFiles"
+ },
+ "title": "Texture Urls",
+ "type": "array"
+ },
+ "thumbnail": {
+ "anyOf": [
+ {
+ "$ref": "#/components/schemas/File"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "Preview thumbnail of the retextured model",
+ "examples": [
+ {
+ "content_type": "image/png",
+ "file_name": "preview.png",
+ "file_size": 124859,
+ "url": "https://v3b.fal.media/files/b/lion/jFrzgIJMbaPQi_4HCEa8u_preview.png"
+ }
+ ]
+ }
+ },
+ "required": [
+ "model_glb",
+ "model_urls"
+ ],
+ "title": "RetextureOutput",
+ "type": "object",
+ "x-fal-order-properties": [
+ "model_glb",
+ "thumbnail",
+ "model_urls",
+ "texture_urls",
+ "text_style_prompt",
+ "image_style_url"
+ ]
+ }
+ },
+ "securitySchemes": {
+ "apiKeyAuth": {
+ "description": "Fal Key",
+ "in": "header",
+ "name": "Authorization",
+ "type": "apiKey"
+ }
+ }
+ },
+ "info": {
+ "description": "Upload a 3D model (.glb, .gltf, .obj, .fbx or .stl, as a URL or base64 data URI) and describe the texture you want in up to 600 characters, or provide a reference image (.jpg, .jpeg or .png). If both are provided, the image is used. The original UV mapping is kept by default; turn it off to generate new UVs. Optionally generate PBR maps (metallic, roughness, normal) in addition to base color. Returns a GLB model, other available formats, texture files and a preview thumbnail. Safety checking is enabled by default.",
+ "title": "Queue OpenAPI for meshy/v6/retexture",
+ "version": "1.0.0",
+ "x-fal-metadata": {
+ "about": "Retexture using Meshy 6 with 2k, 4k, or 8k textures.",
+ "category": "3d-to-3d",
+ "documentationUrl": "https://fal.ai/models/meshy/v6/retexture/api",
+ "endpointId": "meshy/v6/retexture",
+ "playgroundUrl": "https://fal.ai/models/meshy/v6/retexture",
+ "thumbnailUrl": "https://v3b.fal.media/files/b/0aae5f3f/gyMDaOtx8BoFAqk7Qe7Ar.jpg"
+ }
+ },
+ "openapi": "3.1.0",
+ "paths": {
+ "/meshy/v6/retexture": {
+ "post": {
+ "requestBody": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/V6RetextureInput"
+ }
+ }
+ },
+ "required": true
+ },
+ "responses": {
+ "200": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/QueueStatus"
+ }
+ }
+ },
+ "description": "The request status."
+ }
+ }
+ }
+ },
+ "/meshy/v6/retexture/requests/{request_id}": {
+ "get": {
+ "parameters": [
+ {
+ "in": "path",
+ "name": "request_id",
+ "required": true,
+ "schema": {
+ "description": "Request ID",
+ "type": "string"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/V6RetextureOutput"
+ }
+ }
+ },
+ "description": "Result of the request."
+ }
+ }
+ }
+ },
+ "/meshy/v6/retexture/requests/{request_id}/cancel": {
+ "put": {
+ "parameters": [
+ {
+ "in": "path",
+ "name": "request_id",
+ "required": true,
+ "schema": {
+ "description": "Request ID",
+ "type": "string"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "properties": {
+ "success": {
+ "description": "Whether the request was cancelled successfully.",
+ "type": "boolean"
+ }
+ },
+ "type": "object"
+ }
+ }
+ },
+ "description": "The request was cancelled."
+ }
+ }
+ }
+ },
+ "/meshy/v6/retexture/requests/{request_id}/status": {
+ "get": {
+ "parameters": [
+ {
+ "in": "path",
+ "name": "request_id",
+ "required": true,
+ "schema": {
+ "description": "Request ID",
+ "type": "string"
+ }
+ },
+ {
+ "in": "query",
+ "name": "logs",
+ "required": false,
+ "schema": {
+ "description": "Whether to include logs (`1`) in the response or not (`0`).",
+ "type": "number"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/QueueStatus"
+ }
+ }
+ },
+ "description": "The request status."
+ }
+ }
+ }
+ }
+ },
+ "security": [
+ {
+ "apiKeyAuth": []
+ }
+ ],
+ "servers": [
+ {
+ "url": "https://queue.fal.run"
+ }
+ ]
+}
diff --git a/tests/fixtures/provider-schemas/fal/meshy__v7__retexture.json b/tests/fixtures/provider-schemas/fal/meshy__v7__retexture.json
new file mode 100644
index 00000000..65f29848
--- /dev/null
+++ b/tests/fixtures/provider-schemas/fal/meshy__v7__retexture.json
@@ -0,0 +1,626 @@
+{
+ "components": {
+ "schemas": {
+ "File": {
+ "properties": {
+ "content_type": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "The mime type of the file.",
+ "examples": [
+ "image/png"
+ ],
+ "title": "Content Type"
+ },
+ "file_name": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "The name of the file. It will be auto-generated if not provided.",
+ "examples": [
+ "z9RV14K95DvU.png"
+ ],
+ "title": "File Name"
+ },
+ "file_size": {
+ "anyOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "The size of the file in bytes.",
+ "examples": [
+ 4404019
+ ],
+ "title": "File Size"
+ },
+ "url": {
+ "description": "The URL where the file can be downloaded from.",
+ "title": "Url",
+ "type": "string"
+ }
+ },
+ "required": [
+ "url"
+ ],
+ "title": "File",
+ "type": "object",
+ "x-fal-order-properties": [
+ "url",
+ "content_type",
+ "file_name",
+ "file_size"
+ ]
+ },
+ "ModelUrls": {
+ "description": "3D model files in various formats",
+ "properties": {
+ "blend": {
+ "anyOf": [
+ {
+ "$ref": "#/components/schemas/File"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "Blender format 3D model"
+ },
+ "fbx": {
+ "anyOf": [
+ {
+ "$ref": "#/components/schemas/File"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "FBX format 3D model"
+ },
+ "glb": {
+ "anyOf": [
+ {
+ "$ref": "#/components/schemas/File"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "GLB format 3D model"
+ },
+ "obj": {
+ "anyOf": [
+ {
+ "$ref": "#/components/schemas/File"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "OBJ format 3D model"
+ },
+ "stl": {
+ "anyOf": [
+ {
+ "$ref": "#/components/schemas/File"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "STL format 3D model"
+ },
+ "usdz": {
+ "anyOf": [
+ {
+ "$ref": "#/components/schemas/File"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "USDZ format 3D model"
+ }
+ },
+ "title": "ModelUrls",
+ "type": "object",
+ "x-fal-order-properties": [
+ "glb",
+ "fbx",
+ "obj",
+ "usdz",
+ "blend",
+ "stl"
+ ]
+ },
+ "QueueStatus": {
+ "properties": {
+ "cancel_url": {
+ "description": "The cancel url.",
+ "type": "string"
+ },
+ "logs": {
+ "additionalProperties": true,
+ "description": "The logs.",
+ "type": "object"
+ },
+ "metrics": {
+ "additionalProperties": true,
+ "description": "The metrics.",
+ "type": "object"
+ },
+ "queue_position": {
+ "description": "The queue position.",
+ "type": "integer"
+ },
+ "request_id": {
+ "description": "The request id.",
+ "type": "string"
+ },
+ "response_url": {
+ "description": "The response url.",
+ "type": "string"
+ },
+ "status": {
+ "enum": [
+ "IN_QUEUE",
+ "IN_PROGRESS",
+ "COMPLETED"
+ ],
+ "type": "string"
+ },
+ "status_url": {
+ "description": "The status url.",
+ "type": "string"
+ }
+ },
+ "required": [
+ "status",
+ "request_id"
+ ],
+ "type": "object"
+ },
+ "TextureFiles": {
+ "description": "Texture files downloaded and uploaded to CDN",
+ "properties": {
+ "base_color": {
+ "$ref": "#/components/schemas/File",
+ "description": "Base color texture"
+ },
+ "metallic": {
+ "anyOf": [
+ {
+ "$ref": "#/components/schemas/File"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "Metallic texture (PBR)"
+ },
+ "normal": {
+ "anyOf": [
+ {
+ "$ref": "#/components/schemas/File"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "Normal texture (PBR)"
+ },
+ "roughness": {
+ "anyOf": [
+ {
+ "$ref": "#/components/schemas/File"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "Roughness texture (PBR)"
+ }
+ },
+ "required": [
+ "base_color"
+ ],
+ "title": "TextureFiles",
+ "type": "object",
+ "x-fal-order-properties": [
+ "base_color",
+ "metallic",
+ "normal",
+ "roughness"
+ ]
+ },
+ "V7RetextureInput": {
+ "description": "Input for 3D Model Retexturing",
+ "properties": {
+ "enable_original_uv": {
+ "default": true,
+ "description": "Use the original UV mapping of the model instead of generating new UVs. If the model has no original UV, output quality may be reduced.",
+ "title": "Enable Original Uv",
+ "type": "boolean"
+ },
+ "enable_pbr": {
+ "default": false,
+ "description": "Generate PBR Maps (metallic, roughness, normal) in addition to base color.",
+ "title": "Enable Pbr",
+ "type": "boolean"
+ },
+ "enable_safety_checker": {
+ "default": true,
+ "description": "If set to true, input data will be checked for safety before processing.",
+ "title": "Enable Safety Checker",
+ "type": "boolean"
+ },
+ "image_style_url": {
+ "anyOf": [
+ {
+ "type": "string",
+ "ui": {
+ "field": "image"
+ }
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "2D image to guide the texturing process. Supports .jpg, .jpeg, .png, and .webp formats. Required if text_style_prompt is not provided. If both are provided, image_style_url takes precedence.",
+ "max_file_size": 20971520,
+ "max_pixels": 178956970,
+ "title": "Image Style Url"
+ },
+ "model_url": {
+ "description": "URL or base64 data URI of a 3D model to texture. Supports .glb, .gltf, .obj, .fbx, .stl formats. Can be a publicly accessible URL or data URI with MIME type application/octet-stream.",
+ "examples": [
+ "https://v3b.fal.media/files/b/penguin/DId89qXLu6BXu09RFAwAV_model.glb"
+ ],
+ "title": "Model Url",
+ "type": "string"
+ },
+ "text_style_prompt": {
+ "anyOf": [
+ {
+ "maxLength": 800,
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "Describe your desired texture style using text. Maximum 800 characters. Required if image_style_url is not provided.",
+ "examples": [
+ "red and black chest"
+ ],
+ "title": "Text Style Prompt"
+ },
+ "texture_resolution": {
+ "default": "2k",
+ "description": "Base color resolution: 2k (2048), 4k (4096), or 8k (8192). 4k and 8k require Meshy 6 or 7. At 8k, PBR maps are 4k and no emission map is generated.",
+ "enum": [
+ "2k",
+ "4k",
+ "8k"
+ ],
+ "title": "Texture Resolution",
+ "type": "string"
+ }
+ },
+ "required": [
+ "model_url"
+ ],
+ "title": "RetextureInput",
+ "type": "object",
+ "x-fal-order-properties": [
+ "model_url",
+ "text_style_prompt",
+ "image_style_url",
+ "texture_resolution",
+ "enable_original_uv",
+ "enable_pbr",
+ "enable_safety_checker"
+ ]
+ },
+ "V7RetextureOutput": {
+ "description": "Output for 3D Model Retexturing",
+ "properties": {
+ "image_style_url": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "The image URL used for texturing (if provided)",
+ "title": "Image Style Url"
+ },
+ "model_glb": {
+ "$ref": "#/components/schemas/File",
+ "description": "Retextured 3D object in GLB format.",
+ "examples": [
+ {
+ "content_type": "model/gltf-binary",
+ "file_name": "model.glb",
+ "file_size": 4097640,
+ "url": "https://v3b.fal.media/files/b/tiger/pU0TtsRTxXM6VnKEYTHSV_model.glb"
+ }
+ ]
+ },
+ "model_urls": {
+ "$ref": "#/components/schemas/ModelUrls",
+ "description": "URLs for different 3D model formats",
+ "examples": [
+ {
+ "fbx": {
+ "content_type": "application/octet-stream",
+ "file_name": "model.fbx",
+ "file_size": 4713692,
+ "url": "https://v3b.fal.media/files/b/rabbit/agzKf8N8zeVnteg72NiF4_model.fbx"
+ },
+ "glb": {
+ "content_type": "model/gltf-binary",
+ "file_name": "model.glb",
+ "file_size": 4097640,
+ "url": "https://v3b.fal.media/files/b/tiger/pU0TtsRTxXM6VnKEYTHSV_model.glb"
+ },
+ "obj": {
+ "content_type": "model/obj",
+ "file_name": "model.obj",
+ "file_size": 2964508,
+ "url": "https://v3b.fal.media/files/b/zebra/M5aK_b6vKH7KeGCZoSLq7_model.obj"
+ },
+ "usdz": {
+ "content_type": "model/vnd.usdz+zip",
+ "file_name": "model.usdz",
+ "file_size": 3886518,
+ "url": "https://v3b.fal.media/files/b/panda/4ItUhLHiH4foEw30qcWZv_model.usdz"
+ }
+ }
+ ]
+ },
+ "text_style_prompt": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "The text prompt used for texturing (if provided)",
+ "examples": [
+ "red and black chest"
+ ],
+ "title": "Text Style Prompt"
+ },
+ "texture_urls": {
+ "description": "Array of texture file objects",
+ "examples": [
+ [
+ {
+ "base_color": {
+ "content_type": "image/png",
+ "file_name": "texture_0.png",
+ "file_size": 3455709,
+ "url": "https://v3b.fal.media/files/b/zebra/opBcVy7AK-GOlCTUz-_GZ_texture_0.png"
+ }
+ }
+ ]
+ ],
+ "items": {
+ "$ref": "#/components/schemas/TextureFiles"
+ },
+ "title": "Texture Urls",
+ "type": "array"
+ },
+ "thumbnail": {
+ "anyOf": [
+ {
+ "$ref": "#/components/schemas/File"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "Preview thumbnail of the retextured model",
+ "examples": [
+ {
+ "content_type": "image/png",
+ "file_name": "preview.png",
+ "file_size": 124859,
+ "url": "https://v3b.fal.media/files/b/lion/jFrzgIJMbaPQi_4HCEa8u_preview.png"
+ }
+ ]
+ }
+ },
+ "required": [
+ "model_glb",
+ "model_urls"
+ ],
+ "title": "RetextureOutput",
+ "type": "object",
+ "x-fal-order-properties": [
+ "model_glb",
+ "thumbnail",
+ "model_urls",
+ "texture_urls",
+ "text_style_prompt",
+ "image_style_url"
+ ]
+ }
+ },
+ "securitySchemes": {
+ "apiKeyAuth": {
+ "description": "Fal Key",
+ "in": "header",
+ "name": "Authorization",
+ "type": "apiKey"
+ }
+ }
+ },
+ "info": {
+ "description": "Upload a 3D model (.glb, .gltf, .obj, .fbx or .stl, as a URL or base64 data URI) and describe the texture you want in up to 600 characters, or provide a reference image (.jpg, .jpeg or .png). If both are provided, the image is used. The original UV mapping is kept by default; turn it off to generate new UVs. Optionally generate PBR maps (metallic, roughness, normal) in addition to base color. Returns a GLB model, other available formats, texture files and a preview thumbnail. Safety checking is enabled by default.",
+ "title": "Queue OpenAPI for meshy/v7/retexture",
+ "version": "1.0.0",
+ "x-fal-metadata": {
+ "about": "Retexture using Meshy 7 with 2k, 4k, or 8k textures.",
+ "category": "3d-to-3d",
+ "documentationUrl": "https://fal.ai/models/meshy/v7/retexture/api",
+ "endpointId": "meshy/v7/retexture",
+ "playgroundUrl": "https://fal.ai/models/meshy/v7/retexture",
+ "thumbnailUrl": "https://v3b.fal.media/files/b/0aae5f49/fX6rQr3MLd0HuSBFcnFRk.jpg"
+ }
+ },
+ "openapi": "3.1.0",
+ "paths": {
+ "/meshy/v7/retexture": {
+ "post": {
+ "requestBody": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/V7RetextureInput"
+ }
+ }
+ },
+ "required": true
+ },
+ "responses": {
+ "200": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/QueueStatus"
+ }
+ }
+ },
+ "description": "The request status."
+ }
+ }
+ }
+ },
+ "/meshy/v7/retexture/requests/{request_id}": {
+ "get": {
+ "parameters": [
+ {
+ "in": "path",
+ "name": "request_id",
+ "required": true,
+ "schema": {
+ "description": "Request ID",
+ "type": "string"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/V7RetextureOutput"
+ }
+ }
+ },
+ "description": "Result of the request."
+ }
+ }
+ }
+ },
+ "/meshy/v7/retexture/requests/{request_id}/cancel": {
+ "put": {
+ "parameters": [
+ {
+ "in": "path",
+ "name": "request_id",
+ "required": true,
+ "schema": {
+ "description": "Request ID",
+ "type": "string"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "properties": {
+ "success": {
+ "description": "Whether the request was cancelled successfully.",
+ "type": "boolean"
+ }
+ },
+ "type": "object"
+ }
+ }
+ },
+ "description": "The request was cancelled."
+ }
+ }
+ }
+ },
+ "/meshy/v7/retexture/requests/{request_id}/status": {
+ "get": {
+ "parameters": [
+ {
+ "in": "path",
+ "name": "request_id",
+ "required": true,
+ "schema": {
+ "description": "Request ID",
+ "type": "string"
+ }
+ },
+ {
+ "in": "query",
+ "name": "logs",
+ "required": false,
+ "schema": {
+ "description": "Whether to include logs (`1`) in the response or not (`0`).",
+ "type": "number"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/QueueStatus"
+ }
+ }
+ },
+ "description": "The request status."
+ }
+ }
+ }
+ }
+ },
+ "security": [
+ {
+ "apiKeyAuth": []
+ }
+ ],
+ "servers": [
+ {
+ "url": "https://queue.fal.run"
+ }
+ ]
+}
diff --git a/tests/fixtures/provider-schemas/fal/minimax__h3-max-turbo__extend-video.json b/tests/fixtures/provider-schemas/fal/minimax__h3-max-turbo__extend-video.json
new file mode 100644
index 00000000..31267241
--- /dev/null
+++ b/tests/fixtures/provider-schemas/fal/minimax__h3-max-turbo__extend-video.json
@@ -0,0 +1,452 @@
+{
+ "components": {
+ "schemas": {
+ "File": {
+ "properties": {
+ "content_type": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "The mime type of the file.",
+ "examples": [
+ "image/png"
+ ],
+ "title": "Content Type"
+ },
+ "file_name": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "The name of the file. It will be auto-generated if not provided.",
+ "examples": [
+ "z9RV14K95DvU.png"
+ ],
+ "title": "File Name"
+ },
+ "file_size": {
+ "anyOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "The size of the file in bytes.",
+ "examples": [
+ 4404019
+ ],
+ "title": "File Size"
+ },
+ "url": {
+ "description": "The URL where the file can be downloaded from.",
+ "title": "Url",
+ "type": "string"
+ }
+ },
+ "required": [
+ "url"
+ ],
+ "title": "File",
+ "type": "object",
+ "x-fal-order-properties": [
+ "url",
+ "content_type",
+ "file_name",
+ "file_size"
+ ]
+ },
+ "H3MaxTurboExtendVideoInput": {
+ "description": "Extend a video with new footage based on a prompt.",
+ "properties": {
+ "aspect_ratio": {
+ "default": "auto",
+ "description": "Output aspect ratio. 'auto' follows the source video. Other values crop the video to fit the selected ratio.",
+ "enum": [
+ "auto",
+ "21:9",
+ "16:9",
+ "4:3",
+ "1:1",
+ "3:4",
+ "9:16"
+ ],
+ "title": "Aspect Ratio",
+ "type": "string"
+ },
+ "duration": {
+ "default": 5,
+ "description": "Seconds of new footage to add. The continuation clip also includes 1.625 seconds from the source's ending and may be longer because of frame rounding.",
+ "maximum": 15,
+ "minimum": 0.71,
+ "title": "Duration",
+ "type": "number"
+ },
+ "enable_prompt_expansion": {
+ "default": true,
+ "description": "Automatically enhance the prompt using the source video to help keep the continuation consistent. May increase processing time.",
+ "title": "Enable Prompt Expansion",
+ "type": "boolean"
+ },
+ "enable_safety_checker": {
+ "default": true,
+ "description": "Moderate the source video and the prompt.",
+ "title": "Enable Safety Checker",
+ "type": "boolean"
+ },
+ "output": {
+ "default": "extended",
+ "description": "'extended' returns the source and new footage as one video. 'continuation' returns a clip that starts with a 1.625-second repeat of the source's ending, then shows the new footage.",
+ "enum": [
+ "extended",
+ "continuation"
+ ],
+ "title": "Output",
+ "type": "string"
+ },
+ "prompt": {
+ "description": "What happens next. Describe the continuation, not the source.",
+ "examples": [
+ "The red panda keeps walking along the log, then looks up at a bird."
+ ],
+ "maxLength": 50000,
+ "minLength": 1,
+ "title": "Prompt",
+ "type": "string"
+ },
+ "reference_audio_urls": {
+ "description": "Optional audio references for the continuation (2–15 seconds each, 15 seconds combined). The full extended video retains its original source soundtrack, and its ending still conditions the transition. These clips guide the newly generated audio instead of using that soundtrack as an audio reference. Assign each clip a role in the prompt, such as 'Audio 1 for the voice' and 'Audio 2 for background music'.",
+ "items": {
+ "type": "string"
+ },
+ "maxItems": 3,
+ "title": "Reference Audio URLs",
+ "type": "array"
+ },
+ "resolution": {
+ "default": "768P",
+ "description": "Output video resolution.",
+ "enum": [
+ "480P",
+ "768P",
+ "1080P",
+ "2K"
+ ],
+ "title": "Resolution",
+ "type": "string"
+ },
+ "seed": {
+ "anyOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "Seed for the continuation. Random when omitted.",
+ "title": "Seed"
+ },
+ "video_url": {
+ "description": "URL of the video to extend. Must be 1.625 s to 60 s long, up to 50 MB, aspect ratio between 0.4 and 2.5.",
+ "examples": [
+ "https://storage.googleapis.com/falserverless/example_inputs/flux-3-red-panda.mp4"
+ ],
+ "minLength": 1,
+ "title": "Video Url",
+ "type": "string"
+ }
+ },
+ "required": [
+ "video_url",
+ "prompt"
+ ],
+ "title": "TurboExtendVideoHailuo03Input",
+ "type": "object",
+ "x-fal-order-properties": [
+ "video_url",
+ "prompt",
+ "reference_audio_urls",
+ "enable_prompt_expansion",
+ "duration",
+ "resolution",
+ "aspect_ratio",
+ "seed",
+ "output",
+ "enable_safety_checker"
+ ]
+ },
+ "H3MaxTurboExtendVideoOutput": {
+ "properties": {
+ "duration": {
+ "description": "Seconds of returned video.",
+ "title": "Duration",
+ "type": "number"
+ },
+ "expanded_prompt": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "The prompt used after expansion, or null when unchanged.",
+ "title": "Expanded Prompt"
+ },
+ "seed": {
+ "description": "Seed used for the continuation.",
+ "title": "Seed",
+ "type": "integer"
+ },
+ "source": {
+ "description": "Source video information: width, height, frame rate, duration, and audio.",
+ "title": "Source",
+ "type": "object"
+ },
+ "timings": {
+ "additionalProperties": {
+ "type": "number"
+ },
+ "title": "Timings",
+ "type": "object"
+ },
+ "video": {
+ "$ref": "#/components/schemas/File",
+ "description": "The returned video. In 'continuation' mode, it includes the 1.625-second repeat at the start."
+ }
+ },
+ "required": [
+ "video",
+ "seed",
+ "duration",
+ "source"
+ ],
+ "title": "TurboExtendVideoHailuo03Output",
+ "type": "object",
+ "x-fal-order-properties": [
+ "video",
+ "seed",
+ "duration",
+ "source",
+ "expanded_prompt",
+ "timings"
+ ]
+ },
+ "QueueStatus": {
+ "properties": {
+ "cancel_url": {
+ "description": "The cancel url.",
+ "type": "string"
+ },
+ "logs": {
+ "additionalProperties": true,
+ "description": "The logs.",
+ "type": "object"
+ },
+ "metrics": {
+ "additionalProperties": true,
+ "description": "The metrics.",
+ "type": "object"
+ },
+ "queue_position": {
+ "description": "The queue position.",
+ "type": "integer"
+ },
+ "request_id": {
+ "description": "The request id.",
+ "type": "string"
+ },
+ "response_url": {
+ "description": "The response url.",
+ "type": "string"
+ },
+ "status": {
+ "enum": [
+ "IN_QUEUE",
+ "IN_PROGRESS",
+ "COMPLETED"
+ ],
+ "type": "string"
+ },
+ "status_url": {
+ "description": "The status url.",
+ "type": "string"
+ }
+ },
+ "required": [
+ "status",
+ "request_id"
+ ],
+ "type": "object"
+ }
+ },
+ "securitySchemes": {
+ "apiKeyAuth": {
+ "description": "Fal Key",
+ "in": "header",
+ "name": "Authorization",
+ "type": "apiKey"
+ }
+ }
+ },
+ "info": {
+ "description": "Extend a source video from 1.625 to 60 seconds long, up to 50 MB. Describe what happens next and add 1 to 15 seconds of new footage (5 seconds by default). Choose 480p, 768p (default), 1080p, or 2K. The aspect ratio follows the source by default. Return the full extended video or only the continuation. Optional audio references replace the source soundtrack as the audio reference: up to 3 clips, 2 to 15 seconds each and 15 seconds combined. Prompt expansion and safety checking are enabled by default.",
+ "title": "Queue OpenAPI for minimax/h3-max-turbo/extend-video",
+ "version": "1.0.0",
+ "x-fal-metadata": {
+ "about": "Extend a video with new footage based on a prompt, faster.",
+ "category": "video-to-video",
+ "documentationUrl": "https://fal.ai/models/minimax/h3-max-turbo/extend-video/api",
+ "endpointId": "minimax/h3-max-turbo/extend-video",
+ "playgroundUrl": "https://fal.ai/models/minimax/h3-max-turbo/extend-video",
+ "thumbnailUrl": "https://v3b.fal.media/files/b/0aacaeb7/jUm3mOJpvKxTWhpLVoXCJ.jpg"
+ }
+ },
+ "openapi": "3.1.0",
+ "paths": {
+ "/minimax/h3-max-turbo/extend-video": {
+ "post": {
+ "requestBody": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/H3MaxTurboExtendVideoInput"
+ }
+ }
+ },
+ "required": true
+ },
+ "responses": {
+ "200": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/QueueStatus"
+ }
+ }
+ },
+ "description": "The request status."
+ }
+ }
+ }
+ },
+ "/minimax/h3-max-turbo/extend-video/requests/{request_id}": {
+ "get": {
+ "parameters": [
+ {
+ "in": "path",
+ "name": "request_id",
+ "required": true,
+ "schema": {
+ "description": "Request ID",
+ "type": "string"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/H3MaxTurboExtendVideoOutput"
+ }
+ }
+ },
+ "description": "Result of the request."
+ }
+ }
+ }
+ },
+ "/minimax/h3-max-turbo/extend-video/requests/{request_id}/cancel": {
+ "put": {
+ "parameters": [
+ {
+ "in": "path",
+ "name": "request_id",
+ "required": true,
+ "schema": {
+ "description": "Request ID",
+ "type": "string"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "properties": {
+ "success": {
+ "description": "Whether the request was cancelled successfully.",
+ "type": "boolean"
+ }
+ },
+ "type": "object"
+ }
+ }
+ },
+ "description": "The request was cancelled."
+ }
+ }
+ }
+ },
+ "/minimax/h3-max-turbo/extend-video/requests/{request_id}/status": {
+ "get": {
+ "parameters": [
+ {
+ "in": "path",
+ "name": "request_id",
+ "required": true,
+ "schema": {
+ "description": "Request ID",
+ "type": "string"
+ }
+ },
+ {
+ "in": "query",
+ "name": "logs",
+ "required": false,
+ "schema": {
+ "description": "Whether to include logs (`1`) in the response or not (`0`).",
+ "type": "number"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/QueueStatus"
+ }
+ }
+ },
+ "description": "The request status."
+ }
+ }
+ }
+ }
+ },
+ "security": [
+ {
+ "apiKeyAuth": []
+ }
+ ],
+ "servers": [
+ {
+ "url": "https://queue.fal.run"
+ }
+ ]
+}
diff --git a/tests/fixtures/provider-schemas/fal/minimax__h3-max-turbo__image-to-video.json b/tests/fixtures/provider-schemas/fal/minimax__h3-max-turbo__image-to-video.json
new file mode 100644
index 00000000..98a11528
--- /dev/null
+++ b/tests/fixtures/provider-schemas/fal/minimax__h3-max-turbo__image-to-video.json
@@ -0,0 +1,446 @@
+{
+ "components": {
+ "schemas": {
+ "File": {
+ "properties": {
+ "content_type": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "The mime type of the file.",
+ "examples": [
+ "image/png"
+ ],
+ "title": "Content Type"
+ },
+ "file_name": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "The name of the file. It will be auto-generated if not provided.",
+ "examples": [
+ "z9RV14K95DvU.png"
+ ],
+ "title": "File Name"
+ },
+ "file_size": {
+ "anyOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "The size of the file in bytes.",
+ "examples": [
+ 4404019
+ ],
+ "title": "File Size"
+ },
+ "url": {
+ "description": "The URL where the file can be downloaded from.",
+ "title": "Url",
+ "type": "string"
+ }
+ },
+ "required": [
+ "url"
+ ],
+ "title": "File",
+ "type": "object",
+ "x-fal-order-properties": [
+ "url",
+ "content_type",
+ "file_name",
+ "file_size"
+ ]
+ },
+ "H3MaxTurboImageToVideoInput": {
+ "properties": {
+ "duration": {
+ "default": 5,
+ "description": "Video length in seconds. The output can run up to about 0.7 s longer than requested. Use at least 2 s with target_audio_url.",
+ "maximum": 15,
+ "minimum": 0.92,
+ "title": "Duration",
+ "type": "number"
+ },
+ "enable_safety_checker": {
+ "default": true,
+ "description": "If set to true, the safety checker will be enabled.",
+ "title": "Enable Safety Checker",
+ "type": "boolean"
+ },
+ "end_image_url": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "Optional URL of the image to use as the last frame. It may be provided alone for end-only keyframe generation; in that case the output canvas follows this image.",
+ "title": "End Image URL"
+ },
+ "image_url": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "Optional URL of the image to use as the first frame. When provided, the output canvas follows this image. If only end_image_url is provided, the canvas follows that last frame instead. If both images are omitted, the request is handled as text-to-video (16:9 by default).",
+ "examples": [
+ "https://storage.googleapis.com/falserverless/example_inputs/hailuo23/pro_i2v_in.jpg"
+ ],
+ "title": "Image URL"
+ },
+ "prompt": {
+ "description": "Text prompt for video generation",
+ "examples": [
+ "The camera slowly pulls back from the scene, revealing the full landscape as clouds drift overhead and light shifts across the terrain."
+ ],
+ "maxLength": 50000,
+ "minLength": 1,
+ "title": "Prompt",
+ "type": "string"
+ },
+ "prompt_expansion_mode": {
+ "default": "balanced",
+ "description": "How much effort to spend rewriting the prompt before generation. 'disabled' skips prompt expansion. 'balanced' returns in about a second. 'quality' spends up to ~30s on a richer prompt.",
+ "examples": [
+ "disabled",
+ "balanced",
+ "quality"
+ ],
+ "title": "Prompt Expansion Mode",
+ "type": "string"
+ },
+ "resolution": {
+ "default": "768P",
+ "description": "The native generation resolution, or 1080P latent refinement from a native 768P source.",
+ "enum": [
+ "480P",
+ "768P",
+ "1080P"
+ ],
+ "title": "Resolution",
+ "type": "string"
+ },
+ "seed": {
+ "anyOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "Random seed. A random seed is selected when omitted.",
+ "title": "Seed"
+ },
+ "sync_mode": {
+ "default": false,
+ "description": "Return the generated video as base64 instead of a CDN URL.",
+ "title": "Sync Mode",
+ "type": "boolean"
+ },
+ "target_audio_url": {
+ "anyOf": [
+ {
+ "minLength": 1,
+ "pattern": "\\S",
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "Optional URL of an audio clip at least 2 seconds long (maximum 15 MB) to pin to the generated soundtrack. Longer clips are trimmed to the generated video's length, keeping the beginning. The original audio replaces the output soundtrack, padded with silence if shorter than the video, without changing playback speed. Exceptionally high sample rates may be resampled to 96 kHz. Accepts an HTTP(S) URL or a base64 data URI.",
+ "title": "Target Audio Url"
+ }
+ },
+ "required": [
+ "prompt",
+ "prompt_expansion_mode"
+ ],
+ "title": "TurboImageToVideoHailuo03Input",
+ "type": "object",
+ "x-fal-order-properties": [
+ "prompt",
+ "duration",
+ "resolution",
+ "seed",
+ "enable_safety_checker",
+ "sync_mode",
+ "prompt_expansion_mode",
+ "target_audio_url",
+ "image_url",
+ "end_image_url"
+ ]
+ },
+ "H3MaxTurboImageToVideoOutput": {
+ "properties": {
+ "expanded_prompt": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "The prompt after expansion, as sent to the model. Null when prompt expansion was disabled, left the prompt unchanged, or was performed internally by MiniMax's hosted API.",
+ "title": "Expanded Prompt"
+ },
+ "timings": {
+ "anyOf": [
+ {
+ "additionalProperties": {
+ "type": "number"
+ },
+ "type": "object"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "Timing breakdown in seconds. 'inference' is the DiT denoising time on the GPU backend. Null on routes that do not report backend timings.",
+ "title": "Timings"
+ },
+ "video": {
+ "$ref": "#/components/schemas/File",
+ "description": "The generated video"
+ }
+ },
+ "required": [
+ "video"
+ ],
+ "title": "TurboImageToVideoHailuo03Output",
+ "type": "object",
+ "x-fal-order-properties": [
+ "video",
+ "expanded_prompt",
+ "timings"
+ ]
+ },
+ "QueueStatus": {
+ "properties": {
+ "cancel_url": {
+ "description": "The cancel url.",
+ "type": "string"
+ },
+ "logs": {
+ "additionalProperties": true,
+ "description": "The logs.",
+ "type": "object"
+ },
+ "metrics": {
+ "additionalProperties": true,
+ "description": "The metrics.",
+ "type": "object"
+ },
+ "queue_position": {
+ "description": "The queue position.",
+ "type": "integer"
+ },
+ "request_id": {
+ "description": "The request id.",
+ "type": "string"
+ },
+ "response_url": {
+ "description": "The response url.",
+ "type": "string"
+ },
+ "status": {
+ "enum": [
+ "IN_QUEUE",
+ "IN_PROGRESS",
+ "COMPLETED"
+ ],
+ "type": "string"
+ },
+ "status_url": {
+ "description": "The status url.",
+ "type": "string"
+ }
+ },
+ "required": [
+ "status",
+ "request_id"
+ ],
+ "type": "object"
+ }
+ },
+ "securitySchemes": {
+ "apiKeyAuth": {
+ "description": "Fal Key",
+ "in": "header",
+ "name": "Authorization",
+ "type": "apiKey"
+ }
+ }
+ },
+ "info": {
+ "description": "The OpenAPI schema for the minimax/h3-max-turbo/image-to-video queue.",
+ "title": "Queue OpenAPI for minimax/h3-max-turbo/image-to-video",
+ "version": "1.0.0",
+ "x-fal-metadata": {
+ "about": "Image To Video Max Turbo",
+ "category": "image-to-video",
+ "documentationUrl": "https://fal.ai/models/minimax/h3-max-turbo/image-to-video/api",
+ "endpointId": "minimax/h3-max-turbo/image-to-video",
+ "playgroundUrl": "https://fal.ai/models/minimax/h3-max-turbo/image-to-video",
+ "thumbnailUrl": "https://v3b.fal.media/files/b/0aa8d532/tsMg9lPG9DaXI7bqzqz6Y.jpg"
+ }
+ },
+ "openapi": "3.1.0",
+ "paths": {
+ "/minimax/h3-max-turbo/image-to-video": {
+ "post": {
+ "requestBody": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/H3MaxTurboImageToVideoInput"
+ }
+ }
+ },
+ "required": true
+ },
+ "responses": {
+ "200": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/QueueStatus"
+ }
+ }
+ },
+ "description": "The request status."
+ }
+ }
+ }
+ },
+ "/minimax/h3-max-turbo/image-to-video/requests/{request_id}": {
+ "get": {
+ "parameters": [
+ {
+ "in": "path",
+ "name": "request_id",
+ "required": true,
+ "schema": {
+ "description": "Request ID",
+ "type": "string"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/H3MaxTurboImageToVideoOutput"
+ }
+ }
+ },
+ "description": "Result of the request."
+ }
+ }
+ }
+ },
+ "/minimax/h3-max-turbo/image-to-video/requests/{request_id}/cancel": {
+ "put": {
+ "parameters": [
+ {
+ "in": "path",
+ "name": "request_id",
+ "required": true,
+ "schema": {
+ "description": "Request ID",
+ "type": "string"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "properties": {
+ "success": {
+ "description": "Whether the request was cancelled successfully.",
+ "type": "boolean"
+ }
+ },
+ "type": "object"
+ }
+ }
+ },
+ "description": "The request was cancelled."
+ }
+ }
+ }
+ },
+ "/minimax/h3-max-turbo/image-to-video/requests/{request_id}/status": {
+ "get": {
+ "parameters": [
+ {
+ "in": "path",
+ "name": "request_id",
+ "required": true,
+ "schema": {
+ "description": "Request ID",
+ "type": "string"
+ }
+ },
+ {
+ "in": "query",
+ "name": "logs",
+ "required": false,
+ "schema": {
+ "description": "Whether to include logs (`1`) in the response or not (`0`).",
+ "type": "number"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/QueueStatus"
+ }
+ }
+ },
+ "description": "The request status."
+ }
+ }
+ }
+ }
+ },
+ "security": [
+ {
+ "apiKeyAuth": []
+ }
+ ],
+ "servers": [
+ {
+ "url": "https://queue.fal.run"
+ }
+ ]
+}
diff --git a/tests/fixtures/provider-schemas/fal/minimax__h3-max-turbo__reference-to-video.json b/tests/fixtures/provider-schemas/fal/minimax__h3-max-turbo__reference-to-video.json
new file mode 100644
index 00000000..607b63e7
--- /dev/null
+++ b/tests/fixtures/provider-schemas/fal/minimax__h3-max-turbo__reference-to-video.json
@@ -0,0 +1,515 @@
+{
+ "components": {
+ "schemas": {
+ "File": {
+ "properties": {
+ "content_type": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "The mime type of the file.",
+ "examples": [
+ "image/png"
+ ],
+ "title": "Content Type"
+ },
+ "file_name": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "The name of the file. It will be auto-generated if not provided.",
+ "examples": [
+ "z9RV14K95DvU.png"
+ ],
+ "title": "File Name"
+ },
+ "file_size": {
+ "anyOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "The size of the file in bytes.",
+ "examples": [
+ 4404019
+ ],
+ "title": "File Size"
+ },
+ "url": {
+ "description": "The URL where the file can be downloaded from.",
+ "title": "Url",
+ "type": "string"
+ }
+ },
+ "required": [
+ "url"
+ ],
+ "title": "File",
+ "type": "object",
+ "x-fal-order-properties": [
+ "url",
+ "content_type",
+ "file_name",
+ "file_size"
+ ]
+ },
+ "H3MaxTurboReferenceToVideoInput": {
+ "description": "Reference KV caching supports references without target keyframes.",
+ "properties": {
+ "aspect_ratio": {
+ "default": "adaptive",
+ "description": "The aspect ratio of the generated video.",
+ "enum": [
+ "adaptive",
+ "21:9",
+ "16:9",
+ "4:3",
+ "1:1",
+ "3:4",
+ "9:16"
+ ],
+ "title": "Aspect Ratio",
+ "type": "string"
+ },
+ "duration": {
+ "default": 5,
+ "description": "Video length in seconds. The output can run up to about 0.7 s longer than requested.",
+ "maximum": 15,
+ "minimum": 0.92,
+ "title": "Duration",
+ "type": "number"
+ },
+ "enable_safety_checker": {
+ "default": true,
+ "description": "If set to true, the safety checker will be enabled.",
+ "title": "Enable Safety Checker",
+ "type": "boolean"
+ },
+ "prompt": {
+ "description": "Text prompt for video generation. Refer to reference assets by their modality and order in the reference lists: Image 1, Image 2, Video 1, Audio 1, and so on.",
+ "examples": [
+ "Image 1 is the female protagonist. Image 2 is her small dog. Keep the woman and dog consistent with their respective reference images while they walk together through a sunlit garden."
+ ],
+ "maxLength": 50000,
+ "minLength": 1,
+ "title": "Prompt",
+ "type": "string"
+ },
+ "prompt_expansion_mode": {
+ "default": "balanced",
+ "description": "How much effort to spend rewriting the prompt before generation. 'disabled' skips prompt expansion. 'balanced' returns in about a second. 'quality' spends up to ~30s on a richer prompt.",
+ "examples": [
+ "disabled",
+ "balanced",
+ "quality"
+ ],
+ "title": "Prompt Expansion Mode",
+ "type": "string"
+ },
+ "reference_audio_urls": {
+ "description": "URLs of reference audio clips (2-15 seconds each, combined duration at most 15 seconds), referenced in the prompt as Audio 1, Audio 2, and so on. Images, videos, and audio can be provided individually or together. Reference images, videos, and audio clips must add up to at most 12 files.",
+ "items": {
+ "type": "string"
+ },
+ "maxItems": 3,
+ "title": "Reference Audio URLs",
+ "type": "array"
+ },
+ "reference_conditions": {
+ "description": "Ordered reference list; cross-modality order is semantic and is preserved end-to-end. Do not combine with reference_*_urls.",
+ "items": {
+ "$ref": "#/components/schemas/ReferenceCondition"
+ },
+ "maxItems": 12,
+ "title": "Reference Conditions",
+ "type": "array"
+ },
+ "reference_image_urls": {
+ "description": "URLs of subject/style reference images, referenced in the prompt as Image 1, Image 2, and so on. Reference images, videos, and audio clips must add up to at most 12 files.",
+ "examples": [
+ [
+ "https://storage.googleapis.com/falserverless/example_inputs/hailuo23/pro_i2v_in.jpg"
+ ]
+ ],
+ "items": {
+ "type": "string"
+ },
+ "maxItems": 9,
+ "title": "Reference Image URLs",
+ "type": "array"
+ },
+ "reference_video_urls": {
+ "description": "URLs of motion/reference video clips (2-15 seconds each, combined duration at most 15 seconds), referenced in the prompt as Video 1, Video 2, and so on. Reference images, videos, and audio clips must add up to at most 12 files.",
+ "items": {
+ "type": "string"
+ },
+ "maxItems": 3,
+ "title": "Reference Video URLs",
+ "type": "array"
+ },
+ "resolution": {
+ "default": "768P",
+ "description": "The native generation resolution, or 1080P latent refinement from a native 768P source.",
+ "enum": [
+ "480P",
+ "768P",
+ "1080P"
+ ],
+ "title": "Resolution",
+ "type": "string"
+ },
+ "seed": {
+ "anyOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "Random seed. A random seed is selected when omitted.",
+ "title": "Seed"
+ },
+ "sync_mode": {
+ "default": false,
+ "description": "Return the generated video as base64 instead of a CDN URL.",
+ "title": "Sync Mode",
+ "type": "boolean"
+ }
+ },
+ "required": [
+ "prompt",
+ "prompt_expansion_mode"
+ ],
+ "title": "MaxTurboReferenceToVideoHailuo03Input",
+ "type": "object",
+ "x-fal-order-properties": [
+ "prompt",
+ "reference_image_urls",
+ "reference_video_urls",
+ "reference_audio_urls",
+ "duration",
+ "resolution",
+ "seed",
+ "enable_safety_checker",
+ "sync_mode",
+ "prompt_expansion_mode",
+ "aspect_ratio",
+ "reference_conditions"
+ ]
+ },
+ "H3MaxTurboReferenceToVideoOutput": {
+ "properties": {
+ "expanded_prompt": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "The prompt after expansion, as sent to the model. Null when prompt expansion was disabled, left the prompt unchanged, or was performed internally by MiniMax's hosted API.",
+ "title": "Expanded Prompt"
+ },
+ "reference_tokens": {
+ "anyOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "Packed reference conditioner rows encoded for this request (images, videos, keyframes, and audio). The first 4096 rows are included in the clip price.",
+ "title": "Reference Tokens"
+ },
+ "seed": {
+ "description": "Base seed for reproducing the generation.",
+ "title": "Seed",
+ "type": "integer"
+ },
+ "timings": {
+ "anyOf": [
+ {
+ "additionalProperties": {
+ "type": "number"
+ },
+ "type": "object"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "Timing breakdown in seconds. 'inference' is the DiT denoising time on the GPU backend. Null on routes that do not report backend timings.",
+ "title": "Timings"
+ },
+ "video": {
+ "$ref": "#/components/schemas/File",
+ "description": "The generated video"
+ }
+ },
+ "required": [
+ "video",
+ "seed"
+ ],
+ "title": "TurboReferenceToVideoHailuo03Output",
+ "type": "object",
+ "x-fal-order-properties": [
+ "video",
+ "expanded_prompt",
+ "seed",
+ "reference_tokens",
+ "timings"
+ ]
+ },
+ "QueueStatus": {
+ "properties": {
+ "cancel_url": {
+ "description": "The cancel url.",
+ "type": "string"
+ },
+ "logs": {
+ "additionalProperties": true,
+ "description": "The logs.",
+ "type": "object"
+ },
+ "metrics": {
+ "additionalProperties": true,
+ "description": "The metrics.",
+ "type": "object"
+ },
+ "queue_position": {
+ "description": "The queue position.",
+ "type": "integer"
+ },
+ "request_id": {
+ "description": "The request id.",
+ "type": "string"
+ },
+ "response_url": {
+ "description": "The response url.",
+ "type": "string"
+ },
+ "status": {
+ "enum": [
+ "IN_QUEUE",
+ "IN_PROGRESS",
+ "COMPLETED"
+ ],
+ "type": "string"
+ },
+ "status_url": {
+ "description": "The status url.",
+ "type": "string"
+ }
+ },
+ "required": [
+ "status",
+ "request_id"
+ ],
+ "type": "object"
+ },
+ "ReferenceCondition": {
+ "description": "One ordered Ref2VA media condition.",
+ "properties": {
+ "type": {
+ "description": "Reference modality. Cross-modality list order is semantic.",
+ "enum": [
+ "image",
+ "video",
+ "audio"
+ ],
+ "title": "Type",
+ "type": "string"
+ },
+ "url": {
+ "description": "URL of the reference media.",
+ "minLength": 1,
+ "title": "Url",
+ "type": "string"
+ }
+ },
+ "required": [
+ "type",
+ "url"
+ ],
+ "title": "ReferenceCondition",
+ "type": "object",
+ "x-fal-order-properties": [
+ "type",
+ "url"
+ ]
+ }
+ },
+ "securitySchemes": {
+ "apiKeyAuth": {
+ "description": "Fal Key",
+ "in": "header",
+ "name": "Authorization",
+ "type": "apiKey"
+ }
+ }
+ },
+ "info": {
+ "description": "Generate video with synchronized audio from a prompt and image, video or audio references with H3 Max Turbo. Use up to 9 reference images, 3 reference videos and 3 reference audio clips (2 to 15 seconds each, 15 seconds combined per type, 12 files in total), and refer to them in the prompt as Image 1, Video 1, Audio 1 and so on. To keep a precise order across types, pass them as one ordered reference_conditions list instead. Choose a duration up to 15 seconds (5 by default), 480p, 768p (default) or 1080p, and an aspect ratio (adaptive by default, or 21:9, 16:9, 4:3, 1:1, 3:4, 9:16). Prompt expansion (balanced by default) and safety checking are enabled by default. The response reports the reference tokens used.",
+ "title": "Queue OpenAPI for minimax/h3-max-turbo/reference-to-video",
+ "version": "1.0.0",
+ "x-fal-metadata": {
+ "about": "Reference To Video Max Turbo",
+ "category": "image-to-video",
+ "documentationUrl": "https://fal.ai/models/minimax/h3-max-turbo/reference-to-video/api",
+ "endpointId": "minimax/h3-max-turbo/reference-to-video",
+ "playgroundUrl": "https://fal.ai/models/minimax/h3-max-turbo/reference-to-video",
+ "thumbnailUrl": "https://v3b.fal.media/files/b/0aadb4ed/Nc_-PFaAPZ_9ikSRTCisF.jpg"
+ }
+ },
+ "openapi": "3.1.0",
+ "paths": {
+ "/minimax/h3-max-turbo/reference-to-video": {
+ "post": {
+ "requestBody": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/H3MaxTurboReferenceToVideoInput"
+ }
+ }
+ },
+ "required": true
+ },
+ "responses": {
+ "200": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/QueueStatus"
+ }
+ }
+ },
+ "description": "The request status."
+ }
+ }
+ }
+ },
+ "/minimax/h3-max-turbo/reference-to-video/requests/{request_id}": {
+ "get": {
+ "parameters": [
+ {
+ "in": "path",
+ "name": "request_id",
+ "required": true,
+ "schema": {
+ "description": "Request ID",
+ "type": "string"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/H3MaxTurboReferenceToVideoOutput"
+ }
+ }
+ },
+ "description": "Result of the request."
+ }
+ }
+ }
+ },
+ "/minimax/h3-max-turbo/reference-to-video/requests/{request_id}/cancel": {
+ "put": {
+ "parameters": [
+ {
+ "in": "path",
+ "name": "request_id",
+ "required": true,
+ "schema": {
+ "description": "Request ID",
+ "type": "string"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "properties": {
+ "success": {
+ "description": "Whether the request was cancelled successfully.",
+ "type": "boolean"
+ }
+ },
+ "type": "object"
+ }
+ }
+ },
+ "description": "The request was cancelled."
+ }
+ }
+ }
+ },
+ "/minimax/h3-max-turbo/reference-to-video/requests/{request_id}/status": {
+ "get": {
+ "parameters": [
+ {
+ "in": "path",
+ "name": "request_id",
+ "required": true,
+ "schema": {
+ "description": "Request ID",
+ "type": "string"
+ }
+ },
+ {
+ "in": "query",
+ "name": "logs",
+ "required": false,
+ "schema": {
+ "description": "Whether to include logs (`1`) in the response or not (`0`).",
+ "type": "number"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/QueueStatus"
+ }
+ }
+ },
+ "description": "The request status."
+ }
+ }
+ }
+ }
+ },
+ "security": [
+ {
+ "apiKeyAuth": []
+ }
+ ],
+ "servers": [
+ {
+ "url": "https://queue.fal.run"
+ }
+ ]
+}
diff --git a/tests/fixtures/provider-schemas/fal/minimax__h3-max-turbo__text-to-video.json b/tests/fixtures/provider-schemas/fal/minimax__h3-max-turbo__text-to-video.json
new file mode 100644
index 00000000..e2938057
--- /dev/null
+++ b/tests/fixtures/provider-schemas/fal/minimax__h3-max-turbo__text-to-video.json
@@ -0,0 +1,440 @@
+{
+ "components": {
+ "schemas": {
+ "File": {
+ "properties": {
+ "content_type": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "The mime type of the file.",
+ "examples": [
+ "image/png"
+ ],
+ "title": "Content Type"
+ },
+ "file_name": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "The name of the file. It will be auto-generated if not provided.",
+ "examples": [
+ "z9RV14K95DvU.png"
+ ],
+ "title": "File Name"
+ },
+ "file_size": {
+ "anyOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "The size of the file in bytes.",
+ "examples": [
+ 4404019
+ ],
+ "title": "File Size"
+ },
+ "url": {
+ "description": "The URL where the file can be downloaded from.",
+ "title": "Url",
+ "type": "string"
+ }
+ },
+ "required": [
+ "url"
+ ],
+ "title": "File",
+ "type": "object",
+ "x-fal-order-properties": [
+ "url",
+ "content_type",
+ "file_name",
+ "file_size"
+ ]
+ },
+ "H3MaxTurboTextToVideoInput": {
+ "properties": {
+ "aspect_ratio": {
+ "default": "16:9",
+ "description": "The aspect ratio of the generated video.",
+ "enum": [
+ "21:9",
+ "16:9",
+ "4:3",
+ "1:1",
+ "3:4",
+ "9:16"
+ ],
+ "title": "Aspect Ratio",
+ "type": "string"
+ },
+ "duration": {
+ "default": 5,
+ "description": "Video length in seconds. The output can run up to about 0.7 s longer than requested. Use at least 2 s with target_audio_url.",
+ "maximum": 15,
+ "minimum": 0.92,
+ "title": "Duration",
+ "type": "number"
+ },
+ "enable_safety_checker": {
+ "default": true,
+ "description": "If set to true, the safety checker will be enabled.",
+ "title": "Enable Safety Checker",
+ "type": "boolean"
+ },
+ "prompt": {
+ "description": "Text prompt for video generation",
+ "examples": [
+ "A white kitten chases a butterfly across a sunlit garden. Gentle camera tracking, natural movement, soft afternoon light filtering through the leaves."
+ ],
+ "maxLength": 50000,
+ "minLength": 1,
+ "title": "Prompt",
+ "type": "string"
+ },
+ "prompt_expansion_mode": {
+ "default": "balanced",
+ "description": "How much effort to spend rewriting the prompt before generation. 'disabled' skips prompt expansion. 'balanced' returns in about a second. 'quality' spends up to ~30s on a richer prompt.",
+ "examples": [
+ "disabled",
+ "balanced",
+ "quality"
+ ],
+ "title": "Prompt Expansion Mode",
+ "type": "string"
+ },
+ "resolution": {
+ "default": "768P",
+ "description": "The native generation resolution, or 1080P latent refinement from a native 768P source.",
+ "enum": [
+ "480P",
+ "768P",
+ "1080P"
+ ],
+ "title": "Resolution",
+ "type": "string"
+ },
+ "seed": {
+ "anyOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "Random seed. A random seed is selected when omitted.",
+ "title": "Seed"
+ },
+ "sync_mode": {
+ "default": false,
+ "description": "Return the generated video as base64 instead of a CDN URL.",
+ "title": "Sync Mode",
+ "type": "boolean"
+ },
+ "target_audio_url": {
+ "anyOf": [
+ {
+ "minLength": 1,
+ "pattern": "\\S",
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "Optional URL of an audio clip at least 2 seconds long (maximum 15 MB) to pin to the generated soundtrack. Longer clips are trimmed to the generated video's length, keeping the beginning. The original audio replaces the output soundtrack, padded with silence if shorter than the video, without changing playback speed. Exceptionally high sample rates may be resampled to 96 kHz. Accepts an HTTP(S) URL or a base64 data URI.",
+ "title": "Target Audio Url"
+ }
+ },
+ "required": [
+ "prompt",
+ "prompt_expansion_mode"
+ ],
+ "title": "TurboTextToVideoHailuo03Input",
+ "type": "object",
+ "x-fal-order-properties": [
+ "prompt",
+ "duration",
+ "resolution",
+ "seed",
+ "enable_safety_checker",
+ "sync_mode",
+ "prompt_expansion_mode",
+ "target_audio_url",
+ "aspect_ratio"
+ ]
+ },
+ "H3MaxTurboTextToVideoOutput": {
+ "properties": {
+ "expanded_prompt": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "The prompt after expansion, as sent to the model. Null when prompt expansion was disabled, left the prompt unchanged, or was performed internally by MiniMax's hosted API.",
+ "title": "Expanded Prompt"
+ },
+ "timings": {
+ "anyOf": [
+ {
+ "additionalProperties": {
+ "type": "number"
+ },
+ "type": "object"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "Timing breakdown in seconds. 'inference' is the DiT denoising time on the GPU backend. Null on routes that do not report backend timings.",
+ "title": "Timings"
+ },
+ "video": {
+ "$ref": "#/components/schemas/File",
+ "description": "The generated video",
+ "examples": [
+ {
+ "content_type": "video/mp4",
+ "file_name": "--prs89fkHtWW406fmEs__NRhTqNku.mp4",
+ "file_size": 6463396,
+ "url": "https://v3b.fal.media/files/b/0aa46818/--prs89fkHtWW406fmEs__NRhTqNku.mp4"
+ }
+ ]
+ }
+ },
+ "required": [
+ "video"
+ ],
+ "title": "TurboTextToVideoHailuo03Output",
+ "type": "object",
+ "x-fal-order-properties": [
+ "video",
+ "expanded_prompt",
+ "timings"
+ ]
+ },
+ "QueueStatus": {
+ "properties": {
+ "cancel_url": {
+ "description": "The cancel url.",
+ "type": "string"
+ },
+ "logs": {
+ "additionalProperties": true,
+ "description": "The logs.",
+ "type": "object"
+ },
+ "metrics": {
+ "additionalProperties": true,
+ "description": "The metrics.",
+ "type": "object"
+ },
+ "queue_position": {
+ "description": "The queue position.",
+ "type": "integer"
+ },
+ "request_id": {
+ "description": "The request id.",
+ "type": "string"
+ },
+ "response_url": {
+ "description": "The response url.",
+ "type": "string"
+ },
+ "status": {
+ "enum": [
+ "IN_QUEUE",
+ "IN_PROGRESS",
+ "COMPLETED"
+ ],
+ "type": "string"
+ },
+ "status_url": {
+ "description": "The status url.",
+ "type": "string"
+ }
+ },
+ "required": [
+ "status",
+ "request_id"
+ ],
+ "type": "object"
+ }
+ },
+ "securitySchemes": {
+ "apiKeyAuth": {
+ "description": "Fal Key",
+ "in": "header",
+ "name": "Authorization",
+ "type": "apiKey"
+ }
+ }
+ },
+ "info": {
+ "description": "The OpenAPI schema for the minimax/h3-max-turbo/text-to-video queue.",
+ "title": "Queue OpenAPI for minimax/h3-max-turbo/text-to-video",
+ "version": "1.0.0",
+ "x-fal-metadata": {
+ "about": "Text To Video Max Turbo",
+ "category": "text-to-video",
+ "documentationUrl": "https://fal.ai/models/minimax/h3-max-turbo/text-to-video/api",
+ "endpointId": "minimax/h3-max-turbo/text-to-video",
+ "playgroundUrl": "https://fal.ai/models/minimax/h3-max-turbo/text-to-video",
+ "thumbnailUrl": "https://v3b.fal.media/files/b/0aa8d50b/vj4BiCoQwOlmK7ku4KBZq.jpg"
+ }
+ },
+ "openapi": "3.1.0",
+ "paths": {
+ "/minimax/h3-max-turbo/text-to-video": {
+ "post": {
+ "requestBody": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/H3MaxTurboTextToVideoInput"
+ }
+ }
+ },
+ "required": true
+ },
+ "responses": {
+ "200": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/QueueStatus"
+ }
+ }
+ },
+ "description": "The request status."
+ }
+ }
+ }
+ },
+ "/minimax/h3-max-turbo/text-to-video/requests/{request_id}": {
+ "get": {
+ "parameters": [
+ {
+ "in": "path",
+ "name": "request_id",
+ "required": true,
+ "schema": {
+ "description": "Request ID",
+ "type": "string"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/H3MaxTurboTextToVideoOutput"
+ }
+ }
+ },
+ "description": "Result of the request."
+ }
+ }
+ }
+ },
+ "/minimax/h3-max-turbo/text-to-video/requests/{request_id}/cancel": {
+ "put": {
+ "parameters": [
+ {
+ "in": "path",
+ "name": "request_id",
+ "required": true,
+ "schema": {
+ "description": "Request ID",
+ "type": "string"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "properties": {
+ "success": {
+ "description": "Whether the request was cancelled successfully.",
+ "type": "boolean"
+ }
+ },
+ "type": "object"
+ }
+ }
+ },
+ "description": "The request was cancelled."
+ }
+ }
+ }
+ },
+ "/minimax/h3-max-turbo/text-to-video/requests/{request_id}/status": {
+ "get": {
+ "parameters": [
+ {
+ "in": "path",
+ "name": "request_id",
+ "required": true,
+ "schema": {
+ "description": "Request ID",
+ "type": "string"
+ }
+ },
+ {
+ "in": "query",
+ "name": "logs",
+ "required": false,
+ "schema": {
+ "description": "Whether to include logs (`1`) in the response or not (`0`).",
+ "type": "number"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/QueueStatus"
+ }
+ }
+ },
+ "description": "The request status."
+ }
+ }
+ }
+ }
+ },
+ "security": [
+ {
+ "apiKeyAuth": []
+ }
+ ],
+ "servers": [
+ {
+ "url": "https://queue.fal.run"
+ }
+ ]
+}
diff --git a/tests/fixtures/provider-schemas/fal/minimax__h3-max__insert-video.json b/tests/fixtures/provider-schemas/fal/minimax__h3-max__insert-video.json
new file mode 100644
index 00000000..751de428
--- /dev/null
+++ b/tests/fixtures/provider-schemas/fal/minimax__h3-max__insert-video.json
@@ -0,0 +1,539 @@
+{
+ "components": {
+ "schemas": {
+ "H3MaxInsertVideoInput": {
+ "additionalProperties": false,
+ "properties": {
+ "color_match": {
+ "default": true,
+ "title": "Color Match",
+ "type": "boolean"
+ },
+ "duration": {
+ "default": 5,
+ "maximum": 13,
+ "minimum": 5,
+ "title": "Duration",
+ "type": "number"
+ },
+ "enable_prompt_expansion": {
+ "default": true,
+ "title": "Enable Prompt Expansion",
+ "type": "boolean"
+ },
+ "prompt": {
+ "anyOf": [
+ {
+ "maxLength": 50000,
+ "minLength": 1,
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "title": "Prompt"
+ },
+ "reference_image_urls": {
+ "items": {
+ "type": "string"
+ },
+ "maxItems": 9,
+ "title": "Reference Image Urls",
+ "type": "array"
+ },
+ "reference_video_urls": {
+ "items": {
+ "type": "string"
+ },
+ "maxItems": 3,
+ "title": "Reference Video Urls",
+ "type": "array"
+ },
+ "resolution": {
+ "default": "768p",
+ "enum": [
+ "480p",
+ "768p"
+ ],
+ "title": "Resolution",
+ "type": "string"
+ },
+ "resume_time": {
+ "exclusiveMinimum": 1.625,
+ "maximum": 60,
+ "title": "Resume Time",
+ "type": "number"
+ },
+ "seed": {
+ "anyOf": [
+ {
+ "maximum": 2147483647,
+ "minimum": 0,
+ "type": "integer"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "title": "Seed"
+ },
+ "start_time": {
+ "maximum": 60,
+ "minimum": 1.625,
+ "title": "Start Time",
+ "type": "number"
+ },
+ "video_url": {
+ "minLength": 1,
+ "title": "Video Url",
+ "type": "string"
+ }
+ },
+ "required": [
+ "video_url",
+ "start_time",
+ "resume_time"
+ ],
+ "title": "InjectVideoInput",
+ "type": "object",
+ "x-fal-order-properties": [
+ "video_url",
+ "prompt",
+ "reference_image_urls",
+ "reference_video_urls",
+ "start_time",
+ "resume_time",
+ "duration",
+ "resolution",
+ "seed",
+ "enable_prompt_expansion",
+ "color_match"
+ ]
+ },
+ "H3MaxInsertVideoOutput": {
+ "properties": {
+ "duration": {
+ "title": "Duration",
+ "type": "number"
+ },
+ "expanded_prompt": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "title": "Expanded Prompt"
+ },
+ "frame_count": {
+ "title": "Frame Count",
+ "type": "integer"
+ },
+ "height": {
+ "title": "Height",
+ "type": "integer"
+ },
+ "injected_duration": {
+ "title": "Injected Duration",
+ "type": "number"
+ },
+ "resume_time": {
+ "title": "Resume Time",
+ "type": "number"
+ },
+ "seed": {
+ "title": "Seed",
+ "type": "integer"
+ },
+ "source": {
+ "title": "Source",
+ "type": "object"
+ },
+ "start_time": {
+ "title": "Start Time",
+ "type": "number"
+ },
+ "timings": {
+ "additionalProperties": {
+ "type": "number"
+ },
+ "title": "Timings",
+ "type": "object"
+ },
+ "video": {
+ "$ref": "#/components/schemas/VideoFile"
+ },
+ "width": {
+ "title": "Width",
+ "type": "integer"
+ }
+ },
+ "required": [
+ "video",
+ "seed",
+ "width",
+ "height",
+ "frame_count",
+ "duration",
+ "start_time",
+ "resume_time",
+ "injected_duration",
+ "source",
+ "timings"
+ ],
+ "title": "InjectVideoOutput",
+ "type": "object",
+ "x-fal-order-properties": [
+ "video",
+ "seed",
+ "width",
+ "height",
+ "frame_count",
+ "duration",
+ "start_time",
+ "resume_time",
+ "injected_duration",
+ "expanded_prompt",
+ "source",
+ "timings"
+ ]
+ },
+ "QueueStatus": {
+ "properties": {
+ "cancel_url": {
+ "description": "The cancel url.",
+ "type": "string"
+ },
+ "logs": {
+ "additionalProperties": true,
+ "description": "The logs.",
+ "type": "object"
+ },
+ "metrics": {
+ "additionalProperties": true,
+ "description": "The metrics.",
+ "type": "object"
+ },
+ "queue_position": {
+ "description": "The queue position.",
+ "type": "integer"
+ },
+ "request_id": {
+ "description": "The request id.",
+ "type": "string"
+ },
+ "response_url": {
+ "description": "The response url.",
+ "type": "string"
+ },
+ "status": {
+ "enum": [
+ "IN_QUEUE",
+ "IN_PROGRESS",
+ "COMPLETED"
+ ],
+ "type": "string"
+ },
+ "status_url": {
+ "description": "The status url.",
+ "type": "string"
+ }
+ },
+ "required": [
+ "status",
+ "request_id"
+ ],
+ "type": "object"
+ },
+ "VideoFile": {
+ "properties": {
+ "content_type": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "The mime type of the file.",
+ "examples": [
+ "image/png"
+ ],
+ "title": "Content Type"
+ },
+ "duration": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "The duration of the video",
+ "title": "Duration"
+ },
+ "file_name": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "The name of the file. It will be auto-generated if not provided.",
+ "examples": [
+ "z9RV14K95DvU.png"
+ ],
+ "title": "File Name"
+ },
+ "file_size": {
+ "anyOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "The size of the file in bytes.",
+ "examples": [
+ 4404019
+ ],
+ "title": "File Size"
+ },
+ "fps": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "The FPS of the video",
+ "title": "Fps"
+ },
+ "height": {
+ "anyOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "The height of the video",
+ "title": "Height"
+ },
+ "num_frames": {
+ "anyOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "The number of frames in the video",
+ "title": "Num Frames"
+ },
+ "url": {
+ "description": "The URL where the file can be downloaded from.",
+ "title": "Url",
+ "type": "string"
+ },
+ "width": {
+ "anyOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "The width of the video",
+ "title": "Width"
+ }
+ },
+ "required": [
+ "url"
+ ],
+ "title": "VideoFile",
+ "type": "object",
+ "x-fal-order-properties": [
+ "url",
+ "content_type",
+ "file_name",
+ "file_size",
+ "width",
+ "height",
+ "fps",
+ "duration",
+ "num_frames"
+ ]
+ }
+ },
+ "securitySchemes": {
+ "apiKeyAuth": {
+ "description": "Fal Key",
+ "in": "header",
+ "name": "Authorization",
+ "type": "apiKey"
+ }
+ }
+ },
+ "info": {
+ "description": "H3 Max Insert Video generates a new scene between two selected points in an existing video. Set a start time and a resume time, describe the new action or provide visual references, and receive a complete video that combines the opening footage, the generated scene, and the remaining source footage.\n",
+ "title": "Queue OpenAPI for minimax/h3-max/insert-video",
+ "version": "1.0.0",
+ "x-fal-metadata": {
+ "about": "Inject Video",
+ "category": "video-to-video",
+ "documentationUrl": "https://fal.ai/models/minimax/h3-max/insert-video/api",
+ "endpointId": "minimax/h3-max/insert-video",
+ "playgroundUrl": "https://fal.ai/models/minimax/h3-max/insert-video",
+ "thumbnailUrl": "https://v3b.fal.media/files/b/0aac45ed/CUlIKgQ55O4HiSkSG0OEL.jpg"
+ }
+ },
+ "openapi": "3.1.0",
+ "paths": {
+ "/minimax/h3-max/insert-video": {
+ "post": {
+ "requestBody": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/H3MaxInsertVideoInput"
+ }
+ }
+ },
+ "required": true
+ },
+ "responses": {
+ "200": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/QueueStatus"
+ }
+ }
+ },
+ "description": "The request status."
+ }
+ }
+ }
+ },
+ "/minimax/h3-max/insert-video/requests/{request_id}": {
+ "get": {
+ "parameters": [
+ {
+ "in": "path",
+ "name": "request_id",
+ "required": true,
+ "schema": {
+ "description": "Request ID",
+ "type": "string"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/H3MaxInsertVideoOutput"
+ }
+ }
+ },
+ "description": "Result of the request."
+ }
+ }
+ }
+ },
+ "/minimax/h3-max/insert-video/requests/{request_id}/cancel": {
+ "put": {
+ "parameters": [
+ {
+ "in": "path",
+ "name": "request_id",
+ "required": true,
+ "schema": {
+ "description": "Request ID",
+ "type": "string"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "properties": {
+ "success": {
+ "description": "Whether the request was cancelled successfully.",
+ "type": "boolean"
+ }
+ },
+ "type": "object"
+ }
+ }
+ },
+ "description": "The request was cancelled."
+ }
+ }
+ }
+ },
+ "/minimax/h3-max/insert-video/requests/{request_id}/status": {
+ "get": {
+ "parameters": [
+ {
+ "in": "path",
+ "name": "request_id",
+ "required": true,
+ "schema": {
+ "description": "Request ID",
+ "type": "string"
+ }
+ },
+ {
+ "in": "query",
+ "name": "logs",
+ "required": false,
+ "schema": {
+ "description": "Whether to include logs (`1`) in the response or not (`0`).",
+ "type": "number"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/QueueStatus"
+ }
+ }
+ },
+ "description": "The request status."
+ }
+ }
+ }
+ }
+ },
+ "security": [
+ {
+ "apiKeyAuth": []
+ }
+ ],
+ "servers": [
+ {
+ "url": "https://queue.fal.run"
+ }
+ ]
+}
diff --git a/tests/fixtures/provider-schemas/fal/minimax__h3-max__lip-sync__image-to-video.json b/tests/fixtures/provider-schemas/fal/minimax__h3-max__lip-sync__image-to-video.json
new file mode 100644
index 00000000..6e935e55
--- /dev/null
+++ b/tests/fixtures/provider-schemas/fal/minimax__h3-max__lip-sync__image-to-video.json
@@ -0,0 +1,386 @@
+{
+ "components": {
+ "schemas": {
+ "File": {
+ "properties": {
+ "content_type": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "The mime type of the file.",
+ "examples": [
+ "image/png"
+ ],
+ "title": "Content Type"
+ },
+ "file_name": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "The name of the file. It will be auto-generated if not provided.",
+ "examples": [
+ "z9RV14K95DvU.png"
+ ],
+ "title": "File Name"
+ },
+ "file_size": {
+ "anyOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "The size of the file in bytes.",
+ "examples": [
+ 4404019
+ ],
+ "title": "File Size"
+ },
+ "url": {
+ "description": "The URL where the file can be downloaded from.",
+ "title": "Url",
+ "type": "string"
+ }
+ },
+ "required": [
+ "url"
+ ],
+ "title": "File",
+ "type": "object",
+ "x-fal-order-properties": [
+ "url",
+ "content_type",
+ "file_name",
+ "file_size"
+ ]
+ },
+ "H3MaxLipSyncImageToVideoInput": {
+ "properties": {
+ "audio_url": {
+ "description": "Audio to synchronize the mouth movements to, at least 5 seconds long. Supports up to 15 minutes. The output video matches the supplied audio duration.",
+ "title": "Audio Url",
+ "type": "string"
+ },
+ "enable_safety_checker": {
+ "default": true,
+ "description": "Enable content safety checks.",
+ "title": "Enable Safety Checker",
+ "type": "boolean"
+ },
+ "enable_transcription": {
+ "default": true,
+ "description": "Transcribe the supplied audio to guide lip synchronization. Turn this off if the audio has a lot of non-word sound, such as music, singing, laughter or noise, which the transcript may turn into words that were never spoken.",
+ "title": "Enable Transcription",
+ "type": "boolean"
+ },
+ "image_url": {
+ "description": "Image to animate. The aspect ratio must be between 0.4 and 2.5.",
+ "title": "Image Url",
+ "type": "string"
+ },
+ "resolution": {
+ "default": "768P",
+ "description": "Output resolution. Uses the supported aspect ratio nearest the image.",
+ "enum": [
+ "480P",
+ "768P",
+ "1080P",
+ "2K"
+ ],
+ "title": "Resolution",
+ "type": "string"
+ },
+ "seed": {
+ "anyOf": [
+ {
+ "maximum": 2147483647,
+ "minimum": 0,
+ "type": "integer"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "Random seed; selected randomly if omitted.",
+ "title": "Seed"
+ }
+ },
+ "required": [
+ "image_url",
+ "audio_url"
+ ],
+ "title": "MaxLipSyncImageInput",
+ "type": "object",
+ "x-fal-order-properties": [
+ "image_url",
+ "audio_url",
+ "resolution",
+ "enable_transcription",
+ "seed",
+ "enable_safety_checker"
+ ]
+ },
+ "H3MaxLipSyncImageToVideoOutput": {
+ "properties": {
+ "duration": {
+ "description": "Output duration in seconds.",
+ "title": "Duration",
+ "type": "number"
+ },
+ "seed": {
+ "description": "Random seed used for generation.",
+ "title": "Seed",
+ "type": "integer"
+ },
+ "timings": {
+ "anyOf": [
+ {
+ "additionalProperties": {
+ "type": "number"
+ },
+ "type": "object"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "Timing breakdown in seconds. 'inference' is the DiT denoising time on the GPU backend, summed over every window this request generated. Null on routes that do not report backend timings.",
+ "title": "Timings"
+ },
+ "video": {
+ "$ref": "#/components/schemas/File",
+ "description": "Lip-synced video with the supplied soundtrack."
+ }
+ },
+ "required": [
+ "video",
+ "seed",
+ "duration"
+ ],
+ "title": "LipSyncOutput",
+ "type": "object",
+ "x-fal-order-properties": [
+ "video",
+ "seed",
+ "duration",
+ "timings"
+ ]
+ },
+ "QueueStatus": {
+ "properties": {
+ "cancel_url": {
+ "description": "The cancel url.",
+ "type": "string"
+ },
+ "logs": {
+ "additionalProperties": true,
+ "description": "The logs.",
+ "type": "object"
+ },
+ "metrics": {
+ "additionalProperties": true,
+ "description": "The metrics.",
+ "type": "object"
+ },
+ "queue_position": {
+ "description": "The queue position.",
+ "type": "integer"
+ },
+ "request_id": {
+ "description": "The request id.",
+ "type": "string"
+ },
+ "response_url": {
+ "description": "The response url.",
+ "type": "string"
+ },
+ "status": {
+ "enum": [
+ "IN_QUEUE",
+ "IN_PROGRESS",
+ "COMPLETED"
+ ],
+ "type": "string"
+ },
+ "status_url": {
+ "description": "The status url.",
+ "type": "string"
+ }
+ },
+ "required": [
+ "status",
+ "request_id"
+ ],
+ "type": "object"
+ }
+ },
+ "securitySchemes": {
+ "apiKeyAuth": {
+ "description": "Fal Key",
+ "in": "header",
+ "name": "Authorization",
+ "type": "apiKey"
+ }
+ }
+ },
+ "info": {
+ "description": "The OpenAPI schema for the minimax/h3-max/lip-sync/image-to-video queue.",
+ "title": "Queue OpenAPI for minimax/h3-max/lip-sync/image-to-video",
+ "version": "1.0.0",
+ "x-fal-metadata": {
+ "about": "Lip Sync Image To Video",
+ "category": "image-to-video",
+ "documentationUrl": "https://fal.ai/models/minimax/h3-max/lip-sync/image-to-video/api",
+ "endpointId": "minimax/h3-max/lip-sync/image-to-video",
+ "playgroundUrl": "https://fal.ai/models/minimax/h3-max/lip-sync/image-to-video",
+ "thumbnailUrl": "https://v3b.fal.media/files/b/0aaac3b8/AFRNL61Lm2CQntBtg88Hv.jpg"
+ }
+ },
+ "openapi": "3.1.0",
+ "paths": {
+ "/minimax/h3-max/lip-sync/image-to-video": {
+ "post": {
+ "requestBody": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/H3MaxLipSyncImageToVideoInput"
+ }
+ }
+ },
+ "required": true
+ },
+ "responses": {
+ "200": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/QueueStatus"
+ }
+ }
+ },
+ "description": "The request status."
+ }
+ }
+ }
+ },
+ "/minimax/h3-max/lip-sync/image-to-video/requests/{request_id}": {
+ "get": {
+ "parameters": [
+ {
+ "in": "path",
+ "name": "request_id",
+ "required": true,
+ "schema": {
+ "description": "Request ID",
+ "type": "string"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/H3MaxLipSyncImageToVideoOutput"
+ }
+ }
+ },
+ "description": "Result of the request."
+ }
+ }
+ }
+ },
+ "/minimax/h3-max/lip-sync/image-to-video/requests/{request_id}/cancel": {
+ "put": {
+ "parameters": [
+ {
+ "in": "path",
+ "name": "request_id",
+ "required": true,
+ "schema": {
+ "description": "Request ID",
+ "type": "string"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "properties": {
+ "success": {
+ "description": "Whether the request was cancelled successfully.",
+ "type": "boolean"
+ }
+ },
+ "type": "object"
+ }
+ }
+ },
+ "description": "The request was cancelled."
+ }
+ }
+ }
+ },
+ "/minimax/h3-max/lip-sync/image-to-video/requests/{request_id}/status": {
+ "get": {
+ "parameters": [
+ {
+ "in": "path",
+ "name": "request_id",
+ "required": true,
+ "schema": {
+ "description": "Request ID",
+ "type": "string"
+ }
+ },
+ {
+ "in": "query",
+ "name": "logs",
+ "required": false,
+ "schema": {
+ "description": "Whether to include logs (`1`) in the response or not (`0`).",
+ "type": "number"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/QueueStatus"
+ }
+ }
+ },
+ "description": "The request status."
+ }
+ }
+ }
+ }
+ },
+ "security": [
+ {
+ "apiKeyAuth": []
+ }
+ ],
+ "servers": [
+ {
+ "url": "https://queue.fal.run"
+ }
+ ]
+}
diff --git a/tests/fixtures/provider-schemas/fal/minimax__h3-max__relight.json b/tests/fixtures/provider-schemas/fal/minimax__h3-max__relight.json
new file mode 100644
index 00000000..2760ad56
--- /dev/null
+++ b/tests/fixtures/provider-schemas/fal/minimax__h3-max__relight.json
@@ -0,0 +1,396 @@
+{
+ "components": {
+ "schemas": {
+ "File": {
+ "properties": {
+ "content_type": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "The mime type of the file.",
+ "examples": [
+ "image/png"
+ ],
+ "title": "Content Type"
+ },
+ "file_name": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "The name of the file. It will be auto-generated if not provided.",
+ "examples": [
+ "z9RV14K95DvU.png"
+ ],
+ "title": "File Name"
+ },
+ "file_size": {
+ "anyOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "The size of the file in bytes.",
+ "examples": [
+ 4404019
+ ],
+ "title": "File Size"
+ },
+ "url": {
+ "description": "The URL where the file can be downloaded from.",
+ "title": "Url",
+ "type": "string"
+ }
+ },
+ "required": [
+ "url"
+ ],
+ "title": "File",
+ "type": "object",
+ "x-fal-order-properties": [
+ "url",
+ "content_type",
+ "file_name",
+ "file_size"
+ ]
+ },
+ "H3MaxRelightInput": {
+ "additionalProperties": false,
+ "properties": {
+ "aspect_ratio": {
+ "default": "16:9",
+ "description": "Output video aspect ratio.",
+ "enum": [
+ "adaptive",
+ "21:9",
+ "16:9",
+ "4:3",
+ "1:1",
+ "3:4",
+ "9:16"
+ ],
+ "title": "Aspect Ratio",
+ "type": "string"
+ },
+ "enable_safety_checker": {
+ "default": true,
+ "description": "Enable safety checking.",
+ "title": "Enable Safety Checker",
+ "type": "boolean"
+ },
+ "reference_image_url": {
+ "description": "Sphere render showing the target lighting.",
+ "minLength": 1,
+ "title": "Reference Image Url",
+ "type": "string"
+ },
+ "resolution": {
+ "default": "768P",
+ "description": "Output video resolution. 480P and 768P generate natively; 1080P and 2K (1440p) use latent upscaling and refinement from 768P.",
+ "enum": [
+ "480P",
+ "768P",
+ "1080P",
+ "2K"
+ ],
+ "title": "Resolution",
+ "type": "string"
+ },
+ "seed": {
+ "anyOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "Random seed for video generation.",
+ "title": "Seed"
+ },
+ "sync_mode": {
+ "default": false,
+ "description": "Return video as a data URI.",
+ "title": "Sync Mode",
+ "type": "boolean"
+ },
+ "video_url": {
+ "description": "Source video up to 15 seconds long. Converted to constant 24 fps and trimmed at the end to the closest 17n+5 frame count, with at least 56 frames (about 2.33 seconds) remaining. The output matches this prepared video's frame count and duration.",
+ "minLength": 1,
+ "title": "Video Url",
+ "type": "string"
+ }
+ },
+ "required": [
+ "video_url",
+ "reference_image_url"
+ ],
+ "title": "RelightInput",
+ "type": "object",
+ "x-fal-order-properties": [
+ "video_url",
+ "reference_image_url",
+ "resolution",
+ "aspect_ratio",
+ "seed",
+ "enable_safety_checker",
+ "sync_mode"
+ ]
+ },
+ "H3MaxRelightOutput": {
+ "properties": {
+ "seed": {
+ "description": "Base seed for reproducing the generation.",
+ "title": "Seed",
+ "type": "integer"
+ },
+ "timings": {
+ "anyOf": [
+ {
+ "additionalProperties": {
+ "type": "number"
+ },
+ "type": "object"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "Inference duration in seconds, when available.",
+ "title": "Timings"
+ },
+ "video": {
+ "$ref": "#/components/schemas/File",
+ "description": "The relighted video."
+ }
+ },
+ "required": [
+ "video",
+ "seed"
+ ],
+ "title": "RelightOutput",
+ "type": "object",
+ "x-fal-order-properties": [
+ "video",
+ "seed",
+ "timings"
+ ]
+ },
+ "QueueStatus": {
+ "properties": {
+ "cancel_url": {
+ "description": "The cancel url.",
+ "type": "string"
+ },
+ "logs": {
+ "additionalProperties": true,
+ "description": "The logs.",
+ "type": "object"
+ },
+ "metrics": {
+ "additionalProperties": true,
+ "description": "The metrics.",
+ "type": "object"
+ },
+ "queue_position": {
+ "description": "The queue position.",
+ "type": "integer"
+ },
+ "request_id": {
+ "description": "The request id.",
+ "type": "string"
+ },
+ "response_url": {
+ "description": "The response url.",
+ "type": "string"
+ },
+ "status": {
+ "enum": [
+ "IN_QUEUE",
+ "IN_PROGRESS",
+ "COMPLETED"
+ ],
+ "type": "string"
+ },
+ "status_url": {
+ "description": "The status url.",
+ "type": "string"
+ }
+ },
+ "required": [
+ "status",
+ "request_id"
+ ],
+ "type": "object"
+ }
+ },
+ "securitySchemes": {
+ "apiKeyAuth": {
+ "description": "Fal Key",
+ "in": "header",
+ "name": "Authorization",
+ "type": "apiKey"
+ }
+ }
+ },
+ "info": {
+ "description": "Change the lighting of an existing video. Provide a source video (up to 15 seconds) and a sphere render that shows the target lighting: its color, direction and shadow softness. The model describes the source scene, reads the light from the sphere, and regenerates the video with that lighting while keeping the subjects, setting, motion and camera. The source is converted to 24 fps and the output matches its length (at least about 2.3 seconds). Choose 480p, 768p (default), 1080p or 2K (1080p and 2K are refined from 768p) and an aspect ratio (16:9 by default, or adaptive). Safety checking is enabled by default.",
+ "title": "Queue OpenAPI for minimax/h3-max/relight",
+ "version": "1.0.0",
+ "x-fal-metadata": {
+ "about": "Generate",
+ "category": "video-to-video",
+ "documentationUrl": "https://fal.ai/models/minimax/h3-max/relight/api",
+ "endpointId": "minimax/h3-max/relight",
+ "playgroundUrl": "https://fal.ai/models/minimax/h3-max/relight",
+ "thumbnailUrl": "https://v3b.fal.media/files/b/0aad7408/RK0vzvak7-_A8Ajqd5pCC.jpg"
+ }
+ },
+ "openapi": "3.1.0",
+ "paths": {
+ "/minimax/h3-max/relight": {
+ "post": {
+ "requestBody": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/H3MaxRelightInput"
+ }
+ }
+ },
+ "required": true
+ },
+ "responses": {
+ "200": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/QueueStatus"
+ }
+ }
+ },
+ "description": "The request status."
+ }
+ }
+ }
+ },
+ "/minimax/h3-max/relight/requests/{request_id}": {
+ "get": {
+ "parameters": [
+ {
+ "in": "path",
+ "name": "request_id",
+ "required": true,
+ "schema": {
+ "description": "Request ID",
+ "type": "string"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/H3MaxRelightOutput"
+ }
+ }
+ },
+ "description": "Result of the request."
+ }
+ }
+ }
+ },
+ "/minimax/h3-max/relight/requests/{request_id}/cancel": {
+ "put": {
+ "parameters": [
+ {
+ "in": "path",
+ "name": "request_id",
+ "required": true,
+ "schema": {
+ "description": "Request ID",
+ "type": "string"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "properties": {
+ "success": {
+ "description": "Whether the request was cancelled successfully.",
+ "type": "boolean"
+ }
+ },
+ "type": "object"
+ }
+ }
+ },
+ "description": "The request was cancelled."
+ }
+ }
+ }
+ },
+ "/minimax/h3-max/relight/requests/{request_id}/status": {
+ "get": {
+ "parameters": [
+ {
+ "in": "path",
+ "name": "request_id",
+ "required": true,
+ "schema": {
+ "description": "Request ID",
+ "type": "string"
+ }
+ },
+ {
+ "in": "query",
+ "name": "logs",
+ "required": false,
+ "schema": {
+ "description": "Whether to include logs (`1`) in the response or not (`0`).",
+ "type": "number"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/QueueStatus"
+ }
+ }
+ },
+ "description": "The request status."
+ }
+ }
+ }
+ }
+ },
+ "security": [
+ {
+ "apiKeyAuth": []
+ }
+ ],
+ "servers": [
+ {
+ "url": "https://queue.fal.run"
+ }
+ ]
+}
diff --git a/tests/fixtures/provider-schemas/fal/minimax__h3-max__styles__16bit-pixel.json b/tests/fixtures/provider-schemas/fal/minimax__h3-max__styles__16bit-pixel.json
new file mode 100644
index 00000000..a5d07284
--- /dev/null
+++ b/tests/fixtures/provider-schemas/fal/minimax__h3-max__styles__16bit-pixel.json
@@ -0,0 +1,370 @@
+{
+ "components": {
+ "schemas": {
+ "File": {
+ "properties": {
+ "content_type": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "The mime type of the file.",
+ "examples": [
+ "image/png"
+ ],
+ "title": "Content Type"
+ },
+ "file_name": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "The name of the file. It will be auto-generated if not provided.",
+ "examples": [
+ "z9RV14K95DvU.png"
+ ],
+ "title": "File Name"
+ },
+ "file_size": {
+ "anyOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "The size of the file in bytes.",
+ "examples": [
+ 4404019
+ ],
+ "title": "File Size"
+ },
+ "url": {
+ "description": "The URL where the file can be downloaded from.",
+ "title": "Url",
+ "type": "string"
+ }
+ },
+ "required": [
+ "url"
+ ],
+ "title": "File",
+ "type": "object",
+ "x-fal-order-properties": [
+ "url",
+ "content_type",
+ "file_name",
+ "file_size"
+ ]
+ },
+ "H3MaxStyles16bitPixelInput": {
+ "additionalProperties": false,
+ "properties": {
+ "aspect_ratio": {
+ "default": "16:9",
+ "description": "Video aspect ratio for text-only generation. Ignored when image_url is provided.",
+ "enum": [
+ "21:9",
+ "16:9",
+ "4:3",
+ "1:1",
+ "3:4",
+ "9:16"
+ ],
+ "title": "Aspect Ratio",
+ "type": "string"
+ },
+ "duration": {
+ "default": 5,
+ "description": "Requested video duration in seconds.",
+ "maximum": 15,
+ "minimum": 5,
+ "title": "Duration",
+ "type": "integer"
+ },
+ "image_url": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "Optional first-frame image. Use pixel artwork for the most consistent style. When provided, its aspect ratio determines the output canvas.",
+ "title": "Image Url"
+ },
+ "prompt": {
+ "description": "Describe the scene, action, camera and sound. The 16-bit pixel style is applied automatically.",
+ "examples": [
+ "A young bicycle courier pedals through a sunlit flower market. Medium side view, steady tracking camera, measured pedaling. Bicycle chain clicks and gentle market ambience."
+ ],
+ "maxLength": 49815,
+ "minLength": 1,
+ "title": "Prompt",
+ "type": "string"
+ },
+ "seed": {
+ "anyOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "Random seed. Omit to choose one automatically.",
+ "title": "Seed"
+ }
+ },
+ "required": [
+ "prompt"
+ ],
+ "title": "PixelInput",
+ "type": "object",
+ "x-fal-order-properties": [
+ "prompt",
+ "image_url",
+ "duration",
+ "aspect_ratio",
+ "seed"
+ ]
+ },
+ "H3MaxStyles16bitPixelOutput": {
+ "properties": {
+ "seed": {
+ "description": "Seed used for this generation.",
+ "title": "Seed",
+ "type": "integer"
+ },
+ "video": {
+ "$ref": "#/components/schemas/File",
+ "description": "Generated 768P pixel-animation video with audio."
+ }
+ },
+ "required": [
+ "video",
+ "seed"
+ ],
+ "title": "PixelOutput",
+ "type": "object",
+ "x-fal-order-properties": [
+ "video",
+ "seed"
+ ]
+ },
+ "QueueStatus": {
+ "properties": {
+ "cancel_url": {
+ "description": "The cancel url.",
+ "type": "string"
+ },
+ "logs": {
+ "additionalProperties": true,
+ "description": "The logs.",
+ "type": "object"
+ },
+ "metrics": {
+ "additionalProperties": true,
+ "description": "The metrics.",
+ "type": "object"
+ },
+ "queue_position": {
+ "description": "The queue position.",
+ "type": "integer"
+ },
+ "request_id": {
+ "description": "The request id.",
+ "type": "string"
+ },
+ "response_url": {
+ "description": "The response url.",
+ "type": "string"
+ },
+ "status": {
+ "enum": [
+ "IN_QUEUE",
+ "IN_PROGRESS",
+ "COMPLETED"
+ ],
+ "type": "string"
+ },
+ "status_url": {
+ "description": "The status url.",
+ "type": "string"
+ }
+ },
+ "required": [
+ "status",
+ "request_id"
+ ],
+ "type": "object"
+ }
+ },
+ "securitySchemes": {
+ "apiKeyAuth": {
+ "description": "Fal Key",
+ "in": "header",
+ "name": "Authorization",
+ "type": "apiKey"
+ }
+ }
+ },
+ "info": {
+ "description": "The OpenAPI schema for the minimax/h3-max/styles/16bit-pixel queue.",
+ "title": "Queue OpenAPI for minimax/h3-max/styles/16bit-pixel",
+ "version": "1.0.0",
+ "x-fal-metadata": {
+ "about": "Pixel Video",
+ "category": "text-to-video",
+ "documentationUrl": "https://fal.ai/models/minimax/h3-max/styles/16bit-pixel/api",
+ "endpointId": "minimax/h3-max/styles/16bit-pixel",
+ "playgroundUrl": "https://fal.ai/models/minimax/h3-max/styles/16bit-pixel",
+ "thumbnailUrl": "https://v3b.fal.media/files/b/0aaad5e9/M4QpbIMC5EcjkbBo4AW33.jpg"
+ }
+ },
+ "openapi": "3.1.0",
+ "paths": {
+ "/minimax/h3-max/styles/16bit-pixel": {
+ "post": {
+ "requestBody": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/H3MaxStyles16bitPixelInput"
+ }
+ }
+ },
+ "required": true
+ },
+ "responses": {
+ "200": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/QueueStatus"
+ }
+ }
+ },
+ "description": "The request status."
+ }
+ }
+ }
+ },
+ "/minimax/h3-max/styles/16bit-pixel/requests/{request_id}": {
+ "get": {
+ "parameters": [
+ {
+ "in": "path",
+ "name": "request_id",
+ "required": true,
+ "schema": {
+ "description": "Request ID",
+ "type": "string"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/H3MaxStyles16bitPixelOutput"
+ }
+ }
+ },
+ "description": "Result of the request."
+ }
+ }
+ }
+ },
+ "/minimax/h3-max/styles/16bit-pixel/requests/{request_id}/cancel": {
+ "put": {
+ "parameters": [
+ {
+ "in": "path",
+ "name": "request_id",
+ "required": true,
+ "schema": {
+ "description": "Request ID",
+ "type": "string"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "properties": {
+ "success": {
+ "description": "Whether the request was cancelled successfully.",
+ "type": "boolean"
+ }
+ },
+ "type": "object"
+ }
+ }
+ },
+ "description": "The request was cancelled."
+ }
+ }
+ }
+ },
+ "/minimax/h3-max/styles/16bit-pixel/requests/{request_id}/status": {
+ "get": {
+ "parameters": [
+ {
+ "in": "path",
+ "name": "request_id",
+ "required": true,
+ "schema": {
+ "description": "Request ID",
+ "type": "string"
+ }
+ },
+ {
+ "in": "query",
+ "name": "logs",
+ "required": false,
+ "schema": {
+ "description": "Whether to include logs (`1`) in the response or not (`0`).",
+ "type": "number"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/QueueStatus"
+ }
+ }
+ },
+ "description": "The request status."
+ }
+ }
+ }
+ }
+ },
+ "security": [
+ {
+ "apiKeyAuth": []
+ }
+ ],
+ "servers": [
+ {
+ "url": "https://queue.fal.run"
+ }
+ ]
+}
diff --git a/tests/fixtures/provider-schemas/fal/minimax__h3-max__styles__hand-drawn.json b/tests/fixtures/provider-schemas/fal/minimax__h3-max__styles__hand-drawn.json
new file mode 100644
index 00000000..7e1ecdc6
--- /dev/null
+++ b/tests/fixtures/provider-schemas/fal/minimax__h3-max__styles__hand-drawn.json
@@ -0,0 +1,370 @@
+{
+ "components": {
+ "schemas": {
+ "File": {
+ "properties": {
+ "content_type": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "The mime type of the file.",
+ "examples": [
+ "image/png"
+ ],
+ "title": "Content Type"
+ },
+ "file_name": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "The name of the file. It will be auto-generated if not provided.",
+ "examples": [
+ "z9RV14K95DvU.png"
+ ],
+ "title": "File Name"
+ },
+ "file_size": {
+ "anyOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "The size of the file in bytes.",
+ "examples": [
+ 4404019
+ ],
+ "title": "File Size"
+ },
+ "url": {
+ "description": "The URL where the file can be downloaded from.",
+ "title": "Url",
+ "type": "string"
+ }
+ },
+ "required": [
+ "url"
+ ],
+ "title": "File",
+ "type": "object",
+ "x-fal-order-properties": [
+ "url",
+ "content_type",
+ "file_name",
+ "file_size"
+ ]
+ },
+ "H3MaxStylesHandDrawnInput": {
+ "additionalProperties": false,
+ "properties": {
+ "aspect_ratio": {
+ "default": "16:9",
+ "description": "Video aspect ratio for text-only generation. Ignored when image_url is provided.",
+ "enum": [
+ "21:9",
+ "16:9",
+ "4:3",
+ "1:1",
+ "3:4",
+ "9:16"
+ ],
+ "title": "Aspect Ratio",
+ "type": "string"
+ },
+ "duration": {
+ "default": 5,
+ "description": "Requested video duration in seconds.",
+ "maximum": 15,
+ "minimum": 5,
+ "title": "Duration",
+ "type": "integer"
+ },
+ "image_url": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "Optional first-frame image. Use pencil artwork for the most consistent look; the image's aspect ratio determines the output canvas.",
+ "title": "Image Url"
+ },
+ "prompt": {
+ "description": "Describe the scene, action, camera and sound. The Hand drawn style is applied automatically.",
+ "examples": [
+ "A weary office worker watches his neck stretch upward as a tiny bird lands on his head. Medium locked shot, exaggerated surprise. Soft wing flutters and distant city ambience, no speech."
+ ],
+ "maxLength": 49868,
+ "minLength": 1,
+ "title": "Prompt",
+ "type": "string"
+ },
+ "seed": {
+ "anyOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "Random seed. Omit to choose one automatically.",
+ "title": "Seed"
+ }
+ },
+ "required": [
+ "prompt"
+ ],
+ "title": "HandDrawnInput",
+ "type": "object",
+ "x-fal-order-properties": [
+ "prompt",
+ "image_url",
+ "duration",
+ "aspect_ratio",
+ "seed"
+ ]
+ },
+ "H3MaxStylesHandDrawnOutput": {
+ "properties": {
+ "seed": {
+ "description": "Seed used for this generation.",
+ "title": "Seed",
+ "type": "integer"
+ },
+ "video": {
+ "$ref": "#/components/schemas/File",
+ "description": "Generated 768P hand-drawn animation video with audio."
+ }
+ },
+ "required": [
+ "video",
+ "seed"
+ ],
+ "title": "HandDrawnOutput",
+ "type": "object",
+ "x-fal-order-properties": [
+ "video",
+ "seed"
+ ]
+ },
+ "QueueStatus": {
+ "properties": {
+ "cancel_url": {
+ "description": "The cancel url.",
+ "type": "string"
+ },
+ "logs": {
+ "additionalProperties": true,
+ "description": "The logs.",
+ "type": "object"
+ },
+ "metrics": {
+ "additionalProperties": true,
+ "description": "The metrics.",
+ "type": "object"
+ },
+ "queue_position": {
+ "description": "The queue position.",
+ "type": "integer"
+ },
+ "request_id": {
+ "description": "The request id.",
+ "type": "string"
+ },
+ "response_url": {
+ "description": "The response url.",
+ "type": "string"
+ },
+ "status": {
+ "enum": [
+ "IN_QUEUE",
+ "IN_PROGRESS",
+ "COMPLETED"
+ ],
+ "type": "string"
+ },
+ "status_url": {
+ "description": "The status url.",
+ "type": "string"
+ }
+ },
+ "required": [
+ "status",
+ "request_id"
+ ],
+ "type": "object"
+ }
+ },
+ "securitySchemes": {
+ "apiKeyAuth": {
+ "description": "Fal Key",
+ "in": "header",
+ "name": "Authorization",
+ "type": "apiKey"
+ }
+ }
+ },
+ "info": {
+ "description": "The OpenAPI schema for the minimax/h3-max/styles/hand-drawn queue.",
+ "title": "Queue OpenAPI for minimax/h3-max/styles/hand-drawn",
+ "version": "1.0.0",
+ "x-fal-metadata": {
+ "about": "Hand Drawn Video",
+ "category": "text-to-video",
+ "documentationUrl": "https://fal.ai/models/minimax/h3-max/styles/hand-drawn/api",
+ "endpointId": "minimax/h3-max/styles/hand-drawn",
+ "playgroundUrl": "https://fal.ai/models/minimax/h3-max/styles/hand-drawn",
+ "thumbnailUrl": "https://v3b.fal.media/files/b/0aaad5f2/3kPTumERGySlFQrvJdc-5.jpg"
+ }
+ },
+ "openapi": "3.1.0",
+ "paths": {
+ "/minimax/h3-max/styles/hand-drawn": {
+ "post": {
+ "requestBody": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/H3MaxStylesHandDrawnInput"
+ }
+ }
+ },
+ "required": true
+ },
+ "responses": {
+ "200": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/QueueStatus"
+ }
+ }
+ },
+ "description": "The request status."
+ }
+ }
+ }
+ },
+ "/minimax/h3-max/styles/hand-drawn/requests/{request_id}": {
+ "get": {
+ "parameters": [
+ {
+ "in": "path",
+ "name": "request_id",
+ "required": true,
+ "schema": {
+ "description": "Request ID",
+ "type": "string"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/H3MaxStylesHandDrawnOutput"
+ }
+ }
+ },
+ "description": "Result of the request."
+ }
+ }
+ }
+ },
+ "/minimax/h3-max/styles/hand-drawn/requests/{request_id}/cancel": {
+ "put": {
+ "parameters": [
+ {
+ "in": "path",
+ "name": "request_id",
+ "required": true,
+ "schema": {
+ "description": "Request ID",
+ "type": "string"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "properties": {
+ "success": {
+ "description": "Whether the request was cancelled successfully.",
+ "type": "boolean"
+ }
+ },
+ "type": "object"
+ }
+ }
+ },
+ "description": "The request was cancelled."
+ }
+ }
+ }
+ },
+ "/minimax/h3-max/styles/hand-drawn/requests/{request_id}/status": {
+ "get": {
+ "parameters": [
+ {
+ "in": "path",
+ "name": "request_id",
+ "required": true,
+ "schema": {
+ "description": "Request ID",
+ "type": "string"
+ }
+ },
+ {
+ "in": "query",
+ "name": "logs",
+ "required": false,
+ "schema": {
+ "description": "Whether to include logs (`1`) in the response or not (`0`).",
+ "type": "number"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/QueueStatus"
+ }
+ }
+ },
+ "description": "The request status."
+ }
+ }
+ }
+ }
+ },
+ "security": [
+ {
+ "apiKeyAuth": []
+ }
+ ],
+ "servers": [
+ {
+ "url": "https://queue.fal.run"
+ }
+ ]
+}
diff --git a/tests/fixtures/provider-schemas/fal/minimax__h3-max__styles__low-poly.json b/tests/fixtures/provider-schemas/fal/minimax__h3-max__styles__low-poly.json
new file mode 100644
index 00000000..c0924dfe
--- /dev/null
+++ b/tests/fixtures/provider-schemas/fal/minimax__h3-max__styles__low-poly.json
@@ -0,0 +1,370 @@
+{
+ "components": {
+ "schemas": {
+ "File": {
+ "properties": {
+ "content_type": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "The mime type of the file.",
+ "examples": [
+ "image/png"
+ ],
+ "title": "Content Type"
+ },
+ "file_name": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "The name of the file. It will be auto-generated if not provided.",
+ "examples": [
+ "z9RV14K95DvU.png"
+ ],
+ "title": "File Name"
+ },
+ "file_size": {
+ "anyOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "The size of the file in bytes.",
+ "examples": [
+ 4404019
+ ],
+ "title": "File Size"
+ },
+ "url": {
+ "description": "The URL where the file can be downloaded from.",
+ "title": "Url",
+ "type": "string"
+ }
+ },
+ "required": [
+ "url"
+ ],
+ "title": "File",
+ "type": "object",
+ "x-fal-order-properties": [
+ "url",
+ "content_type",
+ "file_name",
+ "file_size"
+ ]
+ },
+ "H3MaxStylesLowPolyInput": {
+ "additionalProperties": false,
+ "properties": {
+ "aspect_ratio": {
+ "default": "16:9",
+ "description": "Video aspect ratio for text-only generation. Ignored when image_url is provided.",
+ "enum": [
+ "21:9",
+ "16:9",
+ "4:3",
+ "1:1",
+ "3:4",
+ "9:16"
+ ],
+ "title": "Aspect Ratio",
+ "type": "string"
+ },
+ "duration": {
+ "default": 5,
+ "description": "Requested video duration in seconds.",
+ "maximum": 15,
+ "minimum": 5,
+ "title": "Duration",
+ "type": "integer"
+ },
+ "image_url": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "Optional first-frame image. Use low-poly or retro 3D artwork for the most consistent look; the image's aspect ratio determines the output canvas.",
+ "title": "Image Url"
+ },
+ "prompt": {
+ "description": "Describe the scene, action, camera and sound. The retro low-poly 3D style is applied automatically.",
+ "examples": [
+ "A woman in a red coat runs across a rainy rooftop at night, jumps over a low ventilation duct and keeps running. A helicopter searchlight sweeps the buildings behind her. The camera tracks alongside her."
+ ],
+ "maxLength": 49914,
+ "minLength": 1,
+ "title": "Prompt",
+ "type": "string"
+ },
+ "seed": {
+ "anyOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "Random seed. Omit to choose one automatically.",
+ "title": "Seed"
+ }
+ },
+ "required": [
+ "prompt"
+ ],
+ "title": "LowPolyInput",
+ "type": "object",
+ "x-fal-order-properties": [
+ "prompt",
+ "image_url",
+ "duration",
+ "aspect_ratio",
+ "seed"
+ ]
+ },
+ "H3MaxStylesLowPolyOutput": {
+ "properties": {
+ "seed": {
+ "description": "Seed used for this generation.",
+ "title": "Seed",
+ "type": "integer"
+ },
+ "video": {
+ "$ref": "#/components/schemas/File",
+ "description": "Generated 768P retro low-poly 3D video with audio."
+ }
+ },
+ "required": [
+ "video",
+ "seed"
+ ],
+ "title": "LowPolyOutput",
+ "type": "object",
+ "x-fal-order-properties": [
+ "video",
+ "seed"
+ ]
+ },
+ "QueueStatus": {
+ "properties": {
+ "cancel_url": {
+ "description": "The cancel url.",
+ "type": "string"
+ },
+ "logs": {
+ "additionalProperties": true,
+ "description": "The logs.",
+ "type": "object"
+ },
+ "metrics": {
+ "additionalProperties": true,
+ "description": "The metrics.",
+ "type": "object"
+ },
+ "queue_position": {
+ "description": "The queue position.",
+ "type": "integer"
+ },
+ "request_id": {
+ "description": "The request id.",
+ "type": "string"
+ },
+ "response_url": {
+ "description": "The response url.",
+ "type": "string"
+ },
+ "status": {
+ "enum": [
+ "IN_QUEUE",
+ "IN_PROGRESS",
+ "COMPLETED"
+ ],
+ "type": "string"
+ },
+ "status_url": {
+ "description": "The status url.",
+ "type": "string"
+ }
+ },
+ "required": [
+ "status",
+ "request_id"
+ ],
+ "type": "object"
+ }
+ },
+ "securitySchemes": {
+ "apiKeyAuth": {
+ "description": "Fal Key",
+ "in": "header",
+ "name": "Authorization",
+ "type": "apiKey"
+ }
+ }
+ },
+ "info": {
+ "description": "The OpenAPI schema for the minimax/h3-max/styles/low-poly queue.",
+ "title": "Queue OpenAPI for minimax/h3-max/styles/low-poly",
+ "version": "1.0.0",
+ "x-fal-metadata": {
+ "about": "Low Poly Video",
+ "category": "text-to-video",
+ "documentationUrl": "https://fal.ai/models/minimax/h3-max/styles/low-poly/api",
+ "endpointId": "minimax/h3-max/styles/low-poly",
+ "playgroundUrl": "https://fal.ai/models/minimax/h3-max/styles/low-poly",
+ "thumbnailUrl": "https://v3b.fal.media/files/b/0aaad5f8/7YH1svyhRf42Itvh-gQ4T.jpg"
+ }
+ },
+ "openapi": "3.1.0",
+ "paths": {
+ "/minimax/h3-max/styles/low-poly": {
+ "post": {
+ "requestBody": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/H3MaxStylesLowPolyInput"
+ }
+ }
+ },
+ "required": true
+ },
+ "responses": {
+ "200": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/QueueStatus"
+ }
+ }
+ },
+ "description": "The request status."
+ }
+ }
+ }
+ },
+ "/minimax/h3-max/styles/low-poly/requests/{request_id}": {
+ "get": {
+ "parameters": [
+ {
+ "in": "path",
+ "name": "request_id",
+ "required": true,
+ "schema": {
+ "description": "Request ID",
+ "type": "string"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/H3MaxStylesLowPolyOutput"
+ }
+ }
+ },
+ "description": "Result of the request."
+ }
+ }
+ }
+ },
+ "/minimax/h3-max/styles/low-poly/requests/{request_id}/cancel": {
+ "put": {
+ "parameters": [
+ {
+ "in": "path",
+ "name": "request_id",
+ "required": true,
+ "schema": {
+ "description": "Request ID",
+ "type": "string"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "properties": {
+ "success": {
+ "description": "Whether the request was cancelled successfully.",
+ "type": "boolean"
+ }
+ },
+ "type": "object"
+ }
+ }
+ },
+ "description": "The request was cancelled."
+ }
+ }
+ }
+ },
+ "/minimax/h3-max/styles/low-poly/requests/{request_id}/status": {
+ "get": {
+ "parameters": [
+ {
+ "in": "path",
+ "name": "request_id",
+ "required": true,
+ "schema": {
+ "description": "Request ID",
+ "type": "string"
+ }
+ },
+ {
+ "in": "query",
+ "name": "logs",
+ "required": false,
+ "schema": {
+ "description": "Whether to include logs (`1`) in the response or not (`0`).",
+ "type": "number"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/QueueStatus"
+ }
+ }
+ },
+ "description": "The request status."
+ }
+ }
+ }
+ }
+ },
+ "security": [
+ {
+ "apiKeyAuth": []
+ }
+ ],
+ "servers": [
+ {
+ "url": "https://queue.fal.run"
+ }
+ ]
+}
diff --git a/tests/fixtures/provider-schemas/fal/minimax__h3-max__styles__retro-toon-70s.json b/tests/fixtures/provider-schemas/fal/minimax__h3-max__styles__retro-toon-70s.json
new file mode 100644
index 00000000..d56b0227
--- /dev/null
+++ b/tests/fixtures/provider-schemas/fal/minimax__h3-max__styles__retro-toon-70s.json
@@ -0,0 +1,370 @@
+{
+ "components": {
+ "schemas": {
+ "File": {
+ "properties": {
+ "content_type": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "The mime type of the file.",
+ "examples": [
+ "image/png"
+ ],
+ "title": "Content Type"
+ },
+ "file_name": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "The name of the file. It will be auto-generated if not provided.",
+ "examples": [
+ "z9RV14K95DvU.png"
+ ],
+ "title": "File Name"
+ },
+ "file_size": {
+ "anyOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "The size of the file in bytes.",
+ "examples": [
+ 4404019
+ ],
+ "title": "File Size"
+ },
+ "url": {
+ "description": "The URL where the file can be downloaded from.",
+ "title": "Url",
+ "type": "string"
+ }
+ },
+ "required": [
+ "url"
+ ],
+ "title": "File",
+ "type": "object",
+ "x-fal-order-properties": [
+ "url",
+ "content_type",
+ "file_name",
+ "file_size"
+ ]
+ },
+ "H3MaxStylesRetroToon70sInput": {
+ "additionalProperties": false,
+ "properties": {
+ "aspect_ratio": {
+ "default": "16:9",
+ "description": "Video aspect ratio for text-only generation. Ignored when image_url is provided.",
+ "enum": [
+ "21:9",
+ "16:9",
+ "4:3",
+ "1:1",
+ "3:4",
+ "9:16"
+ ],
+ "title": "Aspect Ratio",
+ "type": "string"
+ },
+ "duration": {
+ "default": 5,
+ "description": "Requested video duration in seconds.",
+ "maximum": 15,
+ "minimum": 5,
+ "title": "Duration",
+ "type": "integer"
+ },
+ "image_url": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "Optional first-frame image. Use painted-style artwork for the most consistent look; the image's aspect ratio determines the output canvas.",
+ "title": "Image Url"
+ },
+ "prompt": {
+ "description": "Describe the scene, action, camera and sound. The retro 1970s hand-painted animation style is applied automatically.",
+ "examples": [
+ "A lone warrior with a broadsword stands on a windswept rocky ridge at sunset as an enormous dragon glides past below him. Wide heroic shot. Wind and the slow beat of dragon wings, no speech."
+ ],
+ "maxLength": 49864,
+ "minLength": 1,
+ "title": "Prompt",
+ "type": "string"
+ },
+ "seed": {
+ "anyOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "Random seed. Omit to choose one automatically.",
+ "title": "Seed"
+ }
+ },
+ "required": [
+ "prompt"
+ ],
+ "title": "RetroToonInput",
+ "type": "object",
+ "x-fal-order-properties": [
+ "prompt",
+ "image_url",
+ "duration",
+ "aspect_ratio",
+ "seed"
+ ]
+ },
+ "H3MaxStylesRetroToon70sOutput": {
+ "properties": {
+ "seed": {
+ "description": "Seed used for this generation.",
+ "title": "Seed",
+ "type": "integer"
+ },
+ "video": {
+ "$ref": "#/components/schemas/File",
+ "description": "Generated 768P retro hand-painted animation video with audio."
+ }
+ },
+ "required": [
+ "video",
+ "seed"
+ ],
+ "title": "RetroToonOutput",
+ "type": "object",
+ "x-fal-order-properties": [
+ "video",
+ "seed"
+ ]
+ },
+ "QueueStatus": {
+ "properties": {
+ "cancel_url": {
+ "description": "The cancel url.",
+ "type": "string"
+ },
+ "logs": {
+ "additionalProperties": true,
+ "description": "The logs.",
+ "type": "object"
+ },
+ "metrics": {
+ "additionalProperties": true,
+ "description": "The metrics.",
+ "type": "object"
+ },
+ "queue_position": {
+ "description": "The queue position.",
+ "type": "integer"
+ },
+ "request_id": {
+ "description": "The request id.",
+ "type": "string"
+ },
+ "response_url": {
+ "description": "The response url.",
+ "type": "string"
+ },
+ "status": {
+ "enum": [
+ "IN_QUEUE",
+ "IN_PROGRESS",
+ "COMPLETED"
+ ],
+ "type": "string"
+ },
+ "status_url": {
+ "description": "The status url.",
+ "type": "string"
+ }
+ },
+ "required": [
+ "status",
+ "request_id"
+ ],
+ "type": "object"
+ }
+ },
+ "securitySchemes": {
+ "apiKeyAuth": {
+ "description": "Fal Key",
+ "in": "header",
+ "name": "Authorization",
+ "type": "apiKey"
+ }
+ }
+ },
+ "info": {
+ "description": "The OpenAPI schema for the minimax/h3-max/styles/retro-toon-70s queue.",
+ "title": "Queue OpenAPI for minimax/h3-max/styles/retro-toon-70s",
+ "version": "1.0.0",
+ "x-fal-metadata": {
+ "about": "Retro Toon Video",
+ "category": "text-to-video",
+ "documentationUrl": "https://fal.ai/models/minimax/h3-max/styles/retro-toon-70s/api",
+ "endpointId": "minimax/h3-max/styles/retro-toon-70s",
+ "playgroundUrl": "https://fal.ai/models/minimax/h3-max/styles/retro-toon-70s",
+ "thumbnailUrl": "https://v3b.fal.media/files/b/0aaad5fe/vIqC2SSPOPaR305av-iHV.jpg"
+ }
+ },
+ "openapi": "3.1.0",
+ "paths": {
+ "/minimax/h3-max/styles/retro-toon-70s": {
+ "post": {
+ "requestBody": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/H3MaxStylesRetroToon70sInput"
+ }
+ }
+ },
+ "required": true
+ },
+ "responses": {
+ "200": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/QueueStatus"
+ }
+ }
+ },
+ "description": "The request status."
+ }
+ }
+ }
+ },
+ "/minimax/h3-max/styles/retro-toon-70s/requests/{request_id}": {
+ "get": {
+ "parameters": [
+ {
+ "in": "path",
+ "name": "request_id",
+ "required": true,
+ "schema": {
+ "description": "Request ID",
+ "type": "string"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/H3MaxStylesRetroToon70sOutput"
+ }
+ }
+ },
+ "description": "Result of the request."
+ }
+ }
+ }
+ },
+ "/minimax/h3-max/styles/retro-toon-70s/requests/{request_id}/cancel": {
+ "put": {
+ "parameters": [
+ {
+ "in": "path",
+ "name": "request_id",
+ "required": true,
+ "schema": {
+ "description": "Request ID",
+ "type": "string"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "properties": {
+ "success": {
+ "description": "Whether the request was cancelled successfully.",
+ "type": "boolean"
+ }
+ },
+ "type": "object"
+ }
+ }
+ },
+ "description": "The request was cancelled."
+ }
+ }
+ }
+ },
+ "/minimax/h3-max/styles/retro-toon-70s/requests/{request_id}/status": {
+ "get": {
+ "parameters": [
+ {
+ "in": "path",
+ "name": "request_id",
+ "required": true,
+ "schema": {
+ "description": "Request ID",
+ "type": "string"
+ }
+ },
+ {
+ "in": "query",
+ "name": "logs",
+ "required": false,
+ "schema": {
+ "description": "Whether to include logs (`1`) in the response or not (`0`).",
+ "type": "number"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/QueueStatus"
+ }
+ }
+ },
+ "description": "The request status."
+ }
+ }
+ }
+ }
+ },
+ "security": [
+ {
+ "apiKeyAuth": []
+ }
+ ],
+ "servers": [
+ {
+ "url": "https://queue.fal.run"
+ }
+ ]
+}
diff --git a/tests/fixtures/provider-schemas/fal/minimax__h3-max__styles__vhs.json b/tests/fixtures/provider-schemas/fal/minimax__h3-max__styles__vhs.json
new file mode 100644
index 00000000..55e0726c
--- /dev/null
+++ b/tests/fixtures/provider-schemas/fal/minimax__h3-max__styles__vhs.json
@@ -0,0 +1,382 @@
+{
+ "components": {
+ "schemas": {
+ "File": {
+ "properties": {
+ "content_type": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "The mime type of the file.",
+ "examples": [
+ "image/png"
+ ],
+ "title": "Content Type"
+ },
+ "file_name": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "The name of the file. It will be auto-generated if not provided.",
+ "examples": [
+ "z9RV14K95DvU.png"
+ ],
+ "title": "File Name"
+ },
+ "file_size": {
+ "anyOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "The size of the file in bytes.",
+ "examples": [
+ 4404019
+ ],
+ "title": "File Size"
+ },
+ "url": {
+ "description": "The URL where the file can be downloaded from.",
+ "title": "Url",
+ "type": "string"
+ }
+ },
+ "required": [
+ "url"
+ ],
+ "title": "File",
+ "type": "object",
+ "x-fal-order-properties": [
+ "url",
+ "content_type",
+ "file_name",
+ "file_size"
+ ]
+ },
+ "H3MaxStylesVhsInput": {
+ "additionalProperties": false,
+ "properties": {
+ "aspect_ratio": {
+ "default": "16:9",
+ "description": "Video aspect ratio for text-only generation. Ignored when image_url is provided.",
+ "enum": [
+ "21:9",
+ "16:9",
+ "4:3",
+ "1:1",
+ "3:4",
+ "9:16"
+ ],
+ "title": "Aspect Ratio",
+ "type": "string"
+ },
+ "damage_level": {
+ "default": "medium",
+ "description": "Tape wear: light adds subtle analog noise, medium adds visible damage, and heavy adds strong tracking errors and distortion.",
+ "enum": [
+ "light",
+ "medium",
+ "heavy"
+ ],
+ "title": "Damage Level",
+ "type": "string"
+ },
+ "duration": {
+ "default": 5,
+ "description": "Requested video duration in seconds.",
+ "maximum": 15,
+ "minimum": 5,
+ "title": "Duration",
+ "type": "integer"
+ },
+ "image_url": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "Optional first-frame image. Use a 4:3 image for the classic VHS frame; the image's aspect ratio determines the output canvas.",
+ "title": "Image Url"
+ },
+ "prompt": {
+ "description": "Describe the scene, action, camera and sound. VHS style and tape damage are applied automatically.",
+ "examples": [
+ "A camcorder explores an abandoned shopping mall at midnight. A lone carousel starts turning beneath flickering fluorescent lights. Handheld push-in, mechanical creaks and distant music."
+ ],
+ "maxLength": 49910,
+ "minLength": 1,
+ "title": "Prompt",
+ "type": "string"
+ },
+ "seed": {
+ "anyOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "Random seed. Omit to choose one automatically.",
+ "title": "Seed"
+ }
+ },
+ "required": [
+ "prompt"
+ ],
+ "title": "VHSInput",
+ "type": "object",
+ "x-fal-order-properties": [
+ "prompt",
+ "image_url",
+ "damage_level",
+ "duration",
+ "aspect_ratio",
+ "seed"
+ ]
+ },
+ "H3MaxStylesVhsOutput": {
+ "properties": {
+ "seed": {
+ "description": "Seed used for this generation.",
+ "title": "Seed",
+ "type": "integer"
+ },
+ "video": {
+ "$ref": "#/components/schemas/File",
+ "description": "Generated 768P VHS-style video with audio."
+ }
+ },
+ "required": [
+ "video",
+ "seed"
+ ],
+ "title": "VHSOutput",
+ "type": "object",
+ "x-fal-order-properties": [
+ "video",
+ "seed"
+ ]
+ },
+ "QueueStatus": {
+ "properties": {
+ "cancel_url": {
+ "description": "The cancel url.",
+ "type": "string"
+ },
+ "logs": {
+ "additionalProperties": true,
+ "description": "The logs.",
+ "type": "object"
+ },
+ "metrics": {
+ "additionalProperties": true,
+ "description": "The metrics.",
+ "type": "object"
+ },
+ "queue_position": {
+ "description": "The queue position.",
+ "type": "integer"
+ },
+ "request_id": {
+ "description": "The request id.",
+ "type": "string"
+ },
+ "response_url": {
+ "description": "The response url.",
+ "type": "string"
+ },
+ "status": {
+ "enum": [
+ "IN_QUEUE",
+ "IN_PROGRESS",
+ "COMPLETED"
+ ],
+ "type": "string"
+ },
+ "status_url": {
+ "description": "The status url.",
+ "type": "string"
+ }
+ },
+ "required": [
+ "status",
+ "request_id"
+ ],
+ "type": "object"
+ }
+ },
+ "securitySchemes": {
+ "apiKeyAuth": {
+ "description": "Fal Key",
+ "in": "header",
+ "name": "Authorization",
+ "type": "apiKey"
+ }
+ }
+ },
+ "info": {
+ "description": "The OpenAPI schema for the minimax/h3-max/styles/vhs queue.",
+ "title": "Queue OpenAPI for minimax/h3-max/styles/vhs",
+ "version": "1.0.0",
+ "x-fal-metadata": {
+ "about": "Vhs Video",
+ "category": "text-to-video",
+ "documentationUrl": "https://fal.ai/models/minimax/h3-max/styles/vhs/api",
+ "endpointId": "minimax/h3-max/styles/vhs",
+ "playgroundUrl": "https://fal.ai/models/minimax/h3-max/styles/vhs",
+ "thumbnailUrl": "https://v3b.fal.media/files/b/0aaad605/J4zSNIgmNAoArcg4BwPNp.jpg"
+ }
+ },
+ "openapi": "3.1.0",
+ "paths": {
+ "/minimax/h3-max/styles/vhs": {
+ "post": {
+ "requestBody": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/H3MaxStylesVhsInput"
+ }
+ }
+ },
+ "required": true
+ },
+ "responses": {
+ "200": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/QueueStatus"
+ }
+ }
+ },
+ "description": "The request status."
+ }
+ }
+ }
+ },
+ "/minimax/h3-max/styles/vhs/requests/{request_id}": {
+ "get": {
+ "parameters": [
+ {
+ "in": "path",
+ "name": "request_id",
+ "required": true,
+ "schema": {
+ "description": "Request ID",
+ "type": "string"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/H3MaxStylesVhsOutput"
+ }
+ }
+ },
+ "description": "Result of the request."
+ }
+ }
+ }
+ },
+ "/minimax/h3-max/styles/vhs/requests/{request_id}/cancel": {
+ "put": {
+ "parameters": [
+ {
+ "in": "path",
+ "name": "request_id",
+ "required": true,
+ "schema": {
+ "description": "Request ID",
+ "type": "string"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "properties": {
+ "success": {
+ "description": "Whether the request was cancelled successfully.",
+ "type": "boolean"
+ }
+ },
+ "type": "object"
+ }
+ }
+ },
+ "description": "The request was cancelled."
+ }
+ }
+ }
+ },
+ "/minimax/h3-max/styles/vhs/requests/{request_id}/status": {
+ "get": {
+ "parameters": [
+ {
+ "in": "path",
+ "name": "request_id",
+ "required": true,
+ "schema": {
+ "description": "Request ID",
+ "type": "string"
+ }
+ },
+ {
+ "in": "query",
+ "name": "logs",
+ "required": false,
+ "schema": {
+ "description": "Whether to include logs (`1`) in the response or not (`0`).",
+ "type": "number"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/QueueStatus"
+ }
+ }
+ },
+ "description": "The request status."
+ }
+ }
+ }
+ }
+ },
+ "security": [
+ {
+ "apiKeyAuth": []
+ }
+ ],
+ "servers": [
+ {
+ "url": "https://queue.fal.run"
+ }
+ ]
+}
diff --git a/tests/fixtures/provider-schemas/fal/minimax__music-3.json b/tests/fixtures/provider-schemas/fal/minimax__music-3.json
new file mode 100644
index 00000000..7aebb8e4
--- /dev/null
+++ b/tests/fixtures/provider-schemas/fal/minimax__music-3.json
@@ -0,0 +1,393 @@
+{
+ "components": {
+ "schemas": {
+ "File": {
+ "properties": {
+ "content_type": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "The mime type of the file.",
+ "examples": [
+ "image/png"
+ ],
+ "title": "Content Type"
+ },
+ "file_name": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "The name of the file. It will be auto-generated if not provided.",
+ "examples": [
+ "z9RV14K95DvU.png"
+ ],
+ "title": "File Name"
+ },
+ "file_size": {
+ "anyOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "The size of the file in bytes.",
+ "examples": [
+ 4404019
+ ],
+ "title": "File Size"
+ },
+ "url": {
+ "description": "The URL where the file can be downloaded from.",
+ "title": "Url",
+ "type": "string"
+ }
+ },
+ "required": [
+ "url"
+ ],
+ "title": "File",
+ "type": "object",
+ "x-fal-order-properties": [
+ "url",
+ "content_type",
+ "file_name",
+ "file_size"
+ ]
+ },
+ "Music3Input": {
+ "properties": {
+ "duration": {
+ "default": 60,
+ "description": "Upper bound on the generated audio length in seconds. The model may stop earlier; the actual duration is returned in the output.",
+ "maximum": 300,
+ "minimum": 1,
+ "title": "Duration",
+ "type": "number"
+ },
+ "enable_safety_checker": {
+ "default": true,
+ "description": "Authorized callers may set false to request relaxed screening.",
+ "title": "Enable Safety Checker",
+ "type": "boolean"
+ },
+ "guidance_scale": {
+ "default": 1.7,
+ "description": "Classifier-free guidance scale of the flow-matching stage.",
+ "examples": [
+ 1.7
+ ],
+ "maximum": 20,
+ "minimum": 0,
+ "title": "Guidance Scale",
+ "type": "number"
+ },
+ "lyrics": {
+ "description": "The lyrics to sing. Structure tags such as [intro], [verse], [pre-chorus], [chorus], [post-chorus], [bridge], [instrumental], [solo] and [outro] must each be on their own line; text on the same line as a leading tag is dropped by the model's input contract.",
+ "examples": [
+ "[verse]\nMorning light filtering through the pine\nEvery quiet street is yours and mine\n[chorus]\nSoftly the world begins to breathe"
+ ],
+ "title": "Lyrics",
+ "type": "string"
+ },
+ "num_inference_steps": {
+ "default": 30,
+ "description": "Number of flow-matching Euler steps per 8-second denoising chunk. More steps improve quality at the cost of speed.",
+ "examples": [
+ 30
+ ],
+ "maximum": 100,
+ "minimum": 1,
+ "title": "Num Inference Steps",
+ "type": "integer"
+ },
+ "prompt": {
+ "description": "Music description: style, mood, vocals, instrumentation and arrangement. For precise control use a Structured Caption with global metadata (genre, BPM, key, emotional progression), vocal details, and a section-by-section arrangement.",
+ "examples": [
+ "Genre: acoustic pop. BPM: 96. Key: C major. Warm and intimate, building gently into the chorus. Vocals: soft female lead, close and breathy, light stacked harmonies in the chorus. Arrangement: fingerpicked guitar and soft piano; brushed drums and upright bass enter in the chorus."
+ ],
+ "title": "Prompt",
+ "type": "string"
+ },
+ "seed": {
+ "anyOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "Random seed for reproducibility. If not provided, a random seed will be used.",
+ "title": "Seed"
+ }
+ },
+ "required": [
+ "prompt",
+ "lyrics"
+ ],
+ "title": "MiniMaxMusic3Request",
+ "type": "object",
+ "x-fal-order-properties": [
+ "prompt",
+ "lyrics",
+ "duration",
+ "seed",
+ "num_inference_steps",
+ "guidance_scale",
+ "enable_safety_checker"
+ ]
+ },
+ "Music3Output": {
+ "properties": {
+ "audio": {
+ "$ref": "#/components/schemas/File",
+ "description": "The generated audio file (44.1 kHz 16-bit stereo WAV)."
+ },
+ "duration": {
+ "description": "The actual duration of the generated audio in seconds (may be shorter than the requested duration).",
+ "examples": [
+ 60
+ ],
+ "title": "Duration",
+ "type": "number"
+ },
+ "seed": {
+ "description": "The random seed used for the generation process.",
+ "examples": [
+ 42
+ ],
+ "title": "Seed",
+ "type": "integer"
+ }
+ },
+ "required": [
+ "audio",
+ "seed",
+ "duration"
+ ],
+ "title": "MiniMaxMusic3Output",
+ "type": "object",
+ "x-fal-order-properties": [
+ "audio",
+ "seed",
+ "duration"
+ ]
+ },
+ "QueueStatus": {
+ "properties": {
+ "cancel_url": {
+ "description": "The cancel url.",
+ "type": "string"
+ },
+ "logs": {
+ "additionalProperties": true,
+ "description": "The logs.",
+ "type": "object"
+ },
+ "metrics": {
+ "additionalProperties": true,
+ "description": "The metrics.",
+ "type": "object"
+ },
+ "queue_position": {
+ "description": "The queue position.",
+ "type": "integer"
+ },
+ "request_id": {
+ "description": "The request id.",
+ "type": "string"
+ },
+ "response_url": {
+ "description": "The response url.",
+ "type": "string"
+ },
+ "status": {
+ "enum": [
+ "IN_QUEUE",
+ "IN_PROGRESS",
+ "COMPLETED"
+ ],
+ "type": "string"
+ },
+ "status_url": {
+ "description": "The status url.",
+ "type": "string"
+ }
+ },
+ "required": [
+ "status",
+ "request_id"
+ ],
+ "type": "object"
+ }
+ },
+ "securitySchemes": {
+ "apiKeyAuth": {
+ "description": "Fal Key",
+ "in": "header",
+ "name": "Authorization",
+ "type": "apiKey"
+ }
+ }
+ },
+ "info": {
+ "description": "The OpenAPI schema for the minimax/music-3 queue.",
+ "title": "Queue OpenAPI for minimax/music-3",
+ "version": "1.0.0",
+ "x-fal-metadata": {
+ "about": "Generate a song from lyrics and a music description using MiniMax Music 3.",
+ "category": "text-to-audio",
+ "documentationUrl": "https://fal.ai/models/minimax/music-3/api",
+ "endpointId": "minimax/music-3",
+ "playgroundUrl": "https://fal.ai/models/minimax/music-3",
+ "thumbnailUrl": "https://v3b.fal.media/files/b/0aa6363a/E6MV5Yy0mhJ2pOzNHcHAU.jpg"
+ }
+ },
+ "openapi": "3.1.0",
+ "paths": {
+ "/minimax/music-3": {
+ "post": {
+ "requestBody": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/Music3Input"
+ }
+ }
+ },
+ "required": true
+ },
+ "responses": {
+ "200": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/QueueStatus"
+ }
+ }
+ },
+ "description": "The request status."
+ }
+ }
+ }
+ },
+ "/minimax/music-3/requests/{request_id}": {
+ "get": {
+ "parameters": [
+ {
+ "in": "path",
+ "name": "request_id",
+ "required": true,
+ "schema": {
+ "description": "Request ID",
+ "type": "string"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/Music3Output"
+ }
+ }
+ },
+ "description": "Result of the request."
+ }
+ }
+ }
+ },
+ "/minimax/music-3/requests/{request_id}/cancel": {
+ "put": {
+ "parameters": [
+ {
+ "in": "path",
+ "name": "request_id",
+ "required": true,
+ "schema": {
+ "description": "Request ID",
+ "type": "string"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "properties": {
+ "success": {
+ "description": "Whether the request was cancelled successfully.",
+ "type": "boolean"
+ }
+ },
+ "type": "object"
+ }
+ }
+ },
+ "description": "The request was cancelled."
+ }
+ }
+ }
+ },
+ "/minimax/music-3/requests/{request_id}/status": {
+ "get": {
+ "parameters": [
+ {
+ "in": "path",
+ "name": "request_id",
+ "required": true,
+ "schema": {
+ "description": "Request ID",
+ "type": "string"
+ }
+ },
+ {
+ "in": "query",
+ "name": "logs",
+ "required": false,
+ "schema": {
+ "description": "Whether to include logs (`1`) in the response or not (`0`).",
+ "type": "number"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/QueueStatus"
+ }
+ }
+ },
+ "description": "The request status."
+ }
+ }
+ }
+ }
+ },
+ "security": [
+ {
+ "apiKeyAuth": []
+ }
+ ],
+ "servers": [
+ {
+ "url": "https://queue.fal.run"
+ }
+ ]
+}
diff --git a/tests/fixtures/provider-schemas/fal/mureka__api__files__upload.json b/tests/fixtures/provider-schemas/fal/mureka__api__files__upload.json
new file mode 100644
index 00000000..b408f172
--- /dev/null
+++ b/tests/fixtures/provider-schemas/fal/mureka__api__files__upload.json
@@ -0,0 +1,309 @@
+{
+ "components": {
+ "schemas": {
+ "ApiFilesUploadInput": {
+ "properties": {
+ "file_url": {
+ "_fal_ui_field": "url",
+ "description": "Public HTTPS URL or data URI of the file to upload.",
+ "title": "File Url",
+ "type": "string"
+ },
+ "purpose": {
+ "description": "Intended use of the uploaded file. The returned ID can only be used in parameters that accept this purpose.",
+ "enum": [
+ "reference",
+ "melody",
+ "instrumental",
+ "voice",
+ "audio",
+ "remix",
+ "soundtrack",
+ "lyrics-video"
+ ],
+ "title": "Purpose",
+ "type": "string"
+ }
+ },
+ "required": [
+ "file_url",
+ "purpose"
+ ],
+ "title": "FileUploadInput",
+ "type": "object",
+ "x-fal-order-properties": [
+ "file_url",
+ "purpose"
+ ]
+ },
+ "ApiFilesUploadOutput": {
+ "properties": {
+ "bytes": {
+ "anyOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "title": "Bytes"
+ },
+ "created_at": {
+ "anyOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "title": "Created At"
+ },
+ "filename": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "title": "Filename"
+ },
+ "id": {
+ "description": "Uploaded-file ID. Pass this value to the matching ID parameter for the selected upload purpose.",
+ "title": "Id",
+ "type": "string"
+ },
+ "purpose": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "title": "Purpose"
+ }
+ },
+ "required": [
+ "id"
+ ],
+ "title": "FileUploadOutput",
+ "type": "object",
+ "x-fal-order-properties": [
+ "id",
+ "bytes",
+ "created_at",
+ "filename",
+ "purpose"
+ ]
+ },
+ "QueueStatus": {
+ "properties": {
+ "cancel_url": {
+ "description": "The cancel url.",
+ "type": "string"
+ },
+ "logs": {
+ "additionalProperties": true,
+ "description": "The logs.",
+ "type": "object"
+ },
+ "metrics": {
+ "additionalProperties": true,
+ "description": "The metrics.",
+ "type": "object"
+ },
+ "queue_position": {
+ "description": "The queue position.",
+ "type": "integer"
+ },
+ "request_id": {
+ "description": "The request id.",
+ "type": "string"
+ },
+ "response_url": {
+ "description": "The response url.",
+ "type": "string"
+ },
+ "status": {
+ "enum": [
+ "IN_QUEUE",
+ "IN_PROGRESS",
+ "COMPLETED"
+ ],
+ "type": "string"
+ },
+ "status_url": {
+ "description": "The status url.",
+ "type": "string"
+ }
+ },
+ "required": [
+ "status",
+ "request_id"
+ ],
+ "type": "object"
+ }
+ },
+ "securitySchemes": {
+ "apiKeyAuth": {
+ "description": "Fal Key",
+ "in": "header",
+ "name": "Authorization",
+ "type": "apiKey"
+ }
+ }
+ },
+ "info": {
+ "description": "The OpenAPI schema for the mureka/api/files/upload queue.",
+ "title": "Queue OpenAPI for mureka/api/files/upload",
+ "version": "1.0.0",
+ "x-fal-metadata": {
+ "about": "Upload a media file and return an ID reusable by other audio endpoints.\n\nChoose a purpose that matches the endpoint where the returned ID will be\nused, such as reference music, melody, audio, remix, or soundtrack input.",
+ "category": "unknown",
+ "documentationUrl": "https://fal.ai/models/mureka/api/files/upload/api",
+ "endpointId": "mureka/api/files/upload",
+ "playgroundUrl": "https://fal.ai/models/mureka/api/files/upload",
+ "thumbnailUrl": "https://v3b.fal.media/files/b/0aaff3b7/6heMUaFj3_JE4vj1FhtbV.jpg"
+ }
+ },
+ "openapi": "3.1.0",
+ "paths": {
+ "/mureka/api/files/upload": {
+ "post": {
+ "requestBody": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/ApiFilesUploadInput"
+ }
+ }
+ },
+ "required": true
+ },
+ "responses": {
+ "200": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/QueueStatus"
+ }
+ }
+ },
+ "description": "The request status."
+ }
+ }
+ }
+ },
+ "/mureka/api/files/upload/requests/{request_id}": {
+ "get": {
+ "parameters": [
+ {
+ "in": "path",
+ "name": "request_id",
+ "required": true,
+ "schema": {
+ "description": "Request ID",
+ "type": "string"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/ApiFilesUploadOutput"
+ }
+ }
+ },
+ "description": "Result of the request."
+ }
+ }
+ }
+ },
+ "/mureka/api/files/upload/requests/{request_id}/cancel": {
+ "put": {
+ "parameters": [
+ {
+ "in": "path",
+ "name": "request_id",
+ "required": true,
+ "schema": {
+ "description": "Request ID",
+ "type": "string"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "properties": {
+ "success": {
+ "description": "Whether the request was cancelled successfully.",
+ "type": "boolean"
+ }
+ },
+ "type": "object"
+ }
+ }
+ },
+ "description": "The request was cancelled."
+ }
+ }
+ }
+ },
+ "/mureka/api/files/upload/requests/{request_id}/status": {
+ "get": {
+ "parameters": [
+ {
+ "in": "path",
+ "name": "request_id",
+ "required": true,
+ "schema": {
+ "description": "Request ID",
+ "type": "string"
+ }
+ },
+ {
+ "in": "query",
+ "name": "logs",
+ "required": false,
+ "schema": {
+ "description": "Whether to include logs (`1`) in the response or not (`0`).",
+ "type": "number"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/QueueStatus"
+ }
+ }
+ },
+ "description": "The request status."
+ }
+ }
+ }
+ }
+ },
+ "security": [
+ {
+ "apiKeyAuth": []
+ }
+ ],
+ "servers": [
+ {
+ "url": "https://queue.fal.run"
+ }
+ ]
+}
diff --git a/tests/fixtures/provider-schemas/fal/mureka__api__song__stem.json b/tests/fixtures/provider-schemas/fal/mureka__api__song__stem.json
new file mode 100644
index 00000000..108e2f78
--- /dev/null
+++ b/tests/fixtures/provider-schemas/fal/mureka__api__song__stem.json
@@ -0,0 +1,269 @@
+{
+ "components": {
+ "schemas": {
+ "ApiSongStemInput": {
+ "properties": {
+ "audio_url": {
+ "_fal_ui_field": "url",
+ "description": "Public HTTPS URL or data URI for an MP3 or M4A song to separate, up to 10 MB.",
+ "title": "Audio Url",
+ "type": "string"
+ },
+ "model": {
+ "default": "audio-separation-3",
+ "description": "Stem-separation model, which determines available stems and MIDI output.",
+ "enum": [
+ "audio-separation-1",
+ "audio-separation-2",
+ "audio-separation-3"
+ ],
+ "title": "Model",
+ "type": "string"
+ }
+ },
+ "required": [
+ "audio_url"
+ ],
+ "title": "StemSongInput",
+ "type": "object",
+ "x-fal-order-properties": [
+ "model",
+ "audio_url"
+ ]
+ },
+ "ApiSongStemOutput": {
+ "properties": {
+ "midi_zip_url": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "The generated archive of separated MIDI stems, when available.",
+ "title": "Midi Zip Url"
+ },
+ "zip_url": {
+ "description": "The generated archive of separated audio stems.",
+ "title": "Zip Url",
+ "type": "string"
+ }
+ },
+ "required": [
+ "zip_url"
+ ],
+ "title": "StemSongOutput",
+ "type": "object",
+ "x-fal-order-properties": [
+ "zip_url",
+ "midi_zip_url"
+ ]
+ },
+ "QueueStatus": {
+ "properties": {
+ "cancel_url": {
+ "description": "The cancel url.",
+ "type": "string"
+ },
+ "logs": {
+ "additionalProperties": true,
+ "description": "The logs.",
+ "type": "object"
+ },
+ "metrics": {
+ "additionalProperties": true,
+ "description": "The metrics.",
+ "type": "object"
+ },
+ "queue_position": {
+ "description": "The queue position.",
+ "type": "integer"
+ },
+ "request_id": {
+ "description": "The request id.",
+ "type": "string"
+ },
+ "response_url": {
+ "description": "The response url.",
+ "type": "string"
+ },
+ "status": {
+ "enum": [
+ "IN_QUEUE",
+ "IN_PROGRESS",
+ "COMPLETED"
+ ],
+ "type": "string"
+ },
+ "status_url": {
+ "description": "The status url.",
+ "type": "string"
+ }
+ },
+ "required": [
+ "status",
+ "request_id"
+ ],
+ "type": "object"
+ }
+ },
+ "securitySchemes": {
+ "apiKeyAuth": {
+ "description": "Fal Key",
+ "in": "header",
+ "name": "Authorization",
+ "type": "apiKey"
+ }
+ }
+ },
+ "info": {
+ "description": "The OpenAPI schema for the mureka/api/song/stem queue.",
+ "title": "Queue OpenAPI for mureka/api/song/stem",
+ "version": "1.0.0",
+ "x-fal-metadata": {
+ "about": "Separate a song into individual instrumental and vocal stems.\n\nReturns an archive containing the separated vocals and instrumental audio.",
+ "category": "audio-to-audio",
+ "documentationUrl": "https://fal.ai/models/mureka/api/song/stem/api",
+ "endpointId": "mureka/api/song/stem",
+ "playgroundUrl": "https://fal.ai/models/mureka/api/song/stem",
+ "thumbnailUrl": "https://v3b.fal.media/files/b/0aaa6214/x2KU6ElS5zAlLVic8_wMj.jpg"
+ }
+ },
+ "openapi": "3.1.0",
+ "paths": {
+ "/mureka/api/song/stem": {
+ "post": {
+ "requestBody": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/ApiSongStemInput"
+ }
+ }
+ },
+ "required": true
+ },
+ "responses": {
+ "200": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/QueueStatus"
+ }
+ }
+ },
+ "description": "The request status."
+ }
+ }
+ }
+ },
+ "/mureka/api/song/stem/requests/{request_id}": {
+ "get": {
+ "parameters": [
+ {
+ "in": "path",
+ "name": "request_id",
+ "required": true,
+ "schema": {
+ "description": "Request ID",
+ "type": "string"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/ApiSongStemOutput"
+ }
+ }
+ },
+ "description": "Result of the request."
+ }
+ }
+ }
+ },
+ "/mureka/api/song/stem/requests/{request_id}/cancel": {
+ "put": {
+ "parameters": [
+ {
+ "in": "path",
+ "name": "request_id",
+ "required": true,
+ "schema": {
+ "description": "Request ID",
+ "type": "string"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "properties": {
+ "success": {
+ "description": "Whether the request was cancelled successfully.",
+ "type": "boolean"
+ }
+ },
+ "type": "object"
+ }
+ }
+ },
+ "description": "The request was cancelled."
+ }
+ }
+ }
+ },
+ "/mureka/api/song/stem/requests/{request_id}/status": {
+ "get": {
+ "parameters": [
+ {
+ "in": "path",
+ "name": "request_id",
+ "required": true,
+ "schema": {
+ "description": "Request ID",
+ "type": "string"
+ }
+ },
+ {
+ "in": "query",
+ "name": "logs",
+ "required": false,
+ "schema": {
+ "description": "Whether to include logs (`1`) in the response or not (`0`).",
+ "type": "number"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/QueueStatus"
+ }
+ }
+ },
+ "description": "The request status."
+ }
+ }
+ }
+ }
+ },
+ "security": [
+ {
+ "apiKeyAuth": []
+ }
+ ],
+ "servers": [
+ {
+ "url": "https://queue.fal.run"
+ }
+ ]
+}
diff --git a/tests/fixtures/provider-schemas/fal/mureka__v8__song__extend.json b/tests/fixtures/provider-schemas/fal/mureka__v8__song__extend.json
new file mode 100644
index 00000000..b86bd6d8
--- /dev/null
+++ b/tests/fixtures/provider-schemas/fal/mureka__v8__song__extend.json
@@ -0,0 +1,578 @@
+{
+ "components": {
+ "schemas": {
+ "File": {
+ "properties": {
+ "content_type": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "The mime type of the file.",
+ "examples": [
+ "image/png"
+ ],
+ "title": "Content Type"
+ },
+ "file_name": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "The name of the file. It will be auto-generated if not provided.",
+ "examples": [
+ "z9RV14K95DvU.png"
+ ],
+ "title": "File Name"
+ },
+ "file_size": {
+ "anyOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "The size of the file in bytes.",
+ "examples": [
+ 4404019
+ ],
+ "title": "File Size"
+ },
+ "url": {
+ "description": "The URL where the file can be downloaded from.",
+ "title": "Url",
+ "type": "string"
+ }
+ },
+ "required": [
+ "url"
+ ],
+ "title": "File",
+ "type": "object",
+ "x-fal-order-properties": [
+ "url",
+ "content_type",
+ "file_name",
+ "file_size"
+ ]
+ },
+ "LyricsLine": {
+ "properties": {
+ "end": {
+ "anyOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "title": "End"
+ },
+ "start": {
+ "anyOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "title": "Start"
+ },
+ "text": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "title": "Text"
+ },
+ "words": {
+ "anyOf": [
+ {
+ "items": {
+ "$ref": "#/components/schemas/LyricsWord"
+ },
+ "type": "array"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "title": "Words"
+ }
+ },
+ "title": "LyricsLine",
+ "type": "object",
+ "x-fal-order-properties": [
+ "start",
+ "end",
+ "text",
+ "words"
+ ]
+ },
+ "LyricsSection": {
+ "properties": {
+ "end": {
+ "anyOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "title": "End"
+ },
+ "lines": {
+ "anyOf": [
+ {
+ "items": {
+ "$ref": "#/components/schemas/LyricsLine"
+ },
+ "type": "array"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "title": "Lines"
+ },
+ "section_type": {
+ "anyOf": [
+ {
+ "enum": [
+ "intro",
+ "verse",
+ "pre-chorus",
+ "chorus",
+ "bridge",
+ "break",
+ "outro"
+ ],
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "title": "Section Type"
+ },
+ "start": {
+ "anyOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "title": "Start"
+ }
+ },
+ "title": "LyricsSection",
+ "type": "object",
+ "x-fal-order-properties": [
+ "section_type",
+ "start",
+ "end",
+ "lines"
+ ]
+ },
+ "LyricsWord": {
+ "properties": {
+ "end": {
+ "anyOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "title": "End"
+ },
+ "start": {
+ "anyOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "title": "Start"
+ },
+ "text": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "title": "Text"
+ }
+ },
+ "title": "LyricsWord",
+ "type": "object",
+ "x-fal-order-properties": [
+ "start",
+ "end",
+ "text"
+ ]
+ },
+ "QueueStatus": {
+ "properties": {
+ "cancel_url": {
+ "description": "The cancel url.",
+ "type": "string"
+ },
+ "logs": {
+ "additionalProperties": true,
+ "description": "The logs.",
+ "type": "object"
+ },
+ "metrics": {
+ "additionalProperties": true,
+ "description": "The metrics.",
+ "type": "object"
+ },
+ "queue_position": {
+ "description": "The queue position.",
+ "type": "integer"
+ },
+ "request_id": {
+ "description": "The request id.",
+ "type": "string"
+ },
+ "response_url": {
+ "description": "The response url.",
+ "type": "string"
+ },
+ "status": {
+ "enum": [
+ "IN_QUEUE",
+ "IN_PROGRESS",
+ "COMPLETED"
+ ],
+ "type": "string"
+ },
+ "status_url": {
+ "description": "The status url.",
+ "type": "string"
+ }
+ },
+ "required": [
+ "status",
+ "request_id"
+ ],
+ "type": "object"
+ },
+ "V8SongExtendInput": {
+ "description": "Input for v8 ExtendSong.",
+ "properties": {
+ "enable_safety_checker": {
+ "default": true,
+ "description": "Authorized callers may set false to request relaxed screening.",
+ "title": "Enable Safety Checker",
+ "type": "boolean"
+ },
+ "extend_at": {
+ "description": "Timestamp in milliseconds where extension begins.",
+ "minimum": 0,
+ "title": "Extend At",
+ "type": "integer"
+ },
+ "extend_type": {
+ "default": "tail",
+ "description": "Direction of extension: append to the tail or prepend to the head.",
+ "enum": [
+ "tail",
+ "head"
+ ],
+ "title": "Extend Type",
+ "type": "string"
+ },
+ "lyrics": {
+ "description": "Lyrics for the extended section, up to 3,000 characters.",
+ "maxLength": 3000,
+ "minLength": 1,
+ "title": "Lyrics",
+ "type": "string"
+ },
+ "song_id": {
+ "anyOf": [
+ {
+ "minLength": 1,
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "Generated song ID from song_id in a /generate/song response. Provide exactly one of song_id or upload_audio_id.",
+ "title": "Song Id"
+ },
+ "upload_audio_id": {
+ "anyOf": [
+ {
+ "minLength": 1,
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "Audio ID returned by /files/upload with purpose='audio'. Provide exactly one of song_id or upload_audio_id.",
+ "title": "Upload Audio Id"
+ }
+ },
+ "required": [
+ "lyrics",
+ "extend_at"
+ ],
+ "title": "ExtendSongV8Input",
+ "type": "object",
+ "x-fal-order-properties": [
+ "song_id",
+ "upload_audio_id",
+ "lyrics",
+ "extend_at",
+ "extend_type",
+ "enable_safety_checker"
+ ]
+ },
+ "V8SongExtendOutput": {
+ "description": "A generated audio file and its reusable song identifier.",
+ "properties": {
+ "audio": {
+ "$ref": "#/components/schemas/File",
+ "description": "The generated audio file."
+ },
+ "duration": {
+ "anyOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "Duration of the generated audio in milliseconds, when available.",
+ "title": "Duration"
+ },
+ "lyrics_sections": {
+ "anyOf": [
+ {
+ "items": {
+ "$ref": "#/components/schemas/LyricsSection"
+ },
+ "type": "array"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "Timed lyric sections for the generated audio, when available.",
+ "title": "Lyrics Sections"
+ },
+ "song_id": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "Reusable identifier for this audio. Pass it to endpoints that accept song_id.",
+ "title": "Song Id"
+ }
+ },
+ "required": [
+ "audio"
+ ],
+ "title": "GeneratedAudioOutput",
+ "type": "object",
+ "x-fal-order-properties": [
+ "song_id",
+ "audio",
+ "duration",
+ "lyrics_sections"
+ ]
+ }
+ },
+ "securitySchemes": {
+ "apiKeyAuth": {
+ "description": "Fal Key",
+ "in": "header",
+ "name": "Authorization",
+ "type": "apiKey"
+ }
+ }
+ },
+ "info": {
+ "description": "The OpenAPI schema for the mureka/v8/song/extend queue.",
+ "title": "Queue OpenAPI for mureka/v8/song/extend",
+ "version": "1.0.0",
+ "x-fal-metadata": {
+ "about": "Extend an existing generated or uploaded song with additional lyrics.\n\nSupports extension at the beginning or end.",
+ "category": "audio-to-audio",
+ "documentationUrl": "https://fal.ai/models/mureka/v8/song/extend/api",
+ "endpointId": "mureka/v8/song/extend",
+ "playgroundUrl": "https://fal.ai/models/mureka/v8/song/extend",
+ "thumbnailUrl": "https://v3b.fal.media/files/b/0aaf8fb4/v6gy1QvfavujHKZWT4w8k.jpg"
+ }
+ },
+ "openapi": "3.1.0",
+ "paths": {
+ "/mureka/v8/song/extend": {
+ "post": {
+ "requestBody": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/V8SongExtendInput"
+ }
+ }
+ },
+ "required": true
+ },
+ "responses": {
+ "200": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/QueueStatus"
+ }
+ }
+ },
+ "description": "The request status."
+ }
+ }
+ }
+ },
+ "/mureka/v8/song/extend/requests/{request_id}": {
+ "get": {
+ "parameters": [
+ {
+ "in": "path",
+ "name": "request_id",
+ "required": true,
+ "schema": {
+ "description": "Request ID",
+ "type": "string"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/V8SongExtendOutput"
+ }
+ }
+ },
+ "description": "Result of the request."
+ }
+ }
+ }
+ },
+ "/mureka/v8/song/extend/requests/{request_id}/cancel": {
+ "put": {
+ "parameters": [
+ {
+ "in": "path",
+ "name": "request_id",
+ "required": true,
+ "schema": {
+ "description": "Request ID",
+ "type": "string"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "properties": {
+ "success": {
+ "description": "Whether the request was cancelled successfully.",
+ "type": "boolean"
+ }
+ },
+ "type": "object"
+ }
+ }
+ },
+ "description": "The request was cancelled."
+ }
+ }
+ }
+ },
+ "/mureka/v8/song/extend/requests/{request_id}/status": {
+ "get": {
+ "parameters": [
+ {
+ "in": "path",
+ "name": "request_id",
+ "required": true,
+ "schema": {
+ "description": "Request ID",
+ "type": "string"
+ }
+ },
+ {
+ "in": "query",
+ "name": "logs",
+ "required": false,
+ "schema": {
+ "description": "Whether to include logs (`1`) in the response or not (`0`).",
+ "type": "number"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/QueueStatus"
+ }
+ }
+ },
+ "description": "The request status."
+ }
+ }
+ }
+ }
+ },
+ "security": [
+ {
+ "apiKeyAuth": []
+ }
+ ],
+ "servers": [
+ {
+ "url": "https://queue.fal.run"
+ }
+ ]
+}
diff --git a/tests/fixtures/provider-schemas/fal/mureka__v8__song__remix.json b/tests/fixtures/provider-schemas/fal/mureka__v8__song__remix.json
new file mode 100644
index 00000000..6607ee3b
--- /dev/null
+++ b/tests/fixtures/provider-schemas/fal/mureka__v8__song__remix.json
@@ -0,0 +1,568 @@
+{
+ "components": {
+ "schemas": {
+ "File": {
+ "properties": {
+ "content_type": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "The mime type of the file.",
+ "examples": [
+ "image/png"
+ ],
+ "title": "Content Type"
+ },
+ "file_name": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "The name of the file. It will be auto-generated if not provided.",
+ "examples": [
+ "z9RV14K95DvU.png"
+ ],
+ "title": "File Name"
+ },
+ "file_size": {
+ "anyOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "The size of the file in bytes.",
+ "examples": [
+ 4404019
+ ],
+ "title": "File Size"
+ },
+ "url": {
+ "description": "The URL where the file can be downloaded from.",
+ "title": "Url",
+ "type": "string"
+ }
+ },
+ "required": [
+ "url"
+ ],
+ "title": "File",
+ "type": "object",
+ "x-fal-order-properties": [
+ "url",
+ "content_type",
+ "file_name",
+ "file_size"
+ ]
+ },
+ "LyricsLine": {
+ "properties": {
+ "end": {
+ "anyOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "title": "End"
+ },
+ "start": {
+ "anyOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "title": "Start"
+ },
+ "text": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "title": "Text"
+ },
+ "words": {
+ "anyOf": [
+ {
+ "items": {
+ "$ref": "#/components/schemas/LyricsWord"
+ },
+ "type": "array"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "title": "Words"
+ }
+ },
+ "title": "LyricsLine",
+ "type": "object",
+ "x-fal-order-properties": [
+ "start",
+ "end",
+ "text",
+ "words"
+ ]
+ },
+ "LyricsSection": {
+ "properties": {
+ "end": {
+ "anyOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "title": "End"
+ },
+ "lines": {
+ "anyOf": [
+ {
+ "items": {
+ "$ref": "#/components/schemas/LyricsLine"
+ },
+ "type": "array"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "title": "Lines"
+ },
+ "section_type": {
+ "anyOf": [
+ {
+ "enum": [
+ "intro",
+ "verse",
+ "pre-chorus",
+ "chorus",
+ "bridge",
+ "break",
+ "outro"
+ ],
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "title": "Section Type"
+ },
+ "start": {
+ "anyOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "title": "Start"
+ }
+ },
+ "title": "LyricsSection",
+ "type": "object",
+ "x-fal-order-properties": [
+ "section_type",
+ "start",
+ "end",
+ "lines"
+ ]
+ },
+ "LyricsWord": {
+ "properties": {
+ "end": {
+ "anyOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "title": "End"
+ },
+ "start": {
+ "anyOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "title": "Start"
+ },
+ "text": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "title": "Text"
+ }
+ },
+ "title": "LyricsWord",
+ "type": "object",
+ "x-fal-order-properties": [
+ "start",
+ "end",
+ "text"
+ ]
+ },
+ "QueueStatus": {
+ "properties": {
+ "cancel_url": {
+ "description": "The cancel url.",
+ "type": "string"
+ },
+ "logs": {
+ "additionalProperties": true,
+ "description": "The logs.",
+ "type": "object"
+ },
+ "metrics": {
+ "additionalProperties": true,
+ "description": "The metrics.",
+ "type": "object"
+ },
+ "queue_position": {
+ "description": "The queue position.",
+ "type": "integer"
+ },
+ "request_id": {
+ "description": "The request id.",
+ "type": "string"
+ },
+ "response_url": {
+ "description": "The response url.",
+ "type": "string"
+ },
+ "status": {
+ "enum": [
+ "IN_QUEUE",
+ "IN_PROGRESS",
+ "COMPLETED"
+ ],
+ "type": "string"
+ },
+ "status_url": {
+ "description": "The status url.",
+ "type": "string"
+ }
+ },
+ "required": [
+ "status",
+ "request_id"
+ ],
+ "type": "object"
+ },
+ "V8SongRemixInput": {
+ "description": "Remix source audio from 10 to 350 seconds long.\n\nVocal-only, accompaniment-only, and instrumental tracks are not supported.",
+ "properties": {
+ "enable_safety_checker": {
+ "default": true,
+ "description": "Authorized callers may set false to request relaxed screening.",
+ "title": "Enable Safety Checker",
+ "type": "boolean"
+ },
+ "lyrics": {
+ "description": "Complete lyrics for the remixed song, up to 5,000 characters.",
+ "maxLength": 5000,
+ "minLength": 1,
+ "title": "Lyrics",
+ "type": "string"
+ },
+ "prompt": {
+ "description": "Control the remix's genre, mood, instrumentation, and arrangement with a prompt, up to 1,024 characters.",
+ "maxLength": 1024,
+ "minLength": 1,
+ "title": "Prompt",
+ "type": "string"
+ },
+ "song_id": {
+ "anyOf": [
+ {
+ "minLength": 1,
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "Generated song ID from song_id in a /generate/song response. Provide exactly one of song_id or upload_audio_id.",
+ "title": "Song Id"
+ },
+ "upload_audio_id": {
+ "anyOf": [
+ {
+ "minLength": 1,
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "Audio ID returned by /files/upload with purpose='remix'. Provide exactly one of song_id or upload_audio_id.",
+ "title": "Upload Audio Id"
+ }
+ },
+ "required": [
+ "lyrics",
+ "prompt"
+ ],
+ "title": "RemixSongV8Input",
+ "type": "object",
+ "x-fal-order-properties": [
+ "song_id",
+ "upload_audio_id",
+ "lyrics",
+ "prompt",
+ "enable_safety_checker"
+ ]
+ },
+ "V8SongRemixOutput": {
+ "description": "A generated audio file and its reusable song identifier.",
+ "properties": {
+ "audio": {
+ "$ref": "#/components/schemas/File",
+ "description": "The generated audio file."
+ },
+ "duration": {
+ "anyOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "Duration of the generated audio in milliseconds, when available.",
+ "title": "Duration"
+ },
+ "lyrics_sections": {
+ "anyOf": [
+ {
+ "items": {
+ "$ref": "#/components/schemas/LyricsSection"
+ },
+ "type": "array"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "Timed lyric sections for the generated audio, when available.",
+ "title": "Lyrics Sections"
+ },
+ "song_id": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "Reusable identifier for this audio. Pass it to endpoints that accept song_id.",
+ "title": "Song Id"
+ }
+ },
+ "required": [
+ "audio"
+ ],
+ "title": "GeneratedAudioOutput",
+ "type": "object",
+ "x-fal-order-properties": [
+ "song_id",
+ "audio",
+ "duration",
+ "lyrics_sections"
+ ]
+ }
+ },
+ "securitySchemes": {
+ "apiKeyAuth": {
+ "description": "Fal Key",
+ "in": "header",
+ "name": "Authorization",
+ "type": "apiKey"
+ }
+ }
+ },
+ "info": {
+ "description": "The OpenAPI schema for the mureka/v8/song/remix queue.",
+ "title": "Queue OpenAPI for mureka/v8/song/remix",
+ "version": "1.0.0",
+ "x-fal-metadata": {
+ "about": "Create a new arrangement from an existing song, lyrics, and style prompt.\n\nSource audio must be 10–350 seconds long. Vocal-only, accompaniment-only,\nand instrumental tracks are not supported.",
+ "category": "audio-to-audio",
+ "documentationUrl": "https://fal.ai/models/mureka/v8/song/remix/api",
+ "endpointId": "mureka/v8/song/remix",
+ "playgroundUrl": "https://fal.ai/models/mureka/v8/song/remix",
+ "thumbnailUrl": "https://v3b.fal.media/files/b/0aaa620b/dzA6SjokYI-4v7xeUE9wD.jpg"
+ }
+ },
+ "openapi": "3.1.0",
+ "paths": {
+ "/mureka/v8/song/remix": {
+ "post": {
+ "requestBody": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/V8SongRemixInput"
+ }
+ }
+ },
+ "required": true
+ },
+ "responses": {
+ "200": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/QueueStatus"
+ }
+ }
+ },
+ "description": "The request status."
+ }
+ }
+ }
+ },
+ "/mureka/v8/song/remix/requests/{request_id}": {
+ "get": {
+ "parameters": [
+ {
+ "in": "path",
+ "name": "request_id",
+ "required": true,
+ "schema": {
+ "description": "Request ID",
+ "type": "string"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/V8SongRemixOutput"
+ }
+ }
+ },
+ "description": "Result of the request."
+ }
+ }
+ }
+ },
+ "/mureka/v8/song/remix/requests/{request_id}/cancel": {
+ "put": {
+ "parameters": [
+ {
+ "in": "path",
+ "name": "request_id",
+ "required": true,
+ "schema": {
+ "description": "Request ID",
+ "type": "string"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "properties": {
+ "success": {
+ "description": "Whether the request was cancelled successfully.",
+ "type": "boolean"
+ }
+ },
+ "type": "object"
+ }
+ }
+ },
+ "description": "The request was cancelled."
+ }
+ }
+ }
+ },
+ "/mureka/v8/song/remix/requests/{request_id}/status": {
+ "get": {
+ "parameters": [
+ {
+ "in": "path",
+ "name": "request_id",
+ "required": true,
+ "schema": {
+ "description": "Request ID",
+ "type": "string"
+ }
+ },
+ {
+ "in": "query",
+ "name": "logs",
+ "required": false,
+ "schema": {
+ "description": "Whether to include logs (`1`) in the response or not (`0`).",
+ "type": "number"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/QueueStatus"
+ }
+ }
+ },
+ "description": "The request status."
+ }
+ }
+ }
+ }
+ },
+ "security": [
+ {
+ "apiKeyAuth": []
+ }
+ ],
+ "servers": [
+ {
+ "url": "https://queue.fal.run"
+ }
+ ]
+}
diff --git a/tests/fixtures/provider-schemas/fal/mureka__v9.5__generate__instrumental.json b/tests/fixtures/provider-schemas/fal/mureka__v9.5__generate__instrumental.json
new file mode 100644
index 00000000..34a228d9
--- /dev/null
+++ b/tests/fixtures/provider-schemas/fal/mureka__v9.5__generate__instrumental.json
@@ -0,0 +1,549 @@
+{
+ "components": {
+ "schemas": {
+ "File": {
+ "properties": {
+ "content_type": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "The mime type of the file.",
+ "examples": [
+ "image/png"
+ ],
+ "title": "Content Type"
+ },
+ "file_name": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "The name of the file. It will be auto-generated if not provided.",
+ "examples": [
+ "z9RV14K95DvU.png"
+ ],
+ "title": "File Name"
+ },
+ "file_size": {
+ "anyOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "The size of the file in bytes.",
+ "examples": [
+ 4404019
+ ],
+ "title": "File Size"
+ },
+ "url": {
+ "description": "The URL where the file can be downloaded from.",
+ "title": "Url",
+ "type": "string"
+ }
+ },
+ "required": [
+ "url"
+ ],
+ "title": "File",
+ "type": "object",
+ "x-fal-order-properties": [
+ "url",
+ "content_type",
+ "file_name",
+ "file_size"
+ ]
+ },
+ "LyricsLine": {
+ "properties": {
+ "end": {
+ "anyOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "title": "End"
+ },
+ "start": {
+ "anyOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "title": "Start"
+ },
+ "text": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "title": "Text"
+ },
+ "words": {
+ "anyOf": [
+ {
+ "items": {
+ "$ref": "#/components/schemas/LyricsWord"
+ },
+ "type": "array"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "title": "Words"
+ }
+ },
+ "title": "LyricsLine",
+ "type": "object",
+ "x-fal-order-properties": [
+ "start",
+ "end",
+ "text",
+ "words"
+ ]
+ },
+ "LyricsSection": {
+ "properties": {
+ "end": {
+ "anyOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "title": "End"
+ },
+ "lines": {
+ "anyOf": [
+ {
+ "items": {
+ "$ref": "#/components/schemas/LyricsLine"
+ },
+ "type": "array"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "title": "Lines"
+ },
+ "section_type": {
+ "anyOf": [
+ {
+ "enum": [
+ "intro",
+ "verse",
+ "pre-chorus",
+ "chorus",
+ "bridge",
+ "break",
+ "outro"
+ ],
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "title": "Section Type"
+ },
+ "start": {
+ "anyOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "title": "Start"
+ }
+ },
+ "title": "LyricsSection",
+ "type": "object",
+ "x-fal-order-properties": [
+ "section_type",
+ "start",
+ "end",
+ "lines"
+ ]
+ },
+ "LyricsWord": {
+ "properties": {
+ "end": {
+ "anyOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "title": "End"
+ },
+ "start": {
+ "anyOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "title": "Start"
+ },
+ "text": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "title": "Text"
+ }
+ },
+ "title": "LyricsWord",
+ "type": "object",
+ "x-fal-order-properties": [
+ "start",
+ "end",
+ "text"
+ ]
+ },
+ "QueueStatus": {
+ "properties": {
+ "cancel_url": {
+ "description": "The cancel url.",
+ "type": "string"
+ },
+ "logs": {
+ "additionalProperties": true,
+ "description": "The logs.",
+ "type": "object"
+ },
+ "metrics": {
+ "additionalProperties": true,
+ "description": "The metrics.",
+ "type": "object"
+ },
+ "queue_position": {
+ "description": "The queue position.",
+ "type": "integer"
+ },
+ "request_id": {
+ "description": "The request id.",
+ "type": "string"
+ },
+ "response_url": {
+ "description": "The response url.",
+ "type": "string"
+ },
+ "status": {
+ "enum": [
+ "IN_QUEUE",
+ "IN_PROGRESS",
+ "COMPLETED"
+ ],
+ "type": "string"
+ },
+ "status_url": {
+ "description": "The status url.",
+ "type": "string"
+ }
+ },
+ "required": [
+ "status",
+ "request_id"
+ ],
+ "type": "object"
+ },
+ "V95GenerateInstrumentalInput": {
+ "description": "Input for v9.5 GenerateInstrumental.",
+ "properties": {
+ "enable_safety_checker": {
+ "default": true,
+ "description": "Authorized callers may set false to request relaxed screening.",
+ "title": "Enable Safety Checker",
+ "type": "boolean"
+ },
+ "instrumental_id": {
+ "anyOf": [
+ {
+ "minLength": 1,
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "Instrumental ID returned by /files/upload with purpose='instrumental'. Provide exactly one of instrumental_id or prompt.",
+ "title": "Instrumental Id"
+ },
+ "prompt": {
+ "anyOf": [
+ {
+ "maxLength": 1024,
+ "minLength": 1,
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "Description of the desired instrumental. Provide exactly one of prompt or instrumental_id.",
+ "title": "Prompt"
+ }
+ },
+ "title": "GenerateInstrumentalV95Input",
+ "type": "object",
+ "x-fal-order-properties": [
+ "prompt",
+ "instrumental_id",
+ "enable_safety_checker"
+ ]
+ },
+ "V95GenerateInstrumentalOutput": {
+ "description": "A generated audio file and its reusable song identifier.",
+ "properties": {
+ "audio": {
+ "$ref": "#/components/schemas/File",
+ "description": "The generated audio file."
+ },
+ "duration": {
+ "anyOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "Duration of the generated audio in milliseconds, when available.",
+ "title": "Duration"
+ },
+ "lyrics_sections": {
+ "anyOf": [
+ {
+ "items": {
+ "$ref": "#/components/schemas/LyricsSection"
+ },
+ "type": "array"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "Timed lyric sections for the generated audio, when available.",
+ "title": "Lyrics Sections"
+ },
+ "song_id": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "Reusable identifier for this audio. Pass it to endpoints that accept song_id.",
+ "title": "Song Id"
+ }
+ },
+ "required": [
+ "audio"
+ ],
+ "title": "GeneratedAudioOutput",
+ "type": "object",
+ "x-fal-order-properties": [
+ "song_id",
+ "audio",
+ "duration",
+ "lyrics_sections"
+ ]
+ }
+ },
+ "securitySchemes": {
+ "apiKeyAuth": {
+ "description": "Fal Key",
+ "in": "header",
+ "name": "Authorization",
+ "type": "apiKey"
+ }
+ }
+ },
+ "info": {
+ "description": "The OpenAPI schema for the mureka/v9.5/generate/instrumental queue.",
+ "title": "Queue OpenAPI for mureka/v9.5/generate/instrumental",
+ "version": "1.0.0",
+ "x-fal-metadata": {
+ "about": "Generate one or more instrumental tracks without vocals.\n\nDescribe the music with a prompt or guide generation with a previously\nuploaded instrumental reference.",
+ "category": "text-to-audio",
+ "documentationUrl": "https://fal.ai/models/mureka/v9.5/generate/instrumental/api",
+ "endpointId": "mureka/v9.5/generate/instrumental",
+ "playgroundUrl": "https://fal.ai/models/mureka/v9.5/generate/instrumental",
+ "thumbnailUrl": "https://v3b.fal.media/files/b/0aaa6193/e-XLyqpAgL2AXHiNGr1Fz.jpg"
+ }
+ },
+ "openapi": "3.1.0",
+ "paths": {
+ "/mureka/v9.5/generate/instrumental": {
+ "post": {
+ "requestBody": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/V95GenerateInstrumentalInput"
+ }
+ }
+ },
+ "required": true
+ },
+ "responses": {
+ "200": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/QueueStatus"
+ }
+ }
+ },
+ "description": "The request status."
+ }
+ }
+ }
+ },
+ "/mureka/v9.5/generate/instrumental/requests/{request_id}": {
+ "get": {
+ "parameters": [
+ {
+ "in": "path",
+ "name": "request_id",
+ "required": true,
+ "schema": {
+ "description": "Request ID",
+ "type": "string"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/V95GenerateInstrumentalOutput"
+ }
+ }
+ },
+ "description": "Result of the request."
+ }
+ }
+ }
+ },
+ "/mureka/v9.5/generate/instrumental/requests/{request_id}/cancel": {
+ "put": {
+ "parameters": [
+ {
+ "in": "path",
+ "name": "request_id",
+ "required": true,
+ "schema": {
+ "description": "Request ID",
+ "type": "string"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "properties": {
+ "success": {
+ "description": "Whether the request was cancelled successfully.",
+ "type": "boolean"
+ }
+ },
+ "type": "object"
+ }
+ }
+ },
+ "description": "The request was cancelled."
+ }
+ }
+ }
+ },
+ "/mureka/v9.5/generate/instrumental/requests/{request_id}/status": {
+ "get": {
+ "parameters": [
+ {
+ "in": "path",
+ "name": "request_id",
+ "required": true,
+ "schema": {
+ "description": "Request ID",
+ "type": "string"
+ }
+ },
+ {
+ "in": "query",
+ "name": "logs",
+ "required": false,
+ "schema": {
+ "description": "Whether to include logs (`1`) in the response or not (`0`).",
+ "type": "number"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/QueueStatus"
+ }
+ }
+ },
+ "description": "The request status."
+ }
+ }
+ }
+ }
+ },
+ "security": [
+ {
+ "apiKeyAuth": []
+ }
+ ],
+ "servers": [
+ {
+ "url": "https://queue.fal.run"
+ }
+ ]
+}
diff --git a/tests/fixtures/provider-schemas/fal/mureka__v9.5__generate__song.json b/tests/fixtures/provider-schemas/fal/mureka__v9.5__generate__song.json
new file mode 100644
index 00000000..6bfa572b
--- /dev/null
+++ b/tests/fixtures/provider-schemas/fal/mureka__v9.5__generate__song.json
@@ -0,0 +1,665 @@
+{
+ "components": {
+ "schemas": {
+ "File": {
+ "properties": {
+ "content_type": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "The mime type of the file.",
+ "examples": [
+ "image/png"
+ ],
+ "title": "Content Type"
+ },
+ "file_name": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "The name of the file. It will be auto-generated if not provided.",
+ "examples": [
+ "z9RV14K95DvU.png"
+ ],
+ "title": "File Name"
+ },
+ "file_size": {
+ "anyOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "The size of the file in bytes.",
+ "examples": [
+ 4404019
+ ],
+ "title": "File Size"
+ },
+ "url": {
+ "description": "The URL where the file can be downloaded from.",
+ "title": "Url",
+ "type": "string"
+ }
+ },
+ "required": [
+ "url"
+ ],
+ "title": "File",
+ "type": "object",
+ "x-fal-order-properties": [
+ "url",
+ "content_type",
+ "file_name",
+ "file_size"
+ ]
+ },
+ "LyricsLine": {
+ "properties": {
+ "end": {
+ "anyOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "title": "End"
+ },
+ "start": {
+ "anyOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "title": "Start"
+ },
+ "text": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "title": "Text"
+ },
+ "words": {
+ "anyOf": [
+ {
+ "items": {
+ "$ref": "#/components/schemas/LyricsWord"
+ },
+ "type": "array"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "title": "Words"
+ }
+ },
+ "title": "LyricsLine",
+ "type": "object",
+ "x-fal-order-properties": [
+ "start",
+ "end",
+ "text",
+ "words"
+ ]
+ },
+ "LyricsSection": {
+ "properties": {
+ "end": {
+ "anyOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "title": "End"
+ },
+ "lines": {
+ "anyOf": [
+ {
+ "items": {
+ "$ref": "#/components/schemas/LyricsLine"
+ },
+ "type": "array"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "title": "Lines"
+ },
+ "section_type": {
+ "anyOf": [
+ {
+ "enum": [
+ "intro",
+ "verse",
+ "pre-chorus",
+ "chorus",
+ "bridge",
+ "break",
+ "outro"
+ ],
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "title": "Section Type"
+ },
+ "start": {
+ "anyOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "title": "Start"
+ }
+ },
+ "title": "LyricsSection",
+ "type": "object",
+ "x-fal-order-properties": [
+ "section_type",
+ "start",
+ "end",
+ "lines"
+ ]
+ },
+ "LyricsWord": {
+ "properties": {
+ "end": {
+ "anyOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "title": "End"
+ },
+ "start": {
+ "anyOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "title": "Start"
+ },
+ "text": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "title": "Text"
+ }
+ },
+ "title": "LyricsWord",
+ "type": "object",
+ "x-fal-order-properties": [
+ "start",
+ "end",
+ "text"
+ ]
+ },
+ "QueueStatus": {
+ "properties": {
+ "cancel_url": {
+ "description": "The cancel url.",
+ "type": "string"
+ },
+ "logs": {
+ "additionalProperties": true,
+ "description": "The logs.",
+ "type": "object"
+ },
+ "metrics": {
+ "additionalProperties": true,
+ "description": "The metrics.",
+ "type": "object"
+ },
+ "queue_position": {
+ "description": "The queue position.",
+ "type": "integer"
+ },
+ "request_id": {
+ "description": "The request id.",
+ "type": "string"
+ },
+ "response_url": {
+ "description": "The response url.",
+ "type": "string"
+ },
+ "status": {
+ "enum": [
+ "IN_QUEUE",
+ "IN_PROGRESS",
+ "COMPLETED"
+ ],
+ "type": "string"
+ },
+ "status_url": {
+ "description": "The status url.",
+ "type": "string"
+ }
+ },
+ "required": [
+ "status",
+ "request_id"
+ ],
+ "type": "object"
+ },
+ "V95GenerateSongInput": {
+ "description": "Input for v9.5 GenerateSong.",
+ "properties": {
+ "duration": {
+ "anyOf": [
+ {
+ "maximum": 300,
+ "minimum": 120,
+ "type": "integer"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "Target song duration in seconds. If omitted, the model determines the duration automatically. The length of the lyrics also affects the target duration.",
+ "title": "Duration"
+ },
+ "enable_safety_checker": {
+ "default": true,
+ "description": "Authorized callers may set false to request relaxed screening.",
+ "title": "Enable Safety Checker",
+ "type": "boolean"
+ },
+ "gender": {
+ "anyOf": [
+ {
+ "enum": [
+ "female",
+ "male"
+ ],
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "Preferred vocal gender for lyrics-to-song generation. An uploaded or cloned voice takes precedence.",
+ "title": "Gender"
+ },
+ "lyrics": {
+ "anyOf": [
+ {
+ "maxLength": 5000,
+ "minLength": 1,
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "Lyrics to sing, up to 5,000 characters. Provide this for lyrics-to-song generation; otherwise provide prompt for prompt-to-song generation.",
+ "title": "Lyrics"
+ },
+ "melody_id": {
+ "anyOf": [
+ {
+ "minLength": 1,
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "Melody ID returned by /files/upload with purpose='melody'. This cannot be combined with prompt, reference_id, or vocal_id.",
+ "title": "Melody Id"
+ },
+ "prompt": {
+ "anyOf": [
+ {
+ "maxLength": 2000,
+ "minLength": 1,
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "Describe the desired song, mood, instrumentation, and vocals. Required when lyrics is omitted, up to 2,000 characters. With lyrics, it acts as a music-style control and supports up to 1,024 characters.",
+ "examples": [
+ "A bright summer love song with a catchy chorus"
+ ],
+ "title": "Prompt"
+ },
+ "reference_id": {
+ "anyOf": [
+ {
+ "minLength": 1,
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "Reference-music ID returned by /files/upload with purpose='reference'.",
+ "title": "Reference Id"
+ },
+ "styles": {
+ "anyOf": [
+ {
+ "items": {
+ "enum": [
+ "pop",
+ "rock",
+ "jazz",
+ "r&b",
+ "edm",
+ "ambient",
+ "folk",
+ "latin",
+ "k-pop",
+ "j-pop",
+ "house",
+ "gospel",
+ "lo-fi"
+ ],
+ "type": "string"
+ },
+ "minItems": 1,
+ "type": "array"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "One or more musical genres for prompt-to-song generation. This cannot be used when lyrics is provided.",
+ "examples": [
+ [
+ "pop",
+ "rock"
+ ]
+ ],
+ "title": "Styles"
+ },
+ "vocal_id": {
+ "anyOf": [
+ {
+ "minLength": 1,
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "Voice ID returned by /voice/clone.",
+ "title": "Vocal Id"
+ }
+ },
+ "title": "GenerateSongV95Input",
+ "type": "object",
+ "x-fal-order-properties": [
+ "lyrics",
+ "styles",
+ "prompt",
+ "gender",
+ "reference_id",
+ "vocal_id",
+ "melody_id",
+ "enable_safety_checker",
+ "duration"
+ ]
+ },
+ "V95GenerateSongOutput": {
+ "description": "A generated audio file and its reusable song identifier.",
+ "properties": {
+ "audio": {
+ "$ref": "#/components/schemas/File",
+ "description": "The generated audio file."
+ },
+ "duration": {
+ "anyOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "Duration of the generated audio in milliseconds, when available.",
+ "title": "Duration"
+ },
+ "lyrics_sections": {
+ "anyOf": [
+ {
+ "items": {
+ "$ref": "#/components/schemas/LyricsSection"
+ },
+ "type": "array"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "Timed lyric sections for the generated audio, when available.",
+ "title": "Lyrics Sections"
+ },
+ "song_id": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "Reusable identifier for this audio. Pass it to endpoints that accept song_id.",
+ "title": "Song Id"
+ }
+ },
+ "required": [
+ "audio"
+ ],
+ "title": "GeneratedAudioOutput",
+ "type": "object",
+ "x-fal-order-properties": [
+ "song_id",
+ "audio",
+ "duration",
+ "lyrics_sections"
+ ]
+ }
+ },
+ "securitySchemes": {
+ "apiKeyAuth": {
+ "description": "Fal Key",
+ "in": "header",
+ "name": "Authorization",
+ "type": "apiKey"
+ }
+ }
+ },
+ "info": {
+ "description": "The OpenAPI schema for the mureka/v9.5/generate/song queue.",
+ "title": "Queue OpenAPI for mureka/v9.5/generate/song",
+ "version": "1.0.0",
+ "x-fal-metadata": {
+ "about": "Generate complete songs from lyrics or a natural-language description.\n\nLyrics mode gives direct control over the words, while prompt mode creates a\nsong from its requested theme and musical styles. Each result includes a\nreusable song ID and audio URL.",
+ "category": "text-to-audio",
+ "documentationUrl": "https://fal.ai/models/mureka/v9.5/generate/song/api",
+ "endpointId": "mureka/v9.5/generate/song",
+ "playgroundUrl": "https://fal.ai/models/mureka/v9.5/generate/song",
+ "thumbnailUrl": "https://v3b.fal.media/files/b/0aaa61bd/nUKHfwGHS0eFH_BoR-mDL.jpg"
+ }
+ },
+ "openapi": "3.1.0",
+ "paths": {
+ "/mureka/v9.5/generate/song": {
+ "post": {
+ "requestBody": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/V95GenerateSongInput"
+ }
+ }
+ },
+ "required": true
+ },
+ "responses": {
+ "200": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/QueueStatus"
+ }
+ }
+ },
+ "description": "The request status."
+ }
+ }
+ }
+ },
+ "/mureka/v9.5/generate/song/requests/{request_id}": {
+ "get": {
+ "parameters": [
+ {
+ "in": "path",
+ "name": "request_id",
+ "required": true,
+ "schema": {
+ "description": "Request ID",
+ "type": "string"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/V95GenerateSongOutput"
+ }
+ }
+ },
+ "description": "Result of the request."
+ }
+ }
+ }
+ },
+ "/mureka/v9.5/generate/song/requests/{request_id}/cancel": {
+ "put": {
+ "parameters": [
+ {
+ "in": "path",
+ "name": "request_id",
+ "required": true,
+ "schema": {
+ "description": "Request ID",
+ "type": "string"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "properties": {
+ "success": {
+ "description": "Whether the request was cancelled successfully.",
+ "type": "boolean"
+ }
+ },
+ "type": "object"
+ }
+ }
+ },
+ "description": "The request was cancelled."
+ }
+ }
+ }
+ },
+ "/mureka/v9.5/generate/song/requests/{request_id}/status": {
+ "get": {
+ "parameters": [
+ {
+ "in": "path",
+ "name": "request_id",
+ "required": true,
+ "schema": {
+ "description": "Request ID",
+ "type": "string"
+ }
+ },
+ {
+ "in": "query",
+ "name": "logs",
+ "required": false,
+ "schema": {
+ "description": "Whether to include logs (`1`) in the response or not (`0`).",
+ "type": "number"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/QueueStatus"
+ }
+ }
+ },
+ "description": "The request status."
+ }
+ }
+ }
+ }
+ },
+ "security": [
+ {
+ "apiKeyAuth": []
+ }
+ ],
+ "servers": [
+ {
+ "url": "https://queue.fal.run"
+ }
+ ]
+}
diff --git a/tests/fixtures/provider-schemas/fal/mureka__v9__generate__instrumental.json b/tests/fixtures/provider-schemas/fal/mureka__v9__generate__instrumental.json
new file mode 100644
index 00000000..052860e3
--- /dev/null
+++ b/tests/fixtures/provider-schemas/fal/mureka__v9__generate__instrumental.json
@@ -0,0 +1,549 @@
+{
+ "components": {
+ "schemas": {
+ "File": {
+ "properties": {
+ "content_type": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "The mime type of the file.",
+ "examples": [
+ "image/png"
+ ],
+ "title": "Content Type"
+ },
+ "file_name": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "The name of the file. It will be auto-generated if not provided.",
+ "examples": [
+ "z9RV14K95DvU.png"
+ ],
+ "title": "File Name"
+ },
+ "file_size": {
+ "anyOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "The size of the file in bytes.",
+ "examples": [
+ 4404019
+ ],
+ "title": "File Size"
+ },
+ "url": {
+ "description": "The URL where the file can be downloaded from.",
+ "title": "Url",
+ "type": "string"
+ }
+ },
+ "required": [
+ "url"
+ ],
+ "title": "File",
+ "type": "object",
+ "x-fal-order-properties": [
+ "url",
+ "content_type",
+ "file_name",
+ "file_size"
+ ]
+ },
+ "LyricsLine": {
+ "properties": {
+ "end": {
+ "anyOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "title": "End"
+ },
+ "start": {
+ "anyOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "title": "Start"
+ },
+ "text": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "title": "Text"
+ },
+ "words": {
+ "anyOf": [
+ {
+ "items": {
+ "$ref": "#/components/schemas/LyricsWord"
+ },
+ "type": "array"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "title": "Words"
+ }
+ },
+ "title": "LyricsLine",
+ "type": "object",
+ "x-fal-order-properties": [
+ "start",
+ "end",
+ "text",
+ "words"
+ ]
+ },
+ "LyricsSection": {
+ "properties": {
+ "end": {
+ "anyOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "title": "End"
+ },
+ "lines": {
+ "anyOf": [
+ {
+ "items": {
+ "$ref": "#/components/schemas/LyricsLine"
+ },
+ "type": "array"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "title": "Lines"
+ },
+ "section_type": {
+ "anyOf": [
+ {
+ "enum": [
+ "intro",
+ "verse",
+ "pre-chorus",
+ "chorus",
+ "bridge",
+ "break",
+ "outro"
+ ],
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "title": "Section Type"
+ },
+ "start": {
+ "anyOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "title": "Start"
+ }
+ },
+ "title": "LyricsSection",
+ "type": "object",
+ "x-fal-order-properties": [
+ "section_type",
+ "start",
+ "end",
+ "lines"
+ ]
+ },
+ "LyricsWord": {
+ "properties": {
+ "end": {
+ "anyOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "title": "End"
+ },
+ "start": {
+ "anyOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "title": "Start"
+ },
+ "text": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "title": "Text"
+ }
+ },
+ "title": "LyricsWord",
+ "type": "object",
+ "x-fal-order-properties": [
+ "start",
+ "end",
+ "text"
+ ]
+ },
+ "QueueStatus": {
+ "properties": {
+ "cancel_url": {
+ "description": "The cancel url.",
+ "type": "string"
+ },
+ "logs": {
+ "additionalProperties": true,
+ "description": "The logs.",
+ "type": "object"
+ },
+ "metrics": {
+ "additionalProperties": true,
+ "description": "The metrics.",
+ "type": "object"
+ },
+ "queue_position": {
+ "description": "The queue position.",
+ "type": "integer"
+ },
+ "request_id": {
+ "description": "The request id.",
+ "type": "string"
+ },
+ "response_url": {
+ "description": "The response url.",
+ "type": "string"
+ },
+ "status": {
+ "enum": [
+ "IN_QUEUE",
+ "IN_PROGRESS",
+ "COMPLETED"
+ ],
+ "type": "string"
+ },
+ "status_url": {
+ "description": "The status url.",
+ "type": "string"
+ }
+ },
+ "required": [
+ "status",
+ "request_id"
+ ],
+ "type": "object"
+ },
+ "V9GenerateInstrumentalInput": {
+ "description": "Input for v9 GenerateInstrumental.",
+ "properties": {
+ "enable_safety_checker": {
+ "default": true,
+ "description": "Authorized callers may set false to request relaxed screening.",
+ "title": "Enable Safety Checker",
+ "type": "boolean"
+ },
+ "instrumental_id": {
+ "anyOf": [
+ {
+ "minLength": 1,
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "Instrumental ID returned by /files/upload with purpose='instrumental'. Provide exactly one of instrumental_id or prompt.",
+ "title": "Instrumental Id"
+ },
+ "prompt": {
+ "anyOf": [
+ {
+ "maxLength": 1024,
+ "minLength": 1,
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "Description of the desired instrumental. Provide exactly one of prompt or instrumental_id.",
+ "title": "Prompt"
+ }
+ },
+ "title": "GenerateInstrumentalV9Input",
+ "type": "object",
+ "x-fal-order-properties": [
+ "prompt",
+ "instrumental_id",
+ "enable_safety_checker"
+ ]
+ },
+ "V9GenerateInstrumentalOutput": {
+ "description": "A generated audio file and its reusable song identifier.",
+ "properties": {
+ "audio": {
+ "$ref": "#/components/schemas/File",
+ "description": "The generated audio file."
+ },
+ "duration": {
+ "anyOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "Duration of the generated audio in milliseconds, when available.",
+ "title": "Duration"
+ },
+ "lyrics_sections": {
+ "anyOf": [
+ {
+ "items": {
+ "$ref": "#/components/schemas/LyricsSection"
+ },
+ "type": "array"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "Timed lyric sections for the generated audio, when available.",
+ "title": "Lyrics Sections"
+ },
+ "song_id": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "Reusable identifier for this audio. Pass it to endpoints that accept song_id.",
+ "title": "Song Id"
+ }
+ },
+ "required": [
+ "audio"
+ ],
+ "title": "GeneratedAudioOutput",
+ "type": "object",
+ "x-fal-order-properties": [
+ "song_id",
+ "audio",
+ "duration",
+ "lyrics_sections"
+ ]
+ }
+ },
+ "securitySchemes": {
+ "apiKeyAuth": {
+ "description": "Fal Key",
+ "in": "header",
+ "name": "Authorization",
+ "type": "apiKey"
+ }
+ }
+ },
+ "info": {
+ "description": "The OpenAPI schema for the mureka/v9/generate/instrumental queue.",
+ "title": "Queue OpenAPI for mureka/v9/generate/instrumental",
+ "version": "1.0.0",
+ "x-fal-metadata": {
+ "about": "Generate one or more instrumental tracks without vocals.\n\nDescribe the music with a prompt or guide generation with a previously\nuploaded instrumental reference.",
+ "category": "text-to-audio",
+ "documentationUrl": "https://fal.ai/models/mureka/v9/generate/instrumental/api",
+ "endpointId": "mureka/v9/generate/instrumental",
+ "playgroundUrl": "https://fal.ai/models/mureka/v9/generate/instrumental",
+ "thumbnailUrl": "https://v3b.fal.media/files/b/0aaff1b0/QdgRyEDZMctEvdrsBhiPQ.jpg"
+ }
+ },
+ "openapi": "3.1.0",
+ "paths": {
+ "/mureka/v9/generate/instrumental": {
+ "post": {
+ "requestBody": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/V9GenerateInstrumentalInput"
+ }
+ }
+ },
+ "required": true
+ },
+ "responses": {
+ "200": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/QueueStatus"
+ }
+ }
+ },
+ "description": "The request status."
+ }
+ }
+ }
+ },
+ "/mureka/v9/generate/instrumental/requests/{request_id}": {
+ "get": {
+ "parameters": [
+ {
+ "in": "path",
+ "name": "request_id",
+ "required": true,
+ "schema": {
+ "description": "Request ID",
+ "type": "string"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/V9GenerateInstrumentalOutput"
+ }
+ }
+ },
+ "description": "Result of the request."
+ }
+ }
+ }
+ },
+ "/mureka/v9/generate/instrumental/requests/{request_id}/cancel": {
+ "put": {
+ "parameters": [
+ {
+ "in": "path",
+ "name": "request_id",
+ "required": true,
+ "schema": {
+ "description": "Request ID",
+ "type": "string"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "properties": {
+ "success": {
+ "description": "Whether the request was cancelled successfully.",
+ "type": "boolean"
+ }
+ },
+ "type": "object"
+ }
+ }
+ },
+ "description": "The request was cancelled."
+ }
+ }
+ }
+ },
+ "/mureka/v9/generate/instrumental/requests/{request_id}/status": {
+ "get": {
+ "parameters": [
+ {
+ "in": "path",
+ "name": "request_id",
+ "required": true,
+ "schema": {
+ "description": "Request ID",
+ "type": "string"
+ }
+ },
+ {
+ "in": "query",
+ "name": "logs",
+ "required": false,
+ "schema": {
+ "description": "Whether to include logs (`1`) in the response or not (`0`).",
+ "type": "number"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/QueueStatus"
+ }
+ }
+ },
+ "description": "The request status."
+ }
+ }
+ }
+ }
+ },
+ "security": [
+ {
+ "apiKeyAuth": []
+ }
+ ],
+ "servers": [
+ {
+ "url": "https://queue.fal.run"
+ }
+ ]
+}
diff --git a/tests/fixtures/provider-schemas/fal/mureka__v9__generate__song.json b/tests/fixtures/provider-schemas/fal/mureka__v9__generate__song.json
new file mode 100644
index 00000000..b33d881f
--- /dev/null
+++ b/tests/fixtures/provider-schemas/fal/mureka__v9__generate__song.json
@@ -0,0 +1,650 @@
+{
+ "components": {
+ "schemas": {
+ "File": {
+ "properties": {
+ "content_type": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "The mime type of the file.",
+ "examples": [
+ "image/png"
+ ],
+ "title": "Content Type"
+ },
+ "file_name": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "The name of the file. It will be auto-generated if not provided.",
+ "examples": [
+ "z9RV14K95DvU.png"
+ ],
+ "title": "File Name"
+ },
+ "file_size": {
+ "anyOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "The size of the file in bytes.",
+ "examples": [
+ 4404019
+ ],
+ "title": "File Size"
+ },
+ "url": {
+ "description": "The URL where the file can be downloaded from.",
+ "title": "Url",
+ "type": "string"
+ }
+ },
+ "required": [
+ "url"
+ ],
+ "title": "File",
+ "type": "object",
+ "x-fal-order-properties": [
+ "url",
+ "content_type",
+ "file_name",
+ "file_size"
+ ]
+ },
+ "LyricsLine": {
+ "properties": {
+ "end": {
+ "anyOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "title": "End"
+ },
+ "start": {
+ "anyOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "title": "Start"
+ },
+ "text": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "title": "Text"
+ },
+ "words": {
+ "anyOf": [
+ {
+ "items": {
+ "$ref": "#/components/schemas/LyricsWord"
+ },
+ "type": "array"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "title": "Words"
+ }
+ },
+ "title": "LyricsLine",
+ "type": "object",
+ "x-fal-order-properties": [
+ "start",
+ "end",
+ "text",
+ "words"
+ ]
+ },
+ "LyricsSection": {
+ "properties": {
+ "end": {
+ "anyOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "title": "End"
+ },
+ "lines": {
+ "anyOf": [
+ {
+ "items": {
+ "$ref": "#/components/schemas/LyricsLine"
+ },
+ "type": "array"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "title": "Lines"
+ },
+ "section_type": {
+ "anyOf": [
+ {
+ "enum": [
+ "intro",
+ "verse",
+ "pre-chorus",
+ "chorus",
+ "bridge",
+ "break",
+ "outro"
+ ],
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "title": "Section Type"
+ },
+ "start": {
+ "anyOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "title": "Start"
+ }
+ },
+ "title": "LyricsSection",
+ "type": "object",
+ "x-fal-order-properties": [
+ "section_type",
+ "start",
+ "end",
+ "lines"
+ ]
+ },
+ "LyricsWord": {
+ "properties": {
+ "end": {
+ "anyOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "title": "End"
+ },
+ "start": {
+ "anyOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "title": "Start"
+ },
+ "text": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "title": "Text"
+ }
+ },
+ "title": "LyricsWord",
+ "type": "object",
+ "x-fal-order-properties": [
+ "start",
+ "end",
+ "text"
+ ]
+ },
+ "QueueStatus": {
+ "properties": {
+ "cancel_url": {
+ "description": "The cancel url.",
+ "type": "string"
+ },
+ "logs": {
+ "additionalProperties": true,
+ "description": "The logs.",
+ "type": "object"
+ },
+ "metrics": {
+ "additionalProperties": true,
+ "description": "The metrics.",
+ "type": "object"
+ },
+ "queue_position": {
+ "description": "The queue position.",
+ "type": "integer"
+ },
+ "request_id": {
+ "description": "The request id.",
+ "type": "string"
+ },
+ "response_url": {
+ "description": "The response url.",
+ "type": "string"
+ },
+ "status": {
+ "enum": [
+ "IN_QUEUE",
+ "IN_PROGRESS",
+ "COMPLETED"
+ ],
+ "type": "string"
+ },
+ "status_url": {
+ "description": "The status url.",
+ "type": "string"
+ }
+ },
+ "required": [
+ "status",
+ "request_id"
+ ],
+ "type": "object"
+ },
+ "V9GenerateSongInput": {
+ "description": "Input for v9 GenerateSong.",
+ "properties": {
+ "enable_safety_checker": {
+ "default": true,
+ "description": "Authorized callers may set false to request relaxed screening.",
+ "title": "Enable Safety Checker",
+ "type": "boolean"
+ },
+ "gender": {
+ "anyOf": [
+ {
+ "enum": [
+ "female",
+ "male"
+ ],
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "Preferred vocal gender for lyrics-to-song generation. An uploaded or cloned voice takes precedence.",
+ "title": "Gender"
+ },
+ "lyrics": {
+ "anyOf": [
+ {
+ "maxLength": 5000,
+ "minLength": 1,
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "Lyrics to sing, up to 5,000 characters. Provide this for lyrics-to-song generation; otherwise provide prompt for prompt-to-song generation.",
+ "title": "Lyrics"
+ },
+ "melody_id": {
+ "anyOf": [
+ {
+ "minLength": 1,
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "Melody ID returned by /files/upload with purpose='melody'. This cannot be combined with prompt, reference_id, or vocal_id.",
+ "title": "Melody Id"
+ },
+ "prompt": {
+ "anyOf": [
+ {
+ "maxLength": 2000,
+ "minLength": 1,
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "Describe the desired song, mood, instrumentation, and vocals. Required when lyrics is omitted, up to 2,000 characters. With lyrics, it acts as a music-style control and supports up to 1,024 characters.",
+ "examples": [
+ "A bright summer love song with a catchy chorus"
+ ],
+ "title": "Prompt"
+ },
+ "reference_id": {
+ "anyOf": [
+ {
+ "minLength": 1,
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "Reference-music ID returned by /files/upload with purpose='reference'.",
+ "title": "Reference Id"
+ },
+ "styles": {
+ "anyOf": [
+ {
+ "items": {
+ "enum": [
+ "pop",
+ "rock",
+ "jazz",
+ "r&b",
+ "edm",
+ "ambient",
+ "folk",
+ "latin",
+ "k-pop",
+ "j-pop",
+ "house",
+ "gospel",
+ "lo-fi"
+ ],
+ "type": "string"
+ },
+ "minItems": 1,
+ "type": "array"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "One or more musical genres for prompt-to-song generation. This cannot be used when lyrics is provided.",
+ "examples": [
+ [
+ "pop",
+ "rock"
+ ]
+ ],
+ "title": "Styles"
+ },
+ "vocal_id": {
+ "anyOf": [
+ {
+ "minLength": 1,
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "Voice ID returned by /voice/clone.",
+ "title": "Vocal Id"
+ }
+ },
+ "title": "GenerateSongV9Input",
+ "type": "object",
+ "x-fal-order-properties": [
+ "lyrics",
+ "styles",
+ "prompt",
+ "gender",
+ "reference_id",
+ "vocal_id",
+ "melody_id",
+ "enable_safety_checker"
+ ]
+ },
+ "V9GenerateSongOutput": {
+ "description": "A generated audio file and its reusable song identifier.",
+ "properties": {
+ "audio": {
+ "$ref": "#/components/schemas/File",
+ "description": "The generated audio file."
+ },
+ "duration": {
+ "anyOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "Duration of the generated audio in milliseconds, when available.",
+ "title": "Duration"
+ },
+ "lyrics_sections": {
+ "anyOf": [
+ {
+ "items": {
+ "$ref": "#/components/schemas/LyricsSection"
+ },
+ "type": "array"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "Timed lyric sections for the generated audio, when available.",
+ "title": "Lyrics Sections"
+ },
+ "song_id": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "Reusable identifier for this audio. Pass it to endpoints that accept song_id.",
+ "title": "Song Id"
+ }
+ },
+ "required": [
+ "audio"
+ ],
+ "title": "GeneratedAudioOutput",
+ "type": "object",
+ "x-fal-order-properties": [
+ "song_id",
+ "audio",
+ "duration",
+ "lyrics_sections"
+ ]
+ }
+ },
+ "securitySchemes": {
+ "apiKeyAuth": {
+ "description": "Fal Key",
+ "in": "header",
+ "name": "Authorization",
+ "type": "apiKey"
+ }
+ }
+ },
+ "info": {
+ "description": "The OpenAPI schema for the mureka/v9/generate/song queue.",
+ "title": "Queue OpenAPI for mureka/v9/generate/song",
+ "version": "1.0.0",
+ "x-fal-metadata": {
+ "about": "Generate complete songs from lyrics or a natural-language description.\n\nLyrics mode gives direct control over the words, while prompt mode creates a\nsong from its requested theme and musical styles. Each result includes a\nreusable song ID and audio URL.",
+ "category": "text-to-audio",
+ "documentationUrl": "https://fal.ai/models/mureka/v9/generate/song/api",
+ "endpointId": "mureka/v9/generate/song",
+ "playgroundUrl": "https://fal.ai/models/mureka/v9/generate/song",
+ "thumbnailUrl": "https://v3b.fal.media/files/b/0aaff182/4drxC0q8eOOC6uSU4RyCQ.jpg"
+ }
+ },
+ "openapi": "3.1.0",
+ "paths": {
+ "/mureka/v9/generate/song": {
+ "post": {
+ "requestBody": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/V9GenerateSongInput"
+ }
+ }
+ },
+ "required": true
+ },
+ "responses": {
+ "200": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/QueueStatus"
+ }
+ }
+ },
+ "description": "The request status."
+ }
+ }
+ }
+ },
+ "/mureka/v9/generate/song/requests/{request_id}": {
+ "get": {
+ "parameters": [
+ {
+ "in": "path",
+ "name": "request_id",
+ "required": true,
+ "schema": {
+ "description": "Request ID",
+ "type": "string"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/V9GenerateSongOutput"
+ }
+ }
+ },
+ "description": "Result of the request."
+ }
+ }
+ }
+ },
+ "/mureka/v9/generate/song/requests/{request_id}/cancel": {
+ "put": {
+ "parameters": [
+ {
+ "in": "path",
+ "name": "request_id",
+ "required": true,
+ "schema": {
+ "description": "Request ID",
+ "type": "string"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "properties": {
+ "success": {
+ "description": "Whether the request was cancelled successfully.",
+ "type": "boolean"
+ }
+ },
+ "type": "object"
+ }
+ }
+ },
+ "description": "The request was cancelled."
+ }
+ }
+ }
+ },
+ "/mureka/v9/generate/song/requests/{request_id}/status": {
+ "get": {
+ "parameters": [
+ {
+ "in": "path",
+ "name": "request_id",
+ "required": true,
+ "schema": {
+ "description": "Request ID",
+ "type": "string"
+ }
+ },
+ {
+ "in": "query",
+ "name": "logs",
+ "required": false,
+ "schema": {
+ "description": "Whether to include logs (`1`) in the response or not (`0`).",
+ "type": "number"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/QueueStatus"
+ }
+ }
+ },
+ "description": "The request status."
+ }
+ }
+ }
+ }
+ },
+ "security": [
+ {
+ "apiKeyAuth": []
+ }
+ ],
+ "servers": [
+ {
+ "url": "https://queue.fal.run"
+ }
+ ]
+}
diff --git a/tests/fixtures/provider-schemas/fal/speridlabs__idol.json b/tests/fixtures/provider-schemas/fal/speridlabs__idol.json
new file mode 100644
index 00000000..b083661b
--- /dev/null
+++ b/tests/fixtures/provider-schemas/fal/speridlabs__idol.json
@@ -0,0 +1,512 @@
+{
+ "components": {
+ "schemas": {
+ "File": {
+ "properties": {
+ "content_type": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "The mime type of the file.",
+ "examples": [
+ "image/png"
+ ],
+ "title": "Content Type"
+ },
+ "file_name": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "The name of the file. It will be auto-generated if not provided.",
+ "examples": [
+ "z9RV14K95DvU.png"
+ ],
+ "title": "File Name"
+ },
+ "file_size": {
+ "anyOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "The size of the file in bytes.",
+ "examples": [
+ 4404019
+ ],
+ "title": "File Size"
+ },
+ "url": {
+ "description": "The URL where the file can be downloaded from.",
+ "title": "Url",
+ "type": "string"
+ }
+ },
+ "required": [
+ "url"
+ ],
+ "title": "File",
+ "type": "object",
+ "x-fal-order-properties": [
+ "url",
+ "content_type",
+ "file_name",
+ "file_size"
+ ]
+ },
+ "IdolInput": {
+ "properties": {
+ "enable_safety_checker": {
+ "default": true,
+ "description": "Enable safety checking of the input image.",
+ "title": "Enable Safety Checker",
+ "type": "boolean"
+ },
+ "guidance_scale": {
+ "default": 3,
+ "description": "Classifier-free guidance: how strictly the object follows the image.",
+ "maximum": 10,
+ "minimum": 0,
+ "title": "Guidance Scale",
+ "type": "number"
+ },
+ "image_type": {
+ "default": "synthetic",
+ "description": "Kind of input image. `synthetic` for renders and generated images (tight crop), `real` for photographs (looser crop).",
+ "enum": [
+ "synthetic",
+ "real"
+ ],
+ "title": "Image Type",
+ "type": "string"
+ },
+ "image_url": {
+ "description": "URL of the image of a single object to convert into a 3D Gaussian splat.",
+ "examples": [
+ "https://raw.githubusercontent.com/VAST-AI-Research/TripoSplat/36b6deb0a1613e43c6910de441cb57d50352e44a/static/example_inputs/building_stone_house.webp"
+ ],
+ "title": "Image Url",
+ "type": "string"
+ },
+ "num_gaussians": {
+ "default": 262144,
+ "description": "Target number of Gaussians in the output splat. Rounded down to a multiple of 32.",
+ "maximum": 1048576,
+ "minimum": 32768,
+ "title": "Num Gaussians",
+ "type": "integer"
+ },
+ "num_inference_steps": {
+ "default": 50,
+ "description": "Number of sampling steps. Fewer are faster but lose some detail.",
+ "maximum": 50,
+ "minimum": 1,
+ "title": "Num Inference Steps",
+ "type": "integer"
+ },
+ "seed": {
+ "anyOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "Random seed for reproducibility. If None, a random seed is generated.",
+ "title": "Seed"
+ }
+ },
+ "required": [
+ "image_url"
+ ],
+ "title": "IdolInput",
+ "type": "object",
+ "x-fal-order-properties": [
+ "image_url",
+ "image_type",
+ "num_gaussians",
+ "num_inference_steps",
+ "guidance_scale",
+ "seed",
+ "enable_safety_checker"
+ ]
+ },
+ "IdolOutput": {
+ "properties": {
+ "camera": {
+ "additionalProperties": {
+ "type": "number"
+ },
+ "description": "Predicted input camera: yaw, pitch (radians), radius, fov (degrees).",
+ "title": "Camera",
+ "type": "object"
+ },
+ "model_glb": {
+ "$ref": "#/components/schemas/File",
+ "description": "Colored point-cloud preview (.glb) of the splat centers, viewable in standard 3D model viewers."
+ },
+ "model_mesh": {
+ "$ref": "#/components/schemas/File",
+ "description": "Generated 3D Gaussian splat (.ply)."
+ },
+ "num_gaussians": {
+ "description": "The actual number of Gaussians produced.",
+ "title": "Num Gaussians",
+ "type": "integer"
+ },
+ "preprocessed_image": {
+ "$ref": "#/components/schemas/Image",
+ "description": "The background-removed, cropped image the model saw."
+ },
+ "seed": {
+ "description": "The seed used for generation.",
+ "title": "Seed",
+ "type": "integer"
+ },
+ "timings": {
+ "additionalProperties": {
+ "type": "number"
+ },
+ "description": "Per-stage timings in seconds.",
+ "title": "Timings",
+ "type": "object"
+ }
+ },
+ "required": [
+ "model_mesh",
+ "model_glb",
+ "preprocessed_image",
+ "camera",
+ "num_gaussians",
+ "seed",
+ "timings"
+ ],
+ "title": "IdolOutput",
+ "type": "object",
+ "x-fal-order-properties": [
+ "model_mesh",
+ "model_glb",
+ "preprocessed_image",
+ "camera",
+ "num_gaussians",
+ "seed",
+ "timings"
+ ]
+ },
+ "Image": {
+ "description": "Represents an image file.",
+ "properties": {
+ "content_type": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "The mime type of the file.",
+ "examples": [
+ "image/png"
+ ],
+ "title": "Content Type"
+ },
+ "file_name": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "The name of the file. It will be auto-generated if not provided.",
+ "examples": [
+ "z9RV14K95DvU.png"
+ ],
+ "title": "File Name"
+ },
+ "file_size": {
+ "anyOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "The size of the file in bytes.",
+ "examples": [
+ 4404019
+ ],
+ "title": "File Size"
+ },
+ "height": {
+ "anyOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "The height of the image in pixels.",
+ "examples": [
+ 1024
+ ],
+ "title": "Height"
+ },
+ "url": {
+ "description": "The URL where the file can be downloaded from.",
+ "title": "Url",
+ "type": "string"
+ },
+ "width": {
+ "anyOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "The width of the image in pixels.",
+ "examples": [
+ 1024
+ ],
+ "title": "Width"
+ }
+ },
+ "required": [
+ "url"
+ ],
+ "title": "Image",
+ "type": "object",
+ "x-fal-order-properties": [
+ "url",
+ "content_type",
+ "file_name",
+ "file_size",
+ "width",
+ "height"
+ ]
+ },
+ "QueueStatus": {
+ "properties": {
+ "cancel_url": {
+ "description": "The cancel url.",
+ "type": "string"
+ },
+ "logs": {
+ "additionalProperties": true,
+ "description": "The logs.",
+ "type": "object"
+ },
+ "metrics": {
+ "additionalProperties": true,
+ "description": "The metrics.",
+ "type": "object"
+ },
+ "queue_position": {
+ "description": "The queue position.",
+ "type": "integer"
+ },
+ "request_id": {
+ "description": "The request id.",
+ "type": "string"
+ },
+ "response_url": {
+ "description": "The response url.",
+ "type": "string"
+ },
+ "status": {
+ "enum": [
+ "IN_QUEUE",
+ "IN_PROGRESS",
+ "COMPLETED"
+ ],
+ "type": "string"
+ },
+ "status_url": {
+ "description": "The status url.",
+ "type": "string"
+ }
+ },
+ "required": [
+ "status",
+ "request_id"
+ ],
+ "type": "object"
+ }
+ },
+ "securitySchemes": {
+ "apiKeyAuth": {
+ "description": "Fal Key",
+ "in": "header",
+ "name": "Authorization",
+ "type": "apiKey"
+ }
+ }
+ },
+ "info": {
+ "description": "The OpenAPI schema for the speridlabs/idol queue.",
+ "title": "Queue OpenAPI for speridlabs/idol",
+ "version": "1.0.0",
+ "x-fal-metadata": {
+ "about": "Generate",
+ "category": "image-to-3d",
+ "documentationUrl": "https://fal.ai/models/speridlabs/idol/api",
+ "endpointId": "speridlabs/idol",
+ "playgroundUrl": "https://fal.ai/models/speridlabs/idol",
+ "thumbnailUrl": "https://v3b.fal.media/files/b/0ab07f87/Z7OKjkqz5tdOAEH34KUOn.jpg"
+ }
+ },
+ "openapi": "3.1.0",
+ "paths": {
+ "/speridlabs/idol": {
+ "post": {
+ "requestBody": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/IdolInput"
+ }
+ }
+ },
+ "required": true
+ },
+ "responses": {
+ "200": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/QueueStatus"
+ }
+ }
+ },
+ "description": "The request status."
+ }
+ }
+ }
+ },
+ "/speridlabs/idol/requests/{request_id}": {
+ "get": {
+ "parameters": [
+ {
+ "in": "path",
+ "name": "request_id",
+ "required": true,
+ "schema": {
+ "description": "Request ID",
+ "type": "string"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/IdolOutput"
+ }
+ }
+ },
+ "description": "Result of the request."
+ }
+ }
+ }
+ },
+ "/speridlabs/idol/requests/{request_id}/cancel": {
+ "put": {
+ "parameters": [
+ {
+ "in": "path",
+ "name": "request_id",
+ "required": true,
+ "schema": {
+ "description": "Request ID",
+ "type": "string"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "properties": {
+ "success": {
+ "description": "Whether the request was cancelled successfully.",
+ "type": "boolean"
+ }
+ },
+ "type": "object"
+ }
+ }
+ },
+ "description": "The request was cancelled."
+ }
+ }
+ }
+ },
+ "/speridlabs/idol/requests/{request_id}/status": {
+ "get": {
+ "parameters": [
+ {
+ "in": "path",
+ "name": "request_id",
+ "required": true,
+ "schema": {
+ "description": "Request ID",
+ "type": "string"
+ }
+ },
+ {
+ "in": "query",
+ "name": "logs",
+ "required": false,
+ "schema": {
+ "description": "Whether to include logs (`1`) in the response or not (`0`).",
+ "type": "number"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/QueueStatus"
+ }
+ }
+ },
+ "description": "The request status."
+ }
+ }
+ }
+ }
+ },
+ "security": [
+ {
+ "apiKeyAuth": []
+ }
+ ],
+ "servers": [
+ {
+ "url": "https://queue.fal.run"
+ }
+ ]
+}
diff --git a/tests/fixtures/provider-schemas/fal/tripo3d__p2__image-to-3d.json b/tests/fixtures/provider-schemas/fal/tripo3d__p2__image-to-3d.json
new file mode 100644
index 00000000..762d04e7
--- /dev/null
+++ b/tests/fixtures/provider-schemas/fal/tripo3d__p2__image-to-3d.json
@@ -0,0 +1,544 @@
+{
+ "components": {
+ "schemas": {
+ "File": {
+ "properties": {
+ "content_type": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "The mime type of the file.",
+ "examples": [
+ "image/png"
+ ],
+ "title": "Content Type"
+ },
+ "file_name": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "The name of the file. It will be auto-generated if not provided.",
+ "examples": [
+ "z9RV14K95DvU.png"
+ ],
+ "title": "File Name"
+ },
+ "file_size": {
+ "anyOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "The size of the file in bytes.",
+ "examples": [
+ 4404019
+ ],
+ "title": "File Size"
+ },
+ "url": {
+ "description": "The URL where the file can be downloaded from.",
+ "title": "Url",
+ "type": "string"
+ }
+ },
+ "required": [
+ "url"
+ ],
+ "title": "File",
+ "type": "object",
+ "x-fal-order-properties": [
+ "url",
+ "content_type",
+ "file_name",
+ "file_size"
+ ]
+ },
+ "ModelUrls": {
+ "description": "3D model download URLs",
+ "properties": {
+ "base_model": {
+ "anyOf": [
+ {
+ "$ref": "#/components/schemas/File"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "Base (untextured) model"
+ },
+ "fbx": {
+ "anyOf": [
+ {
+ "$ref": "#/components/schemas/File"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "FBX format 3D model",
+ "title": "FBX"
+ },
+ "glb": {
+ "anyOf": [
+ {
+ "$ref": "#/components/schemas/File"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "GLB format 3D model",
+ "title": "GLB"
+ },
+ "pbr_model": {
+ "anyOf": [
+ {
+ "$ref": "#/components/schemas/File"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "PBR-textured model",
+ "title": "PBR Model"
+ }
+ },
+ "title": "ModelUrls",
+ "type": "object",
+ "x-fal-order-properties": [
+ "glb",
+ "fbx",
+ "base_model",
+ "pbr_model"
+ ]
+ },
+ "P2ImageTo3dInput": {
+ "description": "Input for Image to 3D generation using the P2 model.",
+ "properties": {
+ "auto_size": {
+ "default": false,
+ "description": "Auto-scale the model to real-world dimensions in meters.",
+ "title": "Auto Size",
+ "type": "boolean"
+ },
+ "delight": {
+ "default": true,
+ "description": "Remove baked-in lighting before texturing with v3.5-20260815.",
+ "title": "Delight",
+ "type": "boolean"
+ },
+ "enable_safety_checker": {
+ "default": true,
+ "description": "Authorized callers may set false to request relaxed screening.",
+ "title": "Enable Safety Checker",
+ "type": "boolean"
+ },
+ "export_orientation": {
+ "anyOf": [
+ {
+ "enum": [
+ "+x",
+ "-x",
+ "-y",
+ "+y"
+ ],
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "Optional forward axis for the exported model.",
+ "title": "Export Orientation"
+ },
+ "export_uv": {
+ "default": true,
+ "description": "Whether to generate UV coordinates for the model.",
+ "title": "Export Uv",
+ "type": "boolean"
+ },
+ "face_limit": {
+ "anyOf": [
+ {
+ "maximum": 50000,
+ "minimum": 48,
+ "type": "integer"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "Maximum number of faces for the generated mesh. Quad meshes support up to 25,000 faces.",
+ "title": "Face Limit"
+ },
+ "image_url": {
+ "description": "URL of the input image for 3D model creation.",
+ "examples": [
+ "https://v3b.fal.media/files/b/zebra/3osHJDI8IZ2wl6sGtEUeB_image.png"
+ ],
+ "title": "Image Url",
+ "type": "string"
+ },
+ "model_seed": {
+ "anyOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "Seed for geometry generation reproducibility.",
+ "title": "Model Seed"
+ },
+ "pbr": {
+ "default": true,
+ "description": "Whether to generate PBR material maps. Enabling PBR also enables textures.",
+ "title": "Pbr",
+ "type": "boolean"
+ },
+ "quad": {
+ "default": false,
+ "description": "Generate quad mesh topology instead of triangles.",
+ "title": "Quad",
+ "type": "boolean"
+ },
+ "texture": {
+ "default": true,
+ "description": "Whether to generate textures for the model.",
+ "title": "Texture",
+ "type": "boolean"
+ },
+ "texture_quality": {
+ "default": "standard",
+ "description": "Texture quality level.",
+ "enum": [
+ "fast",
+ "standard",
+ "detailed",
+ "extreme"
+ ],
+ "title": "Texture Quality",
+ "type": "string"
+ },
+ "texture_seed": {
+ "anyOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "Seed for texture generation reproducibility.",
+ "title": "Texture Seed"
+ },
+ "texture_version": {
+ "anyOf": [
+ {
+ "enum": [
+ "v3.5-20260815",
+ "v3.0-20250812",
+ "v2.5-20250123"
+ ],
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "Texture model version. The fast quality requires v3.5-20260815.",
+ "title": "Texture Version"
+ }
+ },
+ "required": [
+ "image_url"
+ ],
+ "title": "P2ImageTo3DInput",
+ "type": "object",
+ "x-fal-order-properties": [
+ "image_url",
+ "face_limit",
+ "texture",
+ "pbr",
+ "model_seed",
+ "texture_seed",
+ "texture_quality",
+ "texture_version",
+ "delight",
+ "auto_size",
+ "export_uv",
+ "export_orientation",
+ "quad",
+ "enable_safety_checker"
+ ]
+ },
+ "P2ImageTo3dOutput": {
+ "description": "Output for Tripo3D generation",
+ "properties": {
+ "model_mesh": {
+ "$ref": "#/components/schemas/File",
+ "description": "Generated 3D model file. May be GLB or FBX depending on Tripo output."
+ },
+ "model_urls": {
+ "$ref": "#/components/schemas/ModelUrls",
+ "description": "URLs for different 3D model variants.",
+ "title": "Model URLs"
+ },
+ "rendered_image": {
+ "anyOf": [
+ {
+ "$ref": "#/components/schemas/File"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "Preview render of the generated 3D model."
+ },
+ "task_id": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "Tripo task ID for a generated model. Pass this to rig or rig-check to use the model without uploading it again.",
+ "title": "Task Id"
+ }
+ },
+ "required": [
+ "model_mesh",
+ "model_urls"
+ ],
+ "title": "Tripo3DOutput",
+ "type": "object",
+ "x-fal-order-properties": [
+ "model_mesh",
+ "model_urls",
+ "rendered_image",
+ "task_id"
+ ]
+ },
+ "QueueStatus": {
+ "properties": {
+ "cancel_url": {
+ "description": "The cancel url.",
+ "type": "string"
+ },
+ "logs": {
+ "additionalProperties": true,
+ "description": "The logs.",
+ "type": "object"
+ },
+ "metrics": {
+ "additionalProperties": true,
+ "description": "The metrics.",
+ "type": "object"
+ },
+ "queue_position": {
+ "description": "The queue position.",
+ "type": "integer"
+ },
+ "request_id": {
+ "description": "The request id.",
+ "type": "string"
+ },
+ "response_url": {
+ "description": "The response url.",
+ "type": "string"
+ },
+ "status": {
+ "enum": [
+ "IN_QUEUE",
+ "IN_PROGRESS",
+ "COMPLETED"
+ ],
+ "type": "string"
+ },
+ "status_url": {
+ "description": "The status url.",
+ "type": "string"
+ }
+ },
+ "required": [
+ "status",
+ "request_id"
+ ],
+ "type": "object"
+ }
+ },
+ "securitySchemes": {
+ "apiKeyAuth": {
+ "description": "Fal Key",
+ "in": "header",
+ "name": "Authorization",
+ "type": "apiKey"
+ }
+ }
+ },
+ "info": {
+ "description": "The OpenAPI schema for the tripo3d/p2/image-to-3d queue.",
+ "title": "Queue OpenAPI for tripo3d/p2/image-to-3d",
+ "version": "1.0.0",
+ "x-fal-metadata": {
+ "about": "P2 Image To 3D",
+ "category": "image-to-3d",
+ "documentationUrl": "https://fal.ai/models/tripo3d/p2/image-to-3d/api",
+ "endpointId": "tripo3d/p2/image-to-3d",
+ "playgroundUrl": "https://fal.ai/models/tripo3d/p2/image-to-3d",
+ "thumbnailUrl": "https://v3b.fal.media/files/b/0aab5c22/iR7ETXMnNL1Kgpj5bWU5k.jpg"
+ }
+ },
+ "openapi": "3.1.0",
+ "paths": {
+ "/tripo3d/p2/image-to-3d": {
+ "post": {
+ "requestBody": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/P2ImageTo3dInput"
+ }
+ }
+ },
+ "required": true
+ },
+ "responses": {
+ "200": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/QueueStatus"
+ }
+ }
+ },
+ "description": "The request status."
+ }
+ }
+ }
+ },
+ "/tripo3d/p2/image-to-3d/requests/{request_id}": {
+ "get": {
+ "parameters": [
+ {
+ "in": "path",
+ "name": "request_id",
+ "required": true,
+ "schema": {
+ "description": "Request ID",
+ "type": "string"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/P2ImageTo3dOutput"
+ }
+ }
+ },
+ "description": "Result of the request."
+ }
+ }
+ }
+ },
+ "/tripo3d/p2/image-to-3d/requests/{request_id}/cancel": {
+ "put": {
+ "parameters": [
+ {
+ "in": "path",
+ "name": "request_id",
+ "required": true,
+ "schema": {
+ "description": "Request ID",
+ "type": "string"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "properties": {
+ "success": {
+ "description": "Whether the request was cancelled successfully.",
+ "type": "boolean"
+ }
+ },
+ "type": "object"
+ }
+ }
+ },
+ "description": "The request was cancelled."
+ }
+ }
+ }
+ },
+ "/tripo3d/p2/image-to-3d/requests/{request_id}/status": {
+ "get": {
+ "parameters": [
+ {
+ "in": "path",
+ "name": "request_id",
+ "required": true,
+ "schema": {
+ "description": "Request ID",
+ "type": "string"
+ }
+ },
+ {
+ "in": "query",
+ "name": "logs",
+ "required": false,
+ "schema": {
+ "description": "Whether to include logs (`1`) in the response or not (`0`).",
+ "type": "number"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/QueueStatus"
+ }
+ }
+ },
+ "description": "The request status."
+ }
+ }
+ }
+ }
+ },
+ "security": [
+ {
+ "apiKeyAuth": []
+ }
+ ],
+ "servers": [
+ {
+ "url": "https://queue.fal.run"
+ }
+ ]
+}
diff --git a/tests/fixtures/provider-schemas/fal/veed__clean-audio.json b/tests/fixtures/provider-schemas/fal/veed__clean-audio.json
new file mode 100644
index 00000000..5f7c3a34
--- /dev/null
+++ b/tests/fixtures/provider-schemas/fal/veed__clean-audio.json
@@ -0,0 +1,361 @@
+{
+ "components": {
+ "schemas": {
+ "Audio": {
+ "properties": {
+ "content_type": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "The mime type of the file.",
+ "examples": [
+ "image/png"
+ ],
+ "title": "Content Type"
+ },
+ "file_name": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "The name of the file. It will be auto-generated if not provided.",
+ "examples": [
+ "z9RV14K95DvU.png"
+ ],
+ "title": "File Name"
+ },
+ "file_size": {
+ "anyOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "The size of the file in bytes.",
+ "examples": [
+ 4404019
+ ],
+ "title": "File Size"
+ },
+ "url": {
+ "description": "The URL where the file can be downloaded from.",
+ "title": "Url",
+ "type": "string"
+ }
+ },
+ "required": [
+ "url"
+ ],
+ "title": "Audio",
+ "type": "object",
+ "x-fal-order-properties": [
+ "url",
+ "content_type",
+ "file_name",
+ "file_size"
+ ]
+ },
+ "CleanAudioInput": {
+ "properties": {
+ "audio_url": {
+ "description": "The recording to clean. Any audio or video ffmpeg can decode (wav, mp3, m4a, aac, ogg, mp4, mov, webm, ...); a video's audio track is used (call /video to get the video back with the cleaned track) and multi-channel input is mixed down to mono. Up to 30 minutes and 512 MB. A public URL or a data URI.",
+ "examples": [
+ "https://v3b.fal.media/files/b/0aaaa91c/5KspxZ3psz3KmDvSeYVk__noisy_example.m4a"
+ ],
+ "title": "Audio",
+ "type": "string"
+ },
+ "output_format": {
+ "default": "flac",
+ "description": "Container for the 48 kHz mono 16-bit output. FLAC is lossless at about half the size of WAV.",
+ "enum": [
+ "flac",
+ "wav"
+ ],
+ "title": "Output format",
+ "type": "string"
+ },
+ "strength": {
+ "default": 0.874,
+ "description": "How much of the original is allowed to remain under speech: the suppression floor is 1 - strength (the default 0.874 is the validated -18 dB). Lower keeps more room tone behind the voice; silence between words is always fully cleaned.",
+ "maximum": 1,
+ "minimum": 0,
+ "title": "Strength",
+ "type": "number"
+ },
+ "target_lufs": {
+ "anyOf": [
+ {
+ "maximum": -8,
+ "minimum": -40,
+ "type": "number"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": -19,
+ "description": "Integrated loudness of the output (ITU-R BS.1770). The default -19 LUFS is the level the VEED editor delivers; true peak is capped at -1.1 dBTP. Pass null through the API to skip loudness normalization and keep the input level.",
+ "title": "Target loudness (LUFS)"
+ }
+ },
+ "required": [
+ "audio_url"
+ ],
+ "title": "DenoiseInput",
+ "type": "object",
+ "x-fal-order-properties": [
+ "audio_url",
+ "strength",
+ "target_lufs",
+ "output_format"
+ ]
+ },
+ "CleanAudioOutput": {
+ "properties": {
+ "audio": {
+ "$ref": "#/components/schemas/Audio",
+ "description": "The denoised recording: 48 kHz mono 16-bit, same duration as the input, loudness-normalized.",
+ "examples": [
+ {
+ "content_type": "audio/flac",
+ "file_name": "denoised.flac",
+ "url": "https://v3b.fal.media/files/b/0aaaa933/tYOEy9H8r67qdQEC33yMe_denoised.flac"
+ }
+ ],
+ "title": "Cleaned audio"
+ },
+ "audio_duration": {
+ "description": "Input duration in seconds. Billing: whole seconds rounded up to full minutes, minimum 1 unit.",
+ "title": "Audio duration",
+ "type": "number"
+ }
+ },
+ "required": [
+ "audio",
+ "audio_duration"
+ ],
+ "title": "DenoiseOutput",
+ "type": "object",
+ "x-fal-order-properties": [
+ "audio",
+ "audio_duration"
+ ]
+ },
+ "QueueStatus": {
+ "properties": {
+ "cancel_url": {
+ "description": "The cancel url.",
+ "type": "string"
+ },
+ "logs": {
+ "additionalProperties": true,
+ "description": "The logs.",
+ "type": "object"
+ },
+ "metrics": {
+ "additionalProperties": true,
+ "description": "The metrics.",
+ "type": "object"
+ },
+ "queue_position": {
+ "description": "The queue position.",
+ "type": "integer"
+ },
+ "request_id": {
+ "description": "The request id.",
+ "type": "string"
+ },
+ "response_url": {
+ "description": "The response url.",
+ "type": "string"
+ },
+ "status": {
+ "enum": [
+ "IN_QUEUE",
+ "IN_PROGRESS",
+ "COMPLETED"
+ ],
+ "type": "string"
+ },
+ "status_url": {
+ "description": "The status url.",
+ "type": "string"
+ }
+ },
+ "required": [
+ "status",
+ "request_id"
+ ],
+ "type": "object"
+ }
+ },
+ "securitySchemes": {
+ "apiKeyAuth": {
+ "description": "Fal Key",
+ "in": "header",
+ "name": "Authorization",
+ "type": "apiKey"
+ }
+ }
+ },
+ "info": {
+ "description": "Removes background noise from speech while keeping quiet and distant words intact. The same model that powers Clean Audio in the VEED editor, processing thousands of recordings a day. Any audio or video file up to 30 minutes in, 48 kHz loudness-normalized audio out.",
+ "title": "Queue OpenAPI for veed/clean-audio",
+ "version": "1.0.0",
+ "x-fal-metadata": {
+ "about": "# VEED Clean Audio\n\nRemoves background noise from speech recordings. This is the model behind the **Clean Audio** toggle in\nthe VEED editor, where it has processed every recording since August 2026: MossFormer2 speech\nenhancement at 48 kHz, followed by VEED's post chain — a speech-gated suppression floor that keeps quiet\nand distant words instead of cutting them, presence/air EQ, and BS.1770 loudness normalization.\n\n## Input\n- **audio_url**: any audio or video ffmpeg can decode (wav, mp3, m4a, aac, ogg, mp4, mov, webm, ...).\nA video's audio track is used (to get the video back with the cleaned track, call **/video**);\nmulti-channel input is mixed down to mono.\n- Up to **30 minutes** of audio and **512 MB** per file. Public URLs only (private networks and\ncloud metadata addresses are refused; redirects are not followed) or a data URI.\n- Processing takes roughly 0.2–0.5× the audio duration: a 10-minute file returns in 2–5 minutes.\n\n## Output\n- 48 kHz mono 16-bit PCM in **FLAC** (default) or **WAV**, same duration as the input.\n- Integrated loudness **−19 LUFS**, true peak **≤ −1.1 dBTP** (skip by passing target_lufs = null).\n\n## Pricing\n**1 unit = 1 minute of input audio.** The duration is rounded to whole seconds, then up to the next\nfull minute; minimum 1 unit. A 5:00.011 file is 5 units, a 5:01 file is 6. Failed requests are not\nbilled.\n\n## Errors\nInvalid input returns HTTP 422 with the offending field: unreachable or non-public audio_url, no\naudio track, more than 30 minutes or 512 MB, undecodable audio.",
+ "category": "audio-to-audio",
+ "documentationUrl": "https://fal.ai/models/veed/clean-audio/api",
+ "endpointId": "veed/clean-audio",
+ "playgroundUrl": "https://fal.ai/models/veed/clean-audio",
+ "thumbnailUrl": "https://v3b.fal.media/files/b/0aab6e5b/ZKvDjaHYYnJDJrJz4WyOu.jpg"
+ }
+ },
+ "openapi": "3.1.0",
+ "paths": {
+ "/veed/clean-audio": {
+ "post": {
+ "requestBody": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/CleanAudioInput"
+ }
+ }
+ },
+ "required": true
+ },
+ "responses": {
+ "200": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/QueueStatus"
+ }
+ }
+ },
+ "description": "The request status."
+ }
+ }
+ }
+ },
+ "/veed/clean-audio/requests/{request_id}": {
+ "get": {
+ "parameters": [
+ {
+ "in": "path",
+ "name": "request_id",
+ "required": true,
+ "schema": {
+ "description": "Request ID",
+ "type": "string"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/CleanAudioOutput"
+ }
+ }
+ },
+ "description": "Result of the request."
+ }
+ }
+ }
+ },
+ "/veed/clean-audio/requests/{request_id}/cancel": {
+ "put": {
+ "parameters": [
+ {
+ "in": "path",
+ "name": "request_id",
+ "required": true,
+ "schema": {
+ "description": "Request ID",
+ "type": "string"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "properties": {
+ "success": {
+ "description": "Whether the request was cancelled successfully.",
+ "type": "boolean"
+ }
+ },
+ "type": "object"
+ }
+ }
+ },
+ "description": "The request was cancelled."
+ }
+ }
+ }
+ },
+ "/veed/clean-audio/requests/{request_id}/status": {
+ "get": {
+ "parameters": [
+ {
+ "in": "path",
+ "name": "request_id",
+ "required": true,
+ "schema": {
+ "description": "Request ID",
+ "type": "string"
+ }
+ },
+ {
+ "in": "query",
+ "name": "logs",
+ "required": false,
+ "schema": {
+ "description": "Whether to include logs (`1`) in the response or not (`0`).",
+ "type": "number"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/QueueStatus"
+ }
+ }
+ },
+ "description": "The request status."
+ }
+ }
+ }
+ }
+ },
+ "security": [
+ {
+ "apiKeyAuth": []
+ }
+ ],
+ "servers": [
+ {
+ "url": "https://queue.fal.run"
+ }
+ ]
+}
diff --git a/tests/fixtures/provider-schemas/index.json b/tests/fixtures/provider-schemas/index.json
new file mode 100644
index 00000000..9d309a56
--- /dev/null
+++ b/tests/fixtures/provider-schemas/index.json
@@ -0,0 +1,50 @@
+{
+ "about": "The providers' own schemas for tests/provider-conformance.test.ts, written by scripts/refresh-provider-schemas.mjs (public GETs only).",
+ "fal": [
+ "bria/guided-remove-background",
+ "bria/video/background-removal/green-screen-despill",
+ "elevenlabs/music/v2.5",
+ "fal-ai/deepfilternet3",
+ "fal-ai/kandinsky6-lite/image-to-video",
+ "fal-ai/kandinsky6-lite/text-to-video",
+ "fal-ai/kandinsky6-pro/image-to-video",
+ "fal-ai/kandinsky6-pro/text-to-video",
+ "fal-ai/kandinsky6-vsr",
+ "fal-ai/vidu/q4/image-to-video",
+ "fal-ai/vidu/q4/reference-to-video",
+ "fal-ai/wan/v2.2-a14b/image-to-video",
+ "fal-ai/wan/v2.2-a14b/image-to-video/lora",
+ "fal-ai/workflow-utilities/extract-audio",
+ "google/lyria-3.5",
+ "meshy/v6/retexture",
+ "meshy/v7/retexture",
+ "minimax/h3-max-turbo/extend-video",
+ "minimax/h3-max-turbo/image-to-video",
+ "minimax/h3-max-turbo/reference-to-video",
+ "minimax/h3-max-turbo/text-to-video",
+ "minimax/h3-max/insert-video",
+ "minimax/h3-max/lip-sync/image-to-video",
+ "minimax/h3-max/relight",
+ "minimax/h3-max/styles/16bit-pixel",
+ "minimax/h3-max/styles/hand-drawn",
+ "minimax/h3-max/styles/low-poly",
+ "minimax/h3-max/styles/retro-toon-70s",
+ "minimax/h3-max/styles/vhs",
+ "minimax/music-3",
+ "mureka/api/files/upload",
+ "mureka/api/song/stem",
+ "mureka/v8/song/extend",
+ "mureka/v8/song/remix",
+ "mureka/v9.5/generate/instrumental",
+ "mureka/v9.5/generate/song",
+ "mureka/v9/generate/instrumental",
+ "mureka/v9/generate/song",
+ "speridlabs/idol",
+ "tripo3d/p2/image-to-3d",
+ "veed/clean-audio"
+ ],
+ "replicate": [
+ "minimax/h3-highspeed",
+ "minimax/h3-lite"
+ ]
+}
diff --git a/tests/fixtures/provider-schemas/replicate/minimax__h3-highspeed.json b/tests/fixtures/provider-schemas/replicate/minimax__h3-highspeed.json
new file mode 100644
index 00000000..ff2fa0f2
--- /dev/null
+++ b/tests/fixtures/provider-schemas/replicate/minimax__h3-highspeed.json
@@ -0,0 +1,946 @@
+{
+ "example_prediction": {
+ "input": {
+ "duration": 5,
+ "prompt": "A hummingbird hovers beside a bright orange hibiscus flower in a sunlit garden, wings a soft blur, shallow depth of field, slow push in",
+ "ratio": "16:9"
+ },
+ "output": "https://replicate.delivery/xezq/aW8cNi9bwxYANVPAM5xfqE7XsBmt0VBisx8nGDluYomnzKuLA/tmpiab7og6b.mp4",
+ "status": "succeeded"
+ },
+ "model": "minimax/h3-highspeed",
+ "openapi_schema": {
+ "components": {
+ "schemas": {
+ "HTTPValidationError": {
+ "properties": {
+ "detail": {
+ "items": {
+ "properties": {
+ "loc": {
+ "items": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "integer"
+ }
+ ]
+ },
+ "title": "Location",
+ "type": "array"
+ },
+ "msg": {
+ "title": "Message",
+ "type": "string"
+ },
+ "type": {
+ "title": "Error Type",
+ "type": "string"
+ }
+ },
+ "required": [
+ "loc",
+ "msg",
+ "type"
+ ],
+ "title": "ValidationError",
+ "type": "object"
+ },
+ "title": "Detail",
+ "type": "array"
+ }
+ },
+ "title": "HTTPValidationError",
+ "type": "object"
+ },
+ "Input": {
+ "properties": {
+ "duration": {
+ "default": 5,
+ "description": "Output duration in seconds.",
+ "enum": [
+ 4,
+ 5,
+ 6,
+ 7,
+ 8,
+ 9,
+ 10,
+ 11,
+ 12,
+ 13,
+ 14,
+ 15
+ ],
+ "title": "duration",
+ "type": "integer",
+ "x-order": 6
+ },
+ "first_frame_image": {
+ "description": "First frame image for video generation. The output video will have the same aspect ratio as this image.",
+ "format": "uri",
+ "nullable": true,
+ "title": "First Frame Image",
+ "type": "string",
+ "x-order": 1
+ },
+ "last_frame_image": {
+ "description": "Last frame image for video generation. The final frame of the output video will match this image.",
+ "format": "uri",
+ "nullable": true,
+ "title": "Last Frame Image",
+ "type": "string",
+ "x-order": 2
+ },
+ "prompt": {
+ "description": "Text prompt for generation",
+ "title": "Prompt",
+ "type": "string",
+ "x-order": 0
+ },
+ "ratio": {
+ "default": "16:9",
+ "description": "Output aspect ratio. Required for text-to-video; adaptive for image-to-video.",
+ "enum": [
+ "adaptive",
+ "21:9",
+ "16:9",
+ "4:3",
+ "1:1",
+ "3:4",
+ "9:16"
+ ],
+ "title": "ratio",
+ "type": "string",
+ "x-order": 7
+ },
+ "reference_audio_urls": {
+ "default": [],
+ "description": "Public URLs for up to 3 reference audio clips.",
+ "items": {
+ "type": "string"
+ },
+ "title": "Reference Audio Urls",
+ "type": "array",
+ "x-order": 5
+ },
+ "reference_image_urls": {
+ "default": [],
+ "description": "Public URLs for up to 9 reference images.",
+ "items": {
+ "type": "string"
+ },
+ "title": "Reference Image Urls",
+ "type": "array",
+ "x-order": 3
+ },
+ "reference_video_urls": {
+ "default": [],
+ "description": "Public URLs for up to 3 reference videos.",
+ "items": {
+ "type": "string"
+ },
+ "title": "Reference Video Urls",
+ "type": "array",
+ "x-order": 4
+ }
+ },
+ "required": [
+ "prompt"
+ ],
+ "title": "Input",
+ "type": "object"
+ },
+ "Output": {
+ "format": "uri",
+ "title": "Output",
+ "type": "string"
+ },
+ "PredictionRequest": {
+ "properties": {
+ "id": {
+ "title": "Id",
+ "type": "string"
+ },
+ "input": {
+ "properties": {
+ "duration": {
+ "default": 5,
+ "description": "Output duration in seconds.",
+ "enum": [
+ 4,
+ 5,
+ 6,
+ 7,
+ 8,
+ 9,
+ 10,
+ 11,
+ 12,
+ 13,
+ 14,
+ 15
+ ],
+ "title": "duration",
+ "type": "integer",
+ "x-order": 6
+ },
+ "first_frame_image": {
+ "description": "First frame image for video generation. The output video will have the same aspect ratio as this image.",
+ "format": "uri",
+ "nullable": true,
+ "title": "First Frame Image",
+ "type": "string",
+ "x-order": 1
+ },
+ "last_frame_image": {
+ "description": "Last frame image for video generation. The final frame of the output video will match this image.",
+ "format": "uri",
+ "nullable": true,
+ "title": "Last Frame Image",
+ "type": "string",
+ "x-order": 2
+ },
+ "prompt": {
+ "description": "Text prompt for generation",
+ "title": "Prompt",
+ "type": "string",
+ "x-order": 0
+ },
+ "ratio": {
+ "default": "16:9",
+ "description": "Output aspect ratio. Required for text-to-video; adaptive for image-to-video.",
+ "enum": [
+ "adaptive",
+ "21:9",
+ "16:9",
+ "4:3",
+ "1:1",
+ "3:4",
+ "9:16"
+ ],
+ "title": "ratio",
+ "type": "string",
+ "x-order": 7
+ },
+ "reference_audio_urls": {
+ "default": [],
+ "description": "Public URLs for up to 3 reference audio clips.",
+ "items": {
+ "type": "string"
+ },
+ "title": "Reference Audio Urls",
+ "type": "array",
+ "x-order": 5
+ },
+ "reference_image_urls": {
+ "default": [],
+ "description": "Public URLs for up to 9 reference images.",
+ "items": {
+ "type": "string"
+ },
+ "title": "Reference Image Urls",
+ "type": "array",
+ "x-order": 3
+ },
+ "reference_video_urls": {
+ "default": [],
+ "description": "Public URLs for up to 3 reference videos.",
+ "items": {
+ "type": "string"
+ },
+ "title": "Reference Video Urls",
+ "type": "array",
+ "x-order": 4
+ }
+ },
+ "required": [
+ "prompt"
+ ],
+ "title": "Input",
+ "type": "object"
+ }
+ },
+ "title": "PredictionRequest",
+ "type": "object"
+ },
+ "PredictionResponse": {
+ "properties": {
+ "completed_at": {
+ "format": "date-time",
+ "title": "Completed At",
+ "type": "string"
+ },
+ "created_at": {
+ "format": "date-time",
+ "title": "Created At",
+ "type": "string"
+ },
+ "error": {
+ "title": "Error",
+ "type": "string"
+ },
+ "id": {
+ "title": "Id",
+ "type": "string"
+ },
+ "input": {
+ "properties": {
+ "duration": {
+ "default": 5,
+ "description": "Output duration in seconds.",
+ "enum": [
+ 4,
+ 5,
+ 6,
+ 7,
+ 8,
+ 9,
+ 10,
+ 11,
+ 12,
+ 13,
+ 14,
+ 15
+ ],
+ "title": "duration",
+ "type": "integer",
+ "x-order": 6
+ },
+ "first_frame_image": {
+ "description": "First frame image for video generation. The output video will have the same aspect ratio as this image.",
+ "format": "uri",
+ "nullable": true,
+ "title": "First Frame Image",
+ "type": "string",
+ "x-order": 1
+ },
+ "last_frame_image": {
+ "description": "Last frame image for video generation. The final frame of the output video will match this image.",
+ "format": "uri",
+ "nullable": true,
+ "title": "Last Frame Image",
+ "type": "string",
+ "x-order": 2
+ },
+ "prompt": {
+ "description": "Text prompt for generation",
+ "title": "Prompt",
+ "type": "string",
+ "x-order": 0
+ },
+ "ratio": {
+ "default": "16:9",
+ "description": "Output aspect ratio. Required for text-to-video; adaptive for image-to-video.",
+ "enum": [
+ "adaptive",
+ "21:9",
+ "16:9",
+ "4:3",
+ "1:1",
+ "3:4",
+ "9:16"
+ ],
+ "title": "ratio",
+ "type": "string",
+ "x-order": 7
+ },
+ "reference_audio_urls": {
+ "default": [],
+ "description": "Public URLs for up to 3 reference audio clips.",
+ "items": {
+ "type": "string"
+ },
+ "title": "Reference Audio Urls",
+ "type": "array",
+ "x-order": 5
+ },
+ "reference_image_urls": {
+ "default": [],
+ "description": "Public URLs for up to 9 reference images.",
+ "items": {
+ "type": "string"
+ },
+ "title": "Reference Image Urls",
+ "type": "array",
+ "x-order": 3
+ },
+ "reference_video_urls": {
+ "default": [],
+ "description": "Public URLs for up to 3 reference videos.",
+ "items": {
+ "type": "string"
+ },
+ "title": "Reference Video Urls",
+ "type": "array",
+ "x-order": 4
+ }
+ },
+ "required": [
+ "prompt"
+ ],
+ "title": "Input",
+ "type": "object"
+ },
+ "logs": {
+ "title": "Logs",
+ "type": "string"
+ },
+ "metrics": {
+ "title": "Metrics",
+ "type": "object"
+ },
+ "output": {
+ "format": "uri",
+ "title": "Output",
+ "type": "string"
+ },
+ "started_at": {
+ "format": "date-time",
+ "title": "Started At",
+ "type": "string"
+ },
+ "status": {
+ "title": "Status",
+ "type": "string"
+ },
+ "version": {
+ "title": "Version",
+ "type": "string"
+ }
+ },
+ "title": "PredictionResponse",
+ "type": "object"
+ },
+ "Status": {
+ "description": "An enumeration.",
+ "enum": [
+ "starting",
+ "processing",
+ "succeeded",
+ "canceled",
+ "failed"
+ ],
+ "title": "Status",
+ "type": "string"
+ },
+ "ValidationError": {
+ "properties": {
+ "loc": {
+ "items": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "integer"
+ }
+ ]
+ },
+ "title": "Location",
+ "type": "array"
+ },
+ "msg": {
+ "title": "Message",
+ "type": "string"
+ },
+ "type": {
+ "title": "Error Type",
+ "type": "string"
+ }
+ },
+ "required": [
+ "loc",
+ "msg",
+ "type"
+ ],
+ "title": "ValidationError",
+ "type": "object"
+ },
+ "duration": {
+ "description": "An enumeration.",
+ "enum": [
+ 4,
+ 5,
+ 6,
+ 7,
+ 8,
+ 9,
+ 10,
+ 11,
+ 12,
+ 13,
+ 14,
+ 15
+ ],
+ "title": "duration",
+ "type": "integer"
+ },
+ "ratio": {
+ "description": "An enumeration.",
+ "enum": [
+ "adaptive",
+ "21:9",
+ "16:9",
+ "4:3",
+ "1:1",
+ "3:4",
+ "9:16"
+ ],
+ "title": "ratio",
+ "type": "string"
+ }
+ }
+ },
+ "info": {
+ "title": "Cog",
+ "version": "0.23.1"
+ },
+ "openapi": "3.0.2",
+ "paths": {
+ "/": {
+ "get": {
+ "operationId": "root__get",
+ "responses": {
+ "200": {
+ "content": {
+ "application/json": {
+ "schema": {}
+ }
+ },
+ "description": "Successful Response"
+ }
+ },
+ "summary": "Root"
+ }
+ },
+ "/health-check": {
+ "get": {
+ "operationId": "healthcheck_health_check_get",
+ "responses": {
+ "200": {
+ "content": {
+ "application/json": {
+ "schema": {}
+ }
+ },
+ "description": "Successful Response"
+ }
+ },
+ "summary": "Healthcheck"
+ }
+ },
+ "/predictions": {
+ "post": {
+ "description": "Run a single prediction on the model",
+ "operationId": "predict_predictions_post",
+ "requestBody": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "properties": {
+ "id": {
+ "title": "Id",
+ "type": "string"
+ },
+ "input": {
+ "properties": {
+ "duration": {
+ "default": 5,
+ "description": "Output duration in seconds.",
+ "enum": [
+ 4,
+ 5,
+ 6,
+ 7,
+ 8,
+ 9,
+ 10,
+ 11,
+ 12,
+ 13,
+ 14,
+ 15
+ ],
+ "title": "duration",
+ "type": "integer",
+ "x-order": 6
+ },
+ "first_frame_image": {
+ "description": "First frame image for video generation. The output video will have the same aspect ratio as this image.",
+ "format": "uri",
+ "nullable": true,
+ "title": "First Frame Image",
+ "type": "string",
+ "x-order": 1
+ },
+ "last_frame_image": {
+ "description": "Last frame image for video generation. The final frame of the output video will match this image.",
+ "format": "uri",
+ "nullable": true,
+ "title": "Last Frame Image",
+ "type": "string",
+ "x-order": 2
+ },
+ "prompt": {
+ "description": "Text prompt for generation",
+ "title": "Prompt",
+ "type": "string",
+ "x-order": 0
+ },
+ "ratio": {
+ "default": "16:9",
+ "description": "Output aspect ratio. Required for text-to-video; adaptive for image-to-video.",
+ "enum": [
+ "adaptive",
+ "21:9",
+ "16:9",
+ "4:3",
+ "1:1",
+ "3:4",
+ "9:16"
+ ],
+ "title": "ratio",
+ "type": "string",
+ "x-order": 7
+ },
+ "reference_audio_urls": {
+ "default": [],
+ "description": "Public URLs for up to 3 reference audio clips.",
+ "items": {
+ "type": "string"
+ },
+ "title": "Reference Audio Urls",
+ "type": "array",
+ "x-order": 5
+ },
+ "reference_image_urls": {
+ "default": [],
+ "description": "Public URLs for up to 9 reference images.",
+ "items": {
+ "type": "string"
+ },
+ "title": "Reference Image Urls",
+ "type": "array",
+ "x-order": 3
+ },
+ "reference_video_urls": {
+ "default": [],
+ "description": "Public URLs for up to 3 reference videos.",
+ "items": {
+ "type": "string"
+ },
+ "title": "Reference Video Urls",
+ "type": "array",
+ "x-order": 4
+ }
+ },
+ "required": [
+ "prompt"
+ ],
+ "title": "Input",
+ "type": "object"
+ }
+ },
+ "title": "PredictionRequest",
+ "type": "object"
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "properties": {
+ "completed_at": {
+ "format": "date-time",
+ "title": "Completed At",
+ "type": "string"
+ },
+ "created_at": {
+ "format": "date-time",
+ "title": "Created At",
+ "type": "string"
+ },
+ "error": {
+ "title": "Error",
+ "type": "string"
+ },
+ "id": {
+ "title": "Id",
+ "type": "string"
+ },
+ "input": {
+ "properties": {
+ "duration": {
+ "default": 5,
+ "description": "Output duration in seconds.",
+ "enum": [
+ 4,
+ 5,
+ 6,
+ 7,
+ 8,
+ 9,
+ 10,
+ 11,
+ 12,
+ 13,
+ 14,
+ 15
+ ],
+ "title": "duration",
+ "type": "integer",
+ "x-order": 6
+ },
+ "first_frame_image": {
+ "description": "First frame image for video generation. The output video will have the same aspect ratio as this image.",
+ "format": "uri",
+ "nullable": true,
+ "title": "First Frame Image",
+ "type": "string",
+ "x-order": 1
+ },
+ "last_frame_image": {
+ "description": "Last frame image for video generation. The final frame of the output video will match this image.",
+ "format": "uri",
+ "nullable": true,
+ "title": "Last Frame Image",
+ "type": "string",
+ "x-order": 2
+ },
+ "prompt": {
+ "description": "Text prompt for generation",
+ "title": "Prompt",
+ "type": "string",
+ "x-order": 0
+ },
+ "ratio": {
+ "default": "16:9",
+ "description": "Output aspect ratio. Required for text-to-video; adaptive for image-to-video.",
+ "enum": [
+ "adaptive",
+ "21:9",
+ "16:9",
+ "4:3",
+ "1:1",
+ "3:4",
+ "9:16"
+ ],
+ "title": "ratio",
+ "type": "string",
+ "x-order": 7
+ },
+ "reference_audio_urls": {
+ "default": [],
+ "description": "Public URLs for up to 3 reference audio clips.",
+ "items": {
+ "type": "string"
+ },
+ "title": "Reference Audio Urls",
+ "type": "array",
+ "x-order": 5
+ },
+ "reference_image_urls": {
+ "default": [],
+ "description": "Public URLs for up to 9 reference images.",
+ "items": {
+ "type": "string"
+ },
+ "title": "Reference Image Urls",
+ "type": "array",
+ "x-order": 3
+ },
+ "reference_video_urls": {
+ "default": [],
+ "description": "Public URLs for up to 3 reference videos.",
+ "items": {
+ "type": "string"
+ },
+ "title": "Reference Video Urls",
+ "type": "array",
+ "x-order": 4
+ }
+ },
+ "required": [
+ "prompt"
+ ],
+ "title": "Input",
+ "type": "object"
+ },
+ "logs": {
+ "title": "Logs",
+ "type": "string"
+ },
+ "metrics": {
+ "title": "Metrics",
+ "type": "object"
+ },
+ "output": {
+ "format": "uri",
+ "title": "Output",
+ "type": "string"
+ },
+ "started_at": {
+ "format": "date-time",
+ "title": "Started At",
+ "type": "string"
+ },
+ "status": {
+ "title": "Status",
+ "type": "string"
+ },
+ "version": {
+ "title": "Version",
+ "type": "string"
+ }
+ },
+ "title": "PredictionResponse",
+ "type": "object"
+ }
+ }
+ },
+ "description": "Successful Response"
+ },
+ "422": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "properties": {
+ "detail": {
+ "items": {
+ "properties": {
+ "loc": {
+ "items": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "integer"
+ }
+ ]
+ },
+ "title": "Location",
+ "type": "array"
+ },
+ "msg": {
+ "title": "Message",
+ "type": "string"
+ },
+ "type": {
+ "title": "Error Type",
+ "type": "string"
+ }
+ },
+ "required": [
+ "loc",
+ "msg",
+ "type"
+ ],
+ "title": "ValidationError",
+ "type": "object"
+ },
+ "title": "Detail",
+ "type": "array"
+ }
+ },
+ "title": "HTTPValidationError",
+ "type": "object"
+ }
+ }
+ },
+ "description": "Validation Error"
+ }
+ },
+ "summary": "Predict"
+ }
+ },
+ "/predictions/{prediction_id}/cancel": {
+ "post": {
+ "operationId": "cancel_predictions__prediction_id__cancel_post",
+ "parameters": [
+ {
+ "in": "path",
+ "name": "prediction_id",
+ "required": true,
+ "schema": {
+ "title": "Prediction Id",
+ "type": "string"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "content": {
+ "application/json": {
+ "schema": {}
+ }
+ },
+ "description": "Successful Response"
+ },
+ "422": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "properties": {
+ "detail": {
+ "items": {
+ "properties": {
+ "loc": {
+ "items": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "integer"
+ }
+ ]
+ },
+ "title": "Location",
+ "type": "array"
+ },
+ "msg": {
+ "title": "Message",
+ "type": "string"
+ },
+ "type": {
+ "title": "Error Type",
+ "type": "string"
+ }
+ },
+ "required": [
+ "loc",
+ "msg",
+ "type"
+ ],
+ "title": "ValidationError",
+ "type": "object"
+ },
+ "title": "Detail",
+ "type": "array"
+ }
+ },
+ "title": "HTTPValidationError",
+ "type": "object"
+ }
+ }
+ },
+ "description": "Validation Error"
+ }
+ },
+ "summary": "Cancel"
+ }
+ }
+ }
+ },
+ "source": "https://replicate.com/minimax/h3-highspeed/api/schema",
+ "uses_versionless_api": true,
+ "version_created_at": "2026-10-29T20:07:32.866635Z",
+ "version_id": "b86d4aad81903a69e89f509f4bf8d0a6244ec6c3d0d2e048c01579e20255162a"
+}
diff --git a/tests/fixtures/provider-schemas/replicate/minimax__h3-lite.json b/tests/fixtures/provider-schemas/replicate/minimax__h3-lite.json
new file mode 100644
index 00000000..490cc6c5
--- /dev/null
+++ b/tests/fixtures/provider-schemas/replicate/minimax__h3-lite.json
@@ -0,0 +1,1008 @@
+{
+ "example_prediction": {
+ "input": {
+ "duration": 5,
+ "prompt": "A paper boat drifts down a rain-soaked city gutter at dusk, neon reflections rippling in the water, slow tracking shot",
+ "ratio": "16:9",
+ "reference_audio_urls": [],
+ "reference_image_urls": [],
+ "reference_video_urls": [],
+ "resolution": "768P"
+ },
+ "output": "https://replicate.delivery/xezq/8Ba5ixLYPe02L69mOCmioXj9d3zawazcED257ZaixbeEoVcXA/tmp4yur4762.mp4",
+ "status": "succeeded"
+ },
+ "model": "minimax/h3-lite",
+ "openapi_schema": {
+ "components": {
+ "schemas": {
+ "HTTPValidationError": {
+ "properties": {
+ "detail": {
+ "items": {
+ "properties": {
+ "loc": {
+ "items": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "integer"
+ }
+ ]
+ },
+ "title": "Location",
+ "type": "array"
+ },
+ "msg": {
+ "title": "Message",
+ "type": "string"
+ },
+ "type": {
+ "title": "Error Type",
+ "type": "string"
+ }
+ },
+ "required": [
+ "loc",
+ "msg",
+ "type"
+ ],
+ "title": "ValidationError",
+ "type": "object"
+ },
+ "title": "Detail",
+ "type": "array"
+ }
+ },
+ "title": "HTTPValidationError",
+ "type": "object"
+ },
+ "Input": {
+ "properties": {
+ "duration": {
+ "default": 5,
+ "description": "Output duration in seconds.",
+ "enum": [
+ 4,
+ 5,
+ 6,
+ 7,
+ 8,
+ 9,
+ 10,
+ 11,
+ 12,
+ 13,
+ 14,
+ 15
+ ],
+ "title": "duration",
+ "type": "integer",
+ "x-order": 6
+ },
+ "first_frame_image": {
+ "description": "First frame image for video generation. The output video will have the same aspect ratio as this image.",
+ "format": "uri",
+ "nullable": true,
+ "title": "First Frame Image",
+ "type": "string",
+ "x-order": 1
+ },
+ "last_frame_image": {
+ "description": "Last frame image for video generation. The final frame of the output video will match this image.",
+ "format": "uri",
+ "nullable": true,
+ "title": "Last Frame Image",
+ "type": "string",
+ "x-order": 2
+ },
+ "prompt": {
+ "description": "Text prompt for generation",
+ "title": "Prompt",
+ "type": "string",
+ "x-order": 0
+ },
+ "ratio": {
+ "default": "16:9",
+ "description": "Output aspect ratio. Ignored for image-to-video, which uses the aspect ratio of the input image.",
+ "enum": [
+ "21:9",
+ "16:9",
+ "4:3",
+ "1:1",
+ "3:4",
+ "9:16"
+ ],
+ "title": "ratio",
+ "type": "string",
+ "x-order": 8
+ },
+ "reference_audio_urls": {
+ "default": [],
+ "description": "Public URLs for up to 3 reference audio clips.",
+ "items": {
+ "type": "string"
+ },
+ "title": "Reference Audio Urls",
+ "type": "array",
+ "x-order": 5
+ },
+ "reference_image_urls": {
+ "default": [],
+ "description": "Public URLs for up to 9 reference images.",
+ "items": {
+ "type": "string"
+ },
+ "title": "Reference Image Urls",
+ "type": "array",
+ "x-order": 3
+ },
+ "reference_video_urls": {
+ "default": [],
+ "description": "Public URLs for up to 3 reference videos.",
+ "items": {
+ "type": "string"
+ },
+ "title": "Reference Video Urls",
+ "type": "array",
+ "x-order": 4
+ },
+ "resolution": {
+ "default": "768P",
+ "description": "Output resolution.",
+ "enum": [
+ "480P",
+ "768P"
+ ],
+ "title": "resolution",
+ "type": "string",
+ "x-order": 7
+ }
+ },
+ "required": [
+ "prompt"
+ ],
+ "title": "Input",
+ "type": "object"
+ },
+ "Output": {
+ "format": "uri",
+ "title": "Output",
+ "type": "string"
+ },
+ "PredictionRequest": {
+ "properties": {
+ "id": {
+ "title": "Id",
+ "type": "string"
+ },
+ "input": {
+ "properties": {
+ "duration": {
+ "default": 5,
+ "description": "Output duration in seconds.",
+ "enum": [
+ 4,
+ 5,
+ 6,
+ 7,
+ 8,
+ 9,
+ 10,
+ 11,
+ 12,
+ 13,
+ 14,
+ 15
+ ],
+ "title": "duration",
+ "type": "integer",
+ "x-order": 6
+ },
+ "first_frame_image": {
+ "description": "First frame image for video generation. The output video will have the same aspect ratio as this image.",
+ "format": "uri",
+ "nullable": true,
+ "title": "First Frame Image",
+ "type": "string",
+ "x-order": 1
+ },
+ "last_frame_image": {
+ "description": "Last frame image for video generation. The final frame of the output video will match this image.",
+ "format": "uri",
+ "nullable": true,
+ "title": "Last Frame Image",
+ "type": "string",
+ "x-order": 2
+ },
+ "prompt": {
+ "description": "Text prompt for generation",
+ "title": "Prompt",
+ "type": "string",
+ "x-order": 0
+ },
+ "ratio": {
+ "default": "16:9",
+ "description": "Output aspect ratio. Ignored for image-to-video, which uses the aspect ratio of the input image.",
+ "enum": [
+ "21:9",
+ "16:9",
+ "4:3",
+ "1:1",
+ "3:4",
+ "9:16"
+ ],
+ "title": "ratio",
+ "type": "string",
+ "x-order": 8
+ },
+ "reference_audio_urls": {
+ "default": [],
+ "description": "Public URLs for up to 3 reference audio clips.",
+ "items": {
+ "type": "string"
+ },
+ "title": "Reference Audio Urls",
+ "type": "array",
+ "x-order": 5
+ },
+ "reference_image_urls": {
+ "default": [],
+ "description": "Public URLs for up to 9 reference images.",
+ "items": {
+ "type": "string"
+ },
+ "title": "Reference Image Urls",
+ "type": "array",
+ "x-order": 3
+ },
+ "reference_video_urls": {
+ "default": [],
+ "description": "Public URLs for up to 3 reference videos.",
+ "items": {
+ "type": "string"
+ },
+ "title": "Reference Video Urls",
+ "type": "array",
+ "x-order": 4
+ },
+ "resolution": {
+ "default": "768P",
+ "description": "Output resolution.",
+ "enum": [
+ "480P",
+ "768P"
+ ],
+ "title": "resolution",
+ "type": "string",
+ "x-order": 7
+ }
+ },
+ "required": [
+ "prompt"
+ ],
+ "title": "Input",
+ "type": "object"
+ }
+ },
+ "title": "PredictionRequest",
+ "type": "object"
+ },
+ "PredictionResponse": {
+ "properties": {
+ "completed_at": {
+ "format": "date-time",
+ "title": "Completed At",
+ "type": "string"
+ },
+ "created_at": {
+ "format": "date-time",
+ "title": "Created At",
+ "type": "string"
+ },
+ "error": {
+ "title": "Error",
+ "type": "string"
+ },
+ "id": {
+ "title": "Id",
+ "type": "string"
+ },
+ "input": {
+ "properties": {
+ "duration": {
+ "default": 5,
+ "description": "Output duration in seconds.",
+ "enum": [
+ 4,
+ 5,
+ 6,
+ 7,
+ 8,
+ 9,
+ 10,
+ 11,
+ 12,
+ 13,
+ 14,
+ 15
+ ],
+ "title": "duration",
+ "type": "integer",
+ "x-order": 6
+ },
+ "first_frame_image": {
+ "description": "First frame image for video generation. The output video will have the same aspect ratio as this image.",
+ "format": "uri",
+ "nullable": true,
+ "title": "First Frame Image",
+ "type": "string",
+ "x-order": 1
+ },
+ "last_frame_image": {
+ "description": "Last frame image for video generation. The final frame of the output video will match this image.",
+ "format": "uri",
+ "nullable": true,
+ "title": "Last Frame Image",
+ "type": "string",
+ "x-order": 2
+ },
+ "prompt": {
+ "description": "Text prompt for generation",
+ "title": "Prompt",
+ "type": "string",
+ "x-order": 0
+ },
+ "ratio": {
+ "default": "16:9",
+ "description": "Output aspect ratio. Ignored for image-to-video, which uses the aspect ratio of the input image.",
+ "enum": [
+ "21:9",
+ "16:9",
+ "4:3",
+ "1:1",
+ "3:4",
+ "9:16"
+ ],
+ "title": "ratio",
+ "type": "string",
+ "x-order": 8
+ },
+ "reference_audio_urls": {
+ "default": [],
+ "description": "Public URLs for up to 3 reference audio clips.",
+ "items": {
+ "type": "string"
+ },
+ "title": "Reference Audio Urls",
+ "type": "array",
+ "x-order": 5
+ },
+ "reference_image_urls": {
+ "default": [],
+ "description": "Public URLs for up to 9 reference images.",
+ "items": {
+ "type": "string"
+ },
+ "title": "Reference Image Urls",
+ "type": "array",
+ "x-order": 3
+ },
+ "reference_video_urls": {
+ "default": [],
+ "description": "Public URLs for up to 3 reference videos.",
+ "items": {
+ "type": "string"
+ },
+ "title": "Reference Video Urls",
+ "type": "array",
+ "x-order": 4
+ },
+ "resolution": {
+ "default": "768P",
+ "description": "Output resolution.",
+ "enum": [
+ "480P",
+ "768P"
+ ],
+ "title": "resolution",
+ "type": "string",
+ "x-order": 7
+ }
+ },
+ "required": [
+ "prompt"
+ ],
+ "title": "Input",
+ "type": "object"
+ },
+ "logs": {
+ "title": "Logs",
+ "type": "string"
+ },
+ "metrics": {
+ "title": "Metrics",
+ "type": "object"
+ },
+ "output": {
+ "format": "uri",
+ "title": "Output",
+ "type": "string"
+ },
+ "started_at": {
+ "format": "date-time",
+ "title": "Started At",
+ "type": "string"
+ },
+ "status": {
+ "title": "Status",
+ "type": "string"
+ },
+ "version": {
+ "title": "Version",
+ "type": "string"
+ }
+ },
+ "title": "PredictionResponse",
+ "type": "object"
+ },
+ "Status": {
+ "description": "An enumeration.",
+ "enum": [
+ "starting",
+ "processing",
+ "succeeded",
+ "canceled",
+ "failed"
+ ],
+ "title": "Status",
+ "type": "string"
+ },
+ "ValidationError": {
+ "properties": {
+ "loc": {
+ "items": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "integer"
+ }
+ ]
+ },
+ "title": "Location",
+ "type": "array"
+ },
+ "msg": {
+ "title": "Message",
+ "type": "string"
+ },
+ "type": {
+ "title": "Error Type",
+ "type": "string"
+ }
+ },
+ "required": [
+ "loc",
+ "msg",
+ "type"
+ ],
+ "title": "ValidationError",
+ "type": "object"
+ },
+ "duration": {
+ "description": "An enumeration.",
+ "enum": [
+ 4,
+ 5,
+ 6,
+ 7,
+ 8,
+ 9,
+ 10,
+ 11,
+ 12,
+ 13,
+ 14,
+ 15
+ ],
+ "title": "duration",
+ "type": "integer"
+ },
+ "ratio": {
+ "description": "An enumeration.",
+ "enum": [
+ "21:9",
+ "16:9",
+ "4:3",
+ "1:1",
+ "3:4",
+ "9:16"
+ ],
+ "title": "ratio",
+ "type": "string"
+ },
+ "resolution": {
+ "description": "An enumeration.",
+ "enum": [
+ "480P",
+ "768P"
+ ],
+ "title": "resolution",
+ "type": "string"
+ }
+ }
+ },
+ "info": {
+ "title": "Cog",
+ "version": "0.23.1"
+ },
+ "openapi": "3.0.2",
+ "paths": {
+ "/": {
+ "get": {
+ "operationId": "root__get",
+ "responses": {
+ "200": {
+ "content": {
+ "application/json": {
+ "schema": {}
+ }
+ },
+ "description": "Successful Response"
+ }
+ },
+ "summary": "Root"
+ }
+ },
+ "/health-check": {
+ "get": {
+ "operationId": "healthcheck_health_check_get",
+ "responses": {
+ "200": {
+ "content": {
+ "application/json": {
+ "schema": {}
+ }
+ },
+ "description": "Successful Response"
+ }
+ },
+ "summary": "Healthcheck"
+ }
+ },
+ "/predictions": {
+ "post": {
+ "description": "Run a single prediction on the model",
+ "operationId": "predict_predictions_post",
+ "requestBody": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "properties": {
+ "id": {
+ "title": "Id",
+ "type": "string"
+ },
+ "input": {
+ "properties": {
+ "duration": {
+ "default": 5,
+ "description": "Output duration in seconds.",
+ "enum": [
+ 4,
+ 5,
+ 6,
+ 7,
+ 8,
+ 9,
+ 10,
+ 11,
+ 12,
+ 13,
+ 14,
+ 15
+ ],
+ "title": "duration",
+ "type": "integer",
+ "x-order": 6
+ },
+ "first_frame_image": {
+ "description": "First frame image for video generation. The output video will have the same aspect ratio as this image.",
+ "format": "uri",
+ "nullable": true,
+ "title": "First Frame Image",
+ "type": "string",
+ "x-order": 1
+ },
+ "last_frame_image": {
+ "description": "Last frame image for video generation. The final frame of the output video will match this image.",
+ "format": "uri",
+ "nullable": true,
+ "title": "Last Frame Image",
+ "type": "string",
+ "x-order": 2
+ },
+ "prompt": {
+ "description": "Text prompt for generation",
+ "title": "Prompt",
+ "type": "string",
+ "x-order": 0
+ },
+ "ratio": {
+ "default": "16:9",
+ "description": "Output aspect ratio. Ignored for image-to-video, which uses the aspect ratio of the input image.",
+ "enum": [
+ "21:9",
+ "16:9",
+ "4:3",
+ "1:1",
+ "3:4",
+ "9:16"
+ ],
+ "title": "ratio",
+ "type": "string",
+ "x-order": 8
+ },
+ "reference_audio_urls": {
+ "default": [],
+ "description": "Public URLs for up to 3 reference audio clips.",
+ "items": {
+ "type": "string"
+ },
+ "title": "Reference Audio Urls",
+ "type": "array",
+ "x-order": 5
+ },
+ "reference_image_urls": {
+ "default": [],
+ "description": "Public URLs for up to 9 reference images.",
+ "items": {
+ "type": "string"
+ },
+ "title": "Reference Image Urls",
+ "type": "array",
+ "x-order": 3
+ },
+ "reference_video_urls": {
+ "default": [],
+ "description": "Public URLs for up to 3 reference videos.",
+ "items": {
+ "type": "string"
+ },
+ "title": "Reference Video Urls",
+ "type": "array",
+ "x-order": 4
+ },
+ "resolution": {
+ "default": "768P",
+ "description": "Output resolution.",
+ "enum": [
+ "480P",
+ "768P"
+ ],
+ "title": "resolution",
+ "type": "string",
+ "x-order": 7
+ }
+ },
+ "required": [
+ "prompt"
+ ],
+ "title": "Input",
+ "type": "object"
+ }
+ },
+ "title": "PredictionRequest",
+ "type": "object"
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "properties": {
+ "completed_at": {
+ "format": "date-time",
+ "title": "Completed At",
+ "type": "string"
+ },
+ "created_at": {
+ "format": "date-time",
+ "title": "Created At",
+ "type": "string"
+ },
+ "error": {
+ "title": "Error",
+ "type": "string"
+ },
+ "id": {
+ "title": "Id",
+ "type": "string"
+ },
+ "input": {
+ "properties": {
+ "duration": {
+ "default": 5,
+ "description": "Output duration in seconds.",
+ "enum": [
+ 4,
+ 5,
+ 6,
+ 7,
+ 8,
+ 9,
+ 10,
+ 11,
+ 12,
+ 13,
+ 14,
+ 15
+ ],
+ "title": "duration",
+ "type": "integer",
+ "x-order": 6
+ },
+ "first_frame_image": {
+ "description": "First frame image for video generation. The output video will have the same aspect ratio as this image.",
+ "format": "uri",
+ "nullable": true,
+ "title": "First Frame Image",
+ "type": "string",
+ "x-order": 1
+ },
+ "last_frame_image": {
+ "description": "Last frame image for video generation. The final frame of the output video will match this image.",
+ "format": "uri",
+ "nullable": true,
+ "title": "Last Frame Image",
+ "type": "string",
+ "x-order": 2
+ },
+ "prompt": {
+ "description": "Text prompt for generation",
+ "title": "Prompt",
+ "type": "string",
+ "x-order": 0
+ },
+ "ratio": {
+ "default": "16:9",
+ "description": "Output aspect ratio. Ignored for image-to-video, which uses the aspect ratio of the input image.",
+ "enum": [
+ "21:9",
+ "16:9",
+ "4:3",
+ "1:1",
+ "3:4",
+ "9:16"
+ ],
+ "title": "ratio",
+ "type": "string",
+ "x-order": 8
+ },
+ "reference_audio_urls": {
+ "default": [],
+ "description": "Public URLs for up to 3 reference audio clips.",
+ "items": {
+ "type": "string"
+ },
+ "title": "Reference Audio Urls",
+ "type": "array",
+ "x-order": 5
+ },
+ "reference_image_urls": {
+ "default": [],
+ "description": "Public URLs for up to 9 reference images.",
+ "items": {
+ "type": "string"
+ },
+ "title": "Reference Image Urls",
+ "type": "array",
+ "x-order": 3
+ },
+ "reference_video_urls": {
+ "default": [],
+ "description": "Public URLs for up to 3 reference videos.",
+ "items": {
+ "type": "string"
+ },
+ "title": "Reference Video Urls",
+ "type": "array",
+ "x-order": 4
+ },
+ "resolution": {
+ "default": "768P",
+ "description": "Output resolution.",
+ "enum": [
+ "480P",
+ "768P"
+ ],
+ "title": "resolution",
+ "type": "string",
+ "x-order": 7
+ }
+ },
+ "required": [
+ "prompt"
+ ],
+ "title": "Input",
+ "type": "object"
+ },
+ "logs": {
+ "title": "Logs",
+ "type": "string"
+ },
+ "metrics": {
+ "title": "Metrics",
+ "type": "object"
+ },
+ "output": {
+ "format": "uri",
+ "title": "Output",
+ "type": "string"
+ },
+ "started_at": {
+ "format": "date-time",
+ "title": "Started At",
+ "type": "string"
+ },
+ "status": {
+ "title": "Status",
+ "type": "string"
+ },
+ "version": {
+ "title": "Version",
+ "type": "string"
+ }
+ },
+ "title": "PredictionResponse",
+ "type": "object"
+ }
+ }
+ },
+ "description": "Successful Response"
+ },
+ "422": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "properties": {
+ "detail": {
+ "items": {
+ "properties": {
+ "loc": {
+ "items": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "integer"
+ }
+ ]
+ },
+ "title": "Location",
+ "type": "array"
+ },
+ "msg": {
+ "title": "Message",
+ "type": "string"
+ },
+ "type": {
+ "title": "Error Type",
+ "type": "string"
+ }
+ },
+ "required": [
+ "loc",
+ "msg",
+ "type"
+ ],
+ "title": "ValidationError",
+ "type": "object"
+ },
+ "title": "Detail",
+ "type": "array"
+ }
+ },
+ "title": "HTTPValidationError",
+ "type": "object"
+ }
+ }
+ },
+ "description": "Validation Error"
+ }
+ },
+ "summary": "Predict"
+ }
+ },
+ "/predictions/{prediction_id}/cancel": {
+ "post": {
+ "operationId": "cancel_predictions__prediction_id__cancel_post",
+ "parameters": [
+ {
+ "in": "path",
+ "name": "prediction_id",
+ "required": true,
+ "schema": {
+ "title": "Prediction Id",
+ "type": "string"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "content": {
+ "application/json": {
+ "schema": {}
+ }
+ },
+ "description": "Successful Response"
+ },
+ "422": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "properties": {
+ "detail": {
+ "items": {
+ "properties": {
+ "loc": {
+ "items": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "integer"
+ }
+ ]
+ },
+ "title": "Location",
+ "type": "array"
+ },
+ "msg": {
+ "title": "Message",
+ "type": "string"
+ },
+ "type": {
+ "title": "Error Type",
+ "type": "string"
+ }
+ },
+ "required": [
+ "loc",
+ "msg",
+ "type"
+ ],
+ "title": "ValidationError",
+ "type": "object"
+ },
+ "title": "Detail",
+ "type": "array"
+ }
+ },
+ "title": "HTTPValidationError",
+ "type": "object"
+ }
+ }
+ },
+ "description": "Validation Error"
+ }
+ },
+ "summary": "Cancel"
+ }
+ }
+ }
+ },
+ "source": "https://replicate.com/minimax/h3-lite/api/schema",
+ "uses_versionless_api": true,
+ "version_created_at": "2026-10-29T19:53:34.370265Z",
+ "version_id": "df0b0d5fa519ac9fbb06d6c2c824f1f41a71d5d1836c1a8f0495705370fce500"
+}
diff --git a/tests/fuobe-animation-cloud-film.test.ts b/tests/fuobe-animation-cloud-film.test.ts
new file mode 100644
index 00000000..01ff9180
--- /dev/null
+++ b/tests/fuobe-animation-cloud-film.test.ts
@@ -0,0 +1,98 @@
+import { afterAll, beforeAll, describe, expect, it } from "vitest";
+import { keyTimes } from "@/lib/inbetween";
+import { startFakeFal, type FakeCloud } from "./helpers/fake-cloud";
+import { TINY_MP4 } from "./helpers/fake-comfy-runner";
+import { tempDir } from "./helpers/temp-dir";
+
+// Fuobe Animation's cloud film with a fal key (not demo mode), on the stand-in fal: the film is planned with its AniSora
+// LoRA, each gap is one request to fal's Wan 2.2 A14B `/lora` endpoint in the shape its OpenAPI schema takes
+// (https://fal.ai/api/openapi/queue/openapi.json?endpoint_id=fal-ai/wan/v2.2-a14b/image-to-video/lora), and the
+// clips are joined with fal's merge-videos. No real call.
+const dir = tempDir("fuobe-animation-cloud-film-");
+process.env.FUOBE_DATA_DIR = dir;
+process.env.COMFYUI_URL = "http://127.0.0.1:9";
+
+const { setSetting } = await import("@/server/settings");
+const gens = await import("@/server/generations");
+const { saveFile } = await import("@/server/storage");
+const { loraEntry } = await import("@/lib/catalog/loras");
+
+const ANISORA = loraEntry("anisora-3-2-i2v-high")!;
+const png = Buffer.from("89504e470d0a1a0a0000000d49484452000000010000000108060000001f15c4890000000d49444154789c63f8cfc0f01f0005000201a2e2b6a40000000049454e44ae426082", "hex");
+const frames = (n: number) => Array.from({ length: n }, () => saveFile({ data: png, contentType: "image/png", source: "upload" }).url);
+
+let fal: FakeCloud;
+
+beforeAll(async () => {
+ fal = await startFakeFal();
+ globalThis.__fuobeTestFalUrl = fal.url;
+ fal.keys["test-fal"] = "good";
+ fal.pollsToFinish = 1;
+ setSetting("falKey", "test-fal");
+ setSetting("demoMode", "off");
+ // Each endpoint's documented output: Wan's { video: File, prompt, seed }, merge-videos' { video: File, metadata }.
+ fal.script = (r) => {
+ const path = r.path.split("?")[0];
+ if (r.method === "GET" && path === "/files/out.mp4") return { status: 200, body: TINY_MP4.toString("latin1"), headers: { "Content-Type": "video/mp4" } };
+ if (r.method === "GET" && /^\/fal-ai\/wan\/requests\/[^/]+$/.test(path)) return { status: 200, body: { video: { url: `${fal.url}/files/out.mp4`, content_type: "video/mp4" }, prompt: "p", seed: 1 } };
+ if (r.method === "GET" && /^\/fal-ai\/ffmpeg-api\/requests\/[^/]+$/.test(path)) return { status: 200, body: { video: { url: `${fal.url}/files/out.mp4`, content_type: "video/mp4" }, metadata: {} } };
+ return null;
+ };
+});
+
+afterAll(async () => {
+ globalThis.__fuobeTestFalUrl = undefined;
+ await fal.close();
+});
+
+async function settle(id: string, ms = 40_000) {
+ const until = Date.now() + ms;
+ for (;;) {
+ const g = gens.getGeneration(id)!;
+ if (["succeeded", "failed", "canceled"].includes(g.status)) return g;
+ if (Date.now() > until) throw new Error(`timed out: ${g.status} ${g.message}`);
+ await new Promise((r) => setTimeout(r, 200));
+ }
+}
+
+describe("Fuobe Animation in the cloud with a fal key", () => {
+ it("keeps AniSora on the film: each gap goes to Wan 2.2's /lora with it, then the clips are joined", async () => {
+ const images = frames(3);
+ const timing = { gaps: [{ frames: 17, speed: 1 as const, prompt: "it lands" }, { frames: 81, speed: 1 as const }], fps: 16 as const };
+ const from = fal.log.length;
+ const [film, ...clips] = gens.createGenerations({
+ feature: "video",
+ modelId: "fuobe-animation",
+ engine: "cloud",
+ op: "keyframes",
+ prompt: "a fox leaps",
+ inputs: { images },
+ params: { aspectRatio: "16:9", resolution: "480p", seed: 42, numOutputs: 1, duration: 6, keyframeTimes: keyTimes(timing), extra: { inbetween: timing } },
+ });
+ expect(film).toMatchObject({ op: "concat", modelId: "join-clips" });
+ expect(clips.map((c) => c.op)).toEqual(["flf2v", "flf2v"]);
+ expect((await settle(film.id, 60_000)).status).toBe("succeeded");
+
+ const posts = fal.log.slice(from).filter((r) => r.method === "POST" && !r.path.startsWith("/storage"));
+ const gaps = posts.filter((r) => r.path === "/fal-ai/wan/v2.2-a14b/image-to-video/lora").map((r) => JSON.parse(r.body));
+ expect(gaps).toHaveLength(2);
+ for (const body of gaps) {
+ expect(body).toMatchObject({
+ image_url: expect.stringMatching(/^http/),
+ end_image_url: expect.stringMatching(/^http/),
+ aspect_ratio: "16:9",
+ resolution: "480p",
+ interpolator_model: "none",
+ frames_per_second: 16,
+ loras: [{ path: ANISORA.url, scale: 1, transformer: "high" }],
+ });
+ expect(typeof body.prompt).toBe("string");
+ expect(body.seed).toBe(42);
+ }
+ // Each gap's own frames: 17 and 81 (4n + 1, within the schema's 17-161).
+ expect(gaps.map((b) => b.num_frames).sort((a, b) => a - b)).toEqual([17, 81]);
+ // The join: fal's merge-videos takes the clips in order (video_urls, at least 2).
+ const join = posts.find((r) => r.path === "/fal-ai/ffmpeg-api/merge-videos");
+ expect(JSON.parse(join!.body).video_urls).toHaveLength(2);
+ }, 90_000);
+});
diff --git a/tests/h3-reference-windows-server.test.ts b/tests/h3-reference-windows-server.test.ts
new file mode 100644
index 00000000..271cc5d5
--- /dev/null
+++ b/tests/h3-reference-windows-server.test.ts
@@ -0,0 +1,134 @@
+import { afterAll, beforeAll, describe, expect, it } from "vitest";
+import { startFakeFal, type FakeCloud } from "./helpers/fake-cloud";
+import { tempDir } from "./helpers/temp-dir";
+
+/**
+ * fal's MiniMax H3 and H3 Max Turbo hold reference clips and sound to "2-15 seconds each, combined duration at most 15
+ * seconds" (reference_video_urls, reference_audio_urls; the Turbo extend's reference_audio_urls too), and the Turbo extend's
+ * clip to "up to 50 MB, aspect ratio between 0.4 and 2.5" (their queue OpenAPI, read 2026-11-06). The server reads the
+ * headers and the file size, and refuses such a run before the job is sent. Stand-in fal.ai (tests/helpers/fake-cloud.ts): no real key, no paid call.
+ */
+const dir = tempDir("fuobe-h3-reference-windows-");
+process.env.FUOBE_DATA_DIR = dir;
+delete process.env.FUOBE_PASSWORD;
+globalThis.__fuobeTestDiskFree = 1e13;
+
+const { setSetting } = await import("@/server/settings");
+const { createGenerations, getGeneration } = await import("@/server/generations");
+const { saveFile } = await import("@/server/storage");
+
+const sleep = (ms: number) => new Promise((r) => setTimeout(r, ms));
+
+/** A tiny MP4 header `seconds` long (ftyp + moov with one `width`×`height` video trak), enough for the server's header read. */
+function mp4(seconds: number, width = 1280, height = 720): Buffer {
+ const box = (type: string, ...body: Buffer[]) => {
+ const data = Buffer.concat(body);
+ const head = Buffer.alloc(8);
+ head.writeUInt32BE(8 + data.length);
+ head.write(type, 4, "latin1");
+ return Buffer.concat([head, data]);
+ };
+ const mvhd = Buffer.alloc(100);
+ mvhd.writeUInt32BE(1000, 12);
+ mvhd.writeUInt32BE(seconds * 1000, 16);
+ const tkhd = Buffer.alloc(84);
+ tkhd.writeUInt32BE(0x10000, 40);
+ tkhd.writeUInt32BE(0x10000, 56);
+ tkhd.writeUInt32BE(width << 16, 76);
+ tkhd.writeUInt32BE(height << 16, 80);
+ const mdhd = Buffer.alloc(24);
+ mdhd.writeUInt32BE(1000, 12);
+ mdhd.writeUInt32BE(seconds * 1000, 16);
+ const hdlr = Buffer.alloc(24);
+ hdlr.write("vide", 8, "latin1");
+ const trak = box("trak", box("tkhd", tkhd), box("mdia", box("mdhd", mdhd), box("hdlr", hdlr)));
+ return Buffer.concat([box("ftyp", Buffer.from("isom\0\0\0\0isomiso2mp41", "latin1")), box("moov", box("mvhd", mvhd), trak)]);
+}
+
+/** A silent 8 kHz mono WAV `seconds` long. */
+function wav(seconds: number): Buffer {
+ const data = Buffer.alloc(Math.round(seconds * 8000) * 2);
+ const h = Buffer.alloc(44);
+ h.write("RIFF", 0, "latin1");
+ h.writeUInt32LE(36 + data.length, 4);
+ h.write("WAVEfmt ", 8, "latin1");
+ h.writeUInt32LE(16, 16);
+ h.writeUInt16LE(1, 20);
+ h.writeUInt16LE(1, 22);
+ h.writeUInt32LE(8000, 24);
+ h.writeUInt32LE(16000, 28);
+ h.writeUInt16LE(2, 32);
+ h.writeUInt16LE(16, 34);
+ h.write("data", 36, "latin1");
+ h.writeUInt32LE(data.length, 40);
+ return Buffer.concat([h, data]);
+}
+
+const clip = (seconds: number, width?: number, height?: number) => saveFile({ data: mp4(seconds, width, height), contentType: "video/mp4", name: `clip-${seconds}.mp4`, source: "upload" }).url;
+const voice = (seconds: number) => saveFile({ data: wav(seconds), contentType: "audio/wav", name: `voice-${seconds}.wav`, source: "upload" }).url;
+/** An MP4 header and a free box, `bytes` long in all: the server reads the header and the file's size. */
+function bigMp4(bytes: number): Buffer {
+ const head = mp4(5);
+ const free = Buffer.alloc(bytes - head.length);
+ free.writeUInt32BE(free.length);
+ free.write("free", 4, "latin1");
+ return Buffer.concat([head, free]);
+}
+const big = (bytes: number) => saveFile({ data: bigMp4(bytes), contentType: "video/mp4", name: "big.mp4", source: "upload" }).url;
+const still = () => saveFile({ data: Buffer.from("png"), contentType: "image/png", name: "still.png", source: "upload" }).url;
+
+let fal: FakeCloud;
+beforeAll(async () => {
+ fal = await startFakeFal();
+ globalThis.__fuobeTestFalUrl = fal.url;
+ fal.keys["studio-key"] = "good";
+ setSetting("falKey", "studio-key");
+});
+afterAll(async () => {
+ globalThis.__fuobeTestFalUrl = undefined;
+ await fal.close();
+});
+
+const submitted = (endpoint: string) => fal.log.filter((r) => r.method === "POST" && r.path.split("?")[0] === `/${endpoint}`).length;
+
+/** The run's end once it fails or its job is sent. */
+async function outcome(req: Parameters<typeof createGenerations>[0], endpoint: string): Promise<{ sent: boolean; error?: string }> {
+ const before = submitted(endpoint);
+ const [g] = createGenerations({ engine: "cloud", ...req });
+ for (let i = 0; i < 400; i++) {
+ const now = getGeneration(g.id)!;
+ if (now.status === "failed") return { sent: submitted(endpoint) > before, error: now.error ?? undefined };
+ if (submitted(endpoint) > before) return { sent: true };
+ await sleep(25);
+ }
+ throw new Error("the run neither failed nor sent its job");
+}
+
+const REFS = "minimax/h3-max-turbo/reference-to-video";
+const EXTEND = "minimax/h3-max-turbo/extend-video";
+const prompt = "Image 1 is the woman; she dances to Audio 1";
+
+// Skipped until the server side lands: src/server/generations.ts handOver reads the reference clips' and the extend clip's headers and checks referenceClipsProblem, clipSizeProblem and clipBytesProblem before the job. It fails without that change.
+describe.skip("reference clips and sound outside fal's window are refused before the job is sent", () => {
+ it("H3 Max Turbo references: a clip under 2 s, clips over 15 s together, sound under 2 s", async () => {
+ const refs = (inputs: Record<string, unknown>) => ({ feature: "video", modelId: "minimax-h3-max-turbo-refs", op: "ref2v" as const, prompt, inputs });
+ expect(await outcome(refs({ images: [still()], videos: [clip(1)] }), REFS)).toEqual({ sent: false, error: expect.stringMatching(/^Reference clip 1 is 1 s, and .* needs at least 2 s/) });
+ expect(await outcome(refs({ videos: [clip(8), clip(8), clip(8)] }), REFS)).toEqual({ sent: false, error: expect.stringMatching(/reference clips add up to 24 s/) });
+ expect(await outcome(refs({ images: [still()], audios: [voice(1)] }), REFS)).toEqual({ sent: false, error: expect.stringMatching(/^Sound clip 1 is 1 s/) });
+ // Inside the window it goes as before.
+ expect(await outcome(refs({ images: [still()], videos: [clip(3), clip(3), clip(3)], audios: [voice(3), voice(3), voice(3)] }), REFS)).toEqual({ sent: true });
+ });
+
+ it("MiniMax H3 (same window on fal): sound over 15 s together", async () => {
+ const req = { feature: "video", modelId: "minimax-h3", op: "ref2v" as const, prompt, inputs: { images: [still()], audios: [voice(8), voice(8)] } };
+ expect(await outcome(req, "minimax/h3/reference-to-video")).toEqual({ sent: false, error: expect.stringMatching(/sound clips add up to 16 s/) });
+ });
+
+ it("H3 Max Turbo extend: a 3:1 clip, a clip over 50 MB, and a sound reference under 2 s", async () => {
+ const ext = (inputs: Record<string, unknown>) => ({ feature: "extend", modelId: "minimax-h3-max-turbo-extend", prompt: "She turns and walks away", inputs });
+ expect(await outcome(ext({ video: clip(5, 900, 300) }), EXTEND)).toEqual({ sent: false, error: expect.stringMatching(/2\.5:1 \(wide\), and this one is 900×300: crop it first/) });
+ expect(await outcome(ext({ video: big(51_000_000) }), EXTEND)).toEqual({ sent: false, error: expect.stringMatching(/up to 50 MB, and this one is 51 MB/) });
+ expect(await outcome(ext({ video: clip(5), audios: [voice(1)] }), EXTEND)).toEqual({ sent: false, error: expect.stringMatching(/^Sound clip 1 is 1 s/) });
+ expect(await outcome(ext({ video: clip(5), audios: [voice(3)] }), EXTEND)).toEqual({ sent: true });
+ });
+});
diff --git a/tests/h3-turbo-windows.test.ts b/tests/h3-turbo-windows.test.ts
new file mode 100644
index 00000000..38dc983e
--- /dev/null
+++ b/tests/h3-turbo-windows.test.ts
@@ -0,0 +1,67 @@
+import { describe, expect, it } from "vitest";
+import { getModel } from "@/lib/catalog";
+import { planCinema } from "@/lib/catalog/cinema";
+import { lengthRange } from "@/lib/catalog/clip-lengths";
+import { hostedInputProblem } from "@/lib/catalog/plan";
+import { clipBytesProblem, clipSizeProblem, referenceClipsProblem, referenceSeconds } from "@/lib/catalog/clip-windows";
+import { clipBlocker } from "@/lib/composer";
+
+/**
+ * What fal's MiniMax H3 and H3 Max Turbo endpoints take (their queue OpenAPI, read 2026-11-06): reference clips and sound
+ * "2-15 seconds each, combined duration at most 15 seconds"; the Turbo extend's clip "up to 50 MB, aspect ratio between 0.4
+ * and 2.5"; Turbo's text- and image-to-video any duration from 0.92 to 15 s.
+ */
+const refs = getModel("minimax-h3-max-turbo-refs")!;
+const ext = getModel("minimax-h3-max-turbo-extend")!;
+const h3 = getModel("minimax-h3")!;
+
+describe("MiniMax H3 and H3 Max Turbo windows", () => {
+ it("holds reference clips and sound to 2–15 s each and 15 s of each kind", () => {
+ for (const m of [refs, h3]) {
+ expect(referenceClipsProblem(m, "videos", [5, 3, 3])).toBeNull();
+ expect(referenceClipsProblem(m, "videos", [1])).toMatch(/^Reference clip 1 is 1 s, and .* needs at least 2 s/);
+ expect(referenceClipsProblem(m, "videos", [8, 8])).toMatch(/add up to 16 s, and .* takes 15 s of them together/);
+ expect(referenceClipsProblem(m, "audios", [16])).toMatch(/^Sound clip 1 is 16 s, and .* takes up to 15 s/);
+ expect(referenceClipsProblem(m, "audios", [undefined, 3])).toBeNull();
+ }
+ // The extend takes sound references only; its source clip has a window of its own (clipWindowProblem).
+ expect(referenceClipsProblem(ext, "audios", [1])).toMatch(/at least 2 s/);
+ expect(referenceClipsProblem(ext, "videos", [1])).toBeNull();
+ expect(referenceSeconds("minimax-h3-max-turbo")).toBeUndefined();
+ });
+
+ it("takes an extend's clip up to 50 MB and 0.4–2.5 times as wide as it is tall", () => {
+ expect(clipSizeProblem(ext, 1280, 720)).toBeNull();
+ expect(clipSizeProblem(ext, 720, 1280)).toBeNull();
+ expect(clipSizeProblem(ext, 2560, 1080)).toBeNull();
+ expect(clipSizeProblem(ext, 900, 300)).toMatch(/0\.4:1 \(tall\) to 2\.5:1 \(wide\), and this one is 900×300: crop it first/);
+ expect(clipSizeProblem(ext, 300, 900)).toMatch(/crop it first/);
+ expect(clipBytesProblem(ext, 20e6)).toBeNull();
+ expect(clipBytesProblem(ext, undefined)).toBeNull();
+ expect(clipBytesProblem(ext, 60e6)).toMatch(/up to 50 MB, and this one is 60 MB/);
+ // Other models keep what they had: Kling 4.0's frame, nothing for the references model.
+ expect(clipSizeProblem(refs, 900, 300)).toBeNull();
+ expect(clipBytesProblem(refs, 60e6)).toBeNull();
+ expect(clipSizeProblem(getModel("kling-4")!, 600, 600)).toMatch(/at least 700 px/);
+ });
+
+ it("the Extend studio stops a 3:1 clip on the Turbo extend before Generate", () => {
+ expect(clipBlocker("extend", { width: 900, height: 300, duration: 5, fps: 24 }, {}, ext, undefined)).toMatch(/crop it first/);
+ expect(clipBlocker("extend", { width: 1280, height: 720, duration: 5, fps: 24 }, {}, ext, undefined)).toBeNull();
+ });
+
+ it("Cinema asks Turbo for the seconds picked: fal takes any length up to 15 s", () => {
+ expect(lengthRange(getModel("minimax-h3-max-turbo"))).toEqual([1, 15]);
+ const take = (duration: number) =>
+ planCinema({ engine: "cloud", mode: "video", action: "generate", modelId: "minimax-h3-max-turbo", prompt: "A slow push-in on her face", settings: {}, duration } as never, {}).steps[0].request.params?.duration;
+ expect([4, 7, 9, 14, 15, 20].map(take)).toEqual([4, 7, 9, 14, 15, 15]);
+ });
+
+ // Skipped until scripts/gen-cloud-models.py gives minimax-h3 options.maxReferences 12 (a generator change).
+ it.skip("MiniMax H3 holds its references to 12 files in all, as Turbo does (fal: \"must add up to at most 12 files\")", () => {
+ const n = (k: number) => Array.from({ length: k }, (_, i) => `https://x/${i}.png`);
+ const req = { inputs: { images: n(9), videos: n(3).map((u) => u.replace(".png", ".mp4")), audios: ["https://x/a.wav"] } };
+ for (const m of [h3, refs]) expect(hostedInputProblem(m, "ref2v", "Image 1 dances", {}, req)).toMatch(/up to 12 references in all .* this run has 13: remove 1/);
+ expect(hostedInputProblem(h3, "ref2v", "Image 1 dances", {}, { inputs: { images: n(9), videos: n(3) } })).toBeNull();
+ });
+});
diff --git a/tests/h3max-lipsync-long-run.test.ts b/tests/h3max-lipsync-long-run.test.ts
new file mode 100644
index 00000000..8624b1f8
--- /dev/null
+++ b/tests/h3max-lipsync-long-run.test.ts
@@ -0,0 +1,93 @@
+import { afterAll, beforeAll, describe, expect, it, vi } from "vitest";
+import { startFakeFal, type FakeCloud } from "./helpers/fake-cloud";
+import { TINY_PNG } from "./helpers/fake-comfy-runner";
+import { tempDir } from "./helpers/temp-dir";
+
+vi.mock("next/server", async (importOriginal) => ({ ...(await importOriginal<typeof import("next/server")>()), connection: async () => {} }));
+vi.mock("next/headers", async (importOriginal) => ({ ...(await importOriginal<typeof import("next/headers")>()), cookies: async () => ({ delete: () => {}, get: () => undefined }) }));
+
+/**
+ * fal's H3 Max lip sync renders a video as long as its voice, 5 s to 15 minutes, in windows ("timings: … summed over every window
+ * this request generated"). A cancel of a job in progress only signals the runner, and "the request can still complete"
+ * (fal's queue docs, Cancel a Request: 202 CANCELLATION_REQUESTED), so it is billed. A long voice's job gets time in proportion to
+ * its length (meta.runLimitMs, set at hand-over) instead of the 45 minutes every other cloud job gets; a short one keeps 45.
+ * Against the stand-in fal.ai: no real key, no paid call.
+ */
+process.env.FUOBE_DATA_DIR = tempDir("fuobe-lipsync-long-");
+process.env.COMFYUI_URL = "http://127.0.0.1:9";
+delete process.env.FUOBE_PASSWORD;
+delete process.env.FUOBE_ENGINE_MODE;
+globalThis.__fuobeTestDiskFree = 1e13;
+
+const auth = await import("@/server/auth");
+const generationsRoute = await import("@/app/api/generations/route");
+const uploadsRoute = await import("@/app/api/uploads/route");
+const { db } = await import("@/server/db");
+const { setSetting } = await import("@/server/settings");
+
+let fal: FakeCloud;
+let cookie = "";
+beforeAll(async () => {
+ fal = await startFakeFal();
+ globalThis.__fuobeTestFalUrl = fal.url;
+ fal.keys["owner-fal"] = "good";
+ fal.pollsToFinish = Infinity;
+ setSetting("falKey", "owner-fal");
+ auth.setPassword("install password");
+ cookie = `${auth.SESSION_COOKIE}=${auth.createSession().value}`;
+});
+afterAll(async () => {
+ globalThis.__fuobeTestFalUrl = undefined;
+ globalThis.__fuobeTestDiskFree = undefined;
+ await fal.close();
+});
+
+async function upload(data: Buffer, type: string, name: string) {
+ const r = await uploadsRoute.POST(
+ new Request("http://localhost:3000/api/uploads", { method: "POST", headers: { cookie, host: "localhost:3000", "content-type": type, "x-file-name": name, "content-length": String(data.length) }, body: new Uint8Array(data) }),
+ );
+ return ((await r.json()) as { url: string }).url;
+}
+type RowT = { status: string; error: string | null; external_id: string | null };
+const row = (id: string) => db().prepare("SELECT status, error, external_id FROM generations WHERE id = ?").get(id) as RowT;
+
+/** A lip sync whose voice the composer read as `seconds` long, handed over and running at the stand-in. */
+async function lipsync(seconds: number) {
+ const body = JSON.stringify({
+ feature: "lipsync",
+ modelId: "minimax-h3-max-lipsync",
+ prompt: "",
+ inputs: { images: [await upload(TINY_PNG, "image/png", "face.png")], audio: await upload(Buffer.from("ID3voice"), "audio/mpeg", "voice.mp3") },
+ params: { resolution: "768P", sourceDuration: seconds },
+ });
+ const r = await generationsRoute.POST(new Request("http://localhost:3000/api/generations", { method: "POST", headers: { cookie, host: "localhost:3000", "content-type": "application/json", "content-length": String(Buffer.byteLength(body)) }, body }));
+ const id = ((await r.json()) as { items: { id: string }[] }).items[0].id;
+ for (let i = 0; i < 300 && !row(id).external_id; i++) await new Promise((res) => setTimeout(res, 10));
+ // Polled into IN_PROGRESS: the job has started at fal.
+ for (let i = 0; i < 3; i++) await globalThis.__fuobeRunner?.tick();
+ return id;
+}
+
+/** The job started `minutes` ago; one runner pass. */
+async function after(id: string, minutes: number) {
+ db().prepare("UPDATE generation_runs SET started_at = ? WHERE id = ?").run(Date.now() - minutes * 60_000, id);
+ await globalThis.__fuobeRunner?.tick();
+ return row(id);
+}
+
+// Skipped until the server side lands: src/server/generations.ts runningLimitMs gives a long lip sync a run limit that follows its voice's length. It fails without that change.
+describe.skip("fal's H3 Max lip sync: a long voice's render isn't cut at 45 minutes", () => {
+ it("a 10-minute voice still runs 46 minutes in, and nothing is cancelled at fal", async () => {
+ const id = await lipsync(600);
+ const r = await after(id, 46);
+ expect(r.status).toBe("running");
+ expect(fal.canceled).toEqual([]);
+ });
+
+ it("a 6-second voice keeps the 45 minutes", async () => {
+ const id = await lipsync(6);
+ const r = await after(id, 46);
+ expect(r.status).toBe("failed");
+ expect(r.error).toMatch(/Timed out after 45 minutes/);
+ });
+});
diff --git a/tests/h3max-tools-windows.test.ts b/tests/h3max-tools-windows.test.ts
new file mode 100644
index 00000000..e9e2d118
--- /dev/null
+++ b/tests/h3max-tools-windows.test.ts
@@ -0,0 +1,44 @@
+import { describe, expect, it } from "vitest";
+import { tempDir } from "./helpers/temp-dir";
+
+/**
+ * fal's H3 Max insert and lip sync, held to fal's own limits (https://fal.ai/api/openapi/queue/openapi.json?endpoint_id=
+ * minimax/h3-max/insert-video and …/lip-sync/image-to-video, read 2026-11-06): insert's duration is 5–13 s ("minimum": 5,
+ * "maximum": 13), and lip sync's audio_url is "at least 5 seconds long". Before, an API call or Assist could send a 15 s or 4 s
+ * moment, and a voice a few hundredths under 5 s passed; fal answers 422 to each. Pure functions only.
+ */
+process.env.FUOBE_DATA_DIR = tempDir("fuobe-h3max-tools-windows-");
+process.env.COMFYUI_URL = "http://127.0.0.1:9";
+
+const { getModel, getPreset } = await import("@/lib/catalog");
+const { buildPayload } = await import("@/lib/catalog/payload");
+const { planGeneration, routesFor } = await import("@/lib/catalog/plan");
+const { voiceWindowProblem } = await import("@/lib/catalog/clip-windows");
+type Req = import("@/lib/catalog/types").GenerationRequest;
+
+const CLIP = "https://example.com/a.mp4";
+
+function insertBody(duration: number) {
+ const plan = planGeneration(
+ { feature: "video-edit", modelId: "minimax-h3-max-insert", prompt: "", inputs: { video: CLIP }, params: { startTime: 2, endTime: 3, sourceDuration: 8, duration } } as Req,
+ getModel,
+ getPreset,
+ );
+ return buildPayload(routesFor(plan.model, plan.op)[0].map!, { ...plan.params, prompt: plan.prompt, video: CLIP } as never);
+}
+
+describe("H3 Max insert and lip sync: the lengths fal takes", () => {
+ it("an inserted moment is 5–13 s: a longer or shorter one is refused before it's sent", () => {
+ expect(() => insertBody(15)).toThrow("MiniMax H3 Max Insert a moment makes a new moment of 5–13 s, and this run asks for 15 s: pick a length in that range");
+ expect(() => insertBody(4)).toThrow(/5–13 s/);
+ for (const d of [5, 7.5, 13]) expect(insertBody(d).duration).toBe(d);
+ });
+
+ it("a voice under 5 s is refused, a header a few hundredths short too", () => {
+ const lip = getModel("minimax-h3-max-lipsync")!;
+ expect(voiceWindowProblem(lip, 4.99)).toBe("MiniMax H3 Max Lip Sync · up to 15 min needs at least 5 s of audio, and this is 4.99 s: use a longer recording");
+ expect(voiceWindowProblem(lip, 3)).toMatch(/at least 5 s of audio, and this is 3 s/);
+ expect(voiceWindowProblem(lip, 5)).toBeNull();
+ expect(voiceWindowProblem(lip, 900)).toBeNull();
+ });
+});
diff --git a/tests/mureka-upload-spec.test.ts b/tests/mureka-upload-spec.test.ts
new file mode 100644
index 00000000..d62fc466
--- /dev/null
+++ b/tests/mureka-upload-spec.test.ts
@@ -0,0 +1,118 @@
+/**
+ * Mureka's song tools against the stand-in fal.ai, as the official docs say they behave:
+ * - Mureka's files/upload takes an MP3 or M4A ("audio": also 10 MB at most) for a song Extend or Remix didn't make
+ * (platform.mureka.ai, POST /v1/files/upload): any other is refused before anything is sent or paid for, and one of Mureka's
+ * own songs goes by its id whatever its file is.
+ * - fal.ai never retries a synchronous run (fal.run), and marks a temporary failure with X-Fal-Needs-Retry: 1 (its sync API
+ * reference): the upload is sent again, twice at most; one marked 0 is not.
+ */
+import { afterAll, beforeAll, describe, expect, it } from "vitest";
+import { startFakeFal, type FakeCloud } from "./helpers/fake-cloud";
+import { tempDir } from "./helpers/temp-dir";
+
+process.env.FUOBE_DATA_DIR = tempDir("fuobe-mureka-upload-");
+process.env.COMFYUI_URL = "http://127.0.0.1:9";
+delete process.env.FUOBE_PASSWORD;
+globalThis.__fuobeTestDiskFree = 1e13;
+
+const { setSetting } = await import("@/server/settings");
+const { createGenerations, getGeneration } = await import("@/server/generations");
+const { saveFile } = await import("@/server/storage");
+
+/** A WAV of `seconds` at 8 kHz mono 8-bit, silent. */
+const wav = (seconds: number) => {
+ const h = Buffer.alloc(44);
+ h.write("RIFF", 0);
+ h.writeUInt32LE(36 + seconds * 8000, 4);
+ h.write("WAVEfmt ", 8);
+ h.writeUInt32LE(16, 16);
+ h.writeUInt16LE(1, 20);
+ h.writeUInt16LE(1, 22);
+ h.writeUInt32LE(8000, 24);
+ h.writeUInt32LE(8000, 28);
+ h.writeUInt16LE(1, 32);
+ h.writeUInt16LE(8, 34);
+ h.write("data", 36);
+ h.writeUInt32LE(seconds * 8000, 40);
+ return Buffer.concat([h, Buffer.alloc(seconds * 8000, 128)]);
+};
+/** An MP3 frame header repeated: 128 kbps, 44.1 kHz (418 bytes a frame, 26 ms). */
+const mp3 = (seconds: number) => {
+ const frame = Buffer.alloc(418);
+ frame.set([0xff, 0xfb, 0x90, 0x00]);
+ return Buffer.concat(Array.from({ length: Math.ceil(seconds / 0.026122) }, () => frame));
+};
+const file = (name: string, contentType: string, data: Buffer) => saveFile({ name, contentType, source: "upload", data }).url;
+
+let fal: FakeCloud;
+beforeAll(async () => {
+ fal = await startFakeFal();
+ globalThis.__fuobeTestFalUrl = fal.url;
+ fal.keys["owner-fal"] = "good";
+ setSetting("falKey", "owner-fal");
+});
+afterAll(async () => {
+ globalThis.__fuobeTestFalUrl = undefined;
+ await fal.close();
+});
+
+const uploads = () => fal.log.filter((r) => r.method === "POST" && r.path.split("?")[0] === "/mureka/api/files/upload");
+const submits = (ep: string) => fal.log.filter((r) => r.method === "POST" && r.path.split("?")[0] === `/${ep}`);
+async function run(modelId: string, audio: string, extra: Record<string, unknown>, prompt = "") {
+ const [g] = createGenerations({ feature: "song-tools", modelId, engine: "cloud", prompt, inputs: { audio }, params: { extra } } as never);
+ for (let i = 0; i < 600 && !["failed", "succeeded"].includes(getGeneration(g.id)!.status); i++) {
+ await globalThis.__fuobeRunner?.tick();
+ await new Promise((r) => setTimeout(r, 20));
+ }
+ return getGeneration(g.id)!;
+}
+
+// Skipped until the server side lands: src/lib/lyrics.ts songToolProblem, src/server/generations.ts prepSong and src/server/providers/fal.ts uploadSong (retry on X-Fal-Needs-Retry). It fails without that change.
+describe.skip("a song Mureka's files/upload takes", () => {
+ it("refuses a WAV for Extend and Remix before anything reaches fal.ai, and sends one of Mureka's own by its id", async () => {
+ fal.log.length = 0;
+ fal.script = null;
+ const extend = await run("mureka-extend", file("bed.wav", "audio/wav", wav(30)), { lyrics: "[Verse]\nmore" });
+ expect(extend.status).toBe("failed");
+ expect(extend.error).toBe("Extend takes an MP3 or M4A song: this one is a WAV file. Save it as an MP3 and add it again");
+ const remix = await run("mureka-remix", file("song.wav", "audio/wav", wav(30)), { lyrics: "[Verse]\nla" }, "jazz trio");
+ expect(remix.error).toBe("Remix takes an MP3 or M4A song: this one is a WAV file. Save it as an MP3 and add it again");
+ expect(uploads()).toEqual([]);
+ expect(fal.log.filter((r) => r.method === "POST" && !r.path.startsWith("/storage/") && !r.path.startsWith("/upload/"))).toEqual([]);
+ // One of Mureka's own (its id): no upload, whatever the file is.
+ const own = await run("mureka-extend", file("own.wav", "audio/wav", wav(30)), { lyrics: "[Verse]\nmore", songId: "song_1" });
+ expect(own.status).toBe("succeeded");
+ expect(uploads()).toEqual([]);
+ expect(JSON.parse(submits("mureka/v8/song/extend")[0].body)).toMatchObject({ song_id: "song_1", extend_at: 30000 });
+ });
+});
+
+describe.skip("fal.ai's synchronous upload", () => {
+ it("is sent again when fal.ai marks the failure temporary (X-Fal-Needs-Retry: 1), and not when it doesn't", async () => {
+ fal.log.length = 0;
+ let first = true;
+ fal.script = (r) => {
+ if (r.path.split("?")[0] !== "/mureka/api/files/upload") return null;
+ if (first) {
+ first = false;
+ return { status: 503, body: { detail: "Could not connect to runner", error_type: "runner_connection_error" }, headers: { "X-Fal-Needs-Retry": "1" } };
+ }
+ return { status: 200, body: { id: "upload_9", purpose: "audio" } };
+ };
+ const ok = await run("mureka-extend", file("song.mp3", "audio/mpeg", mp3(20)), { lyrics: "[Verse]\nmore" });
+ expect(ok.status).toBe("succeeded");
+ expect(uploads()).toHaveLength(2);
+ expect(JSON.parse(submits("mureka/v8/song/extend")[0].body)).toMatchObject({ upload_audio_id: "upload_9" });
+
+ fal.log.length = 0;
+ fal.script = (r) =>
+ r.path.split("?")[0] === "/mureka/api/files/upload"
+ ? { status: 422, body: { detail: [{ loc: ["body", "file_url"], msg: "Unsupported audio format", type: "value_error" }] }, headers: { "X-Fal-Needs-Retry": "0" } }
+ : null;
+ const refused = await run("mureka-extend", file("song2.mp3", "audio/mpeg", mp3(20)), { lyrics: "[Verse]\nmore" });
+ expect(refused.status).toBe("failed");
+ expect(refused.error).toMatch(/Unsupported audio format/);
+ expect(uploads()).toHaveLength(1);
+ fal.script = null;
+ });
+});
diff --git a/tests/provider-conformance.test.ts b/tests/provider-conformance.test.ts
new file mode 100644
index 00000000..03709a4f
--- /dev/null
+++ b/tests/provider-conformance.test.ts
@@ -0,0 +1,345 @@
+/**
+ * The hosted routes no live call has passed yet (src/lib/catalog/hosted-untested.ts) checked against the providers' own
+ * API schemas, kept in tests/fixtures/provider-schemas/ by scripts/refresh-provider-schemas.mjs (public GETs only):
+ *
+ * - Each route's request, for every setting the studio offers it (shape, size, length, the model's own controls, sound,
+ * seed, negative words, references up to the model's limits), is built by the real planner and payload builder (as
+ * fal.ts and replicate.ts submit it) and validated with ajv against the endpoint's input schema.
+ * - Each endpoint's answer, made from its output schema (its examples, else a value of each field's type), is read by
+ * the real result parser: it gives the files the run makes, of the kind the run makes, and nothing else.
+ *
+ * A provider that changes an endpoint shows up as a fixture diff when the schemas are refreshed, and here as the request
+ * or answer that no longer fits.
+ */
+import fs from "node:fs";
+import path from "node:path";
+import Ajv, { type ValidateFunction } from "ajv";
+import { describe, expect, it } from "vitest";
+import { getModel, getPreset, MODELS } from "@/lib/catalog";
+import { HOSTED_UNTESTED_ENDPOINTS, isHostedUntested } from "@/lib/catalog/hosted-untested";
+import { loraEndpointFor, routeLoraField } from "@/lib/catalog/loras";
+import { buildPayload, extractOutputs } from "@/lib/catalog/payload";
+import { planGeneration, routesFor } from "@/lib/catalog/plan";
+import { operationOutput, type GenerationRequest, type GenInput, type GenParams, type ModelDef, type ModelRoute, type Operation } from "@/lib/catalog/types";
+
+const DIR = path.join(__dirname, "fixtures/provider-schemas");
+const INDEX = JSON.parse(fs.readFileSync(path.join(DIR, "index.json"), "utf8")) as { fal: string[]; replicate: string[] };
+const fileFor = (provider: string, endpoint: string) => path.join(DIR, provider, `${endpoint.replaceAll("/", "__")}.json`);
+
+/** The parts of a JSON schema (OpenAPI 3) read here. */
+interface Schema {
+ $ref?: string;
+ examples?: unknown[];
+ example?: unknown;
+ anyOf?: Schema[];
+ oneOf?: Schema[];
+ allOf?: Schema[];
+ default?: unknown;
+ enum?: unknown[];
+ type?: string | string[];
+ properties?: Record<string, Schema>;
+ items?: Schema;
+ title?: string;
+ format?: string;
+ minimum?: number;
+}
+type Body = { content?: Record<string, { schema?: Schema }> };
+type Doc = {
+ paths?: Record<string, Record<string, { requestBody?: Body; responses?: Record<string, Body> }>>;
+ components?: { schemas?: Record<string, Schema> };
+};
+const docs = new Map<string, Doc>();
+function doc(provider: "fal" | "replicate", endpoint: string): Doc {
+ const key = `${provider}:${endpoint}`;
+ if (!docs.has(key)) {
+ const raw = JSON.parse(fs.readFileSync(fileFor(provider, endpoint), "utf8"));
+ docs.set(key, provider === "fal" ? raw : raw.openapi_schema);
+ }
+ return docs.get(key)!;
+}
+
+const refName = (s: Schema | undefined): string | undefined => (typeof s?.$ref === "string" ? s.$ref.split("/").pop() : undefined);
+
+/** The endpoint's input and output schema names (fal: the queue submit body and result; Replicate: Input and Output). */
+function schemaNames(provider: "fal" | "replicate", endpoint: string): { input: string; output: string } {
+ if (provider === "replicate") return { input: "Input", output: "Output" };
+ const d = doc(provider, endpoint);
+ const submit = d.paths?.[`/${endpoint}`]?.post;
+ const result = d.paths?.[`/${endpoint}/requests/{request_id}`]?.get;
+ const input = refName(submit?.requestBody?.content?.["application/json"]?.schema);
+ const output = refName(result?.responses?.["200"]?.content?.["application/json"]?.schema);
+ if (!input || !output) throw new Error(`${endpoint}: no input or output schema in its fixture`);
+ return { input, output };
+}
+
+// OpenAPI keywords ajv doesn't know (x-*, examples, nullable) are left to it as annotations; "uri" and other formats are
+// not checked (a run's files are URLs the provider fetches).
+const ajv = new Ajv({ strict: false, allErrors: true, validateFormats: false, validateSchema: false });
+const validators = new Map<string, ValidateFunction>();
+function validator(provider: "fal" | "replicate", endpoint: string, name: string): ValidateFunction {
+ const id = `${provider}:${endpoint}`;
+ const key = `${id}#${name}`;
+ if (!validators.has(key)) {
+ if (!ajv.getSchema(id)) ajv.addSchema({ $id: id, components: doc(provider, endpoint).components }, id);
+ validators.set(key, ajv.compile({ $ref: `${id}#/components/schemas/${name}` }));
+ }
+ return validators.get(key)!;
+}
+
+// ---------------------------------------------------------------------------
+// The runs the studio can send each route.
+
+const IMG = "https://v3b.fal.media/files/in/start.png";
+const END = "https://v3b.fal.media/files/in/end.png";
+const CLIP = "https://v3b.fal.media/files/in/clip.mp4";
+const VOICE = "https://v3b.fal.media/files/in/voice.mp3";
+const SONG = "https://v3b.fal.media/files/in/song.mp3";
+const GLB = "https://v3b.fal.media/files/in/model.glb";
+const PROMPT = "A dancer in a silver coat turns slowly under warm stage light, the camera drifting closer";
+
+type Inputs = NonNullable<GenerationRequest["inputs"]>;
+interface Variant {
+ label: string;
+ inputs: Inputs;
+ params: GenParams;
+ prompt?: string;
+ negativePrompt?: string;
+}
+
+/** What each operation's run carries (a clip's length, a song's), as the studio sends it. */
+function baseRun(model: ModelDef, op: Operation): Omit<Variant, "label"> {
+ const o = model.options;
+ const words = model.options.promptless ? undefined : PROMPT;
+ switch (op) {
+ case "i2v":
+ return { inputs: { images: [IMG] }, params: {}, prompt: words };
+ case "flf2v":
+ return { inputs: { images: [IMG], endImage: END }, params: {}, prompt: words };
+ case "ref2v":
+ return { inputs: { images: [IMG] }, params: {}, prompt: words };
+ case "avatar":
+ return { inputs: { images: [IMG], audio: VOICE }, params: { sourceDuration: 12 }, prompt: words };
+ case "relight-video":
+ // The light is a sphere picture the studio picks.
+ return { inputs: { video: CLIP, images: o.lightSphere ? ["https://v3b.fal.media/files/in/sphere.png"] : undefined }, params: { sourceDuration: 8, sourceSize: { width: 1280, height: 720 } } };
+ case "insert-moment":
+ // The new moment goes between the marks.
+ return { inputs: { video: CLIP }, params: { sourceDuration: 8, sourceSize: { width: 1280, height: 720 }, startTime: 2, endTime: 5 }, prompt: PROMPT };
+ case "extend":
+ case "bg-remove-video":
+ case "upscale-video": {
+ // A clip within the model's own window (Kandinsky VSR takes up to 5 s).
+ const seconds = Math.min(8, o.maxSourceSeconds ?? 8);
+ return { inputs: { video: CLIP }, params: { sourceDuration: seconds, sourceSize: { width: 1280, height: 720 } }, prompt: o.promptless ? undefined : PROMPT };
+ }
+ case "song-extend":
+ case "song-remix":
+ case "song-stems":
+ return { inputs: { audio: SONG }, params: { sourceDuration: 120, extra: o.lyrics?.required ? { lyrics: "[Verse]\nCity lights are calling me home" } : undefined }, prompt: op === "song-stems" ? undefined : "Warm synth-pop, female vocal" };
+ case "music":
+ return { inputs: {}, params: {}, prompt: "Warm synth-pop with a driving bass line" };
+ case "enhance-voice":
+ return { inputs: { audio: VOICE }, params: { sourceDuration: 12 } };
+ case "bg-remove":
+ case "splat":
+ case "image-to-3d":
+ return { inputs: { images: [IMG] }, params: {}, prompt: op === "bg-remove" && o.guided ? "the person" : undefined };
+ case "retexture-3d":
+ return { inputs: { model3d: GLB }, params: {}, prompt: "Weathered bronze with green patina" };
+ default:
+ return { inputs: {}, params: {}, prompt: words };
+ }
+}
+
+/** Every value of every control (cartesian, small), so each quality picks its own route. */
+function controlCombos(model: ModelDef): Record<string, string | number>[] {
+ let combos: Record<string, string | number>[] = [{}];
+ for (const c of model.options.controls ?? []) combos = combos.flatMap((x) => c.values.map((v) => ({ ...x, [c.param]: v })));
+ return combos;
+}
+
+/** The settings the studio offers, one at a time off the model's defaults, under each control combination. */
+function variants(model: ModelDef, op: Operation): Variant[] {
+ const o = model.options;
+ const base = baseRun(model, op);
+ const out: Variant[] = [];
+ for (const extra of controlCombos(model)) {
+ const tag = Object.entries(extra).map(([k, v]) => `${k}=${v}`).join(",");
+ const add = (label: string, change: Partial<Variant> & { params?: GenParams } = {}) =>
+ out.push({
+ ...base,
+ ...change,
+ label: [tag, label].filter(Boolean).join(" "),
+ inputs: { ...base.inputs, ...change.inputs },
+ params: { ...base.params, ...change.params, extra: { ...base.params.extra, ...extra, ...change.params?.extra } },
+ });
+ add("defaults");
+ for (const a of o.aspectRatios ?? []) add(`aspect ${a}`, { params: { aspectRatio: a } });
+ for (const r of o.resolutions ?? []) add(`resolution ${r}`, { params: { resolution: r } });
+ for (const d of o.durations ?? []) add(`duration ${d}`, { params: { duration: d } });
+ if (o.audio) for (const on of [true, false]) add(`audio ${on}`, { params: { generateAudio: on } });
+ if (o.seed) add("seed", { params: { seed: 1234567 } });
+ if (o.negativePrompt) add("negative words", { negativePrompt: "blur, flicker" });
+ for (const s of o.sliders ?? []) for (const v of [s.min, s.max]) add(`${s.param} ${v}`, { params: { extra: { [s.param]: v } } });
+ if (op === "ref2v") {
+ const imgs = Math.min(o.maxImages ?? 1, 3);
+ const vids = Math.min(o.maxVideos ?? 0, 3);
+ const auds = Math.min(o.maxAudios ?? 0, 3);
+ if (imgs > 1) add(`${imgs} pictures`, { inputs: { images: Array.from({ length: imgs }, (_, i) => `https://v3b.fal.media/files/in/ref${i}.png`) } });
+ if (vids) add(`${vids} clips`, { inputs: { videos: Array.from({ length: vids }, (_, i) => `https://v3b.fal.media/files/in/ref${i}.mp4`) } });
+ if (auds) add(`${auds} voices`, { inputs: { audios: Array.from({ length: auds }, (_, i) => `https://v3b.fal.media/files/in/voice${i}.mp3`) } });
+ }
+ if (op === "extend" && o.maxAudios) add("voices", { inputs: { audios: [VOICE] } });
+ if (op === "retexture-3d") add("style picture", { inputs: { images: [IMG] }, prompt: undefined });
+ }
+ return out;
+}
+
+/** The body fal.ts or replicate.ts would send for this route (their submit: LoRA field, LoRA endpoint, a song uploaded first). */
+function request(route: ModelRoute, input: GenInput): { endpoint: string; body: Record<string, unknown> } {
+ const map = { ...route.map, loras: routeLoraField(route) };
+ const body = buildPayload(map, input);
+ const song = map.songSource;
+ if (song && body[song.songId] === undefined) body[song.uploadId] = "mureka-upload-id";
+ return { endpoint: loraEndpointFor({ ...route, map }, input.loras).split(":")[0], body };
+}
+
+/** The input the server hands the adapter (generations.ts handOver), files already uploaded. */
+function genInput(plan: ReturnType<typeof planGeneration>, v: Variant): GenInput {
+ // A song extended at its end (or, before its start, at 0) unless the run says where, as handOver sets it.
+ const extendAt = plan.op === "song-extend" && plan.params.startTime === undefined ? (plan.params.extra?.extend_type === "head" ? 0 : plan.params.sourceDuration) : undefined;
+ return {
+ ...plan.params,
+ ...(extendAt !== undefined && { startTime: extendAt }),
+ prompt: plan.prompt || undefined,
+ negativePrompt: v.negativePrompt,
+ images: v.inputs.images ?? [],
+ endImage: v.inputs.endImage,
+ video: v.inputs.video,
+ audio: v.inputs.audio,
+ videos: v.inputs.videos ?? [],
+ audios: v.inputs.audios ?? [],
+ model3d: v.inputs.model3d,
+ loras: plan.loras,
+ };
+}
+
+const errorsOf = (fn: ValidateFunction) => (fn.errors ?? []).map((e) => `${e.instancePath || "/"} ${e.message}${e.params && "allowedValues" in e.params ? ` ${JSON.stringify(e.params.allowedValues)}` : ""}`);
+
+// ---------------------------------------------------------------------------
+// The routes.
+
+const untested: { model: ModelDef; op: Operation; route: ModelRoute }[] = MODELS.flatMap((model) =>
+ model.routes.filter((r) => isHostedUntested(model.id, r)).map((route) => ({ model, op: route.op, route })),
+);
+
+describe("provider conformance: the untested hosted routes", () => {
+ it("keeps a schema for every untested endpoint and every endpoint they switch to", () => {
+ const kept = new Set([...INDEX.fal.map((e) => `fal:${e}`), ...INDEX.replicate.map((e) => `replicate:${e}`)]);
+ const needed = new Set<string>();
+ for (const { route } of untested) {
+ needed.add(`${route.provider}:${route.endpoint.split(":")[0]}`);
+ if (route.loraEndpoint) needed.add(`${route.provider}:${route.loraEndpoint.split(":")[0]}`);
+ if (route.map?.songSource) needed.add(`fal:${route.map.songSource.upload.endpoint}`);
+ }
+ for (const e of HOSTED_UNTESTED_ENDPOINTS) expect([...needed].some((n) => n.endsWith(`:${e}`)), `${e} is listed but no route uses it`).toBe(true);
+ expect([...needed].filter((n) => !kept.has(n))).toEqual([]);
+ for (const k of kept) expect(fs.existsSync(fileFor(k.split(":")[0], k.slice(k.indexOf(":") + 1))), k).toBe(true);
+ });
+
+ for (const { model, op, route } of untested) {
+ const provider = route.provider as "fal" | "replicate";
+ const name = `${model.id} ${op} → ${provider} ${route.endpoint}`;
+ // A chained route is never sent itself: its steps go to the routes it names (Fuobe Animation's film: one
+ // start-and-end-frame run per gap on the flf2v route, checked below, then a join).
+ if (route.chained) continue;
+
+ it(`${name}: every request the studio sends fits the input schema`, () => {
+ const problems: string[] = [];
+ let checked = 0;
+ for (const v of variants(model, op)) {
+ const req: GenerationRequest = { feature: model.kind, modelId: model.id, op, prompt: v.prompt, negativePrompt: v.negativePrompt, inputs: v.inputs, params: v.params };
+ let plan: ReturnType<typeof planGeneration>;
+ try {
+ plan = planGeneration(req, getModel, getPreset);
+ } catch (e) {
+ problems.push(`${v.label}: refused before sending (${(e as Error).message})`);
+ continue;
+ }
+ // The variant's route (a quality control picks Kandinsky's Pro or Lite endpoint): only this one is checked here.
+ if (!routesFor(model, plan.op, plan.params).includes(route)) continue;
+ const { endpoint, body } = request(route, genInput(plan, v));
+ const fn = validator(provider, endpoint, schemaNames(provider, endpoint).input);
+ checked++;
+ if (!fn(body)) problems.push(`${v.label} → ${endpoint} ${JSON.stringify(body)}: ${errorsOf(fn).join("; ")}`);
+ }
+ expect(problems, problems.join("\n")).toEqual([]);
+ expect(checked).toBeGreaterThan(0);
+ });
+
+ it(`${name}: its documented answer reads as the run's result`, () => {
+ const names = schemaNames(provider, route.endpoint.split(":")[0]);
+ const d = doc(provider, route.endpoint.split(":")[0]);
+ const answer = provider === "replicate" ? replicateAnswer(route.endpoint.split(":")[0], d) : exampleOf(d.components?.schemas?.[names.output], d);
+ // Stems come back as one zip (Mureka's zip_url), which fal.ts unpacks into one result per stem.
+ if (op === "song-stems") return expect(typeof (answer as { zip_url?: unknown })?.zip_url).toBe("string");
+ const outs = extractOutputs(answer, op);
+ const want = operationOutput(op, model.kind);
+ expect(outs.length, JSON.stringify(answer)).toBeGreaterThan(0);
+ expect(outs.map((o) => `${o.kind} ${o.url}`), JSON.stringify(answer)).toEqual(outs.map((o) => `${want} ${o.url}`));
+ });
+ }
+});
+
+// ---------------------------------------------------------------------------
+// Answers made from the output schemas.
+
+/** Replicate's example prediction's output (the model page's own), else one made from the Output schema. */
+function replicateAnswer(model: string, d: Doc): unknown {
+ const raw = JSON.parse(fs.readFileSync(fileFor("replicate", model), "utf8"));
+ return raw.example_prediction?.output ?? exampleOf(d.components?.schemas?.Output, d);
+}
+
+const EXT: Record<string, string> = { image: "png", video: "mp4", audio: "mp3", model3d: "glb" };
+const MIME: Record<string, string> = { image: "image/png", video: "video/mp4", audio: "audio/mpeg", model3d: "model/gltf-binary" };
+
+/**
+ * A value for a schema: its own example where it has one, else one of its type. Every optional field is filled too (a
+ * still fal may send beside the video is part of the answer), flags are false, and a file with no example gets a URL with
+ * the extension its title or field name suggests.
+ */
+function exampleOf(schema: Schema | undefined, d: Doc, key = "", depth = 0): unknown {
+ if (!schema || depth > 12) return undefined;
+ if (Array.isArray(schema.examples) && schema.examples.length) return schema.examples[0];
+ if (schema.example !== undefined) return schema.example;
+ const ref = refName(schema);
+ if (ref) return exampleOf(d.components?.schemas?.[ref], d, key, depth + 1);
+ const branch = schema.anyOf ?? schema.oneOf;
+ if (branch) return exampleOf(branch.find((b) => b.type !== "null") ?? branch[0], d, key, depth + 1);
+ if (schema.allOf) return Object.assign({}, ...schema.allOf.map((s) => exampleOf(s, d, key, depth + 1)));
+ if (schema.default !== undefined && schema.default !== null) return schema.default;
+ if (Array.isArray(schema.enum)) return schema.enum[0];
+ const type = Array.isArray(schema.type) ? schema.type.find((t) => t !== "null") : schema.type;
+ if (type === "object" || schema.properties) {
+ const props = Object.entries(schema.properties ?? {}).map(([k, s]) => [k, exampleOf(s, d, k, depth + 1)] as const);
+ const obj: Record<string, unknown> = Object.fromEntries(props.filter(([, v]) => v !== undefined));
+ // A file object with no example of its own (fal's shared File and Image schemas carry a PNG's name and type as their
+ // fields' examples): a file of the kind its field name or title says, with a URL, name and type to match.
+ if ("url" in (schema.properties ?? {})) {
+ const words = `${key} ${schema.title ?? ""}`;
+ const kind = /video/i.test(words) ? "video" : /audio|song|stem|vocal|track|voice/i.test(words) ? "audio" : /image|cover|thumb|picture/i.test(words) ? "image" : "model3d";
+ obj.url = `https://v3b.fal.media/files/out/${key || "file"}.${EXT[kind]}`;
+ if ("file_name" in obj) obj.file_name = `${key || "file"}.${EXT[kind]}`;
+ if ("content_type" in obj) obj.content_type = MIME[kind];
+ }
+ return obj;
+ }
+ if (type === "array") {
+ const item = exampleOf(schema.items, d, key, depth + 1);
+ return item === undefined ? [] : [item];
+ }
+ if (type === "boolean") return false;
+ if (type === "integer" || type === "number") return schema.minimum ?? 1;
+ if (type === "string") return /url|uri/i.test(key) || schema.format === "uri" ? `https://v3b.fal.media/files/out/${key}.bin` : "text";
+ return undefined;
+}
diff --git a/tests/replicate-public-links.test.ts b/tests/replicate-public-links.test.ts
new file mode 100644
index 00000000..f2da0521
--- /dev/null
+++ b/tests/replicate-public-links.test.ts
@@ -0,0 +1,93 @@
+import { afterAll, beforeAll, beforeEach, describe, expect, it } from "vitest";
+import { startFakeFal, startFakeReplicate, type FakeCloud } from "./helpers/fake-cloud";
+import { tempDir } from "./helpers/temp-dir";
+
+/**
+ * Replicate's H3 Lite and HighSpeed read their reference lists as plain text ("Public URLs for up to 9 reference images",
+ * items with no uri format: replicate.com/minimax/h3-lite/api, read 2026-11-06). Replicate passes them on as they are, so a
+ * data: URI or a Files API link (api.replicate.com/v1/files/…, which needs the token) can't be read by the model. Stand-ins
+ * only: no key, no paid call.
+ */
+
+process.env.FUOBE_DATA_DIR = tempDir("fuobe-replicate-public-links-");
+delete process.env.FUOBE_PASSWORD;
+globalThis.__fuobeTestDiskFree = 1e13;
+
+const { setSetting } = await import("@/server/settings");
+const { saveFile } = await import("@/server/storage");
+const gens = await import("@/server/generations");
+type Req = import("@/lib/catalog/types").GenerationRequest;
+
+let rep: FakeCloud;
+let fal: FakeCloud;
+beforeAll(async () => {
+ rep = await startFakeReplicate();
+ fal = await startFakeFal();
+ globalThis.__fuobeTestReplicateUrl = rep.url;
+ globalThis.__fuobeTestFalUrl = fal.url;
+ rep.keys["r8_standin"] = "good";
+ fal.keys["fal_standin"] = "good";
+ setSetting("replicateToken", "r8_standin");
+ setSetting("cloudProvider", "replicate");
+ setSetting("demoMode", "off");
+});
+afterAll(async () => {
+ globalThis.__fuobeTestReplicateUrl = undefined;
+ globalThis.__fuobeTestFalUrl = undefined;
+ await rep.close();
+ await fal.close();
+});
+beforeEach(() => {
+ rep.log.length = 0;
+ fal.log.length = 0;
+ rep.pollsToFinish = Infinity;
+});
+
+const png = (bytes: number) => Buffer.concat([Buffer.from("89504e470d0a1a0a0000000d49484452000002000000020008060000007a7a1a6a", "hex"), Buffer.alloc(Math.max(0, bytes - 33), 1)]);
+const mp4 = (bytes: number) => Buffer.concat([Buffer.from("000000186674797069736f6d", "hex"), Buffer.alloc(bytes - 12, 0)]);
+
+async function settle(id: string) {
+ for (let i = 0; i < 400; i++) {
+ const g = gens.getGeneration(id)!;
+ if (rep.log.some((r) => r.method === "POST" && r.path.endsWith("/predictions"))) return g;
+ if (!["queued", "running"].includes(g.status)) return g;
+ await new Promise((r) => setTimeout(r, 25));
+ }
+ return gens.getGeneration(id)!;
+}
+
+const refsRun = (): Req => ({
+ feature: "video",
+ modelId: "minimax-h3-lite",
+ prompt: "Image 1 dances under warm light",
+ engine: "cloud",
+ inputs: { images: [saveFile({ data: png(200_000), contentType: "image/png", source: "upload" }).url], videos: [saveFile({ data: mp4(1_500_000), contentType: "video/mp4", source: "upload" }).url] },
+} as Req);
+
+// Skipped until the server side lands: FieldMap.publicLinks from scripts/gen-cloud-models.py and src/server/providers/replicate.ts prepareFile sending public links. It fails without that change.
+describe.skip("H3 Lite references on Replicate go as public links", () => {
+ it("with a fal.ai key, each reference file goes to fal's storage and its public link is sent", async () => {
+ setSetting("falKey", "fal_standin");
+ const [g] = gens.createGenerations(refsRun());
+ await settle(g.id);
+ const post = rep.log.find((r) => r.method === "POST" && r.path === "/v1/models/minimax/h3-lite/predictions");
+ expect(post).toBeTruthy();
+ const input = JSON.parse(post!.body).input;
+ for (const u of [...input.reference_image_urls, ...input.reference_video_urls]) {
+ expect(u.startsWith("data:")).toBe(false);
+ expect(u).not.toMatch(/\/v1\/files\//);
+ expect(u.startsWith(`${fal.url}/files/`)).toBe(true);
+ }
+ expect(rep.log.some((r) => r.path === "/v1/files")).toBe(false);
+ await gens.cancelGeneration(g.id).catch(() => {});
+ });
+
+ it("with no fal.ai key, the run stops before its job, saying why", async () => {
+ setSetting("falKey", "");
+ const [g] = gens.createGenerations(refsRun());
+ const done = await settle(g.id);
+ expect(rep.log.some((r) => r.method === "POST" && r.path.endsWith("/predictions"))).toBe(false);
+ expect(done.status).toBe("failed");
+ expect(done.error).toMatch(/public web links/);
+ });
+});
diff --git a/tests/untested-routes-spec.test.ts b/tests/untested-routes-spec.test.ts
new file mode 100644
index 00000000..0e8eea4b
--- /dev/null
+++ b/tests/untested-routes-spec.test.ts
@@ -0,0 +1,54 @@
+import { describe, expect, it } from "vitest";
+import { getModel, getPreset } from "@/lib/catalog";
+import { referenceVoiceProblem } from "@/lib/catalog/clip-windows";
+import { extractOutputs } from "@/lib/catalog/payload";
+import { planGeneration } from "@/lib/catalog/plan";
+import type { GenerationRequest } from "@/lib/catalog/types";
+
+/**
+ * Hosted routes held to their providers' documented requests and answers (tests/fixtures/provider-schemas):
+ * - fal's Vidu Q4 returns `cover_image` beside its video ("Cover image of the generated video"): one result, the video.
+ * - fal's Wan 2.2 echoes `prompt` next to the video: words that look like a link are never a second result.
+ * - fal's H3 Max insert returns `source`, the clip that went in: never a result.
+ * - Replicate's H3 Lite and HighSpeed: "Reference audio needs to be combined with a reference image or video".
+ * - fal's Vidu Q4 reference voices: "3-12 seconds each".
+ */
+describe("results the hosted routes answer with", () => {
+ const video = { url: "https://v3b.fal.media/files/b/out.mp4", content_type: "video/mp4" };
+
+ it("Vidu Q4's cover still is not a second result", () => {
+ const answer = { video, cover_image: { url: "https://v3b.fal.media/files/b/cover.png", content_type: "image/png", width: 1024, height: 576 }, seed: 7 };
+ for (const op of ["i2v", "ref2v"] as const) expect(extractOutputs(answer, op).map((o) => [o.kind, o.url])).toEqual([["video", video.url]]);
+ });
+
+ it("an echoed prompt that is only a link is not a result", () => {
+ const answer = { video, prompt: "https://looks-like-a-url.example/start.png", negative_prompt: "https://x.example/n.jpg", seed: 5 };
+ expect(extractOutputs(answer, "i2v").map((o) => o.url)).toEqual([video.url]);
+ });
+
+ it("H3 Max insert's source clip is not a result", () => {
+ const answer = { video, source: { url: "https://v3b.fal.media/files/in/clip.mp4", width: 1280, height: 720, fps: 24, duration: 8 }, seed: 1 };
+ expect(extractOutputs(answer, "insert-moment").map((o) => o.url)).toEqual([video.url]);
+ expect(extractOutputs(answer, "extend").map((o) => o.url)).toEqual([video.url]);
+ });
+});
+
+describe("references the hosted routes take", () => {
+ const run = (modelId: string, inputs: GenerationRequest["inputs"]) => () =>
+ planGeneration({ feature: "video", modelId, op: "ref2v", prompt: "Image 1 walks along the shore", inputs, params: {} }, getModel, getPreset);
+
+ it("H3 Lite and HighSpeed refuse sound clips with no picture or clip beside them", () => {
+ for (const id of ["minimax-h3-lite", "minimax-h3-highspeed"]) {
+ expect(run(id, { audios: ["https://x.example/voice.mp3"] })).toThrow(/uses sound clips together with a reference picture or clip: add one of those too/);
+ expect(run(id, { images: ["https://x.example/a.png"], audios: ["https://x.example/voice.mp3"] })).not.toThrow();
+ expect(run(id, { videos: ["https://x.example/a.mp4"], audios: ["https://x.example/voice.mp3"] })).not.toThrow();
+ }
+ });
+
+ it("Vidu Q4 holds each reference voice to 3–12 s", () => {
+ const vidu = getModel("vidu-q4")!;
+ expect(referenceVoiceProblem(vidu, 2, 1)).toMatch(/at least 3 s, and Voice 1 is 2 s/);
+ expect(referenceVoiceProblem(vidu, 14, 2)).toMatch(/up to 12 s, and Voice 2 is 14 s/);
+ for (const s of [3, 7.5, 12]) expect(referenceVoiceProblem(vidu, s)).toBeNull();
+ });
+});
diff --git a/tests/vidu-reference-voices-run.test.ts b/tests/vidu-reference-voices-run.test.ts
new file mode 100644
index 00000000..3aad4083
--- /dev/null
+++ b/tests/vidu-reference-voices-run.test.ts
@@ -0,0 +1,85 @@
+import { afterAll, beforeAll, beforeEach, describe, expect, it } from "vitest";
+import { PNG_DATA_URI, startFakeFal, type CloudRequest, type FakeCloud } from "./helpers/fake-cloud";
+import { tempDir } from "./helpers/temp-dir";
+
+/**
+ * Vidu Q4's reference voices on fal: "up to 3 mp3 reference audio clips (3-12 seconds each, max 50 MB)" (fal's OpenAPI schema
+ * for fal-ai/vidu/q4/reference-to-video, read 2026-11-06). A voice outside that is refused from its header before anything is
+ * sent to fal, in Fuobe's words; one inside goes. Against the stand-in fal (tests/helpers/fake-cloud.ts): no key, no paid call.
+ */
+const dir = tempDir("fuobe-vidu-voices-");
+process.env.FUOBE_DATA_DIR = dir;
+process.env.COMFYUI_URL = "http://127.0.0.1:9";
+delete process.env.FUOBE_PASSWORD;
+globalThis.__fuobeTestDiskFree = 1e13;
+
+const gens = await import("@/server/generations");
+const { setSetting } = await import("@/server/settings");
+const { db } = await import("@/server/db");
+
+let fal: FakeCloud;
+beforeAll(async () => {
+ fal = await startFakeFal();
+ globalThis.__fuobeTestFalUrl = fal.url;
+ fal.keys["owner-fal"] = "good";
+ setSetting("falKey", "owner-fal");
+});
+afterAll(async () => {
+ globalThis.__fuobeTestFalUrl = undefined;
+ globalThis.__fuobeTestDiskFree = undefined;
+ await fal.close();
+});
+beforeEach(() => {
+ db().prepare("UPDATE generations SET status = 'canceled' WHERE status IN ('queued', 'running')").run();
+ fal.log.length = 0;
+});
+
+/** A constant-rate MP3 (MPEG-1 Layer III, 128 kbps, 44.1 kHz) `seconds` long, as a data URI: its header says the length. */
+const mp3 = (seconds: number) => {
+ const b = Buffer.alloc(Math.round((seconds * 128_000) / 8));
+ Buffer.from([0xff, 0xfb, 0x90, 0x44]).copy(b, 0);
+ return `data:audio/mpeg;base64,${b.toString("base64")}`;
+};
+
+async function settle(id: string, ms = 15_000) {
+ const end = Date.now() + ms;
+ for (;;) {
+ await globalThis.__fuobeRunner?.tick();
+ const g = gens.getGeneration(id, { includeDeleted: true })!;
+ if (!["queued", "running"].includes(g.status) || Date.now() > end) return g;
+ await new Promise((r) => setTimeout(r, 15));
+ }
+}
+const submits = (log: CloudRequest[]) => log.filter((r) => r.method === "POST" && r.path.split("?")[0] === "/fal-ai/vidu/q4/reference-to-video");
+
+const run = (voices: string[]) =>
+ gens.createGenerations({
+ feature: "video",
+ modelId: "vidu-q4",
+ engine: "cloud",
+ op: "ref2v",
+ prompt: "[@reference_image_1] turns to the camera and speaks in the voice of [reference_audio_1]",
+ inputs: { images: [PNG_DATA_URI], audios: voices },
+ } as import("@/lib/catalog/types").GenerationRequest)[0];
+
+// Skipped until the server side lands: src/server/generations.ts handOver reads each reference voice's header and checks referenceVoiceProblem before the job. It fails without that change.
+describe.skip("Vidu Q4's reference voices", () => {
+ it("refuses a voice shorter than 3 s or longer than 12 s before anything is sent to fal", async () => {
+ for (const [voices, words] of [
+ [[mp3(2)], "Vidu Q4 needs voice clips of at least 3 s, and Voice 1 is 2 s: use a longer one"],
+ [[mp3(5), mp3(14)], "Vidu Q4 takes voice clips up to 12 s, and Voice 2 is 14 s: trim it first"],
+ ] as const) {
+ const g = await settle(run([...voices]).id);
+ expect(g.status).toBe("failed");
+ expect(g.error).toContain(words);
+ expect(submits(fal.log)).toHaveLength(0);
+ }
+ });
+
+ it("sends voices of 3 to 12 s", async () => {
+ await settle(run([mp3(3), mp3(12)]).id);
+ const sent = submits(fal.log);
+ expect(sent).toHaveLength(1);
+ expect((JSON.parse(sent[0].body) as { reference_audio_urls: string[] }).reference_audio_urls).toHaveLength(2);
+ });
+});