@nodaro/shared 3.54.1 → 3.56.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{chunk-3CHOZ573.js → chunk-2AR3OXAA.js} +276 -17
- package/dist/chunk-2AR3OXAA.js.map +1 -0
- package/dist/{chunk-ZKHQSG76.js → chunk-2J6NTA5I.js} +4 -4
- package/dist/{chunk-ZKHQSG76.js.map → chunk-2J6NTA5I.js.map} +1 -1
- package/dist/{chunk-AGTCHDG5.cjs → chunk-33P5FI2U.cjs} +6 -6
- package/dist/{chunk-AGTCHDG5.cjs.map → chunk-33P5FI2U.cjs.map} +1 -1
- package/dist/{chunk-HG3KKCJJ.js → chunk-4JODLC2N.js} +3 -3
- package/dist/{chunk-HG3KKCJJ.js.map → chunk-4JODLC2N.js.map} +1 -1
- package/dist/{chunk-N3WL6IOJ.js → chunk-4O5STV7N.js} +55 -5
- package/dist/chunk-4O5STV7N.js.map +1 -0
- package/dist/chunk-4ONS6QRT.js +42 -0
- package/dist/chunk-4ONS6QRT.js.map +1 -0
- package/dist/{chunk-E4YES25K.js → chunk-55FQBILM.js} +4 -4
- package/dist/{chunk-E4YES25K.js.map → chunk-55FQBILM.js.map} +1 -1
- package/dist/{chunk-ZWB3NG4M.js → chunk-62ZQQA7L.js} +3 -3
- package/dist/{chunk-ZWB3NG4M.js.map → chunk-62ZQQA7L.js.map} +1 -1
- package/dist/{chunk-HEF4BIMA.js → chunk-6GGHM33Z.js} +4 -4
- package/dist/{chunk-HEF4BIMA.js.map → chunk-6GGHM33Z.js.map} +1 -1
- package/dist/{chunk-KMSEU6FK.js → chunk-7DGJDISO.js} +3 -3
- package/dist/{chunk-KMSEU6FK.js.map → chunk-7DGJDISO.js.map} +1 -1
- package/dist/{chunk-2OYV6K7D.cjs → chunk-7JM5EZF3.cjs} +13 -13
- package/dist/{chunk-2OYV6K7D.cjs.map → chunk-7JM5EZF3.cjs.map} +1 -1
- package/dist/{chunk-QP5JLSCJ.cjs → chunk-AFQFGZN7.cjs} +30 -3
- package/dist/chunk-AFQFGZN7.cjs.map +1 -0
- package/dist/chunk-AKDJKMAL.cjs +48 -0
- package/dist/chunk-AKDJKMAL.cjs.map +1 -0
- package/dist/{chunk-HZL7QMXK.js → chunk-AWS4BWEC.js} +7 -3
- package/dist/chunk-AWS4BWEC.js.map +1 -0
- package/dist/{chunk-5DVDHL7Y.js → chunk-AZDVL7IM.js} +20 -6
- package/dist/chunk-AZDVL7IM.js.map +1 -0
- package/dist/{chunk-2R74OU76.cjs → chunk-CGZLENU4.cjs} +276 -16
- package/dist/chunk-CGZLENU4.cjs.map +1 -0
- package/dist/{chunk-G7IUQKRU.cjs → chunk-CLKU3ZIU.cjs} +51 -51
- package/dist/{chunk-G7IUQKRU.cjs.map → chunk-CLKU3ZIU.cjs.map} +1 -1
- package/dist/{chunk-MCIBQ5BF.js → chunk-DURFRWAW.js} +9 -9
- package/dist/{chunk-MCIBQ5BF.js.map → chunk-DURFRWAW.js.map} +1 -1
- package/dist/{chunk-C5S75476.js → chunk-EAKO7PGC.js} +8 -4
- package/dist/{chunk-C5S75476.js.map → chunk-EAKO7PGC.js.map} +1 -1
- package/dist/{chunk-IPCWYKX5.cjs → chunk-EWARI452.cjs} +60 -46
- package/dist/chunk-EWARI452.cjs.map +1 -0
- package/dist/{chunk-C6IQCKJT.cjs → chunk-FCQYMPUQ.cjs} +4 -4
- package/dist/{chunk-C6IQCKJT.cjs.map → chunk-FCQYMPUQ.cjs.map} +1 -1
- package/dist/{chunk-CZCOL3M5.js → chunk-G4XWVWRI.js} +25 -4
- package/dist/chunk-G4XWVWRI.js.map +1 -0
- package/dist/{chunk-WVACGZYV.cjs → chunk-H7VMJBNZ.cjs} +8 -8
- package/dist/{chunk-WVACGZYV.cjs.map → chunk-H7VMJBNZ.cjs.map} +1 -1
- package/dist/{chunk-SEEQ3H22.cjs → chunk-HWJE4FNS.cjs} +59 -6
- package/dist/chunk-HWJE4FNS.cjs.map +1 -0
- package/dist/{chunk-3633VD2M.cjs → chunk-IKP4GOWZ.cjs} +8 -8
- package/dist/{chunk-3633VD2M.cjs.map → chunk-IKP4GOWZ.cjs.map} +1 -1
- package/dist/{chunk-5R6LTKE5.cjs → chunk-ILMHITHK.cjs} +5 -5
- package/dist/{chunk-5R6LTKE5.cjs.map → chunk-ILMHITHK.cjs.map} +1 -1
- package/dist/chunk-IOET54EV.js +39 -0
- package/dist/chunk-IOET54EV.js.map +1 -0
- package/dist/{chunk-ZAK276QF.js → chunk-JHTYULY2.js} +4 -4
- package/dist/{chunk-ZAK276QF.js.map → chunk-JHTYULY2.js.map} +1 -1
- package/dist/{chunk-OVIIJVXH.cjs → chunk-JO3XSUO2.cjs} +21 -21
- package/dist/{chunk-OVIIJVXH.cjs.map → chunk-JO3XSUO2.cjs.map} +1 -1
- package/dist/{chunk-UWMXMLMV.js → chunk-MROKQP4U.js} +3 -3
- package/dist/{chunk-UWMXMLMV.js.map → chunk-MROKQP4U.js.map} +1 -1
- package/dist/{chunk-J4CVGAAV.cjs → chunk-NZRG5CXQ.cjs} +7 -2
- package/dist/chunk-NZRG5CXQ.cjs.map +1 -0
- package/dist/{chunk-KM35K2M5.cjs → chunk-O7DXNX5J.cjs} +92 -25
- package/dist/chunk-O7DXNX5J.cjs.map +1 -0
- package/dist/chunk-OWNPYQSH.cjs +283 -0
- package/dist/chunk-OWNPYQSH.cjs.map +1 -0
- package/dist/{chunk-FIYVKW7F.cjs → chunk-PFXPAWPQ.cjs} +12 -12
- package/dist/{chunk-FIYVKW7F.cjs.map → chunk-PFXPAWPQ.cjs.map} +1 -1
- package/dist/chunk-QSWUSXRL.cjs +53 -0
- package/dist/chunk-QSWUSXRL.cjs.map +1 -0
- package/dist/{chunk-MGJR5OXO.js → chunk-RX7WII6I.js} +5 -5
- package/dist/{chunk-MGJR5OXO.js.map → chunk-RX7WII6I.js.map} +1 -1
- package/dist/chunk-S7FCFQ6X.js +255 -0
- package/dist/chunk-S7FCFQ6X.js.map +1 -0
- package/dist/{chunk-YBZQXZ6A.js → chunk-ST4WQ6ND.js} +68 -8
- package/dist/chunk-ST4WQ6ND.js.map +1 -0
- package/dist/{chunk-LKCPFD5X.js → chunk-SWVGHAYO.js} +5 -3
- package/dist/chunk-SWVGHAYO.js.map +1 -0
- package/dist/{chunk-MTUNORQB.cjs → chunk-TSKYEREJ.cjs} +11 -11
- package/dist/{chunk-MTUNORQB.cjs.map → chunk-TSKYEREJ.cjs.map} +1 -1
- package/dist/{chunk-LYWJAXPT.js → chunk-UMPZR56R.js} +3 -3
- package/dist/{chunk-LYWJAXPT.js.map → chunk-UMPZR56R.js.map} +1 -1
- package/dist/{chunk-6HUWQLF2.cjs → chunk-WKCFTWLO.cjs} +6 -6
- package/dist/{chunk-6HUWQLF2.cjs.map → chunk-WKCFTWLO.cjs.map} +1 -1
- package/dist/chunk-XPUGMYAJ.cjs +27 -0
- package/dist/{chunk-HD45Y7QU.cjs.map → chunk-XPUGMYAJ.cjs.map} +1 -1
- package/dist/{chunk-G5NTNQ7W.cjs → chunk-XROE3CAS.cjs} +5 -3
- package/dist/chunk-XROE3CAS.cjs.map +1 -0
- package/dist/{chunk-SZUDEFX2.cjs → chunk-ZXDH3L3P.cjs} +43 -39
- package/dist/{chunk-SZUDEFX2.cjs.map → chunk-ZXDH3L3P.cjs.map} +1 -1
- package/dist/{chunk-25KAGSPT.js → chunk-ZYITB47P.js} +3 -3
- package/dist/{chunk-25KAGSPT.js.map → chunk-ZYITB47P.js.map} +1 -1
- package/dist/entries/apps.cjs +43 -42
- package/dist/entries/apps.js +8 -7
- package/dist/entries/credits.cjs +151 -150
- package/dist/entries/credits.d.cts +4 -1
- package/dist/entries/credits.d.ts +4 -1
- package/dist/entries/credits.js +8 -7
- package/dist/entries/entities.cjs +125 -125
- package/dist/entries/entities.d.cts +1 -1
- package/dist/entries/entities.d.ts +1 -1
- package/dist/entries/entities.js +1 -1
- package/dist/entries/llm-models.d.cts +1 -1
- package/dist/entries/llm-models.d.ts +1 -1
- package/dist/entries/media.cjs +80 -56
- package/dist/entries/media.d.cts +49 -3
- package/dist/entries/media.d.ts +49 -3
- package/dist/entries/media.js +1 -1
- package/dist/entries/model-catalog.cjs +127 -66
- package/dist/entries/model-catalog.d.cts +61 -9
- package/dist/entries/model-catalog.d.ts +61 -9
- package/dist/entries/model-catalog.js +5 -4
- package/dist/entries/models.cjs +304 -276
- package/dist/entries/models.d.cts +3 -3
- package/dist/entries/models.d.ts +3 -3
- package/dist/entries/models.js +4 -4
- package/dist/entries/nodes.cjs +208 -207
- package/dist/entries/nodes.d.cts +1 -1
- package/dist/entries/nodes.d.ts +1 -1
- package/dist/entries/nodes.js +10 -9
- package/dist/entries/organizations.d.cts +9 -1
- package/dist/entries/organizations.d.ts +9 -1
- package/dist/entries/pipeline.cjs +161 -149
- package/dist/entries/pipeline.d.cts +165 -26
- package/dist/entries/pipeline.d.ts +165 -26
- package/dist/entries/pipeline.js +3 -3
- package/dist/entries/runtime-config.cjs +116 -0
- package/dist/entries/runtime-config.cjs.map +1 -0
- package/dist/entries/runtime-config.d.cts +308 -0
- package/dist/entries/runtime-config.d.ts +308 -0
- package/dist/entries/runtime-config.js +3 -0
- package/dist/entries/runtime-config.js.map +1 -0
- package/dist/entries/ugc.cjs +71 -71
- package/dist/entries/ugc.js +4 -4
- package/dist/entries/video.cjs +117 -117
- package/dist/entries/video.js +4 -4
- package/dist/entries/workflow.cjs +150 -146
- package/dist/entries/workflow.d.cts +8 -1
- package/dist/entries/workflow.d.ts +8 -1
- package/dist/entries/workflow.js +2 -2
- package/dist/index.cjs +3169 -2931
- package/dist/index.d.cts +7 -6
- package/dist/index.d.ts +7 -6
- package/dist/index.js +24 -22
- package/dist/{model-catalog-Dm2UiwUe.d.ts → model-catalog-vQ3NWn24.d.cts} +33 -2
- package/dist/{model-catalog-Dm2UiwUe.d.cts → model-catalog-vQ3NWn24.d.ts} +33 -2
- package/dist/{model-constants-DZUGVDOw.d.ts → model-constants-QZVHZX25.d.cts} +35 -6
- package/dist/{model-constants-DZUGVDOw.d.cts → model-constants-QZVHZX25.d.ts} +35 -6
- package/package.json +6 -1
- package/src/__tests__/fixtures/root-exports.baseline.json +2 -0
- package/src/__tests__/gpt-image-2-6.test.ts +277 -0
- package/src/__tests__/image-model-roles.test.ts +28 -9
- package/src/__tests__/runtime-config.test.ts +398 -0
- package/src/__tests__/video-face-mesh.test.ts +45 -2
- package/src/__tests__/voice-library-values.test.ts +24 -0
- package/src/credit-identifiers.ts +42 -0
- package/src/entries/model-catalog.ts +17 -0
- package/src/entries/models.ts +9 -0
- package/src/entries/runtime-config.ts +51 -0
- package/src/entries/workflow.ts +1 -1
- package/src/gpt-image-2-6.ts +104 -0
- package/src/i18n/style.ko.ts +2 -2
- package/src/i18n/style.pt-BR.ts +14 -14
- package/src/image-model-roles.ts +31 -10
- package/src/index.ts +1 -0
- package/src/model-catalog.ts +302 -14
- package/src/model-constants.ts +84 -3
- package/src/node-default-mappings.ts +4 -0
- package/src/node-refs.ts +11 -0
- package/src/organizations/views.ts +9 -1
- package/src/pipeline-types.ts +2 -0
- package/src/reference-board-templates.ts +2 -0
- package/src/runtime-config/contract.ts +492 -0
- package/src/runtime-config/worlds.ts +77 -0
- package/src/video-face-mesh.ts +72 -4
- package/src/voices.ts +175 -2
- package/dist/chunk-2R74OU76.cjs.map +0 -1
- package/dist/chunk-3CHOZ573.js.map +0 -1
- package/dist/chunk-5DVDHL7Y.js.map +0 -1
- package/dist/chunk-ATWLKUAI.cjs +0 -34
- package/dist/chunk-ATWLKUAI.cjs.map +0 -1
- package/dist/chunk-CZCOL3M5.js.map +0 -1
- package/dist/chunk-DUL5ZLTJ.js +0 -29
- package/dist/chunk-DUL5ZLTJ.js.map +0 -1
- package/dist/chunk-G5NTNQ7W.cjs.map +0 -1
- package/dist/chunk-HD45Y7QU.cjs +0 -27
- package/dist/chunk-HZL7QMXK.js.map +0 -1
- package/dist/chunk-IPCWYKX5.cjs.map +0 -1
- package/dist/chunk-J4CVGAAV.cjs.map +0 -1
- package/dist/chunk-KM35K2M5.cjs.map +0 -1
- package/dist/chunk-LKCPFD5X.js.map +0 -1
- package/dist/chunk-N3WL6IOJ.js.map +0 -1
- package/dist/chunk-QP5JLSCJ.cjs.map +0 -1
- package/dist/chunk-SEEQ3H22.cjs.map +0 -1
- package/dist/chunk-YBZQXZ6A.js.map +0 -1
package/src/model-catalog.ts
CHANGED
|
@@ -335,6 +335,26 @@ export interface ModelCatalogEntry {
|
|
|
335
335
|
*/
|
|
336
336
|
unlistedResolutionRendersAs?: string
|
|
337
337
|
qualities?: readonly string[]
|
|
338
|
+
/**
|
|
339
|
+
* The quality a run renders at when none is named, where that is not the
|
|
340
|
+
* first listed. A value the model does not take snaps to it, as does a panel.
|
|
341
|
+
*/
|
|
342
|
+
defaultQuality?: string
|
|
343
|
+
/**
|
|
344
|
+
* The image background settings this model takes (`auto`, `opaque`,
|
|
345
|
+
* `transparent`). Absent: no such setting, and a value sent is dropped.
|
|
346
|
+
*/
|
|
347
|
+
backgrounds?: readonly string[]
|
|
348
|
+
/**
|
|
349
|
+
* The one resolution a transparent background renders at, where the provider
|
|
350
|
+
* limits it. `normalizeModelInput` moves the size there and says so.
|
|
351
|
+
*/
|
|
352
|
+
transparentResolution?: string
|
|
353
|
+
/**
|
|
354
|
+
* The provider takes the background setting, whatever its value, only at
|
|
355
|
+
* `transparentResolution`. Above it nothing is sent.
|
|
356
|
+
*/
|
|
357
|
+
backgroundOnlyAtTransparentResolution?: true
|
|
338
358
|
durations?: readonly number[]
|
|
339
359
|
/**
|
|
340
360
|
* The length (seconds) this model renders when the request names no duration
|
|
@@ -381,6 +401,13 @@ export interface ModelCatalogEntry {
|
|
|
381
401
|
* Frontend pickers ignore this flag.
|
|
382
402
|
*/
|
|
383
403
|
mcpHidden?: boolean
|
|
404
|
+
/**
|
|
405
|
+
* Left out of the public docs' model tables and the model lists in the MCP
|
|
406
|
+
* tool descriptions, while a provider can't serve this model. Not an
|
|
407
|
+
* availability switch: what hides a model from every menu and refuses a run
|
|
408
|
+
* is the admin's `model_pricing.is_enabled` (backend lib/model-switch.ts).
|
|
409
|
+
*/
|
|
410
|
+
docsHidden?: boolean
|
|
384
411
|
/**
|
|
385
412
|
* The provider's safety filter is known to be non-deterministic on this
|
|
386
413
|
* model — the platform retries a blocked request once; `fallback` names
|
|
@@ -407,14 +434,14 @@ export interface ModelRecommendation {
|
|
|
407
434
|
|
|
408
435
|
export const MODEL_RECOMMENDATIONS: readonly ModelRecommendation[] = [
|
|
409
436
|
// image
|
|
410
|
-
{ intent: "best for typography / logos / text-heavy", modelIds: ["gpt-image-2", "gpt-image-2-
|
|
437
|
+
{ intent: "best for typography / logos / text-heavy", modelIds: ["gpt-image-2", "gpt-image-2-6-flare"], note: "GPT Image 2 for exact copy, labels and non-Latin text; GPT Image 2.6 Flare for posters and layouts, and faster." },
|
|
411
438
|
// Notes name the RANKING, not the price — the price sits in the generated
|
|
412
439
|
// table directly below them and in `pricing`, so restating it here just
|
|
413
440
|
// creates a copy that rots (this one said "1 credit" long after it was 2).
|
|
414
441
|
{ intent: "cheapest realistic image", modelIds: ["z-image", "qwen", "imagen4-fast"], note: "Z-Image is the cheapest. Qwen / Imagen4 Fast for slightly higher quality." },
|
|
415
|
-
{ intent: "highest fidelity image", modelIds: ["gpt-image-2", "gpt-image-2-
|
|
416
|
-
{ intent: "image edit / restyle", modelIds: ["gpt-image-2-
|
|
417
|
-
{ intent: "highest-resolution image", modelIds: ["topaz-image-upscale", "gpt-image-2", "gpt-image-2-
|
|
442
|
+
{ intent: "highest fidelity image", modelIds: ["gpt-image-2", "gpt-image-2-6-sunburst", "imagen4-ultra"], note: "GPT Image 2 for characters and identity; GPT Image 2.6 Sunburst for wide or in-between ratios GPT Image 2 can't draw." },
|
|
443
|
+
{ intent: "image edit / restyle", modelIds: ["gpt-image-2-6-flare-i2i", "gpt-image-2-i2i", "seedream-5-pro-i2i"], note: "GPT Image 2.6 Flare changes what you ask and keeps the rest; GPT Image 2 i2i for identity-critical edits; Seedream 5 Pro for instruction-based edits." },
|
|
444
|
+
{ intent: "highest-resolution image", modelIds: ["topaz-image-upscale", "gpt-image-2", "gpt-image-2-6-sunburst"], note: "Generate at the model's top tier, then Topaz upscale 4x (Topaz's only lever is the 1x/2x/4x factor)." },
|
|
418
445
|
{ intent: "background removal / cutout", modelIds: ["recraft-remove-bg"], note: "Cheap, no prompt needed." },
|
|
419
446
|
// video
|
|
420
447
|
{ intent: "best cinematic video", modelIds: ["veo3", "kling-3.0", "seedance-2"], note: "VEO 3.1 Quality for premium narrative; Kling 3.0 for music-synced motion; Seedance 2 for reference-driven consistency." },
|
|
@@ -459,6 +486,24 @@ const GPT_IMAGE_2_5_RATIOS = [
|
|
|
459
486
|
"auto", "1:1", "3:2", "2:3", "4:3", "3:4", "16:9", "9:16",
|
|
460
487
|
"21:9", "27:16", "16:27", "9:8", "8:9",
|
|
461
488
|
] as const
|
|
489
|
+
// GPT Image 2.6 Flare and Sunburst: auto plus fifteen ratios, Economy a shorter
|
|
490
|
+
// list of its own (docs.kie.ai/market/gpt/gpt-image-2-6-*).
|
|
491
|
+
const GPT_IMAGE_2_6_RATIOS = [
|
|
492
|
+
"auto", "1:1", "3:2", "2:3", "4:3", "3:4", "5:4", "4:5", "16:9", "9:16",
|
|
493
|
+
"2:1", "1:2", "21:9", "9:21", "3:1", "1:3",
|
|
494
|
+
] as const
|
|
495
|
+
const GPT_IMAGE_2_6_ECONOMY_RATIOS = ["auto", "1:1", "16:9", "9:16", "3:2", "2:3", "21:9", "4:3"] as const
|
|
496
|
+
const GPT_IMAGE_2_6_VALUE_LABELS = {
|
|
497
|
+
"3:2": "3:2 (Landscape)", "2:3": "2:3 (Portrait)",
|
|
498
|
+
"5:4": "5:4 (Near-square)", "4:5": "4:5 (Near-square)",
|
|
499
|
+
"2:1": "2:1 (Wide)", "1:2": "1:2 (Vertical)",
|
|
500
|
+
"9:21": "9:21 (Ultra-tall)", "3:1": "3:1 (Banner)", "1:3": "1:3 (Vertical banner)",
|
|
501
|
+
// Auto takes the shared label; it is an aspect ratio on these models too.
|
|
502
|
+
"low": "Low", "medium": "Medium", "high": "High", "xhigh": "Extra High", "max": "Max",
|
|
503
|
+
} as const
|
|
504
|
+
// The GPT Image background setting. KIE renders a transparent one at 1K only
|
|
505
|
+
// (`transparentResolution`), which normalizeModelInput enforces.
|
|
506
|
+
const GPT_IMAGE_BACKGROUNDS = ["auto", "opaque", "transparent"] as const
|
|
462
507
|
const IMAGEN4_RATIOS = ["1:1", "16:9", "9:16", "4:3", "3:4"] as const
|
|
463
508
|
const IDEOGRAM_RATIOS = ["1:1", "16:9", "9:16", "4:3", "3:4"] as const
|
|
464
509
|
const SEEDREAM_RATIOS = ["1:1", "16:9", "9:16", "4:3", "3:4", "3:2", "2:3", "21:9"] as const
|
|
@@ -718,8 +763,8 @@ const IMAGE_MODELS: Record<string, ModelCatalogEntry> = {
|
|
|
718
763
|
maker: "black-forest-labs",
|
|
719
764
|
label: "Flux 2 Klein (Open)",
|
|
720
765
|
series: "Flux",
|
|
721
|
-
description: "Open Flux 2 9B from BFL — fast
|
|
722
|
-
useCases: ["realistic", "fast"
|
|
766
|
+
description: "Open Flux 2 9B from BFL — fast. Runs direct on Replicate.",
|
|
767
|
+
useCases: ["realistic", "fast"],
|
|
723
768
|
features: ["reference-image"],
|
|
724
769
|
aspectRatios: FLUX_RATIOS,
|
|
725
770
|
resolutions: ["0.5 MP", "1 MP", "2 MP", "4 MP"],
|
|
@@ -737,8 +782,8 @@ const IMAGE_MODELS: Record<string, ModelCatalogEntry> = {
|
|
|
737
782
|
maker: "black-forest-labs",
|
|
738
783
|
label: "Kontext Multi (Open)",
|
|
739
784
|
series: "Flux",
|
|
740
|
-
description: "Multi-image Flux Kontext Pro via Replicate — up to 4 input images
|
|
741
|
-
useCases: ["edit", "multi-reference"
|
|
785
|
+
description: "Multi-image Flux Kontext Pro via Replicate — up to 4 input images.",
|
|
786
|
+
useCases: ["edit", "multi-reference"],
|
|
742
787
|
features: ["reference-image"],
|
|
743
788
|
aspectRatios: KONTEXT_RATIOS,
|
|
744
789
|
pricing: [{ identifier: "kontext-multi", credits: 30 }],
|
|
@@ -751,8 +796,8 @@ const IMAGE_MODELS: Record<string, ModelCatalogEntry> = {
|
|
|
751
796
|
maker: "black-forest-labs",
|
|
752
797
|
label: "Flux 2 Pro (Safety Tolerance)",
|
|
753
798
|
series: "Flux",
|
|
754
|
-
description: "BFL Flux 2 Pro flagship via Replicate
|
|
755
|
-
useCases: ["realistic", "high-quality", "
|
|
799
|
+
description: "BFL Flux 2 Pro flagship via Replicate. Accepts up to 4 reference images.",
|
|
800
|
+
useCases: ["realistic", "high-quality", "reference"],
|
|
756
801
|
features: ["reference-image"],
|
|
757
802
|
aspectRatios: FLUX_RATIOS,
|
|
758
803
|
resolutions: ["0.5 MP", "1 MP", "2 MP", "4 MP"],
|
|
@@ -770,8 +815,8 @@ const IMAGE_MODELS: Record<string, ModelCatalogEntry> = {
|
|
|
770
815
|
maker: "black-forest-labs",
|
|
771
816
|
label: "Flux 2 Max (Safety Tolerance)",
|
|
772
817
|
series: "Flux",
|
|
773
|
-
description: "BFL Flux 2 Max — even larger sibling of Pro via Replicate,
|
|
774
|
-
useCases: ["realistic", "high-quality", "
|
|
818
|
+
description: "BFL Flux 2 Max — even larger sibling of Pro via Replicate, up to 8 reference images. Variable pricing by MP and ref count.",
|
|
819
|
+
useCases: ["realistic", "high-quality", "multi-reference"],
|
|
775
820
|
features: ["reference-image"],
|
|
776
821
|
aspectRatios: FLUX_RATIOS,
|
|
777
822
|
resolutions: ["0.5 MP", "1 MP", "2 MP", "4 MP"],
|
|
@@ -878,6 +923,9 @@ const IMAGE_MODELS: Record<string, ModelCatalogEntry> = {
|
|
|
878
923
|
features: ["reference-image"],
|
|
879
924
|
aspectRatios: GPT_IMAGE_2_5_RATIOS,
|
|
880
925
|
resolutions: ["1K", "2K", "4K"],
|
|
926
|
+
backgrounds: GPT_IMAGE_BACKGROUNDS,
|
|
927
|
+
transparentResolution: "1K",
|
|
928
|
+
backgroundOnlyAtTransparentResolution: true,
|
|
881
929
|
pricing: [
|
|
882
930
|
{ identifier: "gpt-image-2-5-flare", credits: 15, note: "1K default" },
|
|
883
931
|
{ identifier: "gpt-image-2-5-flare:2K", credits: 25, note: "2K" },
|
|
@@ -903,6 +951,9 @@ const IMAGE_MODELS: Record<string, ModelCatalogEntry> = {
|
|
|
903
951
|
features: ["reference-image"],
|
|
904
952
|
aspectRatios: GPT_IMAGE_2_5_RATIOS,
|
|
905
953
|
resolutions: ["1K", "2K", "4K"],
|
|
954
|
+
backgrounds: GPT_IMAGE_BACKGROUNDS,
|
|
955
|
+
transparentResolution: "1K",
|
|
956
|
+
backgroundOnlyAtTransparentResolution: true,
|
|
906
957
|
pricing: [
|
|
907
958
|
{ identifier: "gpt-image-2-5-flare-i2i", credits: 15, note: "1K default" },
|
|
908
959
|
{ identifier: "gpt-image-2-5-flare-i2i:2K", credits: 25, note: "2K" },
|
|
@@ -928,6 +979,9 @@ const IMAGE_MODELS: Record<string, ModelCatalogEntry> = {
|
|
|
928
979
|
features: ["reference-image"],
|
|
929
980
|
aspectRatios: GPT_IMAGE_2_5_RATIOS,
|
|
930
981
|
resolutions: ["1K", "2K", "4K"],
|
|
982
|
+
backgrounds: GPT_IMAGE_BACKGROUNDS,
|
|
983
|
+
transparentResolution: "1K",
|
|
984
|
+
backgroundOnlyAtTransparentResolution: true,
|
|
931
985
|
pricing: [
|
|
932
986
|
{ identifier: "gpt-image-2-5-sunburst", credits: 15, note: "1K default" },
|
|
933
987
|
{ identifier: "gpt-image-2-5-sunburst:2K", credits: 25, note: "2K" },
|
|
@@ -953,6 +1007,9 @@ const IMAGE_MODELS: Record<string, ModelCatalogEntry> = {
|
|
|
953
1007
|
features: ["reference-image"],
|
|
954
1008
|
aspectRatios: GPT_IMAGE_2_5_RATIOS,
|
|
955
1009
|
resolutions: ["1K", "2K", "4K"],
|
|
1010
|
+
backgrounds: GPT_IMAGE_BACKGROUNDS,
|
|
1011
|
+
transparentResolution: "1K",
|
|
1012
|
+
backgroundOnlyAtTransparentResolution: true,
|
|
956
1013
|
pricing: [
|
|
957
1014
|
{ identifier: "gpt-image-2-5-sunburst-i2i", credits: 15, note: "1K default" },
|
|
958
1015
|
{ identifier: "gpt-image-2-5-sunburst-i2i:2K", credits: 25, note: "2K" },
|
|
@@ -965,6 +1022,185 @@ const IMAGE_MODELS: Record<string, ModelCatalogEntry> = {
|
|
|
965
1022
|
},
|
|
966
1023
|
safetyFilter: { stochastic: true, fallback: "nano-banana-pro" },
|
|
967
1024
|
},
|
|
1025
|
+
"gpt-image-2-6-flare": {
|
|
1026
|
+
id: "gpt-image-2-6-flare",
|
|
1027
|
+
kind: "image",
|
|
1028
|
+
modes: ["t2i"] as const,
|
|
1029
|
+
family: "OpenAI",
|
|
1030
|
+
maker: "openai",
|
|
1031
|
+
label: "GPT Image 2.6 Flare",
|
|
1032
|
+
series: "GPT Image",
|
|
1033
|
+
description: "Fast GPT Image 2.6 - pick it for speed: posters, product shots and quick iteration, with stronger layouts. Up to 4K, quality from low to max or auto (priced up to the max), a transparent background at 1K.",
|
|
1034
|
+
useCases: ["typography", "high-res", "general", "draft"],
|
|
1035
|
+
features: ["reference-image"],
|
|
1036
|
+
aspectRatios: GPT_IMAGE_2_6_RATIOS,
|
|
1037
|
+
resolutions: ["1K", "2K", "4K"],
|
|
1038
|
+
qualities: ["auto", "low", "medium", "high", "xhigh", "max"],
|
|
1039
|
+
defaultQuality: "medium",
|
|
1040
|
+
backgrounds: GPT_IMAGE_BACKGROUNDS,
|
|
1041
|
+
transparentResolution: "1K",
|
|
1042
|
+
pricing: [
|
|
1043
|
+
{ identifier: "gpt-image-2-6-flare", credits: 20, note: "medium, 1K default" },
|
|
1044
|
+
{ identifier: "gpt-image-2-6-flare:low:1K", credits: 12, note: "low, 1K" },
|
|
1045
|
+
{ identifier: "gpt-image-2-6-flare:low:2K", credits: 23, note: "low, 2K" },
|
|
1046
|
+
{ identifier: "gpt-image-2-6-flare:low:4K", credits: 38, note: "low, 4K" },
|
|
1047
|
+
{ identifier: "gpt-image-2-6-flare:medium:1K", credits: 20, note: "medium, 1K" },
|
|
1048
|
+
{ identifier: "gpt-image-2-6-flare:medium:2K", credits: 40, note: "medium, 2K" },
|
|
1049
|
+
{ identifier: "gpt-image-2-6-flare:medium:4K", credits: 67, note: "medium, 4K" },
|
|
1050
|
+
{ identifier: "gpt-image-2-6-flare:high:1K", credits: 24, note: "high, 1K" },
|
|
1051
|
+
{ identifier: "gpt-image-2-6-flare:high:2K", credits: 49, note: "high, 2K" },
|
|
1052
|
+
{ identifier: "gpt-image-2-6-flare:high:4K", credits: 81, note: "high, 4K" },
|
|
1053
|
+
{ identifier: "gpt-image-2-6-flare:xhigh:1K", credits: 43, note: "extra high, 1K" },
|
|
1054
|
+
{ identifier: "gpt-image-2-6-flare:xhigh:2K", credits: 86, note: "extra high, 2K" },
|
|
1055
|
+
{ identifier: "gpt-image-2-6-flare:xhigh:4K", credits: 143, note: "extra high, 4K" },
|
|
1056
|
+
{ identifier: "gpt-image-2-6-flare:max:1K", credits: 96, note: "max, 1K" },
|
|
1057
|
+
{ identifier: "gpt-image-2-6-flare:max:2K", credits: 193, note: "max, 2K" },
|
|
1058
|
+
{ identifier: "gpt-image-2-6-flare:max:4K", credits: 321, note: "max, 4K" },
|
|
1059
|
+
{ identifier: "gpt-image-2-6-flare:auto:1K", credits: 96, note: "auto, 1K: the most it can cost, settled on what it really cost" },
|
|
1060
|
+
{ identifier: "gpt-image-2-6-flare:auto:2K", credits: 193, note: "auto, 2K: the most it can cost, settled on what it really cost" },
|
|
1061
|
+
{ identifier: "gpt-image-2-6-flare:auto:4K", credits: 321, note: "auto, 4K: the most it can cost, settled on what it really cost" },
|
|
1062
|
+
],
|
|
1063
|
+
valueLabels: GPT_IMAGE_2_6_VALUE_LABELS,
|
|
1064
|
+
safetyFilter: { stochastic: true, fallback: "nano-banana-pro" },
|
|
1065
|
+
},
|
|
1066
|
+
"gpt-image-2-6-flare-i2i": {
|
|
1067
|
+
id: "gpt-image-2-6-flare-i2i",
|
|
1068
|
+
kind: "image",
|
|
1069
|
+
modes: ["i2i"] as const,
|
|
1070
|
+
family: "OpenAI",
|
|
1071
|
+
maker: "openai",
|
|
1072
|
+
label: "GPT Image 2.6 Flare (I2I)",
|
|
1073
|
+
series: "GPT Image",
|
|
1074
|
+
description: "Fast GPT Image 2.6 edits - up to 16 input images, priced per image. Pick it while iterating.",
|
|
1075
|
+
useCases: ["edit", "high-res"],
|
|
1076
|
+
features: ["reference-image"],
|
|
1077
|
+
aspectRatios: GPT_IMAGE_2_6_RATIOS,
|
|
1078
|
+
resolutions: ["1K", "2K", "4K"],
|
|
1079
|
+
qualities: ["auto", "low", "medium", "high", "xhigh", "max"],
|
|
1080
|
+
defaultQuality: "medium",
|
|
1081
|
+
backgrounds: GPT_IMAGE_BACKGROUNDS,
|
|
1082
|
+
transparentResolution: "1K",
|
|
1083
|
+
pricing: [
|
|
1084
|
+
{ identifier: "gpt-image-2-6-flare-i2i", credits: 20, note: "medium, 1K default" },
|
|
1085
|
+
{ identifier: "gpt-image-2-6-flare-i2i:low:1K:1ref", credits: 17, note: "low, 1K, one input image (the least)" },
|
|
1086
|
+
{ identifier: "gpt-image-2-6-flare-i2i:medium:1K:1ref", credits: 26, note: "medium, 1K, one input image" },
|
|
1087
|
+
{ identifier: "gpt-image-2-6-flare-i2i:high:4K:16ref", credits: 169, note: "high, 4K, sixteen input images" },
|
|
1088
|
+
{ identifier: "gpt-image-2-6-flare-i2i:max:4K:16ref", credits: 409, note: "max, 4K, sixteen input images (the most)" },
|
|
1089
|
+
{ identifier: "gpt-image-2-6-flare-i2i:auto:1K:1ref", credits: 101, note: "auto, 1K, one input image: the most it can cost, settled on what it really cost" },
|
|
1090
|
+
],
|
|
1091
|
+
valueLabels: GPT_IMAGE_2_6_VALUE_LABELS,
|
|
1092
|
+
safetyFilter: { stochastic: true, fallback: "nano-banana-pro" },
|
|
1093
|
+
},
|
|
1094
|
+
"gpt-image-2-6-sunburst": {
|
|
1095
|
+
id: "gpt-image-2-6-sunburst",
|
|
1096
|
+
kind: "image",
|
|
1097
|
+
modes: ["t2i"] as const,
|
|
1098
|
+
family: "OpenAI",
|
|
1099
|
+
maker: "openai",
|
|
1100
|
+
label: "GPT Image 2.6 Sunburst",
|
|
1101
|
+
series: "GPT Image",
|
|
1102
|
+
description: "Precision GPT Image 2.6 - pick it when every detail counts: the strongest consistency across edits and the finest detail. Up to 4K, quality from low to max or auto (priced up to the max), a transparent background at 1K.",
|
|
1103
|
+
useCases: ["typography", "high-res", "general"],
|
|
1104
|
+
features: ["reference-image"],
|
|
1105
|
+
aspectRatios: GPT_IMAGE_2_6_RATIOS,
|
|
1106
|
+
resolutions: ["1K", "2K", "4K"],
|
|
1107
|
+
qualities: ["auto", "low", "medium", "high", "xhigh", "max"],
|
|
1108
|
+
defaultQuality: "medium",
|
|
1109
|
+
backgrounds: GPT_IMAGE_BACKGROUNDS,
|
|
1110
|
+
transparentResolution: "1K",
|
|
1111
|
+
pricing: [
|
|
1112
|
+
{ identifier: "gpt-image-2-6-sunburst", credits: 20, note: "medium, 1K default" },
|
|
1113
|
+
{ identifier: "gpt-image-2-6-sunburst:low:1K", credits: 12, note: "low, 1K" },
|
|
1114
|
+
{ identifier: "gpt-image-2-6-sunburst:low:2K", credits: 23, note: "low, 2K" },
|
|
1115
|
+
{ identifier: "gpt-image-2-6-sunburst:low:4K", credits: 38, note: "low, 4K" },
|
|
1116
|
+
{ identifier: "gpt-image-2-6-sunburst:medium:1K", credits: 20, note: "medium, 1K" },
|
|
1117
|
+
{ identifier: "gpt-image-2-6-sunburst:medium:2K", credits: 40, note: "medium, 2K" },
|
|
1118
|
+
{ identifier: "gpt-image-2-6-sunburst:medium:4K", credits: 67, note: "medium, 4K" },
|
|
1119
|
+
{ identifier: "gpt-image-2-6-sunburst:high:1K", credits: 24, note: "high, 1K" },
|
|
1120
|
+
{ identifier: "gpt-image-2-6-sunburst:high:2K", credits: 49, note: "high, 2K" },
|
|
1121
|
+
{ identifier: "gpt-image-2-6-sunburst:high:4K", credits: 81, note: "high, 4K" },
|
|
1122
|
+
{ identifier: "gpt-image-2-6-sunburst:xhigh:1K", credits: 43, note: "extra high, 1K" },
|
|
1123
|
+
{ identifier: "gpt-image-2-6-sunburst:xhigh:2K", credits: 86, note: "extra high, 2K" },
|
|
1124
|
+
{ identifier: "gpt-image-2-6-sunburst:xhigh:4K", credits: 143, note: "extra high, 4K" },
|
|
1125
|
+
{ identifier: "gpt-image-2-6-sunburst:max:1K", credits: 96, note: "max, 1K" },
|
|
1126
|
+
{ identifier: "gpt-image-2-6-sunburst:max:2K", credits: 193, note: "max, 2K" },
|
|
1127
|
+
{ identifier: "gpt-image-2-6-sunburst:max:4K", credits: 321, note: "max, 4K" },
|
|
1128
|
+
{ identifier: "gpt-image-2-6-sunburst:auto:1K", credits: 96, note: "auto, 1K: the most it can cost, settled on what it really cost" },
|
|
1129
|
+
{ identifier: "gpt-image-2-6-sunburst:auto:2K", credits: 193, note: "auto, 2K: the most it can cost, settled on what it really cost" },
|
|
1130
|
+
{ identifier: "gpt-image-2-6-sunburst:auto:4K", credits: 321, note: "auto, 4K: the most it can cost, settled on what it really cost" },
|
|
1131
|
+
],
|
|
1132
|
+
valueLabels: GPT_IMAGE_2_6_VALUE_LABELS,
|
|
1133
|
+
safetyFilter: { stochastic: true, fallback: "nano-banana-pro" },
|
|
1134
|
+
},
|
|
1135
|
+
"gpt-image-2-6-sunburst-i2i": {
|
|
1136
|
+
id: "gpt-image-2-6-sunburst-i2i",
|
|
1137
|
+
kind: "image",
|
|
1138
|
+
modes: ["i2i"] as const,
|
|
1139
|
+
family: "OpenAI",
|
|
1140
|
+
maker: "openai",
|
|
1141
|
+
label: "GPT Image 2.6 Sunburst (I2I)",
|
|
1142
|
+
series: "GPT Image",
|
|
1143
|
+
description: "Precision GPT Image 2.6 edits - up to 16 input images, priced per image. Pick it for finished, detail-critical edits.",
|
|
1144
|
+
useCases: ["edit", "high-res"],
|
|
1145
|
+
features: ["reference-image"],
|
|
1146
|
+
aspectRatios: GPT_IMAGE_2_6_RATIOS,
|
|
1147
|
+
resolutions: ["1K", "2K", "4K"],
|
|
1148
|
+
qualities: ["auto", "low", "medium", "high", "xhigh", "max"],
|
|
1149
|
+
defaultQuality: "medium",
|
|
1150
|
+
backgrounds: GPT_IMAGE_BACKGROUNDS,
|
|
1151
|
+
transparentResolution: "1K",
|
|
1152
|
+
pricing: [
|
|
1153
|
+
{ identifier: "gpt-image-2-6-sunburst-i2i", credits: 20, note: "medium, 1K default" },
|
|
1154
|
+
{ identifier: "gpt-image-2-6-sunburst-i2i:low:1K:1ref", credits: 17, note: "low, 1K, one input image (the least)" },
|
|
1155
|
+
{ identifier: "gpt-image-2-6-sunburst-i2i:medium:1K:1ref", credits: 26, note: "medium, 1K, one input image" },
|
|
1156
|
+
{ identifier: "gpt-image-2-6-sunburst-i2i:high:4K:16ref", credits: 169, note: "high, 4K, sixteen input images" },
|
|
1157
|
+
{ identifier: "gpt-image-2-6-sunburst-i2i:max:4K:16ref", credits: 409, note: "max, 4K, sixteen input images (the most)" },
|
|
1158
|
+
{ identifier: "gpt-image-2-6-sunburst-i2i:auto:1K:1ref", credits: 101, note: "auto, 1K, one input image: the most it can cost, settled on what it really cost" },
|
|
1159
|
+
],
|
|
1160
|
+
valueLabels: GPT_IMAGE_2_6_VALUE_LABELS,
|
|
1161
|
+
safetyFilter: { stochastic: true, fallback: "nano-banana-pro" },
|
|
1162
|
+
},
|
|
1163
|
+
// Economy is withheld since 2026-11-09: KIE answers every Economy request with
|
|
1164
|
+
// an internal error, on its own playground too. Migration 611 switched the two
|
|
1165
|
+
// ids off (`model_pricing.is_enabled`), which hides them from every menu and
|
|
1166
|
+
// refuses a run. Turning the two rows on at /admin/models brings them back;
|
|
1167
|
+
// `docsHidden` keeps them out of the docs until it is removed here.
|
|
1168
|
+
"gpt-image-2-6-economy": {
|
|
1169
|
+
id: "gpt-image-2-6-economy",
|
|
1170
|
+
kind: "image",
|
|
1171
|
+
modes: ["t2i"] as const,
|
|
1172
|
+
family: "OpenAI",
|
|
1173
|
+
maker: "openai",
|
|
1174
|
+
label: "GPT Image 2.6 Economy",
|
|
1175
|
+
docsHidden: true,
|
|
1176
|
+
series: "GPT Image",
|
|
1177
|
+
description: "The same GPT Image 2.6 at a flat low price, 1K only - pick it for volume.",
|
|
1178
|
+
useCases: ["general", "draft"],
|
|
1179
|
+
features: ["reference-image"],
|
|
1180
|
+
aspectRatios: GPT_IMAGE_2_6_ECONOMY_RATIOS,
|
|
1181
|
+
backgrounds: GPT_IMAGE_BACKGROUNDS,
|
|
1182
|
+
pricing: [{ identifier: "gpt-image-2-6-economy", credits: 13, note: "1K flat" }],
|
|
1183
|
+
valueLabels: GPT_IMAGE_2_6_VALUE_LABELS,
|
|
1184
|
+
safetyFilter: { stochastic: true, fallback: "nano-banana-pro" },
|
|
1185
|
+
},
|
|
1186
|
+
"gpt-image-2-6-economy-i2i": {
|
|
1187
|
+
id: "gpt-image-2-6-economy-i2i",
|
|
1188
|
+
kind: "image",
|
|
1189
|
+
modes: ["i2i"] as const,
|
|
1190
|
+
family: "OpenAI",
|
|
1191
|
+
maker: "openai",
|
|
1192
|
+
label: "GPT Image 2.6 Economy (I2I)",
|
|
1193
|
+
docsHidden: true,
|
|
1194
|
+
series: "GPT Image",
|
|
1195
|
+
description: "Flat-price GPT Image 2.6 edits, 1K only, up to 16 input images - pick it for volume.",
|
|
1196
|
+
useCases: ["edit", "draft"],
|
|
1197
|
+
features: ["reference-image"],
|
|
1198
|
+
aspectRatios: GPT_IMAGE_2_6_ECONOMY_RATIOS,
|
|
1199
|
+
backgrounds: GPT_IMAGE_BACKGROUNDS,
|
|
1200
|
+
pricing: [{ identifier: "gpt-image-2-6-economy-i2i", credits: 13, note: "1K flat" }],
|
|
1201
|
+
valueLabels: GPT_IMAGE_2_6_VALUE_LABELS,
|
|
1202
|
+
safetyFilter: { stochastic: true, fallback: "nano-banana-pro" },
|
|
1203
|
+
},
|
|
968
1204
|
|
|
969
1205
|
// ── Ideogram ──
|
|
970
1206
|
// Ideogram models use a `rendering_speed` (TURBO / BALANCED / QUALITY)
|
|
@@ -3704,7 +3940,7 @@ function sameOptionValue(a: string | number, b: string | number): boolean {
|
|
|
3704
3940
|
|
|
3705
3941
|
/** One correction `normalizeModelInput` made, for disclosure to the user. */
|
|
3706
3942
|
export interface ModelInputAdjustment {
|
|
3707
|
-
field: "aspectRatio" | "resolution" | "quality" | "duration"
|
|
3943
|
+
field: "aspectRatio" | "resolution" | "quality" | "duration" | "background"
|
|
3708
3944
|
/** The value that was asked for. */
|
|
3709
3945
|
from: string | number
|
|
3710
3946
|
/** What it became — `undefined` means the lever was dropped entirely. */
|
|
@@ -3717,6 +3953,7 @@ export interface NormalizedModelInput {
|
|
|
3717
3953
|
resolution?: string
|
|
3718
3954
|
quality?: string
|
|
3719
3955
|
duration?: number
|
|
3956
|
+
background?: string
|
|
3720
3957
|
/** Empty when the input was already valid. */
|
|
3721
3958
|
adjustments: ModelInputAdjustment[]
|
|
3722
3959
|
}
|
|
@@ -3838,6 +4075,7 @@ export function normalizeModelInput(
|
|
|
3838
4075
|
resolution?: string
|
|
3839
4076
|
quality?: string
|
|
3840
4077
|
duration?: number
|
|
4078
|
+
background?: string
|
|
3841
4079
|
},
|
|
3842
4080
|
context: ModelInputContext = {},
|
|
3843
4081
|
): NormalizedModelInput {
|
|
@@ -3904,7 +4142,8 @@ export function normalizeModelInput(
|
|
|
3904
4142
|
m.resolutions,
|
|
3905
4143
|
defaultResolutionFor(modelId),
|
|
3906
4144
|
)
|
|
3907
|
-
out.quality = snap("quality", input.quality, m.qualities)
|
|
4145
|
+
out.quality = snap("quality", input.quality, m.qualities, m.defaultQuality)
|
|
4146
|
+
out.background = snap("background", input.background, m.backgrounds)
|
|
3908
4147
|
out.duration =
|
|
3909
4148
|
m.autoDuration === true && isAutoVideoDuration(input.duration)
|
|
3910
4149
|
? input.duration
|
|
@@ -3933,6 +4172,42 @@ export function normalizeModelInput(
|
|
|
3933
4172
|
}
|
|
3934
4173
|
}
|
|
3935
4174
|
|
|
4175
|
+
// A transparent background only renders at the size the provider allows it.
|
|
4176
|
+
// Priced after this, so the run pays for the size it renders.
|
|
4177
|
+
if (
|
|
4178
|
+
out.background === "transparent" &&
|
|
4179
|
+
m.transparentResolution !== undefined &&
|
|
4180
|
+
out.resolution !== undefined &&
|
|
4181
|
+
out.resolution !== m.transparentResolution
|
|
4182
|
+
) {
|
|
4183
|
+
adjustments.push({
|
|
4184
|
+
field: "resolution",
|
|
4185
|
+
from: out.resolution,
|
|
4186
|
+
to: m.transparentResolution,
|
|
4187
|
+
reason: `${m.label} only renders a transparent background at ${m.transparentResolution}.`,
|
|
4188
|
+
})
|
|
4189
|
+
out.resolution = m.transparentResolution
|
|
4190
|
+
}
|
|
4191
|
+
|
|
4192
|
+
// Above that size such a model takes no background setting at all. `auto` is
|
|
4193
|
+
// what it does anyway, so only `opaque` is a change worth saying.
|
|
4194
|
+
if (
|
|
4195
|
+
m.backgroundOnlyAtTransparentResolution &&
|
|
4196
|
+
out.background !== undefined &&
|
|
4197
|
+
out.resolution !== undefined &&
|
|
4198
|
+
out.resolution !== m.transparentResolution
|
|
4199
|
+
) {
|
|
4200
|
+
if (out.background !== "auto") {
|
|
4201
|
+
adjustments.push({
|
|
4202
|
+
field: "background",
|
|
4203
|
+
from: out.background,
|
|
4204
|
+
to: undefined,
|
|
4205
|
+
reason: `${m.label} only takes a background setting at ${m.transparentResolution}.`,
|
|
4206
|
+
})
|
|
4207
|
+
}
|
|
4208
|
+
out.background = undefined
|
|
4209
|
+
}
|
|
4210
|
+
|
|
3936
4211
|
return out
|
|
3937
4212
|
}
|
|
3938
4213
|
|
|
@@ -4175,6 +4450,7 @@ const MODEL_VALUE_LABELS: Record<string, string> = {
|
|
|
4175
4450
|
"2k": "2K",
|
|
4176
4451
|
"8K": "8K (Ultra)",
|
|
4177
4452
|
// qualities
|
|
4453
|
+
"low": "Low (Fast)",
|
|
4178
4454
|
"medium": "Medium (Balanced)",
|
|
4179
4455
|
"high": "High (Detailed)",
|
|
4180
4456
|
"basic": "Basic (2K)",
|
|
@@ -4318,6 +4594,17 @@ export function qualityOptionsByKind(kind: ModelKind): Record<string, LabeledOpt
|
|
|
4318
4594
|
return out
|
|
4319
4595
|
}
|
|
4320
4596
|
|
|
4597
|
+
/** Same shape as `qualityOptionsByKind` but for `backgrounds`. */
|
|
4598
|
+
export function backgroundOptionsByKind(kind: ModelKind): Record<string, LabeledOption[]> {
|
|
4599
|
+
const out: Record<string, LabeledOption[]> = {}
|
|
4600
|
+
for (const m of Object.values(MODEL_CATALOG)) {
|
|
4601
|
+
if (m.kind !== kind) continue
|
|
4602
|
+
if (!m.backgrounds) continue
|
|
4603
|
+
out[m.id] = m.backgrounds.map((v) => ({ value: v, label: decorateLabel(m, v) }))
|
|
4604
|
+
}
|
|
4605
|
+
return out
|
|
4606
|
+
}
|
|
4607
|
+
|
|
4321
4608
|
/** One shaped model row for a picker — capabilities derived from the catalog. */
|
|
4322
4609
|
export interface ModelMenuOption {
|
|
4323
4610
|
/** Catalog id (the API enum value). */
|
|
@@ -4398,6 +4685,7 @@ export function modelIdsByKindMode(
|
|
|
4398
4685
|
.filter((m) => (kind === null ? true : m.kind === kind))
|
|
4399
4686
|
.filter((m) => m.modes.some((md) => modes.includes(md)))
|
|
4400
4687
|
.filter((m) => includeHidden || !m.mcpHidden)
|
|
4688
|
+
.filter((m) => !m.docsHidden)
|
|
4401
4689
|
.map((m) => m.id)
|
|
4402
4690
|
.sort()
|
|
4403
4691
|
if (ids.length === 0) {
|
package/src/model-constants.ts
CHANGED
|
@@ -48,6 +48,9 @@ export const IMAGE_ASPECT_RATIO_VALUES = [
|
|
|
48
48
|
// GPT Image 2.5 (Flare + Sunburst) additions: near-square and ultra-wide/tall
|
|
49
49
|
// cinema ratios (docs.kie.ai/market/gpt/gpt-image-2-5-*).
|
|
50
50
|
"27:16", "16:27", "9:8", "8:9",
|
|
51
|
+
// GPT Image 2.6 additions: wide and tall ratios of its own
|
|
52
|
+
// (docs.kie.ai/market/gpt/gpt-image-2-6-*).
|
|
53
|
+
"2:1", "1:2", "9:21", "3:1", "1:3",
|
|
51
54
|
] as const
|
|
52
55
|
|
|
53
56
|
/** A ratio string the image routes accept (pre-snap vocabulary, not a per-model guarantee). */
|
|
@@ -64,9 +67,13 @@ export const IMAGE_RESOLUTION_VALUES = ["1K", "2K", "4K", "0.5 MP", "1 MP", "2 M
|
|
|
64
67
|
export type ImageResolution = typeof IMAGE_RESOLUTION_VALUES[number]
|
|
65
68
|
|
|
66
69
|
/** The `quality` vocabulary of the same two routes (vocabulary bound; the catalog snap gates per model). */
|
|
67
|
-
export const IMAGE_QUALITY_VALUES = ["medium", "high", "basic"] as const
|
|
70
|
+
export const IMAGE_QUALITY_VALUES = ["auto", "low", "medium", "high", "xhigh", "max", "basic"] as const
|
|
68
71
|
export type ImageQuality = typeof IMAGE_QUALITY_VALUES[number]
|
|
69
72
|
|
|
73
|
+
/** The `background` vocabulary of the same two routes (vocabulary bound; the catalog snap gates per model). */
|
|
74
|
+
export const IMAGE_BACKGROUND_VALUES = ["auto", "opaque", "transparent"] as const
|
|
75
|
+
export type ImageBackground = typeof IMAGE_BACKGROUND_VALUES[number]
|
|
76
|
+
|
|
70
77
|
/** The `renderingSpeed` vocabulary (Ideogram's speed tiers — see {@link RENDERING_SPEED_SUPPORT}). */
|
|
71
78
|
export const IMAGE_RENDERING_SPEED_VALUES = ["TURBO", "BALANCED", "QUALITY"] as const
|
|
72
79
|
export type ImageRenderingSpeed = typeof IMAGE_RENDERING_SPEED_VALUES[number]
|
|
@@ -108,6 +115,14 @@ export const MAX_IMAGE_PROMPT_CHARS_BY_PROVIDER: Record<string, number> = {
|
|
|
108
115
|
"gpt-image-2-5-flare-i2i": 20000, // docs.kie.ai/market/gpt/gpt-image-2-5-flare-image-to-image
|
|
109
116
|
"gpt-image-2-5-sunburst": 20000, // docs.kie.ai/market/gpt/gpt-image-2-5-sunburst-text-to-image
|
|
110
117
|
"gpt-image-2-5-sunburst-i2i": 20000, // docs.kie.ai/market/gpt/gpt-image-2-5-sunburst-image-to-image
|
|
118
|
+
// GPT Image 2.6 — Flare and Sunburst document 32000 chars, Economy 20000.
|
|
119
|
+
// PROMPT_HARD_CEILING (30000) is what the routes accept, so that is the cap.
|
|
120
|
+
"gpt-image-2-6-flare": 30000, // docs.kie.ai/market/gpt/gpt-image-2-6-flare-text-to-image
|
|
121
|
+
"gpt-image-2-6-flare-i2i": 30000, // docs.kie.ai/market/gpt/gpt-image-2-6-flare-image-to-image
|
|
122
|
+
"gpt-image-2-6-sunburst": 30000, // docs.kie.ai/market/gpt/gpt-image-2-6-sunburst-text-to-image
|
|
123
|
+
"gpt-image-2-6-sunburst-i2i": 30000, // docs.kie.ai/market/gpt/gpt-image-2-6-sunburst-image-to-image
|
|
124
|
+
"gpt-image-2-6-economy": 20000, // docs.kie.ai/market/gpt/gpt-image-2-6-economy-text-to-image
|
|
125
|
+
"gpt-image-2-6-economy-i2i": 20000, // docs.kie.ai/market/gpt/gpt-image-2-6-economy-image-to-image
|
|
111
126
|
// ── lower than the 5000 default (over-send risk if left at default) ──
|
|
112
127
|
"seedream": 3000, // docs.kie.ai/market/seedream/4-5-text-to-image
|
|
113
128
|
"seedream-edit": 3000, // docs.kie.ai/market/seedream/4-5-edit
|
|
@@ -527,6 +542,9 @@ export const MODELS_WITH_REFERENCE_IMAGE_SUPPORT = new Set([
|
|
|
527
542
|
"gpt-image-2",
|
|
528
543
|
"gpt-image-2-5-flare",
|
|
529
544
|
"gpt-image-2-5-sunburst",
|
|
545
|
+
"gpt-image-2-6-flare",
|
|
546
|
+
"gpt-image-2-6-sunburst",
|
|
547
|
+
"gpt-image-2-6-economy",
|
|
530
548
|
"grok",
|
|
531
549
|
"grok-2",
|
|
532
550
|
"qwen",
|
|
@@ -542,6 +560,9 @@ export const MODELS_WITH_REFERENCE_IMAGE_SUPPORT = new Set([
|
|
|
542
560
|
"gpt-image-2-i2i",
|
|
543
561
|
"gpt-image-2-5-flare-i2i",
|
|
544
562
|
"gpt-image-2-5-sunburst-i2i",
|
|
563
|
+
"gpt-image-2-6-flare-i2i",
|
|
564
|
+
"gpt-image-2-6-sunburst-i2i",
|
|
565
|
+
"gpt-image-2-6-economy-i2i",
|
|
545
566
|
"grok-2-i2i",
|
|
546
567
|
"flux-i2i",
|
|
547
568
|
"flux-pro-i2i",
|
|
@@ -582,6 +603,9 @@ export const T2I_TO_I2I_VARIANT: Record<string, string> = {
|
|
|
582
603
|
"gpt-image-2": "gpt-image-2-i2i",
|
|
583
604
|
"gpt-image-2-5-flare": "gpt-image-2-5-flare-i2i",
|
|
584
605
|
"gpt-image-2-5-sunburst": "gpt-image-2-5-sunburst-i2i",
|
|
606
|
+
"gpt-image-2-6-flare": "gpt-image-2-6-flare-i2i",
|
|
607
|
+
"gpt-image-2-6-sunburst": "gpt-image-2-6-sunburst-i2i",
|
|
608
|
+
"gpt-image-2-6-economy": "gpt-image-2-6-economy-i2i",
|
|
585
609
|
"grok": "grok-i2i",
|
|
586
610
|
// grok-2's t2i takes NO image input; its "i2i" is the segment-map(image_url)
|
|
587
611
|
// → image-edit(task_id) chain in the KIE provider (single reference).
|
|
@@ -621,6 +645,9 @@ export const REF_IMAGE_MAX_LIMITS: Record<string, number> = {
|
|
|
621
645
|
"gpt-image-2-i2i": 16,
|
|
622
646
|
"gpt-image-2-5-flare-i2i": 16,
|
|
623
647
|
"gpt-image-2-5-sunburst-i2i": 16,
|
|
648
|
+
"gpt-image-2-6-flare-i2i": 16,
|
|
649
|
+
"gpt-image-2-6-sunburst-i2i": 16,
|
|
650
|
+
"gpt-image-2-6-economy-i2i": 16,
|
|
624
651
|
"flux-i2i": 4,
|
|
625
652
|
"flux-pro-i2i": 4,
|
|
626
653
|
"seedream-edit": 16,
|
|
@@ -682,6 +709,32 @@ export function imageReferenceLimit(provider: string | undefined): number {
|
|
|
682
709
|
return REF_IMAGE_MAX_LIMITS[effective] ?? DEFAULT_REF_IMAGE_MAX
|
|
683
710
|
}
|
|
684
711
|
|
|
712
|
+
/** The most input images one request may carry, on a model with no row below. */
|
|
713
|
+
export const DEFAULT_REQUEST_IMAGE_LIMIT = 14
|
|
714
|
+
|
|
715
|
+
/**
|
|
716
|
+
* Models a request may give more input images than
|
|
717
|
+
* {@link DEFAULT_REQUEST_IMAGE_LIMIT}. Separate from
|
|
718
|
+
* {@link REF_IMAGE_MAX_LIMITS}, the cap the canvas and the assembler honour: the
|
|
719
|
+
* routes have their own, lower ceiling, and it rises per model only here.
|
|
720
|
+
*/
|
|
721
|
+
const REQUEST_IMAGE_LIMITS: Record<string, number> = {
|
|
722
|
+
"gpt-image-2-6-flare-i2i": 16,
|
|
723
|
+
"gpt-image-2-6-sunburst-i2i": 16,
|
|
724
|
+
}
|
|
725
|
+
|
|
726
|
+
/** The largest per-model limit: the outer bound of the routes' array schemas. */
|
|
727
|
+
export const MAX_REQUEST_IMAGE_LIMIT = Math.max(DEFAULT_REQUEST_IMAGE_LIMIT, ...Object.values(REQUEST_IMAGE_LIMITS))
|
|
728
|
+
|
|
729
|
+
/**
|
|
730
|
+
* The most input images one request may carry for `provider` (a text-to-image
|
|
731
|
+
* id reads its edit sibling's row, the model that consumes them).
|
|
732
|
+
*/
|
|
733
|
+
export function requestImageLimit(provider: string | undefined): number {
|
|
734
|
+
const effective = provider ? (T2I_TO_I2I_VARIANT[provider] ?? provider) : undefined
|
|
735
|
+
return (effective !== undefined ? REQUEST_IMAGE_LIMITS[effective] : undefined) ?? DEFAULT_REQUEST_IMAGE_LIMIT
|
|
736
|
+
}
|
|
737
|
+
|
|
685
738
|
// Variable pricing: which setting type affects cost per provider
|
|
686
739
|
export const VARIABLE_PRICING_MODELS: Record<string, "quality" | "resolution" | "rendering-speed"> = {
|
|
687
740
|
"gpt-image": "quality",
|
|
@@ -760,6 +813,9 @@ export const IMAGE_GEN_PROVIDERS = [
|
|
|
760
813
|
"gpt-image-2",
|
|
761
814
|
"gpt-image-2-5-flare",
|
|
762
815
|
"gpt-image-2-5-sunburst",
|
|
816
|
+
"gpt-image-2-6-flare",
|
|
817
|
+
"gpt-image-2-6-sunburst",
|
|
818
|
+
"gpt-image-2-6-economy",
|
|
763
819
|
"imagen4",
|
|
764
820
|
"imagen4-fast",
|
|
765
821
|
"imagen4-ultra",
|
|
@@ -795,6 +851,9 @@ export const IMAGE_I2I_PROVIDERS = [
|
|
|
795
851
|
"gpt-image-2-i2i",
|
|
796
852
|
"gpt-image-2-5-flare-i2i",
|
|
797
853
|
"gpt-image-2-5-sunburst-i2i",
|
|
854
|
+
"gpt-image-2-6-flare-i2i",
|
|
855
|
+
"gpt-image-2-6-sunburst-i2i",
|
|
856
|
+
"gpt-image-2-6-economy-i2i",
|
|
798
857
|
"grok-2-i2i",
|
|
799
858
|
"ideogram-edit",
|
|
800
859
|
"ideogram-remix",
|
|
@@ -808,11 +867,11 @@ export const IMAGE_I2I_PROVIDERS = [
|
|
|
808
867
|
"flux-kontext-max",
|
|
809
868
|
// Replicate Open (uncensored) — multi-image Kontext via Replicate
|
|
810
869
|
"kontext-multi",
|
|
811
|
-
// BFL Flux 2 Pro — runs through Replicate
|
|
870
|
+
// BFL Flux 2 Pro — runs through Replicate
|
|
812
871
|
"flux-2-pro",
|
|
813
872
|
// BFL FLUX Fill Pro — dedicated masked inpainting via Replicate (white = edit area)
|
|
814
873
|
"flux-fill",
|
|
815
|
-
// BFL Flux 2 Max — runs through Replicate
|
|
874
|
+
// BFL Flux 2 Max — runs through Replicate, up to 8 refs
|
|
816
875
|
"flux-2-max",
|
|
817
876
|
// BFL FLUX Fill Pro — dedicated inpainting via Replicate (image + mask + prompt,
|
|
818
877
|
// white = edit area). Second mask-capable i2i provider alongside ideogram-edit.
|
|
@@ -1405,6 +1464,25 @@ export const TTS_PROVIDERS = [
|
|
|
1405
1464
|
] as const
|
|
1406
1465
|
export type TtsProvider = typeof TTS_PROVIDERS[number]
|
|
1407
1466
|
|
|
1467
|
+
/**
|
|
1468
|
+
* The file a speech request can ask for (`outputFormat` on `/v1/text-to-speech`
|
|
1469
|
+
* and the `text-to-speech` node run), named as the vendor names its formats:
|
|
1470
|
+
* `codec_samplerate_bitrate`. Omitted ⇒ the first, which is exactly what every
|
|
1471
|
+
* request delivered before the field existed. The list is deliberately short:
|
|
1472
|
+
* the three the hosted deployment's vendor account serves (measured 2026-11-08);
|
|
1473
|
+
* a self-hosted install's account must serve them too, or a run asking for one
|
|
1474
|
+
* fails with the vendor's own message.
|
|
1475
|
+
*/
|
|
1476
|
+
export const TTS_OUTPUT_FORMATS = ["mp3_44100_128", "mp3_44100_192", "wav_24000"] as const
|
|
1477
|
+
export type TtsOutputFormat = typeof TTS_OUTPUT_FORMATS[number]
|
|
1478
|
+
export const DEFAULT_TTS_OUTPUT_FORMAT: TtsOutputFormat = "mp3_44100_128"
|
|
1479
|
+
/** How each format is stored and served: the file extension and the MIME type. */
|
|
1480
|
+
export const TTS_OUTPUT_FORMAT_FILES: Readonly<Record<TtsOutputFormat, { readonly ext: "mp3" | "wav"; readonly mime: "audio/mpeg" | "audio/wav" }>> = {
|
|
1481
|
+
mp3_44100_128: { ext: "mp3", mime: "audio/mpeg" },
|
|
1482
|
+
mp3_44100_192: { ext: "mp3", mime: "audio/mpeg" },
|
|
1483
|
+
wav_24000: { ext: "wav", mime: "audio/wav" },
|
|
1484
|
+
}
|
|
1485
|
+
|
|
1408
1486
|
/**
|
|
1409
1487
|
* Text-to-dialogue models (the `provider` of `/v1/text-to-dialogue` and of the
|
|
1410
1488
|
* Text to Dialogue node). Each IS its catalog id and its credit identifier.
|
|
@@ -1707,6 +1785,9 @@ export const IMAGE_MASK_MODE: Record<ImageGenProvider, ImageMaskMode> = {
|
|
|
1707
1785
|
"gpt-image-2": "prompt",
|
|
1708
1786
|
"gpt-image-2-5-flare": "prompt",
|
|
1709
1787
|
"gpt-image-2-5-sunburst": "prompt",
|
|
1788
|
+
"gpt-image-2-6-flare": "prompt",
|
|
1789
|
+
"gpt-image-2-6-sunburst": "prompt",
|
|
1790
|
+
"gpt-image-2-6-economy": "prompt",
|
|
1710
1791
|
"seedream": "prompt",
|
|
1711
1792
|
"seedream-5-lite": "prompt",
|
|
1712
1793
|
"seedream-5-pro": "prompt",
|
|
@@ -172,6 +172,10 @@ const QUALITY_MAP: Record<string, QualityMapping> = {
|
|
|
172
172
|
"gpt-image-2-5-flare-i2i": { field: "resolution", values: { low: "1K", mid: "2K", high: "4K" } },
|
|
173
173
|
"gpt-image-2-5-sunburst": { field: "resolution", values: { low: "1K", mid: "2K", high: "4K" } },
|
|
174
174
|
"gpt-image-2-5-sunburst-i2i": { field: "resolution", values: { low: "1K", mid: "2K", high: "4K" } },
|
|
175
|
+
"gpt-image-2-6-flare": { field: "resolution", values: { low: "1K", mid: "2K", high: "4K" } },
|
|
176
|
+
"gpt-image-2-6-flare-i2i": { field: "resolution", values: { low: "1K", mid: "2K", high: "4K" } },
|
|
177
|
+
"gpt-image-2-6-sunburst": { field: "resolution", values: { low: "1K", mid: "2K", high: "4K" } },
|
|
178
|
+
"gpt-image-2-6-sunburst-i2i": { field: "resolution", values: { low: "1K", mid: "2K", high: "4K" } },
|
|
175
179
|
// Image gen — quality-style (medium/high or basic/high)
|
|
176
180
|
"gpt-image": { field: "quality", values: { low: "medium", mid: "medium", high: "high" } },
|
|
177
181
|
"gpt-image-i2i": { field: "quality", values: { low: "medium", mid: "medium", high: "high" } },
|