The all-in-one local AI studio for your desktop: chat, image and video generation and a coding agent in one free, open source app. Windows and Linux. No Docker, no terminal, no cloud required.
TypeScript agentai-chatai-studioall-in-onecoding-agentdesktop-appfluximage-generationlinuxllmlocal-ailocal-llmopen-sourceprivacyself-hostedstable-diffusionuncensoreduncensored-aivideo-generationwindows
feat(create): bring the 39 open-family studio models and tier marks to the desktop cloud mode
purple751df30edd9c
diff --git a/e2e/create-model-tiers.spec.ts b/e2e/create-model-tiers.spec.tsnew file mode 100644index 00000000..048aea0a--- /dev/null+++ b/e2e/create-model-tiers.spec.ts@@ -0,0 +1,82 @@+import { test, expect, type Page } from '@playwright/test'+import { tauriMockInit, DEFAULT_ASSISTANT_REPLY, DEFAULT_MODEL_NAME, type TauriMockOptions } from './support/tauri-mock'+import { routeCloud, seedOnboardingDone, signInViaGate, cloudSwitch, type CloudScenario } from './support/cloud-mock'++/**+ * 02.10.2026: der Modellwaehler im Create-Tab ordnet nach Stufe und nennt die+ * Herkunft, und der Desktop bricht nicht an einem Server, der beides nicht+ * liefert.+ *+ * (a) Server mit `tier`/`weights`: "Best" steht oben und traegt die Marke,+ * "Open weights" und "Open family" stehen daneben, die aelteren Modelle+ * stehen gesammelt unter "Older models". Die Marken stehen NUR in der+ * aufgeklappten Liste: nichts davon im oder ueber dem Prompt-Eingabefeld+ * und nichts am geschlossenen Waehler.+ * (b) Server von heute (keine der beiden Angaben, kein FLUX 3): jede Zeile+ * steht neutral da, keine Marke, keine Zwischenzeile, das neue Modell+ * fehlt.+ */++const OPTS: TauriMockOptions = {+ assistantReply: DEFAULT_ASSISTANT_REPLY,+ modelName: DEFAULT_MODEL_NAME,+ platform: 'windows',+}++async function bootIntoCloudCreate(page: Page, scenario: CloudScenario) {+ await page.addInitScript(tauriMockInit, OPTS)+ await seedOnboardingDone(page)+ await routeCloud(page, scenario)+ await page.goto('/')+ await expect(cloudSwitch(page)).toBeVisible({ timeout: 20_000 })+ await signInViaGate(page)+ await expect(cloudSwitch(page)).toBeChecked({ timeout: 20_000 })+ await page.getByRole('button', { name: /^Create$/ }).click()+ await page.getByRole('radio', { name: 'Image', exact: true }).click()+}++const picker = (page: Page) => page.locator('button[aria-haspopup="listbox"]').first()++test('server with tiers: Best on top with its mark, Older models collected below, marks only in the open list', async ({ page }) => {+ await bootIntoCloudCreate(page, { license: 'active', access: true, mediaLive: true, tierCatalog: true })+ await expect(picker(page)).toBeVisible({ timeout: 15_000 })++ // Closed: no mark anywhere, least of all around the prompt field.+ await expect(page.getByText('Best', { exact: true })).toHaveCount(0)+ await expect(page.getByText('Open weights', { exact: true })).toHaveCount(0)+ await expect(page.getByText('Older models', { exact: true })).toHaveCount(0)++ await picker(page).click()+ const list = page.locator('.lu-elevated')+ await expect(list).toBeVisible()+ const names = await list.locator('button').evaluateAll((btns) => btns.map((b) => b.querySelector('.truncate')?.textContent ?? ''))+ // Z-Image Turbo and FLUX 3 are best, the two Flux models are older and go last.+ expect(names.slice(0, 2).sort()).toEqual(['FLUX 3', 'Z-Image Turbo (fast)'])+ expect(names.slice(-2)).toEqual(['Flux Schnell (fast)', 'Flux Dev (quality)'])+ await expect(list.getByText('Older models', { exact: true })).toHaveCount(1)+ await expect(list.getByText('Best', { exact: true })).toHaveCount(2)+ await expect(list.getByText('Open family', { exact: true })).toHaveCount(1)+ await expect(list.getByText('Open weights', { exact: true })).toHaveCount(3)++ // The prompt field and everything above it stay free of marks.+ const prompt = page.locator('textarea').first()+ await expect(prompt).toBeVisible()+ const around = await prompt.evaluate((el) => (el.closest('.rounded-\\[var\\(--radius-panel\\)\\]') ?? el.parentElement)?.textContent ?? '')+ expect(around).not.toMatch(/Best|Open weights|Open family|Older models/)++ await page.keyboard.press('Escape')+ await expect(list).toBeHidden()+})++test('server of today: every row stands neutral, no mark, no Older models row, no new model', async ({ page }) => {+ await bootIntoCloudCreate(page, { license: 'active', access: true, mediaLive: true })+ await expect(picker(page)).toBeVisible({ timeout: 15_000 })+ await picker(page).click()+ const list = page.locator('.lu-elevated')+ await expect(list).toBeVisible()+ const names = await list.locator('button').evaluateAll((btns) => btns.map((b) => b.querySelector('.truncate')?.textContent ?? ''))+ expect(names).toEqual(['Flux Schnell (fast)', 'Flux Dev (quality)'])+ for (const mark of ['Best', 'Open weights', 'Open family', 'Older models']) {+ await expect(list.getByText(mark, { exact: true })).toHaveCount(0)+ }+})diff --git a/e2e/support/cloud-mock.ts b/e2e/support/cloud-mock.tsindex 9ae5846f..2af4b326 100644--- a/e2e/support/cloud-mock.ts+++ b/e2e/support/cloud-mock.ts@@ -51,6 +51,13 @@ export interface CloudScenario {* (both collapse to the identical client-side message).*/studioQuoteStatus?: 200 | 404 | 'unreachable'+ /**+ * 02.10.2026: the catalog of a server that ships `tier` and `weights` on+ * every entry plus a Studio image model (FLUX 3). Leaving it unset+ * reproduces the server of today: no entry carries either field, and the+ * pickers must stand there neutral (no mark, no "Older models" row).+ */+ tierCatalog?: boolean}// P9: one Studio model, shaped like a real /api/jobs/catalog entry once P0's@@ -165,8 +172,8 @@ export async function routeCloud(page: Page, scenario: CloudScenario): Promise<vreturn route.fulfill(json(200, {models: [- { id: 'flux-schnell', label: 'Flux Schnell (fast)', kind: 'image', edit: false, cfg: true, negative_prompt: false, credits: { base: 300 } },- { id: 'flux-dev', label: 'Flux Dev (quality)', kind: 'image', edit: true, cfg: true, negative_prompt: false, credits: { base: 1200 } },+ { id: 'flux-schnell', label: 'Flux Schnell (fast)', kind: 'image', edit: false, cfg: true, negative_prompt: false, credits: { base: 300 }, ...(scenario.tierCatalog ? { tier: 'older', weights: 'open' } : {}) },+ { id: 'flux-dev', label: 'Flux Dev (quality)', kind: 'image', edit: true, cfg: true, negative_prompt: false, credits: { base: 1200 }, ...(scenario.tierCatalog ? { tier: 'older', weights: 'open' } : {}) },{id: 'wan-2.2-720p', label: 'Wan 2.2 720p', kind: 'video', edit: false, cfg: false, negative_prompt: true,// dd29f359: clip.durations/credits.by_duration let a model book@@ -188,6 +195,10 @@ export async function routeCloud(page: Page, scenario: CloudScenario): Promise<v{ id: 'wan-2.2-spicy-extend', label: 'Wan 2.2 Spicy Extend', kind: 'video', ops: ['extend'], t2v: false, i2v: false, adult: true, credits: { base: 15000 } },{ id: 'wan-2.2-animate', label: 'Wan 2.2 Animate', kind: 'video', ops: ['motion'], t2v: false, i2v: false, credits: { base: 12000 } },...(scenario.studioCatalog ? [STUDIO_CATALOG_MODEL] : []),+ ...(scenario.tierCatalog+ ? [{ id: 'z-image-turbo', label: 'Z-Image Turbo (fast)', kind: 'image' as const, edit: false, cfg: false, negative_prompt: false, credits: { base: 300 }, tier: 'best', weights: 'open' },+ { id: 'flux-3', label: 'FLUX 3', kind: 'image' as const, ops: ['studio'], quote_required: true, tier: 'best', weights: 'open-family' }]+ : []),],ops: { removebg: 1000, eraser: 2500, upscale_image: 1000, upscale_video_per_s: 500, upscale_video_min: 2500 },voice: { stt: 600, tts_per_1k_chars: 8000 },diff --git a/src/api/cloud/studio.ts b/src/api/cloud/studio.tsindex efd74c01..eb9c2638 100644--- a/src/api/cloud/studio.ts+++ b/src/api/cloud/studio.ts@@ -62,13 +62,18 @@ export async function studioQuote(model: string,prompt: string,params: StudioQuoteParams,+ /** Vorab-Preis vor dem Hochladen (02.10.2026): nur die ZAHL der Bilder, nie+ * eine Adresse. Ein Server, der das Feld nicht kennt, ignoriert es; der+ * Aufrufer sendet es darum nur an einen Server, der Stufen fuehrt (also+ * neu genug ist), siehe useStudioPrice. */+ quoteImages?: number,): Promise<StudioQuoteResult> {let res: Responsetry {res = await cloudFetch('/api/jobs/studio-quote', {method: 'POST',headers: { 'content-type': 'application/json' },- body: JSON.stringify({ model, prompt, params }),+ body: JSON.stringify({ model, prompt, params, ...(quoteImages ? { quote_images: quoteImages } : {}) }),})} catch (err) {if (err instanceof CloudJobError && err.status !== 0) throw errdiff --git a/src/components/create/experimental/Composer.tsx b/src/components/create/experimental/Composer.tsxindex 002cbd94..5c0ae5e6 100644--- a/src/components/create/experimental/Composer.tsx+++ b/src/components/create/experimental/Composer.tsx@@ -7,14 +7,14 @@ import { useCreateExp } from './CreateContext'import { intentToJob } from '../../../lib/render/cloud-jobs'import { meterState } from '../../../lib/render/credits-meter'import {+ useCloudCatalogStore,cloudModelById,defaultCloudModel,- defaultEditModel,- isEditCapable,+ editNeedsMask,modelForOp,runCredits,} from '../../../stores/cloudCatalogStore'-import { intentRequiredInputs, intentRoles, isStudioModel, resolveIntentPick } from '../../../lib/render/create-studio'+import { intentPickerModels, intentRequiredInputs, intentRoles, isStudioModel, resolveIntentPick } from '../../../lib/render/create-studio'import { STUDIO_MODELS } from '../../../lib/render/studio-contract'import { effectiveVideoDurations, snapToVideoDuration } from '../../../lib/render/video-duration'import { mediaSeconds, useStudioPrice } from './useStudioPrice'@@ -73,6 +73,10 @@ export function Composer({ onOpenAdvanced, onOpenWorkflows }: Props) {const musicDuration = useCreateStore((s) => s.musicDuration)const managerNoticeSeen = useWorkflowStore((s) => s.managerNoticeSeen)const { generate, cancel, quota } = useCreateExp()+ // Der Katalog kommt vom Server und kann nach dem ersten Zeichnen eintreffen:+ // die Waehler und die Studio-Wahl unten lesen ihn, also zeichnet dieser+ // Abonnent den Composer neu, sobald er sich aendert.+ useCloudCatalogStore((s) => s.models)// The Create button turns into Cancel in place — a double-click's second// press would instantly cancel the run it just started. Ignore cancel@@ -109,15 +113,15 @@ export function Composer({ onOpenAdvanced, onOpenWorkflows }: Props) {// representative per-kind number and would mis-gate utility ops / pricier// models.// Studio-Spur (Portplan Abschnitt 3d): ein DRITTER Zweig, strikt hinter- // `backend === 'cloud'`. Nur die vier Rollen-Absichten (lipsync/music/- // extend/motion, intentRoles(intent), P2) koennen ueberhaupt ein- // Studio-Modell fahren; character-use bleibt bei seiner festen- // -lora-Familie (resolveCharacterModel) und ruehrt Studio nie an. Auf der- // lokalen Spur ist `studioPick` immer undefined, und ausschliesslich das- // haelt useStudioPrice unten von jedem Netzabruf ab.+ // `backend === 'cloud'`. Die Rollen-Absichten (lipsync/music/extend/motion/+ // upscale, intentRoles(intent)) fahren ein Studio-Modell aus ihrer Rolle;+ // seit 02.10.2026 koennen auch Image, Edit, Video und Animate eines fahren+ // (Web-Paritaet), die Wahl kommt dort durch modelForOp. character-use bleibt+ // bei seiner festen -lora-Familie (resolveCharacterModel) und ruehrt Studio+ // nie an. Auf der lokalen Spur ist `studioPick` immer undefined, und+ // ausschliesslich das haelt useStudioPrice unten von jedem Netzabruf ab.const roleIntent = backend === 'cloud' && !characterUse && intentRoles(intent).length > 0const rolePick = roleIntent ? resolveIntentPick(intent, cloudOpModel) : undefined- const studioPick = rolePick && isStudioModel(rolePick) ? rolePick : undefinedconst pickedModel = characterUse? (resolveCharacterModel(selectedCharacter?.family ?? '', cloudOpModel) ?? ''): roleIntent@@ -126,13 +130,18 @@ export function Composer({ onOpenAdvanced, onOpenWorkflows }: Props) {? cloudOpModel: (intentKind === 'video' ? cloudVideoModel : cloudImageModel) ||defaultCloudModel(intentKind)?.id || ''+ // Dieselbe Aufloesung wie Waehler, Zaehler und Start (modelForOp): eine Wahl,+ // die die Unterkategorie nicht fahren kann, rechnet hier als das Modell, das+ // wirklich laeuft. Rollen-Absichten behalten ihre Wahl.+ const runModel = roleIntent ? (rolePick ?? '') : modelForOp(intentKind, intentOp, pickedModel)// A Studio pick runs on its own schema-driven endpoint (studioBaseCredits /// studioQuote), not on the classic per-kind picker's kind.+ const studioPick = backend === 'cloud' && !characterUse && isStudioModel(runModel) ? runModel : undefinedconst runKind = studioPick ? STUDIO_MODELS[studioPick].kind : intentKindconst runSeconds =intentOp === 'music'? musicDuration- : runKind === 'video' && (intentOp === 'generate' || intentOp === 'animate') && fps > 0+ : runKind === 'video' && !studioPick && (intentOp === 'generate' || intentOp === 'animate') && fps > 0? frames / fps: undefined// Die im Browser gemessene Laenge einer angehaengten Datei, gebraucht nur von den@@ -189,6 +198,7 @@ export function Composer({ onOpenAdvanced, onOpenWorkflows }: Props) {useEffect(() => {setCloudStudioCredits(studioPrice?.credits ?? null)}, [studioPrice?.credits, setCloudStudioCredits])+ const showUpscalePicker = backend === 'cloud' && meta.id === 'upscale' && intentPickerModels(intent).length > 1const costFallback = quota?.costs[runKind === 'audio' ? 'image' : runKind] ?? 0// The exact rule the meter chip renders, so the button can never invite a run// the chip is already refusing. Credits alone were not enough: a user out of@@ -206,16 +216,12 @@ export function Composer({ onOpenAdvanced, onOpenWorkflows }: Props) {runKind,intentOp,).kind === 'ok')- // Match useCloudCreate's submit-time edit fallback so the Neg gate reflects- // the model the run actually uses, not a t2i model still in the picker.- const runModel =- intentOp === 'edit' && !isEditCapable(pickedModel) ? (defaultEditModel()?.id ?? pickedModel) : pickedModel// The hosted endpoints only honour negative_prompt for a few families —// hide the toggle (and the collapsed field) where it would be silently// dropped, like the other dead knobs on cloud.const negSupported = backend !== 'cloud' || cloudModelById(runModel)?.negative_prompt === true// R5-66: see maskGate.ts for the full rule and why 'edit' differs from Web.- const needsMask = needsMaskFor(intent, backend, cloudModelById(runModel)?.maskless)+ const needsMask = needsMaskFor(intent, backend, !editNeedsMask(runModel))// Per-intent readiness for the 2.5.8 categories (mirrors the submit-time// checks of BOTH lanes so the button never invites a doomed run). The// local lanes always speak from a portrait (no hosted resync endpoints)@@ -391,7 +397,7 @@ export function Composer({ onOpenAdvanced, onOpenWorkflows }: Props) {{studioPick && studioPrice?.error && (<span className="t-control text-red-300">{studioPrice.error}</span>)}- {meta.id === 'upscale' && (+ {meta.id === 'upscale' && !studioPick && (<Tooltip content="Target resolution for the upscale pass."><div><Segmented@@ -422,13 +428,13 @@ export function Composer({ onOpenAdvanced, onOpenWorkflows }: Props) {</div></Tooltip>)}- {!isUtility && (- <>- <ModelChip />- <Tooltip content="All advanced settings. Sampler, seed, LoRA, VAE and more.">- <Button variant="ghost" size="sm" icon={SlidersHorizontal} iconOnly onClick={onOpenAdvanced} title="Advanced settings" />- </Tooltip>- </>+ {/* Enhance Image fuehrt ein Waehler nur, wenn es etwas zu waehlen+ gibt: der feste Standard allein ist kein Modell. */}+ {(!isUtility || showUpscalePicker) && <ModelChip />}+ {(!isUtility || studioPick) && (+ <Tooltip content="All advanced settings. Sampler, seed, LoRA, VAE and more.">+ <Button variant="ghost" size="sm" icon={SlidersHorizontal} iconOnly onClick={onOpenAdvanced} title="Advanced settings" />+ </Tooltip>)}{isGenerating ? (<Button variant="danger" size="md" icon={X} onClick={guardedCancel}>Cancel</Button>@@ -504,6 +510,7 @@ function LaneControls() {const setCloudFps = useCreateStore((s) => s.setCloudFps)const videoModel = useCreateStore((s) => s.videoModel)const cloudVideoModel = useCreateStore((s) => s.cloudVideoModel)+ const cloudImageModel = useCreateStore((s) => s.cloudImageModel)const base = MODEL_TYPE_DEFAULTS[imageModelType]?.steps ?? 25const qSteps = { Draft: Math.round(base * 0.6), Standard: base, High: Math.round(base * 1.5) }@@ -552,6 +559,13 @@ function LaneControls() {}}, [backend, kind, specialOp, cloudVideoSeconds, cloudFrames, cloudFps, setCloudFrames, setCloudFps])+ // Ein Studio-Modell bringt Format, Laenge und Qualitaet in seinem eigenen+ // Schema mit (die Schublade mit den Einstellungen). Die Regler hier schickten+ // Werte, die sein Endpunkt nicht liest, also stehen sie dort nicht.+ const laneKind = meta.isVideo ? 'video' : 'image'+ const lanePicked = (laneKind === 'video' ? cloudVideoModel : cloudImageModel) || defaultCloudModel(laneKind)?.id || ''+ if (backend === 'cloud' && !characterUse && !specialOp && isStudioModel(modelForOp(laneKind, cloudVideoOp, lanePicked))) return null+if (characterTrain) return null// ── Image lanes: quality + aspect (+ edit strength) ──diff --git a/src/components/create/experimental/CreateExperimental.tsx b/src/components/create/experimental/CreateExperimental.tsxindex 74539171..ad7b3b63 100644--- a/src/components/create/experimental/CreateExperimental.tsx+++ b/src/components/create/experimental/CreateExperimental.tsx@@ -37,8 +37,8 @@ const PresetWorkshop = lazy(() =>import('./PresetWorkshop').then((m) => ({ default: m.PresetWorkshop })),)import { INTENT_MAP, isIntentAvailable } from './intents'-import { intentRoles, isStudioModel, resolveIntentPick } from '../../../lib/render/create-studio'-import { modelForOp } from '../../../stores/cloudCatalogStore'+import { studioPickFor } from '../../../lib/render/create-studio'+import { modelForOp, useCloudCatalogStore } from '../../../stores/cloudCatalogStore'import { stageShowsSetupCard, laneModelCount } from './stageGate'import { isMlxImageHost } from '../../../api/mlx-image'import { fetchGalleryItemBlob } from './galleryUrl'@@ -84,16 +84,18 @@ function CreateExperimentalInner() {// Composer.tsx, kept in sync by hand (both read the same store getters and// pure functions, no new state).const intent = useCreateStore((s) => s.intent())- const characterTab = useCreateStore((s) => s.characterTab)const cloudOpModel = useCreateStore((s) => s.cloudOpModel)- // characterUse never resolves to a Studio pick (Composer.tsx: roleIntent- // excludes it outright, character-use stays on its fixed -lora family via- // resolveCharacterModel), so this derivation does not need- // selectedCharacter at all.- const characterUse = intent === 'character' && characterTab === 'use'- const roleIntent = backend === 'cloud' && !characterUse && intentRoles(intent).length > 0- const rolePick = roleIntent ? resolveIntentPick(intent, cloudOpModel) : undefined- const studioPick = rolePick && isStudioModel(rolePick) ? rolePick : undefined+ const cloudImageModel = useCreateStore((s) => s.cloudImageModel)+ const cloudVideoModel = useCreateStore((s) => s.cloudVideoModel)+ // Der Katalog kommt vom Server; die Studio-Wahl liest ihn, also zeichnet sich+ // diese Flaeche neu, sobald er eintrifft.+ useCloudCatalogStore((s) => s.models)+ // Seit 02.10.2026 faehrt nicht nur eine Rollen-Absicht ein Studio-Modell,+ // sondern auch Image, Edit, Video und Animate (Web-Paritaet). Eine Funktion+ // traegt die Regel fuer Composer, Zaehler, Start und diese Schublade; der+ // Character-Weg bleibt davon ausgenommen. Auf der lokalen Spur gibt es nie+ // eine Studio-Wahl.+ const studioPick = backend === 'cloud' ? studioPickFor(intent, { cloudImageModel, cloudVideoModel, cloudOpModel }) : undefinedconst [shownId, setShownId] = useState<string | null>(null)const [advancedOpen, setAdvancedOpen] = useState(false)diff --git a/src/components/create/experimental/CreditsMeter.tsx b/src/components/create/experimental/CreditsMeter.tsxindex 3e30968a..efecef98 100644--- a/src/components/create/experimental/CreditsMeter.tsx+++ b/src/components/create/experimental/CreditsMeter.tsx@@ -1,8 +1,8 @@import { useCreateStore } from '../../../stores/createStore'import { useCreateExp } from './CreateContext'import { intentToJob } from '../../../lib/render/cloud-jobs'-import { defaultCloudModel, resolveOpPick, runCredits } from '../../../stores/cloudCatalogStore'-import { createStudioCost, intentRoles, isStudioModel, resolveIntentPick } from '../../../lib/render/create-studio'+import { defaultCloudModel, modelForOp, resolveOpPick, runCredits } from '../../../stores/cloudCatalogStore'+import { createStudioCost, intentRoles, isStudioModel, resolveIntentPick, startImageCount } from '../../../lib/render/create-studio'import { STUDIO_MODELS } from '../../../lib/render/studio-contract'import { resolveCharacterModel } from '../../../hooks/useCloudCreate'import { meterState } from '../../../lib/render/credits-meter'@@ -63,7 +63,6 @@ export function CreditsMeter() {op === 'music' || op === 'tts' || op === 'lora-train'const roleIntent = !characterUse && intentRoles(intent).length > 0const rolePick = roleIntent ? resolveIntentPick(intent, cloudOpModel) : undefined- const studioPick = rolePick && isStudioModel(rolePick) ? rolePick : undefinedconst picked = characterUse? (resolveCharacterModel(selectedCharacter?.family ?? '', cloudOpModel) ?? ''): roleIntent@@ -71,6 +70,13 @@ export function CreditsMeter() {: special? resolveOpPick(op, cloudOpModel): (kind === 'video' ? cloudVideoModel : cloudImageModel) || defaultCloudModel(kind)?.id || ''+ // Dieselbe Aufloesung wie Composer und Start (modelForOp): eine Wahl, die die+ // Unterkategorie nicht fahren kann, rechnet hier als das Modell, das wirklich+ // laeuft. Rollen-Absichten und der Character-Weg behalten ihre Wahl.+ const model = roleIntent || characterUse ? picked : modelForOp(kind, op, picked)+ // Ein Studio-Modell rechnet nach seinem eigenen Schema, auch aus Image, Edit,+ // Video und Animate (seit 02.10.2026).+ const studioPick = !characterUse && isStudioModel(model) ? model : undefinedif (studioPick) kind = STUDIO_MODELS[studioPick].kindconst seconds =op === 'music'@@ -84,7 +90,7 @@ export function CreditsMeter() {// (useStudioPrice) and leaves it here; this chip never asks twice for the// same figure.const cost = studioPick- ? cloudStudioCredits ?? createStudioCost(studioPick, cloudStudioOptions, Array.from(prompt).length)+ ? cloudStudioCredits ?? createStudioCost(studioPick, cloudStudioOptions, Array.from(prompt).length, undefined, startImageCount(studioPick) ?? 1): runCredits(kind, op, picked, seconds, quota.costs[kind === 'audio' ? 'image' : kind], targetResolution)const remaining = quota.remaining.creditsconst limit = quota.limits.creditsdiff --git a/src/components/create/experimental/ModelChip.tsx b/src/components/create/experimental/ModelChip.tsxindex 019d7e8b..e99e915b 100644--- a/src/components/create/experimental/ModelChip.tsx+++ b/src/components/create/experimental/ModelChip.tsx@@ -1,7 +1,10 @@import { useCreateStore } from '../../../stores/createStore'import {- useCloudCatalogStore, cloudModelById, defaultCloudModel, opPickerModels, modelCostHint, isEditModel, shortCount,+ useCloudCatalogStore, cloudModelById, defaultCloudModel, opPickerModels, modelCostHint, shortCount,+ editCapableModels, animatePickerModels, videoPickerModels, studioOnlyImageModels,} from '../../../stores/cloudCatalogStore'+import { DEFAULT_MODEL_IDS } from '../../../lib/render/cloud-models'+import { sortByTier, tierGroup, tierMarks } from '../../../lib/render/model-tier'import { intentPickerModels, intentRoles, createStudioCost, isStudioModel } from '../../../lib/render/create-studio'import { resolveCharacterModel, characterGenerationModels } from '../../../hooks/useCloudCreate'import type { RenderOp } from '../../../lib/render/cloud-jobs'@@ -20,16 +23,15 @@ import { resolveLocalOpPick, videoLaneModels } from '../../../api/comfyui'// this only prices each row, since a PresetModel carries no `credits` field.function pickerCostHint(m: PresetModel, musicDuration: number): string | undefined {const classic = cloudModelById(m.id)- if (classic) return modelCostHint(classic, m.op as RenderOp, m.op === 'music' ? musicDuration : undefined)- if (isStudioModel(m.id)) {- // No options chosen yet (this is the picker row, not the run), so use the- // model's own baseline preview, same figure studio-contract.ts's- // studioBaseCredits() would compute, just inlined to avoid a second- // import for one call site.- const cr = createStudioCost(m.id, {}, 100)- return `${shortCount(cr)} cr`- }- return undefined+ if (classic && !isStudioModel(m.id)) return modelCostHint(classic, m.op as RenderOp, m.op === 'music' ? musicDuration : undefined)+ return studioCostHint(m.id)+}++/** A Studio row prices from its own schema: no options chosen yet (this is the+ * picker row, not the run), so the model's own baseline preview, the same+ * figure studio-contract.ts's studioBaseCredits() would compute. */+function studioCostHint(id: string): string | undefined {+ return isStudioModel(id) ? `${shortCount(createStudioCost(id, {}, 100))} cr` : undefined}const CLOUD_BADGE = { label: 'Cloud', color: 'bg-violet-500/15 text-violet-500 dark:text-violet-200' }@@ -99,14 +101,18 @@ function CloudModelChip() {// user's choice was a lie. Edit needs masked-img2img (flux-dev); Animate needs// i2v; Video needs t2v (absent flag = capable, so today's dual-capable fleet// lists in full, and a future t2v-only model that sets i2v:false is excluded).+ //+ // 02.10.2026 (Web-Paritaet): Edit, Video und Animate fuehren hinter den+ // klassischen Modellen die Studio-Modelle, die der Server kennt (siehe+ // cloudCatalogStore.studioEntries); Image fuehrt die Studio-Bildmodelle, die+ // in keinem klassischen Eintrag stehen. R5-58: Edit sieht auch die op-+ // spezialisierten Endpunkte (qwen-image-edit hat `ops: ['edit']`).const list =- // R5-58: `m.edit` alone missed the 2.5.8 op-specialized edit endpoints- // (qwen-image-edit carries `ops: ['edit']`, not `edit: true`), so the- // picker never offered a model the catalog genuinely served.- intent === 'edit' ? models.filter((m) => m.kind === 'image' && isEditModel(m))- : intent === 'animate' ? models.filter((m) => m.kind === 'video' && m.i2v !== false)- : intent === 'video' ? models.filter((m) => m.kind === 'video' && m.t2v !== false)+ intent === 'edit' ? editCapableModels()+ : intent === 'animate' ? animatePickerModels()+ : intent === 'video' ? videoPickerModels(): intent === 'character' && !characterUse ? opPickerModels('lora-train')+ : kind === 'image' ? [...models.filter((m) => m.kind === 'image' && !m.ops), ...studioOnlyImageModels()]: models.filter((m) => m.kind === kind && !m.ops)const current = characterUse? (resolveCharacterModel(selectedCharacter?.family ?? '', cloudOpModel) ?? '')@@ -116,9 +122,12 @@ function CloudModelChip() {// Reflect the model the run will really use, so a leftover pick the current op// can't perform doesn't show as "selected".const roleOrCharacterIds = roleIntent ? roleModels : characterModels+ // Faellt die Wahl heraus, gilt das Standardmodell dieser Unterkategorie (wie in+ // modelForOp), und erst dahinter der erste Eintrag.+ const standard = intent === 'edit' ? DEFAULT_MODEL_IDS.edit : intent === 'animate' ? DEFAULT_MODEL_IDS.animate : (defaultCloudModel(kind)?.id ?? '')const value = roleIntent || characterUse? (roleOrCharacterIds.some((m) => m.id === current) ? current : (roleOrCharacterIds[0]?.id ?? current))- : list.some((m) => m.id === current) ? current : (list[0]?.id ?? current)+ : list.some((m) => m.id === current) ? current : list.some((m) => m.id === standard) ? standard : (list[0]?.id ?? current)// The op this picker's models will run as, so the sublabel prices correctly// (a trainer bills a training run, not an image).@@ -129,31 +138,40 @@ function CloudModelChip() {: intent === 'music' ? 'music': intent === 'extend' ? 'extend': intent === 'motion' ? 'motion'+ : intent === 'upscale' ? 'upscale': intent === 'edit' ? 'edit': intent === 'animate' ? 'animate': 'generate'const options: SelectOption[] = roleIntent- ? roleModels.map((m) => ({+ ? sortByTier(roleModels).map((m) => ({value: m.id,label: m.label,sublabel: pickerCostHint(m, musicDuration),+ group: tierGroup(m),+ tags: tierMarks(m),badge: m.adult? { label: 'No refusals', color: contentPolicy === 'off' ? NO_REFUSALS_COLOR.open : NO_REFUSALS_COLOR.filtering }: CLOUD_BADGE,})): characterUse- ? characterModels.map((m) => ({+ ? sortByTier(characterModels).map((m) => ({value: m.id,label: m.label,sublabel: modelCostHint(m, 'generate', undefined),+ group: tierGroup(m),+ tags: tierMarks(m),badge: m.adult? { label: 'No refusals', color: contentPolicy === 'off' ? NO_REFUSALS_COLOR.open : NO_REFUSALS_COLOR.filtering }: CLOUD_BADGE,}))- : list.map((m) => ({+ : sortByTier(list).map((m) => ({value: m.id,label: m.label,- sublabel: modelCostHint(m, op, op === 'music' ? musicDuration : undefined),+ sublabel: isStudioModel(m.id) ? studioCostHint(m.id) : modelCostHint(m, op, op === 'music' ? musicDuration : undefined),+ // Beste oben, Aeltere gesammelt unten unter einer Zwischenzeile, nichts+ // verschwindet. Die Marken stehen nur in der aufgeklappten Liste.+ group: tierGroup(m),+ tags: tierMarks(m),// adult models keep the standard Cloud badge everywhere EXCEPT the row// itself, where "No refusals" is strictly more informative, matching web.badge: m.adultdiff --git a/src/components/create/experimental/PresetWorkshop.tsx b/src/components/create/experimental/PresetWorkshop.tsxindex 90fb7b1c..1bb15638 100644--- a/src/components/create/experimental/PresetWorkshop.tsx+++ b/src/components/create/experimental/PresetWorkshop.tsx@@ -4,6 +4,7 @@ import { CREATE_PRESETS, type CreatePreset } from '../../../lib/render/create-primport { STUDIO_MODELS, studioFields, studioSchema, studioOptions, studioPreviewCredits, supportsProviderField } from '../../../lib/render/studio-contract'import { classicCredits, modelHint, presetModel, presetModels, requiredRoleInputs, roleInputs, rolePrompts, roleHasChoice } from '../../../lib/render/preset-models'import { promptIdeas } from '../../../lib/render/prompt-ideas'+import { sortByTier, tierGroup, tierMarks } from '../../../lib/render/model-tier'import { humanRuntime, type ModelRuntime } from '../../../lib/render/runtime-format'import { selectedVideoSeconds, videoDurations } from '../../../lib/render/video-duration'import { studioQuote, modelRuntimes, StudioQuoteChangedError } from '../../../api/cloud/studio'@@ -354,7 +355,7 @@ export function PresetWorkshop({preset,onClose,onGenerate}:{preset:CreatePreset;{model&&studioSchema(step.model).properties?.prompt?.enum?<select className={fieldClass} aria-label="Visual style" disabled={busy} value={prompt} onChange={e=>setPrompt(e.target.value)} ><option value="">Choose a visual style…</option>{studioSchema(step.model).properties!.prompt.enum!.map(v=><option key={String(v)}>{String(v)}</option>)}</select>:<textarea aria-label="Preset prompt" disabled={busy||!!result} maxLength={4000} rows={2} value={prompt} onChange={e=>setPrompt(e.target.value)} placeholder={raw.role==='speech'?'What should your character say?':raw.role==='soundtrack'?'Describe the sounds you want…':raw.role==='animate'||raw.role==='extend'?'Describe the movement…':raw.role==='edit'?'Describe the new setting…':'Describe your scene…'} className="w-full resize-none bg-transparent t-control text-gray-200 outline-none placeholder:text-gray-400"/>}<div className="mt-2 flex flex-wrap items-center justify-between gap-2 md:flex-nowrap md:gap-3"><div className="flex min-w-0 items-center gap-2">{roleHasChoice(raw.role,preset.adult)&&!result- ?<Select size="sm" ariaLabel="Model" className="max-w-[220px]" value={step.model} onChange={choose} options={alternatives.map(m=>({value:m.id,label:m.label}))}/>+ ?<Select size="sm" ariaLabel="Model" className="max-w-[220px]" value={step.model} onChange={choose} options={sortByTier(alternatives).map(m=>({value:m.id,label:m.label,group:tierGroup(m),tags:tierMarks(m)}))}/>:<span className="truncate rounded-md border border-white/[0.08] px-2 py-1 t-micro text-gray-300">{choice.label} <span className="ml-2 text-gray-400">Cloud</span></span>}{ideas.length>0&&!result&&<Select size="sm" ariaLabel="Prompt ideas" className="max-w-[160px]" placeholder="+ Prompt idea" value="" onChange={v=>{const idea=ideas.find(i=>i.label===v);if(idea)setPrompt(t=>t.trim()?`${t.trim()}, ${idea.text}`:idea.text)}} options={ideas.map(i=>({value:i.label,label:i.label}))}/>}</div>diff --git a/src/components/create/experimental/__tests__/model-chip-tiers.test.tsx b/src/components/create/experimental/__tests__/model-chip-tiers.test.tsxnew file mode 100644index 00000000..ba8f10c7--- /dev/null+++ b/src/components/create/experimental/__tests__/model-chip-tiers.test.tsx@@ -0,0 +1,201 @@+// @vitest-environment jsdom+/**+ * Die Modellwaehler der Cloud ordnen nach Stufe und nennen die Herkunft.+ *+ * 02.10.2026, Entscheid von David: "Best" steht oben und traegt eine kleine+ * Marke, aeltere Modelle stehen gesammelt unten unter "Older models", nichts+ * wird versteckt. Die Herkunft steht dezent daneben ("Open weights"), sobald+ * die Familie offene Gewichte hat.+ *+ * Desktop: der Katalog kommt vom Server. Die Faelle laufen gegen den Katalog+ * des neuen Servers (mit Stufe, Herkunft und den neuen Modellen) und gegen den+ * des alten (ohne beides): dort steht jede Zeile neutral da, ohne Marke und+ * ohne Zwischenzeile, in der gewohnten Reihenfolge.+ *+ * Harte Regel: KEIN Hinweis, keine Marke, kein Text im oder ueber dem+ * Prompt-Eingabefeld. Die Marken gehoeren in die aufgeklappten Modellwaehler+ * und nirgends sonst hin; die letzten Faelle halten das am Quelltext fest.+ */+import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest'+import { cleanup, fireEvent, render, screen } from '@testing-library/react'+import { readFileSync } from 'node:fs'+import { join } from 'node:path'++vi.mock('../../../../hooks/useContentPolicy', () => ({+ useContentPolicy: () => 'soft' as const,+ primeContentPolicyCache: vi.fn(),+}))++import { ModelChip } from '../ModelChip'+import { useCreateStore, type CreateIntent } from '../../../../stores/createStore'+import {+ animatePickerModels, cloudModelsFor, editCapableModels, studioOnlyImageModels, useCloudCatalogStore, videoPickerModels,+} from '../../../../stores/cloudCatalogStore'+import { sortByTier, OLDER_GROUP } from '../../../../lib/render/model-tier'+import { alterServer, neuerServer } from '../../../../lib/render/__tests__/fixtures/test-catalogs'++beforeEach(() => {+ cleanup()+ // jsdom kennt kein ResizeObserver, das die aufgeklappte Liste beobachtet.+ vi.stubGlobal('ResizeObserver', class { observe() {} unobserve() {} disconnect() {} })+ useCreateStore.setState({ backend: 'cloud', cloudImageModel: '', cloudVideoModel: '', cloudOpModel: '' })+ useCloudCatalogStore.setState({ models: neuerServer() })+})+afterEach(() => { cleanup(); vi.unstubAllGlobals() })++/** Oeffnet den Waehler und liest die Liste so, wie ein Kunde sie sieht. */+function lies(intent: CreateIntent) {+ useCreateStore.getState().setIntent(intent)+ render(<ModelChip />)+ fireEvent.click(screen.getByRole('button'))+ const liste = document.querySelector('.lu-elevated') as HTMLElement | null+ if (!liste) throw new Error('Liste nicht offen')+ const zeilen = Array.from(liste.querySelectorAll('button')).map((b) => ({+ name: (b.querySelector('.truncate')?.textContent ?? '').trim(),+ best: Array.from(b.querySelectorAll('span')).some((s) => s.textContent === 'Best'),+ offen: Array.from(b.querySelectorAll('span')).some((s) => s.textContent === 'Open weights'),+ familie: Array.from(b.querySelectorAll('span')).some((s) => s.textContent === 'Open family'),+ }))+ const kopf = Array.from(liste.querySelectorAll('div')).find((d) => d.textContent === OLDER_GROUP)+ return { liste, zeilen, kopf }+}++describe('der Bildwaehler (neuer Server)', () => {+ it('fuehrt die Besten oben, markiert sie und sammelt die Aelteren unter einer Zwischenzeile', () => {+ const erwartet = sortByTier([...cloudModelsFor('image'), ...studioOnlyImageModels()])+ const { zeilen, kopf } = lies('image')+ expect(zeilen.map((z) => z.name)).toEqual(erwartet.map((m) => m.label))+ const nBest = erwartet.filter((m) => m.tier === 'best').length+ expect(nBest).toBeGreaterThan(3)+ for (const z of zeilen.slice(0, nBest)) expect(z.best, z.name).toBe(true)+ for (const z of zeilen.slice(nBest)) expect(z.best, z.name).toBe(false)+ const vorn = zeilen.slice(0, nBest).map((z) => z.name)+ expect(vorn).toEqual(expect.arrayContaining(['Z-Image Turbo (fast)', 'Qwen Image 3.0 Pro', 'FLUX 3']))+ const aelter = erwartet.filter((m) => m.tier === 'older').map((m) => m.label)+ expect(aelter).toEqual(expect.arrayContaining(['Flux Schnell (fast)', 'Flux Dev (quality)', 'Qwen Image', 'HiDream', 'HunyuanImage 2.1']))+ expect(zeilen.slice(-aelter.length).map((z) => z.name)).toEqual(aelter)+ expect(kopf).toBeTruthy()+ const ersteAlte = zeilen[zeilen.length - aelter.length].name+ const knoepfe = Array.from(document.querySelectorAll('.lu-elevated button'))+ const mitKopf = knoepfe.filter((b) => b.previousElementSibling?.textContent === OLDER_GROUP)+ expect(mitKopf).toHaveLength(1)+ expect(mitKopf[0].querySelector('.truncate')?.textContent).toBe(ersteAlte)+ })++ it('nennt die Herkunft nur dort, wo die Familie offene Gewichte hat', () => {+ const { zeilen } = lies('image')+ const von = (name: string) => zeilen.find((z) => z.name === name)!+ expect(von('FLUX 3').familie).toBe(true)+ expect(von('FLUX 3').offen).toBe(false)+ expect(von('Cosmos 3 Super').offen).toBe(true)+ expect(von('Cosmos 3 Super').familie).toBe(false)+ expect(von('Z-Image Base').offen).toBe(true)+ expect(von('Flux Schnell (fast)').offen).toBe(true)+ })++ it('der geschlossene Waehler zeigt keine Marke: sie stehen nur in der aufgeklappten Liste', () => {+ useCreateStore.getState().setIntent('image')+ useCreateStore.setState({ cloudImageModel: 'z-image-turbo' })+ render(<ModelChip />)+ expect(screen.queryByText('Best')).toBeNull()+ expect(screen.queryByText('Open weights')).toBeNull()+ expect(screen.queryByText(OLDER_GROUP)).toBeNull()+ fireEvent.click(screen.getByRole('button'))+ expect(screen.getAllByText('Best').length).toBeGreaterThan(0)+ })+})++describe('die anderen Waehler (neuer Server)', () => {+ it('Bearbeiten: Beste oben, geschlossene tragen nur "Best" und keine Herkunft', () => {+ const erwartet = sortByTier(editCapableModels())+ const { zeilen } = lies('edit')+ expect(zeilen.map((z) => z.name)).toEqual(erwartet.map((m) => m.label))+ const seedream = zeilen.find((z) => z.name === 'Seedream 5 Pro')!+ expect(seedream.best).toBe(true)+ expect(seedream.offen).toBe(false)+ expect(zeilen.at(-1)!.name).toBe('Qwen Image Edit (no mask needed)')+ })++ it('Video: die neuen Modelle stehen im Waehler, die alten Wan, LTX und Hunyuan unten', () => {+ const erwartet = sortByTier(videoPickerModels())+ const { zeilen } = lies('video')+ expect(zeilen.map((z) => z.name)).toEqual(erwartet.map((m) => m.label))+ expect(zeilen.slice(0, 3).every((z) => z.best)).toBe(true)+ const unten = zeilen.slice(-5).map((z) => z.name)+ expect(unten).toEqual(expect.arrayContaining(['Wan 2.2 720p', 'Wan 2.2 Fast', 'LTX 2.3']))+ })++ it('Animate: Referenzmodelle und die neuen Bild-zu-Video-Modelle sind waehlbar', () => {+ const erwartet = sortByTier(animatePickerModels())+ const { zeilen } = lies('animate')+ expect(zeilen.map((z) => z.name)).toEqual(erwartet.map((m) => m.label))+ for (const name of ['LTX 2.5', 'FLUX 3 Video', 'MiniMax H3 • Reference', 'Wan 3.0 • Reference', 'daVinci MagiHuman']) {+ expect(zeilen.map((z) => z.name), name).toContain(name)+ }+ })++ it('Enhance Image bekommt einen Waehler: Standard und SeedVR2', () => {+ const { zeilen } = lies('upscale')+ expect(zeilen.map((z) => z.name)).toEqual(['Standard', 'SeedVR2'])+ expect(zeilen[1].offen).toBe(true)+ })++ it('Musik: YuE2 steht neben den anderen', () => {+ const { zeilen } = lies('music')+ expect(zeilen.map((z) => z.name)).toContain('YuE2 (song from lyrics)')+ })+})++describe('gegen den Server von heute (ohne Stufe, ohne die neuen Modelle)', () => {+ beforeEach(() => { useCloudCatalogStore.setState({ models: alterServer() }) })++ it('der Bildwaehler steht neutral da: keine Marke, keine Zwischenzeile, Reihenfolge wie bisher', () => {+ const erwartet = [...cloudModelsFor('image'), ...studioOnlyImageModels()].map((m) => m.label)+ const { zeilen, kopf } = lies('image')+ expect(zeilen.map((z) => z.name)).toEqual(erwartet)+ expect(zeilen.length).toBeGreaterThan(5)+ for (const z of zeilen) {+ expect(z.best, z.name).toBe(false)+ expect(z.offen, z.name).toBe(false)+ expect(z.familie, z.name).toBe(false)+ }+ expect(kopf).toBeUndefined()+ expect(zeilen.map((z) => z.name)).not.toContain('FLUX 3')+ })++ it('Video, Animate und Bearbeiten stehen ebenso neutral, ohne ein neues Modell', () => {+ for (const intent of ['video', 'animate', 'edit'] as const) {+ cleanup()+ const { zeilen, kopf } = lies(intent)+ expect(zeilen.length, intent).toBeGreaterThan(1)+ for (const z of zeilen) expect(z.best || z.offen || z.familie, `${intent}/${z.name}`).toBe(false)+ expect(kopf, intent).toBeUndefined()+ expect(zeilen.map((z) => z.name), intent).not.toContain('LTX 2.5')+ expect(zeilen.map((z) => z.name), intent).not.toContain('Qwen Image 2.1 Edit')+ }+ })++ it('Enhance Image zeigt keinen Waehler, der nur den Standard enthielte', () => {+ // Der Waehler selbst listet "Standard" allein; der Composer blendet ihn dann aus+ // (Composer.tsx, showUpscalePicker). Hier: die Liste hat genau diesen einen Eintrag.+ const { zeilen } = lies('upscale')+ expect(zeilen.map((z) => z.name)).toEqual(['Standard'])+ })+})++describe('im und ueber dem Prompt-Feld steht nichts davon', () => {+ const lese = (rel: string) => readFileSync(join(process.cwd(), rel), 'utf8')++ it('weder das Promptfeld noch der Composer kennen die Marken', () => {+ for (const rel of ['src/components/create/ui/PromptField.tsx', 'src/components/create/experimental/Composer.tsx']) {+ const src = lese(rel)+ expect(src, rel).not.toMatch(/tierMarks|model-tier|Open weights|Older models/)+ expect(src, rel).not.toMatch(/['"`>]Best['"`<]/)+ }+ })++ it('die Marken kommen nur aus dem Waehler und aus dem Modellfeld des Presets', () => {+ const treffer = ['src/components/create/experimental/ModelChip.tsx', 'src/components/create/experimental/PresetWorkshop.tsx']+ for (const rel of treffer) expect(lese(rel), rel).toMatch(/tierMarks/)+ })+})diff --git a/src/components/create/experimental/__tests__/preset-workshop.test.tsx b/src/components/create/experimental/__tests__/preset-workshop.test.tsxindex 6405821a..ac238457 100644--- a/src/components/create/experimental/__tests__/preset-workshop.test.tsx+++ b/src/components/create/experimental/__tests__/preset-workshop.test.tsx@@ -12,6 +12,8 @@ import { promptIdeas } from '../../../../lib/render/prompt-ideas'import { useCreateStore } from '../../../../stores/createStore'import { useCloudCatalogStore } from '../../../../stores/cloudCatalogStore'import { CLOUD_MODEL_SEED, type CloudModel } from '../../../../lib/render/cloud-models'+import { neuerServer } from '../../../../lib/render/__tests__/fixtures/test-catalogs'+import { sortByTier } from '../../../../lib/render/model-tier'import { CloudJobError } from '../../../../api/cloud/client'import { QuoteChangedError } from '../../../../api/cloud/jobs'import { StudioQuoteChangedError } from '../../../../api/cloud/studio'@@ -60,17 +62,10 @@ function WerkstattFenster({ preset, onClosed }: { preset: CreatePreset; onClosed// Feld. Im echten Betrieb heilt das die erste Katalogaktualisierung, hier// braucht es einen Preis, damit die klassischen Faelle unten (Modellwechsel,// Frames/Fps) ueberhaupt einen bestaetigbaren Preis sehen.-const QUOTE_REQUIRED_CATALOG: CloudModel[] = [- ...CLOUD_MODEL_SEED.map((m) =>- m.id === 'flux-schnell' ? { ...m, credits: { base: 300 } }- : m.id === 'wan-2.2-720p' ? { ...m, credits: { base: 5000, long: 8000 } }- : m),- // Sentinel: der Katalog eines Servers, der Studio kennt, traegt dieses- // Feld auf mindestens einem Eintrag. Der genaue Modellname ist beliebig;- // jeder Fall unten, der presetModels()/roleForModel() live neu berechnet,- // bleibt in sich konsistent, ob dieser Testeintrag mitzaehlt oder nicht.- { id: 'quote-required-test-marker', label: 'Test Studio Marker', kind: 'image', quote_required: true },-]+const QUOTE_REQUIRED_CATALOG: CloudModel[] = neuerServer().map((m) =>+ m.id === 'flux-schnell' ? { ...m, credits: { base: 300 } }+ : m.id === 'wan-2.2-720p' ? { ...m, credits: { base: 5000, long: 8000 } }+ : m)const mocks = vi.hoisted(() => ({submit: vi.fn(), poll: vi.fn(), refresh: vi.fn(), upload: vi.fn(), getJob: vi.fn(), cancel: vi.fn(),@@ -275,15 +270,17 @@ const eigenes = (role: 'image' | 'animate', model: string, kind: 'image' | 'vide// `role="option"` (Web: nur ein `<button>` ohne Rollen-Override), also wird// nach `option` statt nach `button` gefragt.const aufklappen = (name: string) => { const k = screen.getByLabelText(name); fireEvent.click(k); return k }-const eintraege = (name: string) => { aufklappen(name); const liste = screen.getAllByRole('option').filter((b) => b.closest('.lu-elevated')); const namen = liste.map((b) => b.textContent ?? ''); fireEvent.click(screen.getByLabelText(name)); return namen }-const waehlen = (name: string, text: string) => { aufklappen(name); const treffer = screen.getAllByRole('option').find((b) => b.closest('.lu-elevated') && (b.textContent ?? '').trim() === text); if (!treffer) throw new Error(`Eintrag nicht gefunden: ${text}`); fireEvent.click(treffer) }+// Nur der Name zaehlt: Marken (Best, Open weights) und Preis stehen daneben.+const nameVon = (b: HTMLElement) => (b.querySelector('.truncate')?.textContent ?? b.textContent ?? '').trim()+const eintraege = (name: string) => { aufklappen(name); const liste = screen.getAllByRole('option').filter((b) => b.closest('.lu-elevated')); const namen = liste.map((b) => nameVon(b)); fireEvent.click(screen.getByLabelText(name)); return namen }+const waehlen = (name: string, text: string) => { aufklappen(name); const treffer = screen.getAllByRole('option').find((b) => b.closest('.lu-elevated') && nameVon(b) === text); if (!treffer) throw new Error(`Eintrag nicht gefunden: ${text}`); fireEvent.click(treffer) }it('ein Preset mit Freigabe bietet nur die offenen Modelle an', async () => {// Ein gefilterter Endpunkt verweigert einen Horror- oder Spicy-Lauf und// kostet die Credits trotzdem. Er steht dort also gar nicht erst.render(<PresetWorkshop preset={CREATE_PRESETS[0]} onClose={() => {}} onGenerate={() => {}} />)const namen = eintraege('Model')- expect(namen).toEqual(presetModels('image', true).map((m) => m.label))+ expect(namen).toEqual(sortByTier(presetModels('image', true)).map((m) => m.label))expect(namen).toContain('Chroma Spicy')expect(namen).not.toContain('Flux Schnell (fast)')})diff --git a/src/components/create/experimental/__tests__/studio-price-images.test.tsx b/src/components/create/experimental/__tests__/studio-price-images.test.tsxnew file mode 100644index 00000000..717345f9--- /dev/null+++ b/src/components/create/experimental/__tests__/studio-price-images.test.tsx@@ -0,0 +1,85 @@+// @vitest-environment jsdom+// Der Vorab-Preis im Create-Tab nennt die Bildzahl, die der Start schickt+// (Endpruefung 02.10.2026, MiniMax H3 Reference rechnet je Referenzbild).+//+// Desktop: die Bildzahl geht als `quote_images` nur an einen Server, der sie+// kennt. Das sagt er selbst, sein Katalog fuehrt dann `tier`. Der Server von+// heute ignorierte das Feld und lehnte ein Modell mit Pflichtbild vor dem+// Hochladen mit 400 ab, und das sperrte den Startknopf. Dort steht stattdessen+// die Formel-Vorschau, und die Buchung holt ihre bestaetigte Zahl nach dem+// Hochladen (useCloudCreate).+import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest'+import { act, cleanup, renderHook, waitFor } from '@testing-library/react'+import { useStudioPrice } from '../useStudioPrice'+import { useCloudCatalogStore } from '../../../../stores/cloudCatalogStore'+import { alterServer, neuerServer } from '../../../../lib/render/__tests__/fixtures/test-catalogs'++const hoisted = vi.hoisted(() => ({ studioQuote: vi.fn() }))+vi.mock('../../../../api/cloud/studio', async (importOriginal) => ({+ ...(await importOriginal<typeof import('../../../../api/cloud/studio')>()),+ studioQuote: hoisted.studioQuote,+}))++afterEach(() => {+ cleanup()+ vi.useRealTimers()+ hoisted.studioQuote.mockReset()+})++describe('mit dem Katalog des neuen Servers', () => {+ beforeEach(() => { useCloudCatalogStore.setState({ models: neuerServer() }) })++ it('ein Modell mit Bildvorlage fragt mit quote_images 1', async () => {+ hoisted.studioQuote.mockResolvedValue({ credits: 13500 })+ const { result } = renderHook(() => useStudioPrice('minimax-h3-ref', { duration: 5, resolution: '480p' }, 'a runner', undefined))+ await waitFor(() => expect(result.current?.live).toBe(true), { timeout: 3000 })+ expect(hoisted.studioQuote.mock.calls[0][3]).toBe(1)+ expect(result.current?.credits).toBe(13500)+ })++ it('ein Modell ohne Bildvorlage schickt keine Bildzahl', async () => {+ hoisted.studioQuote.mockResolvedValue({ credits: 8000 })+ const { result } = renderHook(() => useStudioPrice('minimax-h3-t2v', { duration: 5, resolution: '480p' }, 'a runner', undefined))+ await waitFor(() => expect(result.current?.live).toBe(true), { timeout: 3000 })+ expect(hoisted.studioQuote.mock.calls[0][3]).toBeUndefined()+ })++ it('die Schaetzung ohne Antwort rechnet mit derselben Bildzahl', async () => {+ hoisted.studioQuote.mockRejectedValue(new Error('offline'))+ const { result } = renderHook(() => useStudioPrice('minimax-h3-ref', { duration: 5, resolution: '480p' }, 'x', undefined))+ expect(result.current?.live).toBe(false)+ expect(result.current?.credits).toBeGreaterThan(0)+ await act(async () => { await Promise.resolve() })+ })+})++describe('mit dem Katalog des Servers von heute', () => {+ beforeEach(() => { useCloudCatalogStore.setState({ models: alterServer() }) })++ it('ein Modell mit Pflichtbild fragt vor dem Hochladen nicht an, und sperrt nichts', async () => {+ // minimax-h3-edit liest ein Pflichtbild und stand schon im alten Katalog.+ vi.useFakeTimers()+ const { result } = renderHook(() => useStudioPrice('minimax-h3-edit', { resolution: '480p' }, 'make it dusk', undefined))+ await act(async () => { await vi.advanceTimersByTimeAsync(3000) })+ expect(hoisted.studioQuote).not.toHaveBeenCalled()+ expect(result.current?.error).toBeUndefined()+ expect(result.current?.live).toBe(false)+ expect(result.current?.credits).toBeGreaterThan(0)+ })++ it('ein Modell aus Worten allein fragt wie gehabt, ohne Bildzahl', async () => {+ hoisted.studioQuote.mockResolvedValue({ credits: 4000 })+ const { result } = renderHook(() => useStudioPrice('z-image', {}, 'a runner', undefined))+ await waitFor(() => expect(result.current?.live).toBe(true), { timeout: 3000 })+ expect(hoisted.studioQuote.mock.calls[0][3]).toBeUndefined()+ expect(result.current?.credits).toBe(4000)+ })++ it('ein Videomodell mit Pflichtbild fragt ebenfalls nicht vor dem Hochladen an', async () => {+ vi.useFakeTimers()+ const { result } = renderHook(() => useStudioPrice('wan-3.0', { duration: 5, resolution: '720p' }, 'a runner', undefined))+ await act(async () => { await vi.advanceTimersByTimeAsync(3000) })+ expect(hoisted.studioQuote).not.toHaveBeenCalled()+ expect(result.current?.error).toBeUndefined()+ })+})diff --git a/src/components/create/experimental/useStudioPrice.ts b/src/components/create/experimental/useStudioPrice.tsindex 9599e494..30f0976c 100644--- a/src/components/create/experimental/useStudioPrice.ts+++ b/src/components/create/experimental/useStudioPrice.ts@@ -35,7 +35,9 @@// die Quote unmittelbar davor bestaetigt.import { useEffect, useRef, useState } from 'react'-import { createStudioCost, pricesByInput } from '../../../lib/render/create-studio'+import { createStudioCost, pricesByInput, startImageCount } from '../../../lib/render/create-studio'+import { studioRequiredParams } from '../../../lib/render/studio-roles'+import { useCloudCatalogStore } from '../../../stores/cloudCatalogStore'import { studioQuote } from '../../../api/cloud/studio'import { StudioQuoteChangedError } from '../../../api/cloud/studio'import { CloudJobError } from '../../../api/cloud/client'@@ -96,23 +98,35 @@ export function useStudioPrice(prompt: string,seconds: number | undefined,): StudioPrice | null {+ // Die Bildzahl, die der Start wirklich schickt: der Anbieter rechnet sie ein+ // (MiniMax H3 Reference, je Bild). Ohne sie bliebe der Vorab-Preis aus.+ const images = model ? startImageCount(model) : undefined+ // Ein Modell, das ein Pflichtbild liest, laesst sich vor dem Hochladen nur bei+ // einem Server bepreisen, der `quote_images` kennt (studio-quote, 02.10.2026).+ // Dass ein Server das kann, sagt er selbst: sein Katalog fuehrt Stufen. Ein+ // aelterer Server wuerde ohne Datei mit 400 antworten, und das sperrte den+ // Startknopf. Dort steht die Formel-Vorschau, und die Buchung holt ihre+ // bestaetigte Zahl nach dem Hochladen (useCloudCreate), wie bei den Modellen,+ // die nach der Dateilaenge abrechnen.+ const quotesImages = useCloudCatalogStore((s) => s.models.some((m) => m.tier !== undefined))+ const needsUpload = model ? images !== undefined && studioRequiredParams(model).length > 0 : falseconst [live, setLive] = useState<{ key: string; credits: number } | null>(null)const [error, setError] = useState<{ key: string; message: string } | null>(null)const abort = useRef<AbortController | null>(null)const debouncedPromptLen = useDebouncedValue(prompt.length, PROMPT_DEBOUNCE_MS)- const key = model ? JSON.stringify([model, options, debouncedPromptLen, seconds]) : ''+ const key = model ? JSON.stringify([model, options, debouncedPromptLen, seconds, images, quotesImages]) : ''useEffect(() => {abort.current?.abort()// Kein Modell (lokale Spur, oder Wolke ohne Studio-Wahl): kein Abruf.// Ein Modell, dessen Preis an einer hochgeladenen Datei haengt, wird erst// MIT der Datei gebucht (useCloudCreate), hier reicht die Formel.- if (!model || pricesByInput(model)) { setLive(null); setError(null); return }+ if (!model || pricesByInput(model) || (needsUpload && !quotesImages)) { setLive(null); setError(null); return }const controller = new AbortController()abort.current = controllerconst timer = setTimeout(async () => {try {- const res = await studioQuote(model, prompt, { op: 'studio', studio_options: options })+ const res = await studioQuote(model, prompt, { op: 'studio', studio_options: options }, quotesImages ? images : undefined)if (controller.signal.aborted) returnsetLive({ key, credits: res.credits })setError(null)@@ -160,8 +174,8 @@ export function useStudioPrice(if (!model) return nullif (error && error.key === key) {- return { credits: createStudioCost(model, options, Array.from(prompt).length, seconds), live: false, error: error.message }+ return { credits: createStudioCost(model, options, Array.from(prompt).length, seconds, images ?? 1), live: false, error: error.message }}if (live && live.key === key) return { credits: live.credits, live: true }- return { credits: createStudioCost(model, options, Array.from(prompt).length, seconds), live: false }+ return { credits: createStudioCost(model, options, Array.from(prompt).length, seconds, images ?? 1), live: false }}diff --git a/src/components/create/ui/Select.tsx b/src/components/create/ui/Select.tsxindex 6d716c16..756dad13 100644--- a/src/components/create/ui/Select.tsx+++ b/src/components/create/ui/Select.tsx@@ -17,6 +17,8 @@ export interface SelectOption {/** Ueberschrift ueber diesem und den folgenden Eintraegen derselben Gruppe. */group?: stringbadge?: { label: string; color: string }+ /** Kleine Marken hinter dem Namen, nur in der aufgeklappten Liste (etwa Stufe und Herkunft). */+ tags?: { label: string; color: string }[]}interface Props {@@ -390,6 +392,10 @@ export function Select({{option.label}</span>+ {option.tags?.map((t) => (+ <Badge key={t.label} color={t.color} label={t.label} />+ ))}+{option.sublabel && (<span className="t-mono truncate text-gray-600">{option.sublabel}diff --git a/src/hooks/__tests__/useCloudCreate-neue-modelle.test.ts b/src/hooks/__tests__/useCloudCreate-neue-modelle.test.tsnew file mode 100644index 00000000..8b409bbf--- /dev/null+++ b/src/hooks/__tests__/useCloudCreate-neue-modelle.test.ts@@ -0,0 +1,391 @@+/**+ * Bild, Bearbeiten, Video, Animate und Enhance Image fahren die neuen Studio-+ * Modelle (02.10.2026, Web-Paritaet; Vorlage: apps/web/hooks/__tests__/+ * useCloudCreate-neue-modelle.test.ts). Daran haengen Dinge, die still falsch+ * sein koennen: der Op, das Bild als Liste, keine Maske fuer Editoren per+ * Anweisung, keine klassischen Laengenfelder fuer ein Studio-Video, und die+ * Standard-Wahl von Enhance Image, die weiter den alten Weg nimmt.+ *+ * Der letzte Block laeuft gegen den Katalog des Servers von heute: ein Modell,+ * das er nicht kennt, wird nicht gestartet, sondern auf den Standard gebogen.+ *+ * Nichts wird erzeugt: Absenden, Hochladen und Abholen sind gemockt.+ */+import { describe, it, expect, vi, beforeEach } from 'vitest'++vi.mock('react', async (orig) => {+ const actual = (await orig()) as Record<string, unknown>+ return { ...actual, useCallback: (fn: unknown) => fn }+})++// A full, hand-written mock (no `...actual` spread): the real ../../api/cloud/jobs+// pulls in the Supabase client (api/cloud/supabase.ts), which touches+// `localStorage` at import time and blows up outside a browser-like test+// environment. The established pattern in this directory (see+// useCloudCreate-b3-adult-gate-fires-before-upload.test.ts) is a fake+// CloudJobError/QuoteChangedError pair instead of the real classes.+const hoisted = vi.hoisted(() => {+ class FakeCloudJobError extends Error {+ status: number+ code?: string+ constructor(message: string, status: number, meta?: { code?: string }) {+ super(message)+ this.status = status+ this.code = meta?.code+ }+ }+ class FakeQuoteChangedError extends FakeCloudJobError {+ credits: number+ constructor(message: string, credits: number) {+ super(message, 409, { code: 'quote_changed' })+ this.credits = credits+ }+ }+ const submitted: Array<{ kind: string; model: string; prompt: string; params: Record<string, unknown> }> = []+ const hochgeladen: string[] = []+ return {+ FakeCloudJobError,+ FakeQuoteChangedError,+ submitted,+ hochgeladen,+ uploadInput: vi.fn(async (_blob: unknown, slot: string) => {+ hochgeladen.push(slot)+ return `user-1/staged-${slot}.${slot === 'audio' ? 'mp3' : slot === 'video' ? 'mp4' : 'png'}`+ }),+ getJob: vi.fn(async () => ({ id: 'quelle', result_url: 'https://storage.example/clip.mp4' })),+ submitCloudJob: vi.fn(async (payload: (typeof submitted)[number]) => {+ submitted.push(payload)+ return { id: 'job-test', quota: { cost: 1000, used: 1000, limit: 100000 } }+ }),+ pollJob: vi.fn(async () => ({+ id: 'job-test', kind: 'video', model: 'longcat-avatar', status: 'succeeded',+ result_url: 'https://storage.example/out.mp4', created_at: new Date().toISOString(),+ })),+ cancelJob: vi.fn(async () => ({ status: 'canceled' })),+ studioQuote: vi.fn(async (..._args: unknown[]) => ({ credits: 42 })),+ }+})+const { submitted, hochgeladen } = hoisted++// Sidesteps loadContentPolicy's own call into ../../api/cloud/jobs+// (getContentPolicy). 'off' keeps clientSafety() to its CSAM-only floor,+// same as an account whose policy has not loaded yet.+vi.mock('../useContentPolicy', () => ({+ contentPolicySnapshot: () => 'off' as const,+ loadContentPolicy: async () => 'off' as const,+}))++vi.mock('../../api/cloud/jobs', () => ({+ uploadInput: hoisted.uploadInput,+ getJob: hoisted.getJob,+ submitCloudJob: hoisted.submitCloudJob,+ pollJob: hoisted.pollJob,+ cancelJob: hoisted.cancelJob,+ CloudJobError: hoisted.FakeCloudJobError,+ QuoteChangedError: hoisted.FakeQuoteChangedError,+}))++// Review A1/B3 (Runde 2): useCloudCreate now quotes a Studio run right+// before booking (see useCloudCreate.ts, the "Confirming the price…" step)+// and uses that number as max_credits. A fixed 42 keeps every existing+// assertion below about the OTHER params fields unaffected; the dedicated+// max_credits/quote_changed behavior gets its own tests further down.+vi.mock('../../api/cloud/studio', () => ({+ studioQuote: hoisted.studioQuote,+ StudioQuoteChangedError: hoisted.FakeQuoteChangedError,+}))++import { useCloudCreate } from '../useCloudCreate'+import { useCreateStore } from '../../stores/createStore'+import { useCloudCatalogStore } from '../../stores/cloudCatalogStore'+import { alterServer, neuerServer } from '../../lib/render/__tests__/fixtures/test-catalogs'++const BILD = { filename: 'portrait.png', url: 'data:image/png;base64,AA', width: 512, height: 512 }++beforeEach(() => {+ submitted.length = 0+ hochgeladen.length = 0+ hoisted.studioQuote.mockClear()+ hoisted.studioQuote.mockResolvedValue({ credits: 42 })+ hoisted.submitCloudJob.mockClear()+ hoisted.submitCloudJob.mockImplementation(async (payload: (typeof submitted)[number]) => {+ submitted.push(payload)+ return { id: 'job-test', quota: { cost: 1000, used: 1000, limit: 100000 } }+ })+ vi.stubGlobal('fetch', vi.fn(async () => ({ ok: true, blob: async () => new Blob(['x']) })))+ useCreateStore.setState({+ isGenerating: false, error: null, backend: 'cloud',+ source: null, audioInput: null, videoInput: null, voiceFromJob: null,+ extendSource: null, gallery: [], cloudStudioOptions: {},+ // Review A kleiner Punkt 1 (Runde 3): explicit per test below, null here+ // so a leftover value from one test cannot leak a false block/pass into+ // the next.+ cloudStudioCredits: null,+ })+ useCreateStore.getState().setPrompt('a neutral placeholder line')+ // Review B1: this whole file simulates a server that already knows Studio+ // (that is what every test here submits against). Without `quote_required`+ // on the live catalog, `resolveIntentPick` would fall back to a CLASSIC+ // member for every one of these role intents (create-studio.test.ts has+ // the dedicated fallback coverage for the opposite state).+ useCloudCatalogStore.setState({ models: neuerServer() })+})+++describe('die neuen Studio-Modelle in Bild, Bearbeiten, Video, Animate und Enhance Image', () => {+ it('Bearbeiten: ein Studio-Editor startet ohne Maske und bekommt das Bild als Liste', async () => {+ const s = useCreateStore.getState()+ s.setIntent('edit')+ s.setCloudImageModel('flux-3-edit')+ useCreateStore.setState({ source: BILD, mask: null })+ await useCloudCreate().generate()+ expect(useCreateStore.getState().error).toBeNull()+ expect(submitted).toHaveLength(1)+ expect(submitted[0].model).toBe('flux-3-edit')+ expect(submitted[0].kind).toBe('image')+ expect(submitted[0].params.op).toBe('studio')+ expect(submitted[0].params.image_paths).toEqual(['user-1/staged-source.png'])+ // Dieses Modell liest kein source_path, also geht das Bild nur in die Liste.+ expect(submitted[0].params.source_path).toBeUndefined()+ expect(submitted[0].params.mask_path).toBeUndefined()+ expect(submitted[0].params.denoise).toBeUndefined()+ expect(hochgeladen).not.toContain('mask')+ // Die bestaetigte Zahl bekommt die Bilderliste mit, sonst rechnete der+ // Anbieter ohne Bild und der Deckel stimmte nicht.+ expect(hoisted.studioQuote).toHaveBeenCalledTimes(1)+ expect(hoisted.studioQuote.mock.calls[0][2]).toMatchObject({ image_paths: ['user-1/staged-source.png'] })+ })++ it('Bearbeiten: ein Editor mit einem Bildfeld bekommt source_path', async () => {+ const s = useCreateStore.getState()+ s.setIntent('edit')+ s.setCloudImageModel('ideogram-4.5-edit')+ useCreateStore.setState({ source: BILD, mask: null })+ await useCloudCreate().generate()+ expect(submitted[0].params.op).toBe('studio')+ expect(submitted[0].params.source_path).toBe('user-1/staged-source.png')+ expect(submitted[0].params.image_paths).toBeUndefined()+ })++ it('Bearbeiten: das maskierte flux-dev verlangt seine Maske weiter', async () => {+ const s = useCreateStore.getState()+ s.setIntent('edit')+ s.setCloudImageModel('flux-dev')+ useCreateStore.setState({ source: BILD, mask: null })+ await useCloudCreate().generate()+ expect(submitted).toHaveLength(0)+ expect(useCreateStore.getState().error).toMatch(/mask/i)+ })++ it('Bearbeiten: das klassische Qwen Image Edit startet ohne Maske', async () => {+ const s = useCreateStore.getState()+ s.setIntent('edit')+ s.setCloudImageModel('qwen-image-edit')+ useCreateStore.setState({ source: BILD, mask: null })+ await useCloudCreate().generate()+ expect(useCreateStore.getState().error).toBeNull()+ expect(submitted).toHaveLength(1)+ expect(submitted[0].model).toBe('qwen-image-edit')+ expect(submitted[0].params.op).toBe('edit')+ expect(submitted[0].params.mask_path).toBeUndefined()+ })++ it('Text zu Bild: ein neues Bildmodell geht als Studio-Lauf mit seinen Optionen', async () => {+ const s = useCreateStore.getState()+ s.setIntent('image')+ s.setCloudImageModel('qwen-image-3-pro')+ s.setCloudStudioOptions({ resolution: '2k', aspect_ratio: '16:9' })+ await useCloudCreate().generate()+ expect(submitted[0].model).toBe('qwen-image-3-pro')+ expect(submitted[0].params.op).toBe('studio')+ expect(submitted[0].params.studio_options).toEqual({ resolution: '2k', aspect_ratio: '16:9' })+ // Kein klassisches Feld rutscht in einen Studio-Lauf.+ expect(submitted[0].params.steps).toBeUndefined()+ expect(submitted[0].params.cfg).toBeUndefined()+ })++ it('Text zu Video: ein neues Videomodell schickt seine Laenge als Option, nie frames und fps', async () => {+ const s = useCreateStore.getState()+ s.setIntent('video')+ s.setCloudVideoModel('ltx-2.5-t2v')+ s.setCloudStudioOptions({ resolution: '1080p', duration: 10 })+ await useCloudCreate().generate()+ expect(useCreateStore.getState().error).toBeNull()+ expect(submitted[0].model).toBe('ltx-2.5-t2v')+ expect(submitted[0].kind).toBe('video')+ expect(submitted[0].params.op).toBe('studio')+ expect(submitted[0].params.studio_options).toEqual({ resolution: '1080p', duration: 10 })+ expect(submitted[0].params.frames).toBeUndefined()+ expect(submitted[0].params.fps).toBeUndefined()+ })++ it('Text zu Video: ohne gespeicherte Wahl laeuft der neue Standard minimax-h3-t2v', async () => {+ const s = useCreateStore.getState()+ s.setIntent('video')+ s.setCloudVideoModel('')+ await useCloudCreate().generate()+ expect(submitted[0].model).toBe('minimax-h3-t2v')+ expect(submitted[0].params.op).toBe('studio')+ })++ it('Text zu Video: ein klassisches Modell bucht weiter seine Laenge als frames und fps', async () => {+ const s = useCreateStore.getState()+ s.setIntent('video')+ s.setCloudVideoModel('wan-2.2-720p')+ await useCloudCreate().generate()+ expect(submitted[0].model).toBe('wan-2.2-720p')+ expect(submitted[0].params.op).toBe('generate')+ expect(submitted[0].params.frames).toBe(80)+ expect(submitted[0].params.fps).toBe(16)+ })++ it('Animate: Bild zu Video als Studio-Lauf mit source_path', async () => {+ const s = useCreateStore.getState()+ s.setIntent('animate')+ s.setCloudVideoModel('ltx-2.5-i2v')+ useCreateStore.setState({ source: BILD })+ await useCloudCreate().generate()+ expect(submitted[0].model).toBe('ltx-2.5-i2v')+ expect(submitted[0].params.op).toBe('studio')+ expect(submitted[0].params.source_path).toBe('user-1/staged-source.png')+ })++ it('Animate: ein Referenzmodell bekommt das Bild als einzige Referenz', async () => {+ const s = useCreateStore.getState()+ s.setIntent('animate')+ s.setCloudVideoModel('minimax-h3-ref')+ useCreateStore.setState({ source: BILD })+ await useCloudCreate().generate()+ expect(submitted[0].model).toBe('minimax-h3-ref')+ expect(submitted[0].params.op).toBe('studio')+ expect(submitted[0].params.image_paths).toEqual(['user-1/staged-source.png'])+ expect(submitted[0].params.source_path).toBeUndefined()+ })++ it('Animate: eine alte Wahl aus dem Video-Waehler faellt auf ein Modell, das Bild zu Video kann', async () => {+ const s = useCreateStore.getState()+ s.setIntent('animate')+ s.setCloudVideoModel('ltx-2.5-t2v')+ useCreateStore.setState({ source: BILD })+ await useCloudCreate().generate()+ expect(submitted[0].model).not.toBe('ltx-2.5-t2v')+ expect(submitted[0].model).toBe('minimax-h3')+ })++ it('Enhance Image: Standard geht weiter als Bild-Upscale und nicht als Studio-Lauf', async () => {+ const s = useCreateStore.getState()+ s.setIntent('upscale')+ s.setCloudOpModel('upscale-standard')+ useCreateStore.setState({ source: BILD })+ await useCloudCreate().generate()+ expect(submitted).toHaveLength(1)+ expect(submitted[0].params.op).toBe('upscale')+ expect(submitted[0].params.target_resolution).toBe(useCreateStore.getState().targetResolution)+ expect(submitted[0].params.studio_options).toBeUndefined()+ expect(submitted[0].model).not.toBe('upscale-standard')+ expect(hoisted.studioQuote).not.toHaveBeenCalled()+ })++ it('Enhance Image mit Standard laesst die gespeicherte Bildwahl des Kunden stehen', async () => {+ const s = useCreateStore.getState()+ s.setCloudImageModel('flux-dev')+ s.setIntent('upscale')+ s.setCloudOpModel('upscale-standard')+ useCreateStore.setState({ source: BILD })+ await useCloudCreate().generate()+ expect(submitted).toHaveLength(1)+ expect(useCreateStore.getState().gallery.length).toBeGreaterThan(0)+ expect(useCreateStore.getState().gallery[0].model).toBe('flux-dev')+ expect(useCreateStore.getState().cloudImageModel).toBe('flux-dev')+ })++ it('Enhance Image: SeedVR2 geht als Studio-Lauf mit seinem Ziel in den Optionen', async () => {+ const s = useCreateStore.getState()+ s.setIntent('upscale')+ s.setCloudOpModel('seedvr2-image')+ s.setCloudStudioOptions({ target_resolution: '8k' })+ useCreateStore.setState({ source: BILD })+ await useCloudCreate().generate()+ expect(submitted[0].model).toBe('seedvr2-image')+ expect(submitted[0].kind).toBe('image')+ expect(submitted[0].params.op).toBe('studio')+ expect(submitted[0].params.source_path).toBe('user-1/staged-source.png')+ expect(submitted[0].params.target_resolution).toBeUndefined()+ expect(submitted[0].params.studio_options).toEqual({ target_resolution: '8k' })+ })++ it('ein Studio-Bildmodell im Bild-Tab rutscht nie in ein Cutout, einen Radierer oder Enhance', async () => {+ const s = useCreateStore.getState()+ s.setCloudImageModel('flux-3')+ s.setIntent('removebg')+ useCreateStore.setState({ source: BILD })+ await useCloudCreate().generate()+ expect(submitted[0].params.op).toBe('removebg')+ expect(submitted[0].model).not.toBe('flux-3')+ })++ it('Musik: YuE2 geht als Studio-Lauf mit seinen Optionen', async () => {+ const s = useCreateStore.getState()+ s.setIntent('music')+ s.setCloudOpModel('yue2')+ s.setCloudStudioOptions({ style: 'rock' })+ s.setPrompt('[Verse]\nla la la')+ await useCloudCreate().generate()+ expect(submitted[0].model).toBe('yue2')+ expect(submitted[0].kind).toBe('audio')+ expect(submitted[0].params.studio_options).toEqual({ style: 'rock' })+ })++ it('ein Modellwechsel und ein Wechsel der Unterkategorie werfen die Optionen weg', () => {+ const s = useCreateStore.getState()+ s.setCloudImageModel('qwen-image-3')+ s.setCloudImageModel('flux-3')+ s.setCloudStudioOptions({ resolution: '2k' })+ // Dieselbe Wahl noch einmal: die Optionen bleiben.+ s.setCloudImageModel('flux-3')+ expect(useCreateStore.getState().cloudStudioOptions).toEqual({ resolution: '2k' })+ s.setCloudImageModel('qwen-image-3-pro')+ expect(useCreateStore.getState().cloudStudioOptions).toEqual({})+ s.setCloudVideoModel('wan-2.2-720p')+ s.setCloudStudioOptions({ resolution: '1080p' })+ s.setCloudVideoModel('ltx-2.5-t2v')+ expect(useCreateStore.getState().cloudStudioOptions).toEqual({})+ s.setCloudStudioOptions({ resolution: '1080p' })+ s.setIntent('video')+ s.setIntent('animate')+ expect(useCreateStore.getState().cloudStudioOptions).toEqual({})+ })+})++describe('gegen den Server von heute', () => {+ beforeEach(() => { useCloudCatalogStore.setState({ models: alterServer() }) })++ it('ein gespeichertes neues Modell, das der Server nicht kennt, startet als der Standard des Servers', async () => {+ const s = useCreateStore.getState()+ s.setIntent('video')+ s.setCloudVideoModel('ltx-2.5-t2v')+ await useCloudCreate().generate()+ expect(useCreateStore.getState().error).toBeNull()+ expect(submitted).toHaveLength(1)+ expect(submitted[0].model).toBe('wan-2.2-720p')+ expect(submitted[0].params.op).toBe('generate')+ })++ it('Bearbeiten ohne Wahl startet auf dem ersten Editor des Servers, wie vor diesem Stand', async () => {+ const s = useCreateStore.getState()+ s.setIntent('edit')+ s.setCloudImageModel('')+ useCreateStore.setState({ source: BILD, mask: { filename: 'm.png', url: 'data:image/png;base64,AA', width: 512, height: 512 } as never })+ await useCloudCreate().generate()+ expect(submitted[0].model).toBe('flux-dev')+ expect(submitted[0].params.op).toBe('edit')+ })++ it('Enhance Image mit Standard laeuft wie vorher, ohne Studio', async () => {+ const s = useCreateStore.getState()+ s.setIntent('upscale')+ useCreateStore.setState({ source: BILD })+ await useCloudCreate().generate()+ expect(submitted[0].params.op).toBe('upscale')+ })+})diff --git a/src/hooks/__tests__/useCloudCreate-studio.test.ts b/src/hooks/__tests__/useCloudCreate-studio.test.tsindex 4e9d37bc..7067e710 100644--- a/src/hooks/__tests__/useCloudCreate-studio.test.ts+++ b/src/hooks/__tests__/useCloudCreate-studio.test.ts@@ -108,7 +108,7 @@ vi.mock('../../api/cloud/studio', () => ({import { useCloudCreate } from '../useCloudCreate'import { useCreateStore } from '../../stores/createStore'import { useCloudCatalogStore } from '../../stores/cloudCatalogStore'-import { CLOUD_MODEL_SEED } from '../../lib/render/cloud-models'+import { neuerServer } from '../../lib/render/__tests__/fixtures/test-catalogs'const BILD = { filename: 'portrait.png', url: 'data:image/png;base64,AA', width: 512, height: 512 }const TON = { name: 'voice.mp3', url: 'blob:voice', blob: new Blob(['x']) }@@ -139,7 +139,7 @@ beforeEach(() => {// on the live catalog, `resolveIntentPick` would fall back to a CLASSIC// member for every one of these role intents (create-studio.test.ts has// the dedicated fallback coverage for the opposite state).- useCloudCatalogStore.setState({ models: [...CLOUD_MODEL_SEED, { id: 'test-studio-marker', label: 'x', kind: 'image', quote_required: true }] })+ useCloudCatalogStore.setState({ models: neuerServer() })})describe('Studio-Modelle in den Create-Unterkategorien', () => {diff --git a/src/hooks/useCloudCreate.ts b/src/hooks/useCloudCreate.tsindex ac9cc640..b8ac5e22 100644--- a/src/hooks/useCloudCreate.ts+++ b/src/hooks/useCloudCreate.ts@@ -25,7 +25,9 @@ import {} from '../api/cloud/jobs'import {defaultCloudModel,+ editNeedsMask,modelForOp,+ utilityOpModel,resolveOpPick,cloudModelById,cloudMediaLive,@@ -35,7 +37,7 @@ import { checkPromptSafety, blockMessageFor, type SafetyVerdict } from '../lib/rimport { contentPolicySnapshot, loadContentPolicy } from './useContentPolicy'import { signalCreditsExhausted } from '../lib/credits-exhausted'import { resolveRunSeed } from '../lib/run-seed'-import { intentRoles, intentRequiredInputs, isStudioModel, resolveIntentPick } from '../lib/render/create-studio'+import { STANDARD_UPSCALE, intentRoles, intentRequiredInputs, isStudioModel, resolveIntentPick } from '../lib/render/create-studio'import { STUDIO_MODELS, studioFields } from '../lib/render/studio-contract'import { modelLabel } from '../lib/render/preset-models'import { bookedVideoSeconds } from '../lib/render/video-duration'@@ -243,15 +245,28 @@ export function useCloudCreate(opts: { onQuotaChange?: () => void } = {}) {} else {picked = (kind === 'video' ? s.cloudVideoModel : s.cloudImageModel) || defaultCloudModel(kind)?.id || ''}- // A Studio pick runs its own schema-driven endpoint (op: 'studio'), never- // through modelForOp's classic op coercion, STUDIO_MODELS is a disjoint- // registry the classic picker functions do not know about.- const studioModel = !characterUse && isStudioModel(picked) ? picked : undefined- if (studioModel) kind = STUDIO_MODELS[studioModel].kind// Coerce a leftover/incapable pick onto a model that can run this op// (edit→i2i, animate→i2v, video→t2v, specialized ops→their family) so the- // submit never 400s.- const model = studioModel ?? modelForOp(kind, op, picked)+ // submit never 400s. Seit 02.10.2026 fuehren Image, Edit, Video und Animate+ // auch Studio-Modelle (Web-Paritaet), also laeuft die Wahl IMMER durch+ // modelForOp, und erst das Ergebnis sagt, ob der Lauf ein Studio-Lauf ist.+ // Eine Rollen-Absicht behaelt ihre Wahl, "Standard" in Enhance Image ist+ // kein Modell, sondern der feste Endpunkt von frueher: er laeuft wie vorher+ // unter dem Bildmodell, das der Server ignoriert.+ const model = roleIntent+ ? (picked === STANDARD_UPSCALE ? (defaultCloudModel(kind)?.id ?? picked) : picked)+ : modelForOp(kind, op, picked)+ // A Studio pick runs its own schema-driven endpoint (op: 'studio'), never a+ // classic op shape. The character use-surface stays on its fixed -lora family.+ const studioModel = !characterUse && isStudioModel(model) ? model : undefined+ if (studioModel) kind = STUDIO_MODELS[studioModel].kind+ // The result carries the customer's own pick. A utility op that swapped a+ // Studio pick out (utilityOpModel), and Enhance Image on "Standard", must+ // not make addToGallery jump the picker to the default or overwrite a+ // saved choice.+ const galleryModel = roleIntent+ ? (picked === STANDARD_UPSCALE ? (s.cloudImageModel || defaultCloudModel('image')?.id || model) : model)+ : model !== picked && model === utilityOpModel(kind, op, picked) ? picked : models.setError(null)if (!cloudMediaLive()) {@@ -391,7 +406,10 @@ export function useCloudCreate(opts: { onQuotaChange?: () => void } = {}) {cfg: s.cfgScale,seed: runSeed,}- if (kind === 'video' && !bare) {+ // Ein Studio-Modell traegt Laenge und Aufloesung in studio_options (sein+ // Schema), nicht in frames/fps: bookedVideoSeconds kennt nur die klassischen+ // Laengenlisten und wuerfe fuer ein Studio-Modell einen Fehler.+ if (kind === 'video' && !bare && !studioModel) {// dd29f359 (Portplan Abschnitt 6), review A2 (Runde 2): book exactly// a length the model prices, read from the SAME catalog-first list// LaneControls shows (effectiveVideoDurations, in video-duration.ts),@@ -417,7 +435,11 @@ export function useCloudCreate(opts: { onQuotaChange?: () => void } = {}) {if (characterUse && s.selectedCharacter) {params.loras = [{ id: s.selectedCharacter.id }]}- if (op === 'edit') {+ // Instruction editors (maskless in the catalog, every studio editor) edit+ // from the prompt alone: no mask demand, no inpaint knobs, and a leftover+ // painted mask is not sent (the endpoint has no input for it).+ const editIsMaskless = op === 'edit' && !editNeedsMask(model)+ if (op === 'edit' && !studioModel) {params.denoise = s.denoiseparams.grow_mask_by = s.growMaskBy// The mask is exported at the SOURCE image's resolution, so the output@@ -429,7 +451,8 @@ export function useCloudCreate(opts: { onQuotaChange?: () => void } = {}) {params.height = s.source.height}}- if (op === 'upscale') {+ // Ein Studio-Upscaler traegt sein Ziel in studio_options.+ if (op === 'upscale' && !studioModel) {params.target_resolution = s.targetResolution}// ImageRef.url is always a data URL preview; the cloud path re-uploads@@ -439,8 +462,16 @@ export function useCloudCreate(opts: { onQuotaChange?: () => void } = {}) {// field instead of a fixed param.if (op !== 'generate' && s.source) {params.source_path = await uploadInput(dataUrlToBlob(s.source.url), 'source')+ // Ein Studio-Modell, das eine Bilderliste liest (Edit mit mehreren+ // Vorlagen, Referenz zu Video), bekommt das Standbild der Oberflaeche als+ // einzigen Eintrag. Liest es kein source_path, geht das Bild nur dorthin.+ if (studioModel) {+ const reads = Object.values(STUDIO_MODELS[studioModel].inputs)+ if (reads.includes('image_paths')) params.image_paths = [params.source_path]+ if (!reads.includes('source_path')) delete params.source_path+ }}- if (op === 'edit' || op === 'eraser') {+ if ((op === 'edit' && !editIsMaskless) || op === 'eraser') {if (!s.mask) {s.setError(op === 'eraser'@@ -534,7 +565,7 @@ export function useCloudCreate(opts: { onQuotaChange?: () => void } = {}) {if (studioModel) {s.setProgress(9, 'Confirming the price…')const quoteFields: Record<string, unknown> = {}- for (const k of ['source_path', 'mask_path', 'audio_path', 'audio2_path', 'video_path', 'last_image_path', 'shot_type'] as const) {+ for (const k of ['source_path', 'image_paths', 'mask_path', 'audio_path', 'audio2_path', 'video_path', 'last_image_path', 'shot_type'] as const) {if (params[k] !== undefined) quoteFields[k] = params[k]}const quote = await studioQuote(studioModel, s.prompt, {@@ -633,6 +664,7 @@ export function useCloudCreate(opts: { onQuotaChange?: () => void } = {}) {st.setProgress(100, 'Complete!')st.addToGallery({...galleryItemFromJob(job),+ model: galleryModel,prompt: OP_GALLERY_LABEL[op] ?? s.prompt,label,negativePrompt: s.negativePrompt,diff --git a/src/lib/render/__tests__/alter-server.test.ts b/src/lib/render/__tests__/alter-server.test.tsnew file mode 100644index 00000000..87794767--- /dev/null+++ b/src/lib/render/__tests__/alter-server.test.ts@@ -0,0 +1,142 @@+// Der Desktop gegen den Server von HEUTE (Produktion vor dem 02.10.2026).+//+// Der Desktop liest den Cloud-Katalog vom Server (`/api/jobs/catalog?v=2`) und+// bringt eine eigene Studio-Registrierung mit. Der Server von heute kennt die 39+// neuen Modelle nicht und liefert weder `tier` noch `weights`. Dann gilt:+// 1. Kein Modell, das der Server nicht fuehrt, steht in irgendeinem Waehler,+// in keiner Rolle und in keiner Unterkategorie, denn ein Start dort+// scheiterte.+// 2. Jedes Modell ohne Stufe ist neutral: standard, keine Marke, keine+// Zwischenzeile, die gewohnte Reihenfolge.+// 3. Nichts bricht: jeder Waehler hat Eintraege, jede Rolle einen Wert.+//+// Der alte Katalog ist aus den Ids gebaut, die der Web-Stand 293578b2 geliefert+// hat (fixtures/katalog-vor-02-10-2026.json), also keine ausgedachte Liste.++import { beforeEach, describe, expect, it } from 'vitest'+import { alterServer, neueIds, neuerServer } from './fixtures/test-catalogs'+import { intentPickerModels, resolveIntentPick, startImageCount, studioPickFor } from '../create-studio'+import { ALL_ROLES, presetModels } from '../preset-models'+import { sortByTier, tierGroup, tierMarks } from '../model-tier'+import {+ animatePickerModels, cloudModelsFor, editCapableModels, modelForOp, studioOnlyImageModels, useCloudCatalogStore,+ videoPickerModels,+} from '../../../stores/cloudCatalogStore'++describe('der alte Katalog ist wirklich der alte', () => {+ it('kein Eintrag traegt tier oder weights, und die neuen Modelle fehlen', () => {+ const alt = alterServer()+ expect(alt.length).toBe(104)+ for (const m of alt) {+ expect(m.tier, m.id).toBeUndefined()+ expect(m.weights, m.id).toBeUndefined()+ }+ const ids = new Set(alt.map((m) => m.id))+ expect(neueIds()).toHaveLength(39)+ for (const id of neueIds()) expect(ids.has(id), id).toBe(false)+ // Der neue Katalog hat dagegen alles.+ expect(neuerServer().length).toBeGreaterThanOrEqual(alt.length + 39)+ })+})++describe('mit dem Katalog des alten Servers', () => {+ beforeEach(() => { useCloudCatalogStore.setState({ models: alterServer() }) })++ it('kennt der Katalog Studio (quote_required), nur eben ohne die neuen Modelle', () => {+ expect(useCloudCatalogStore.getState().models.some((m) => m.quote_required)).toBe(true)+ })++ it('bietet kein Waehler ein Modell an, das der Server nicht fuehrt', () => {+ const bekannt = new Set(alterServer().map((m) => m.id))+ const waehler: Record<string, { id: string }[]> = {+ image: [...cloudModelsFor('image'), ...studioOnlyImageModels()],+ edit: editCapableModels(),+ video: videoPickerModels(),+ animate: animatePickerModels(),+ }+ for (const intent of ['lipsync', 'music', 'extend', 'motion', 'video_upscale', 'upscale'] as const) {+ waehler[intent] = intentPickerModels(intent).filter((m) => m.id !== 'upscale-standard')+ }+ for (const role of ALL_ROLES) waehler[`rolle ${role}`] = presetModels(role)+ for (const [name, liste] of Object.entries(waehler)) {+ for (const m of liste) expect(bekannt.has(m.id), `${name}/${m.id}`).toBe(true)+ for (const id of neueIds()) expect(liste.map((m) => m.id), `${name}/${id}`).not.toContain(id)+ }+ })++ it('jeder Waehler hat Eintraege, und die klassischen Modelle stehen weiter vorn', () => {+ expect(cloudModelsFor('image').length).toBeGreaterThan(5)+ expect(editCapableModels().map((m) => m.id).slice(0, 2)).toEqual(['flux-dev', 'qwen-image-edit'])+ expect(videoPickerModels()[0].id).toBe('wan-2.2-720p')+ expect(animatePickerModels()[0].id).toBe('wan-2.2-720p')+ for (const intent of ['lipsync', 'music', 'extend', 'motion', 'video_upscale'] as const) {+ expect(intentPickerModels(intent).length, intent).toBeGreaterThan(0)+ }+ // Enhance Image hat nur den Standard: kein Waehler noetig, der Composer zeigt keinen.+ expect(intentPickerModels('upscale').map((m) => m.id)).toEqual(['upscale-standard'])+ })++ it('jede Rolle liefert eine Wahl, die zum alten Server passt', () => {+ for (const intent of ['lipsync', 'music', 'extend', 'motion', 'video_upscale'] as const) {+ const pick = resolveIntentPick(intent, 'flux-3-extend')+ expect(alterServer().some((m) => m.id === pick), `${intent}/${pick}`).toBe(true)+ }+ })++ it('stellt jedes Modell neutral dar: keine Marke, keine Zwischenzeile, Reihenfolge wie bisher', () => {+ const listen = [+ cloudModelsFor('image'), editCapableModels(), videoPickerModels(), animatePickerModels(),+ intentPickerModels('music'), intentPickerModels('extend'), intentPickerModels('motion'),+ ]+ for (const liste of listen) {+ expect(liste.length).toBeGreaterThan(0)+ for (const m of liste) {+ expect(tierMarks(m), m.id).toEqual([])+ expect(tierGroup(m), m.id).toBeUndefined()+ }+ expect(sortByTier(liste).map((m) => m.id)).toEqual(liste.map((m) => m.id))+ }+ })++ it('keine Studio-Wahl fuer ein Modell, das der Server nicht kennt, auch nicht aus einer gespeicherten Wahl', () => {+ const state = { cloudImageModel: 'flux-3', cloudVideoModel: 'minimax-h3-t2v', cloudOpModel: 'yue2' }+ expect(studioPickFor('image', state)).toBeUndefined()+ expect(studioPickFor('video', state)).toBeUndefined()+ expect(studioPickFor('music', state)).toBeUndefined()+ expect(modelForOp('image', 'generate', 'flux-3')).not.toBe('flux-3')+ expect(modelForOp('video', 'generate', 'minimax-h3-t2v')).not.toBe('minimax-h3-t2v')+ })++ it('ein Studio-Modell, das der Server schon hatte, bleibt waehlbar', () => {+ expect(animatePickerModels().map((m) => m.id)).toContain('minimax-h3')+ expect(studioPickFor('animate', { cloudImageModel: '', cloudVideoModel: 'minimax-h3', cloudOpModel: '' })).toBe('minimax-h3')+ expect(editCapableModels().map((m) => m.id)).toContain('minimax-h3-edit')+ })+})++describe('mit dem Katalog des neuen Servers und der Studio-Wahl', () => {+ beforeEach(() => { useCloudCatalogStore.setState({ models: neuerServer() }) })++ it('studioPickFor erkennt Studio-Modelle in Image, Edit, Video, Animate und Enhance Image', () => {+ const leer = { cloudImageModel: '', cloudVideoModel: '', cloudOpModel: '' }+ expect(studioPickFor('image', { ...leer, cloudImageModel: 'flux-3' })).toBe('flux-3')+ expect(studioPickFor('edit', { ...leer, cloudImageModel: 'flux-3-edit' })).toBe('flux-3-edit')+ expect(studioPickFor('video', { ...leer, cloudVideoModel: 'ltx-2.5-t2v' })).toBe('ltx-2.5-t2v')+ expect(studioPickFor('animate', { ...leer, cloudVideoModel: 'ltx-2.5-i2v' })).toBe('ltx-2.5-i2v')+ expect(studioPickFor('upscale', { ...leer, cloudOpModel: 'seedvr2-image' })).toBe('seedvr2-image')+ expect(studioPickFor('upscale', { ...leer, cloudOpModel: 'upscale-standard' })).toBeUndefined()+ // Ein klassisches Modell ist keine Studio-Wahl, der Character-Weg nie.+ expect(studioPickFor('image', { ...leer, cloudImageModel: 'flux-schnell' })).toBeUndefined()+ expect(studioPickFor('character', { ...leer, cloudOpModel: 'flux-3' })).toBeUndefined()+ // Ein Editor aus dem Edit-Tab ist im Bild-Tab keine Wahl.+ expect(studioPickFor('image', { ...leer, cloudImageModel: 'flux-3-edit' })).toBeUndefined()+ })++ it('die Bildzahl des Starts: ein Bild bei Modellen, die nur Bilder lesen, sonst keine', () => {+ expect(startImageCount('minimax-h3-ref')).toBe(1)+ expect(startImageCount('flux-3-edit')).toBe(1)+ expect(startImageCount('minimax-h3-t2v')).toBeUndefined()+ expect(startImageCount('flux-3-video-edit')).toBeUndefined()+ expect(startImageCount('gibt-es-nicht')).toBeUndefined()+ })+})diff --git a/src/lib/render/__tests__/catalog-tier.test.ts b/src/lib/render/__tests__/catalog-tier.test.tsnew file mode 100644index 00000000..fcdac10d--- /dev/null+++ b/src/lib/render/__tests__/catalog-tier.test.ts@@ -0,0 +1,117 @@+// Stufe und Herkunft jedes Cloud-Modells (02.10.2026, Entscheid von David),+// im Desktop.+//+// `tier` ordnet die Waehler, `weights` sagt, woher das Modell stammt. Im Web+// traegt jedes Modell beides. Der Desktop hat zwei Quellen: den Notvorrat+// (CLOUD_MODEL_SEED, ohne Netz) und die mitgelieferte Studio-Registrierung+// (studio-models.json, byteidentisch zum Web). Beide muessen vollstaendig sein,+// sonst steht ein Modell ungeordnet und ohne Herkunft im Waehler, sobald der+// Server die Felder liefert.++import { beforeEach, describe, expect, it } from 'vitest'+import { readFileSync } from 'node:fs'+import { join } from 'node:path'+import { CLOUD_MODEL_SEED } from '../cloud-models'+import { STUDIO_MODELS } from '../studio-contract'+import { intentPickerModels } from '../create-studio'+import { presetModels } from '../preset-models'+import { sortByTier } from '../model-tier'+import {+ animatePickerModels, cloudModelsFor, editCapableModels, studioOnlyImageModels, useCloudCatalogStore, videoPickerModels,+} from '../../../stores/cloudCatalogStore'+import { neuerServer } from './fixtures/test-catalogs'+import katalogVor from './fixtures/katalog-vor-02-10-2026.json'++const TIERS = ['best', 'standard', 'older']+const WEIGHTS = ['open', 'open-family', 'closed']++describe('jedes Cloud-Modell traegt Stufe und Herkunft', () => {+ it('kein Eintrag des Notvorrats ohne beide Felder, und beide Werte sind erlaubt', () => {+ expect(CLOUD_MODEL_SEED.length).toBeGreaterThan(40)+ for (const m of CLOUD_MODEL_SEED) {+ expect(TIERS, `${m.id}.tier`).toContain(m.tier)+ expect(WEIGHTS, `${m.id}.weights`).toContain(m.weights)+ }+ })++ it('kein Studio-Eintrag der Registrierung ohne beide Felder, auch nicht im Rohtext', () => {+ const roh = JSON.parse(readFileSync(join(process.cwd(), 'src/lib/render/studio-models.json'), 'utf8')) as Record<string, { tier?: string; weights?: string }>+ for (const [id, m] of Object.entries(roh)) {+ expect(TIERS, `${id}.tier`).toContain(m.tier)+ expect(WEIGHTS, `${id}.weights`).toContain(m.weights)+ }+ expect(Object.keys(roh)).toEqual(Object.keys(STUDIO_MODELS))+ })++ it('der Katalog des neuen Servers traegt beide Felder an jedem Eintrag', () => {+ const katalog = neuerServer()+ expect(katalog.length).toBeGreaterThan(100)+ for (const m of katalog) {+ expect(TIERS, `${m.id}.tier`).toContain(m.tier)+ expect(WEIGHTS, `${m.id}.weights`).toContain(m.weights)+ }+ })++ it('ein Studio-Zwilling traegt dieselbe Einstufung wie sein klassischer Bruder', () => {+ const zwillinge = Object.entries(STUDIO_MODELS).filter(([, m]) => m.sourceModel)+ expect(zwillinge.length).toBeGreaterThan(0)+ for (const [id, m] of zwillinge) {+ const klassisch = CLOUD_MODEL_SEED.find((c) => c.id === m.sourceModel)!+ expect(klassisch, id).toBeDefined()+ expect({ tier: m.tier, weights: m.weights }, id).toEqual({ tier: klassisch.tier, weights: klassisch.weights })+ }+ })++ it('stuft die benannten Modelle so ein, wie David es vorgegeben hat', () => {+ const t = (id: string) => neuerServer().find((m) => m.id === id)!+ for (const id of ['minimax-h3', 'wan-3.0', 'z-image', 'z-image-turbo', 'seedance-2.5']) expect(t(id).tier, id).toBe('best')+ for (const id of ['flux-schnell', 'flux-dev', 'qwen-image', 'hidream', 'hunyuan-image', 'wan-2.2-720p', 'wan-2.2-fast', 'ltx-2', 'ltx-2.3', 'hunyuan-video']) {+ expect(t(id).tier, id).toBe('older')+ }+ for (const id of ['wan-3.0', 'qwen-image-3', 'qwen-image-3-pro', 'flux-3', 'ideogram-4.5']) expect(t(id).weights, id).toBe('open-family')+ for (const id of ['seedance-2.5', 'seedance-2.5-spicy', 'seedream-5-edit', 'vidu-q3-spicy', 'heygen-twin', 'eleven-v3', 'mureka-song', 'minimax-music', 'minimax-speech-hd', 'lipsync-3-avatar', 'lipsync-2', 'pixverse-extend']) {+ expect(t(id).weights, id).toBe('closed')+ }+ for (const id of ['minimax-h3', 'z-image', 'cosmos-3-super', 'cosmos-3-super-i2v', 'ltx-2.5-t2v', 'yue2']) expect(t(id).weights, id).toBe('open')+ })++ it('der Katalog behaelt alles, was er hatte: nichts wurde entfernt', () => {+ const jetzt = new Set(neuerServer().map((m) => m.id))+ expect(katalogVor.length).toBeGreaterThan(100)+ for (const id of katalogVor) expect(jetzt.has(id), id).toBe(true)+ })+})++describe('die Waehler ordnen nach Stufe', () => {+ beforeEach(() => { useCloudCatalogStore.setState({ models: neuerServer() }) })++ const WAEHLER: Record<string, () => { id: string; tier?: 'best' | 'standard' | 'older' }[]> = {+ image: () => [...cloudModelsFor('image'), ...studioOnlyImageModels()],+ edit: () => editCapableModels(),+ video: () => videoPickerModels(),+ animate: () => animatePickerModels(),+ music: () => intentPickerModels('music'),+ extend: () => intentPickerModels('extend'),+ video_upscale: () => intentPickerModels('video_upscale'),+ upscale: () => intentPickerModels('upscale'),+ restyle: () => presetModels('restyle'),+ }++ for (const [name, liste] of Object.entries(WAEHLER)) {+ it(`im Waehler ${name}: Beste zuerst, Aeltere zuletzt, kein Modell fehlt`, () => {+ const roh = liste()+ const sortiert = sortByTier(roh)+ expect(sortiert).toHaveLength(roh.length)+ expect(new Set(sortiert.map((m) => m.id))).toEqual(new Set(roh.map((m) => m.id)))+ const rang = sortiert.map((m) => ['best', 'standard', 'older'].indexOf(m.tier ?? 'standard'))+ expect(rang).toEqual([...rang].sort((a, b) => a - b))+ })+ }++ it('die Waehler haben beides, damit die Sortierung etwas bewirkt', () => {+ const tiers = new Set(WAEHLER.video().map((m) => m.tier))+ expect(tiers.has('best') && tiers.has('older')).toBe(true)+ const bild = new Set(WAEHLER.image().map((m) => m.tier))+ expect(bild.has('best') && bild.has('older')).toBe(true)+ })+})diff --git a/src/lib/render/__tests__/create-studio.test.ts b/src/lib/render/__tests__/create-studio.test.tsindex e6d807ee..58851401 100644--- a/src/lib/render/__tests__/create-studio.test.ts+++ b/src/lib/render/__tests__/create-studio.test.ts@@ -17,10 +17,11 @@ import {} from '../create-studio'import { STUDIO_MODELS } from '../studio-contract'import { CLOUD_MODEL_SEED } from '../cloud-models'+import { neuerServer } from './fixtures/test-catalogs'import { opPickerModels, useCloudCatalogStore } from '../../../stores/cloudCatalogStore'import type { CreateIntent } from '../../../stores/createStore'-const MIT_ROLLE: StudioIntent[] = ['lipsync', 'music', 'extend', 'motion', 'video_upscale']+const MIT_ROLLE: StudioIntent[] = ['lipsync', 'music', 'extend', 'motion', 'video_upscale', 'upscale']// Review B1 (Runde 2): die ganze Datei prueft den Fall "der lebende Katalog// kennt Studio" (`quote_required` auf mindestens einem Eintrag). Das ist@@ -29,7 +30,7 @@ const MIT_ROLLE: StudioIntent[] = ['lipsync', 'music', 'extend', 'motion', 'vide// Verhalten) hat einen eigenen Fall unten ("faellt ohne quote_required im// Katalog auf die klassischen Mitglieder zurueck").beforeEach(() => {- useCloudCatalogStore.setState({ models: [...CLOUD_MODEL_SEED, { id: 'test-studio-marker', label: 'x', kind: 'image', quote_required: true }] })+ useCloudCatalogStore.setState({ models: neuerServer() })})describe('die Unterkategorien von Create fahren dieselben Modelle wie die Presets', () => {@@ -106,7 +107,7 @@ describe('die Unterkategorien von Create fahren dieselben Modelle wie die Preset})it('gibt keiner Absicht ohne Rolle eine Auswahl', () => {- for (const intent of ['image', 'video', 'animate', 'edit', 'character', 'upscale'] as CreateIntent[]) {+ for (const intent of ['image', 'video', 'animate', 'edit', 'character'] as CreateIntent[]) {expect(intentRoles(intent), intent).toEqual([])expect(intentPickerModels(intent), intent).toEqual([])}diff --git a/src/lib/render/__tests__/fixtures/katalog-vor-02-10-2026.json b/src/lib/render/__tests__/fixtures/katalog-vor-02-10-2026.jsonnew file mode 100644index 00000000..081515c0--- /dev/null+++ b/src/lib/render/__tests__/fixtures/katalog-vor-02-10-2026.json@@ -0,0 +1,106 @@+[+ "open-video",+ "open-video-lora",+ "mmaudio-v2",+ "hunyuan-video-foley",+ "infinitetalk",+ "infinitetalk-multi",+ "qwen-image-angles",+ "minimax-h3-edit",+ "scail-2",+ "wan-ditto",+ "seedance-2.5",+ "minimax-h3",+ "wan-3.0",+ "wan-3.0-spicy",+ "preset-chroma",+ "preset-prefect-pony",+ "preset-neta-lumina",+ "preset-wan-2.2-spicy",+ "preset-wan-2.7-spicy",+ "preset-wan-2.2-spicy-extend",+ "preset-qwen3-tts",+ "seedance-2.5-avatar",+ "longcat-avatar",+ "longcat-avatar-multi",+ "lipsync-3-avatar",+ "heygen-twin",+ "seed-speech-tts",+ "chatterbox-tts",+ "minimax-speech-hd",+ "minimax-speech-turbo",+ "eleven-v3",+ "inworld-tts",+ "minimax-music",+ "mureka-song",+ "eleven-music",+ "wan-3.0-prime",+ "wan-3.0-prime-spicy",+ "seedance-2.5-turbo",+ "wan-2.2-animate-2",+ "seedance-2.5-extend",+ "wan-3.0-extend",+ "seedream-5-edit",+ "qwen-image-3-edit",+ "flashvsr",+ "video-upscaler-pro",+ "ultimate-video-upscaler",+ "crystal-upscaler",+ "flux-3-upscale",+ "video-upscaler",+ "z-image",+ "nucleus-image",+ "jib-mix-qwen",+ "wan-2.2-realism",+ "flux-schnell",+ "flux-dev",+ "flux-2-dev",+ "qwen-image",+ "hidream",+ "hunyuan-image",+ "z-image-turbo",+ "chroma",+ "prefect-pony",+ "neta-lumina",+ "wan-2.2-720p",+ "wan-2.2-fast",+ "ltx-2",+ "hunyuan-video",+ "ltx-2.3",+ "wan-2.2-spicy",+ "ltx-2.3-spicy",+ "wan-2.6-spicy",+ "wan-2.7-spicy",+ "minimax-h3-spicy",+ "seedance-1.5-pro-spicy",+ "seedance-2.5-spicy",+ "seedance-2.0-spicy",+ "seedance-2.0-fast-spicy",+ "vidu-q3-spicy",+ "flux-lora-trainer",+ "z-image-lora-trainer",+ "qwen-image-lora-trainer",+ "flux-schnell-lora",+ "flux-dev-lora-ultra-fast",+ "z-image-turbo-lora",+ "z-image-base-lora",+ "qwen-image-lora",+ "infinitetalk-fast",+ "p-video-avatar",+ "latentsync",+ "lipsync-2",+ "qwen3-tts",+ "qwen3-tts-clone",+ "qwen3-tts-design",+ "ace-step",+ "ace-step-1.5",+ "sonilo-music",+ "wan-2.2-spicy-extend",+ "ltx-2-extend",+ "pixverse-extend",+ "wan-2.2-animate",+ "steady-dancer",+ "p-video-animate",+ "dreamactor-v2",+ "qwen-image-edit"+]\ No newline at end of filediff --git a/src/lib/render/__tests__/fixtures/studio-prices-2026-10-02.json b/src/lib/render/__tests__/fixtures/studio-prices-2026-10-02.jsonnew file mode 100644index 00000000..cc6595bc--- /dev/null+++ b/src/lib/render/__tests__/fixtures/studio-prices-2026-10-02.json@@ -0,0 +1,3222 @@+[+ {+ "model": "qwen-image-3-pro",+ "options": {+ "resolution": "1k"+ },+ "promptLength": 100,+ "usd": 0.04+ },+ {+ "model": "qwen-image-3-pro",+ "options": {+ "resolution": "2k"+ },+ "promptLength": 100,+ "usd": 0.075+ },+ {+ "model": "qwen-image-3-pro-edit",+ "options": {+ "resolution": "1k"+ },+ "promptLength": 100,+ "usd": 0.043,+ "imageCount": 1+ },+ {+ "model": "qwen-image-3-pro-edit",+ "options": {+ "resolution": "1k"+ },+ "promptLength": 100,+ "usd": 0.046,+ "imageCount": 2+ },+ {+ "model": "qwen-image-3-pro-edit",+ "options": {+ "resolution": "1k"+ },+ "promptLength": 100,+ "usd": 0.049,+ "imageCount": 3+ },+ {+ "model": "qwen-image-3-pro-edit",+ "options": {+ "resolution": "2k"+ },+ "promptLength": 100,+ "usd": 0.078,+ "imageCount": 1+ },+ {+ "model": "qwen-image-3-pro-edit",+ "options": {+ "resolution": "2k"+ },+ "promptLength": 100,+ "usd": 0.081,+ "imageCount": 2+ },+ {+ "model": "qwen-image-3-pro-edit",+ "options": {+ "resolution": "2k"+ },+ "promptLength": 100,+ "usd": 0.084,+ "imageCount": 3+ },+ {+ "model": "qwen-image-3",+ "options": {+ "resolution": "1k"+ },+ "promptLength": 100,+ "usd": 0.03+ },+ {+ "model": "qwen-image-3",+ "options": {+ "resolution": "2k"+ },+ "promptLength": 100,+ "usd": 0.03+ },+ {+ "model": "qwen-image-2.1",+ "options": {+ "resolution": "1k"+ },+ "promptLength": 100,+ "usd": 0.02+ },+ {+ "model": "qwen-image-2.1",+ "options": {+ "resolution": "1.5k"+ },+ "promptLength": 100,+ "usd": 0.04+ },+ {+ "model": "qwen-image-2.1",+ "options": {+ "resolution": "2k"+ },+ "promptLength": 100,+ "usd": 0.08+ },+ {+ "model": "qwen-image-2.1-edit",+ "options": {+ "resolution": "1k"+ },+ "promptLength": 100,+ "usd": 0.03,+ "imageCount": 1+ },+ {+ "model": "qwen-image-2.1-edit",+ "options": {+ "resolution": "1k"+ },+ "promptLength": 100,+ "usd": 0.04,+ "imageCount": 2+ },+ {+ "model": "qwen-image-2.1-edit",+ "options": {+ "resolution": "1k"+ },+ "promptLength": 100,+ "usd": 0.05,+ "imageCount": 3+ },+ {+ "model": "qwen-image-2.1-edit",+ "options": {+ "resolution": "1.5k"+ },+ "promptLength": 100,+ "usd": 0.06,+ "imageCount": 1+ },+ {+ "model": "qwen-image-2.1-edit",+ "options": {+ "resolution": "1.5k"+ },+ "promptLength": 100,+ "usd": 0.075,+ "imageCount": 2+ },+ {+ "model": "qwen-image-2.1-edit",+ "options": {+ "resolution": "1.5k"+ },+ "promptLength": 100,+ "usd": 0.09,+ "imageCount": 3+ },+ {+ "model": "qwen-image-2.1-edit",+ "options": {+ "resolution": "2k"+ },+ "promptLength": 100,+ "usd": 0.12,+ "imageCount": 1+ },+ {+ "model": "qwen-image-2.1-edit",+ "options": {+ "resolution": "2k"+ },+ "promptLength": 100,+ "usd": 0.14,+ "imageCount": 2+ },+ {+ "model": "qwen-image-2.1-edit",+ "options": {+ "resolution": "2k"+ },+ "promptLength": 100,+ "usd": 0.16,+ "imageCount": 3+ },+ {+ "model": "flux-3",+ "options": {+ "resolution": "1k"+ },+ "promptLength": 100,+ "usd": 0.05+ },+ {+ "model": "flux-3",+ "options": {+ "resolution": "2k"+ },+ "promptLength": 100,+ "usd": 0.12+ },+ {+ "model": "flux-3",+ "options": {+ "resolution": "4k"+ },+ "promptLength": 100,+ "usd": 0.65+ },+ {+ "model": "flux-3-edit",+ "options": {+ "resolution": "1k"+ },+ "promptLength": 100,+ "usd": 0.05,+ "imageCount": 1+ },+ {+ "model": "flux-3-edit",+ "options": {+ "resolution": "1k"+ },+ "promptLength": 100,+ "usd": 0.05,+ "imageCount": 2+ },+ {+ "model": "flux-3-edit",+ "options": {+ "resolution": "1k"+ },+ "promptLength": 100,+ "usd": 0.05,+ "imageCount": 3+ },+ {+ "model": "flux-3-edit",+ "options": {+ "resolution": "2k"+ },+ "promptLength": 100,+ "usd": 0.12,+ "imageCount": 1+ },+ {+ "model": "flux-3-edit",+ "options": {+ "resolution": "2k"+ },+ "promptLength": 100,+ "usd": 0.12,+ "imageCount": 2+ },+ {+ "model": "flux-3-edit",+ "options": {+ "resolution": "2k"+ },+ "promptLength": 100,+ "usd": 0.12,+ "imageCount": 3+ },+ {+ "model": "flux-3-edit",+ "options": {+ "resolution": "4k"+ },+ "promptLength": 100,+ "usd": 0.65,+ "imageCount": 1+ },+ {+ "model": "flux-3-edit",+ "options": {+ "resolution": "4k"+ },+ "promptLength": 100,+ "usd": 0.65,+ "imageCount": 2+ },+ {+ "model": "flux-3-edit",+ "options": {+ "resolution": "4k"+ },+ "promptLength": 100,+ "usd": 0.65,+ "imageCount": 3+ },+ {+ "model": "flux-2-klein-9b",+ "options": {},+ "promptLength": 100,+ "usd": 0.01+ },+ {+ "model": "krea-2-large",+ "options": {+ "creativity": "raw"+ },+ "promptLength": 100,+ "usd": 0.06+ },+ {+ "model": "krea-2-large",+ "options": {+ "creativity": "medium"+ },+ "promptLength": 100,+ "usd": 0.06+ },+ {+ "model": "krea-2-large",+ "options": {+ "creativity": "high"+ },+ "promptLength": 100,+ "usd": 0.06+ },+ {+ "model": "cosmos-3-super",+ "options": {+ "size": "1:1",+ "num_inference_steps": 28+ },+ "promptLength": 100,+ "usd": 0.04+ },+ {+ "model": "cosmos-3-super",+ "options": {+ "size": "1:1",+ "num_inference_steps": 50+ },+ "promptLength": 100,+ "usd": 0.04+ },+ {+ "model": "cosmos-3-super",+ "options": {+ "size": "16:9",+ "num_inference_steps": 28+ },+ "promptLength": 100,+ "usd": 0.04+ },+ {+ "model": "cosmos-3-super",+ "options": {+ "size": "16:9",+ "num_inference_steps": 50+ },+ "promptLength": 100,+ "usd": 0.04+ },+ {+ "model": "ideogram-4.5",+ "options": {+ "quality": "low",+ "resolution": "1k"+ },+ "promptLength": 100,+ "usd": 0.03+ },+ {+ "model": "ideogram-4.5",+ "options": {+ "quality": "low",+ "resolution": "2k"+ },+ "promptLength": 100,+ "usd": 0.03+ },+ {+ "model": "ideogram-4.5",+ "options": {+ "quality": "medium",+ "resolution": "1k"+ },+ "promptLength": 100,+ "usd": 0.06+ },+ {+ "model": "ideogram-4.5",+ "options": {+ "quality": "medium",+ "resolution": "2k"+ },+ "promptLength": 100,+ "usd": 0.06+ },+ {+ "model": "ideogram-4.5",+ "options": {+ "quality": "high",+ "resolution": "1k"+ },+ "promptLength": 100,+ "usd": 0.22+ },+ {+ "model": "ideogram-4.5",+ "options": {+ "quality": "high",+ "resolution": "2k"+ },+ "promptLength": 100,+ "usd": 0.22+ },+ {+ "model": "ideogram-4.5-edit",+ "options": {+ "quality": "very_low",+ "edit_precision": "regular"+ },+ "promptLength": 100,+ "usd": 0.008+ },+ {+ "model": "ideogram-4.5-edit",+ "options": {+ "quality": "very_low",+ "edit_precision": "high"+ },+ "promptLength": 100,+ "usd": 0.008+ },+ {+ "model": "ideogram-4.5-edit",+ "options": {+ "quality": "low",+ "edit_precision": "regular"+ },+ "promptLength": 100,+ "usd": 0.03+ },+ {+ "model": "ideogram-4.5-edit",+ "options": {+ "quality": "low",+ "edit_precision": "high"+ },+ "promptLength": 100,+ "usd": 0.03+ },+ {+ "model": "ideogram-4.5-edit",+ "options": {+ "quality": "medium",+ "edit_precision": "regular"+ },+ "promptLength": 100,+ "usd": 0.06+ },+ {+ "model": "ideogram-4.5-edit",+ "options": {+ "quality": "medium",+ "edit_precision": "high"+ },+ "promptLength": 100,+ "usd": 0.06+ },+ {+ "model": "ideogram-4.5-edit",+ "options": {+ "quality": "high",+ "edit_precision": "regular"+ },+ "promptLength": 100,+ "usd": 0.22+ },+ {+ "model": "ideogram-4.5-edit",+ "options": {+ "quality": "high",+ "edit_precision": "high"+ },+ "promptLength": 100,+ "usd": 0.22+ },+ {+ "model": "hidream-o1",+ "options": {+ "size": "1024*1024"+ },+ "promptLength": 100,+ "usd": 0.04+ },+ {+ "model": "hidream-o1",+ "options": {+ "size": "2048*2048"+ },+ "promptLength": 100,+ "usd": 0.04+ },+ {+ "model": "hidream-o1",+ "options": {+ "size": "4096*4096"+ },+ "promptLength": 100,+ "usd": 0.04+ },+ {+ "model": "hidream-o1-edit",+ "options": {+ "size": "1024*1024"+ },+ "promptLength": 100,+ "usd": 0.04,+ "imageCount": 1+ },+ {+ "model": "hidream-o1-edit",+ "options": {+ "size": "1024*1024"+ },+ "promptLength": 100,+ "usd": 0.04,+ "imageCount": 2+ },+ {+ "model": "hidream-o1-edit",+ "options": {+ "size": "1024*1024"+ },+ "promptLength": 100,+ "usd": 0.04,+ "imageCount": 3+ },+ {+ "model": "hidream-o1-edit",+ "options": {+ "size": "2048*2048"+ },+ "promptLength": 100,+ "usd": 0.04,+ "imageCount": 1+ },+ {+ "model": "hidream-o1-edit",+ "options": {+ "size": "2048*2048"+ },+ "promptLength": 100,+ "usd": 0.04,+ "imageCount": 2+ },+ {+ "model": "hidream-o1-edit",+ "options": {+ "size": "2048*2048"+ },+ "promptLength": 100,+ "usd": 0.04,+ "imageCount": 3+ },+ {+ "model": "hunyuan-image-3",+ "options": {+ "size": "1024*1024"+ },+ "promptLength": 100,+ "usd": 0.45+ },+ {+ "model": "hunyuan-image-3",+ "options": {+ "size": "2048*2048"+ },+ "promptLength": 100,+ "usd": 0.45+ },+ {+ "model": "hunyuan-image-3-edit",+ "options": {},+ "promptLength": 100,+ "usd": 0.45,+ "imageCount": 1+ },+ {+ "model": "hunyuan-image-3-edit",+ "options": {},+ "promptLength": 100,+ "usd": 0.45,+ "imageCount": 2+ },+ {+ "model": "ernie-image-turbo",+ "options": {+ "size": "1024*1024"+ },+ "promptLength": 100,+ "usd": 0.03+ },+ {+ "model": "ernie-image-turbo",+ "options": {+ "size": "2048*2048"+ },+ "promptLength": 100,+ "usd": 0.03+ },+ {+ "model": "seedvr2-image",+ "options": {+ "target_resolution": "2k"+ },+ "promptLength": 100,+ "usd": 0.01+ },+ {+ "model": "seedvr2-image",+ "options": {+ "target_resolution": "4k"+ },+ "promptLength": 100,+ "usd": 0.01+ },+ {+ "model": "seedvr2-image",+ "options": {+ "target_resolution": "8k"+ },+ "promptLength": 100,+ "usd": 0.01+ },+ {+ "model": "ltx-2.5-t2v",+ "options": {+ "resolution": "720p",+ "duration": 5+ },+ "promptLength": 100,+ "usd": 0.5+ },+ {+ "model": "ltx-2.5-t2v",+ "options": {+ "resolution": "720p",+ "duration": 6+ },+ "promptLength": 100,+ "usd": 0.6+ },+ {+ "model": "ltx-2.5-t2v",+ "options": {+ "resolution": "720p",+ "duration": 10+ },+ "promptLength": 100,+ "usd": 1+ },+ {+ "model": "ltx-2.5-t2v",+ "options": {+ "resolution": "720p",+ "duration": 20+ },+ "promptLength": 100,+ "usd": 2+ },+ {+ "model": "ltx-2.5-t2v",+ "options": {+ "resolution": "1080p",+ "duration": 5+ },+ "promptLength": 100,+ "usd": 0.7+ },+ {+ "model": "ltx-2.5-t2v",+ "options": {+ "resolution": "1080p",+ "duration": 6+ },+ "promptLength": 100,+ "usd": 0.84+ },+ {+ "model": "ltx-2.5-t2v",+ "options": {+ "resolution": "1080p",+ "duration": 10+ },+ "promptLength": 100,+ "usd": 1.4+ },+ {+ "model": "ltx-2.5-t2v",+ "options": {+ "resolution": "1080p",+ "duration": 20+ },+ "promptLength": 100,+ "usd": 2.8+ },+ {+ "model": "ltx-2.5-t2v",+ "options": {+ "resolution": "2k",+ "duration": 5+ },+ "promptLength": 100,+ "usd": 1.05+ },+ {+ "model": "ltx-2.5-t2v",+ "options": {+ "resolution": "2k",+ "duration": 6+ },+ "promptLength": 100,+ "usd": 1.26+ },+ {+ "model": "ltx-2.5-t2v",+ "options": {+ "resolution": "2k",+ "duration": 10+ },+ "promptLength": 100,+ "usd": 2.1+ },+ {+ "model": "ltx-2.5-t2v",+ "options": {+ "resolution": "2k",+ "duration": 20+ },+ "promptLength": 100,+ "usd": 4.2+ },+ {+ "model": "ltx-2.5-t2v",+ "options": {+ "resolution": "4k",+ "duration": 5+ },+ "promptLength": 100,+ "usd": 1.65+ },+ {+ "model": "ltx-2.5-t2v",+ "options": {+ "resolution": "4k",+ "duration": 6+ },+ "promptLength": 100,+ "usd": 1.98+ },+ {+ "model": "ltx-2.5-t2v",+ "options": {+ "resolution": "4k",+ "duration": 10+ },+ "promptLength": 100,+ "usd": 3.3+ },+ {+ "model": "ltx-2.5-t2v",+ "options": {+ "resolution": "4k",+ "duration": 20+ },+ "promptLength": 100,+ "usd": 6.6+ },+ {+ "model": "ltx-2.5-i2v",+ "options": {+ "resolution": "720p",+ "duration": 5+ },+ "promptLength": 100,+ "usd": 0.5+ },+ {+ "model": "ltx-2.5-i2v",+ "options": {+ "resolution": "720p",+ "duration": 10+ },+ "promptLength": 100,+ "usd": 1+ },+ {+ "model": "ltx-2.5-i2v",+ "options": {+ "resolution": "720p",+ "duration": 20+ },+ "promptLength": 100,+ "usd": 2+ },+ {+ "model": "ltx-2.5-i2v",+ "options": {+ "resolution": "1080p",+ "duration": 5+ },+ "promptLength": 100,+ "usd": 0.7+ },+ {+ "model": "ltx-2.5-i2v",+ "options": {+ "resolution": "1080p",+ "duration": 10+ },+ "promptLength": 100,+ "usd": 1.4+ },+ {+ "model": "ltx-2.5-i2v",+ "options": {+ "resolution": "1080p",+ "duration": 20+ },+ "promptLength": 100,+ "usd": 2.8+ },+ {+ "model": "ltx-2.5-i2v",+ "options": {+ "resolution": "2k",+ "duration": 5+ },+ "promptLength": 100,+ "usd": 1.05+ },+ {+ "model": "ltx-2.5-i2v",+ "options": {+ "resolution": "2k",+ "duration": 10+ },+ "promptLength": 100,+ "usd": 2.1+ },+ {+ "model": "ltx-2.5-i2v",+ "options": {+ "resolution": "2k",+ "duration": 20+ },+ "promptLength": 100,+ "usd": 4.2+ },+ {+ "model": "ltx-2.5-i2v",+ "options": {+ "resolution": "4k",+ "duration": 5+ },+ "promptLength": 100,+ "usd": 1.65+ },+ {+ "model": "ltx-2.5-i2v",+ "options": {+ "resolution": "4k",+ "duration": 10+ },+ "promptLength": 100,+ "usd": 3.3+ },+ {+ "model": "ltx-2.5-i2v",+ "options": {+ "resolution": "4k",+ "duration": 20+ },+ "promptLength": 100,+ "usd": 6.6+ },+ {+ "model": "flux-3-t2v",+ "options": {+ "resolution": "720p",+ "duration": 5,+ "generate_audio": true+ },+ "promptLength": 100,+ "usd": 0.85+ },+ {+ "model": "flux-3-t2v",+ "options": {+ "resolution": "720p",+ "duration": 5,+ "generate_audio": false+ },+ "promptLength": 100,+ "usd": 0.85+ },+ {+ "model": "flux-3-t2v",+ "options": {+ "resolution": "720p",+ "duration": 6,+ "generate_audio": true+ },+ "promptLength": 100,+ "usd": 1.02+ },+ {+ "model": "flux-3-t2v",+ "options": {+ "resolution": "720p",+ "duration": 6,+ "generate_audio": false+ },+ "promptLength": 100,+ "usd": 1.02+ },+ {+ "model": "flux-3-t2v",+ "options": {+ "resolution": "720p",+ "duration": 10,+ "generate_audio": true+ },+ "promptLength": 100,+ "usd": 1.7+ },+ {+ "model": "flux-3-t2v",+ "options": {+ "resolution": "720p",+ "duration": 10,+ "generate_audio": false+ },+ "promptLength": 100,+ "usd": 1.7+ },+ {+ "model": "flux-3-t2v",+ "options": {+ "resolution": "720p",+ "duration": 20,+ "generate_audio": true+ },+ "promptLength": 100,+ "usd": 3.4+ },+ {+ "model": "flux-3-t2v",+ "options": {+ "resolution": "720p",+ "duration": 20,+ "generate_audio": false+ },+ "promptLength": 100,+ "usd": 3.4+ },+ {+ "model": "flux-3-t2v",+ "options": {+ "resolution": "1080p",+ "duration": 5,+ "generate_audio": true+ },+ "promptLength": 100,+ "usd": 1.45+ },+ {+ "model": "flux-3-t2v",+ "options": {+ "resolution": "1080p",+ "duration": 5,+ "generate_audio": false+ },+ "promptLength": 100,+ "usd": 1.45+ },+ {+ "model": "flux-3-t2v",+ "options": {+ "resolution": "1080p",+ "duration": 6,+ "generate_audio": true+ },+ "promptLength": 100,+ "usd": 1.74+ },+ {+ "model": "flux-3-t2v",+ "options": {+ "resolution": "1080p",+ "duration": 6,+ "generate_audio": false+ },+ "promptLength": 100,+ "usd": 1.74+ },+ {+ "model": "flux-3-t2v",+ "options": {+ "resolution": "1080p",+ "duration": 10,+ "generate_audio": true+ },+ "promptLength": 100,+ "usd": 2.9+ },+ {+ "model": "flux-3-t2v",+ "options": {+ "resolution": "1080p",+ "duration": 10,+ "generate_audio": false+ },+ "promptLength": 100,+ "usd": 2.9+ },+ {+ "model": "flux-3-t2v",+ "options": {+ "resolution": "1080p",+ "duration": 20,+ "generate_audio": true+ },+ "promptLength": 100,+ "usd": 5.8+ },+ {+ "model": "flux-3-t2v",+ "options": {+ "resolution": "1080p",+ "duration": 20,+ "generate_audio": false+ },+ "promptLength": 100,+ "usd": 5.8+ },+ {+ "model": "flux-3-i2v",+ "options": {+ "resolution": "720p",+ "duration": 5,+ "generate_audio": true+ },+ "promptLength": 100,+ "usd": 0.85+ },+ {+ "model": "flux-3-i2v",+ "options": {+ "resolution": "720p",+ "duration": 5,+ "generate_audio": false+ },+ "promptLength": 100,+ "usd": 0.85+ },+ {+ "model": "flux-3-i2v",+ "options": {+ "resolution": "720p",+ "duration": 10,+ "generate_audio": true+ },+ "promptLength": 100,+ "usd": 1.7+ },+ {+ "model": "flux-3-i2v",+ "options": {+ "resolution": "720p",+ "duration": 10,+ "generate_audio": false+ },+ "promptLength": 100,+ "usd": 1.7+ },+ {+ "model": "flux-3-i2v",+ "options": {+ "resolution": "720p",+ "duration": 20,+ "generate_audio": true+ },+ "promptLength": 100,+ "usd": 3.4+ },+ {+ "model": "flux-3-i2v",+ "options": {+ "resolution": "720p",+ "duration": 20,+ "generate_audio": false+ },+ "promptLength": 100,+ "usd": 3.4+ },+ {+ "model": "flux-3-i2v",+ "options": {+ "resolution": "1080p",+ "duration": 5,+ "generate_audio": true+ },+ "promptLength": 100,+ "usd": 1.45+ },+ {+ "model": "flux-3-i2v",+ "options": {+ "resolution": "1080p",+ "duration": 5,+ "generate_audio": false+ },+ "promptLength": 100,+ "usd": 1.45+ },+ {+ "model": "flux-3-i2v",+ "options": {+ "resolution": "1080p",+ "duration": 10,+ "generate_audio": true+ },+ "promptLength": 100,+ "usd": 2.9+ },+ {+ "model": "flux-3-i2v",+ "options": {+ "resolution": "1080p",+ "duration": 10,+ "generate_audio": false+ },+ "promptLength": 100,+ "usd": 2.9+ },+ {+ "model": "flux-3-i2v",+ "options": {+ "resolution": "1080p",+ "duration": 20,+ "generate_audio": true+ },+ "promptLength": 100,+ "usd": 5.8+ },+ {+ "model": "flux-3-i2v",+ "options": {+ "resolution": "1080p",+ "duration": 20,+ "generate_audio": false+ },+ "promptLength": 100,+ "usd": 5.8+ },+ {+ "model": "flux-3-start-end",+ "options": {+ "resolution": "720p",+ "duration": 5+ },+ "promptLength": 100,+ "usd": 0.85+ },+ {+ "model": "flux-3-start-end",+ "options": {+ "resolution": "720p",+ "duration": 10+ },+ "promptLength": 100,+ "usd": 1.7+ },+ {+ "model": "flux-3-start-end",+ "options": {+ "resolution": "720p",+ "duration": 20+ },+ "promptLength": 100,+ "usd": 3.4+ },+ {+ "model": "flux-3-start-end",+ "options": {+ "resolution": "1080p",+ "duration": 5+ },+ "promptLength": 100,+ "usd": 1.45+ },+ {+ "model": "flux-3-start-end",+ "options": {+ "resolution": "1080p",+ "duration": 10+ },+ "promptLength": 100,+ "usd": 2.9+ },+ {+ "model": "flux-3-start-end",+ "options": {+ "resolution": "1080p",+ "duration": 20+ },+ "promptLength": 100,+ "usd": 5.8+ },+ {+ "model": "flux-3-extend",+ "options": {+ "resolution": "720p",+ "duration": 5+ },+ "promptLength": 100,+ "usd": 2.05,+ "seconds": 10.026667+ },+ {+ "model": "flux-3-extend",+ "options": {+ "resolution": "720p",+ "duration": 10+ },+ "promptLength": 100,+ "usd": 4.1,+ "seconds": 10.026667+ },+ {+ "model": "flux-3-extend",+ "options": {+ "resolution": "1080p",+ "duration": 5+ },+ "promptLength": 100,+ "usd": 2.65,+ "seconds": 10.026667+ },+ {+ "model": "flux-3-extend",+ "options": {+ "resolution": "1080p",+ "duration": 10+ },+ "promptLength": 100,+ "usd": 5.3,+ "seconds": 10.026667+ },+ {+ "model": "flux-3-extend",+ "options": {+ "resolution": "720p",+ "duration": 5+ },+ "promptLength": 100,+ "usd": 2.05,+ "seconds": 12.612+ },+ {+ "model": "flux-3-extend",+ "options": {+ "resolution": "720p",+ "duration": 5+ },+ "promptLength": 100,+ "usd": 2.05,+ "seconds": 5.055+ },+ {+ "model": "flux-3-video-edit",+ "options": {},+ "promptLength": 100,+ "usd": 0.33,+ "seconds": 10.026667+ },+ {+ "model": "flux-3-video-edit",+ "options": {},+ "promptLength": 100,+ "usd": 0.39,+ "seconds": 12.612+ },+ {+ "model": "flux-3-video-edit",+ "options": {},+ "promptLength": 100,+ "usd": 0.18,+ "seconds": 5.055+ },+ {+ "model": "cosmos-3-super-i2v",+ "options": {+ "duration": 1,+ "size": "16:9",+ "num_inference_steps": 28+ },+ "promptLength": 100,+ "usd": 0.05+ },+ {+ "model": "cosmos-3-super-i2v",+ "options": {+ "duration": 1,+ "size": "16:9",+ "num_inference_steps": 50+ },+ "promptLength": 100,+ "usd": 0.05+ },+ {+ "model": "cosmos-3-super-i2v",+ "options": {+ "duration": 1,+ "size": "1:1",+ "num_inference_steps": 28+ },+ "promptLength": 100,+ "usd": 0.05+ },+ {+ "model": "cosmos-3-super-i2v",+ "options": {+ "duration": 1,+ "size": "1:1",+ "num_inference_steps": 50+ },+ "promptLength": 100,+ "usd": 0.05+ },+ {+ "model": "cosmos-3-super-i2v",+ "options": {+ "duration": 4,+ "size": "16:9",+ "num_inference_steps": 28+ },+ "promptLength": 100,+ "usd": 0.2+ },+ {+ "model": "cosmos-3-super-i2v",+ "options": {+ "duration": 4,+ "size": "16:9",+ "num_inference_steps": 50+ },+ "promptLength": 100,+ "usd": 0.2+ },+ {+ "model": "cosmos-3-super-i2v",+ "options": {+ "duration": 4,+ "size": "1:1",+ "num_inference_steps": 28+ },+ "promptLength": 100,+ "usd": 0.2+ },+ {+ "model": "cosmos-3-super-i2v",+ "options": {+ "duration": 4,+ "size": "1:1",+ "num_inference_steps": 50+ },+ "promptLength": 100,+ "usd": 0.2+ },+ {+ "model": "cosmos-3-super-i2v",+ "options": {+ "duration": 7,+ "size": "16:9",+ "num_inference_steps": 28+ },+ "promptLength": 100,+ "usd": 0.35+ },+ {+ "model": "cosmos-3-super-i2v",+ "options": {+ "duration": 7,+ "size": "16:9",+ "num_inference_steps": 50+ },+ "promptLength": 100,+ "usd": 0.35+ },+ {+ "model": "cosmos-3-super-i2v",+ "options": {+ "duration": 7,+ "size": "1:1",+ "num_inference_steps": 28+ },+ "promptLength": 100,+ "usd": 0.35+ },+ {+ "model": "cosmos-3-super-i2v",+ "options": {+ "duration": 7,+ "size": "1:1",+ "num_inference_steps": 50+ },+ "promptLength": 100,+ "usd": 0.35+ },+ {+ "model": "skyreels-v4-t2v",+ "options": {+ "resolution": "480p",+ "duration": 3,+ "mode": "std",+ "sound": false+ },+ "promptLength": 100,+ "usd": 0.33+ },+ {+ "model": "skyreels-v4-t2v",+ "options": {+ "resolution": "480p",+ "duration": 3,+ "mode": "std",+ "sound": true+ },+ "promptLength": 100,+ "usd": 0.33+ },+ {+ "model": "skyreels-v4-t2v",+ "options": {+ "resolution": "480p",+ "duration": 3,+ "mode": "fast",+ "sound": false+ },+ "promptLength": 100,+ "usd": 0.24+ },+ {+ "model": "skyreels-v4-t2v",+ "options": {+ "resolution": "480p",+ "duration": 3,+ "mode": "fast",+ "sound": true+ },+ "promptLength": 100,+ "usd": 0.24+ },+ {+ "model": "skyreels-v4-t2v",+ "options": {+ "resolution": "480p",+ "duration": 5,+ "mode": "std",+ "sound": false+ },+ "promptLength": 100,+ "usd": 0.55+ },+ {+ "model": "skyreels-v4-t2v",+ "options": {+ "resolution": "480p",+ "duration": 5,+ "mode": "std",+ "sound": true+ },+ "promptLength": 100,+ "usd": 0.55+ },+ {+ "model": "skyreels-v4-t2v",+ "options": {+ "resolution": "480p",+ "duration": 5,+ "mode": "fast",+ "sound": false+ },+ "promptLength": 100,+ "usd": 0.4+ },+ {+ "model": "skyreels-v4-t2v",+ "options": {+ "resolution": "480p",+ "duration": 5,+ "mode": "fast",+ "sound": true+ },+ "promptLength": 100,+ "usd": 0.4+ },+ {+ "model": "skyreels-v4-t2v",+ "options": {+ "resolution": "480p",+ "duration": 15,+ "mode": "std",+ "sound": false+ },+ "promptLength": 100,+ "usd": 1.65+ },+ {+ "model": "skyreels-v4-t2v",+ "options": {+ "resolution": "480p",+ "duration": 15,+ "mode": "std",+ "sound": true+ },+ "promptLength": 100,+ "usd": 1.65+ },+ {+ "model": "skyreels-v4-t2v",+ "options": {+ "resolution": "480p",+ "duration": 15,+ "mode": "fast",+ "sound": false+ },+ "promptLength": 100,+ "usd": 1.2+ },+ {+ "model": "skyreels-v4-t2v",+ "options": {+ "resolution": "480p",+ "duration": 15,+ "mode": "fast",+ "sound": true+ },+ "promptLength": 100,+ "usd": 1.2+ },+ {+ "model": "skyreels-v4-t2v",+ "options": {+ "resolution": "720p",+ "duration": 3,+ "mode": "std",+ "sound": false+ },+ "promptLength": 100,+ "usd": 0.42+ },+ {+ "model": "skyreels-v4-t2v",+ "options": {+ "resolution": "720p",+ "duration": 3,+ "mode": "std",+ "sound": true+ },+ "promptLength": 100,+ "usd": 0.42+ },+ {+ "model": "skyreels-v4-t2v",+ "options": {+ "resolution": "720p",+ "duration": 3,+ "mode": "fast",+ "sound": false+ },+ "promptLength": 100,+ "usd": 0.33+ },+ {+ "model": "skyreels-v4-t2v",+ "options": {+ "resolution": "720p",+ "duration": 3,+ "mode": "fast",+ "sound": true+ },+ "promptLength": 100,+ "usd": 0.33+ },+ {+ "model": "skyreels-v4-t2v",+ "options": {+ "resolution": "720p",+ "duration": 5,+ "mode": "std",+ "sound": false+ },+ "promptLength": 100,+ "usd": 0.7+ },+ {+ "model": "skyreels-v4-t2v",+ "options": {+ "resolution": "720p",+ "duration": 5,+ "mode": "std",+ "sound": true+ },+ "promptLength": 100,+ "usd": 0.7+ },+ {+ "model": "skyreels-v4-t2v",+ "options": {+ "resolution": "720p",+ "duration": 5,+ "mode": "fast",+ "sound": false+ },+ "promptLength": 100,+ "usd": 0.55+ },+ {+ "model": "skyreels-v4-t2v",+ "options": {+ "resolution": "720p",+ "duration": 5,+ "mode": "fast",+ "sound": true+ },+ "promptLength": 100,+ "usd": 0.55+ },+ {+ "model": "skyreels-v4-t2v",+ "options": {+ "resolution": "720p",+ "duration": 15,+ "mode": "std",+ "sound": false+ },+ "promptLength": 100,+ "usd": 2.1+ },+ {+ "model": "skyreels-v4-t2v",+ "options": {+ "resolution": "720p",+ "duration": 15,+ "mode": "std",+ "sound": true+ },+ "promptLength": 100,+ "usd": 2.1+ },+ {+ "model": "skyreels-v4-t2v",+ "options": {+ "resolution": "720p",+ "duration": 15,+ "mode": "fast",+ "sound": false+ },+ "promptLength": 100,+ "usd": 1.65+ },+ {+ "model": "skyreels-v4-t2v",+ "options": {+ "resolution": "720p",+ "duration": 15,+ "mode": "fast",+ "sound": true+ },+ "promptLength": 100,+ "usd": 1.65+ },+ {+ "model": "skyreels-v4-t2v",+ "options": {+ "resolution": "1080p",+ "duration": 3,+ "mode": "std",+ "sound": false+ },+ "promptLength": 100,+ "usd": 1.05+ },+ {+ "model": "skyreels-v4-t2v",+ "options": {+ "resolution": "1080p",+ "duration": 3,+ "mode": "std",+ "sound": true+ },+ "promptLength": 100,+ "usd": 1.05+ },+ {+ "model": "skyreels-v4-t2v",+ "options": {+ "resolution": "1080p",+ "duration": 3,+ "mode": "fast",+ "sound": false+ },+ "promptLength": 100,+ "usd": 0.825+ },+ {+ "model": "skyreels-v4-t2v",+ "options": {+ "resolution": "1080p",+ "duration": 3,+ "mode": "fast",+ "sound": true+ },+ "promptLength": 100,+ "usd": 0.825+ },+ {+ "model": "skyreels-v4-t2v",+ "options": {+ "resolution": "1080p",+ "duration": 5,+ "mode": "std",+ "sound": false+ },+ "promptLength": 100,+ "usd": 1.75+ },+ {+ "model": "skyreels-v4-t2v",+ "options": {+ "resolution": "1080p",+ "duration": 5,+ "mode": "std",+ "sound": true+ },+ "promptLength": 100,+ "usd": 1.75+ },+ {+ "model": "skyreels-v4-t2v",+ "options": {+ "resolution": "1080p",+ "duration": 5,+ "mode": "fast",+ "sound": false+ },+ "promptLength": 100,+ "usd": 1.375+ },+ {+ "model": "skyreels-v4-t2v",+ "options": {+ "resolution": "1080p",+ "duration": 5,+ "mode": "fast",+ "sound": true+ },+ "promptLength": 100,+ "usd": 1.375+ },+ {+ "model": "skyreels-v4-t2v",+ "options": {+ "resolution": "1080p",+ "duration": 15,+ "mode": "std",+ "sound": false+ },+ "promptLength": 100,+ "usd": 5.25+ },+ {+ "model": "skyreels-v4-t2v",+ "options": {+ "resolution": "1080p",+ "duration": 15,+ "mode": "std",+ "sound": true+ },+ "promptLength": 100,+ "usd": 5.25+ },+ {+ "model": "skyreels-v4-t2v",+ "options": {+ "resolution": "1080p",+ "duration": 15,+ "mode": "fast",+ "sound": false+ },+ "promptLength": 100,+ "usd": 4.125+ },+ {+ "model": "skyreels-v4-t2v",+ "options": {+ "resolution": "1080p",+ "duration": 15,+ "mode": "fast",+ "sound": true+ },+ "promptLength": 100,+ "usd": 4.125+ },+ {+ "model": "skyreels-v4-i2v",+ "options": {+ "resolution": "480p",+ "duration": 3,+ "mode": "std",+ "sound": false+ },+ "promptLength": 100,+ "usd": 0.33+ },+ {+ "model": "skyreels-v4-i2v",+ "options": {+ "resolution": "480p",+ "duration": 3,+ "mode": "std",+ "sound": true+ },+ "promptLength": 100,+ "usd": 0.33+ },+ {+ "model": "skyreels-v4-i2v",+ "options": {+ "resolution": "480p",+ "duration": 3,+ "mode": "fast",+ "sound": false+ },+ "promptLength": 100,+ "usd": 0.24+ },+ {+ "model": "skyreels-v4-i2v",+ "options": {+ "resolution": "480p",+ "duration": 3,+ "mode": "fast",+ "sound": true+ },+ "promptLength": 100,+ "usd": 0.24+ },+ {+ "model": "skyreels-v4-i2v",+ "options": {+ "resolution": "480p",+ "duration": 5,+ "mode": "std",+ "sound": false+ },+ "promptLength": 100,+ "usd": 0.55+ },+ {+ "model": "skyreels-v4-i2v",+ "options": {+ "resolution": "480p",+ "duration": 5,+ "mode": "std",+ "sound": true+ },+ "promptLength": 100,+ "usd": 0.55+ },+ {+ "model": "skyreels-v4-i2v",+ "options": {+ "resolution": "480p",+ "duration": 5,+ "mode": "fast",+ "sound": false+ },+ "promptLength": 100,+ "usd": 0.4+ },+ {+ "model": "skyreels-v4-i2v",+ "options": {+ "resolution": "480p",+ "duration": 5,+ "mode": "fast",+ "sound": true+ },+ "promptLength": 100,+ "usd": 0.4+ },+ {+ "model": "skyreels-v4-i2v",+ "options": {+ "resolution": "480p",+ "duration": 15,+ "mode": "std",+ "sound": false+ },+ "promptLength": 100,+ "usd": 1.65+ },+ {+ "model": "skyreels-v4-i2v",+ "options": {+ "resolution": "480p",+ "duration": 15,+ "mode": "std",+ "sound": true+ },+ "promptLength": 100,+ "usd": 1.65+ },+ {+ "model": "skyreels-v4-i2v",+ "options": {+ "resolution": "480p",+ "duration": 15,+ "mode": "fast",+ "sound": false+ },+ "promptLength": 100,+ "usd": 1.2+ },+ {+ "model": "skyreels-v4-i2v",+ "options": {+ "resolution": "480p",+ "duration": 15,+ "mode": "fast",+ "sound": true+ },+ "promptLength": 100,+ "usd": 1.2+ },+ {+ "model": "skyreels-v4-i2v",+ "options": {+ "resolution": "720p",+ "duration": 3,+ "mode": "std",+ "sound": false+ },+ "promptLength": 100,+ "usd": 0.42+ },+ {+ "model": "skyreels-v4-i2v",+ "options": {+ "resolution": "720p",+ "duration": 3,+ "mode": "std",+ "sound": true+ },+ "promptLength": 100,+ "usd": 0.42+ },+ {+ "model": "skyreels-v4-i2v",+ "options": {+ "resolution": "720p",+ "duration": 3,+ "mode": "fast",+ "sound": false+ },+ "promptLength": 100,+ "usd": 0.33+ },+ {+ "model": "skyreels-v4-i2v",+ "options": {+ "resolution": "720p",+ "duration": 3,+ "mode": "fast",+ "sound": true+ },+ "promptLength": 100,+ "usd": 0.33+ },+ {+ "model": "skyreels-v4-i2v",+ "options": {+ "resolution": "720p",+ "duration": 5,+ "mode": "std",+ "sound": false+ },+ "promptLength": 100,+ "usd": 0.7+ },+ {+ "model": "skyreels-v4-i2v",+ "options": {+ "resolution": "720p",+ "duration": 5,+ "mode": "std",+ "sound": true+ },+ "promptLength": 100,+ "usd": 0.7+ },+ {+ "model": "skyreels-v4-i2v",+ "options": {+ "resolution": "720p",+ "duration": 5,+ "mode": "fast",+ "sound": false+ },+ "promptLength": 100,+ "usd": 0.55+ },+ {+ "model": "skyreels-v4-i2v",+ "options": {+ "resolution": "720p",+ "duration": 5,+ "mode": "fast",+ "sound": true+ },+ "promptLength": 100,+ "usd": 0.55+ },+ {+ "model": "skyreels-v4-i2v",+ "options": {+ "resolution": "720p",+ "duration": 15,+ "mode": "std",+ "sound": false+ },+ "promptLength": 100,+ "usd": 2.1+ },+ {+ "model": "skyreels-v4-i2v",+ "options": {+ "resolution": "720p",+ "duration": 15,+ "mode": "std",+ "sound": true+ },+ "promptLength": 100,+ "usd": 2.1+ },+ {+ "model": "skyreels-v4-i2v",+ "options": {+ "resolution": "720p",+ "duration": 15,+ "mode": "fast",+ "sound": false+ },+ "promptLength": 100,+ "usd": 1.65+ },+ {+ "model": "skyreels-v4-i2v",+ "options": {+ "resolution": "720p",+ "duration": 15,+ "mode": "fast",+ "sound": true+ },+ "promptLength": 100,+ "usd": 1.65+ },+ {+ "model": "skyreels-v4-i2v",+ "options": {+ "resolution": "1080p",+ "duration": 3,+ "mode": "std",+ "sound": false+ },+ "promptLength": 100,+ "usd": 1.05+ },+ {+ "model": "skyreels-v4-i2v",+ "options": {+ "resolution": "1080p",+ "duration": 3,+ "mode": "std",+ "sound": true+ },+ "promptLength": 100,+ "usd": 1.05+ },+ {+ "model": "skyreels-v4-i2v",+ "options": {+ "resolution": "1080p",+ "duration": 3,+ "mode": "fast",+ "sound": false+ },+ "promptLength": 100,+ "usd": 0.825+ },+ {+ "model": "skyreels-v4-i2v",+ "options": {+ "resolution": "1080p",+ "duration": 3,+ "mode": "fast",+ "sound": true+ },+ "promptLength": 100,+ "usd": 0.825+ },+ {+ "model": "skyreels-v4-i2v",+ "options": {+ "resolution": "1080p",+ "duration": 5,+ "mode": "std",+ "sound": false+ },+ "promptLength": 100,+ "usd": 1.75+ },+ {+ "model": "skyreels-v4-i2v",+ "options": {+ "resolution": "1080p",+ "duration": 5,+ "mode": "std",+ "sound": true+ },+ "promptLength": 100,+ "usd": 1.75+ },+ {+ "model": "skyreels-v4-i2v",+ "options": {+ "resolution": "1080p",+ "duration": 5,+ "mode": "fast",+ "sound": false+ },+ "promptLength": 100,+ "usd": 1.375+ },+ {+ "model": "skyreels-v4-i2v",+ "options": {+ "resolution": "1080p",+ "duration": 5,+ "mode": "fast",+ "sound": true+ },+ "promptLength": 100,+ "usd": 1.375+ },+ {+ "model": "skyreels-v4-i2v",+ "options": {+ "resolution": "1080p",+ "duration": 15,+ "mode": "std",+ "sound": false+ },+ "promptLength": 100,+ "usd": 5.25+ },+ {+ "model": "skyreels-v4-i2v",+ "options": {+ "resolution": "1080p",+ "duration": 15,+ "mode": "std",+ "sound": true+ },+ "promptLength": 100,+ "usd": 5.25+ },+ {+ "model": "skyreels-v4-i2v",+ "options": {+ "resolution": "1080p",+ "duration": 15,+ "mode": "fast",+ "sound": false+ },+ "promptLength": 100,+ "usd": 4.125+ },+ {+ "model": "skyreels-v4-i2v",+ "options": {+ "resolution": "1080p",+ "duration": 15,+ "mode": "fast",+ "sound": true+ },+ "promptLength": 100,+ "usd": 4.125+ },+ {+ "model": "skyreels-v4-ref",+ "options": {+ "resolution": "480p",+ "duration": 3,+ "mode": "std",+ "sound": false+ },+ "promptLength": 100,+ "usd": 0.33,+ "imageCount": 1+ },+ {+ "model": "skyreels-v4-ref",+ "options": {+ "resolution": "480p",+ "duration": 3,+ "mode": "std",+ "sound": true+ },+ "promptLength": 100,+ "usd": 0.33,+ "imageCount": 1+ },+ {+ "model": "skyreels-v4-ref",+ "options": {+ "resolution": "480p",+ "duration": 3,+ "mode": "fast",+ "sound": false+ },+ "promptLength": 100,+ "usd": 0.24,+ "imageCount": 1+ },+ {+ "model": "skyreels-v4-ref",+ "options": {+ "resolution": "480p",+ "duration": 3,+ "mode": "fast",+ "sound": true+ },+ "promptLength": 100,+ "usd": 0.24,+ "imageCount": 1+ },+ {+ "model": "skyreels-v4-ref",+ "options": {+ "resolution": "480p",+ "duration": 5,+ "mode": "std",+ "sound": false+ },+ "promptLength": 100,+ "usd": 0.55,+ "imageCount": 1+ },+ {+ "model": "skyreels-v4-ref",+ "options": {+ "resolution": "480p",+ "duration": 5,+ "mode": "std",+ "sound": true+ },+ "promptLength": 100,+ "usd": 0.55,+ "imageCount": 1+ },+ {+ "model": "skyreels-v4-ref",+ "options": {+ "resolution": "480p",+ "duration": 5,+ "mode": "fast",+ "sound": false+ },+ "promptLength": 100,+ "usd": 0.4,+ "imageCount": 1+ },+ {+ "model": "skyreels-v4-ref",+ "options": {+ "resolution": "480p",+ "duration": 5,+ "mode": "fast",+ "sound": true+ },+ "promptLength": 100,+ "usd": 0.4,+ "imageCount": 1+ },+ {+ "model": "skyreels-v4-ref",+ "options": {+ "resolution": "1080p",+ "duration": 3,+ "mode": "std",+ "sound": false+ },+ "promptLength": 100,+ "usd": 1.05,+ "imageCount": 1+ },+ {+ "model": "skyreels-v4-ref",+ "options": {+ "resolution": "1080p",+ "duration": 3,+ "mode": "std",+ "sound": true+ },+ "promptLength": 100,+ "usd": 1.05,+ "imageCount": 1+ },+ {+ "model": "skyreels-v4-ref",+ "options": {+ "resolution": "1080p",+ "duration": 3,+ "mode": "fast",+ "sound": false+ },+ "promptLength": 100,+ "usd": 0.825,+ "imageCount": 1+ },+ {+ "model": "skyreels-v4-ref",+ "options": {+ "resolution": "1080p",+ "duration": 3,+ "mode": "fast",+ "sound": true+ },+ "promptLength": 100,+ "usd": 0.825,+ "imageCount": 1+ },+ {+ "model": "skyreels-v4-ref",+ "options": {+ "resolution": "1080p",+ "duration": 5,+ "mode": "std",+ "sound": false+ },+ "promptLength": 100,+ "usd": 1.75,+ "imageCount": 1+ },+ {+ "model": "skyreels-v4-ref",+ "options": {+ "resolution": "1080p",+ "duration": 5,+ "mode": "std",+ "sound": true+ },+ "promptLength": 100,+ "usd": 1.75,+ "imageCount": 1+ },+ {+ "model": "skyreels-v4-ref",+ "options": {+ "resolution": "1080p",+ "duration": 5,+ "mode": "fast",+ "sound": false+ },+ "promptLength": 100,+ "usd": 1.375,+ "imageCount": 1+ },+ {+ "model": "skyreels-v4-ref",+ "options": {+ "resolution": "1080p",+ "duration": 5,+ "mode": "fast",+ "sound": true+ },+ "promptLength": 100,+ "usd": 1.375,+ "imageCount": 1+ },+ {+ "model": "kandinsky-5-pro-t2v",+ "options": {+ "resolution": "512p"+ },+ "promptLength": 100,+ "usd": 0.2+ },+ {+ "model": "kandinsky-5-pro-t2v",+ "options": {+ "resolution": "1024p"+ },+ "promptLength": 100,+ "usd": 0.2+ },+ {+ "model": "kandinsky-5-pro-i2v",+ "options": {+ "resolution": "512p"+ },+ "promptLength": 100,+ "usd": 0.2+ },+ {+ "model": "kandinsky-5-pro-i2v",+ "options": {+ "resolution": "1024p"+ },+ "promptLength": 100,+ "usd": 0.2+ },+ {+ "model": "minimax-h3-t2v",+ "options": {+ "resolution": "480p",+ "duration": 3+ },+ "promptLength": 100,+ "usd": 0.12+ },+ {+ "model": "minimax-h3-t2v",+ "options": {+ "resolution": "480p",+ "duration": 5+ },+ "promptLength": 100,+ "usd": 0.2+ },+ {+ "model": "minimax-h3-t2v",+ "options": {+ "resolution": "480p",+ "duration": 15+ },+ "promptLength": 100,+ "usd": 0.6+ },+ {+ "model": "minimax-h3-t2v",+ "options": {+ "resolution": "540p",+ "duration": 3+ },+ "promptLength": 100,+ "usd": 0.18+ },+ {+ "model": "minimax-h3-t2v",+ "options": {+ "resolution": "540p",+ "duration": 5+ },+ "promptLength": 100,+ "usd": 0.3+ },+ {+ "model": "minimax-h3-t2v",+ "options": {+ "resolution": "540p",+ "duration": 15+ },+ "promptLength": 100,+ "usd": 0.9+ },+ {+ "model": "minimax-h3-t2v",+ "options": {+ "resolution": "768p",+ "duration": 3+ },+ "promptLength": 100,+ "usd": 0.24+ },+ {+ "model": "minimax-h3-t2v",+ "options": {+ "resolution": "768p",+ "duration": 5+ },+ "promptLength": 100,+ "usd": 0.4+ },+ {+ "model": "minimax-h3-t2v",+ "options": {+ "resolution": "768p",+ "duration": 15+ },+ "promptLength": 100,+ "usd": 1.2+ },+ {+ "model": "minimax-h3-t2v",+ "options": {+ "resolution": "1080p",+ "duration": 3+ },+ "promptLength": 100,+ "usd": 0.48+ },+ {+ "model": "minimax-h3-t2v",+ "options": {+ "resolution": "1080p",+ "duration": 5+ },+ "promptLength": 100,+ "usd": 0.8+ },+ {+ "model": "minimax-h3-t2v",+ "options": {+ "resolution": "1080p",+ "duration": 15+ },+ "promptLength": 100,+ "usd": 2.4+ },+ {+ "model": "minimax-h3-ref",+ "options": {+ "resolution": "480p",+ "duration": 3+ },+ "promptLength": 100,+ "usd": 0.17+ },+ {+ "model": "minimax-h3-ref",+ "options": {+ "resolution": "480p",+ "duration": 5+ },+ "promptLength": 100,+ "usd": 0.27+ },+ {+ "model": "minimax-h3-ref",+ "options": {+ "resolution": "480p",+ "duration": 15+ },+ "promptLength": 100,+ "usd": 0.77+ },+ {+ "model": "minimax-h3-ref",+ "options": {+ "resolution": "1080p",+ "duration": 3+ },+ "promptLength": 100,+ "usd": 0.62+ },+ {+ "model": "minimax-h3-ref",+ "options": {+ "resolution": "1080p",+ "duration": 5+ },+ "promptLength": 100,+ "usd": 1.02+ },+ {+ "model": "minimax-h3-ref",+ "options": {+ "resolution": "1080p",+ "duration": 15+ },+ "promptLength": 100,+ "usd": 3.02+ },+ {+ "model": "minimax-h3-video-edit",+ "options": {+ "resolution": "480p",+ "generate_audio": true+ },+ "promptLength": 100,+ "usd": 1.1,+ "seconds": 10.026667+ },+ {+ "model": "minimax-h3-video-edit",+ "options": {+ "resolution": "480p",+ "generate_audio": false+ },+ "promptLength": 100,+ "usd": 1.1,+ "seconds": 10.026667+ },+ {+ "model": "minimax-h3-video-edit",+ "options": {+ "resolution": "540p",+ "generate_audio": true+ },+ "promptLength": 100,+ "usd": 1.65,+ "seconds": 10.026667+ },+ {+ "model": "minimax-h3-video-edit",+ "options": {+ "resolution": "540p",+ "generate_audio": false+ },+ "promptLength": 100,+ "usd": 1.65,+ "seconds": 10.026667+ },+ {+ "model": "minimax-h3-video-edit",+ "options": {+ "resolution": "768p",+ "generate_audio": true+ },+ "promptLength": 100,+ "usd": 2.2,+ "seconds": 10.026667+ },+ {+ "model": "minimax-h3-video-edit",+ "options": {+ "resolution": "768p",+ "generate_audio": false+ },+ "promptLength": 100,+ "usd": 2.2,+ "seconds": 10.026667+ },+ {+ "model": "minimax-h3-video-edit",+ "options": {+ "resolution": "1080p",+ "generate_audio": true+ },+ "promptLength": 100,+ "usd": 4.4,+ "seconds": 10.026667+ },+ {+ "model": "minimax-h3-video-edit",+ "options": {+ "resolution": "1080p",+ "generate_audio": false+ },+ "promptLength": 100,+ "usd": 4.4,+ "seconds": 10.026667+ },+ {+ "model": "wan-3.0-ref",+ "options": {+ "resolution": "480p",+ "duration": 2,+ "generate_audio": true+ },+ "promptLength": 100,+ "usd": 0.1+ },+ {+ "model": "wan-3.0-ref",+ "options": {+ "resolution": "480p",+ "duration": 2,+ "generate_audio": false+ },+ "promptLength": 100,+ "usd": 0.1+ },+ {+ "model": "wan-3.0-ref",+ "options": {+ "resolution": "480p",+ "duration": 5,+ "generate_audio": true+ },+ "promptLength": 100,+ "usd": 0.25+ },+ {+ "model": "wan-3.0-ref",+ "options": {+ "resolution": "480p",+ "duration": 5,+ "generate_audio": false+ },+ "promptLength": 100,+ "usd": 0.25+ },+ {+ "model": "wan-3.0-ref",+ "options": {+ "resolution": "480p",+ "duration": 30,+ "generate_audio": true+ },+ "promptLength": 100,+ "usd": 1.5+ },+ {+ "model": "wan-3.0-ref",+ "options": {+ "resolution": "480p",+ "duration": 30,+ "generate_audio": false+ },+ "promptLength": 100,+ "usd": 1.5+ },+ {+ "model": "wan-3.0-ref",+ "options": {+ "resolution": "720p",+ "duration": 2,+ "generate_audio": true+ },+ "promptLength": 100,+ "usd": 0.2+ },+ {+ "model": "wan-3.0-ref",+ "options": {+ "resolution": "720p",+ "duration": 2,+ "generate_audio": false+ },+ "promptLength": 100,+ "usd": 0.2+ },+ {+ "model": "wan-3.0-ref",+ "options": {+ "resolution": "720p",+ "duration": 5,+ "generate_audio": true+ },+ "promptLength": 100,+ "usd": 0.5+ },+ {+ "model": "wan-3.0-ref",+ "options": {+ "resolution": "720p",+ "duration": 5,+ "generate_audio": false+ },+ "promptLength": 100,+ "usd": 0.5+ },+ {+ "model": "wan-3.0-ref",+ "options": {+ "resolution": "720p",+ "duration": 30,+ "generate_audio": true+ },+ "promptLength": 100,+ "usd": 3+ },+ {+ "model": "wan-3.0-ref",+ "options": {+ "resolution": "720p",+ "duration": 30,+ "generate_audio": false+ },+ "promptLength": 100,+ "usd": 3+ },+ {+ "model": "wan-3.0-ref",+ "options": {+ "resolution": "1080p",+ "duration": 2,+ "generate_audio": true+ },+ "promptLength": 100,+ "usd": 0.4+ },+ {+ "model": "wan-3.0-ref",+ "options": {+ "resolution": "1080p",+ "duration": 2,+ "generate_audio": false+ },+ "promptLength": 100,+ "usd": 0.4+ },+ {+ "model": "wan-3.0-ref",+ "options": {+ "resolution": "1080p",+ "duration": 5,+ "generate_audio": true+ },+ "promptLength": 100,+ "usd": 1+ },+ {+ "model": "wan-3.0-ref",+ "options": {+ "resolution": "1080p",+ "duration": 5,+ "generate_audio": false+ },+ "promptLength": 100,+ "usd": 1+ },+ {+ "model": "wan-3.0-ref",+ "options": {+ "resolution": "1080p",+ "duration": 30,+ "generate_audio": true+ },+ "promptLength": 100,+ "usd": 6+ },+ {+ "model": "wan-3.0-ref",+ "options": {+ "resolution": "1080p",+ "duration": 30,+ "generate_audio": false+ },+ "promptLength": 100,+ "usd": 6+ },+ {+ "model": "wan-3.0-video-edit",+ "options": {+ "resolution": "480p"+ },+ "promptLength": 100,+ "usd": 1.1,+ "seconds": 10.026667+ },+ {+ "model": "wan-3.0-video-edit",+ "options": {+ "resolution": "720p"+ },+ "promptLength": 100,+ "usd": 2.2,+ "seconds": 10.026667+ },+ {+ "model": "wan-3.0-video-edit",+ "options": {+ "resolution": "1080p"+ },+ "promptLength": 100,+ "usd": 4.4,+ "seconds": 10.026667+ },+ {+ "model": "seedvr2-video",+ "options": {+ "target_resolution": "720p"+ },+ "promptLength": 100,+ "usd": 0.22,+ "seconds": 10.026667+ },+ {+ "model": "seedvr2-video",+ "options": {+ "target_resolution": "1080p"+ },+ "promptLength": 100,+ "usd": 0.44,+ "seconds": 10.026667+ },+ {+ "model": "seedvr2-video",+ "options": {+ "target_resolution": "2k"+ },+ "promptLength": 100,+ "usd": 0.66,+ "seconds": 10.026667+ },+ {+ "model": "seedvr2-video",+ "options": {+ "target_resolution": "4k"+ },+ "promptLength": 100,+ "usd": 0.88,+ "seconds": 10.026667+ },+ {+ "model": "seedvr2-video",+ "options": {+ "target_resolution": "1080p"+ },+ "promptLength": 100,+ "usd": 0.24,+ "seconds": 5.055+ },+ {+ "model": "davinci-magihuman",+ "options": {+ "resolution": "256p",+ "duration": 5+ },+ "promptLength": 100,+ "usd": 0.1+ },+ {+ "model": "davinci-magihuman",+ "options": {+ "resolution": "256p",+ "duration": 10+ },+ "promptLength": 100,+ "usd": 0.2+ },+ {+ "model": "davinci-magihuman",+ "options": {+ "resolution": "720p",+ "duration": 5+ },+ "promptLength": 100,+ "usd": 0.2+ },+ {+ "model": "davinci-magihuman",+ "options": {+ "resolution": "720p",+ "duration": 10+ },+ "promptLength": 100,+ "usd": 0.4+ },+ {+ "model": "davinci-magihuman",+ "options": {+ "resolution": "1080p",+ "duration": 5+ },+ "promptLength": 100,+ "usd": 0.3+ },+ {+ "model": "davinci-magihuman",+ "options": {+ "resolution": "1080p",+ "duration": 10+ },+ "promptLength": 100,+ "usd": 0.6+ },+ {+ "model": "yue2",+ "options": {+ "style": "pop"+ },+ "promptLength": 100,+ "usd": 0.1+ },+ {+ "model": "minimax-h3-ref",+ "options": {+ "resolution": "480p",+ "duration": 5+ },+ "promptLength": 100,+ "usd": 0.25,+ "imageCount": 1+ },+ {+ "model": "minimax-h3-ref",+ "options": {+ "resolution": "480p",+ "duration": 5+ },+ "promptLength": 100,+ "usd": 0.27,+ "imageCount": 1+ },+ {+ "model": "minimax-h3-ref",+ "options": {+ "resolution": "480p",+ "duration": 5+ },+ "promptLength": 100,+ "usd": 0.31,+ "imageCount": 3+ },+ {+ "model": "minimax-h3-ref",+ "options": {+ "resolution": "540p",+ "duration": 5+ },+ "promptLength": 100,+ "usd": 0.395,+ "imageCount": 1+ },+ {+ "model": "minimax-h3-ref",+ "options": {+ "resolution": "768p",+ "duration": 5+ },+ "promptLength": 100,+ "usd": 0.52,+ "imageCount": 1+ },+ {+ "model": "minimax-h3-video-edit",+ "options": {+ "resolution": "480p",+ "duration": 5+ },+ "promptLength": 100,+ "usd": 0.8,+ "seconds": 10.026667+ },+ {+ "model": "minimax-h3-video-edit",+ "options": {+ "resolution": "480p",+ "duration": 3+ },+ "promptLength": 100,+ "usd": 0.7,+ "seconds": 10.026667+ },+ {+ "model": "wan-3.0-video-edit",+ "options": {+ "resolution": "720p",+ "duration": 5+ },+ "promptLength": 100,+ "usd": 1.6,+ "seconds": 10.026667+ },+ {+ "model": "minimax-h3-video-edit",+ "options": {+ "resolution": "480p"+ },+ "promptLength": 100,+ "usd": 1.1,+ "seconds": 10.026667+ },+ {+ "model": "minimax-h3-video-edit",+ "options": {+ "resolution": "480p",+ "duration": 3+ },+ "promptLength": 100,+ "usd": 0.7,+ "seconds": 10.026667+ },+ {+ "model": "minimax-h3-video-edit",+ "options": {+ "resolution": "480p",+ "duration": 15+ },+ "promptLength": 100,+ "usd": 1.3,+ "seconds": 10.026667+ },+ {+ "model": "minimax-h3-video-edit",+ "options": {+ "resolution": "1080p"+ },+ "promptLength": 100,+ "usd": 4.4,+ "seconds": 10.026667+ },+ {+ "model": "minimax-h3-video-edit",+ "options": {+ "resolution": "1080p",+ "duration": 3+ },+ "promptLength": 100,+ "usd": 2.8,+ "seconds": 10.026667+ },+ {+ "model": "minimax-h3-video-edit",+ "options": {+ "resolution": "1080p",+ "duration": 15+ },+ "promptLength": 100,+ "usd": 5.2,+ "seconds": 10.026667+ },+ {+ "model": "wan-3.0-video-edit",+ "options": {+ "resolution": "480p"+ },+ "promptLength": 100,+ "usd": 1.1,+ "seconds": 10.026667+ },+ {+ "model": "wan-3.0-video-edit",+ "options": {+ "resolution": "480p",+ "duration": 3+ },+ "promptLength": 100,+ "usd": 0.7,+ "seconds": 10.026667+ },+ {+ "model": "wan-3.0-video-edit",+ "options": {+ "resolution": "480p",+ "duration": 15+ },+ "promptLength": 100,+ "usd": 1.3,+ "seconds": 10.026667+ },+ {+ "model": "wan-3.0-video-edit",+ "options": {+ "resolution": "720p"+ },+ "promptLength": 100,+ "usd": 2.2,+ "seconds": 10.026667+ },+ {+ "model": "wan-3.0-video-edit",+ "options": {+ "resolution": "720p",+ "duration": 3+ },+ "promptLength": 100,+ "usd": 1.4,+ "seconds": 10.026667+ },+ {+ "model": "wan-3.0-video-edit",+ "options": {+ "resolution": "720p",+ "duration": 15+ },+ "promptLength": 100,+ "usd": 2.6,+ "seconds": 10.026667+ },+ {+ "model": "wan-3.0-video-edit",+ "options": {+ "resolution": "1080p"+ },+ "promptLength": 100,+ "usd": 4.4,+ "seconds": 10.026667+ },+ {+ "model": "wan-3.0-video-edit",+ "options": {+ "resolution": "1080p",+ "duration": 3+ },+ "promptLength": 100,+ "usd": 2.8,+ "seconds": 10.026667+ },+ {+ "model": "wan-3.0-video-edit",+ "options": {+ "resolution": "1080p",+ "duration": 15+ },+ "promptLength": 100,+ "usd": 5.2,+ "seconds": 10.026667+ }+]diff --git a/src/lib/render/__tests__/fixtures/test-catalogs.ts b/src/lib/render/__tests__/fixtures/test-catalogs.tsnew file mode 100644index 00000000..2a7b3790--- /dev/null+++ b/src/lib/render/__tests__/fixtures/test-catalogs.ts@@ -0,0 +1,70 @@+// Zwei Kataloge fuer die Tests des Cloud-Modus.+//+// Der Desktop liest seinen Katalog vom Server (`/api/jobs/catalog?v=2`). Wie er+// aussieht, haengt davon ab, welcher Server antwortet:+//+// - neuerServer: der Stand ab 02.10.2026. Jedes Studio-Modell der mitgelieferten+// Registrierung steht im Katalog, mit `tier`, `weights` und `quote_required`.+// Genau das schickt der Server (apps/web/app/api/jobs/catalog/route.ts) fuer+// die Eintraege aus CLOUD_MODELS.+// - alterServer: der Stand VOR dem 02.10.2026 (Produktion bis zum Deploy). Die+// Modelle sind die Ids aus katalog-vor-02-10-2026.json, die der Web-Stand+// 293578b2 geliefert hat, und kein Eintrag traegt `tier` oder `weights`.+//+// Beide sind Funktionen, kein geteilter Wert: ein Test aendert den Katalog und+// darf keinem anderen etwas hinterlassen.+import { readFileSync } from 'node:fs'+import { join } from 'node:path'+import { CLOUD_MODEL_SEED, type CloudModel } from '../../cloud-models'+import { STUDIO_MODELS } from '../../studio-contract'++function studioEintrag(id: string, mitStufe: boolean): CloudModel {+ const m = STUDIO_MODELS[id]+ return {+ id,+ label: m.label,+ kind: m.kind,+ adult: m.adult,+ ops: ['studio'],+ quote_required: true,+ ...(mitStufe ? { tier: m.tier, weights: m.weights } : {}),+ }+}++/** Die Eintraege des Notvorrats ohne Stufe und Herkunft, wie ein alter Server sie liefert. */+function ohneStufe(m: CloudModel): CloudModel {+ const { tier: _tier, weights: _weights, ...rest } = m+ void _tier+ void _weights+ return rest+}++/** Der Katalog ab 02.10.2026: Notvorrat plus jedes Studio-Modell, mit Stufe und Herkunft. */+export function neuerServer(): CloudModel[] {+ return [+ ...Object.keys(STUDIO_MODELS).map((id) => studioEintrag(id, true)),+ ...CLOUD_MODEL_SEED.map((m) => ({ ...m })),+ ]+}++const ALT_IDS = JSON.parse(+ readFileSync(join(__dirname, 'katalog-vor-02-10-2026.json'), 'utf8'),+) as string[]++/** Der Katalog VOR dem 02.10.2026: nur die damaligen Ids, keine Stufe, keine Herkunft. */+export function alterServer(): CloudModel[] {+ const seed = new Map(CLOUD_MODEL_SEED.map((m) => [m.id, m]))+ const out: CloudModel[] = []+ for (const id of ALT_IDS) {+ const klassisch = seed.get(id)+ if (klassisch) out.push(ohneStufe(klassisch))+ else if (STUDIO_MODELS[id]) out.push(studioEintrag(id, false))+ }+ return out+}++/** Ids, die der Stand 02.10.2026 NEU im Katalog fuehrt und ein alter Server nicht kennt. */+export function neueIds(): string[] {+ const alt = new Set(ALT_IDS)+ return Object.keys(STUDIO_MODELS).filter((id) => !alt.has(id))+}diff --git a/src/lib/render/__tests__/katalog-paritaet-web.test.ts b/src/lib/render/__tests__/katalog-paritaet-web.test.tsindex ebfde7b5..efa6438f 100644--- a/src/lib/render/__tests__/katalog-paritaet-web.test.ts+++ b/src/lib/render/__tests__/katalog-paritaet-web.test.ts@@ -31,6 +31,8 @@ const KANDIDATEN = [// Paritaet gegen einen aelteren Katalog zu pruefen und das nicht zu merken.resolve(process.cwd(), '../lu-300-web'),resolve(process.cwd(), '../lu-300-web-katalog'),+ // Das Zwillingspaar der Create-Worktrees (lu-create-sota/desktop und /web).+ resolve(process.cwd(), '../web'),]const WEB = KANDIDATEN.find((p) => existsSync(resolve(p, 'apps/web/lib/render/cloud-models.ts')))if (!WEB) {@@ -61,6 +63,8 @@ interface WebZeile {i2v?: booleanadult?: booleanops?: boolean+ tier?: string+ weights?: string}/** Die Eintraege aus CLOUD_MODELS des Webs, ohne TypeScript zu laden. */@@ -84,6 +88,8 @@ function webKatalog(): WebZeile[] {i2v: /i2v: (true|false)/.exec(roh)?.[1] === 'true' ? true : /i2v: false/.test(roh) ? false : undefined,adult: /adult: true/.test(roh),ops: /ops: \[/.test(roh),+ tier: /tier: '(\w+)'/.exec(roh)?.[1],+ weights: /weights: '([\w-]+)'/.exec(roh)?.[1],})}return out@@ -149,6 +155,23 @@ describe.skipIf(!WEB)('Katalogparitaet Desktop gegen Web', () => {expect(seed.map((m) => m.label)).toEqual(web.map((m) => m.label))})+ it('fuehrt Stufe und Herkunft jedes klassischen und spezialisierten Eintrags wie das Web', () => {+ // Seit 02.10.2026 sortieren und beschriften die Waehler danach. Der Notvorrat+ // ist die Liste ohne Netz und darf hier nicht von der Wahrheit abweichen.+ const web = webKatalog().filter((m) => m.tier !== undefined)+ expect(web.length).toBeGreaterThan(40)+ for (const w of web) {+ const s = CLOUD_MODEL_SEED.find((m) => m.id === w.id)+ if (!s) continue+ expect({ tier: s.tier, weights: s.weights }, w.id).toEqual({ tier: w.tier, weights: w.weights })+ }+ // Und jeder Eintrag des Notvorrats steht im Web, mit beiden Feldern.+ for (const s of CLOUD_MODEL_SEED) {+ const w = web.find((m) => m.id === s.id)+ expect(w, s.id).toBeDefined()+ }+ })+it('traegt bei den erwachsenenfaehigen Endpunkten das entschiedene Markenwort', () => {// Der Vergleich darueber haengt am Web. Dieser Fall haengt am Entscheid:// zoege das Web auf "Open" zurueck, waere der Vergleich oben gruen zudiff --git a/src/lib/render/__tests__/model-tier.test.ts b/src/lib/render/__tests__/model-tier.test.tsnew file mode 100644index 00000000..7e6dbbe8--- /dev/null+++ b/src/lib/render/__tests__/model-tier.test.ts@@ -0,0 +1,68 @@+// Wie die Waehler Modelle ordnen und kennzeichnen (02.10.2026, David), und was+// sie mit einem Modell tun, das keine Stufe traegt.+//+// Der Desktop liest seinen Katalog vom Server, und ein aelterer Server liefert+// `tier` und `weights` nicht. Ein lokales ComfyUI-Modell hat noch keine Stufe.+// Beides muss neutral aussehen: Reihenfolge wie bisher, keine Marke, keine+// Zwischenzeile.++import { describe, expect, it } from 'vitest'+import { OLDER_GROUP, sortByTier, tierGroup, tierMarks, tierOf, weightsOf } from '../model-tier'++describe('Stufe und Herkunft', () => {+ it('sortByTier stellt best nach oben und older nach unten, sonst bleibt die Reihenfolge', () => {+ const liste = [+ { id: 'a', tier: 'older' as const }, { id: 'b', tier: 'standard' as const }, { id: 'c', tier: 'best' as const },+ { id: 'd', tier: 'standard' as const }, { id: 'e', tier: 'older' as const }, { id: 'f', tier: 'best' as const },+ ]+ const kopie = [...liste]+ expect(sortByTier(liste).map((m) => m.id)).toEqual(['c', 'f', 'b', 'd', 'a', 'e'])+ expect(liste).toEqual(kopie)+ expect(sortByTier(liste)).toHaveLength(liste.length)+ })++ it('nur die aelteren stehen unter einer Zwischenzeile', () => {+ expect(tierGroup({ tier: 'older' })).toBe(OLDER_GROUP)+ expect(OLDER_GROUP).toBe('Older models')+ expect(tierGroup({ tier: 'best' })).toBeUndefined()+ expect(tierGroup({ tier: 'standard' })).toBeUndefined()+ })++ it('die Marken: Best fuer best, Open weights nur fuer open, Open family fuer open-family, sonst nichts', () => {+ expect(tierMarks({ tier: 'best', weights: 'open' }).map((m) => m.label)).toEqual(['Best', 'Open weights'])+ expect(tierMarks({ tier: 'best', weights: 'open-family' }).map((m) => m.label)).toEqual(['Best', 'Open family'])+ expect(tierMarks({ tier: 'standard', weights: 'open-family' }).map((m) => m.label)).toEqual(['Open family'])+ expect(tierMarks({ tier: 'best', weights: 'closed' }).map((m) => m.label)).toEqual(['Best'])+ expect(tierMarks({ tier: 'older', weights: 'open' }).map((m) => m.label)).toEqual(['Open weights'])+ expect(tierMarks({ tier: 'standard', weights: 'closed' })).toEqual([])+ })+})++describe('ein Modell ohne Stufe und Herkunft ist neutral (alter Server, lokales Modell)', () => {+ it('gilt als standard und closed', () => {+ expect(tierOf({})).toBe('standard')+ expect(weightsOf({})).toBe('closed')+ })++ it('traegt keine Marke und steht unter keiner Zwischenzeile', () => {+ expect(tierMarks({})).toEqual([])+ expect(tierGroup({})).toBeUndefined()+ })++ it('behaelt seine Reihenfolge, auch gemischt mit Modellen, die eine Stufe haben', () => {+ const liste: { id: string; tier?: 'best' | 'standard' | 'older' }[] = [+ { id: 'a' }, { id: 'b', tier: 'older' }, { id: 'c' }, { id: 'd', tier: 'best' }, { id: 'e' },+ ]+ expect(sortByTier(liste).map((m) => m.id)).toEqual(['d', 'a', 'c', 'e', 'b'])+ // Ganz ohne Stufen aendert sich nichts.+ const ohne = [{ id: 'x' }, { id: 'y' }, { id: 'z' }]+ expect(sortByTier(ohne).map((m) => m.id)).toEqual(['x', 'y', 'z'])+ })++ it('ein Wert, den es nicht gibt, gilt wie ein fehlender (ein kuenftiger Server mit neuer Stufe)', () => {+ const fremd = { tier: 'legendary' as never, weights: 'secret' as never }+ expect(tierOf(fremd)).toBe('standard')+ expect(weightsOf(fremd)).toBe('closed')+ expect(tierMarks(fremd)).toEqual([])+ })+})diff --git a/src/lib/render/__tests__/preset-models.test.ts b/src/lib/render/__tests__/preset-models.test.tsindex 7bc2f4c8..912e5479 100644--- a/src/lib/render/__tests__/preset-models.test.ts+++ b/src/lib/render/__tests__/preset-models.test.ts@@ -29,20 +29,22 @@ import {} from '../preset-models'import { CREATE_PRESETS } from '../create-presets'import { STUDIO_MODELS } from '../studio-contract'-import { CLOUD_MODEL_SEED } from '../cloud-models'import { cloudModelById, cloudModelSupportsOp, useCloudCatalogStore } from '../../../stores/cloudCatalogStore'import { videoDurations } from '../video-duration'+import { neuerServer } from './fixtures/test-catalogs'// Review B1 (Runde 2): `presetModels()` is what the Preset Workshop (P6)// calls directly, and the workshop is only ever reachable when the live// catalog already announces Studio (`quote_required`, PresetShelf.tsx hides// itself otherwise). This whole file tests that reachable state, so it-// seeds one, the same way create-studio.test.ts does for the Composer's-// OWN gate. Without this, `allPresetModels()`'s "a classic id yields to its-// live studio twin" skip (preset-models.ts) turns off by default and every-// twin pair here would double up.+// seeds the catalog of the newest server (every studio model listed, with+// tier and weights), the same way create-studio.test.ts does for the+// Composer's OWN gate. Studio members are offered per model since 02.10.2026+// (`studioKnown`): a catalog that lacks one hides it, and the "a classic id+// yields to its live studio twin" skip only fires for a twin the server lists.+// alter-server.test.ts holds the opposite state.beforeEach(() => {- useCloudCatalogStore.setState({ models: [...CLOUD_MODEL_SEED, { id: 'test-studio-marker', label: 'x', kind: 'image', quote_required: true }] })+ useCloudCatalogStore.setState({ models: neuerServer() })})// Die Ops, die die Submit-Route pro Art annimmt. Spiegel von SUPPORTED_OPS in@@ -183,6 +185,7 @@ describe('jedes waehlbare Modell faehrt seinen Schritt', () => {it('genau die Rollen ohne Alternative zeigen keine Auswahl', () => {const ohne = ALL_ROLES.filter((r) => !roleHasChoice(r))- expect(ohne.sort()).toEqual(['angles', 'presenter', 'restyle'])+ // startend und imageup haben je ein Mitglied: FLUX 3 Start to End, SeedVR2.+ expect(ohne.sort()).toEqual(['angles', 'imageup', 'presenter', 'startend'])})})diff --git a/src/lib/render/__tests__/sota-models.test.ts b/src/lib/render/__tests__/sota-models.test.tsnew file mode 100644index 00000000..c55e162f--- /dev/null+++ b/src/lib/render/__tests__/sota-models.test.ts@@ -0,0 +1,275 @@+// Die Modelle aus offenen Familien, aufgenommen am 02.10.2026, im Desktop.+//+// Regel von David: neu aufgenommen wird nur, was aus einer Familie stammt, die+// je offene Gewichte veroeffentlicht hat. Bestehende Modelle bleiben, auch+// geschlossene. Dieser Fall haelt fest, dass jedes neue Modell im Cloud-Modus+// des Desktops wirklich ankommt: mit Schema, mit einem Preis, der nie unter dem+// Einkaufspreis liegt, in genau einer Rolle und an der Stelle, an der der Kunde+// es waehlen kann. Der Desktop liest den Katalog vom Server: alle Waehler-Faelle+// laufen darum gegen den Katalog des neuen Servers (neuerServer), und der+// Gegenfall gegen den alten steht in alter-server.test.ts.+//+// Aus dem Web uebernommen (apps/web/lib/render/__tests__/sota-models.test.ts)+// ohne die Faelle, die Serverdateien lesen (WS_PRICE_BASELINE, ownStudioPaths).++import { beforeEach, describe, expect, it } from 'vitest'+import { STUDIO_MODELS, studioCredits, studioOptions, studioSchema, studioFields } from '../studio-contract'+import { editNeedsMask } from '../../../stores/cloudCatalogStore'+import {+ animatePickerModels, cloudModelById, editCapableModels, modelForOp, studioOnlyImageModels, useCloudCatalogStore,+ utilityOpModel, videoPickerModels, cloudModelsFor,+} from '../../../stores/cloudCatalogStore'+import { ALL_ROLES, presetModels, roleForModel } from '../preset-models'+import { intentPickerModels, STANDARD_UPSCALE } from '../create-studio'+import { neuerServer } from './fixtures/test-catalogs'+import prices from './fixtures/studio-prices-2026-10-02.json'++/** Ein Credit kostet uns 0,00001 Dollar (Web: CREDIT_USD). */+const CREDIT_USD = 1e-5++/** Jedes Modell dieser Aufnahme, mit dem Endpunkt, den der Anbieter listet. */+const NEU: Record<string, string> = {+ 'qwen-image-3-pro': 'alibaba/qwen-image-3.0-pro/text-to-image',+ 'qwen-image-3-pro-edit': 'alibaba/qwen-image-3.0-pro/edit',+ 'qwen-image-3': 'alibaba/qwen-image-3.0/text-to-image',+ 'qwen-image-2.1': 'wavespeed-ai/qwen-image-2.1/text-to-image',+ 'qwen-image-2.1-edit': 'wavespeed-ai/qwen-image-2.1/edit',+ 'flux-3': 'black-forest-labs/flux-3/text-to-image',+ 'flux-3-edit': 'black-forest-labs/flux-3/edit',+ 'flux-2-klein-9b': 'wavespeed-ai/flux-2-klein-9b/text-to-image',+ 'krea-2-large': 'wavespeed-ai/krea-v2-large/text-to-image',+ 'cosmos-3-super': 'nvidia/cosmos-3-super/text-to-image',+ 'ideogram-4.5': 'ideogram-ai/ideogram-v4.5',+ 'ideogram-4.5-edit': 'ideogram-ai/ideogram-v4.5/edit',+ 'hidream-o1': 'wavespeed-ai/hidream-o1-image/text-to-image',+ 'hidream-o1-edit': 'wavespeed-ai/hidream-o1-image/edit',+ 'hunyuan-image-3': 'wavespeed-ai/hunyuan-image-3-instruct/text-to-image',+ 'hunyuan-image-3-edit': 'wavespeed-ai/hunyuan-image-3-instruct/edit',+ 'ernie-image-turbo': 'wavespeed-ai/ernie-image/text-to-image-turbo',+ 'seedvr2-image': 'wavespeed-ai/seedvr2/image',+ 'ltx-2.5-t2v': 'wavespeed-ai/ltx-2.5/text-to-video',+ 'ltx-2.5-i2v': 'wavespeed-ai/ltx-2.5/image-to-video',+ 'flux-3-t2v': 'black-forest-labs/flux-3/text-to-video',+ 'flux-3-i2v': 'black-forest-labs/flux-3/image-to-video',+ 'flux-3-start-end': 'black-forest-labs/flux-3/start-end-to-video',+ 'flux-3-extend': 'black-forest-labs/flux-3/video-extend',+ 'flux-3-video-edit': 'black-forest-labs/flux-3/video-edit',+ 'cosmos-3-super-i2v': 'nvidia/cosmos-3-super/image-to-video',+ 'skyreels-v4-t2v': 'skywork-ai/skyreels-v4/text-to-video',+ 'skyreels-v4-i2v': 'skywork-ai/skyreels-v4/image-to-video',+ 'skyreels-v4-ref': 'skywork-ai/skyreels-v4/reference-to-video',+ 'kandinsky-5-pro-t2v': 'wavespeed-ai/kandinsky5-pro/text-to-video',+ 'kandinsky-5-pro-i2v': 'wavespeed-ai/kandinsky5-pro/image-to-video',+ 'minimax-h3-t2v': 'wavespeed-ai/minimax-h3/text-to-video',+ 'minimax-h3-ref': 'wavespeed-ai/minimax-h3/reference-to-video',+ 'minimax-h3-video-edit': 'wavespeed-ai/minimax-h3/video-edit',+ 'wan-3.0-ref': 'alibaba/wan-3.0/reference-to-video',+ 'wan-3.0-video-edit': 'alibaba/wan-3.0/video-edit',+ 'seedvr2-video': 'wavespeed-ai/seedvr2/video',+ 'davinci-magihuman': 'wavespeed-ai/davinci-magihuman/image-to-video',+ yue2: 'wavespeed-ai/yue2-3b/text-to-music',+}++beforeEach(() => {+ useCloudCatalogStore.setState({ models: neuerServer() })+})++describe('die neuen Modelle aus offenen Familien', () => {+ it('sind alle in der Registrierung und im Katalog des neuen Servers, mit dem Endpunkt des Anbieters', () => {+ expect(Object.keys(NEU)).toHaveLength(39)+ for (const [id, endpoint] of Object.entries(NEU)) {+ expect(STUDIO_MODELS[id], id).toBeDefined()+ expect(STUDIO_MODELS[id].endpoint, id).toBe(endpoint)+ expect(cloudModelById(id), id).toBeDefined()+ }+ })++ it('stehen nicht doppelt: kein Endpunkt zweimal, auch nicht unter altem Namen', () => {+ const endpoints = Object.values(STUDIO_MODELS).map((m) => m.endpoint)+ expect(new Set(endpoints).size).toBe(endpoints.length)+ expect(STUDIO_MODELS['qwen-image-3-edit'].endpoint).toBe('alibaba/qwen-image-3.0/edit')+ expect(Object.values(NEU)).not.toContain('alibaba/qwen-image-3.0/edit')+ expect(Object.values(NEU)).not.toContain('wavespeed-ai/minimax-h3/image-to-video')+ expect(Object.values(NEU)).not.toContain('alibaba/wan-3.0/image-to-video')+ expect(Object.values(NEU)).not.toContain('black-forest-labs/flux-3/video-upscale')+ })++ it('haben ein Schema, einen Grundpreis und tragen keine Freigabe-Marke', () => {+ for (const id of Object.keys(NEU)) {+ const m = STUDIO_MODELS[id]+ expect(studioSchema(id).properties, id).toBeTruthy()+ expect(m.baselineUsd, id).toBeGreaterThan(0)+ // Die Familien sind offen, die Endpunkte gefiltert: kein No-refusals-Flag.+ expect(m.adult, id).toBe(false)+ // Mit den Vorgaben allein ist das Modell startbereit.+ expect(() => studioOptions(id, 'a test prompt', {}), id).not.toThrow()+ expect(studioCredits(id, studioOptions(id, 'a test prompt', {}), 5, 1, 100), id).toBeGreaterThan(0)+ }+ })++ it('geben jedem Eingabefeld ein echtes Feld des Anbieterschemas', () => {+ for (const id of Object.keys(NEU)) {+ for (const field of Object.keys(STUDIO_MODELS[id].inputs)) {+ expect(studioSchema(id).properties, `${id}.${field}`).toHaveProperty(field)+ }+ for (const field of Object.keys(STUDIO_MODELS[id].defaults)) {+ expect(studioSchema(id).properties, `${id}.${field}`).toHaveProperty(field)+ }+ }+ })++ it('bepreisen jeden Wert des Preisfeldes, sonst bliebe ein Wert ohne Preis', () => {+ for (const id of Object.keys(STUDIO_MODELS)) {+ const m = STUDIO_MODELS[id]+ const field = m.price.resolutionField ?? 'resolution'+ const values = studioSchema(id).properties?.[field]?.enum+ if (!values || m.price.rates.default !== undefined) continue+ for (const v of values) expect(m.price.rates[String(v)], `${id}: ${field}=${String(v)}`).toBeGreaterThan(0)+ }+ })++ it('gehoeren zu genau einer Rolle, und jede Rolle kennt sie', () => {+ for (const id of Object.keys(NEU)) {+ const rollen = ALL_ROLES.filter((r) => presetModels(r).some((m) => m.id === id))+ expect(rollen, id).toHaveLength(1)+ expect(roleForModel(id), id).toBe(rollen[0])+ }+ })+})++describe('der Preis liegt nie unter dem Einkaufspreis', () => {+ const EXAKT_AUSNAHME = new Set(['qwen-image-2.1-edit', 'minimax-h3-ref'])+ it.each(prices)('$model $options: Credits >= was der Anbieter berechnet', (row) => {+ const options = studioOptions(row.model, '', row.options, false)+ const credits = studioCredits(row.model, options, (row as { seconds?: number }).seconds, (row as { imageCount?: number }).imageCount ?? 1, row.promptLength)+ const einkauf = Math.round(row.usd / CREDIT_USD)+ expect(credits).toBeGreaterThanOrEqual(einkauf)+ const opts = row.options as { mode?: string; duration?: number }+ const fast = opts.mode === 'fast'+ if (fast || EXAKT_AUSNAHME.has(row.model)) expect(credits).toBeLessThanOrEqual(Math.ceil(einkauf * 1.6))+ else expect(credits).toBe(einkauf)+ })++ it('bucht dieselbe Creditzahl wie bei vergleichbaren Modellen: eins zu eins zum Einkauf', () => {+ const alt = studioCredits('minimax-h3', studioOptions('minimax-h3', 'x', { duration: 5, resolution: '480p' }))+ const neu = studioCredits('minimax-h3-t2v', studioOptions('minimax-h3-t2v', 'x', { duration: 5, resolution: '480p' }))+ expect(alt).toBe(Math.round(0.2 / CREDIT_USD))+ expect(neu).toBe(alt)+ expect(studioCredits('wan-3.0', studioOptions('wan-3.0', 'x', { duration: 5, resolution: '720p' })))+ .toBe(studioCredits('wan-3.0-ref', studioOptions('wan-3.0-ref', 'x', { duration: 5, resolution: '720p' })))+ })+})++describe('der Kunde kann sie dort waehlen, wo sie hingehoeren', () => {+ const ids = (list: { id: string }[]) => list.map((m) => m.id)++ it('Text zu Bild: alle elf im Bildwaehler', () => {+ const bild = ids(studioOnlyImageModels())+ for (const id of ['qwen-image-3-pro', 'qwen-image-3', 'qwen-image-2.1', 'flux-3', 'flux-2-klein-9b', 'krea-2-large', 'cosmos-3-super', 'ideogram-4.5', 'hidream-o1', 'hunyuan-image-3', 'ernie-image-turbo']) {+ expect(bild, id).toContain(id)+ }+ })++ it('Bearbeiten: die Editoren stehen im Edit-Waehler und laufen ohne Maske', () => {+ const edit = ids(editCapableModels())+ for (const id of ['qwen-image-3-pro-edit', 'qwen-image-2.1-edit', 'flux-3-edit', 'ideogram-4.5-edit', 'hidream-o1-edit', 'hunyuan-image-3-edit']) {+ expect(edit, id).toContain(id)+ expect(modelForOp('image', 'edit', id), id).toBe(id)+ }+ expect(modelForOp('image', 'edit', 'nonsense')).toBe('qwen-image-2.1-edit')+ })++ it('Text zu Video: im Video-Waehler, und eine Wahl bleibt beim Start bestehen', () => {+ const video = ids(videoPickerModels())+ for (const id of ['ltx-2.5-t2v', 'flux-3-t2v', 'skyreels-v4-t2v', 'kandinsky-5-pro-t2v', 'minimax-h3-t2v']) {+ expect(video, id).toContain(id)+ expect(modelForOp('video', 'generate', id), id).toBe(id)+ }+ // Die klassischen Modelle stehen weiter vorn und haben ihre Wahl behalten.+ expect(video[0]).toBe('wan-2.2-720p')+ expect(modelForOp('video', 'generate', 'wan-2.2-fast')).toBe('wan-2.2-fast')+ })++ it('Bild zu Video: im Animate-Waehler, samt der Referenzmodelle', () => {+ const animate = ids(animatePickerModels())+ for (const id of ['ltx-2.5-i2v', 'flux-3-i2v', 'cosmos-3-super-i2v', 'skyreels-v4-i2v', 'kandinsky-5-pro-i2v', 'davinci-magihuman', 'skyreels-v4-ref', 'minimax-h3-ref', 'wan-3.0-ref']) {+ expect(animate, id).toContain(id)+ expect(modelForOp('video', 'animate', id), id).toBe(id)+ }+ expect(animate).not.toContain('ltx-2.5-t2v')+ })++ it('Verlaengern, Restyle, Upscale und Musik: in der Rolle, die ihre Unterkategorie fuehrt', () => {+ expect(ids(intentPickerModels('extend'))).toContain('flux-3-extend')+ expect(ids(intentPickerModels('video_upscale'))).toContain('seedvr2-video')+ expect(ids(intentPickerModels('music'))).toContain('yue2')+ expect(ids(presetModels('restyle'))).toEqual(expect.arrayContaining(['wan-ditto', 'flux-3-video-edit', 'minimax-h3-video-edit', 'wan-3.0-video-edit']))+ expect(ids(presetModels('startend'))).toEqual(['flux-3-start-end'])+ })++ it('Bild-Upscale: Standard bleibt vorn, SeedVR2 steht daneben und laeuft als Studio-Modell', () => {+ const liste = ids(intentPickerModels('upscale'))+ expect(liste).toEqual([STANDARD_UPSCALE, 'seedvr2-image'])+ expect(utilityOpModel('image', 'upscale', 'seedvr2-image')).toBe('seedvr2-image')+ expect(utilityOpModel('image', 'upscale', 'flux-3')).not.toBe('flux-3')+ expect(utilityOpModel('image', 'removebg', 'seedvr2-image')).not.toBe('seedvr2-image')+ })++ it('jedes Eingabefeld, das die Oberflaeche nicht fuellt, ist ein Feld mit Vorgabe oder ohne Pflicht', () => {+ // In Create faellt nur ein Bild an. Jedes Modell der Waehler Bild, Bearbeiten,+ // Video und Animate muss damit startbereit sein.+ for (const id of [...ids(animatePickerModels()), ...ids(videoPickerModels()), ...ids(editCapableModels())]) {+ const m = STUDIO_MODELS[id]+ if (!m) continue+ const pflicht = studioSchema(id).required ?? []+ const gelesen = new Set(Object.values(m.inputs))+ for (const field of Object.keys(m.inputs)) {+ if (pflicht.includes(field)) expect(['source_path', 'image_paths'], `${id}.${field}`).toContain(m.inputs[field])+ }+ expect(gelesen.has('video_path'), id).toBe(false)+ expect(gelesen.has('last_image_path') && pflicht.some((f) => m.inputs[f] === 'last_image_path'), id).toBe(false)+ }+ })++ it('zeigt im Schema jedes neuen Modells keine Liste als Eingabefeld, die die Oberflaeche nicht fuellt', () => {+ for (const id of Object.keys(NEU)) {+ for (const [field, schema] of Object.entries(studioFields(id))) {+ if (schema.type === 'array') expect(studioSchema(id).required ?? [], `${id}.${field}`).not.toContain(field)+ }+ }+ })++ it('der Katalog nennt die neuen Modelle mit ops studio, nie im klassischen Waehler', () => {+ for (const id of Object.keys(NEU)) {+ expect(cloudModelById(id)?.ops, id).toEqual(['studio'])+ expect(cloudModelsFor(STUDIO_MODELS[id].kind).map((m) => m.id), id).not.toContain(id)+ }+ })+})++describe('Maske und Groesse', () => {+ it('ein Editor per Anweisung braucht keine Maske, flux-dev braucht eine', () => {+ for (const id of ['flux-3-edit', 'qwen-image-3-pro-edit', 'hidream-o1-edit', 'minimax-h3-edit', 'qwen-image-edit']) expect(editNeedsMask(id), id).toBe(false)+ expect(editNeedsMask('flux-dev')).toBe(true)+ })++ it('akzeptiert die Seitenverhaeltnisse von Cosmos 3 Super als size, und prueft width*height sonst weiter', () => {+ expect(studioOptions('cosmos-3-super', 'x', { size: '16:9' }).size).toBe('16:9')+ expect(() => studioOptions('cosmos-3-super', 'x', { size: '9:9' })).toThrow()+ expect(studioOptions('hidream-o1', 'x', { size: '1024*2048' }).size).toBe('1024*2048')+ expect(() => studioOptions('hidream-o1', 'x', { size: '16:9' })).toThrow('width*height')+ })+})++describe('eine Wahl aus einem anderen Tab startet keinen Lauf ohne Bild', () => {+ it('Text zu Bild laesst ein Studio-Bildmodell stehen und biegt Editoren und Upscaler um', () => {+ expect(modelForOp('image', 'generate', 'flux-3')).toBe('flux-3')+ expect(modelForOp('image', 'generate', 'z-image')).toBe('z-image')+ expect(modelForOp('image', 'generate', 'chroma')).toBe('chroma')+ // Character-Studio: der LoRA-Endpunkt bleibt, was er ist.+ expect(modelForOp('image', 'generate', 'flux-schnell-lora')).toBe('flux-schnell-lora')+ for (const edit of ['flux-3-edit', 'qwen-image-edit', 'seedvr2-image', 'minimax-h3-edit']) {+ expect(modelForOp('image', 'generate', edit), edit).toBe('z-image-turbo')+ }+ })+})diff --git a/src/lib/render/__tests__/standard-modelle.test.ts b/src/lib/render/__tests__/standard-modelle.test.tsnew file mode 100644index 00000000..55d4e54f--- /dev/null+++ b/src/lib/render/__tests__/standard-modelle.test.ts@@ -0,0 +1,114 @@+// Standardmodelle fuer eine NEUE Auswahl (02.10.2026, Entscheid David):+// Bild z-image-turbo, Bearbeiten qwen-image-2.1-edit, Video minimax-h3-t2v,+// Animate minimax-h3. Eine gespeicherte Wahl eines Kunden bleibt, wie sie ist.+//+// Desktop: die Standards gelten nur, wo der Server das Modell kennt. Ein+// aelterer Server (alterServer) kennt qwen-image-2.1-edit und minimax-h3-t2v+// nicht, dort faellt jede Stelle auf die erste Zeile ihres Waehlers zurueck,+// genau wie vor diesem Stand.++import { beforeEach, describe, expect, it } from 'vitest'+import { DEFAULT_MODEL_IDS } from '../cloud-models'+import {+ animatePickerModels, classicDefaultModel, cloudModelById, defaultCloudModel, defaultEditModel, editCapableModels,+ modelForOp, useCloudCatalogStore, videoPickerModels,+} from '../../../stores/cloudCatalogStore'+import { useCreateStore } from '../../../stores/createStore'+import { STUDIO_MODELS } from '../studio-contract'+import { alterServer, neuerServer } from './fixtures/test-catalogs'++describe('mit dem Katalog des neuen Servers', () => {+ beforeEach(() => { useCloudCatalogStore.setState({ models: neuerServer() }) })++ it('die vier Standardmodelle stehen im Katalog, sind offen und gehoeren in den Waehler ihrer Unterkategorie', () => {+ for (const id of Object.values(DEFAULT_MODEL_IDS)) {+ const m = cloudModelById(id)+ expect(m, id).toBeDefined()+ expect(m?.weights, id).toBe('open')+ expect(m?.tier, id).toBe('best')+ }+ expect(defaultCloudModel('image')?.id).toBe('z-image-turbo')+ expect(defaultCloudModel('video')?.id).toBe('minimax-h3-t2v')+ expect(defaultEditModel()?.id).toBe('qwen-image-2.1-edit')+ expect(editCapableModels().map((m) => m.id)).toContain(DEFAULT_MODEL_IDS.edit)+ expect(videoPickerModels().map((m) => m.id)).toContain(DEFAULT_MODEL_IDS.video)+ expect(animatePickerModels().map((m) => m.id)).toContain(DEFAULT_MODEL_IDS.animate)+ expect(STUDIO_MODELS['minimax-h3'].endpoint).toMatch(/image-to-video$/)+ expect(STUDIO_MODELS['minimax-h3-t2v'].endpoint).toMatch(/text-to-video$/)+ })++ it('ohne gespeicherte Wahl laeuft jede Unterkategorie auf ihrem Standard', () => {+ expect(modelForOp('image', 'generate', 'z-image-turbo')).toBe('z-image-turbo')+ expect(modelForOp('image', 'edit', '')).toBe('qwen-image-2.1-edit')+ expect(modelForOp('video', 'generate', '')).toBe('minimax-h3-t2v')+ expect(modelForOp('video', 'animate', '')).toBe('minimax-h3')+ expect(modelForOp('video', 'animate', 'minimax-h3-t2v')).toBe('minimax-h3')+ expect(modelForOp('video', 'generate', 'minimax-h3')).toBe('minimax-h3-t2v')+ })++ it('eine gespeicherte Wahl bleibt, wo sie gueltig ist', () => {+ expect(modelForOp('image', 'generate', 'flux-schnell')).toBe('flux-schnell')+ expect(modelForOp('image', 'edit', 'flux-dev')).toBe('flux-dev')+ expect(modelForOp('image', 'edit', 'qwen-image-edit')).toBe('qwen-image-edit')+ expect(modelForOp('video', 'generate', 'wan-2.2-720p')).toBe('wan-2.2-720p')+ expect(modelForOp('video', 'animate', 'wan-2.2-720p')).toBe('wan-2.2-720p')+ expect(modelForOp('video', 'animate', 'seedance-2.5')).toBe('seedance-2.5')+ expect(modelForOp('image', 'generate', 'flux-3')).toBe('flux-3')+ })++ it('Bild-Upscale bleibt wie er war', () => {+ expect(modelForOp('image', 'upscale', 'flux-schnell')).toBe('flux-schnell')+ expect(modelForOp('image', 'upscale', 'seedvr2-image')).toBe('seedvr2-image')+ })++ it('der klassische Standard bleibt ein klassisches Modell, ohne Studio-Eintrag', () => {+ for (const kind of ['image', 'video'] as const) {+ const m = classicDefaultModel(kind)!+ expect(m.ops, kind).toBeUndefined()+ expect(STUDIO_MODELS[m.id], kind).toBeUndefined()+ }+ expect(classicDefaultModel('image')?.id).toBe('flux-schnell')+ expect(classicDefaultModel('video')?.id).toBe('wan-2.2-720p')+ })+})++describe('eine gespeicherte Wahl uebersteht den Speicher', () => {+ it('der Waehler-Zustand schreibt keine Wahl um: wer gewaehlt hat, behaelt sie, wer nie gewaehlt hat, hat ""', () => {+ useCloudCatalogStore.setState({ models: neuerServer() })+ const st = useCreateStore.getState()+ st.setCloudImageModel('flux-schnell')+ st.setCloudVideoModel('wan-2.2-720p')+ expect(useCreateStore.getState().cloudImageModel).toBe('flux-schnell')+ expect(useCreateStore.getState().cloudVideoModel).toBe('wan-2.2-720p')+ // Die Aufloesung biegt die Wahl nur fuer den Lauf um, nie im Speicher.+ expect(modelForOp('image', 'generate', useCreateStore.getState().cloudImageModel)).toBe('flux-schnell')+ expect(useCreateStore.getState().cloudImageModel).toBe('flux-schnell')+ st.setCloudImageModel('')+ st.setCloudVideoModel('')+ expect(useCreateStore.getState().cloudImageModel).toBe('')+ expect(modelForOp('image', 'generate', '')).toBe('z-image-turbo')+ })+})++describe('mit dem Katalog des alten Servers (vor dem 02.10.2026)', () => {+ beforeEach(() => { useCloudCatalogStore.setState({ models: alterServer() }) })++ it('fehlende Standards fallen auf die erste Zeile des Waehlers zurueck, bekannte gelten', () => {+ // z-image-turbo und minimax-h3 kannte der alte Server schon.+ expect(defaultCloudModel('image')?.id).toBe('z-image-turbo')+ expect(modelForOp('video', 'animate', '')).toBe('minimax-h3')+ // qwen-image-2.1-edit und minimax-h3-t2v nicht: es bleibt wie vor dem Stand.+ expect(cloudModelById('qwen-image-2.1-edit')).toBeUndefined()+ expect(cloudModelById('minimax-h3-t2v')).toBeUndefined()+ expect(defaultCloudModel('video')?.id).toBe('wan-2.2-720p')+ expect(modelForOp('video', 'generate', '')).toBe('wan-2.2-720p')+ expect(defaultEditModel()?.id).toBe('flux-dev')+ expect(modelForOp('image', 'edit', '')).toBe('flux-dev')+ })++ it('eine Wahl, die der alte Server nicht kennt, faellt auf den Standard, statt zu scheitern', () => {+ expect(modelForOp('image', 'edit', 'qwen-image-2.1-edit')).toBe('flux-dev')+ expect(modelForOp('video', 'generate', 'minimax-h3-t2v')).toBe('wan-2.2-720p')+ expect(modelForOp('image', 'generate', 'flux-3')).toBe('z-image-turbo')+ })+})diff --git a/src/lib/render/__tests__/studio-contract.test.ts b/src/lib/render/__tests__/studio-contract.test.tsindex 73c4ebc4..84173b53 100644--- a/src/lib/render/__tests__/studio-contract.test.ts+++ b/src/lib/render/__tests__/studio-contract.test.ts@@ -9,7 +9,9 @@* Der Web-Fall "keeps API and worker definitions identical" vergleicht die* API-Kopie gegen die Worker-Kopie im selben Repo. Dafuer gibt es im Desktop* keine Entsprechung; stattdessen haelt der Fall unten die drei JSON-Dateien- * byteidentisch gegen den Web-Worktree, wenn LU_STUDIO_WEB_REPO gesetzt ist,+ * byteidentisch gegen den Web-Worktree, wenn LU_STUDIO_WEB_REPO gesetzt ist+ * (seit 02.10.2026 auch studio-contract.ts und studio-roles.ts, die der Desktop+ * unveraendert uebernimmt),* und ueberspringt sonst sauber, denn der Web-Stand ist beweglich.** Run mit Drift-Pruefung: LU_STUDIO_WEB_REPO=/pfad/zum/web npx vitest run \@@ -29,7 +31,7 @@ if (!WEB) {describe('Cloud studio contracts', () => {describe.skipIf(!WEB)('haelt die Vertragsdaten byteidentisch gegen den Web-Worktree', () => {- it.each(['studio-models.json', 'provider-schemas.json', 'provider-endpoints.json'])('%s', (f) => {+ it.each(['studio-models.json', 'provider-schemas.json', 'provider-endpoints.json', 'studio-contract.ts', 'studio-roles.ts'])('%s', (f) => {const desktop = readFileSync(resolve('src/lib/render', f), 'utf8')const web = readFileSync(resolve(WEB!, 'apps/web/lib/render', f), 'utf8')expect(desktop).toBe(web)diff --git a/src/lib/render/__tests__/studio-options-media.test.ts b/src/lib/render/__tests__/studio-options-media.test.tsnew file mode 100644index 00000000..20826c57--- /dev/null+++ b/src/lib/render/__tests__/studio-options-media.test.ts@@ -0,0 +1,151 @@+// Aus dem Web uebernommen (apps/web/lib/render/__tests__/studio-options-media.test.ts).+// Endpruefung 02.10.2026: was die Optionen eines Studio-Laufs tragen duerfen.+//+// 1. Kein Feld, das eine Datei oder Adresse tragen kann und nicht ueber `inputs`+// laeuft, kommt durch studio_options. Sonst gaebe ein roher POST an /api/jobs+// beliebige fremde Adressen an den Anbieter (an der eigenen Ablage, der+// Groessengrenze und ffprobe vorbei, der Preis haengt dann an der fremden+// Datei).+// 2. Eine freie Groesse als Text hat Grenzen.+// 3. Video-Edit rechnet halb auf die Eingabe und halb auf die Ausgabe.++import { describe, expect, it } from 'vitest'+import preisZeilen from './fixtures/studio-prices-2026-10-02.json'+import { STUDIO_MODELS, isMediaField, studioCredits, studioFields, studioOptions, studioSchema } from '../studio-contract'++const FREMD = 'https://evil.example/x.png'++const ACHT: Record<string, string[]> = {+ 'krea-2-large': ['reference'],+ 'ideogram-4.5-edit': ['mask_url', 'reference_images'],+ 'skyreels-v4-i2v': ['images'],+ 'skyreels-v4-ref': ['ref_videos'],+ 'minimax-h3-ref': ['reference_videos', 'reference_audios'],+ 'wan-3.0-ref': ['reference_videos', 'reference_audios'],+ 'minimax-h3-video-edit': ['reference_images', 'reference_audios'],+ 'wan-3.0-video-edit': ['reference_images', 'reference_audios'],+}++function wert(type: string | undefined) {+ return type === 'array' ? [FREMD] : FREMD+}++describe('studio_options laesst keine freien Datei- und Adressfelder durch', () => {+ it('die acht gemeldeten Felder werden abgewiesen und stehen nicht in den Feldern der Oberflaeche', () => {+ for (const [id, felder] of Object.entries(ACHT)) {+ const props = studioSchema(id).properties ?? {}+ for (const f of felder) {+ expect(props[f], `${id}.${f} fehlt im Schema`).toBeDefined()+ expect(props[f].disabled, `${id}.${f} nicht abgeschaltet`).toBe(true)+ expect(Object.keys(studioFields(id)), `${id}.${f}`).not.toContain(f)+ expect(() => studioOptions(id, 'x', { [f]: wert(props[f].type) }, false), `${id}.${f}`).toThrow(/Unsupported model option/)+ }+ }+ })++ it('Ideogram Edit zeigt kein Feld "Mask url" mehr', () => {+ expect(Object.keys(studioFields('ideogram-4.5-edit'))).not.toContain('mask_url')+ expect(Object.keys(studioFields('ideogram-4.5-edit'))).not.toContain('reference_images')+ })++ it('fuer JEDES Studio-Modell: jedes Medien- oder Adressfeld ausserhalb von inputs wird abgewiesen', () => {+ let geprueft = 0+ for (const [id, m] of Object.entries(STUDIO_MODELS)) {+ const props = studioSchema(id).properties ?? {}+ const promptField = m.promptField ?? 'prompt'+ for (const [key, schema] of Object.entries(props)) {+ if (m.inputs[key] || key === promptField) continue+ if (!isMediaField(key, schema)) continue+ geprueft+++ expect(Object.keys(studioFields(id)), `${id}.${key} steht in den Feldern`).not.toContain(key)+ expect(() => studioOptions(id, 'x', { [key]: wert(schema.type) }, false), `${id}.${key}`).toThrow(/Unsupported model option/)+ }+ }+ // Positivkontrolle: die Regel trifft wirklich etwas.+ expect(geprueft).toBeGreaterThanOrEqual(8)+ })++ it('kein Feld aus inputs und kein Schalter oder Auswahlfeld wird versehentlich gesperrt', () => {+ for (const [id, m] of Object.entries(STUDIO_MODELS)) {+ const fields = studioFields(id)+ for (const [key, schema] of Object.entries(studioSchema(id).properties ?? {})) {+ if (schema.type === 'boolean' || schema.enum || schema.type === 'integer' || schema.type === 'number') {+ if (!schema.disabled && !m.inputs[key] && !['enable_base64_output', 'enable_sync_mode'].includes(key) && key !== (m.promptField ?? 'prompt')) {+ expect(Object.keys(fields), `${id}.${key}`).toContain(key)+ }+ }+ }+ }+ // Kennungen des Anbieters sind keine Dateien.+ expect(Object.keys(studioFields('mureka-song'))).toContain('reference_id')+ })++ it('ein roher Wert in einem Feld, das in inputs steht, geht ebenfalls nicht durch Optionen', () => {+ for (const [id, m] of Object.entries(STUDIO_MODELS)) {+ for (const field of Object.keys(m.inputs)) {+ expect(() => studioOptions(id, 'x', { [field]: FREMD }, false), `${id}.${field}`).toThrow()+ }+ }+ })+})++describe('freie Groesse als Text', () => {+ const frei = Object.entries(STUDIO_MODELS).filter(([id]) => {+ const p = studioSchema(id).properties?.size+ return p && !p.enum && !p.disabled && !(p as { 'x-hidden'?: boolean })['x-hidden']+ }).map(([id]) => id)++ it('betrifft die gemeldeten Modelle', () => {+ for (const id of ['hidream-o1', 'flux-2-klein-9b', 'ernie-image-turbo', 'hunyuan-image-3']) expect(frei).toContain(id)+ })++ it.each(['hidream-o1', 'flux-2-klein-9b', 'ernie-image-turbo', 'hunyuan-image-3'])('%s: Breite und Hoehe zwischen 256 und 4096', (id) => {+ expect(studioOptions(id, 'x', { size: '1024*1024' }, false).size).toBe('1024*1024')+ expect(studioOptions(id, 'x', { size: '4096*4096' }, false).size).toBe('4096*4096')+ expect(studioOptions(id, 'x', { size: '256*256' }, false).size).toBe('256*256')+ for (const zu of ['4097*1024', '1024*4097', '99999*99999', '255*1024', '1024*100', '0*0', '1*1', '1024x1024', '1024*', '*1024', '-5*1024', '1e3*1024']) {+ expect(() => studioOptions(id, 'x', { size: zu }, false), `${id} ${zu}`).toThrow(/Size must be/)+ }+ })++ it('jedes Modell mit freier Groesse prueft sie', () => {+ for (const id of frei) {+ expect(() => studioOptions(id, 'x', { size: '99999*99999' }, false), id).toThrow(/Size must be/)+ }+ })+})++describe('Video-Edit: halber Satz auf die Eingabe, halber auf die Ausgabe', () => {+ const EIN = 10.026667 // gemessene Eingabe, wird auf 11 Sekunden aufgerundet+ const preise = preisZeilen as Array<{ model: string; options: Record<string, unknown>; usd: number; seconds?: number }>++ const credits = (id: string, o: Record<string, unknown>) => studioCredits(id, studioOptions(id, 'x', o, false), EIN)++ it('MiniMax H3 480p: ohne Dauer 1,10 USD, Dauer 3 gleich 0,70, Dauer 15 gleich 1,30', () => {+ expect(credits('minimax-h3-video-edit', { resolution: '480p' })).toBe(110000)+ expect(credits('minimax-h3-video-edit', { resolution: '480p', duration: 3 })).toBe(70000)+ expect(credits('minimax-h3-video-edit', { resolution: '480p', duration: 15 })).toBe(130000)+ })++ it('Wan 3.0: dasselbe Muster ueber alle Aufloesungen', () => {+ expect(credits('wan-3.0-video-edit', { resolution: '720p', duration: 3 })).toBe(140000)+ expect(credits('wan-3.0-video-edit', { resolution: '720p', duration: 15 })).toBe(260000)+ expect(credits('wan-3.0-video-edit', { resolution: '1080p', duration: 3 })).toBe(280000)+ expect(credits('wan-3.0-video-edit', { resolution: '1080p', duration: 15 })).toBe(520000)+ })++ it('jede am Anbieter gemessene Zeile stimmt genau', () => {+ const zeilen = preise.filter((r) => /video-edit$/.test(r.model))+ expect(zeilen.length).toBeGreaterThanOrEqual(20)+ for (const r of zeilen) {+ const o = studioOptions(r.model, 'x', r.options, false)+ expect(studioCredits(r.model, o, r.seconds), `${r.model} ${JSON.stringify(r.options)}`).toBe(Math.round(r.usd * 100000))+ }+ })++ it('beide Modelle tragen den Modus inout und lesen die Eingabe aus der Messung', () => {+ for (const id of ['minimax-h3-video-edit', 'wan-3.0-video-edit']) expect(STUDIO_MODELS[id].price.mode).toBe('inout')+ expect(() => studioCredits('wan-3.0-video-edit', { resolution: '480p' })).toThrow()+ expect(() => studioCredits('wan-3.0-video-edit', { resolution: '480p' }, 16)).toThrow(/no longer than 15/)+ })+})diff --git a/src/lib/render/cloud-models.ts b/src/lib/render/cloud-models.tsindex b0a047d9..9ccc3cb7 100644--- a/src/lib/render/cloud-models.ts+++ b/src/lib/render/cloud-models.ts@@ -5,7 +5,7 @@// uselu apps/web/lib/render/cloud-models.ts when touching this file.import type { RenderKind, RenderOp } from './cloud-jobs'-import type { Schema, StudioModel } from './studio-contract'+import type { ModelTier, ModelWeights, Schema, StudioModel } from './studio-contract'export interface CloudModel {id: string@@ -94,30 +94,52 @@ export interface CloudModel {* than the short/long pair precisely instead of rounding onto one of* them; `runCredits()` in cloudCatalogStore.ts prefers this when present. */credits?: { base: number; long?: number; per_s?: number; lora?: number; by_duration?: Record<string, number> }+ /** Stufe in den Waehlern (server field `tier`, 02.10.2026): 'best' steht oben,+ * 'older' gesammelt unten, nichts wird versteckt. Optional: ein aelterer+ * Server und der Notvorrat eines frueheren Stands liefern es nicht, dann+ * gilt das Modell als 'standard' (model-tier.ts, tierOf). */+ tier?: ModelTier+ /** Herkunft (server field `weights`): 'open' = genau diese Version hat offene+ * Gewichte, 'open-family' = die Familie ist offen, diese Version noch nicht,+ * 'closed' = nie offen. Optional aus demselben Grund wie `tier`; ohne das+ * Feld traegt das Modell keine Marke (model-tier.ts, weightsOf). */+ weights?: ModelWeights}+/** Die Standardmodelle fuer eine NEUE Auswahl (seit 02.10.2026, wie im Web):+ * offen, guenstig, auf dem Stand der Technik. Sie gelten nur, wo ein Kunde noch+ * nichts gewaehlt hat UND der Server das Modell kennt. Kennt er es nicht (ein+ * aelterer Server), faellt jede Stelle auf die erste Zeile ihres Waehlers+ * zurueck, wie vor diesem Stand. */+export const DEFAULT_MODEL_IDS = {+ image: 'z-image-turbo',+ edit: 'qwen-image-2.1-edit',+ video: 'minimax-h3-t2v',+ animate: 'minimax-h3',+} as const+const CLIP = { short: 5, long: 8 }export const CLOUD_MODEL_SEED: CloudModel[] = [- { id: 'flux-schnell', label: 'Flux Schnell (fast)', kind: 'image', cfg: true },- { id: 'flux-dev', label: 'Flux Dev (quality)', kind: 'image', edit: true, cfg: true },- { id: 'flux-2-dev', label: 'Flux 2 Dev', kind: 'image' },- { id: 'qwen-image', label: 'Qwen Image', kind: 'image' },- { id: 'hidream', label: 'HiDream', kind: 'image' },- { id: 'hunyuan-image', label: 'HunyuanImage 2.1', kind: 'image' },- { id: 'z-image-turbo', label: 'Z-Image Turbo (fast)', kind: 'image' },- { id: 'chroma', label: 'Chroma Spicy', kind: 'image', adult: true },- { id: 'prefect-pony', label: 'Prefect Pony XL (illustration) Spicy', kind: 'image', adult: true },- { id: 'neta-lumina', label: 'Neta Lumina (anime) Spicy', kind: 'image', adult: true },+ { id: 'flux-schnell', label: 'Flux Schnell (fast)', kind: 'image', cfg: true, tier: 'older', weights: 'open' },+ { id: 'flux-dev', label: 'Flux Dev (quality)', kind: 'image', edit: true, cfg: true, tier: 'older', weights: 'open' },+ { id: 'flux-2-dev', label: 'Flux 2 Dev', kind: 'image', tier: 'standard', weights: 'open' },+ { id: 'qwen-image', label: 'Qwen Image', kind: 'image', tier: 'older', weights: 'open' },+ { id: 'hidream', label: 'HiDream', kind: 'image', tier: 'older', weights: 'open' },+ { id: 'hunyuan-image', label: 'HunyuanImage 2.1', kind: 'image', tier: 'older', weights: 'open' },+ { id: 'z-image-turbo', label: 'Z-Image Turbo (fast)', kind: 'image', tier: 'best', weights: 'open' },+ { id: 'chroma', label: 'Chroma Spicy', kind: 'image', adult: true, tier: 'standard', weights: 'open' },+ { id: 'prefect-pony', label: 'Prefect Pony XL (illustration) Spicy', kind: 'image', adult: true, tier: 'standard', weights: 'open' },+ { id: 'neta-lumina', label: 'Neta Lumina (anime) Spicy', kind: 'image', adult: true, tier: 'standard', weights: 'open' },// Every hosted clip model does both t2v + i2v, so both flags are true. They're// the enforced contract (Video/Animate pickers + submit filter on them), not a// note — a future t2v-only or i2v-only model MUST set the flag it lacks to// false. Server truth is /api/jobs/catalog; keep in sync with uselu.- { id: 'wan-2.2-720p', label: 'Wan 2.2 720p', kind: 'video', t2v: true, i2v: true, negative_prompt: true, clip: CLIP },- { id: 'wan-2.2-fast', label: 'Wan 2.2 Fast', kind: 'video', t2v: true, i2v: true, negative_prompt: true, clip: CLIP },- { id: 'ltx-2', label: 'LTX-2 (with audio)', kind: 'video', t2v: true, i2v: true, clip: CLIP, credits: { base: 8000, lora: 10000 } },- { id: 'hunyuan-video', label: 'HunyuanVideo 1.5', kind: 'video', t2v: true, i2v: true, negative_prompt: true, clip: CLIP },- { id: 'ltx-2.3', label: 'LTX 2.3', kind: 'video', t2v: true, i2v: true, clip: CLIP },+ { id: 'wan-2.2-720p', label: 'Wan 2.2 720p', kind: 'video', t2v: true, i2v: true, negative_prompt: true, clip: CLIP, tier: 'older', weights: 'open' },+ { id: 'wan-2.2-fast', label: 'Wan 2.2 Fast', kind: 'video', t2v: true, i2v: true, negative_prompt: true, clip: CLIP, tier: 'older', weights: 'open' },+ { id: 'ltx-2', label: 'LTX-2 (with audio)', kind: 'video', t2v: true, i2v: true, clip: CLIP, credits: { base: 8000, lora: 10000 }, tier: 'older', weights: 'open' },+ { id: 'hunyuan-video', label: 'HunyuanVideo 1.5', kind: 'video', t2v: true, i2v: true, negative_prompt: true, clip: CLIP, tier: 'older', weights: 'open' },+ { id: 'ltx-2.3', label: 'LTX 2.3', kind: 'video', t2v: true, i2v: true, clip: CLIP, tier: 'older', weights: 'open' },// Image-to-video endpoints the provider ships with its own filter off// (mirroring uselu apps/web/lib/render/cloud-models.ts). None of them has a@@ -125,53 +147,53 @@ export const CLOUD_MODEL_SEED: CloudModel[] = [// first, then one of these. CLIP does not fit here, the provider quotes only// a 5 s rate for them, so there is no 8s button to offer.// 2026-09-10:- { id: 'wan-2.2-spicy', label: 'Wan 2.2 Spicy', kind: 'video', t2v: false, i2v: true, adult: true, clip: { short: 5 }, credits: { base: 15000, lora: 20000 } },- { id: 'ltx-2.3-spicy', label: 'LTX 2.3 Spicy', kind: 'video', t2v: false, i2v: true, adult: true, clip: { short: 5 }, credits: { base: 10000, lora: 15000 } },- { id: 'wan-2.6-spicy', label: 'Wan 2.6 Spicy', kind: 'video', t2v: false, i2v: true, adult: true, clip: { short: 5 }, credits: { base: 50000 } },- { id: 'wan-2.7-spicy', label: 'Wan 2.7 Spicy', kind: 'video', t2v: false, i2v: true, adult: true, clip: { short: 5 }, credits: { base: 50000 } },- { id: 'minimax-h3-spicy', label: 'MiniMax H3 Spicy', kind: 'video', t2v: false, i2v: true, adult: true, clip: { short: 5 }, credits: { base: 20000 } },- { id: 'seedance-1.5-pro-spicy', label: 'Seedance 1.5 Pro Spicy', kind: 'video', t2v: false, i2v: true, adult: true, clip: { short: 5 }, credits: { base: 26000 } },+ { id: 'wan-2.2-spicy', label: 'Wan 2.2 Spicy', kind: 'video', t2v: false, i2v: true, adult: true, clip: { short: 5 }, credits: { base: 15000, lora: 20000 }, tier: 'older', weights: 'open' },+ { id: 'ltx-2.3-spicy', label: 'LTX 2.3 Spicy', kind: 'video', t2v: false, i2v: true, adult: true, clip: { short: 5 }, credits: { base: 10000, lora: 15000 }, tier: 'older', weights: 'open' },+ { id: 'wan-2.6-spicy', label: 'Wan 2.6 Spicy', kind: 'video', t2v: false, i2v: true, adult: true, clip: { short: 5 }, credits: { base: 50000 }, tier: 'older', weights: 'open-family' },+ { id: 'wan-2.7-spicy', label: 'Wan 2.7 Spicy', kind: 'video', t2v: false, i2v: true, adult: true, clip: { short: 5 }, credits: { base: 50000 }, tier: 'standard', weights: 'open-family' },+ { id: 'minimax-h3-spicy', label: 'MiniMax H3 Spicy', kind: 'video', t2v: false, i2v: true, adult: true, clip: { short: 5 }, credits: { base: 20000 }, tier: 'best', weights: 'open' },+ { id: 'seedance-1.5-pro-spicy', label: 'Seedance 1.5 Pro Spicy', kind: 'video', t2v: false, i2v: true, adult: true, clip: { short: 5 }, credits: { base: 26000 }, tier: 'older', weights: 'closed' },// 2026-09-13:- { id: 'seedance-2.5-spicy', label: 'Seedance 2.5 Spicy', kind: 'video', t2v: false, i2v: true, adult: true, clip: { short: 5 }, credits: { base: 90000 } },- { id: 'seedance-2.0-spicy', label: 'Seedance 2.0 Spicy', kind: 'video', t2v: false, i2v: true, adult: true, clip: { short: 5 }, credits: { base: 60000 } },- { id: 'seedance-2.0-fast-spicy', label: 'Seedance 2.0 Fast Spicy', kind: 'video', t2v: false, i2v: true, adult: true, clip: { short: 5 }, credits: { base: 50000 } },- { id: 'vidu-q3-spicy', label: 'Vidu Q3 Spicy', kind: 'video', t2v: false, i2v: true, adult: true, clip: { short: 5 }, credits: { base: 35000 } },+ { id: 'seedance-2.5-spicy', label: 'Seedance 2.5 Spicy', kind: 'video', t2v: false, i2v: true, adult: true, clip: { short: 5 }, credits: { base: 90000 }, tier: 'best', weights: 'closed' },+ { id: 'seedance-2.0-spicy', label: 'Seedance 2.0 Spicy', kind: 'video', t2v: false, i2v: true, adult: true, clip: { short: 5 }, credits: { base: 60000 }, tier: 'older', weights: 'closed' },+ { id: 'seedance-2.0-fast-spicy', label: 'Seedance 2.0 Fast Spicy', kind: 'video', t2v: false, i2v: true, adult: true, clip: { short: 5 }, credits: { base: 50000 }, tier: 'older', weights: 'closed' },+ { id: 'vidu-q3-spicy', label: 'Vidu Q3 Spicy', kind: 'video', t2v: false, i2v: true, adult: true, clip: { short: 5 }, credits: { base: 35000 }, tier: 'standard', weights: 'closed' },// ── 2.5.8 op-specialized fleet (Character-Studio / lipsync / voice / music /// extend / motion). `ops` keeps them out of every classic picker; the live// catalog (?v=2) is the pricing truth. Face-swap is banned from this list. ──- { id: 'flux-lora-trainer', label: 'Flux Character Training', kind: 'image', ops: ['lora-train'] },- { id: 'z-image-lora-trainer', label: 'Z-Image Character Training', kind: 'image', ops: ['lora-train'] },- { id: 'qwen-image-lora-trainer', label: 'Qwen Character Training', kind: 'image', ops: ['lora-train'] },+ { id: 'flux-lora-trainer', label: 'Flux Character Training', kind: 'image', ops: ['lora-train'], tier: 'older', weights: 'open' },+ { id: 'z-image-lora-trainer', label: 'Z-Image Character Training', kind: 'image', ops: ['lora-train'], tier: 'best', weights: 'open' },+ { id: 'qwen-image-lora-trainer', label: 'Qwen Character Training', kind: 'image', ops: ['lora-train'], tier: 'older', weights: 'open' },// uselu 5be5dec3 (15.09.2026): der LTX-Video-Trainer verlangt Videos als// Trainingsmaterial, diese Oberflaeche laedt nur Fotos hoch. Bewusst NICHT// mitgefuehrt, kein Rueckstand: "do not advertise an input contract this// client cannot satisfy" (Web-Kommentar an derselben Stelle).- { id: 'flux-schnell-lora', label: 'Flux Schnell + Character', kind: 'image', ops: ['generate'], lora: true, cfg: true },- { id: 'flux-dev-lora-ultra-fast', label: 'Flux Dev Fast + Character', kind: 'image', ops: ['generate'], lora: true, cfg: true },- { id: 'z-image-turbo-lora', label: 'Z-Image Turbo + Character', kind: 'image', ops: ['generate'], lora: true },- { id: 'z-image-base-lora', label: 'Z-Image + Character', kind: 'image', ops: ['generate'], lora: true },+ { id: 'flux-schnell-lora', label: 'Flux Schnell + Character', kind: 'image', ops: ['generate'], lora: true, cfg: true, tier: 'older', weights: 'open' },+ { id: 'flux-dev-lora-ultra-fast', label: 'Flux Dev Fast + Character', kind: 'image', ops: ['generate'], lora: true, cfg: true, tier: 'older', weights: 'open' },+ { id: 'z-image-turbo-lora', label: 'Z-Image Turbo + Character', kind: 'image', ops: ['generate'], lora: true, tier: 'best', weights: 'open' },+ { id: 'z-image-base-lora', label: 'Z-Image + Character', kind: 'image', ops: ['generate'], lora: true, tier: 'best', weights: 'open' },// R5-57/58: missing from this seed entirely, so the edit picker never// offered it and the model was unreachable until the live catalog fetch// landed. Label and maskless flag copied verbatim from uselu// apps/web/lib/render/cloud-models.ts.- { id: 'qwen-image-lora', label: 'Qwen Image + Character', kind: 'image', ops: ['generate'], lora: true },- { id: 'qwen-image-edit', label: 'Qwen Image Edit (no mask needed)', kind: 'image', ops: ['edit'], maskless: true },- { id: 'infinitetalk-fast', label: 'InfiniteTalk (photo avatar)', kind: 'video', ops: ['lipsync'], lipsync_source: 'image', t2v: false, i2v: false },- { id: 'p-video-avatar', label: 'P-Video Avatar (photo, fast)', kind: 'video', ops: ['lipsync'], lipsync_source: 'image', t2v: false, i2v: false },- { id: 'latentsync', label: 'LatentSync (resync a clip)', kind: 'video', ops: ['lipsync'], lipsync_source: 'video', t2v: false, i2v: false },- { id: 'lipsync-2', label: 'Lipsync-2 (resync a clip)', kind: 'video', ops: ['lipsync'], lipsync_source: 'video', t2v: false, i2v: false },- { id: 'qwen3-tts', label: 'Qwen3 TTS (voices)', kind: 'audio', ops: ['tts'] },- { id: 'qwen3-tts-clone', label: 'Qwen3 TTS Voice Clone', kind: 'audio', ops: ['tts'] },- { id: 'qwen3-tts-design', label: 'Qwen3 TTS Voice Design', kind: 'audio', ops: ['tts'] },- { id: 'ace-step', label: 'ACE-Step (fast)', kind: 'audio', ops: ['music'], credits: { base: 1200, per_s: 20 } },- { id: 'ace-step-1.5', label: 'ACE-Step 1.5', kind: 'audio', ops: ['music'], lyrics: true, credits: { base: 1800, per_s: 30 } },- { id: 'sonilo-music', label: 'Sonilo Music', kind: 'audio', ops: ['music'], credits: { base: 15000, per_s: 250 } },- { id: 'wan-2.2-spicy-extend', label: 'Wan 2.2 Spicy Extend', kind: 'video', ops: ['extend'], t2v: false, i2v: false, adult: true, credits: { base: 15000, lora: 20000 } },- { id: 'ltx-2-extend', label: 'LTX-2 Extend', kind: 'video', ops: ['extend'], t2v: false, i2v: false },- { id: 'pixverse-extend', label: 'Pixverse Extend (fast)', kind: 'video', ops: ['extend'], t2v: false, i2v: false },- { id: 'wan-2.2-animate', label: 'Wan 2.2 Animate', kind: 'video', ops: ['motion'], t2v: false, i2v: false },- { id: 'steady-dancer', label: 'SteadyDancer', kind: 'video', ops: ['motion'], t2v: false, i2v: false },- { id: 'p-video-animate', label: 'P-Video Animate (fast)', kind: 'video', ops: ['motion'], t2v: false, i2v: false },- { id: 'dreamactor-v2', label: 'DreamActor v2', kind: 'video', ops: ['motion'], t2v: false, i2v: false },+ { id: 'qwen-image-lora', label: 'Qwen Image + Character', kind: 'image', ops: ['generate'], lora: true, tier: 'older', weights: 'open' },+ { id: 'qwen-image-edit', label: 'Qwen Image Edit (no mask needed)', kind: 'image', ops: ['edit'], maskless: true, tier: 'older', weights: 'open' },+ { id: 'infinitetalk-fast', label: 'InfiniteTalk (photo avatar)', kind: 'video', ops: ['lipsync'], lipsync_source: 'image', t2v: false, i2v: false, tier: 'standard', weights: 'open' },+ { id: 'p-video-avatar', label: 'P-Video Avatar (photo, fast)', kind: 'video', ops: ['lipsync'], lipsync_source: 'image', t2v: false, i2v: false, tier: 'standard', weights: 'closed' },+ { id: 'latentsync', label: 'LatentSync (resync a clip)', kind: 'video', ops: ['lipsync'], lipsync_source: 'video', t2v: false, i2v: false, tier: 'standard', weights: 'open' },+ { id: 'lipsync-2', label: 'Lipsync-2 (resync a clip)', kind: 'video', ops: ['lipsync'], lipsync_source: 'video', t2v: false, i2v: false, tier: 'older', weights: 'closed' },+ { id: 'qwen3-tts', label: 'Qwen3 TTS (voices)', kind: 'audio', ops: ['tts'], tier: 'standard', weights: 'open' },+ { id: 'qwen3-tts-clone', label: 'Qwen3 TTS Voice Clone', kind: 'audio', ops: ['tts'], tier: 'standard', weights: 'open' },+ { id: 'qwen3-tts-design', label: 'Qwen3 TTS Voice Design', kind: 'audio', ops: ['tts'], tier: 'standard', weights: 'open' },+ { id: 'ace-step', label: 'ACE-Step (fast)', kind: 'audio', ops: ['music'], credits: { base: 1200, per_s: 20 }, tier: 'older', weights: 'open' },+ { id: 'ace-step-1.5', label: 'ACE-Step 1.5', kind: 'audio', ops: ['music'], lyrics: true, credits: { base: 1800, per_s: 30 }, tier: 'standard', weights: 'open' },+ { id: 'sonilo-music', label: 'Sonilo Music', kind: 'audio', ops: ['music'], credits: { base: 15000, per_s: 250 }, tier: 'standard', weights: 'closed' },+ { id: 'wan-2.2-spicy-extend', label: 'Wan 2.2 Spicy Extend', kind: 'video', ops: ['extend'], t2v: false, i2v: false, adult: true, credits: { base: 15000, lora: 20000 }, tier: 'older', weights: 'open' },+ { id: 'ltx-2-extend', label: 'LTX-2 Extend', kind: 'video', ops: ['extend'], t2v: false, i2v: false, tier: 'older', weights: 'open' },+ { id: 'pixverse-extend', label: 'Pixverse Extend (fast)', kind: 'video', ops: ['extend'], t2v: false, i2v: false, tier: 'standard', weights: 'closed' },+ { id: 'wan-2.2-animate', label: 'Wan 2.2 Animate', kind: 'video', ops: ['motion'], t2v: false, i2v: false, tier: 'standard', weights: 'open' },+ { id: 'steady-dancer', label: 'SteadyDancer', kind: 'video', ops: ['motion'], t2v: false, i2v: false, tier: 'standard', weights: 'open' },+ { id: 'p-video-animate', label: 'P-Video Animate (fast)', kind: 'video', ops: ['motion'], t2v: false, i2v: false, tier: 'standard', weights: 'closed' },+ { id: 'dreamactor-v2', label: 'DreamActor v2', kind: 'video', ops: ['motion'], t2v: false, i2v: false, tier: 'standard', weights: 'closed' },]diff --git a/src/lib/render/create-studio.ts b/src/lib/render/create-studio.tsindex 0592000a..9936fb3a 100644--- a/src/lib/render/create-studio.ts+++ b/src/lib/render/create-studio.ts@@ -13,7 +13,8 @@import type { CreateIntent } from '../../stores/createStore'import { STUDIO_MODELS, studioBaseCredits, studioPreviewCredits } from './studio-contract'import { presetModels, requiredRoleInputs, type PresetModel, type StepRole } from './preset-models'-import { catalogHasStudio, opPickerModels } from '../../stores/cloudCatalogStore'+import { defaultCloudModel, modelForOp, opPickerModels } from '../../stores/cloudCatalogStore'+import { intentToJob } from './cloud-jobs'// Desktop port (P2, checked again in P9): the web's CreateIntent already// carries 'video_upscale' as a distinct intent from the plain 'upscale'@@ -42,8 +43,15 @@ const INTENT_ROLE: Partial<Record<StudioIntent, StepRole[]>> = {extend: ['extend'],motion: ['motion'],video_upscale: ['upscale'],+ // Enhance Image: der Standard-Upscaler plus SeedVR2. Siehe intentPickerModels.+ upscale: ['imageup'],}+/** Die Wahl "Standard" im Waehler von Enhance Image: der feste Endpunkt, auf dem+ * die Unterkategorie bis 02.10.2026 allein lief. Kein Studio-Modell, deshalb+ * schickt der Start dafuer weiter den Bild-Upscale-Op und kein Studio-Op. */+export const STANDARD_UPSCALE = 'upscale-standard'+export function intentRoles(intent: StudioIntent): StepRole[] {return INTENT_ROLE[intent] ?? []}@@ -59,20 +67,18 @@ export function intentRoleFor(intent: StudioIntent, model: string): StepRole | u* kennt, und ein Wechsel der Liste darf seine bisherige Wahl nicht verschieben.* `lipsync` fuehrt zusaetzlich die beiden Nachvertonungsmodelle, die einen* fertigen Clip statt eines Fotos lesen. Die sind kein Rollenmitglied, gehoeren- * in der Oberflaeche aber seit jeher hierher.+ * in der Oberflaeche aber seit jeher hierher. `upscale` (Enhance Image) fuehrt+ * vorn den festen Standard-Endpunkt, der kein Modell ist (STANDARD_UPSCALE).*- * Review B1 (Runde 2, 20.09.2026): ein Studio-Mitglied (`m.op === 'studio'`)- * erscheint NUR, wenn der lebende Katalog `quote_required` fuehrt- * (catalogHasStudio(), cloudCatalogStore.ts). Ein aelterer Server (oder ein- * frischer Zustand vor der ersten Katalogabfrage) sagt damit selbst, dass er- * die Studio-Endpunkte nicht kennt, und diese EINE Stelle traegt die Regel- * fuer alle fuenf Aufrufer (Composer, CreditsMeter, CreateExperimental,- * ModelChip direkt, useCloudCreate ueber resolveIntentPick). Vorher wich- * jede Rolle auf ihr erstes STUDIO_MODELS-Mitglied aus, sobald der- * gespeicherte cloudOpModel nicht (mehr) in der Liste stand, und Extend/- * Motion liefen damit auf einem Server ohne Studio ins Leere- * (review-studio-B.md B1). Jede klassische Absicht (lipsync/music) faellt- * auf ihre klassischen Mitglieder zurueck, genau wie vor dem Port. */+ * Ein Studio-Mitglied erscheint NUR, wenn der lebende Katalog genau dieses+ * Modell fuehrt (preset-models.ts, studioKnown). Ein aelterer Server sagt damit+ * selbst, welche Studio-Endpunkte er nicht kennt, und diese EINE Stelle traegt+ * die Regel fuer alle Aufrufer (Composer, CreditsMeter, CreateExperimental,+ * ModelChip direkt, useCloudCreate ueber resolveIntentPick). Review B1+ * (Runde 2, 20.09.2026): vorher wich jede Rolle auf ihr erstes Studio-Mitglied+ * aus, und Extend/Motion liefen auf einem Server ohne Studio ins Leere. Jede+ * klassische Absicht (lipsync/music) faellt auf ihre klassischen Mitglieder+ * zurueck, genau wie vor dem Port. */export function intentPickerModels(intent: StudioIntent): PresetModel[] {const roles = intentRoles(intent)if (!roles.length) return []@@ -80,13 +86,12 @@ export function intentPickerModels(intent: StudioIntent): PresetModel[] {const seen = new Set<string>()const add = (m: PresetModel) => { if (!seen.has(m.id)) { seen.add(m.id); out.push(m) } }if (intent === 'lipsync') for (const m of opPickerModels('lipsync')) {- add({ id: m.id, label: m.label, kind: m.kind, op: 'lipsync', adult: m.adult === true })+ add({ id: m.id, label: m.label, kind: m.kind, op: 'lipsync', adult: m.adult === true, tier: m.tier, weights: m.weights })}- const studioLive = catalogHasStudio()- for (const role of roles) for (const m of presetModels(role)) {- if (m.op === 'studio' && !studioLive) continue- add(m)+ if (intent === 'upscale') {+ add({ id: STANDARD_UPSCALE, label: 'Standard', kind: 'image', op: 'upscale', adult: false, tier: 'standard', weights: 'closed' })}+ for (const role of roles) for (const m of presetModels(role)) add(m)return out}@@ -101,6 +106,29 @@ export function resolveIntentPick(intent: StudioIntent, picked: string): stringreturn list.some((m) => m.id === picked) ? picked : list[0].id}+/** Das Studio-Modell, auf dem ein Cloud-Lauf dieser Unterkategorie wirklich+ * laeuft, oder `undefined`. Dieselbe Aufloesung wie Waehler, Zaehler und Start:+ * Rollen-Absichten lesen ihre Wahl aus der Rolle, alle anderen laufen durch+ * modelForOp. Der Character-Weg bleibt auf seiner festen -lora-Familie und+ * die spezialisierten Ops ohne Rolle (Training) fahren nie Studio. Die+ * Schublade mit den Einstellungen liest das, um ihr Schema zu zeigen. */+export function studioPickFor(+ intent: StudioIntent,+ s: { cloudImageModel: string; cloudVideoModel: string; cloudOpModel: string },+): string | undefined {+ if (intent === 'character') return undefined+ if (intentRoles(intent).length) {+ const picked = resolveIntentPick(intent, s.cloudOpModel)+ return isStudioModel(picked) ? picked : undefined+ }+ if (intent === 'video_upscale') return undefined+ const { kind, op } = intentToJob(intent)+ if (op === 'lora-train' || op === 'tts') return undefined+ const picked = (kind === 'video' ? s.cloudVideoModel : s.cloudImageModel) || defaultCloudModel(kind)?.id || ''+ const model = modelForOp(kind, op, picked)+ return isStudioModel(model) ? model : undefined+}+export function isStudioModel(id: string): boolean {return !!STUDIO_MODELS[id]}@@ -122,8 +150,19 @@ export function createStudioCost(options: Record<string, unknown>,promptLength = 100,seconds?: number,+ imageCount = 1,): number {- return studioPreviewCredits(model, options, seconds, 1, promptLength) ?? studioBaseCredits(model)+ return studioPreviewCredits(model, options, seconds, imageCount, promptLength) ?? studioBaseCredits(model)+}++/** Wie viele Bilder der Start eines Studio-Modells im Create-Tab schickt: das+ * eine Standbild der Oberflaeche, als Einzelbild oder als Liste mit einem+ * Eintrag (useCloudCreate). `undefined`, wo ein Modell mehr als Bilder liest+ * (Ton, Video) oder keines. Dann gibt es keinen Vorab-Preis ohne Datei. */+export function startImageCount(model: string): number | undefined {+ const reads = Object.values(STUDIO_MODELS[model]?.inputs ?? {})+ if (!reads.length || reads.some((k) => k !== 'source_path' && k !== 'image_paths' && k !== 'last_image_path')) return undefined+ return 1}/** Haengt der Preis dieses Modells an der Laenge einer hochgeladenen Datei?@@ -132,5 +171,5 @@ export function createStudioCost(* Anbieter sofort beziffern, weil nichts zu messen ist. */export function pricesByInput(model: string): boolean {const mode = STUDIO_MODELS[model]?.price.mode- return mode === 'input' || mode === 'both'+ return mode === 'input' || mode === 'both' || mode === 'inout'}diff --git a/src/lib/render/model-tier.ts b/src/lib/render/model-tier.tsnew file mode 100644index 00000000..051fa055--- /dev/null+++ b/src/lib/render/model-tier.ts@@ -0,0 +1,80 @@+// Wie die Cloud-Waehler Modelle ordnen und kennzeichnen (02.10.2026, David).+//+// Die Stufe ordnet, sie versteckt nichts: 'best' steht oben und traegt eine+// kleine Marke, 'older' steht gesammelt unten unter einer Zwischenzeile, alles+// dazwischen behaelt seine Reihenfolge. Die Herkunft steht dezent daneben,+// sobald die Familie offene Gewichte hat. Diese Datei ist rein und kennt keine+// Oberflaeche, damit ModelChip und PresetWorkshop dieselbe Regel benutzen und+// ein Test sie festhalten kann.+//+// Desktop-Unterschied zum Web: dort tragen alle Modelle beide Felder, weil der+// Katalog im selben Repo liegt. Der Desktop liest den Katalog vom Server, und+// ein aelterer Server liefert die Felder nicht. Ein Modell ohne `tier` gilt+// darum als 'standard' und eines ohne `weights` als 'closed' ohne Marke: es+// steht in seiner gewohnten Reihenfolge und traegt nichts. Lokale ComfyUI-+// Modelle haben noch keine Stufe und laufen durch dieselben Regeln.++import type { ModelTier, ModelWeights } from './studio-contract'++export type { ModelTier, ModelWeights }++/** Die Zwischenzeile ueber den aelteren Modellen. */+export const OLDER_GROUP = 'Older models'++const RANK: Record<ModelTier, number> = { best: 0, standard: 1, older: 2 }++const TIERS: readonly string[] = ['best', 'standard', 'older']+const WEIGHTS: readonly string[] = ['open', 'open-family', 'closed']++/** Die Felder, die ein Modell tragen KANN. Fehlt eines, gilt es als neutral. */+export interface TierFields { tier?: ModelTier; weights?: ModelWeights }++/** Jedes Modell darf in diese Funktionen, auch eines, das die Felder gar nicht+ * kennt (ein lokales ComfyUI-Modell): `object` statt `TierFields`, weil TypeScript+ * einen Typ aus lauter optionalen Feldern fuer Objekte ohne eines davon ablehnt. */+type Tiered = object++function fields(m: Tiered): TierFields {+ return m as TierFields+}++/** Die Stufe, mit der ein Modell sortiert wird. Unbekannt oder fehlend: 'standard'. */+export function tierOf(m: Tiered): ModelTier {+ const tier = fields(m).tier+ return typeof tier === 'string' && TIERS.includes(tier) ? tier : 'standard'+}++/** Die Herkunft eines Modells. Unbekannt oder fehlend: 'closed', also keine Marke. */+export function weightsOf(m: Tiered): ModelWeights {+ const weights = fields(m).weights+ return typeof weights === 'string' && WEIGHTS.includes(weights) ? weights : 'closed'+}++/** Stabil: Modelle gleicher Stufe behalten ihre Reihenfolge, damit eine+ * gewohnte Liste nicht durcheinanderfaellt. Die Eingabe bleibt unberuehrt. */+export function sortByTier<T extends Tiered>(list: readonly T[]): T[] {+ return list+ .map((m, i) => ({ m, i }))+ .sort((a, b) => RANK[tierOf(a.m)] - RANK[tierOf(b.m)] || a.i - b.i)+ .map(({ m }) => m)+}++/** Die Zwischenzeile, unter der ein Modell steht. Nur 'older' hat eine. */+export function tierGroup(m: Tiered): string | undefined {+ return tierOf(m) === 'older' ? OLDER_GROUP : undefined+}++export interface TierMark { label: string; color: string }++/** Die Marken eines Modells, in der Reihenfolge, in der sie stehen.+ * 'open' sagt "Open weights": genau diese Version hat offene Gewichte.+ * 'open-family' sagt "Open family": die Familie hat welche, diese Version nicht.+ * Beides ehrlich getrennt, damit "Open weights" nie mehr verspricht, als stimmt.+ * Ohne Felder gibt es keine Marke. */+export function tierMarks(m: Tiered): TierMark[] {+ const marks: TierMark[] = []+ if (tierOf(m) === 'best') marks.push({ label: 'Best', color: 'bg-lu-accent/15 text-lu-accent' })+ if (weightsOf(m) === 'open') marks.push({ label: 'Open weights', color: 'text-gray-500 dark:text-gray-600' })+ if (weightsOf(m) === 'open-family') marks.push({ label: 'Open family', color: 'text-gray-500 dark:text-gray-600' })+ return marks+}diff --git a/src/lib/render/preset-models.ts b/src/lib/render/preset-models.tsindex 7a57c6eb..52903d70 100644--- a/src/lib/render/preset-models.ts+++ b/src/lib/render/preset-models.ts@@ -9,13 +9,18 @@// member really runs: same inputs, same output kind, a price on both sides.// The contract test walks each one and refuses a member that cannot.-import { STUDIO_MODELS, studioSchema } from './studio-contract'-import { catalogHasStudio, cloudModelById, cloudModelsFor, i2vModels, runCredits } from '../../stores/cloudCatalogStore'+import { STUDIO_MODELS, studioSchema, type ModelTier, type ModelWeights } from './studio-contract'+import { cloudModelById, cloudModelsFor, i2vModels, runCredits, studioEntries, t2vModels } from '../../stores/cloudCatalogStore'+import {+ STUDIO_EDIT_MODELS, STUDIO_IMAGE_UPSCALERS, studioImageToVideo, studioReferenceVideo, studioTextToVideo,+} from './studio-roles'import type { RenderKind, RenderOp } from './cloud-jobs'export type StepRole =| 'image' | 'animate' | 'soundtrack' | 'speech' | 'music' | 'talking' | 'presenter'| 'duo' | 'extend' | 'motion' | 'restyle' | 'angles' | 'edit' | 'upscale'+ // 02.10.2026: Text zu Video, Referenz zu Video, Start und Ende, Bild-Upscale.+ | 'video' | 'reference' | 'startend' | 'imageup'export interface PresetModel {id: string@@ -23,6 +28,11 @@ export interface PresetModel {kind: RenderKindop: RenderOpadult: boolean+ /** Stufe und Herkunft aus dem Katalog des Servers. Ein aelterer Server liefert+ * sie nicht: dann bleiben beide leer und der Waehler stellt das Modell+ * neutral dar (model-tier.ts). */+ tier?: ModelTier+ weights?: ModelWeights}/** The op a NON-studio member of this role runs under. Studio members always@@ -32,6 +42,7 @@ const ROLE_OP: Record<StepRole, RenderOp> = {music: 'music', talking: 'lipsync', presenter: 'studio', duo: 'studio',extend: 'extend', motion: 'motion', restyle: 'studio', angles: 'studio',edit: 'edit', upscale: 'upscale',+ video: 'generate', reference: 'studio', startend: 'studio', imageup: 'upscale',}/** The staged inputs a NON-studio member consumes, as provider field -> job@@ -44,12 +55,7 @@ export const ROLE_INPUTS: Record<StepRole, Record<string, string>> = {motion: { image: 'source_path', video: 'video_path' },edit: { image: 'source_path' },upscale: { video: 'video_path' },-}--/** The studio inputs this model cannot start without. */-function studioRequiredInputs(id: string): string[] {- const required = studioSchema(id).required ?? []- return Object.keys(STUDIO_MODELS[id].inputs).filter((f) => required.includes(f)).sort()+ video: {}, reference: {}, startend: {}, imageup: {},}function studioIds(match: (id: string) => boolean): string[] {@@ -65,9 +71,18 @@ const ROLE_MEMBERS: Record<StepRole, () => string[]> = {],// Image to video: a still goes in, a clip comes out. Nothing else required.animate: () => [- ...studioIds((id) => STUDIO_MODELS[id].kind === 'video' && studioRequiredInputs(id).join() === 'image'),+ ...studioImageToVideo(),...i2vModels().map((m) => m.id),],+ // Text to video: words in, a clip out. Nothing to upload.+ video: () => [+ ...studioTextToVideo(),+ ...t2vModels().map((m) => m.id),+ ],+ // Reference to video: one or more pictures say who is in the clip.+ reference: () => studioReferenceVideo(),+ // A first picture and a last picture, the model draws what happens between.+ startend: () => ['flux-3-start-end'],// A clip goes in, the same clip with sound comes out.soundtrack: () => ['mmaudio-v2', 'hunyuan-video-foley'],// Text to speech. Clone adds a reference recording, design a description.@@ -78,7 +93,7 @@ const ROLE_MEMBERS: Record<StepRole, () => string[]> = {],// Words in, a finished track out. ACE-Step is ours and cheap, the three new// ones are what a released song sounds like.- music: () => ['ace-step', 'ace-step-1.5', 'sonilo-music', 'minimax-music', 'mureka-song', 'eleven-music'],+ music: () => ['ace-step', 'ace-step-1.5', 'sonilo-music', 'minimax-music', 'mureka-song', 'eleven-music', 'yue2'],// A portrait plus one voice track becomes a speaking clip. The re-sync// models (latentsync, lipsync-2) need an existing clip and are a different// job, so they are not interchangeable here.@@ -92,16 +107,20 @@ const ROLE_MEMBERS: Record<StepRole, () => string[]> = {duo: () => ['infinitetalk-multi', 'longcat-avatar-multi'],extend: () => ['preset-wan-2.2-spicy-extend', 'wan-2.2-spicy-extend', 'ltx-2-extend', 'pixverse-extend',- 'wan-3.0-extend', 'seedance-2.5-extend',+ 'wan-3.0-extend', 'seedance-2.5-extend', 'flux-3-extend',],// Movement from a driving clip onto a character image.motion: () => ['scail-2', 'wan-2.2-animate-2', 'wan-2.2-animate', 'steady-dancer', 'p-video-animate', 'dreamactor-v2'],- restyle: () => ['wan-ditto'],+ // A clip goes in, the same clip comes back changed. Wan DITTO picks a style+ // from a list, the three newer ones follow a sentence.+ restyle: () => ['wan-ditto', 'flux-3-video-edit', 'minimax-h3-video-edit', 'wan-3.0-video-edit'],angles: () => ['qwen-image-angles'],// Instruction edits, no mask. flux-dev is excluded: it demands one.- edit: () => ['minimax-h3-edit', 'qwen-image-3-edit', 'seedream-5-edit', 'qwen-image-edit'],+ edit: () => [...STUDIO_EDIT_MODELS, 'qwen-image-edit'],+ // A still goes in, the same still at more pixels comes out.+ imageup: () => [...STUDIO_IMAGE_UPSCALERS],// A finished clip goes in, the same clip at more pixels comes out.- upscale: () => ['video-upscaler', 'flashvsr', 'video-upscaler-pro', 'ultimate-video-upscaler', 'crystal-upscaler', 'flux-3-upscale'],+ upscale: () => ['video-upscaler', 'flashvsr', 'video-upscaler-pro', 'ultimate-video-upscaler', 'crystal-upscaler', 'flux-3-upscale', 'seedvr2-video'],}/** Classic ids that a studio entry already covers on the same endpoint. The@@ -113,11 +132,20 @@ const SUPERSEDED = new Map<string, string>(.map(([id, m]) => [m.sourceModel as string, id]),)+/** Fuehrt der lebende Katalog dieses Modell als Studio-Eintrag? */+function studioKnown(id: string): boolean {+ return studioEntries([id]).length > 0+}+function entry(id: string, role: StepRole): PresetModel | null {const studio = STUDIO_MODELS[id]const catalog = cloudModelById(studio?.sourceModel ?? id)const kind = studio?.kind ?? catalog?.kindif (!kind) return null+ // Stufe und Herkunft stammen aus dem Katalog des Servers, bei einem Zwilling+ // zuerst von seinem eigenen Eintrag, dann vom klassischen Bruder. Fehlen sie+ // (aelterer Server), bleibt das Modell neutral.+ const own = studio ? cloudModelById(id) : catalogreturn {id,// The name the customer already knows from the Create picker.@@ -125,6 +153,8 @@ function entry(id: string, role: StepRole): PresetModel | null {kind,op: studio ? 'studio' : ROLE_OP[role],adult: (studio?.adult ?? catalog?.adult) === true,+ tier: own?.tier ?? catalog?.tier,+ weights: own?.weights ?? catalog?.weights,}}@@ -150,17 +180,21 @@ function allPresetModels(role: StepRole): PresetModel[] {const seen = new Set<string>()for (const id of ids) {if (seen.has(id)) continue+ // Ein Studio-Mitglied erscheint NUR, wenn der lebende Katalog genau dieses+ // Modell als Studio-Eintrag fuehrt (`studioKnown`). Das Web fuehrt den+ // Katalog im selben Repo, der Desktop liest ihn vom Server: ein aelterer+ // Server (oder der Notvorrat vor dem ersten Abruf) kennt die neueren+ // Modelle nicht, und ein Start dort wuerde abgelehnt. Frueher stand hier+ // eine einzige Probe fuer den ganzen Katalog (catalogHasStudio), die auch+ // ein Modell durchliess, das dieser Server gar nicht hat.+ if (STUDIO_MODELS[id] && !studioKnown(id)) continue// A classic id the studio registry already serves is dropped, not listed- // twice under the same name. Review B1 (Runde 2): ONLY when the live- // catalog actually announces Studio (`catalogHasStudio()`), the same- // gate `create-studio.ts`'s `intentPickerModels()` applies to the twin- // itself. Without this, an older server dropped the classic id here- // (its studio twin is in STUDIO_MODELS unconditionally, catalog or not)- // while `intentPickerModels()` separately dropped the twin for being a- // Studio entry, leaving Extend/Motion with NEITHER: an empty picker- // instead of the classic member that used to run there.+ // twice under the same name, ONLY when the server really lists that studio+ // twin. Review B1 (Runde 2): sonst verdraengte die Zwillingsregel das+ // klassische Mitglied, waehrend der Zwilling selbst entfiel, und Extend/+ // Motion hatten auf einem aelteren Server KEINES von beiden.const twin = SUPERSEDED.get(id)- if (twin && ids.includes(twin) && catalogHasStudio()) continue+ if (twin && ids.includes(twin) && studioKnown(twin)) continueconst e = entry(id, role)if (!e) continueseen.add(id)@@ -234,6 +268,29 @@ const HINTS: Record<string, string> = {'ultimate-video-upscaler': 'A heavier rebuild for really rough footage. Reaches 4K.','crystal-upscaler': 'The only one that reaches 8K. Set 33 megapixels for 8K.','flux-3-upscale': 'Multiplies the size instead of aiming at a target. No fixed 4K.',++ // 02.10.2026: die Modelle aus offenen Familien. Jeder Satz sagt nur, was der+ // Anbieter selbst zum Endpunkt schreibt.+ 'qwen-image-3-pro': 'Reads full sentences. Prompt expansion is on: switch it off in the settings to keep your words exact.',+ 'qwen-image-3': 'Reads full sentences. Prompt expansion is on: switch it off in the settings to keep your words exact.',+ 'flux-3': 'Strong at layout and lettering. Pick 1K, 2K or 4K in the settings: bigger costs more.',+ 'ideogram-4.5': 'Strong at lettering in the picture. Quality sets the price: low is the cheapest.',+ 'hunyuan-image-3': 'Follows long, detailed instructions. The dearest image model here.',+ 'ltx-2.5-t2v': 'Makes a clip with sound. Longer clips and higher resolutions cost more.',+ 'ltx-2.5-i2v': 'Makes a clip with sound. Longer clips and higher resolutions cost more.',+ 'flux-3-t2v': 'Describe the shot and the movement. Sound is on by default.',+ 'flux-3-i2v': 'Describe the shot and the movement. Sound is on by default.',+ 'flux-3-start-end': 'Give a first and a last picture. The model draws what happens between.',+ 'flux-3-extend': 'Continues your clip. Priced by the new seconds, not by the length of your clip.',+ 'flux-3-video-edit': 'Say what to change. The clip keeps its movement and timing.',+ 'minimax-h3-video-edit': 'Say what to change. The clip keeps its movement and timing.',+ 'wan-3.0-video-edit': 'Say what to change. The clip keeps its movement and timing.',+ 'minimax-h3-ref': 'Your picture sets who is in the clip. Describe what they do.',+ 'wan-3.0-ref': 'Your picture sets who is in the clip. Describe what they do.',+ 'skyreels-v4-ref': 'Your picture sets who is in the clip. Describe what they do.',+ 'seedvr2-image': 'Sharpens and enlarges a picture. Pick the target size in the settings.',+ 'seedvr2-video': 'Sharpens and enlarges a clip. Pick the target size in the settings.',+ yue2: 'Write lyrics with [Verse] and [Chorus] marks. Describe genre, mood and voice under Style in the settings.',}export function modelHint(id: string): string | undefined {@@ -267,8 +324,9 @@ export function requiredRoleInputs(role: StepRole, id: string): string[] {/** Roles whose NON-studio members need words before they can start. */const CLASSIC_PROMPT: Record<StepRole, boolean> = {image: true, animate: true, speech: true, music: true, extend: true, edit: true, restyle: true,+ video: true, reference: true, startend: true,talking: false, presenter: false, motion: false, soundtrack: false, duo: false,- angles: false, upscale: false,+ angles: false, upscale: false, imageup: false,}export function rolePrompts(role: StepRole): boolean {diff --git a/src/lib/render/provider-schemas.json b/src/lib/render/provider-schemas.jsonindex 5bb0af93..88330e37 100644--- a/src/lib/render/provider-schemas.json+++ b/src/lib/render/provider-schemas.json@@ -8783,5 +8783,2620 @@"enable_sync_mode","enable_base64_output"]+ },+ "alibaba/qwen-image-3.0-pro/text-to-image": {+ "additionalProperties": false,+ "properties": {+ "aspect_ratio": {+ "default": "1:1",+ "description": "Aspect ratio of the generated image.",+ "enum": [+ "1:1",+ "1:2",+ "2:1",+ "1:3",+ "3:1",+ "2:3",+ "3:2",+ "3:4",+ "4:3",+ "4:5",+ "5:4",+ "9:16",+ "16:9",+ "9:21",+ "21:9"+ ],+ "type": "string"+ },+ "enable_prompt_expansion": {+ "default": true,+ "description": "Whether to enable intelligent prompt expansion",+ "type": "boolean"+ },+ "prompt": {+ "description": "Text prompt describing the desired image, supports Chinese and English (max 800 characters)",+ "minLength": 1,+ "type": "string"+ },+ "resolution": {+ "default": "1k",+ "description": "Output resolution tier used for billing.",+ "enum": [+ "1k",+ "2k"+ ],+ "type": "string"+ },+ "seed": {+ "description": "Random seed for reproducibility (-1 for random, 0-2147483647 for specific seed)",+ "type": "integer"+ }+ },+ "required": [+ "prompt"+ ],+ "type": "object",+ "x-order-properties": [+ "prompt",+ "aspect_ratio",+ "resolution",+ "enable_prompt_expansion",+ "seed"+ ]+ },+ "alibaba/qwen-image-3.0/text-to-image": {+ "additionalProperties": false,+ "properties": {+ "aspect_ratio": {+ "default": "1:1",+ "description": "Aspect ratio of the generated image.",+ "enum": [+ "1:1",+ "1:2",+ "2:1",+ "1:3",+ "3:1",+ "2:3",+ "3:2",+ "3:4",+ "4:3",+ "4:5",+ "5:4",+ "9:16",+ "16:9",+ "9:21",+ "21:9"+ ],+ "type": "string"+ },+ "enable_prompt_expansion": {+ "default": true,+ "description": "Whether to enable intelligent prompt expansion",+ "type": "boolean"+ },+ "prompt": {+ "description": "Text prompt describing the desired image, supports Chinese and English (max 800 characters)",+ "minLength": 1,+ "type": "string"+ },+ "resolution": {+ "default": "1k",+ "description": "Output resolution tier used for billing.",+ "enum": [+ "1k",+ "2k"+ ],+ "type": "string"+ },+ "seed": {+ "description": "Random seed for reproducibility (-1 for random, 0-2147483647 for specific seed)",+ "type": "integer"+ }+ },+ "required": [+ "prompt"+ ],+ "type": "object",+ "x-order-properties": [+ "prompt",+ "aspect_ratio",+ "resolution",+ "enable_prompt_expansion",+ "seed"+ ]+ },+ "wavespeed-ai/qwen-image-2.1/text-to-image": {+ "additionalProperties": false,+ "properties": {+ "aspect_ratio": {+ "default": "1:1",+ "description": "The aspect ratio of the generated image.",+ "enum": [+ "1:1",+ "1:2",+ "2:1",+ "1:3",+ "3:1",+ "2:3",+ "3:2",+ "3:4",+ "4:3",+ "4:5",+ "5:4",+ "9:16",+ "16:9",+ "9:21",+ "21:9"+ ],+ "type": "string"+ },+ "enable_base64_output": {+ "default": false,+ "description": "If set to `true`, the prediction's `output` strings are returned as **naked base64** (no `data:<mime>;base64,` prefix). When `false` (default), outputs are returned as URLs pointing to our CDN.",+ "disabled": true,+ "type": "boolean"+ },+ "enable_sync_mode": {+ "default": false,+ "description": "If set to `true`, the request attempts to wait for the generated result and return outputs in the same response. If the result is not ready within the sync wait window, the API can return a timeout body while the task continues processing. This option is only available via the API and is supported only by some models.",+ "disabled": true,+ "type": "boolean"+ },+ "output_format": {+ "default": "jpeg",+ "description": "The format of the output image.",+ "enum": [+ "jpeg",+ "png",+ "webp"+ ],+ "type": "string"+ },+ "prompt": {+ "description": "The positive prompt for the generation.",+ "type": "string"+ },+ "resolution": {+ "default": "1k",+ "description": "Total output resolution tier: 1k (~1 megapixel), 1.5k (~2.25 megapixels), or 2k (~4 megapixels).",+ "enum": [+ "1k",+ "1.5k",+ "2k"+ ],+ "type": "string"+ },+ "seed": {+ "description": "The random seed to use for the generation. -1 means a random seed will be used.",+ "type": "integer"+ }+ },+ "required": [+ "prompt"+ ],+ "type": "object",+ "x-order-properties": [+ "prompt",+ "aspect_ratio",+ "resolution",+ "output_format",+ "seed",+ "enable_sync_mode",+ "enable_base64_output"+ ]+ },+ "black-forest-labs/flux-3/text-to-image": {+ "additionalProperties": false,+ "properties": {+ "aspect_ratio": {+ "default": "1:1",+ "description": "The aspect ratio of the generated image.",+ "enum": [+ "21:9",+ "2:1",+ "16:9",+ "3:2",+ "7:5",+ "4:3",+ "5:4",+ "1:1",+ "4:5",+ "3:4",+ "5:7",+ "2:3",+ "9:16",+ "1:2"+ ],+ "title": "Aspect Ratio",+ "type": "string",+ "x-placeholder": "Select aspect ratio",+ "x-ui-component": "select"+ },+ "enable_prompt_expansion": {+ "default": false,+ "description": "Expand the prompt while preserving its intent and the roles of reference images.",+ "title": "Enable Prompt Expansion",+ "type": "boolean"+ },+ "output_format": {+ "default": "jpeg",+ "description": "The format of the generated image.",+ "enum": [+ "jpeg",+ "png"+ ],+ "title": "Output Format",+ "type": "string",+ "x-ui-component": "select"+ },+ "prompt": {+ "description": "Describe the subject, composition, lighting, style, and any text to include.",+ "minLength": 1,+ "title": "Prompt",+ "type": "string",+ "x-rows": 5,+ "x-ui-component": "textarea"+ },+ "resolution": {+ "default": "1k",+ "description": "Output resolution tier. Higher tiers cost more; 4K can take several minutes.",+ "enum": [+ "1k",+ "2k",+ "4k"+ ],+ "title": "Resolution",+ "type": "string",+ "x-ui-component": "select"+ }+ },+ "required": [+ "prompt"+ ],+ "type": "object",+ "x-order-properties": [+ "prompt",+ "aspect_ratio",+ "resolution",+ "output_format",+ "enable_prompt_expansion"+ ]+ },+ "wavespeed-ai/flux-2-klein-9b/text-to-image": {+ "additionalProperties": false,+ "properties": {+ "enable_base64_output": {+ "default": false,+ "description": "If set to `true`, the prediction's `output` strings are returned as **naked base64** (no `data:<mime>;base64,` prefix). When `false` (default), outputs are returned as URLs pointing to our CDN.",+ "disabled": true,+ "type": "boolean"+ },+ "enable_sync_mode": {+ "default": false,+ "description": "If set to `true`, the request attempts to wait for the generated result and return outputs in the same response. If the result is not ready within the sync wait window, the API can return a timeout body while the task continues processing. This option is only available via the API and is supported only by some models.",+ "disabled": true,+ "type": "boolean"+ },+ "prompt": {+ "type": "string"+ },+ "seed": {+ "type": "integer"+ },+ "size": {+ "default": "1024*1024",+ "type": "string"+ }+ },+ "required": [+ "prompt"+ ],+ "type": "object",+ "x-order-properties": [+ "prompt",+ "size",+ "seed",+ "enable_sync_mode",+ "enable_base64_output"+ ]+ },+ "wavespeed-ai/krea-v2-large/text-to-image": {+ "additionalProperties": false,+ "properties": {+ "aspect_ratio": {+ "default": "1:1",+ "description": "Aspect ratio of the generated image.",+ "enum": [+ "1:1",+ "4:3",+ "3:2",+ "16:9",+ "2.35:1",+ "4:5",+ "2:3",+ "9:16"+ ],+ "title": "Aspect Ratio",+ "type": "string",+ "x-ui-component": "select"+ },+ "creativity": {+ "default": "medium",+ "description": "Controls how loosely the model interprets the prompt.",+ "enum": [+ "raw",+ "low",+ "medium",+ "high"+ ],+ "title": "Creativity",+ "type": "string",+ "x-ui-component": "select"+ },+ "prompt": {+ "description": "Text description of the image to generate.",+ "title": "Prompt",+ "type": "string",+ "x-rows": 4,+ "x-ui-component": "textarea"+ },+ "reference": {+ "description": "Optional reference images that guide the style of the generated image.",+ "items": {+ "properties": {+ "image": {+ "description": "Reference image URL.",+ "format": "uri",+ "title": "Image",+ "type": "string",+ "x-ui-component": "uploader",+ "x-ui-component-props": {+ "accept": "image/*"+ }+ },+ "strength": {+ "default": 1,+ "description": "How strongly the reference image influences the generated image.",+ "maximum": 2,+ "minimum": -2,+ "title": "Strength",+ "type": "number"+ }+ },+ "required": [+ "image"+ ],+ "type": "object",+ "x-order-properties": [+ "image",+ "strength"+ ]+ },+ "maxItems": 10,+ "title": "Reference",+ "type": "array",+ "x-accept": "image/*",+ "x-ui-component": "array",+ "disabled": true+ }+ },+ "required": [+ "prompt"+ ],+ "type": "object",+ "x-order-properties": [+ "prompt",+ "aspect_ratio",+ "creativity",+ "reference"+ ]+ },+ "nvidia/cosmos-3-super/text-to-image": {+ "additionalProperties": false,+ "properties": {+ "guidance_scale": {+ "default": 4,+ "description": "Classifier-free guidance scale.",+ "maximum": 20,+ "minimum": 0,+ "title": "Guidance Scale",+ "type": "number",+ "x-ui-component": "slider"+ },+ "negative_prompt": {+ "description": "Content to steer the generation away from.",+ "title": "Negative Prompt",+ "type": "string",+ "x-rows": 3,+ "x-ui-component": "textarea"+ },+ "num_inference_steps": {+ "default": 28,+ "description": "Number of denoising steps.",+ "maximum": 50,+ "minimum": 1,+ "title": "Inference Steps",+ "type": "integer",+ "x-ui-component": "slider"+ },+ "output_format": {+ "default": "jpeg",+ "description": "The format of the generated image.",+ "enum": [+ "jpeg",+ "png"+ ],+ "title": "Output Format",+ "type": "string",+ "x-ui-component": "select"+ },+ "prompt": {+ "description": "Text prompt describing the image to generate.",+ "title": "Prompt",+ "type": "string",+ "x-rows": 4,+ "x-ui-component": "textarea"+ },+ "size": {+ "default": "1:1",+ "description": "Output image size preset.",+ "enum": [+ "1:1",+ "3:4",+ "9:16",+ "4:3",+ "16:9"+ ],+ "title": "Size",+ "type": "string",+ "x-ui-component": "select"+ }+ },+ "required": [+ "prompt"+ ],+ "type": "object",+ "x-order-properties": [+ "prompt",+ "negative_prompt",+ "size",+ "num_inference_steps",+ "guidance_scale",+ "output_format"+ ]+ },+ "ideogram-ai/ideogram-v4.5": {+ "additionalProperties": false,+ "properties": {+ "aspect_ratio": {+ "default": "1:1",+ "description": "Output image aspect ratio.",+ "enum": [+ "1:1",+ "4:3",+ "3:4",+ "3:2",+ "2:3",+ "16:9",+ "9:16"+ ],+ "title": "Aspect Ratio",+ "type": "string",+ "x-ui-component": "select"+ },+ "enable_prompt_expansion": {+ "default": true,+ "description": "Expand the prompt before image generation.",+ "title": "Enable Prompt Expansion",+ "type": "boolean"+ },+ "prompt": {+ "description": "Describe the subject, composition, and text to generate.",+ "maxLength": 10000,+ "minLength": 1,+ "title": "Prompt",+ "type": "string",+ "x-rows": 5,+ "x-ui-component": "textarea"+ },+ "quality": {+ "default": "medium",+ "description": "Generation quality and price tier.",+ "enum": [+ "low",+ "medium",+ "high"+ ],+ "title": "Quality",+ "type": "string",+ "x-ui-component": "select"+ },+ "resolution": {+ "default": "1k",+ "description": "Output size tier. Does not change the price.",+ "enum": [+ "1k",+ "2k"+ ],+ "title": "Resolution",+ "type": "string",+ "x-ui-component": "select"+ }+ },+ "required": [+ "prompt"+ ],+ "type": "object",+ "x-order-properties": [+ "prompt",+ "resolution",+ "aspect_ratio",+ "quality",+ "enable_prompt_expansion"+ ]+ },+ "wavespeed-ai/hidream-o1-image/text-to-image": {+ "additionalProperties": false,+ "properties": {+ "enable_base64_output": {+ "default": false,+ "description": "If set to `true`, the prediction's `output` strings are returned as **naked base64** (no `data:<mime>;base64,` prefix). When `false` (default), outputs are returned as URLs pointing to our CDN.",+ "disabled": true,+ "type": "boolean"+ },+ "enable_sync_mode": {+ "default": false,+ "description": "If set to `true`, the request attempts to wait for the generated result and return outputs in the same response. If the result is not ready within the sync wait window, the API can return a timeout body while the task continues processing. This option is only available via the API and is supported only by some models.",+ "disabled": true,+ "type": "boolean"+ },+ "output_format": {+ "default": "jpeg",+ "description": "Output image format.",+ "enum": [+ "png",+ "jpeg",+ "webp"+ ],+ "type": "string"+ },+ "prompt": {+ "description": "Text prompt for image generation.",+ "type": "string",+ "x-ui-component": "textarea"+ },+ "seed": {+ "type": "integer",+ "x-hidden": true+ },+ "size": {+ "default": "2048*2048",+ "description": "Specify the width and height pixel values of the generated image.Total pixel value range: [2560*1440, 4096*4096]",+ "maximum": 4096,+ "minimum": 256,+ "type": "string"+ }+ },+ "required": [+ "prompt"+ ],+ "type": "object",+ "x-order-properties": [+ "prompt",+ "size",+ "output_format",+ "seed",+ "enable_sync_mode",+ "enable_base64_output"+ ]+ },+ "wavespeed-ai/hunyuan-image-3-instruct/text-to-image": {+ "additionalProperties": false,+ "properties": {+ "prompt": {+ "description": "The text prompt describing the desired image.",+ "type": "string"+ },+ "seed": {+ "description": "The random seed to use for the generation. -1 means a random seed will be used.",+ "type": "integer"+ },+ "size": {+ "default": "1024*1024",+ "description": "The size of the generated media in pixels (width*height).",+ "type": "string"+ }+ },+ "required": [+ "prompt"+ ],+ "type": "object",+ "x-order-properties": [+ "prompt",+ "size",+ "seed"+ ]+ },+ "wavespeed-ai/ernie-image/text-to-image-turbo": {+ "additionalProperties": false,+ "properties": {+ "prompt": {+ "description": "Text prompt describing the image. Supports English, Chinese, and Japanese.",+ "type": "string"+ },+ "size": {+ "default": "1024*1024",+ "description": "The size of the generated image in pixels (width*height).",+ "type": "string"+ }+ },+ "required": [+ "prompt"+ ],+ "type": "object",+ "x-order-properties": [+ "prompt",+ "size"+ ]+ },+ "alibaba/qwen-image-3.0-pro/edit": {+ "additionalProperties": false,+ "properties": {+ "aspect_ratio": {+ "description": "Aspect ratio of the generated image. Leave empty to use the first input image ratio.",+ "enum": [+ "1:1",+ "1:2",+ "2:1",+ "1:3",+ "3:1",+ "2:3",+ "3:2",+ "3:4",+ "4:3",+ "4:5",+ "5:4",+ "9:16",+ "16:9",+ "9:21",+ "21:9"+ ],+ "type": "string"+ },+ "enable_prompt_expansion": {+ "default": true,+ "description": "Whether to enable intelligent prompt expansion",+ "type": "boolean"+ },+ "images": {+ "description": "Reference images for editing (1-3 images, 384-2048px each dimension)",+ "items": {+ "type": "string"+ },+ "maxItems": 3,+ "type": "array"+ },+ "prompt": {+ "description": "Text prompt describing the desired edit, supports Chinese and English (max 800 characters)",+ "minLength": 1,+ "type": "string"+ },+ "resolution": {+ "default": "1k",+ "description": "Output resolution tier used for billing.",+ "enum": [+ "1k",+ "2k"+ ],+ "type": "string"+ },+ "seed": {+ "description": "Random seed for reproducibility (-1 for random, 0-2147483647 for specific seed)",+ "type": "integer"+ }+ },+ "required": [+ "prompt",+ "images"+ ],+ "type": "object",+ "x-order-properties": [+ "prompt",+ "images",+ "aspect_ratio",+ "resolution",+ "enable_prompt_expansion",+ "seed"+ ]+ },+ "wavespeed-ai/qwen-image-2.1/edit": {+ "additionalProperties": false,+ "properties": {+ "aspect_ratio": {+ "description": "The output aspect ratio. Defaults to the first reference image.",+ "enum": [+ "1:1",+ "1:2",+ "2:1",+ "1:3",+ "3:1",+ "2:3",+ "3:2",+ "3:4",+ "4:3",+ "4:5",+ "5:4",+ "9:16",+ "16:9",+ "9:21",+ "21:9"+ ],+ "type": "string"+ },+ "enable_base64_output": {+ "default": false,+ "description": "If set to `true`, the prediction's `output` strings are returned as **naked base64** (no `data:<mime>;base64,` prefix). When `false` (default), outputs are returned as URLs pointing to our CDN.",+ "disabled": true,+ "type": "boolean"+ },+ "enable_sync_mode": {+ "default": false,+ "description": "If set to `true`, the request attempts to wait for the generated result and return outputs in the same response. If the result is not ready within the sync wait window, the API can return a timeout body while the task continues processing. This option is only available via the API and is supported only by some models.",+ "disabled": true,+ "type": "boolean"+ },+ "images": {+ "description": "Reference images to edit from (1 to 10 URLs). The first image also sets the output aspect ratio unless aspect_ratio is given.",+ "items": {+ "type": "string"+ },+ "maxItems": 10,+ "minItems": 1,+ "type": "array"+ },+ "output_format": {+ "default": "jpeg",+ "description": "The format of the output image.",+ "enum": [+ "jpeg",+ "png",+ "webp"+ ],+ "type": "string"+ },+ "prompt": {+ "description": "The edit instruction. Refer to references as <Picture 1> through <Picture 10>.",+ "type": "string"+ },+ "resolution": {+ "default": "1k",+ "description": "Total output resolution tier: 1K (~1 megapixel), 1.5K (~2.25 megapixels), or 2K (~4 megapixels).",+ "enum": [+ "1k",+ "1.5k",+ "2k"+ ],+ "type": "string"+ },+ "seed": {+ "description": "The random seed to use for the generation. -1 means a random seed will be used.",+ "type": "integer"+ }+ },+ "required": [+ "prompt",+ "images"+ ],+ "type": "object",+ "x-order-properties": [+ "prompt",+ "images",+ "aspect_ratio",+ "resolution",+ "output_format",+ "seed",+ "enable_sync_mode",+ "enable_base64_output"+ ]+ },+ "black-forest-labs/flux-3/edit": {+ "additionalProperties": false,+ "properties": {+ "aspect_ratio": {+ "description": "Optional output aspect ratio. Leave empty to match the first input image.",+ "enum": [+ "21:9",+ "2:1",+ "16:9",+ "3:2",+ "7:5",+ "4:3",+ "5:4",+ "1:1",+ "4:5",+ "3:4",+ "5:7",+ "2:3",+ "9:16",+ "1:2"+ ],+ "title": "Aspect Ratio",+ "type": "string",+ "x-placeholder": "Select aspect ratio",+ "x-ui-component": "select"+ },+ "enable_prompt_expansion": {+ "default": false,+ "description": "Expand the prompt while preserving its intent and the roles of reference images.",+ "title": "Enable Prompt Expansion",+ "type": "boolean"+ },+ "images": {+ "description": "Upload 1-10 input images in reference order. Each must be at least 256 pixels per dimension and at most 4 megapixels. Omit aspect_ratio to follow the first image.",+ "items": {+ "minLength": 1,+ "type": "string"+ },+ "maxItems": 10,+ "minItems": 1,+ "title": "Images",+ "type": "array"+ },+ "output_format": {+ "default": "jpeg",+ "description": "The format of the generated image.",+ "enum": [+ "jpeg",+ "png"+ ],+ "title": "Output Format",+ "type": "string",+ "x-ui-component": "select"+ },+ "prompt": {+ "description": "Describe the changes. Refer to input images by their order, such as image 1 or image 2.",+ "minLength": 1,+ "title": "Prompt",+ "type": "string",+ "x-rows": 5,+ "x-ui-component": "textarea"+ },+ "resolution": {+ "default": "1k",+ "description": "Output resolution tier. Higher tiers cost more; 4K can take several minutes.",+ "enum": [+ "1k",+ "2k",+ "4k"+ ],+ "title": "Resolution",+ "type": "string",+ "x-ui-component": "select"+ }+ },+ "required": [+ "prompt",+ "images"+ ],+ "type": "object",+ "x-order-properties": [+ "prompt",+ "images",+ "aspect_ratio",+ "resolution",+ "output_format",+ "enable_prompt_expansion"+ ]+ },+ "ideogram-ai/ideogram-v4.5/edit": {+ "additionalProperties": false,+ "allOf": [+ {+ "if": {+ "properties": {+ "edit_precision": {+ "const": "high"+ }+ },+ "required": [+ "edit_precision"+ ]+ },+ "then": {+ "not": {+ "properties": {+ "aspect_ratio": {+ "enum": [+ "1:1",+ "4:3",+ "3:4",+ "16:9",+ "9:16"+ ]+ }+ },+ "required": [+ "aspect_ratio"+ ]+ }+ }+ },+ {+ "if": {+ "properties": {+ "mask_url": {+ "minLength": 1,+ "type": "string"+ }+ },+ "required": [+ "mask_url"+ ]+ },+ "then": {+ "not": {+ "properties": {+ "aspect_ratio": {+ "enum": [+ "1:1",+ "4:3",+ "3:4",+ "16:9",+ "9:16"+ ]+ }+ },+ "required": [+ "aspect_ratio"+ ]+ },+ "properties": {+ "reference_images": {+ "maxItems": 3+ }+ }+ }+ }+ ],+ "properties": {+ "aspect_ratio": {+ "description": "Optional output aspect ratio. Leave empty to follow the source image geometry, with downscaling if needed. Select a ratio only for regular edits without a mask.",+ "enum": [+ "1:1",+ "4:3",+ "3:4",+ "16:9",+ "9:16"+ ],+ "title": "Aspect Ratio",+ "type": "string",+ "x-placeholder": "Select aspect ratio",+ "x-ui-component": "select"+ },+ "edit_precision": {+ "default": "regular",+ "description": "Regular applies prompt-based edits. High restores unchanged pixels. Leave aspect_ratio empty when using high precision.",+ "enum": [+ "regular",+ "high"+ ],+ "title": "Edit Precision",+ "type": "string",+ "x-ui-component": "select"+ },+ "image": {+ "description": "Source image to edit. Supply a publicly accessible image URL.",+ "format": "uri",+ "minLength": 1,+ "title": "Image",+ "type": "string"+ },+ "mask_url": {+ "description": "Upload a mask image or provide its URL. Use the same dimensions as the source. Black pixels mark the edit area and white pixels preserve the image. Include both black and white regions.",+ "format": "uri",+ "minLength": 1,+ "title": "Mask URL",+ "type": "string",+ "x-accept": "image/*",+ "x-ui-component": "uploader",+ "disabled": true+ },+ "prompt": {+ "description": "Describe the changes to make to the source image.",+ "maxLength": 10000,+ "minLength": 1,+ "title": "Prompt",+ "type": "string",+ "x-rows": 5,+ "x-ui-component": "textarea"+ },+ "quality": {+ "default": "medium",+ "description": "Editing quality and price tier.",+ "enum": [+ "very_low",+ "low",+ "medium",+ "high"+ ],+ "title": "Quality",+ "type": "string",+ "x-ui-component": "select"+ },+ "reference_images": {+ "description": "Optional guidance images. Up to four without a mask, or three when mask_url is supplied.",+ "items": {+ "format": "uri",+ "minLength": 1,+ "type": "string"+ },+ "maxItems": 4,+ "title": "Reference Images",+ "type": "array",+ "disabled": true+ }+ },+ "required": [+ "image",+ "prompt"+ ],+ "type": "object",+ "x-order-properties": [+ "image",+ "prompt",+ "reference_images",+ "mask_url",+ "aspect_ratio",+ "edit_precision",+ "quality"+ ]+ },+ "wavespeed-ai/hidream-o1-image/edit": {+ "additionalProperties": false,+ "properties": {+ "enable_base64_output": {+ "default": false,+ "description": "If set to `true`, the prediction's `output` strings are returned as **naked base64** (no `data:<mime>;base64,` prefix). When `false` (default), outputs are returned as URLs pointing to our CDN.",+ "disabled": true,+ "type": "boolean"+ },+ "enable_sync_mode": {+ "default": false,+ "description": "If set to `true`, the request attempts to wait for the generated result and return outputs in the same response. If the result is not ready within the sync wait window, the API can return a timeout body while the task continues processing. This option is only available via the API and is supported only by some models.",+ "disabled": true,+ "type": "boolean"+ },+ "images": {+ "description": "Reference images for image editing or subject-driven personalization.",+ "items": {+ "type": "string"+ },+ "maxItems": 3,+ "type": "array"+ },+ "output_format": {+ "default": "jpeg",+ "description": "Output image format.",+ "enum": [+ "png",+ "jpeg",+ "webp"+ ],+ "type": "string"+ },+ "prompt": {+ "description": "Text prompt for image generation.",+ "type": "string",+ "x-ui-component": "textarea"+ },+ "seed": {+ "type": "integer",+ "x-hidden": true+ },+ "size": {+ "default": "2048*2048",+ "description": "Specify the width and height pixel values of the generated image.Total pixel value range: [2560*1440, 4096*4096]",+ "maximum": 4096,+ "minimum": 256,+ "type": "string"+ }+ },+ "required": [+ "prompt",+ "images"+ ],+ "type": "object",+ "x-order-properties": [+ "prompt",+ "images",+ "size",+ "output_format",+ "seed",+ "enable_sync_mode",+ "enable_base64_output"+ ]+ },+ "wavespeed-ai/hunyuan-image-3-instruct/edit": {+ "additionalProperties": false,+ "properties": {+ "images": {+ "description": "URLs of the input images to edit (up to 2 images).",+ "items": {+ "type": "string"+ },+ "maxItems": 2,+ "type": "array"+ },+ "prompt": {+ "description": "The text prompt describing the desired edit to the image.",+ "type": "string"+ },+ "seed": {+ "description": "The random seed to use for the generation. -1 means a random seed will be used.",+ "type": "integer"+ },+ "size": {+ "description": "The size of the generated media in pixels (width*height).",+ "type": "string",+ "x-hidden": true+ }+ },+ "required": [+ "prompt",+ "images"+ ],+ "type": "object",+ "x-order-properties": [+ "prompt",+ "images",+ "size",+ "seed"+ ]+ },+ "wavespeed-ai/seedvr2/image": {+ "additionalProperties": false,+ "properties": {+ "enable_base64_output": {+ "default": false,+ "description": "If set to `true`, the prediction's `output` strings are returned as **naked base64** (no `data:<mime>;base64,` prefix). When `false` (default), outputs are returned as URLs pointing to our CDN.",+ "disabled": true,+ "type": "boolean"+ },+ "enable_sync_mode": {+ "default": false,+ "description": "If set to `true`, the request attempts to wait for the generated result and return outputs in the same response. If the result is not ready within the sync wait window, the API can return a timeout body while the task continues processing. This option is only available via the API and is supported only by some models.",+ "disabled": true,+ "type": "boolean"+ },+ "image": {+ "description": "The URL of the image to generate an image from.",+ "type": "string"+ },+ "output_format": {+ "default": "jpeg",+ "description": "The format of the output image.",+ "enum": [+ "jpeg",+ "png",+ "webp"+ ],+ "type": "string"+ },+ "target_resolution": {+ "default": "4k",+ "description": "The target resolution of the generated media.",+ "enum": [+ "2k",+ "4k",+ "8k"+ ],+ "type": "string"+ }+ },+ "required": [+ "image"+ ],+ "type": "object",+ "x-order-properties": [+ "image",+ "target_resolution",+ "output_format",+ "enable_base64_output",+ "enable_sync_mode"+ ]+ },+ "wavespeed-ai/ltx-2.5/text-to-video": {+ "additionalProperties": false,+ "properties": {+ "aspect_ratio": {+ "default": "16:9",+ "description": "Aspect ratio of the video.",+ "enum": [+ "16:9",+ "9:16"+ ],+ "type": "string",+ "x-ui-component": "select"+ },+ "duration": {+ "default": 5,+ "description": "The duration of the generated media in seconds.",+ "maximum": 20,+ "minimum": 5,+ "type": "integer"+ },+ "prompt": {+ "description": "The positive prompt for the generation.",+ "type": "string"+ },+ "resolution": {+ "default": "720p",+ "description": "Video resolution.",+ "enum": [+ "720p",+ "1080p",+ "2k",+ "4k"+ ],+ "type": "string",+ "x-ui-component": "select"+ },+ "seed": {+ "description": "The random seed to use for the generation. -1 means a random seed will be used.",+ "type": "integer"+ }+ },+ "required": [+ "prompt"+ ],+ "type": "object",+ "x-order-properties": [+ "prompt",+ "resolution",+ "aspect_ratio",+ "duration",+ "seed"+ ]+ },+ "wavespeed-ai/ltx-2.5/image-to-video": {+ "additionalProperties": false,+ "properties": {+ "duration": {+ "default": 5,+ "description": "The duration of the generated media in seconds.",+ "maximum": 20,+ "minimum": 5,+ "type": "integer"+ },+ "image": {+ "description": "The image for the generation.",+ "type": "string"+ },+ "last_image": {+ "description": "Optional last-frame image for the generation.",+ "type": "string"+ },+ "prompt": {+ "description": "The positive prompt for the generation.",+ "type": "string"+ },+ "resolution": {+ "default": "720p",+ "description": "Video resolution.",+ "enum": [+ "720p",+ "1080p",+ "2k",+ "4k"+ ],+ "type": "string",+ "x-ui-component": "select"+ },+ "seed": {+ "description": "The random seed to use for the generation. -1 means a random seed will be used.",+ "type": "integer"+ }+ },+ "required": [+ "image",+ "prompt"+ ],+ "type": "object",+ "x-order-properties": [+ "prompt",+ "image",+ "last_image",+ "resolution",+ "duration",+ "seed"+ ]+ },+ "black-forest-labs/flux-3/text-to-video": {+ "properties": {+ "aspect_ratio": {+ "default": "9:16",+ "description": "The aspect ratio of the generated media.",+ "enum": [+ "21:9",+ "2:1",+ "16:9",+ "4:3",+ "1:1",+ "3:4",+ "9:16"+ ],+ "type": "string",+ "x-placeholder": "Select aspect ratio"+ },+ "duration": {+ "default": 5,+ "description": "Video length in seconds (5-20).",+ "maximum": 20,+ "minimum": 5,+ "type": "integer",+ "x-ui-component": "slider"+ },+ "generate_audio": {+ "default": true,+ "description": "Whether to generate audio for the video.",+ "type": "boolean"+ },+ "prompt": {+ "description": "The text prompt describing the video you want to generate.",+ "type": "string"+ },+ "resolution": {+ "default": "720p",+ "description": "Resolution of the generated video.",+ "enum": [+ "720p",+ "1080p"+ ],+ "type": "string"+ }+ },+ "required": [+ "prompt"+ ],+ "type": "object",+ "x-order-properties": [+ "prompt",+ "aspect_ratio",+ "resolution",+ "duration",+ "generate_audio"+ ]+ },+ "black-forest-labs/flux-3/image-to-video": {+ "properties": {+ "aspect_ratio": {+ "description": "The aspect ratio of the generated media.",+ "enum": [+ "21:9",+ "2:1",+ "16:9",+ "4:3",+ "1:1",+ "3:4",+ "9:16"+ ],+ "type": "string",+ "x-placeholder": "Select aspect ratio"+ },+ "duration": {+ "default": 5,+ "description": "Video length in seconds (5-20).",+ "maximum": 20,+ "minimum": 5,+ "type": "integer",+ "x-ui-component": "slider"+ },+ "generate_audio": {+ "default": true,+ "description": "Whether to generate audio for the video.",+ "type": "boolean"+ },+ "image": {+ "description": "URL of the image the video starts from (PNG, JPEG, or WebP)..",+ "type": "string"+ },+ "prompt": {+ "description": "The text prompt describing the video you want to generate.",+ "type": "string"+ },+ "resolution": {+ "default": "720p",+ "description": "Resolution of the generated video.",+ "enum": [+ "720p",+ "1080p"+ ],+ "type": "string"+ }+ },+ "required": [+ "prompt",+ "image"+ ],+ "type": "object",+ "x-order-properties": [+ "prompt",+ "image",+ "aspect_ratio",+ "resolution",+ "duration",+ "generate_audio"+ ]+ },+ "black-forest-labs/flux-3/start-end-to-video": {+ "properties": {+ "aspect_ratio": {+ "description": "The aspect ratio of the generated media.",+ "enum": [+ "21:9",+ "2:1",+ "16:9",+ "4:3",+ "1:1",+ "3:4",+ "9:16"+ ],+ "type": "string",+ "x-placeholder": "Select aspect ratio"+ },+ "duration": {+ "default": 5,+ "description": "Video length in seconds (5-20).",+ "maximum": 20,+ "minimum": 5,+ "type": "integer",+ "x-ui-component": "slider"+ },+ "end_image": {+ "description": "Optional image used as the edited video's first frame.",+ "format": "uri",+ "title": "Start Image",+ "type": "string"+ },+ "generate_audio": {+ "default": true,+ "description": "Whether to generate audio for the video.",+ "type": "boolean"+ },+ "prompt": {+ "description": "The text prompt describing the video you want to generate.",+ "type": "string"+ },+ "resolution": {+ "default": "720p",+ "description": "Resolution of the generated video.",+ "enum": [+ "720p",+ "1080p"+ ],+ "type": "string"+ },+ "start_image": {+ "description": "Optional image used as the edited video's first frame.",+ "format": "uri",+ "title": "Start Image",+ "type": "string"+ }+ },+ "required": [+ "prompt",+ "start_image",+ "end_image"+ ],+ "type": "object",+ "x-order-properties": [+ "prompt",+ "start_image",+ "end_image",+ "aspect_ratio",+ "resolution",+ "duration",+ "generate_audio"+ ]+ },+ "black-forest-labs/flux-3/video-extend": {+ "properties": {+ "aspect_ratio": {+ "description": "The aspect ratio of the generated media.",+ "enum": [+ "21:9",+ "2:1",+ "16:9",+ "4:3",+ "1:1",+ "3:4",+ "9:16"+ ],+ "type": "string",+ "x-placeholder": "Select aspect ratio"+ },+ "duration": {+ "default": 5,+ "description": "Video length in seconds (5-20).",+ "maximum": 20,+ "minimum": 5,+ "type": "integer",+ "x-ui-component": "slider"+ },+ "generate_audio": {+ "default": true,+ "description": "Whether to generate audio for the video.",+ "type": "boolean"+ },+ "prompt": {+ "description": "The text prompt describing the video you want to generate.",+ "type": "string"+ },+ "resolution": {+ "default": "720p",+ "description": "Resolution of the generated video.",+ "enum": [+ "720p",+ "1080p"+ ],+ "type": "string"+ },+ "video": {+ "description": "URL of the input video. MP4, under 50 MB and under 15 seconds.",+ "type": "string"+ }+ },+ "required": [+ "prompt",+ "video"+ ],+ "type": "object",+ "x-order-properties": [+ "prompt",+ "video",+ "aspect_ratio",+ "resolution",+ "duration",+ "generate_audio"+ ]+ },+ "black-forest-labs/flux-3/video-edit": {+ "additionalProperties": false,+ "properties": {+ "prompt": {+ "description": "Describe how to edit the input video. The clip is re-rendered while preserving its motion, timing, and framing. Maximum 4096 characters.",+ "maxLength": 4096,+ "minLength": 1,+ "type": "string"+ },+ "video": {+ "description": "URL of the input MP4 video. The video must be under 50 MB and under 15 seconds.",+ "minLength": 1,+ "type": "string"+ }+ },+ "required": [+ "video",+ "prompt"+ ],+ "type": "object",+ "x-order-properties": [+ "video",+ "prompt"+ ]+ },+ "nvidia/cosmos-3-super/image-to-video": {+ "additionalProperties": false,+ "properties": {+ "duration": {+ "default": 7,+ "description": "Output video duration in seconds.",+ "enum": [+ 1,+ 2,+ 3,+ 4,+ 5,+ 6,+ 7+ ],+ "title": "Duration",+ "type": "integer",+ "x-ui-component": "select"+ },+ "guidance_scale": {+ "default": 6,+ "description": "Classifier-free guidance scale.",+ "maximum": 20,+ "minimum": 0,+ "title": "Guidance Scale",+ "type": "number",+ "x-ui-component": "slider"+ },+ "image": {+ "description": "First-frame image for the generated video.",+ "title": "Image",+ "type": "string"+ },+ "negative_prompt": {+ "description": "Content to steer the generation away from.",+ "title": "Negative Prompt",+ "type": "string",+ "x-rows": 3,+ "x-ui-component": "textarea"+ },+ "num_inference_steps": {+ "default": 28,+ "description": "Number of denoising steps.",+ "maximum": 50,+ "minimum": 1,+ "title": "Inference Steps",+ "type": "integer",+ "x-ui-component": "slider"+ },+ "prompt": {+ "description": "Text prompt describing the motion and scene of the video to generate.",+ "title": "Prompt",+ "type": "string",+ "x-rows": 4,+ "x-ui-component": "textarea"+ },+ "size": {+ "default": "16:9",+ "description": "Output video size preset.",+ "enum": [+ "16:9",+ "4:3",+ "1:1",+ "3:4",+ "9:16"+ ],+ "title": "Size",+ "type": "string",+ "x-ui-component": "select"+ }+ },+ "required": [+ "prompt",+ "image"+ ],+ "type": "object",+ "x-order-properties": [+ "prompt",+ "image",+ "negative_prompt",+ "size",+ "duration",+ "num_inference_steps",+ "guidance_scale"+ ]+ },+ "skywork-ai/skyreels-v4/text-to-video": {+ "additionalProperties": false,+ "properties": {+ "aspect_ratio": {+ "default": "16:9",+ "description": "Aspect ratio of the generated video.",+ "enum": [+ "16:9",+ "9:16",+ "1:1"+ ],+ "type": "string"+ },+ "duration": {+ "default": 5,+ "description": "Duration of the generated video in seconds.",+ "maximum": 15,+ "minimum": 3,+ "type": "integer",+ "x-ui-component": "slider"+ },+ "mode": {+ "default": "std",+ "description": "Quality/performance mode. Fast mode currently requires sound to be false.",+ "enum": [+ "std",+ "fast"+ ],+ "type": "string"+ },+ "prompt": {+ "description": "The prompt describing the video to generate.",+ "type": "string",+ "x-rows": 4,+ "x-ui-component": "textarea"+ },+ "resolution": {+ "default": "1080p",+ "description": "Output video resolution.",+ "enum": [+ "480p",+ "720p",+ "1080p"+ ],+ "type": "string"+ },+ "sound": {+ "default": false,+ "description": "Whether to generate sound effects with the video.",+ "type": "boolean"+ }+ },+ "required": [+ "prompt"+ ],+ "type": "object",+ "x-order-properties": [+ "prompt",+ "duration",+ "aspect_ratio",+ "resolution",+ "sound",+ "mode"+ ]+ },+ "skywork-ai/skyreels-v4/image-to-video": {+ "additionalProperties": false,+ "properties": {+ "duration": {+ "default": 5,+ "description": "Duration of the generated video in seconds.",+ "maximum": 15,+ "minimum": 3,+ "type": "integer",+ "x-ui-component": "slider"+ },+ "end_frame_image": {+ "description": "Optional end frame image URL.",+ "type": "string"+ },+ "first_frame_image": {+ "description": "First frame image URL.",+ "type": "string"+ },+ "images": {+ "description": "Optional middle frame image URLs. Upload up to 6 images.",+ "items": {+ "type": "string"+ },+ "maxItems": 6,+ "type": "array",+ "disabled": true+ },+ "mode": {+ "default": "std",+ "description": "Quality/performance mode. Fast mode currently requires sound to be false.",+ "enum": [+ "std",+ "fast"+ ],+ "type": "string"+ },+ "prompt": {+ "description": "The prompt describing the video motion or camera behavior.",+ "type": "string",+ "x-rows": 4,+ "x-ui-component": "textarea"+ },+ "resolution": {+ "default": "1080p",+ "description": "Output video resolution.",+ "enum": [+ "480p",+ "720p",+ "1080p"+ ],+ "type": "string"+ },+ "sound": {+ "default": false,+ "description": "Whether to generate sound effects with the video.",+ "type": "boolean"+ }+ },+ "required": [+ "prompt",+ "first_frame_image"+ ],+ "type": "object",+ "x-order-properties": [+ "prompt",+ "first_frame_image",+ "end_frame_image",+ "images",+ "duration",+ "resolution",+ "sound",+ "mode"+ ]+ },+ "skywork-ai/skyreels-v4/reference-to-video": {+ "additionalProperties": false,+ "properties": {+ "aspect_ratio": {+ "default": "16:9",+ "description": "Aspect ratio of the generated video.",+ "enum": [+ "16:9",+ "9:16",+ "1:1"+ ],+ "type": "string"+ },+ "duration": {+ "default": 5,+ "description": "Duration of the generated video in seconds.",+ "maximum": 15,+ "minimum": 3,+ "type": "integer",+ "x-ui-component": "slider"+ },+ "images": {+ "description": "Reference image URLs. Upload up to 3 images.",+ "items": {+ "type": "string"+ },+ "maxItems": 3,+ "type": "array"+ },+ "mode": {+ "default": "std",+ "description": "Quality/performance mode. Fast mode currently requires sound to be false.",+ "enum": [+ "std",+ "fast"+ ],+ "type": "string"+ },+ "prompt": {+ "description": "The prompt describing the generated video.",+ "type": "string",+ "x-rows": 4,+ "x-ui-component": "textarea"+ },+ "ref_videos": {+ "description": "Optional reference video URL. Upload at most 1 video.",+ "items": {+ "type": "string"+ },+ "maxItems": 1,+ "type": "array",+ "disabled": true+ },+ "resolution": {+ "default": "1080p",+ "description": "Output video resolution.",+ "enum": [+ "480p",+ "720p",+ "1080p"+ ],+ "type": "string"+ },+ "sound": {+ "default": false,+ "description": "Whether to generate sound effects with the video.",+ "type": "boolean"+ }+ },+ "required": [+ "prompt"+ ],+ "type": "object",+ "x-order-properties": [+ "prompt",+ "images",+ "ref_videos",+ "aspect_ratio",+ "duration",+ "resolution",+ "sound",+ "mode"+ ]+ },+ "wavespeed-ai/kandinsky5-pro/text-to-video": {+ "additionalProperties": false,+ "properties": {+ "aspect_ratio": {+ "default": "3:2",+ "description": "Aspect ratio of the generated video.",+ "enum": [+ "3:2",+ "1:1",+ "2:3"+ ],+ "type": "string"+ },+ "duration": {+ "default": 5,+ "description": "Video duration in seconds (currently only 5s is supported).",+ "enum": [+ 5+ ],+ "type": "integer",+ "x-ui-component": "select"+ },+ "prompt": {+ "description": "The text prompt to guide video generation.",+ "type": "string"+ },+ "resolution": {+ "default": "512p",+ "description": "Video resolution quality.",+ "enum": [+ "512p",+ "1024p"+ ],+ "type": "string"+ }+ },+ "required": [+ "prompt"+ ],+ "type": "object",+ "x-order-properties": [+ "prompt",+ "resolution",+ "aspect_ratio",+ "duration"+ ]+ },+ "wavespeed-ai/kandinsky5-pro/image-to-video": {+ "additionalProperties": false,+ "properties": {+ "duration": {+ "default": 5,+ "description": "The duration of the generated media in seconds.",+ "enum": [+ 5+ ],+ "type": "integer",+ "x-ui-component": "select"+ },+ "image": {+ "description": "The URL of the image to use as a reference for the video generation.",+ "type": "string"+ },+ "prompt": {+ "description": "The prompt to generate the video from.",+ "type": "string"+ },+ "resolution": {+ "default": "512p",+ "description": "Video resolution.",+ "enum": [+ "512p",+ "1024p"+ ],+ "type": "string"+ }+ },+ "required": [+ "prompt",+ "image"+ ],+ "type": "object",+ "x-order-properties": [+ "prompt",+ "image",+ "resolution",+ "duration"+ ]+ },+ "wavespeed-ai/minimax-h3/text-to-video": {+ "additionalProperties": false,+ "properties": {+ "aspect_ratio": {+ "default": "16:9",+ "description": "Output aspect ratio.",+ "enum": [+ "16:9",+ "9:16",+ "1:1",+ "4:3",+ "3:4",+ "21:9",+ "9:21"+ ],+ "type": "string"+ },+ "duration": {+ "default": 5,+ "description": "Output video duration in seconds.",+ "enum": [+ 3,+ 4,+ 5,+ 6,+ 7,+ 8,+ 9,+ 10,+ 11,+ 12,+ 13,+ 14,+ 15+ ],+ "type": "integer",+ "x-ui-component": "select"+ },+ "prompt": {+ "description": "Text description of the video scene, action, camera movement, and the desired soundtrack. Audio is generated natively together with the video.",+ "type": "string"+ },+ "resolution": {+ "default": "480p",+ "description": "Output video resolution. 768p is the model's native canvas; 480p is a faster, lower-cost tier; 540p is a mid tier at 1.5x the 480p price. 1080p is the highest-quality full-HD tier at 2x the 768p price (generation takes longer).",+ "enum": [+ "480p",+ "540p",+ "768p",+ "1080p"+ ],+ "type": "string"+ },+ "seed": {+ "description": "The random seed to use for the generation. -1 means a random seed will be used.",+ "type": "integer"+ }+ },+ "required": [+ "prompt"+ ],+ "type": "object",+ "x-order-properties": [+ "prompt",+ "aspect_ratio",+ "resolution",+ "duration",+ "seed"+ ]+ },+ "wavespeed-ai/minimax-h3/reference-to-video": {+ "additionalProperties": false,+ "properties": {+ "aspect_ratio": {+ "default": "16:9",+ "description": "Output aspect ratio.",+ "enum": [+ "16:9",+ "9:16",+ "1:1",+ "4:3",+ "3:4",+ "21:9",+ "9:21"+ ],+ "type": "string"+ },+ "duration": {+ "default": 5,+ "description": "Output video duration in seconds.",+ "enum": [+ 3,+ 4,+ 5,+ 6,+ 7,+ 8,+ 9,+ 10,+ 11,+ 12,+ 13,+ 14,+ 15+ ],+ "type": "integer",+ "x-ui-component": "select"+ },+ "prompt": {+ "description": "Text description of the desired video. Refer to reference inputs as <Picture 1>..<Picture 9>, <Video 1>..<Video 3>, and <Audio 1>..<Audio 3>. Audio is generated natively together with the video.",+ "type": "string"+ },+ "reference_audios": {+ "description": "Standalone reference audio URLs (up to 3, trimmed to 15 seconds each).",+ "items": {+ "type": "string"+ },+ "maxItems": 3,+ "type": "array",+ "disabled": true+ },+ "reference_images": {+ "description": "Reference image URLs (up to 9). At least one reference input is required.",+ "items": {+ "type": "string"+ },+ "maxItems": 9,+ "type": "array"+ },+ "reference_videos": {+ "description": "Reference video URLs (up to 3, usable at any output resolution). Their soundtracks are used automatically. Total reference video duration is budgeted to 15 seconds; longer inputs are truncated fairly.",+ "items": {+ "type": "string"+ },+ "maxItems": 3,+ "type": "array",+ "disabled": true+ },+ "resolution": {+ "default": "480p",+ "description": "Output video resolution. 768p is the model's native canvas; 480p is a faster, lower-cost tier; 540p is a mid tier at 1.5x the 480p price. 1080p is the highest-quality full-HD tier at 2x the 768p price (generation takes longer).",+ "enum": [+ "480p",+ "540p",+ "768p",+ "1080p"+ ],+ "type": "string"+ },+ "seed": {+ "description": "The random seed to use for the generation. -1 means a random seed will be used.",+ "type": "integer"+ }+ },+ "required": [+ "prompt"+ ],+ "type": "object",+ "x-order-properties": [+ "prompt",+ "reference_images",+ "reference_videos",+ "reference_audios",+ "aspect_ratio",+ "resolution",+ "duration",+ "seed"+ ]+ },+ "wavespeed-ai/minimax-h3/video-edit": {+ "additionalProperties": false,+ "properties": {+ "aspect_ratio": {+ "description": "Aspect ratio of the output video. Adapts to the input video if not specified.",+ "enum": [+ "16:9",+ "9:16",+ "1:1",+ "4:3",+ "3:4",+ "21:9",+ "9:21"+ ],+ "type": "string",+ "x-ui-component": "select"+ },+ "duration": {+ "description": "Output video duration in seconds. Auto-detected from the input video if not specified.",+ "enum": [+ 3,+ 4,+ 5,+ 6,+ 7,+ 8,+ 9,+ 10,+ 11,+ 12,+ 13,+ 14,+ 15+ ],+ "type": "integer",+ "x-ui-component": "select"+ },+ "generate_audio": {+ "default": true,+ "description": "Whether to generate native audio for the edited output. When set to false, the input video's audio track is preserved on the output instead.",+ "type": "boolean"+ },+ "prompt": {+ "description": "Describe the edit you want applied to the input video - change lighting, weather, style, environment, or specific elements.",+ "type": "string"+ },+ "reference_audios": {+ "description": "Optional reference audio URLs to guide audio generation. Refer to them in the prompt as <Audio 1>..<Audio 3>.",+ "items": {+ "type": "string"+ },+ "maxItems": 3,+ "type": "array",+ "disabled": true+ },+ "reference_images": {+ "description": "Optional reference image URLs to guide the edit (subject identity, style, etc.). Refer to them in the prompt as <Picture 1>..<Picture 9>.",+ "items": {+ "type": "string"+ },+ "maxItems": 9,+ "type": "array",+ "disabled": true+ },+ "resolution": {+ "default": "480p",+ "description": "Output video resolution. 768p is the model's native canvas; 480p is a faster, lower-cost tier; 540p is a mid tier at 1.5x the 480p price. 1080p is the highest-quality full-HD tier at 2x the 768p price (generation takes longer).",+ "enum": [+ "480p",+ "540p",+ "768p",+ "1080p"+ ],+ "type": "string"+ },+ "seed": {+ "description": "The random seed to use for the generation. A negative value means a random seed will be used.",+ "type": "integer"+ },+ "video": {+ "description": "URL of the input video to edit. It drives subject identity, composition, and motion while the prompt rewrites lighting, style, environment, or specific elements.",+ "type": "string"+ }+ },+ "required": [+ "prompt",+ "video"+ ],+ "type": "object",+ "x-order-properties": [+ "prompt",+ "video",+ "reference_images",+ "reference_audios",+ "resolution",+ "aspect_ratio",+ "duration",+ "generate_audio",+ "seed"+ ]+ },+ "alibaba/wan-3.0/reference-to-video": {+ "additionalProperties": false,+ "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"+ ],+ "type": "string"+ },+ "duration": {+ "default": 5,+ "description": "The duration of the generated video in seconds. Default: 5. Without video input, use an integer from 2 to 30. When reference videos are provided, the total input video duration plus the generated output duration must not exceed 30 seconds.",+ "maximum": 30,+ "minimum": 2,+ "type": "integer",+ "x-ui-component": "slider"+ },+ "enable_prompt_expansion": {+ "default": false,+ "description": "If set to true, the prompt optimizer will be enabled.",+ "type": "boolean"+ },+ "generate_audio": {+ "default": true,+ "description": "Whether to include audio in the generated video.",+ "type": "boolean",+ "x-aliases": [+ "enable_audio"+ ]+ },+ "prompt": {+ "description": "The positive prompt for the generation. Refer to reference media as Image 1, Video 1, Audio 1, ..., numbered per type in array order.",+ "type": "string"+ },+ "reference_audios": {+ "description": "Array of reference audio URLs (up to 5). Total input audio duration must not exceed 15 seconds.",+ "items": {+ "type": "string"+ },+ "maxItems": 5,+ "type": "array",+ "disabled": true+ },+ "reference_images": {+ "description": "Array of reference image URLs (up to 10). At least one reference image, video, or audio is required.",+ "items": {+ "type": "string"+ },+ "maxItems": 10,+ "type": "array"+ },+ "reference_videos": {+ "description": "Array of reference video URLs (up to 5). Each video must be MP4 or MOV, 1-15 seconds, 240-4096 pixels on each side, no more than 8:1 aspect ratio, and no more than 100 MB. Total input video duration must not exceed 15 seconds. Supports HTTP/HTTPS URLs and temporary OSS URLs.",+ "items": {+ "type": "string"+ },+ "maxItems": 5,+ "type": "array",+ "disabled": true+ },+ "resolution": {+ "default": "720p",+ "description": "The resolution of the generated video.",+ "enum": [+ "480p",+ "720p",+ "1080p"+ ],+ "type": "string"+ },+ "seed": {+ "description": "The random seed to use for the generation. -1 means a random seed will be used.",+ "type": "integer"+ }+ },+ "required": [+ "prompt"+ ],+ "type": "object",+ "x-order-properties": [+ "prompt",+ "reference_images",+ "reference_videos",+ "reference_audios",+ "resolution",+ "aspect_ratio",+ "duration",+ "enable_prompt_expansion",+ "generate_audio",+ "seed"+ ]+ },+ "alibaba/wan-3.0/video-edit": {+ "additionalProperties": false,+ "properties": {+ "duration": {+ "description": "Output duration (2-15 seconds). When omitted, follows the input duration rounded up and clamped to 2-15 seconds.",+ "maximum": 15,+ "minimum": 2,+ "type": "integer",+ "x-hidden": true,+ "x-ui-component": "slider"+ },+ "enable_prompt_expansion": {+ "default": false,+ "description": "If set to true, the prompt optimizer will be enabled.",+ "type": "boolean"+ },+ "generate_audio": {+ "default": true,+ "description": "Whether to generate native audio for the edited output. Defaults to true. When set to false, the input video's audio track is preserved on the output instead.",+ "type": "boolean"+ },+ "prompt": {+ "description": "Describe the edit you want applied to the input video.",+ "type": "string"+ },+ "reference_audios": {+ "description": "Array of reference audio URLs (up to 5). Total input audio duration must not exceed 15 seconds.",+ "items": {+ "type": "string"+ },+ "maxItems": 5,+ "type": "array",+ "disabled": true+ },+ "reference_images": {+ "description": "Optional reference images to guide the edit (up to 10).",+ "items": {+ "type": "string"+ },+ "maxItems": 10,+ "type": "array",+ "disabled": true+ },+ "resolution": {+ "default": "720p",+ "description": "Output video resolution.",+ "enum": [+ "480p",+ "720p",+ "1080p"+ ],+ "type": "string",+ "x-ui-component": "select"+ },+ "seed": {+ "description": "The random seed to use for the generation. -1 means a random seed will be used.",+ "type": "integer"+ },+ "video": {+ "description": "URL of the input video to edit. Videos longer than 15s are trimmed to 15s.",+ "type": "string"+ }+ },+ "required": [+ "prompt",+ "video"+ ],+ "type": "object",+ "x-order-properties": [+ "prompt",+ "video",+ "reference_images",+ "reference_audios",+ "resolution",+ "duration",+ "generate_audio",+ "enable_prompt_expansion",+ "seed"+ ]+ },+ "wavespeed-ai/seedvr2/video": {+ "additionalProperties": false,+ "properties": {+ "target_resolution": {+ "default": "1080p",+ "description": "Target resolution to upscale to.",+ "enum": [+ "720p",+ "1080p",+ "2k",+ "4k"+ ],+ "type": "string",+ "x-ui-component": "select"+ },+ "video": {+ "description": "The video to upscale.",+ "type": "string"+ }+ },+ "required": [+ "video"+ ],+ "type": "object",+ "x-order-properties": [+ "video",+ "target_resolution"+ ]+ },+ "wavespeed-ai/davinci-magihuman/image-to-video": {+ "additionalProperties": false,+ "properties": {+ "aspect_ratio": {+ "default": "16:9",+ "description": "The aspect ratio of the generated video.",+ "enum": [+ "16:9",+ "9:16"+ ],+ "type": "string",+ "x-ui-component": "select"+ },+ "audio": {+ "description": "The audio URL for generating the output. If provided, the model will generate a video synchronized with the audio.",+ "type": "string"+ },+ "duration": {+ "default": 5,+ "description": "The duration of the generated video in seconds.",+ "enum": [+ 5,+ 6,+ 7,+ 8,+ 9,+ 10+ ],+ "type": "integer",+ "x-ui-component": "select"+ },+ "image": {+ "description": "The image for generating the output.",+ "type": "string"+ },+ "prompt": {+ "description": "The positive prompt for the generation.",+ "type": "string"+ },+ "resolution": {+ "default": "720p",+ "description": "The resolution of the generated video.",+ "enum": [+ "256p",+ "720p",+ "1080p"+ ],+ "type": "string",+ "x-ui-component": "select"+ },+ "seed": {+ "description": "The random seed to use for the generation. -1 means a random seed will be used.",+ "type": "integer"+ }+ },+ "required": [+ "image",+ "prompt"+ ],+ "type": "object",+ "x-order-properties": [+ "prompt",+ "image",+ "audio",+ "aspect_ratio",+ "resolution",+ "duration",+ "seed"+ ]+ },+ "wavespeed-ai/yue2-3b/text-to-music": {+ "additionalProperties": false,+ "properties": {+ "guidance_scale": {+ "default": 1,+ "description": "Text guidance strength during music generation. Higher values strengthen conditioning on the prompt; excessive values may reduce quality.",+ "maximum": 20,+ "minimum": 0,+ "title": "Guidance Scale",+ "type": "number"+ },+ "lyrics": {+ "description": "Song lyrics. Use section markers such as [Verse] and [Chorus].",+ "minLength": 1,+ "type": "string",+ "x-ui-component": "textarea"+ },+ "seed": {+ "description": "Random seed. Use -1 for a random seed.",+ "type": "integer"+ },+ "style": {+ "description": "Describe the genre, mood, instruments, language and vocal style.",+ "minLength": 1,+ "type": "string",+ "x-ui-component": "textarea"+ },+ "temperature": {+ "default": 1,+ "description": "Music generation sampling temperature. Higher values increase randomness; 0 uses greedy sampling. Does not change score planning.",+ "maximum": 5,+ "minimum": 0,+ "title": "Temperature",+ "type": "number"+ },+ "top_k": {+ "default": 100,+ "description": "Number of most likely tokens considered when sampling music tokens.",+ "maximum": 32768,+ "minimum": 1,+ "title": "Top K",+ "type": "integer"+ },+ "top_p": {+ "default": 0.95,+ "description": "Nucleus sampling probability for music generation. Lower values restrict sampling to more likely tokens.",+ "maximum": 1,+ "minimum": 0.01,+ "title": "Top P",+ "type": "number"+ }+ },+ "required": [+ "lyrics",+ "style"+ ],+ "type": "object",+ "x-order-properties": [+ "lyrics",+ "style",+ "guidance_scale",+ "temperature",+ "top_p",+ "top_k",+ "seed"+ ]}}diff --git a/src/lib/render/studio-contract.ts b/src/lib/render/studio-contract.tsindex 41b23d11..9917e580 100644--- a/src/lib/render/studio-contract.ts+++ b/src/lib/render/studio-contract.ts@@ -1,11 +1,18 @@-// Provider api_schema snapshot, reviewed 2026-09-19. Mirrored in the worker.+// Provider api_schema snapshot, reviewed 2026-10-02. Mirrored in the worker.import definitions from './studio-models.json'import schemas from './provider-schemas.json'import endpoints from './provider-endpoints.json'-export type Schema = { type?: string; properties?: Record<string, Schema>; required?: string[]; enum?: unknown[]; default?: unknown; minimum?: number; maximum?: number; minItems?: number; maxItems?: number; items?: Schema; description?: string; disabled?: boolean }+export type Schema = { type?: string; properties?: Record<string, Schema>; required?: string[]; enum?: unknown[]; default?: unknown; minimum?: number; maximum?: number; minItems?: number; maxItems?: number; items?: Schema; description?: string; disabled?: boolean; format?: string }+// Stufe und Herkunft jedes Cloud-Modells (02.10.2026, Entscheid von David).+// `tier` ordnet die Waehler: 'best' steht oben, 'older' gesammelt unten.+// `weights` sagt, ob genau diese Version offene Gewichte hat ('open'), nur ihre+// Familie ('open-family') oder nie ('closed'). Beides traegt JEDES Modell.+export type ModelTier = 'best' | 'standard' | 'older'+export type ModelWeights = 'open' | 'open-family' | 'closed'export interface StudioModel {baselineUsd: number; sourceModel?: string; promptField?: stringlabel: string; endpoint: string; kind: 'image' | 'video' | 'audio'; adult: boolean+ tier: ModelTier; weights: ModelWeightsinputs: Record<string, string>; defaults: Record<string, unknown>// `resolutionField` / `durationField`: nicht jeder Endpunkt nennt die beiden// Groessen gleich. Die Upscaler rechnen ueber `target_resolution`, die@@ -30,13 +37,36 @@ export function supportsProviderField(id: string, field: string, op = 'generate'return !!path && !!(schemas as Record<string, Schema>)[path]?.properties?.[field]}const HIDDEN = new Set(['enable_base64_output', 'enable_sync_mode'])+// Ein Feld, das eine Datei oder eine Adresse tragen kann und nicht ueber+// `inputs` laeuft (02.10.2026). Ueber `inputs` gehen eigene Dateien: gepruefte+// Groesse, ffprobe, eigene Ablage, Preis aus der echten Laenge. Liesse die+// Optionspruefung so ein Feld durch, gaebe ein roher POST beliebige fremde+// Adressen an den Anbieter. Zaehlt: format uri, oder ein Name mit url, image,+// video, audio, mask oder reference, sofern das Feld Text oder eine Liste+// nimmt (ein Schalter, eine Zahl oder eine feste Auswahl kann keine Adresse+// tragen). Namen auf _id sind Kennungen des Anbieters, keine Dateien.+const MEDIA_NAME = /url|image|video|audio|mask|reference/i+export function isMediaField(key: string, s: Schema): boolean {+ if (/_id$/.test(key)) return false+ const free = (s.type === 'string' && !s.enum) || s.type === 'array' || s.type === undefined+ return free && (s.format === 'uri' || MEDIA_NAME.test(key))+}export function studioFields(id: string): Record<string, Schema> {const m = STUDIO_MODELS[id]return Object.fromEntries(Object.entries(studioSchema(id).properties ?? {}).filter(([key,s]) =>- !m.inputs[key] && key !== (m.promptField ?? 'prompt') && !HIDDEN.has(key) && !s.disabled))+ !m.inputs[key] && key !== (m.promptField ?? 'prompt') && !HIDDEN.has(key) && !s.disabled && !isMediaField(key, s)))+}+// Freie Groesse als Text: Breite und Hoehe je zwischen Schema-Grenze und 4096,+// sonst 256 bis 4096. Der Anbieter rechnet die Flaeche, also Preis und+// Speicher haengen daran.+const SIZE_MIN = 256, SIZE_MAX = 4096+function validSize(value: unknown, schema: Schema): boolean {+ if (typeof value !== 'string' || !/^\d+\*\d+$/.test(value)) return false+ const lo = Math.max(schema.minimum ?? SIZE_MIN, SIZE_MIN), hi = Math.min(schema.maximum ?? SIZE_MAX, SIZE_MAX)+ return value.split('*').every(v => Number(v) >= lo && Number(v) <= hi)}function validate(value: unknown, schema: Schema, name: string): void {- if(name==='size'&&(typeof value!=='string'||!/^\d+\*\d+$/.test(value)||value.split('*').some(v=>Number(v)<=0)))throw new Error('Size must be width*height in pixels')+ if(name==='size'&&!schema.enum&&!validSize(value,schema))throw new Error('Size must be width*height in pixels, each side 256 to 4096')if (schema.enum && !schema.enum.includes(value)) throw new Error(`Choose a supported ${name}`)if (schema.type === 'string' && (typeof value !== 'string' || value.length > 4000)) throw new Error(`Invalid ${name}`)if (schema.type === 'boolean' && typeof value !== 'boolean') throw new Error(`Invalid ${name}`)@@ -89,10 +119,17 @@ export function studioCredits(id: string, options: Record<string,unknown>, measu}// 'input' zahlt die gemessene Eingabe, 'both' die Eingabe UND die angehaengte// Laenge: Seedance berechnet beim Verlaengern den ganzen fertigen Clip.- if (m.price.mode === 'input' || m.price.mode === 'both') {+ // 'inout' (Video-Edit bei MiniMax H3 und Wan 3.0, am 02.10.2026 an+ // /model/price gemessen): der halbe Satz auf die ganzen Eingabesekunden plus+ // der halbe Satz auf die Ausgabedauer. Ohne `duration` gilt die Eingabelaenge.+ if (m.price.mode === 'input' || m.price.mode === 'both' || m.price.mode === 'inout') {if (!measuredSeconds || !Number.isFinite(measuredSeconds) || measuredSeconds > (m.price.maxSeconds ?? 120)) throw new Error(`Input must be no longer than ${m.price.maxSeconds ?? 120} seconds`)seconds = Math.max(m.price.minSeconds ?? 3,Math.ceil(measuredSeconds))if (m.price.mode === 'both') seconds += Number(options[m.price.durationField ?? 'duration'])+ if (m.price.mode === 'inout') {+ const out = options[m.price.durationField ?? 'duration'] === undefined ? seconds : Number(options[m.price.durationField ?? 'duration'])+ seconds = (seconds + out) / 2+ }}if (!Number.isFinite(seconds) || seconds <= 0) throw new Error('Invalid duration')// Ein Endpunkt, der nach Bildpunkten abrechnet, bringt seinen eigenen Faktordiff --git a/src/lib/render/studio-models.json b/src/lib/render/studio-models.jsonindex 33c3156f..44ad09c8 100644--- a/src/lib/render/studio-models.json+++ b/src/lib/render/studio-models.json@@ -4,6 +4,8 @@"endpoint": "wavespeed-ai/open-video/image-to-video","kind": "video","adult": true,+ "tier": "standard",+ "weights": "closed","price": {"mode": "output","rates": {@@ -23,6 +25,8 @@"endpoint": "wavespeed-ai/open-video/image-to-video-lora","kind": "video","adult": true,+ "tier": "standard",+ "weights": "closed","price": {"mode": "output","rates": {@@ -42,6 +46,8 @@"endpoint": "wavespeed-ai/mmaudio-v2","kind": "video","adult": false,+ "tier": "standard",+ "weights": "open","price": {"mode": "output","rates": {@@ -61,6 +67,8 @@"endpoint": "wavespeed-ai/hunyuan-video-foley","kind": "video","adult": false,+ "tier": "standard",+ "weights": "open","price": {"mode": "flat","rates": {@@ -78,6 +86,8 @@"endpoint": "wavespeed-ai/infinitetalk","kind": "video","adult": false,+ "tier": "standard",+ "weights": "open","price": {"mode": "input","rates": {@@ -99,6 +109,8 @@"endpoint": "wavespeed-ai/infinitetalk/multi","kind": "video","adult": false,+ "tier": "standard",+ "weights": "open","price": {"mode": "input","rates": {@@ -120,6 +132,8 @@"endpoint": "wavespeed-ai/qwen-image/edit-multiple-angles","kind": "image","adult": false,+ "tier": "standard",+ "weights": "open","price": {"mode": "flat","rates": {@@ -137,6 +151,8 @@"endpoint": "wavespeed-ai/minimax-h3/image-edit","kind": "image","adult": false,+ "tier": "standard",+ "weights": "open","price": {"mode": "flat","rates": {@@ -156,6 +172,8 @@"endpoint": "wavespeed-ai/scail-2","kind": "video","adult": false,+ "tier": "standard",+ "weights": "open-family","price": {"mode": "input","rates": {@@ -178,6 +196,8 @@"endpoint": "wavespeed-ai/wan-2.1/ditto","kind": "video","adult": false,+ "tier": "older",+ "weights": "open-family","price": {"mode": "input","rates": {@@ -197,6 +217,8 @@"endpoint": "bytedance/seedance-2.5/image-to-video","kind": "video","adult": false,+ "tier": "best",+ "weights": "closed","price": {"mode": "output","rates": {@@ -220,6 +242,8 @@"endpoint": "wavespeed-ai/minimax-h3/image-to-video","kind": "video","adult": false,+ "tier": "best",+ "weights": "open","price": {"mode": "output","rates": {@@ -243,6 +267,8 @@"endpoint": "alibaba/wan-3.0/image-to-video","kind": "video","adult": false,+ "tier": "best",+ "weights": "open-family","price": {"mode": "output","rates": {@@ -265,6 +291,8 @@"endpoint": "alibaba/wan-3.0/image-to-video-spicy","kind": "video","adult": true,+ "tier": "best",+ "weights": "open-family","price": {"mode": "output","rates": {@@ -287,6 +315,8 @@"endpoint": "wavespeed-ai/chroma","kind": "image","adult": true,+ "tier": "standard",+ "weights": "open","inputs": {},"defaults": {},"price": {@@ -303,6 +333,8 @@"endpoint": "wavespeed-ai/prefect-pony-xl","kind": "image","adult": true,+ "tier": "standard",+ "weights": "open","inputs": {},"defaults": {},"price": {@@ -319,6 +351,8 @@"endpoint": "wavespeed-ai/neta-lumina","kind": "image","adult": true,+ "tier": "standard",+ "weights": "open","inputs": {},"defaults": {},"price": {@@ -335,6 +369,8 @@"endpoint": "wavespeed-ai/wan-2.2-spicy/image-to-video","kind": "video","adult": true,+ "tier": "older",+ "weights": "open","inputs": {"image": "source_path"},@@ -354,6 +390,8 @@"endpoint": "alibaba/wan-2.7/image-to-video-spicy","kind": "video","adult": true,+ "tier": "standard",+ "weights": "open-family","inputs": {"image": "source_path","audio": "audio_path"@@ -374,6 +412,8 @@"endpoint": "wavespeed-ai/wan-2.2-spicy/video-extend","kind": "video","adult": true,+ "tier": "older",+ "weights": "open","inputs": {"video": "video_path"},@@ -393,6 +433,8 @@"endpoint": "wavespeed-ai/qwen3-tts/text-to-speech","kind": "audio","adult": false,+ "tier": "standard",+ "weights": "open","inputs": {},"defaults": {},"price": {@@ -410,6 +452,8 @@"endpoint": "bytedance/seedance-2.5/talking-avatar","kind": "video","adult": false,+ "tier": "standard",+ "weights": "closed","inputs": {"image": "source_path","audio": "audio_path"@@ -433,6 +477,8 @@"endpoint": "wavespeed-ai/longcat-avatar-1.5","kind": "video","adult": false,+ "tier": "standard",+ "weights": "open-family","inputs": {"image": "source_path","audio": "audio_path"@@ -453,6 +499,8 @@"endpoint": "wavespeed-ai/longcat-avatar-1.5/multi","kind": "video","adult": false,+ "tier": "standard",+ "weights": "open-family","inputs": {"image": "source_path","left_audio": "audio_path",@@ -474,6 +522,8 @@"endpoint": "sync/lipsync-3/avatar","kind": "video","adult": false,+ "tier": "standard",+ "weights": "closed","inputs": {"image": "source_path","audio": "audio_path"@@ -493,6 +543,8 @@"endpoint": "heygen/avatar-v/digital-twin","kind": "video","adult": false,+ "tier": "standard",+ "weights": "closed","inputs": {"audio": "audio_path"},@@ -513,6 +565,8 @@"endpoint": "bytedance/seed-speech-tts-2.0","kind": "audio","adult": false,+ "tier": "standard",+ "weights": "closed","inputs": {},"defaults": {},"promptField": "text",@@ -529,6 +583,8 @@"endpoint": "chatterbox/text-to-speech","kind": "audio","adult": false,+ "tier": "standard",+ "weights": "open","inputs": {"reference_audio": "audio_path"},@@ -547,6 +603,8 @@"endpoint": "minimax/speech-2.8-hd","kind": "audio","adult": false,+ "tier": "standard",+ "weights": "closed","inputs": {},"defaults": {"voice_id": "Wise_Woman"@@ -565,6 +623,8 @@"endpoint": "minimax/speech-2.8-turbo","kind": "audio","adult": false,+ "tier": "standard",+ "weights": "closed","inputs": {},"defaults": {"voice_id": "Wise_Woman"@@ -583,6 +643,8 @@"endpoint": "elevenlabs/eleven-v3","kind": "audio","adult": false,+ "tier": "standard",+ "weights": "closed","inputs": {},"defaults": {},"promptField": "text",@@ -599,6 +661,8 @@"endpoint": "inworld/realtime-tts-2","kind": "audio","adult": false,+ "tier": "standard",+ "weights": "closed","inputs": {},"defaults": {},"promptField": "text",@@ -615,6 +679,8 @@"endpoint": "minimax/music-3.0","kind": "audio","adult": false,+ "tier": "standard",+ "weights": "closed","inputs": {},"defaults": {},"price": {@@ -630,6 +696,8 @@"endpoint": "mureka-ai/mureka-v9.5/generate-song","kind": "audio","adult": false,+ "tier": "standard",+ "weights": "closed","inputs": {},"defaults": {},"promptField": "lyrics",@@ -646,6 +714,8 @@"endpoint": "elevenlabs/music-v2.5","kind": "audio","adult": false,+ "tier": "standard",+ "weights": "closed","inputs": {},"defaults": {},"price": {@@ -664,6 +734,8 @@"endpoint": "alibaba/wan-3.0-prime/image-to-video","kind": "video","adult": false,+ "tier": "standard",+ "weights": "open-family","inputs": {"image": "source_path","last_image": "last_image_path"@@ -686,6 +758,8 @@"endpoint": "alibaba/wan-3.0-prime/image-to-video-spicy","kind": "video","adult": true,+ "tier": "standard",+ "weights": "open-family","inputs": {"image": "source_path","last_image": "last_image_path"@@ -708,6 +782,8 @@"endpoint": "bytedance/seedance-2.5/image-to-video-turbo","kind": "video","adult": false,+ "tier": "standard",+ "weights": "closed","inputs": {"image": "source_path","last_image": "last_image_path"@@ -729,6 +805,8 @@"endpoint": "wavespeed-ai/wan-2.2/animate-2","kind": "video","adult": false,+ "tier": "standard",+ "weights": "open-family","inputs": {"image": "source_path","video": "video_path"@@ -749,6 +827,8 @@"endpoint": "bytedance/seedance-2.5/video-extend","kind": "video","adult": false,+ "tier": "standard",+ "weights": "closed","inputs": {"video": "video_path"},@@ -772,6 +852,8 @@"endpoint": "alibaba/wan-3.0/video-extend","kind": "video","adult": false,+ "tier": "best",+ "weights": "open-family","inputs": {"video": "video_path","last_image": "last_image_path"@@ -794,6 +876,8 @@"endpoint": "bytedance/seedream-v5.0-pro/edit","kind": "image","adult": false,+ "tier": "best",+ "weights": "closed","inputs": {"images": "image_paths"},@@ -816,6 +900,8 @@"endpoint": "alibaba/qwen-image-3.0/edit","kind": "image","adult": false,+ "tier": "standard",+ "weights": "open-family","inputs": {"images": "image_paths"},@@ -837,6 +923,8 @@"endpoint": "wavespeed-ai/flashvsr","kind": "video","adult": false,+ "tier": "standard",+ "weights": "open","inputs": {"video": "video_path"},@@ -859,6 +947,8 @@"endpoint": "wavespeed-ai/video-upscaler-pro","kind": "video","adult": false,+ "tier": "standard",+ "weights": "closed","inputs": {"video": "video_path"},@@ -881,6 +971,8 @@"endpoint": "wavespeed-ai/ultimate-video-upscaler","kind": "video","adult": false,+ "tier": "standard",+ "weights": "closed","inputs": {"video": "video_path"},@@ -903,6 +995,8 @@"endpoint": "clarity-ai/crystal-video-upscaler","kind": "video","adult": false,+ "tier": "standard",+ "weights": "closed","inputs": {"video": "video_path"},@@ -922,6 +1016,8 @@"endpoint": "black-forest-labs/flux-3/video-upscale","kind": "video","adult": false,+ "tier": "best",+ "weights": "open-family","inputs": {"video": "video_path"},@@ -940,6 +1036,8 @@"endpoint": "wavespeed-ai/video-upscaler","kind": "video","adult": false,+ "tier": "standard",+ "weights": "closed","inputs": {"video": "video_path"},@@ -962,6 +1060,8 @@"endpoint": "wavespeed-ai/z-image/base","kind": "image","adult": true,+ "tier": "best",+ "weights": "open","price": {"mode": "flat","rates": {@@ -977,6 +1077,8 @@"endpoint": "wavespeed-ai/nucleus-image/text-to-image","kind": "image","adult": true,+ "tier": "standard",+ "weights": "open-family","price": {"mode": "flat","rates": {@@ -993,6 +1095,8 @@"endpoint": "wavespeed-ai/jib-mix-qwen-image/text-to-image","kind": "image","adult": true,+ "tier": "standard",+ "weights": "open-family","price": {"mode": "flat","rates": {@@ -1008,6 +1112,8 @@"endpoint": "wavespeed-ai/wan-2.2/text-to-image-realism","kind": "image","adult": true,+ "tier": "older",+ "weights": "open-family","price": {"mode": "flat","rates": {@@ -1017,5 +1123,800 @@"inputs": {},"defaults": {},"baselineUsd": 0.025+ },+ "qwen-image-3-pro": {+ "label": "Qwen Image 3.0 Pro",+ "endpoint": "alibaba/qwen-image-3.0-pro/text-to-image",+ "kind": "image",+ "adult": false,+ "tier": "best",+ "weights": "open-family",+ "price": {+ "mode": "flat",+ "rates": {+ "1k": 0.04,+ "2k": 0.075+ }+ },+ "inputs": {},+ "defaults": {},+ "baselineUsd": 0.04+ },+ "qwen-image-3": {+ "label": "Qwen Image 3.0",+ "endpoint": "alibaba/qwen-image-3.0/text-to-image",+ "kind": "image",+ "adult": false,+ "tier": "standard",+ "weights": "open-family",+ "price": {+ "mode": "flat",+ "rates": {+ "1k": 0.03,+ "2k": 0.03+ }+ },+ "inputs": {},+ "defaults": {},+ "baselineUsd": 0.03+ },+ "qwen-image-2.1": {+ "label": "Qwen Image 2.1",+ "endpoint": "wavespeed-ai/qwen-image-2.1/text-to-image",+ "kind": "image",+ "adult": false,+ "tier": "standard",+ "weights": "open",+ "price": {+ "mode": "flat",+ "rates": {+ "1k": 0.02,+ "1.5k": 0.04,+ "2k": 0.08+ }+ },+ "inputs": {},+ "defaults": {},+ "baselineUsd": 0.02+ },+ "flux-3": {+ "label": "FLUX 3",+ "endpoint": "black-forest-labs/flux-3/text-to-image",+ "kind": "image",+ "adult": false,+ "tier": "best",+ "weights": "open-family",+ "price": {+ "mode": "flat",+ "rates": {+ "1k": 0.05,+ "2k": 0.12,+ "4k": 0.65+ }+ },+ "inputs": {},+ "defaults": {},+ "baselineUsd": 0.05+ },+ "flux-2-klein-9b": {+ "label": "FLUX.2 Klein 9B (fast)",+ "endpoint": "wavespeed-ai/flux-2-klein-9b/text-to-image",+ "kind": "image",+ "adult": false,+ "tier": "standard",+ "weights": "open-family",+ "price": {+ "mode": "flat",+ "rates": {+ "default": 0.01+ }+ },+ "inputs": {},+ "defaults": {},+ "baselineUsd": 0.01+ },+ "krea-2-large": {+ "label": "Krea 2 Large",+ "endpoint": "wavespeed-ai/krea-v2-large/text-to-image",+ "kind": "image",+ "adult": false,+ "tier": "standard",+ "weights": "open-family",+ "price": {+ "mode": "flat",+ "rates": {+ "default": 0.06+ }+ },+ "inputs": {},+ "defaults": {},+ "baselineUsd": 0.06+ },+ "cosmos-3-super": {+ "label": "Cosmos 3 Super",+ "endpoint": "nvidia/cosmos-3-super/text-to-image",+ "kind": "image",+ "adult": false,+ "tier": "best",+ "weights": "open",+ "price": {+ "mode": "flat",+ "rates": {+ "default": 0.04+ }+ },+ "inputs": {},+ "defaults": {},+ "baselineUsd": 0.04+ },+ "ideogram-4.5": {+ "label": "Ideogram 4.5",+ "endpoint": "ideogram-ai/ideogram-v4.5",+ "kind": "image",+ "adult": false,+ "tier": "best",+ "weights": "open-family",+ "price": {+ "mode": "flat",+ "rates": {+ "low": 0.03,+ "medium": 0.06,+ "high": 0.22+ },+ "resolutionField": "quality"+ },+ "inputs": {},+ "defaults": {},+ "baselineUsd": 0.06+ },+ "hidream-o1": {+ "label": "HiDream O1",+ "endpoint": "wavespeed-ai/hidream-o1-image/text-to-image",+ "kind": "image",+ "adult": false,+ "tier": "standard",+ "weights": "open-family",+ "price": {+ "mode": "flat",+ "rates": {+ "default": 0.04+ }+ },+ "inputs": {},+ "defaults": {},+ "baselineUsd": 0.04+ },+ "hunyuan-image-3": {+ "label": "HunyuanImage 3 Instruct",+ "endpoint": "wavespeed-ai/hunyuan-image-3-instruct/text-to-image",+ "kind": "image",+ "adult": false,+ "tier": "standard",+ "weights": "open-family",+ "price": {+ "mode": "flat",+ "rates": {+ "default": 0.45+ }+ },+ "inputs": {},+ "defaults": {},+ "baselineUsd": 0.45+ },+ "ernie-image-turbo": {+ "label": "ERNIE Image Turbo (fast)",+ "endpoint": "wavespeed-ai/ernie-image/text-to-image-turbo",+ "kind": "image",+ "adult": false,+ "tier": "standard",+ "weights": "open-family",+ "price": {+ "mode": "flat",+ "rates": {+ "default": 0.03+ }+ },+ "inputs": {},+ "defaults": {},+ "baselineUsd": 0.03+ },+ "qwen-image-3-pro-edit": {+ "label": "Qwen Image 3.0 Pro",+ "endpoint": "alibaba/qwen-image-3.0-pro/edit",+ "kind": "image",+ "adult": false,+ "tier": "best",+ "weights": "open-family",+ "price": {+ "mode": "flat",+ "rates": {+ "1k": 0.043,+ "2k": 0.078+ },+ "extraImage": 0.003+ },+ "inputs": {+ "images": "image_paths"+ },+ "defaults": {},+ "baselineUsd": 0.04+ },+ "qwen-image-2.1-edit": {+ "label": "Qwen Image 2.1",+ "endpoint": "wavespeed-ai/qwen-image-2.1/edit",+ "kind": "image",+ "adult": false,+ "tier": "best",+ "weights": "open",+ "price": {+ "mode": "flat",+ "rates": {+ "1k": 0.03,+ "1.5k": 0.06,+ "2k": 0.12+ },+ "extraImage": 0.02+ },+ "inputs": {+ "images": "image_paths"+ },+ "defaults": {},+ "baselineUsd": 0.03+ },+ "flux-3-edit": {+ "label": "FLUX 3",+ "endpoint": "black-forest-labs/flux-3/edit",+ "kind": "image",+ "adult": false,+ "tier": "best",+ "weights": "open-family",+ "price": {+ "mode": "flat",+ "rates": {+ "1k": 0.05,+ "2k": 0.12,+ "4k": 0.65+ }+ },+ "inputs": {+ "images": "image_paths"+ },+ "defaults": {},+ "baselineUsd": 0.05+ },+ "ideogram-4.5-edit": {+ "label": "Ideogram 4.5",+ "endpoint": "ideogram-ai/ideogram-v4.5/edit",+ "kind": "image",+ "adult": false,+ "tier": "standard",+ "weights": "open-family",+ "price": {+ "mode": "flat",+ "rates": {+ "very_low": 0.008,+ "low": 0.03,+ "medium": 0.06,+ "high": 0.22+ },+ "resolutionField": "quality"+ },+ "inputs": {+ "image": "source_path"+ },+ "defaults": {},+ "baselineUsd": 0.06+ },+ "hidream-o1-edit": {+ "label": "HiDream O1",+ "endpoint": "wavespeed-ai/hidream-o1-image/edit",+ "kind": "image",+ "adult": false,+ "tier": "standard",+ "weights": "open-family",+ "price": {+ "mode": "flat",+ "rates": {+ "default": 0.04+ }+ },+ "inputs": {+ "images": "image_paths"+ },+ "defaults": {},+ "baselineUsd": 0.04+ },+ "hunyuan-image-3-edit": {+ "label": "HunyuanImage 3 Instruct",+ "endpoint": "wavespeed-ai/hunyuan-image-3-instruct/edit",+ "kind": "image",+ "adult": false,+ "tier": "standard",+ "weights": "open-family",+ "price": {+ "mode": "flat",+ "rates": {+ "default": 0.45+ }+ },+ "inputs": {+ "images": "image_paths"+ },+ "defaults": {},+ "baselineUsd": 0.45+ },+ "seedvr2-image": {+ "label": "SeedVR2",+ "endpoint": "wavespeed-ai/seedvr2/image",+ "kind": "image",+ "adult": false,+ "tier": "standard",+ "weights": "open",+ "price": {+ "mode": "flat",+ "rates": {+ "2k": 0.01,+ "4k": 0.01,+ "8k": 0.01+ },+ "resolutionField": "target_resolution"+ },+ "inputs": {+ "image": "source_path"+ },+ "defaults": {},+ "baselineUsd": 0.01+ },+ "ltx-2.5-t2v": {+ "label": "LTX 2.5",+ "endpoint": "wavespeed-ai/ltx-2.5/text-to-video",+ "kind": "video",+ "adult": false,+ "tier": "best",+ "weights": "open",+ "price": {+ "mode": "output",+ "rates": {+ "720p": 0.1,+ "1080p": 0.14,+ "2k": 0.21,+ "4k": 0.33+ }+ },+ "inputs": {},+ "defaults": {},+ "baselineUsd": 0.5+ },+ "ltx-2.5-i2v": {+ "label": "LTX 2.5",+ "endpoint": "wavespeed-ai/ltx-2.5/image-to-video",+ "kind": "video",+ "adult": false,+ "tier": "best",+ "weights": "open",+ "price": {+ "mode": "output",+ "rates": {+ "720p": 0.1,+ "1080p": 0.14,+ "2k": 0.21,+ "4k": 0.33+ }+ },+ "inputs": {+ "image": "source_path",+ "last_image": "last_image_path"+ },+ "defaults": {},+ "baselineUsd": 0.5+ },+ "flux-3-t2v": {+ "label": "FLUX 3 Video",+ "endpoint": "black-forest-labs/flux-3/text-to-video",+ "kind": "video",+ "adult": false,+ "tier": "best",+ "weights": "open-family",+ "price": {+ "mode": "output",+ "rates": {+ "720p": 0.17,+ "1080p": 0.29+ }+ },+ "inputs": {},+ "defaults": {},+ "baselineUsd": 0.85+ },+ "flux-3-i2v": {+ "label": "FLUX 3 Video",+ "endpoint": "black-forest-labs/flux-3/image-to-video",+ "kind": "video",+ "adult": false,+ "tier": "best",+ "weights": "open-family",+ "price": {+ "mode": "output",+ "rates": {+ "720p": 0.17,+ "1080p": 0.29+ }+ },+ "inputs": {+ "image": "source_path"+ },+ "defaults": {},+ "baselineUsd": 0.85+ },+ "flux-3-start-end": {+ "label": "FLUX 3 Video \u2022 Start to End",+ "endpoint": "black-forest-labs/flux-3/start-end-to-video",+ "kind": "video",+ "adult": false,+ "tier": "standard",+ "weights": "open-family",+ "price": {+ "mode": "output",+ "rates": {+ "720p": 0.17,+ "1080p": 0.29+ }+ },+ "inputs": {+ "start_image": "source_path",+ "end_image": "last_image_path"+ },+ "defaults": {},+ "baselineUsd": 0.85+ },+ "flux-3-extend": {+ "label": "FLUX 3 Video \u2022 Extend",+ "endpoint": "black-forest-labs/flux-3/video-extend",+ "kind": "video",+ "adult": false,+ "tier": "best",+ "weights": "open-family",+ "price": {+ "mode": "output",+ "rates": {+ "720p": 0.41,+ "1080p": 0.53+ }+ },+ "inputs": {+ "video": "video_path"+ },+ "defaults": {},+ "baselineUsd": 2.05+ },+ "flux-3-video-edit": {+ "label": "FLUX 3 Video \u2022 Edit",+ "endpoint": "black-forest-labs/flux-3/video-edit",+ "kind": "video",+ "adult": false,+ "tier": "best",+ "weights": "open-family",+ "price": {+ "mode": "input",+ "rates": {+ "default": 0.03+ },+ "maxSeconds": 15+ },+ "inputs": {+ "video": "video_path"+ },+ "defaults": {},+ "baselineUsd": 0.03+ },+ "cosmos-3-super-i2v": {+ "label": "Cosmos 3 Super",+ "endpoint": "nvidia/cosmos-3-super/image-to-video",+ "kind": "video",+ "adult": false,+ "tier": "standard",+ "weights": "open",+ "price": {+ "mode": "output",+ "rates": {+ "default": 0.05+ }+ },+ "inputs": {+ "image": "source_path"+ },+ "defaults": {},+ "baselineUsd": 0.05+ },+ "skyreels-v4-t2v": {+ "label": "SkyReels V4",+ "endpoint": "skywork-ai/skyreels-v4/text-to-video",+ "kind": "video",+ "adult": false,+ "tier": "standard",+ "weights": "open-family",+ "price": {+ "mode": "output",+ "rates": {+ "480p": 0.11,+ "720p": 0.14,+ "1080p": 0.35+ }+ },+ "inputs": {},+ "defaults": {+ "resolution": "480p"+ },+ "baselineUsd": 0.1+ },+ "skyreels-v4-i2v": {+ "label": "SkyReels V4",+ "endpoint": "skywork-ai/skyreels-v4/image-to-video",+ "kind": "video",+ "adult": false,+ "tier": "standard",+ "weights": "open-family",+ "price": {+ "mode": "output",+ "rates": {+ "480p": 0.11,+ "720p": 0.14,+ "1080p": 0.35+ }+ },+ "inputs": {+ "first_frame_image": "source_path",+ "end_frame_image": "last_image_path"+ },+ "defaults": {+ "resolution": "480p"+ },+ "baselineUsd": 0.1+ },+ "skyreels-v4-ref": {+ "label": "SkyReels V4 \u2022 Reference",+ "endpoint": "skywork-ai/skyreels-v4/reference-to-video",+ "kind": "video",+ "adult": false,+ "tier": "standard",+ "weights": "open-family",+ "price": {+ "mode": "output",+ "rates": {+ "480p": 0.11,+ "720p": 0.14,+ "1080p": 0.35+ }+ },+ "inputs": {+ "images": "image_paths"+ },+ "defaults": {+ "resolution": "480p"+ },+ "baselineUsd": 0.1+ },+ "kandinsky-5-pro-t2v": {+ "label": "Kandinsky 5 Pro",+ "endpoint": "wavespeed-ai/kandinsky5-pro/text-to-video",+ "kind": "video",+ "adult": false,+ "tier": "standard",+ "weights": "open-family",+ "price": {+ "mode": "flat",+ "rates": {+ "512p": 0.2,+ "1024p": 0.2+ }+ },+ "inputs": {},+ "defaults": {},+ "baselineUsd": 0.2+ },+ "kandinsky-5-pro-i2v": {+ "label": "Kandinsky 5 Pro",+ "endpoint": "wavespeed-ai/kandinsky5-pro/image-to-video",+ "kind": "video",+ "adult": false,+ "tier": "standard",+ "weights": "open-family",+ "price": {+ "mode": "flat",+ "rates": {+ "512p": 0.2,+ "1024p": 0.2+ }+ },+ "inputs": {+ "image": "source_path"+ },+ "defaults": {},+ "baselineUsd": 0.2+ },+ "minimax-h3-t2v": {+ "label": "MiniMax H3",+ "endpoint": "wavespeed-ai/minimax-h3/text-to-video",+ "kind": "video",+ "adult": false,+ "tier": "best",+ "weights": "open",+ "price": {+ "mode": "output",+ "rates": {+ "480p": 0.04,+ "540p": 0.06,+ "768p": 0.08,+ "1080p": 0.16+ }+ },+ "inputs": {},+ "defaults": {+ "resolution": "480p"+ },+ "baselineUsd": 0.2+ },+ "minimax-h3-ref": {+ "label": "MiniMax H3 \u2022 Reference",+ "endpoint": "wavespeed-ai/minimax-h3/reference-to-video",+ "kind": "video",+ "adult": false,+ "tier": "best",+ "weights": "open",+ "price": {+ "mode": "output",+ "rates": {+ "480p": 0.057,+ "540p": 0.082,+ "768p": 0.107,+ "1080p": 0.207+ },+ "extraImage": 0.02+ },+ "inputs": {+ "reference_images": "image_paths"+ },+ "defaults": {+ "resolution": "480p"+ },+ "baselineUsd": 0.25+ },+ "minimax-h3-video-edit": {+ "label": "MiniMax H3 \u2022 Video Edit",+ "endpoint": "wavespeed-ai/minimax-h3/video-edit",+ "kind": "video",+ "adult": false,+ "tier": "best",+ "weights": "open",+ "price": {+ "mode": "inout",+ "rates": {+ "480p": 0.1,+ "540p": 0.15,+ "768p": 0.2,+ "1080p": 0.4+ },+ "maxSeconds": 15+ },+ "inputs": {+ "video": "video_path"+ },+ "defaults": {+ "resolution": "480p"+ },+ "baselineUsd": 0.25+ },+ "wan-3.0-ref": {+ "label": "Wan 3.0 \u2022 Reference",+ "endpoint": "alibaba/wan-3.0/reference-to-video",+ "kind": "video",+ "adult": false,+ "tier": "best",+ "weights": "open-family",+ "price": {+ "mode": "output",+ "rates": {+ "480p": 0.05,+ "720p": 0.1,+ "1080p": 0.2+ }+ },+ "inputs": {+ "reference_images": "image_paths"+ },+ "defaults": {+ "resolution": "480p"+ },+ "baselineUsd": 0.5+ },+ "wan-3.0-video-edit": {+ "label": "Wan 3.0 \u2022 Video Edit",+ "endpoint": "alibaba/wan-3.0/video-edit",+ "kind": "video",+ "adult": false,+ "tier": "best",+ "weights": "open-family",+ "price": {+ "mode": "inout",+ "rates": {+ "480p": 0.1,+ "720p": 0.2,+ "1080p": 0.4+ },+ "maxSeconds": 15+ },+ "inputs": {+ "video": "video_path"+ },+ "defaults": {+ "resolution": "480p"+ },+ "baselineUsd": 0.5+ },+ "seedvr2-video": {+ "label": "SeedVR2",+ "endpoint": "wavespeed-ai/seedvr2/video",+ "kind": "video",+ "adult": false,+ "tier": "standard",+ "weights": "open",+ "price": {+ "mode": "input",+ "rates": {+ "720p": 0.02,+ "1080p": 0.04,+ "2k": 0.06,+ "4k": 0.08+ },+ "resolutionField": "target_resolution",+ "maxSeconds": 120+ },+ "inputs": {+ "video": "video_path"+ },+ "defaults": {},+ "baselineUsd": 0.1+ },+ "davinci-magihuman": {+ "label": "daVinci MagiHuman",+ "endpoint": "wavespeed-ai/davinci-magihuman/image-to-video",+ "kind": "video",+ "adult": false,+ "tier": "standard",+ "weights": "open",+ "price": {+ "mode": "output",+ "rates": {+ "256p": 0.02,+ "720p": 0.04,+ "1080p": 0.06+ }+ },+ "inputs": {+ "image": "source_path",+ "audio": "audio_path"+ },+ "defaults": {},+ "baselineUsd": 0.1+ },+ "yue2": {+ "label": "YuE2 (song from lyrics)",+ "endpoint": "wavespeed-ai/yue2-3b/text-to-music",+ "kind": "audio",+ "adult": false,+ "tier": "standard",+ "weights": "open",+ "price": {+ "mode": "flat",+ "rates": {+ "default": 0.1+ }+ },+ "inputs": {},+ "defaults": {+ "style": "pop, female vocal, bright, upbeat"+ },+ "baselineUsd": 0.1,+ "promptField": "lyrics"}}diff --git a/src/lib/render/studio-roles.ts b/src/lib/render/studio-roles.tsnew file mode 100644index 00000000..0b9398dd--- /dev/null+++ b/src/lib/render/studio-roles.ts@@ -0,0 +1,58 @@+// Welche Studio-Modelle welche Create-Unterkategorie fahren.+//+// Blattdatei ohne eigene Abhaengigkeiten ausser der Registrierung, damit sowohl+// cloud-models.ts (Waehler und Op-Aufloesung) als auch preset-models.ts (Rollen+// der Preset-Schritte) dieselbe Quelle lesen. Stuende die Regel in beiden, wuerde+// der Waehler irgendwann ein Modell zeigen, das der Start dann umbiegt.+//+// Deklarierte Listen sind Absicht, keine Vermutung: wo sich ein Modell nicht aus+// seinen Eingaben ablesen laesst (Bearbeiten und Verlaengern lesen beide ein+// Video plus Text), steht seine Id hier ausdruecklich.++import { STUDIO_MODELS, studioSchema } from './studio-contract'++/** Die Job-Parameter, ohne die dieses Modell nicht starten kann, sortiert. */+export function studioRequiredParams(id: string): string[] {+ const required = studioSchema(id).required ?? []+ return Object.entries(STUDIO_MODELS[id].inputs)+ .filter(([field]) => required.includes(field))+ .map(([, key]) => key)+ .sort()+}++function ids(match: (id: string, m: (typeof STUDIO_MODELS)[string]) => boolean): string[] {+ return Object.entries(STUDIO_MODELS).filter(([id, m]) => match(id, m)).map(([id]) => id)+}++/** Text zu Bild: ein Bild aus Worten, keine Eingabedatei. Ein Studio-Zwilling+ * (`sourceModel`) steht schon unter seinem klassischen Namen im Waehler. */+export function studioTextToImage(): string[] {+ return ids((_, m) => m.kind === 'image' && !Object.keys(m.inputs).length && !m.sourceModel)+}++/** Text zu Video: ein Clip aus Worten, keine Eingabedatei. */+export function studioTextToVideo(): string[] {+ return ids((_, m) => m.kind === 'video' && !Object.keys(m.inputs).length)+}++/** Bild zu Video: genau ein Standbild geht hinein, sonst nichts Pflicht. */+export function studioImageToVideo(): string[] {+ return ids((id, m) => m.kind === 'video' && studioRequiredParams(id).join() === 'source_path')+}++/** Referenz zu Video: Referenzbilder sind erlaubt, aber keine Pflicht. Das+ * Standbild der Oberflaeche geht als einzige Referenz hinein. */+export function studioReferenceVideo(): string[] {+ return ids((id, m) => m.kind === 'video' && Object.values(m.inputs).includes('image_paths') && !studioRequiredParams(id).length)+}++/** Bildbearbeitung per Anweisung, ohne Maske. Das Standbild der Oberflaeche geht+ * hinein, kein Pinsel noetig. */+export const STUDIO_EDIT_MODELS: readonly string[] = [+ 'minimax-h3-edit', 'qwen-image-3-edit', 'seedream-5-edit',+ 'qwen-image-3-pro-edit', 'qwen-image-2.1-edit', 'flux-3-edit', 'ideogram-4.5-edit',+ 'hidream-o1-edit', 'hunyuan-image-3-edit',+]++/** Bild-Upscale: ein Standbild geht hinein, dasselbe mit mehr Pixeln kommt zurueck. */+export const STUDIO_IMAGE_UPSCALERS: readonly string[] = ['seedvr2-image']diff --git a/src/stores/__tests__/cloudCatalogStore.test.ts b/src/stores/__tests__/cloudCatalogStore.test.tsindex 2a342917..6847e7c8 100644--- a/src/stores/__tests__/cloudCatalogStore.test.ts+++ b/src/stores/__tests__/cloudCatalogStore.test.ts@@ -49,7 +49,10 @@ beforeEach(() => {describe('cloudCatalogStore', () => {it('falls back to the static seed before any fetch', () => {expect(cloudModelsFor('image').length).toBeGreaterThan(0)- expect(defaultCloudModel('image')?.id).toBe('flux-schnell')+ // 02.10.2026: der neue Standard fuer Bild steht im Notvorrat (klassisch), der+ // fuer Video (minimax-h3-t2v, ein Studio-Modell) nicht: ohne Server bleibt+ // es beim ersten klassischen Videomodell.+ expect(defaultCloudModel('image')?.id).toBe('z-image-turbo')expect(defaultCloudModel('video')?.id).toBe('wan-2.2-720p')expect(isEditCapable('flux-dev')).toBe(true)expect(isEditCapable('flux-schnell')).toBe(false)@@ -160,8 +163,19 @@ describe('cloudCatalogStore', () => {expect(runCredits('image', 'edit', 'some-t2i-only', undefined, 999)).toBe(300)})- it('unknown model falls back to the quota figure', () => {+ it('an unknown pick is priced as the model the run really uses, the default', () => {+ // Seit 02.10.2026 faengt modelForOp eine Wahl ab, die der Katalog nicht+ // (mehr) kennt, und Zaehler und Start rechnen beide mit dem Standard.useCloudCatalogStore.getState().setCatalog(serverCatalog)+ expect(runCredits('image', 'generate', 'not-in-catalog', undefined, 321)).toBe(300)+ })++ it('falls back to the quota figure when the entry carries no price', () => {+ useCloudCatalogStore.getState().setCatalog({+ ...serverCatalog,+ models: [{ id: 'flux-9', label: 'Flux 9', kind: 'image' }],+ })+ expect(runCredits('image', 'generate', 'flux-9', undefined, 321)).toBe(321)expect(runCredits('image', 'generate', 'not-in-catalog', undefined, 321)).toBe(321)})})diff --git a/src/stores/cloudCatalogStore.ts b/src/stores/cloudCatalogStore.tsindex 0ed1cf2c..d3f42271 100644--- a/src/stores/cloudCatalogStore.ts+++ b/src/stores/cloudCatalogStore.ts@@ -7,7 +7,12 @@import { create } from 'zustand'import { persist } from 'zustand/middleware'import { safeJSONStorage } from '../lib/storage-quota'-import { CLOUD_MODEL_SEED, type CloudModel } from '../lib/render/cloud-models'+import { CLOUD_MODEL_SEED, DEFAULT_MODEL_IDS, type CloudModel } from '../lib/render/cloud-models'+import { STUDIO_MODELS } from '../lib/render/studio-contract'+import {+ STUDIO_EDIT_MODELS, STUDIO_IMAGE_UPSCALERS, studioImageToVideo, studioReferenceVideo, studioTextToImage,+ studioTextToVideo,+} from '../lib/render/studio-roles'import type { RenderKind, RenderOp } from '../lib/render/cloud-jobs'import { getCatalog, type CatalogOps, type CloudCatalog } from '../api/cloud/catalog'@@ -64,23 +69,6 @@ export function cloudModelsFor(kind: RenderKind): CloudModel[] {return useCloudCatalogStore.getState().models.filter((m) => m.kind === kind && !m.ops)}-/** Review B1 (Runde 2, 20.09.2026): the ONLY signal that the connected- * server knows the Studio endpoints at all (Portplan Abschnitt 4, "nie- * eine Serverversion fest verdrahten"): absence, not a version number, is- * what an older catalog payload looks like. The default seed- * (CLOUD_MODEL_SEED) carries `quote_required` on no entry, so a fresh- * install reads false here until the first successful catalog fetch, same- * as an old server that never gained Studio. Every caller that would- * otherwise pick a Studio model as a role intent's DEFAULT (create-- * studio.ts's `intentPickerModels`, which `resolveIntentPick` and five- * downstream components all read) must gate on this, or a Create-tab run- * on an old server picks an endpoint that server has never heard of- * (review-studio-B.md B1: Extend/Motion broke on today's server). Already- * used the same way by PresetShelf.tsx to hide the shelf entirely. */-export function catalogHasStudio(): boolean {- return useCloudCatalogStore.getState().models.some((m) => m.quote_required === true)-}-// Does this catalog entry serve this op? Classic models (no `ops`) keep their// flag contract: generate always, edit per flag, animate = video i2v.export function cloudModelSupportsOp(m: CloudModel, op: RenderOp): boolean {@@ -122,13 +110,25 @@ export function loraGenModels(): CloudModel[] {return useCloudCatalogStore.getState().models.filter((m) => m.lora === true)}-/** First classic model of the kind; kinds whose models are ALL op-specialized- * (audio — every entry carries `ops`, in the live catalog and the seed alike)- * fall back to the kind's first entry so callers never explode on `.id`. */-export function defaultCloudModel(kind: RenderKind): CloudModel | undefined {+/** Das klassische Standardmodell (ohne Studio-Eintraege) fuer Wege, die nur den+ * klassischen Katalog fahren. First classic model of the kind; kinds whose+ * models are ALL op-specialized (audio, every entry carries `ops`, in the live+ * catalog and the seed alike) fall back to the kind's first entry so callers+ * never explode on `.id`. */+export function classicDefaultModel(kind: RenderKind): CloudModel | undefined {return cloudModelsFor(kind)[0] ?? useCloudCatalogStore.getState().models.find((m) => m.kind === kind)}+/** Das Standardmodell fuer eine NEUE Auswahl (DEFAULT_MODEL_IDS, seit+ * 02.10.2026), sofern der Server es kennt. Kennt er es nicht (ein aelterer+ * Server, oder der Notvorrat), gilt wie vor diesem Stand das erste klassische+ * Modell. Eine gespeicherte Wahl bleibt, wie sie ist: diese Funktion wird nur+ * befragt, wo nichts gewaehlt ist. */+export function defaultCloudModel(kind: RenderKind): CloudModel | undefined {+ const id = kind === 'image' ? DEFAULT_MODEL_IDS.image : kind === 'video' ? DEFAULT_MODEL_IDS.video : undefined+ return (id ? cloudModelById(id) : undefined) ?? classicDefaultModel(kind)+}+export function cloudModelById(id: string): CloudModel | undefined {return useCloudCatalogStore.getState().models.find((m) => m.id === id)}@@ -142,15 +142,47 @@ export function isEditModel(m: CloudModel): boolean {return m.edit === true || m.ops?.includes('edit') === true}+/** Die Studio-Eintraege dieser Ids, die der Server wirklich fuehrt. Die Ids+ * kommen aus der mitgelieferten Registrierung (studio-roles.ts), die Eintraege+ * aus dem Katalog: was ein Server nicht kennt, wird nicht angeboten, weil der+ * Start es dort ablehnen wuerde. Ein Eintrag zaehlt als Studio-Eintrag, wenn+ * der Server `quote_required` setzt: ABWESENHEIT dieses Felds, nie eine+ * Versionsnummer, ist, wie ein aelterer Katalog aussieht (Portplan Abschnitt 4,+ * "nie eine Serverversion fest verdrahten"). Review B1 (Runde 2, 20.09.2026):+ * ohne diese Probe wich ein Create-Lauf auf einem Server ohne Studio auf einen+ * Endpunkt aus, den dieser Server nie gehoert hatte. */+export function studioEntries(ids: readonly string[]): CloudModel[] {+ const { models } = useCloudCatalogStore.getState()+ return ids+ .map((id) => models.find((m) => m.id === id))+ .filter((m): m is CloudModel => m !== undefined && m.quote_required === true && STUDIO_MODELS[m.id] !== undefined)+}++/** Models that can run the 'edit' op: the masked img2img editors (`edit` flag,+ * flux-dev) plus the instruction-based edit-only endpoints (`ops` includes+ * 'edit', qwen-image-edit), then the studio editors (instruction, no mask, see+ * studio-roles.ts). The classic ones stay first. */+export function editCapableModels(): CloudModel[] {+ const classic = useCloudCatalogStore.getState().models.filter((m) => m.kind === 'image' && isEditModel(m))+ return [...classic, ...studioEntries(STUDIO_EDIT_MODELS)]+}+export function isEditCapable(id: string): boolean {- const m = cloudModelById(id)- return m !== undefined && isEditModel(m)+ return editCapableModels().some((m) => m.id === id)+}++/** Does an edit on this model need a painted mask? Masked editors (flux-dev) do.+ * Instruction editors (qwen-image-edit and every studio editor) read the+ * prompt and the picture alone, so the button must not wait for a mask. */+export function editNeedsMask(id: string): boolean {+ if (STUDIO_MODELS[id]) return false+ return cloudModelById(id)?.maskless !== true}-/** First edit-capable image model in the catalog (flux-dev today) — the- * submit-time fallback when the picker holds a t2i-only model for an edit. */+/** The edit model a leftover pick falls back to: the open instruction editor+ * when the server has it, else the first edit-capable model, as before. */export function defaultEditModel(): CloudModel | undefined {- return useCloudCatalogStore.getState().models.find((m) => m.kind === 'image' && isEditModel(m))+ return cloudModelById(DEFAULT_MODEL_IDS.edit) ?? editCapableModels()[0]}// Video models that render text-to-video (the "Video" intent) / image-to-video@@ -165,14 +197,65 @@ export function i2vModels(): CloudModel[] {return useCloudCatalogStore.getState().models.filter((m) => m.kind === 'video' && !m.ops && m.i2v !== false)}+/** Can this model make a picture from words alone? The classic image models,+ * the studio ones that start from a sentence, and the Character-Studio+ * endpoints (which take their LoRA on top). An edit model or an upscaler left+ * selected from another tab is not one of them. */+export function runsTextToImage(id: string): boolean {+ const m = cloudModelById(id)+ if (!m || m.kind !== 'image') return false+ return m.lora === true || !m.ops || studioTextToImage().includes(id)+}++/** The studio image models that sit in no classic entry (an entry with a+ * `sourceModel` twin already stands under its classic name). They belong in+ * the Image picker behind the classic list. */+export function studioOnlyImageModels(): CloudModel[] {+ return studioEntries(studioTextToImage()).filter((m) => !STUDIO_MODELS[m.id]?.sourceModel)+}++/** The Video picker of the Create tab: the classic text-to-video models, then+ * the studio ones that start from words alone. */+export function videoPickerModels(): CloudModel[] {+ return [...t2vModels(), ...studioEntries(studioTextToVideo())]+}++/** The Animate picker: the classic image-to-video models, then the studio ones+ * that start from one picture, then the reference models, which take that+ * picture as their single reference. */+export function animatePickerModels(): CloudModel[] {+ return [...i2vModels(), ...studioEntries(studioImageToVideo()), ...studioEntries(studioReferenceVideo())]+}++/** Utility ops (bg-remove / eraser / image upscale) have no model pick: the+ * server runs them on fixed endpoints and ignores the model. A Studio model+ * left selected on the Image tab must not reroute them to op 'studio', which+ * would render a new picture instead of cutting out, erasing or enhancing.+ * The run then looks exactly like one with the default image model picked. */+export function utilityOpModel(kind: RenderKind, op: RenderOp, pickedId: string): string {+ const utility = op === 'removebg' || op === 'eraser' || op === 'upscale'+ // Der Bild-Upscale darf auf einem Studio-Upscaler laufen (SeedVR2): das ist+ // seine eigene Wahl und kein Rest aus dem Bild-Tab.+ if (op === 'upscale' && STUDIO_IMAGE_UPSCALERS.includes(pickedId)) return pickedId+ return utility && kind === 'image' && STUDIO_MODELS[pickedId] ? (defaultCloudModel('image')?.id ?? pickedId) : pickedId+}+/** The model a run will really use for this op — coerces a leftover/incapable* pick onto a capable one (edit→i2i, animate→i2v, video→t2v) so submit + the* credits gate agree. Mirrors each picker's per-op filter. */export function modelForOp(kind: RenderKind, op: RenderOp, pickedId: string): string {if (op === 'edit') return isEditCapable(pickedId) ? pickedId : (defaultEditModel()?.id ?? pickedId)if (kind === 'video' && (op === 'generate' || op === 'animate')) {- const list = op === 'animate' ? i2vModels() : t2vModels()- return list.some((m) => m.id === pickedId) ? pickedId : (list[0]?.id ?? pickedId)+ const list = op === 'animate' ? animatePickerModels() : videoPickerModels()+ if (list.some((m) => m.id === pickedId)) return pickedId+ const standard = op === 'animate' ? DEFAULT_MODEL_IDS.animate : DEFAULT_MODEL_IDS.video+ return list.some((m) => m.id === standard) ? standard : (list[0]?.id ?? pickedId)+ }+ // Text zu Bild: ein Editor oder Upscaler aus einem anderen Tab darf nicht in+ // einen Lauf ohne Bild geraten (er bricht dort nach dem Absenden ab). Ein+ // Modell, das der Katalog nicht (mehr) kennt, faellt auf den Standard.+ if (kind === 'image' && op === 'generate' && !runsTextToImage(pickedId)) {+ return defaultCloudModel('image')?.id ?? pickedId}// 2.5.8 op-specialized intents: coerce a stale pick onto a model that// actually serves the op (same rule the pickers apply).@@ -180,7 +263,7 @@ export function modelForOp(kind: RenderKind, op: RenderOp, pickedId: string): stconst list = modelsForOp(kind, op)return list.some((m) => m.id === pickedId) ? pickedId : (list[0]?.id ?? pickedId)}- return pickedId+ return utilityOpModel(kind, op, pickedId)}/** Credits the upcoming run draws, priced from the server catalog: per-opdiff --git a/src/stores/createStore.ts b/src/stores/createStore.tsindex f7086c5b..fead4338 100644--- a/src/stores/createStore.ts+++ b/src/stores/createStore.ts@@ -780,7 +780,13 @@ export const useCreateStore = create<CreateState>()(// ── redesign additions ──intent: () => deriveIntent(get()),- setIntent: (intent) => set((s) => {+ // Eine andere Unterkategorie wirft die Studio-Optionen weg (wie ein+ // Modellwechsel): Image, Edit, Video und Animate fuehren seit 02.10.2026+ // Studio-Modelle, und ein Feld wie `resolution` hat je Endpunkt eine andere+ // Auswahl. Ein uebriggebliebener Wert wuerde das Absenden abweisen.+ setIntent: (intent) => {+ const changed = get().intent() !== intent+ set((s) => {// Clear intent-incompatible inputs: intents without a source drop both;// removebg/animate keep the source but drop a stale mask. Video/animate// mirror setMode's reset so image resolution never leaks into video.@@ -847,7 +853,9 @@ export const useCreateStore = create<CreateState>()(width: d.width, height: d.height, ...(d.frames ? { frames: d.frames } : {}), ...(d.fps ? { fps: d.fps } : {}) }}}- }),+ })+ if (changed) set({ cloudStudioOptions: {} })+ },toggleNegative: () => set((s) => ({ showNegative: !s.showNegative })),toggleLora: (name) => set((s) => ({ selectedLoras: s.selectedLoras.some((l) => l.name === name) ? s.selectedLoras.filter((l) => l.name !== name) : [...s.selectedLoras, { name, strength: 0.8 }] })),setLoraStrengthFor: (name, strength) => set((s) => ({ selectedLoras: s.selectedLoras.map((l) => l.name === name ? { ...l, strength: Math.max(0, Math.min(2, strength)) } : l) })),@@ -980,8 +988,11 @@ export const useCreateStore = create<CreateState>()(}return patch}),- setCloudImageModel: (cloudImageModel) => set({ cloudImageModel }),- setCloudVideoModel: (cloudVideoModel) => set({ cloudVideoModel }),+ // Wie setCloudOpModel: ein anderer Endpunkt, andere erlaubte Felder. Dieselbe+ // Wahl noch einmal zu setzen (der Waehler tut das nach jedem Lauf) behaelt+ // die Optionen.+ setCloudImageModel: (cloudImageModel) => set((s) => s.cloudImageModel === cloudImageModel ? {} : { cloudImageModel, cloudStudioOptions: {} }),+ setCloudVideoModel: (cloudVideoModel) => set((s) => s.cloudVideoModel === cloudVideoModel ? {} : { cloudVideoModel, cloudStudioOptions: {} }),setCaps: (caps) => set({ caps }),resetParamsToModelDefaults: () => {const s = get()