@nodaro/shared 3.60.1 → 3.62.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.
Files changed (261) hide show
  1. package/dist/{chunk-5Y42RIGY.cjs → chunk-2D5LQFV4.cjs} +18 -332
  2. package/dist/chunk-2D5LQFV4.cjs.map +1 -0
  3. package/dist/{chunk-5G23AJBU.cjs → chunk-2HZGDZZN.cjs} +6 -6
  4. package/dist/{chunk-5G23AJBU.cjs.map → chunk-2HZGDZZN.cjs.map} +1 -1
  5. package/dist/{chunk-DS2TOM32.js → chunk-2QKF7M2Z.js} +28 -4
  6. package/dist/chunk-2QKF7M2Z.js.map +1 -0
  7. package/dist/{chunk-CIOXUPCJ.cjs → chunk-2W745U4A.cjs} +228 -355
  8. package/dist/chunk-2W745U4A.cjs.map +1 -0
  9. package/dist/{chunk-LN3EVFRS.js → chunk-3OYO3XCC.js} +70 -6
  10. package/dist/chunk-3OYO3XCC.js.map +1 -0
  11. package/dist/{chunk-5HK5Z5OB.cjs → chunk-4ZEFP2FQ.cjs} +4 -4
  12. package/dist/{chunk-5HK5Z5OB.cjs.map → chunk-4ZEFP2FQ.cjs.map} +1 -1
  13. package/dist/{chunk-KOLC7AF2.js → chunk-5YYN5X57.js} +398 -38
  14. package/dist/chunk-5YYN5X57.js.map +1 -0
  15. package/dist/{chunk-RRPPXZ36.cjs → chunk-6CSXMWL4.cjs} +4 -4
  16. package/dist/{chunk-RRPPXZ36.cjs.map → chunk-6CSXMWL4.cjs.map} +1 -1
  17. package/dist/{chunk-M3SXUUWC.cjs → chunk-6FQBKI2A.cjs} +4 -11
  18. package/dist/chunk-6FQBKI2A.cjs.map +1 -0
  19. package/dist/{chunk-G4XWVWRI.js → chunk-6G7NN4S4.js} +5 -4
  20. package/dist/chunk-6G7NN4S4.js.map +1 -0
  21. package/dist/{chunk-HOKWJXHA.cjs → chunk-A2PX5IRC.cjs} +31 -4
  22. package/dist/chunk-A2PX5IRC.cjs.map +1 -0
  23. package/dist/{chunk-W4M7TNXG.cjs → chunk-AFYTX4AI.cjs} +52 -43
  24. package/dist/chunk-AFYTX4AI.cjs.map +1 -0
  25. package/dist/chunk-ALRXY4QH.cjs +13 -0
  26. package/dist/chunk-ALRXY4QH.cjs.map +1 -0
  27. package/dist/chunk-AOJ6B7K4.cjs +351 -0
  28. package/dist/chunk-AOJ6B7K4.cjs.map +1 -0
  29. package/dist/{chunk-KJZVQIN4.js → chunk-C7POAYFE.js} +3 -3
  30. package/dist/{chunk-KJZVQIN4.js.map → chunk-C7POAYFE.js.map} +1 -1
  31. package/dist/{chunk-6Q6SI7AG.js → chunk-CC4V2B7S.js} +3 -3
  32. package/dist/{chunk-6Q6SI7AG.js.map → chunk-CC4V2B7S.js.map} +1 -1
  33. package/dist/{chunk-GNPJ2JLE.cjs → chunk-CIPPPT7E.cjs} +6 -6
  34. package/dist/{chunk-GNPJ2JLE.cjs.map → chunk-CIPPPT7E.cjs.map} +1 -1
  35. package/dist/{chunk-6XVHYD5R.js → chunk-CLAKSLXF.js} +4 -9
  36. package/dist/chunk-CLAKSLXF.js.map +1 -0
  37. package/dist/chunk-CTANEPMY.js +61 -0
  38. package/dist/chunk-CTANEPMY.js.map +1 -0
  39. package/dist/{chunk-WGKAOUEQ.cjs → chunk-D34K455O.cjs} +3 -2
  40. package/dist/chunk-D34K455O.cjs.map +1 -0
  41. package/dist/chunk-E2HZTGYX.js +331 -0
  42. package/dist/chunk-E2HZTGYX.js.map +1 -0
  43. package/dist/{chunk-SKFJIFEV.cjs → chunk-G3KVK7OU.cjs} +21 -21
  44. package/dist/{chunk-SKFJIFEV.cjs.map → chunk-G3KVK7OU.cjs.map} +1 -1
  45. package/dist/chunk-G4U3HW6W.js +453 -0
  46. package/dist/chunk-G4U3HW6W.js.map +1 -0
  47. package/dist/{chunk-EN2YI5TV.js → chunk-GSFB537T.js} +3 -3
  48. package/dist/{chunk-EN2YI5TV.js.map → chunk-GSFB537T.js.map} +1 -1
  49. package/dist/chunk-HRY7KGAE.cjs +506 -0
  50. package/dist/chunk-HRY7KGAE.cjs.map +1 -0
  51. package/dist/{chunk-6AJOTEVC.js → chunk-I2RQB7VG.js} +3 -3
  52. package/dist/{chunk-6AJOTEVC.js.map → chunk-I2RQB7VG.js.map} +1 -1
  53. package/dist/chunk-IDTKF5EX.cjs +48 -0
  54. package/dist/chunk-IDTKF5EX.cjs.map +1 -0
  55. package/dist/{chunk-DQIJPDHC.cjs → chunk-IWWVPR3W.cjs} +88 -11
  56. package/dist/chunk-IWWVPR3W.cjs.map +1 -0
  57. package/dist/{chunk-URLDVK67.js → chunk-JJNNM23P.js} +3 -3
  58. package/dist/{chunk-URLDVK67.js.map → chunk-JJNNM23P.js.map} +1 -1
  59. package/dist/{chunk-YHVEZVAO.js → chunk-JZGZ26YB.js} +6 -306
  60. package/dist/chunk-JZGZ26YB.js.map +1 -0
  61. package/dist/{chunk-XROE3CAS.cjs → chunk-KHH54GRP.cjs} +120 -79
  62. package/dist/chunk-KHH54GRP.cjs.map +1 -0
  63. package/dist/{chunk-AXT7YNOR.cjs → chunk-KJSRPHJ2.cjs} +48 -47
  64. package/dist/chunk-KJSRPHJ2.cjs.map +1 -0
  65. package/dist/{chunk-FVVD6XY2.js → chunk-KL6GAYTT.js} +13 -4
  66. package/dist/chunk-KL6GAYTT.js.map +1 -0
  67. package/dist/{chunk-AFQFGZN7.cjs → chunk-KYMHFVAZ.cjs} +8 -6
  68. package/dist/chunk-KYMHFVAZ.cjs.map +1 -0
  69. package/dist/{chunk-A6HRY3WF.cjs → chunk-MYJQELFN.cjs} +420 -37
  70. package/dist/chunk-MYJQELFN.cjs.map +1 -0
  71. package/dist/chunk-N5HH46JF.cjs +68 -0
  72. package/dist/chunk-N5HH46JF.cjs.map +1 -0
  73. package/dist/{chunk-BXNPO3PL.cjs → chunk-N7OUQK7E.cjs} +8 -8
  74. package/dist/{chunk-BXNPO3PL.cjs.map → chunk-N7OUQK7E.cjs.map} +1 -1
  75. package/dist/{chunk-JKZVRKN3.js → chunk-NGKKNSK6.js} +31 -8
  76. package/dist/chunk-NGKKNSK6.js.map +1 -0
  77. package/dist/{chunk-SWVGHAYO.js → chunk-O7RZRUMZ.js} +110 -74
  78. package/dist/chunk-O7RZRUMZ.js.map +1 -0
  79. package/dist/{chunk-SCYBGTX6.js → chunk-PTD6EDUU.js} +3 -3
  80. package/dist/{chunk-SCYBGTX6.js.map → chunk-PTD6EDUU.js.map} +1 -1
  81. package/dist/{chunk-BDXXOEBZ.cjs → chunk-QWYFHQYK.cjs} +79 -54
  82. package/dist/chunk-QWYFHQYK.cjs.map +1 -0
  83. package/dist/{chunk-VB2ARGQ6.js → chunk-RGNHHIMN.js} +3 -3
  84. package/dist/chunk-RGNHHIMN.js.map +1 -0
  85. package/dist/{chunk-AZGONXWV.js → chunk-S24ZBUB4.js} +194 -299
  86. package/dist/chunk-S24ZBUB4.js.map +1 -0
  87. package/dist/{chunk-IV6IDECY.js → chunk-S5TMRJMX.js} +4 -4
  88. package/dist/{chunk-IV6IDECY.js.map → chunk-S5TMRJMX.js.map} +1 -1
  89. package/dist/chunk-SMOO5FAH.js +10 -0
  90. package/dist/chunk-SMOO5FAH.js.map +1 -0
  91. package/dist/{chunk-HYBACFYW.js → chunk-SYWR5G3T.js} +16 -7
  92. package/dist/chunk-SYWR5G3T.js.map +1 -0
  93. package/dist/{chunk-GWBQ3GPO.cjs → chunk-TRVWMKNE.cjs} +343 -53
  94. package/dist/chunk-TRVWMKNE.cjs.map +1 -0
  95. package/dist/{chunk-G6GMY5BC.js → chunk-UDDVDQMF.js} +298 -36
  96. package/dist/chunk-UDDVDQMF.js.map +1 -0
  97. package/dist/{chunk-PONP5J5E.cjs → chunk-V24EPI5N.cjs} +13 -3
  98. package/dist/chunk-V24EPI5N.cjs.map +1 -0
  99. package/dist/{chunk-HDHLZK7C.cjs → chunk-VACPZPUA.cjs} +5 -5
  100. package/dist/{chunk-HDHLZK7C.cjs.map → chunk-VACPZPUA.cjs.map} +1 -1
  101. package/dist/{chunk-ICDLYU4I.js → chunk-Y6X7UJSD.js} +10 -9
  102. package/dist/chunk-Y6X7UJSD.js.map +1 -0
  103. package/dist/chunk-YCXRSWCQ.js +42 -0
  104. package/dist/chunk-YCXRSWCQ.js.map +1 -0
  105. package/dist/entries/apps.cjs +44 -44
  106. package/dist/entries/apps.js +9 -9
  107. package/dist/entries/credits.cjs +217 -152
  108. package/dist/entries/credits.d.cts +112 -6
  109. package/dist/entries/credits.d.ts +112 -6
  110. package/dist/entries/credits.js +13 -8
  111. package/dist/entries/entities.cjs +188 -143
  112. package/dist/entries/entities.d.cts +122 -1
  113. package/dist/entries/entities.d.ts +122 -1
  114. package/dist/entries/entities.js +2 -1
  115. package/dist/entries/llm-models.d.cts +2 -1
  116. package/dist/entries/llm-models.d.ts +2 -1
  117. package/dist/entries/media.cjs +92 -87
  118. package/dist/entries/media.d.cts +11 -1
  119. package/dist/entries/media.d.ts +11 -1
  120. package/dist/entries/media.js +3 -2
  121. package/dist/entries/model-catalog.cjs +207 -99
  122. package/dist/entries/model-catalog.d.cts +90 -4
  123. package/dist/entries/model-catalog.d.ts +90 -4
  124. package/dist/entries/model-catalog.js +5 -5
  125. package/dist/entries/models.cjs +407 -294
  126. package/dist/entries/models.d.cts +4 -3
  127. package/dist/entries/models.d.ts +4 -3
  128. package/dist/entries/models.js +6 -5
  129. package/dist/entries/nodes.cjs +241 -233
  130. package/dist/entries/nodes.d.cts +15 -2
  131. package/dist/entries/nodes.d.ts +15 -2
  132. package/dist/entries/nodes.js +10 -10
  133. package/dist/entries/pipeline.cjs +152 -152
  134. package/dist/entries/pipeline.d.cts +2 -1
  135. package/dist/entries/pipeline.d.ts +2 -1
  136. package/dist/entries/pipeline.js +3 -3
  137. package/dist/entries/ugc.cjs +71 -71
  138. package/dist/entries/ugc.js +4 -4
  139. package/dist/entries/video.cjs +308 -204
  140. package/dist/entries/video.d.cts +480 -98
  141. package/dist/entries/video.d.ts +480 -98
  142. package/dist/entries/video.js +8 -4
  143. package/dist/entries/workflow.cjs +111 -99
  144. package/dist/entries/workflow.d.cts +29 -2
  145. package/dist/entries/workflow.d.ts +29 -2
  146. package/dist/entries/workflow.js +2 -2
  147. package/dist/{gpt-image-2-6-BeZdT-pW.d.cts → gpt-image-2-6-jIRQBRag.d.cts} +6 -0
  148. package/dist/{gpt-image-2-6-BeZdT-pW.d.ts → gpt-image-2-6-jIRQBRag.d.ts} +6 -0
  149. package/dist/index.cjs +2321 -1870
  150. package/dist/index.d.cts +10 -10
  151. package/dist/index.d.ts +10 -10
  152. package/dist/index.js +26 -23
  153. package/dist/{model-catalog-D6Es7VG-.d.cts → model-catalog-CCEcv08q.d.cts} +179 -14
  154. package/dist/{model-catalog-D6Es7VG-.d.ts → model-catalog-CCEcv08q.d.ts} +179 -14
  155. package/dist/{model-constants-22k3fjp1.d.cts → model-constants-B88p6XR0.d.ts} +305 -20
  156. package/dist/{model-constants-22k3fjp1.d.ts → model-constants-Cf3zaITt.d.cts} +305 -20
  157. package/package.json +1 -1
  158. package/src/__tests__/extend-providers.test.ts +114 -0
  159. package/src/__tests__/fixtures/mask-composite-quote-parity.json +118 -0
  160. package/src/__tests__/fixtures/root-exports.baseline.json +68 -0
  161. package/src/__tests__/gpt-image-2-6-formats.test.ts +4 -1
  162. package/src/__tests__/gpt-image-2-6.test.ts +7 -0
  163. package/src/__tests__/grok-video-15-catalog.test.ts +189 -0
  164. package/src/__tests__/gvp-supported-providers.test.ts +5 -2
  165. package/src/__tests__/image-mask-mode.test.ts +34 -1
  166. package/src/__tests__/mask-edit-follows-source.test.ts +150 -0
  167. package/src/__tests__/minimax-h3-image.test.ts +140 -0
  168. package/src/__tests__/model-makers.test.ts +49 -11
  169. package/src/__tests__/model-tree.test.ts +13 -0
  170. package/src/__tests__/retired-video-provider.test.ts +15 -5
  171. package/src/__tests__/seedance-25-catalog-modes.test.ts +1 -1
  172. package/src/__tests__/seedance-task-type.test.ts +178 -0
  173. package/src/__tests__/seedream-5-5.test.ts +117 -0
  174. package/src/__tests__/unit-contract-compose.test.ts +27 -1
  175. package/src/__tests__/unit-contracts.test.ts +20 -6
  176. package/src/__tests__/upscale-factors.test.ts +107 -0
  177. package/src/__tests__/video-character-refs.test.ts +20 -2
  178. package/src/__tests__/video-collapse-parity.test.ts +19 -0
  179. package/src/__tests__/video-overlay-geometry.test.ts +68 -0
  180. package/src/__tests__/video-overlay-layer-plan.test.ts +3 -4
  181. package/src/__tests__/video-overlay-layouts.test.ts +529 -0
  182. package/src/__tests__/video-overlay-pricing.test.ts +61 -0
  183. package/src/__tests__/video-overlay-validate.test.ts +128 -0
  184. package/src/__tests__/video-overlay-wired-kind.test.ts +207 -0
  185. package/src/__tests__/video-overlay.test.ts +280 -194
  186. package/src/__tests__/video-ref-limits.test.ts +2 -1
  187. package/src/__tests__/video-reference-only.test.ts +6 -2
  188. package/src/__tests__/video-start-frame-only.test.ts +98 -0
  189. package/src/__tests__/wired-character-names.test.ts +220 -0
  190. package/src/credit-estimators/index.ts +8 -0
  191. package/src/credit-estimators/video-overlay.ts +70 -0
  192. package/src/credit-identifiers.ts +102 -5
  193. package/src/entity-image-url.ts +21 -0
  194. package/src/entries/credits.ts +14 -0
  195. package/src/entries/entities.ts +14 -0
  196. package/src/entries/model-catalog.ts +39 -1
  197. package/src/entries/models.ts +34 -0
  198. package/src/entries/nodes.ts +2 -0
  199. package/src/entries/video.ts +6 -0
  200. package/src/entries/workflow.ts +1 -0
  201. package/src/generated/unit-contracts.ts +8 -1
  202. package/src/gpt-image-2-6.ts +6 -0
  203. package/src/input-image-pricing.ts +76 -0
  204. package/src/mask-composite.ts +11 -0
  205. package/src/minimax-h3-image.ts +61 -0
  206. package/src/model-catalog.ts +512 -48
  207. package/src/model-constants.ts +602 -34
  208. package/src/node-default-mappings.ts +12 -2
  209. package/src/node-execution-state.ts +4 -1
  210. package/src/producer-types.ts +23 -1
  211. package/src/seedance-task-type.ts +37 -0
  212. package/src/seedream-5-5.ts +45 -0
  213. package/src/unit-contract-compose.ts +4 -1
  214. package/src/upscale-factors.ts +111 -0
  215. package/src/video-character-refs.ts +7 -4
  216. package/src/video-overlay-geometry.ts +99 -0
  217. package/src/video-overlay-input.ts +25 -0
  218. package/src/video-overlay-layout-ids.ts +48 -0
  219. package/src/video-overlay-layouts.ts +315 -0
  220. package/src/video-overlay-validate.ts +223 -0
  221. package/src/video-overlay-video-layers.ts +304 -0
  222. package/src/video-overlay.ts +165 -297
  223. package/src/video-ui-defaults.ts +8 -6
  224. package/src/wired-character-names.ts +202 -0
  225. package/src/wired-image-size.ts +55 -0
  226. package/dist/chunk-5Y42RIGY.cjs.map +0 -1
  227. package/dist/chunk-6XVHYD5R.js.map +0 -1
  228. package/dist/chunk-A6HRY3WF.cjs.map +0 -1
  229. package/dist/chunk-AFQFGZN7.cjs.map +0 -1
  230. package/dist/chunk-AXT7YNOR.cjs.map +0 -1
  231. package/dist/chunk-AZGONXWV.js.map +0 -1
  232. package/dist/chunk-BDXXOEBZ.cjs.map +0 -1
  233. package/dist/chunk-CIOXUPCJ.cjs.map +0 -1
  234. package/dist/chunk-DQIJPDHC.cjs.map +0 -1
  235. package/dist/chunk-DS2TOM32.js.map +0 -1
  236. package/dist/chunk-FVVD6XY2.js.map +0 -1
  237. package/dist/chunk-G4XWVWRI.js.map +0 -1
  238. package/dist/chunk-G6GMY5BC.js.map +0 -1
  239. package/dist/chunk-G7ZYZQKO.cjs +0 -27
  240. package/dist/chunk-G7ZYZQKO.cjs.map +0 -1
  241. package/dist/chunk-GWBQ3GPO.cjs.map +0 -1
  242. package/dist/chunk-HNEF2N5C.cjs +0 -19
  243. package/dist/chunk-HNEF2N5C.cjs.map +0 -1
  244. package/dist/chunk-HOKWJXHA.cjs.map +0 -1
  245. package/dist/chunk-HYBACFYW.js.map +0 -1
  246. package/dist/chunk-ICDLYU4I.js.map +0 -1
  247. package/dist/chunk-JKZVRKN3.js.map +0 -1
  248. package/dist/chunk-KOLC7AF2.js.map +0 -1
  249. package/dist/chunk-LN3EVFRS.js.map +0 -1
  250. package/dist/chunk-M3SXUUWC.cjs.map +0 -1
  251. package/dist/chunk-MHY47BLL.js +0 -23
  252. package/dist/chunk-MHY47BLL.js.map +0 -1
  253. package/dist/chunk-PONP5J5E.cjs.map +0 -1
  254. package/dist/chunk-SWVGHAYO.js.map +0 -1
  255. package/dist/chunk-VB2ARGQ6.js.map +0 -1
  256. package/dist/chunk-VYQ25YQF.js +0 -17
  257. package/dist/chunk-VYQ25YQF.js.map +0 -1
  258. package/dist/chunk-W4M7TNXG.cjs.map +0 -1
  259. package/dist/chunk-WGKAOUEQ.cjs.map +0 -1
  260. package/dist/chunk-XROE3CAS.cjs.map +0 -1
  261. package/dist/chunk-YHVEZVAO.js.map +0 -1
@@ -23,6 +23,31 @@ function isFlux2Model(m) {
23
23
  return m === "flux-2-klein" || m === "flux-2-pro" || m === "flux-2-max";
24
24
  }
25
25
 
26
+ // src/minimax-h3-image.ts
27
+ var MINIMAX_H3_IMAGE_T2I = "minimax-h3-image";
28
+ var MINIMAX_H3_IMAGE_I2I = "minimax-h3-image-i2i";
29
+ var MINIMAX_H3_IMAGE_RESOLUTIONS = ["1K", "2K", "4K"];
30
+ var MINIMAX_H3_IMAGE_DEFAULT_RESOLUTION = "2K";
31
+ var MINIMAX_H3_IMAGE_MAX_INPUT_IMAGES = 16;
32
+ function isMinimaxH3Image(model) {
33
+ return model === MINIMAX_H3_IMAGE_T2I || model === MINIMAX_H3_IMAGE_I2I;
34
+ }
35
+ function isMinimaxH3ImageI2i(model) {
36
+ return model === MINIMAX_H3_IMAGE_I2I;
37
+ }
38
+ function pricedResolution(resolution) {
39
+ const asked = typeof resolution === "string" ? resolution.trim().toLowerCase() : "";
40
+ return MINIMAX_H3_IMAGE_RESOLUTIONS.find((r) => r.toLowerCase() === asked) ?? MINIMAX_H3_IMAGE_DEFAULT_RESOLUTION;
41
+ }
42
+ function minimaxH3ImageCreditId(provider, resolution, referenceImageCount) {
43
+ const size = pricedResolution(resolution);
44
+ const asked = Number.isFinite(referenceImageCount) ? Math.trunc(referenceImageCount) : 0;
45
+ const edit = provider === MINIMAX_H3_IMAGE_I2I || asked > 0;
46
+ if (!edit) return `${MINIMAX_H3_IMAGE_T2I}:${size}`;
47
+ const images = Math.min(Math.max(1, asked), MINIMAX_H3_IMAGE_MAX_INPUT_IMAGES);
48
+ return `${MINIMAX_H3_IMAGE_I2I}:${size}:${images}ref`;
49
+ }
50
+
26
51
  // src/video-duration-auto.ts
27
52
  var VIDEO_DURATION_AUTO = -1;
28
53
  function isAutoVideoDuration(duration) {
@@ -30,6 +55,24 @@ function isAutoVideoDuration(duration) {
30
55
  return n === VIDEO_DURATION_AUTO;
31
56
  }
32
57
 
58
+ // src/seedream-5-5.ts
59
+ var SEEDREAM_5_5_T2I = "seedream-5-5";
60
+ var SEEDREAM_5_5_I2I = "seedream-5-5-i2i";
61
+ var SEEDREAM_5_5_RESOLUTIONS = ["1K", "1.5K", "2K"];
62
+ var SEEDREAM_5_5_DEFAULT_RESOLUTION = "2K";
63
+ var SEEDREAM_5_5_MAX_INPUT_IMAGES = 10;
64
+ var SEEDREAM_5_5_MIN_PROMPT_CHARS = 5;
65
+ function isSeedream55I2i(model) {
66
+ return model === SEEDREAM_5_5_I2I;
67
+ }
68
+ function isSeedream55(model) {
69
+ return model === SEEDREAM_5_5_T2I || model === SEEDREAM_5_5_I2I;
70
+ }
71
+ function seedream55Resolution(resolution) {
72
+ const asked = typeof resolution === "string" ? resolution.trim().toUpperCase() : "";
73
+ return SEEDREAM_5_5_RESOLUTIONS.find((r) => r === asked) ?? SEEDREAM_5_5_DEFAULT_RESOLUTION;
74
+ }
75
+
33
76
  // src/model-catalog.ts
34
77
  var SPEECH_UNIT_PRICE_NOTE = "per started 100 characters, at least 8 units \u2014 where length pricing is on; a request costs at most its units \xD7 this";
35
78
  var MODEL_MAKERS = {
@@ -58,6 +101,7 @@ function isModelMakerId(value) {
58
101
  return typeof value === "string" && Object.hasOwn(MODEL_MAKERS, value);
59
102
  }
60
103
  function modelMakerOf(entry) {
104
+ if (entry.ownLabel === true) return void 0;
61
105
  return isModelMakerId(entry.maker) ? { id: entry.maker, name: MODEL_MAKERS[entry.maker].name } : void 0;
62
106
  }
63
107
  var MODEL_RECOMMENDATIONS = [
@@ -70,6 +114,7 @@ var MODEL_RECOMMENDATIONS = [
70
114
  { 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." },
71
115
  { 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." },
72
116
  { 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)." },
117
+ { intent: "upscale an image with text, labels or logos", modelIds: ["nodaro-image-upscale"], note: "Keeps lettering exactly as written. 1x enhances at the same size; up to 8x. Priced by the output's size, so a small picture costs little." },
73
118
  { intent: "background removal / cutout", modelIds: ["recraft-remove-bg"], note: "Cheap, no prompt needed." },
74
119
  // video
75
120
  { 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." },
@@ -129,6 +174,23 @@ var GPT_IMAGE_2_6_RATIOS = [
129
174
  "1:3"
130
175
  ];
131
176
  var GPT_IMAGE_2_6_ECONOMY_RATIOS = ["auto", "1:1", "16:9", "9:16", "3:2", "2:3", "21:9", "4:3"];
177
+ var GPT_IMAGE_2_6_OUTPUT_SIZES = {
178
+ "1:1": { "1K": [1024, 1024], "2K": [2048, 2048], "4K": [2880, 2880] },
179
+ "3:2": { "1K": [1536, 1024], "2K": [2048, 1360], "4K": [3520, 2336] },
180
+ "2:3": { "1K": [1024, 1536], "2K": [1360, 2048], "4K": [2336, 3520] },
181
+ "4:3": { "1K": [1024, 768], "2K": [2048, 1536], "4K": [3312, 2480] },
182
+ "3:4": { "1K": [768, 1024], "2K": [1536, 2048], "4K": [2480, 3312] },
183
+ "5:4": { "1K": [1280, 1024], "2K": [2560, 2048], "4K": [3216, 2576] },
184
+ "4:5": { "1K": [1024, 1280], "2K": [2048, 2560], "4K": [2576, 3216] },
185
+ "16:9": { "1K": [1536, 864], "2K": [2048, 1152], "4K": [3840, 2160] },
186
+ "9:16": { "1K": [864, 1536], "2K": [1152, 2048], "4K": [2160, 3840] },
187
+ "2:1": { "1K": [2048, 1024], "2K": [2688, 1344], "4K": [3840, 1920] },
188
+ "1:2": { "1K": [1024, 2048], "2K": [1344, 2688], "4K": [1920, 3840] },
189
+ "21:9": { "1K": [2016, 864], "2K": [2688, 1152], "4K": [3840, 1648] },
190
+ "9:21": { "1K": [864, 2016], "2K": [1152, 2688], "4K": [1648, 3840] },
191
+ "3:1": { "1K": [1536, 512], "2K": [3072, 1024], "4K": [3840, 1280] },
192
+ "1:3": { "1K": [512, 1536], "2K": [1024, 3072], "4K": [1280, 3840] }
193
+ };
132
194
  var GPT_IMAGE_2_6_VALUE_LABELS = {
133
195
  "3:2": "3:2 (Landscape)",
134
196
  "2:3": "2:3 (Portrait)",
@@ -155,6 +217,10 @@ var GPT_IMAGE_2_6_SVG_LEVELS = ["standard", "detailed", "max"];
155
217
  var IMAGEN4_RATIOS = ["1:1", "16:9", "9:16", "4:3", "3:4"];
156
218
  var IDEOGRAM_RATIOS = ["1:1", "16:9", "9:16", "4:3", "3:4"];
157
219
  var SEEDREAM_RATIOS = ["1:1", "16:9", "9:16", "4:3", "3:4", "3:2", "2:3", "21:9"];
220
+ var MINIMAX_H3_IMAGE_RATIOS = ["1:1", "16:9", "9:16", "4:3", "3:4", "3:2", "2:3", "5:4", "4:5", "21:9", "auto"];
221
+ var SEEDREAM_5_5_I2I_RATIOS = ["auto", ...SEEDREAM_RATIOS];
222
+ var SEEDREAM_5_5_BACKGROUNDS = ["auto", "opaque", "transparent"];
223
+ var SEEDREAM_5_5_FORMATS = ["png", "jpeg"];
158
224
  var Z_IMAGE_RATIOS = ["1:1", "16:9", "9:16", "4:3", "3:4"];
159
225
  var VIDEO_RATIOS_HV = ["16:9", "9:16"];
160
226
  var VIDEO_RATIOS_HVS = ["16:9", "9:16", "1:1"];
@@ -749,11 +815,13 @@ var IMAGE_MODELS = {
749
815
  maker: "openai",
750
816
  label: "GPT Image 2.6 Flare (I2I)",
751
817
  series: "GPT Image",
752
- description: "Fast GPT Image 2.6 edits - up to 16 input images, priced per image. Writes PNG, JPEG, WebP, an animated GIF or an SVG. Pick it while iterating.",
753
- useCases: ["edit", "high-res"],
754
- features: ["reference-image"],
818
+ description: "Fast GPT Image 2.6 edits - up to 16 input images, priced per image. Writes PNG, JPEG, WebP, an animated GIF or an SVG. Takes an inpainting mask (PNG, JPEG or WebP; the rest of the picture is kept as it was). Pick it while iterating.",
819
+ useCases: ["edit", "inpaint", "high-res"],
820
+ features: ["reference-image", "mask"],
755
821
  aspectRatios: GPT_IMAGE_2_6_RATIOS,
756
822
  autoAspectFromSourceImage: true,
823
+ outputSizes: GPT_IMAGE_2_6_OUTPUT_SIZES,
824
+ maskEditMatchesSource: true,
757
825
  resolutions: ["1K", "2K", "4K"],
758
826
  qualities: ["auto", "low", "medium", "high", "xhigh", "max"],
759
827
  defaultQuality: "medium",
@@ -857,11 +925,13 @@ var IMAGE_MODELS = {
857
925
  maker: "openai",
858
926
  label: "GPT Image 2.6 Sunburst (I2I)",
859
927
  series: "GPT Image",
860
- description: "Precision GPT Image 2.6 edits - up to 16 input images, priced per image. Writes PNG, JPEG, WebP, an animated GIF or an SVG. Pick it for finished, detail-critical edits.",
861
- useCases: ["edit", "high-res"],
862
- features: ["reference-image"],
928
+ description: "Precision GPT Image 2.6 edits - up to 16 input images, priced per image. Writes PNG, JPEG, WebP, an animated GIF or an SVG. Takes an inpainting mask (PNG, JPEG or WebP; the rest of the picture is kept as it was). Pick it for finished, detail-critical edits.",
929
+ useCases: ["edit", "inpaint", "high-res"],
930
+ features: ["reference-image", "mask"],
863
931
  aspectRatios: GPT_IMAGE_2_6_RATIOS,
864
932
  autoAspectFromSourceImage: true,
933
+ outputSizes: GPT_IMAGE_2_6_OUTPUT_SIZES,
934
+ maskEditMatchesSource: true,
865
935
  resolutions: ["1K", "2K", "4K"],
866
936
  qualities: ["auto", "low", "medium", "high", "xhigh", "max"],
867
937
  defaultQuality: "medium",
@@ -1183,6 +1253,120 @@ var IMAGE_MODELS = {
1183
1253
  resolutions: ["1K", "2K"],
1184
1254
  pricing: [{ identifier: "seedream-5-flash-i2i", credits: 10, note: "1K / 2K flat" }]
1185
1255
  },
1256
+ // Seedream 5.5 — a different model from Seedream 5 Lite, Pro and Flash, priced
1257
+ // by its size (1K and 1.5K the same, 2K dearer) and, on an edit, by each input
1258
+ // image (the rows are `ee/billing/seedream-5-5-pricing.ts`).
1259
+ // See: docs.kie.ai/market/seedream/5-5-text-to-image.md
1260
+ // docs.kie.ai/market/seedream/5-5-image-to-image.md
1261
+ "seedream-5-5": {
1262
+ id: "seedream-5-5",
1263
+ kind: "image",
1264
+ modes: ["t2i"],
1265
+ family: "Bytedance",
1266
+ maker: "bytedance",
1267
+ label: "Seedream 5.5",
1268
+ series: "Seedream",
1269
+ description: "Seedream 5.5 - more natural light, materials and skin, and dense small text that stays readable. A transparent background in one step, PNG or JPEG, at 1K, 1.5K or 2K (the default); 1K and 1.5K cost the same.",
1270
+ useCases: ["realistic", "typography", "product", "transparent"],
1271
+ features: ["reference-image"],
1272
+ aspectRatios: SEEDREAM_RATIOS,
1273
+ strictAspectRatios: true,
1274
+ resolutions: SEEDREAM_5_5_RESOLUTIONS,
1275
+ defaultResolution: SEEDREAM_5_5_DEFAULT_RESOLUTION,
1276
+ backgrounds: SEEDREAM_5_5_BACKGROUNDS,
1277
+ outputFormats: SEEDREAM_5_5_FORMATS,
1278
+ pricing: [
1279
+ { identifier: "seedream-5-5", credits: 16, note: "2K default" },
1280
+ { identifier: "seedream-5-5:1K", credits: 9, note: "1K" },
1281
+ { identifier: "seedream-5-5:1.5K", credits: 9, note: "1.5K, the same as 1K" },
1282
+ { identifier: "seedream-5-5:2K", credits: 16, note: "2K" }
1283
+ ]
1284
+ },
1285
+ "seedream-5-5-i2i": {
1286
+ id: "seedream-5-5-i2i",
1287
+ kind: "image",
1288
+ modes: ["i2i"],
1289
+ family: "Bytedance",
1290
+ maker: "bytedance",
1291
+ label: "Seedream 5.5 (I2I)",
1292
+ series: "Seedream",
1293
+ description: "Seedream 5.5 edits - change what you ask, round after round, and the rest of the picture stays as it was. Up to 10 input images, priced per image; a transparent background, PNG or JPEG, at 1K, 1.5K or 2K (the default).",
1294
+ useCases: ["edit", "iteration", "transparent"],
1295
+ features: ["reference-image"],
1296
+ aspectRatios: SEEDREAM_5_5_I2I_RATIOS,
1297
+ strictAspectRatios: true,
1298
+ resolutions: SEEDREAM_5_5_RESOLUTIONS,
1299
+ defaultResolution: SEEDREAM_5_5_DEFAULT_RESOLUTION,
1300
+ backgrounds: SEEDREAM_5_5_BACKGROUNDS,
1301
+ outputFormats: SEEDREAM_5_5_FORMATS,
1302
+ pricing: [
1303
+ { identifier: "seedream-5-5-i2i", credits: 20, note: "2K, one input image (the default)" },
1304
+ { identifier: "seedream-5-5-i2i:1K:1ref", credits: 13, note: "1K, one input image (the least)" },
1305
+ { identifier: "seedream-5-5-i2i:1.5K:1ref", credits: 13, note: "1.5K, one input image" },
1306
+ { identifier: "seedream-5-5-i2i:2K:1ref", credits: 20, note: "2K, one input image" },
1307
+ { identifier: "seedream-5-5-i2i:1K:10ref", credits: 45, note: "1K, ten input images" },
1308
+ { identifier: "seedream-5-5-i2i:2K:10ref", credits: 52, note: "2K, ten input images (the most)" }
1309
+ ]
1310
+ },
1311
+ // ── MiniMax H3 Image ──
1312
+ // MiniMax's H3 image model (KIE `minimax-h3/text-to-image` and
1313
+ // `minimax-h3/image-edit`). Not the H3 video model `minimax-h3`. A prompt
1314
+ // runs the text-to-image id; with reference images the run moves to the
1315
+ // edit id (`T2I_TO_I2I_VARIANT`). Priced by size, 1K and 2K the same, and an
1316
+ // edit by its reference images (`minimaxH3ImageCreditId`). "auto" is listed
1317
+ // LAST so a fallback that takes the first ratio lands on a real one: from a
1318
+ // prompt KIE's rewriter picks the ratio, in an edit it follows the first
1319
+ // reference image. KIE's prompt expansion is left on and its custom
1320
+ // width/height is not offered.
1321
+ // See: docs.kie.ai/market/minimax-h3/text-to-image.md
1322
+ // docs.kie.ai/market/minimax-h3/image-edit.md
1323
+ "minimax-h3-image": {
1324
+ id: "minimax-h3-image",
1325
+ kind: "image",
1326
+ modes: ["t2i"],
1327
+ family: "MiniMax",
1328
+ maker: "minimax",
1329
+ label: "MiniMax H3 Image",
1330
+ series: "MiniMax Image",
1331
+ description: "MiniMax H3 Image: detailed pictures up to about 16 MP at 4K, with readable text inside the picture. Ten shapes plus auto, the same price at 1K and 2K (2K by default), PNG or JPEG.",
1332
+ useCases: ["typography", "high-res", "general"],
1333
+ features: ["reference-image"],
1334
+ aspectRatios: MINIMAX_H3_IMAGE_RATIOS,
1335
+ resolutions: MINIMAX_H3_IMAGE_RESOLUTIONS,
1336
+ defaultResolution: MINIMAX_H3_IMAGE_DEFAULT_RESOLUTION,
1337
+ outputFormats: ["png", "jpeg"],
1338
+ pricing: [
1339
+ { identifier: "minimax-h3-image", credits: 5, note: "2K default" },
1340
+ { identifier: "minimax-h3-image:1K", credits: 5, note: "1K" },
1341
+ { identifier: "minimax-h3-image:2K", credits: 5, note: "2K" },
1342
+ { identifier: "minimax-h3-image:4K", credits: 14, note: "4K" }
1343
+ ]
1344
+ },
1345
+ "minimax-h3-image-i2i": {
1346
+ id: "minimax-h3-image-i2i",
1347
+ kind: "image",
1348
+ modes: ["i2i"],
1349
+ family: "MiniMax",
1350
+ maker: "minimax",
1351
+ label: "MiniMax H3 Image (I2I)",
1352
+ series: "MiniMax Image",
1353
+ description: "MiniMax H3 Image edits: change or combine up to 16 reference images in one edit, with readable text, up to about 16 MP at 4K. Priced by size and by reference image; auto keeps the first image's shape.",
1354
+ useCases: ["edit", "typography", "multi-reference"],
1355
+ features: ["reference-image"],
1356
+ aspectRatios: MINIMAX_H3_IMAGE_RATIOS,
1357
+ resolutions: MINIMAX_H3_IMAGE_RESOLUTIONS,
1358
+ defaultResolution: MINIMAX_H3_IMAGE_DEFAULT_RESOLUTION,
1359
+ outputFormats: ["png", "jpeg"],
1360
+ pricing: [
1361
+ { identifier: "minimax-h3-image-i2i", credits: 6, note: "2K, one reference image" },
1362
+ { identifier: "minimax-h3-image-i2i:1K:1ref", credits: 6, note: "1K, one reference image (the least)" },
1363
+ { identifier: "minimax-h3-image-i2i:2K:1ref", credits: 6, note: "2K, one reference image" },
1364
+ { identifier: "minimax-h3-image-i2i:2K:4ref", credits: 10, note: "2K, four reference images" },
1365
+ { identifier: "minimax-h3-image-i2i:4K:1ref", credits: 15, note: "4K, one reference image" },
1366
+ { identifier: "minimax-h3-image-i2i:2K:16ref", credits: 25, note: "2K, sixteen reference images" },
1367
+ { identifier: "minimax-h3-image-i2i:4K:16ref", credits: 34, note: "4K, sixteen reference images (the most)" }
1368
+ ]
1369
+ },
1186
1370
  // ── Alibaba Qwen ──
1187
1371
  "qwen": {
1188
1372
  id: "qwen",
@@ -1382,6 +1566,28 @@ var IMAGE_MODELS = {
1382
1566
  { identifier: "topaz-image-upscale", credits: 25, note: "1x / 2x" },
1383
1567
  { identifier: "topaz-image-upscale:4K", credits: 50, note: "4x (legacy identifier)" }
1384
1568
  ]
1569
+ },
1570
+ "nodaro-image-upscale": {
1571
+ id: "nodaro-image-upscale",
1572
+ kind: "image",
1573
+ modes: ["upscale"],
1574
+ family: "Nodaro Upscale",
1575
+ ownLabel: true,
1576
+ label: "Nodaro Image Upscale",
1577
+ series: "Nodaro Upscale",
1578
+ description: "Image upscale at 1x (enhance only), 2x, 4x or 8x. Restores detail and keeps lettering exactly as written; the output is the input times the factor, nothing cropped. Priced by the output's size.",
1579
+ useCases: ["upscale", "high-res", "typography", "utility"],
1580
+ features: ["reference-image"],
1581
+ // No `resolutions`: the one lever is the upscale factor (`NODARO_IMAGE_UPSCALE_FACTORS`).
1582
+ // The price follows the OUTPUT's total pixels (`@nodaro/render-rules`
1583
+ // nodaro-image-upscale-pricing.ts); the bare id is the hold when the image's size
1584
+ // cannot be read before the run, settled to the delivered output's tier.
1585
+ pricing: [
1586
+ { identifier: "nodaro-image-upscale:2K", credits: 4, note: "output up to 4,194,304 pixels (2048 \xD7 2048)" },
1587
+ { identifier: "nodaro-image-upscale:4K", credits: 10, note: "output up to 16,777,216 pixels (4096 \xD7 4096)" },
1588
+ { identifier: "nodaro-image-upscale:8K", credits: 30, note: "output up to 67,108,864 pixels (8192 \xD7 8192)" },
1589
+ { identifier: "nodaro-image-upscale", credits: 30, note: "held when the image's size cannot be read before the run; the output's tier is charged" }
1590
+ ]
1385
1591
  }
1386
1592
  };
1387
1593
  var VIDEO_MODELS = {
@@ -1847,6 +2053,50 @@ var VIDEO_MODELS = {
1847
2053
  { identifier: "kling-4-keyframes:30s:1080p", credits: 3190, note: "30s 1080p (max)" }
1848
2054
  ]
1849
2055
  },
2056
+ // Kling 4.0 Flash — ONE id over KIE's two Flash endpoints, picked by what is
2057
+ // wired (backend kie/kling4.ts): a start frame alone runs on
2058
+ // docs.kie.ai/market/kling/v4-flash-keyframe-to-video, where it is the exact
2059
+ // opening frame; everything else (text, reference images, videos,
2060
+ // characters, or a start frame beside any of them) runs on
2061
+ // docs.kie.ai/market/kling/v4-flash-reference-to-video, where a start frame
2062
+ // joins the reference images as on kling-4. Reference: up to 10 images, 5
2063
+ // videos (2-20s together) and 7 characters (15 in all). No standalone voices:
2064
+ // audio clip N becomes wired character N's voice when that character has 2-4
2065
+ // images (otherwise the clip is dropped). No end
2066
+ // frame, no 1080p, no seed. 3-20s, 720p, native audio always on. Per-second
2067
+ // billing; a reference-video run bills its input seconds too.
2068
+ "kling-4-flash": {
2069
+ id: "kling-4-flash",
2070
+ kind: "video",
2071
+ modes: ["i2v", "t2v"],
2072
+ family: "Kuaishou",
2073
+ maker: "kuaishou",
2074
+ label: "Kling 4.0 Flash",
2075
+ series: "Kling",
2076
+ description: "Kling 4.0 Flash \u2014 the faster, lower-cost Kling 4.0 at 720p, up to 20s with native audio; a start frame, reference images, videos and characters (each can carry a voice clip), or plain text.",
2077
+ useCases: ["fast", "cheap", "narrative", "reference"],
2078
+ // No `voices` array on Flash: a reference audio clip is a character's voice
2079
+ // (`voice-references` names that input "Voice Refs"). No `audio-soundtrack`
2080
+ // (the clips are voices, never a soundtrack), no `end-frame`, no
2081
+ // `video-reference` (the generate-video-pro extend chain is unwired, as on
2082
+ // kling-4).
2083
+ features: ["audio", "reference-image", "reference-to-video", "character-subjects", "voice-references"],
2084
+ aspectRatios: VIDEO_RATIOS_KLING_4,
2085
+ durations: [3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20],
2086
+ defaultDuration: 5,
2087
+ resolutions: ["720p"],
2088
+ unlistedResolutionRendersAs: "720p",
2089
+ noSeed: true,
2090
+ // neither Flash schema has a `seed` (additionalProperties: false)
2091
+ pricing: [
2092
+ { identifier: "kling-4-flash", credits: 220, note: "default 5s 720p \u2014 see :Ns:720p variants for exact" },
2093
+ { identifier: "kling-4-flash:5s:720p", credits: 220, note: "5s 720p (the default tier)" },
2094
+ { identifier: "kling-4-flash:3s:720p", credits: 130, note: "3s 720p (min)" },
2095
+ { identifier: "kling-4-flash:10s:720p", credits: 430, note: "10s 720p" },
2096
+ { identifier: "kling-4-flash:20s:720p", credits: 850, note: "20s 720p (max)" },
2097
+ { identifier: "kling-4-flash:8s:720p-ref", credits: 230, note: "per-second anchor with a reference video: billed \xD7 (output + max(output, input seconds)) \xF7 8" }
2098
+ ]
2099
+ },
1850
2100
  // ── xAI Grok video ──
1851
2101
  "grok-i2v": {
1852
2102
  id: "grok-i2v",
@@ -1870,35 +2120,50 @@ var VIDEO_MODELS = {
1870
2120
  { identifier: "grok-i2v:15s", credits: 100 }
1871
2121
  ]
1872
2122
  },
1873
- // xAI Grok Imagine Video 1.5 — KIE image-to-video (image required). True
1874
- // per-second billing split 480p/720p. modes:["i2v"] is the honest capability;
1875
- // it's also surfaced in the text-to-video dropdown for the unified node, where
1876
- // the t2v route returns a clean "requires an input image" 400.
2123
+ // xAI Grok Imagine Video 1.5 — KIE image-to-video
2124
+ // (docs.kie.ai/market/grok-imagine/1-5-preview), built by the backend's
2125
+ // bespoke runner (kie/grok-video-15.ts). The start frame is the exact first
2126
+ // frame and an end frame the exact last frame; one picture wired as both is a
2127
+ // seamless loop (KIE `loop_url`). The Image References are up to 4
2128
+ // in-between frames (KIE `keyframes`), spread evenly over the clip at whole
2129
+ // seconds — frames only, never loose references, so `keyframes` is declared
2130
+ // (it also keeps the model out of generate-video-pro, whose segments would
2131
+ // send cast references as frames). modes:["i2v"] and no `reference-to-video`:
2132
+ // every run needs its start image, in-between frames included. It is also
2133
+ // surfaced in the text-to-video dropdown for the unified node, where the t2v
2134
+ // route returns a clean "requires an input image" 400. Per-second billing by
2135
+ // resolution, with no per-image part.
1877
2136
  "grok-imagine-video-1.5": {
1878
2137
  id: "grok-imagine-video-1.5",
1879
2138
  kind: "video",
1880
2139
  modes: ["i2v"],
1881
- // No `reference-image` (locked by video-reference-features.test.ts, 2026-06-28
1882
- // audit): KIE's grok-imagine endpoint accepts a single image_url (the i2v
1883
- // start frame) only — there is no reference transport, so advertising the
1884
- // feature let the editor attach refs that were silently dropped at the
1885
- // provider. Also kept OUT of VIDEO_REF_LIMITS_BY_PROVIDER for the same reason.
2140
+ features: ["end-frame", "reference-image", "keyframes"],
1886
2141
  family: "xAI",
1887
2142
  maker: "xai",
1888
2143
  label: "Grok Imagine Video 1.5",
1889
2144
  series: "Grok",
1890
- description: "Grok Imagine 1.5 image-to-video \u2014 1\u201315s, 480p/720p, per-second pricing. Requires an input image.",
2145
+ description: "Grok Imagine Video 1.5 \u2014 1\u201315s at 480p, 720p or 1080p, per-second pricing. An exact first and last frame (the same image as both makes a seamless loop) and up to 4 in-between frames. Requires an input image.",
1891
2146
  useCases: ["stylized", "motion"],
1892
2147
  aspectRatios: ["16:9", "9:16", "1:1", "4:3", "3:4"],
1893
2148
  durations: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15],
1894
2149
  defaultDuration: 8,
1895
- resolutions: ["480p", "720p"],
2150
+ resolutions: ["480p", "720p", "1080p"],
2151
+ // normalizeGrokVideo15Resolution sends 480p for anything off the list.
2152
+ unlistedResolutionRendersAs: "480p",
2153
+ // KIE refuses 1080p beside anything but a lone start frame ("1080p is only
2154
+ // supported for text-to-video or a single image used as the first frame",
2155
+ // a staging run 2026-11-12): no end frame, loop or in-between frames.
2156
+ startFrameOnlyResolutions: ["1080p"],
2157
+ noSeed: true,
2158
+ // the KIE schema has no `seed` (additionalProperties: false)
1896
2159
  pricing: [
1897
- { identifier: "grok-imagine-video-1.5", credits: 295, note: "default 8s 480p \u2014 see :Ns:res variants" },
1898
- { identifier: "grok-imagine-video-1.5:8s:480p", credits: 300, note: "8s 480p" },
1899
- { identifier: "grok-imagine-video-1.5:8s:720p", credits: 510, note: "8s 720p" },
1900
- { identifier: "grok-imagine-video-1.5:15s:480p", credits: 550, note: "15s 480p (max)" },
1901
- { identifier: "grok-imagine-video-1.5:15s:720p", credits: 950, note: "15s 720p (max)" }
2160
+ { identifier: "grok-imagine-video-1.5", credits: 50, note: "default 8s 480p \u2014 see :Ns:res variants" },
2161
+ { identifier: "grok-imagine-video-1.5:8s:480p", credits: 50, note: "8s 480p" },
2162
+ { identifier: "grok-imagine-video-1.5:8s:720p", credits: 90, note: "8s 720p" },
2163
+ { identifier: "grok-imagine-video-1.5:8s:1080p", credits: 160, note: "8s 1080p" },
2164
+ { identifier: "grok-imagine-video-1.5:15s:480p", credits: 90, note: "15s 480p (max)" },
2165
+ { identifier: "grok-imagine-video-1.5:15s:720p", credits: 170, note: "15s 720p (max)" },
2166
+ { identifier: "grok-imagine-video-1.5:15s:1080p", credits: 300, note: "15s 1080p (max)" }
1902
2167
  ]
1903
2168
  },
1904
2169
  // ── Bytedance Seedance ──
@@ -2005,6 +2270,7 @@ var VIDEO_MODELS = {
2005
2270
  durations: [4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30],
2006
2271
  defaultDuration: 8,
2007
2272
  autoDuration: true,
2273
+ referenceTaskTypes: ["reference", "edit", "extend"],
2008
2274
  resolutions: ["480p", "720p", "1080p"],
2009
2275
  // KIE refuses a seed on Seedance 2.5 (422) — the provider config omits it.
2010
2276
  noSeed: true,
@@ -2562,24 +2828,45 @@ var VIDEO_MODELS = {
2562
2828
  useCases: ["extend"],
2563
2829
  pricing: [{ identifier: "runway-extend", credits: 320 }]
2564
2830
  },
2565
- "seedance-2-extend": {
2566
- id: "seedance-2-extend",
2831
+ // Seedance extends ANY video, one provider per model. Each is priced on its
2832
+ // own rows (`seedanceExtendCreditId`), one per second added and resolution.
2833
+ // The earlier single id `seedance-2-extend` is retired and runs as Seedance 2.5.
2834
+ "seedance-2-5-extend": {
2835
+ id: "seedance-2-5-extend",
2567
2836
  kind: "video",
2568
2837
  modes: ["extend"],
2569
2838
  family: "Bytedance",
2570
2839
  maker: "bytedance",
2571
- label: "Seedance 2 Extend",
2840
+ label: "Seedance 2.5 Extend",
2572
2841
  series: "Seedance",
2573
- description: "Extend ANY video: generates the continuation (audio included) and trim-stitches it into one seamless clip.",
2842
+ description: "Extend ANY video with Seedance 2.5: 4\u201330s continuation (audio included), stitched into one seamless clip.",
2843
+ useCases: ["extend"],
2844
+ durations: [4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30],
2845
+ defaultDuration: 8,
2846
+ resolutions: ["480p", "720p", "1080p"],
2847
+ pricing: [
2848
+ { identifier: "seedance-2-5-extend:8s:720p", credits: 950, note: "default 8s 720p \u2014 see :Ns:res variants for exact" },
2849
+ { identifier: "seedance-2-5-extend:8s:480p", credits: 425, note: "8s 480p" },
2850
+ { identifier: "seedance-2-5-extend:8s:1080p", credits: 2375, note: "8s 1080p" }
2851
+ ]
2852
+ },
2853
+ "seedance-2-0-extend": {
2854
+ id: "seedance-2-0-extend",
2855
+ kind: "video",
2856
+ modes: ["extend"],
2857
+ family: "Bytedance",
2858
+ maker: "bytedance",
2859
+ label: "Seedance 2.0 Extend",
2860
+ series: "Seedance",
2861
+ description: "Extend ANY video with Seedance 2.0: 4\u201315s continuation (audio included), stitched into one seamless clip.",
2574
2862
  useCases: ["extend"],
2575
2863
  durations: [4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15],
2576
2864
  defaultDuration: 8,
2577
2865
  resolutions: ["480p", "720p", "1080p"],
2578
2866
  pricing: [
2579
- { identifier: "seedance-2-extend", credits: 530, note: "default 8s 720p (ref-mode 50 + 3 stitch) \u2014 see :NsR variants" },
2580
- { identifier: "seedance-2-extend:8s:480p", credits: 260, note: "8s 480p (23+3)" },
2581
- { identifier: "seedance-2-extend:8s:720p", credits: 530, note: "8s 720p (50+3)" },
2582
- { identifier: "seedance-2-extend:8s:1080p", credits: 780, note: "8s 1080p (75+3)" }
2867
+ { identifier: "seedance-2-0-extend:8s:720p", credits: 625, note: "default 8s 720p \u2014 see :Ns:res variants for exact" },
2868
+ { identifier: "seedance-2-0-extend:8s:480p", credits: 288, note: "8s 480p" },
2869
+ { identifier: "seedance-2-0-extend:8s:1080p", credits: 1550, note: "8s 1080p" }
2583
2870
  ]
2584
2871
  },
2585
2872
  "veo-1080p": {
@@ -3618,9 +3905,51 @@ var MODEL_INPUT_ADJUSTMENT_FIELDS = [
3618
3905
  var IMAGE_GIF_FRAME_SIZE = 512;
3619
3906
  var MASKLESS_OUTPUT_FORMATS = ["gif", "svg"];
3620
3907
  var TRANSPARENT_OUTPUT_FORMATS = ["png", "webp"];
3908
+ function maskEditMatchesSource(modelId, masked) {
3909
+ return masked === true && !!modelId && MODEL_CATALOG[modelId]?.maskEditMatchesSource === true;
3910
+ }
3911
+ function sourceImageSizeNeeded(modelId, aspectRatio, masked) {
3912
+ return autoAspectNeedsSourceImage(modelId, aspectRatio) || maskEditMatchesSource(modelId, masked);
3913
+ }
3914
+ function maskedEditResolution(modelId, levers, sourceImage) {
3915
+ if (!maskEditMatchesSource(modelId, true) || !usableSize(sourceImage)) return void 0;
3916
+ const str = (v) => typeof v === "string" && v.length > 0 ? v : void 0;
3917
+ return normalizeModelInput(
3918
+ modelId,
3919
+ { aspectRatio: str(levers.aspectRatio), resolution: str(levers.resolution), background: str(levers.background), outputFormat: str(levers.outputFormat) },
3920
+ { sourceImage, masked: true }
3921
+ ).resolution;
3922
+ }
3923
+ function resolutionNearestSource(modelId, aspectRatio, source) {
3924
+ const m = MODEL_CATALOG[modelId];
3925
+ const table = m?.outputSizes;
3926
+ if (!table || typeof aspectRatio !== "string" || !usableSize(source)) return void 0;
3927
+ if (!Object.prototype.hasOwnProperty.call(table, aspectRatio)) return void 0;
3928
+ const sizes = table[aspectRatio];
3929
+ const long = Math.max(source.width, source.height);
3930
+ let best;
3931
+ let bestDist = Infinity;
3932
+ for (const resolution of m.resolutions ?? Object.keys(sizes)) {
3933
+ const px = Object.prototype.hasOwnProperty.call(sizes, resolution) ? sizes[resolution] : void 0;
3934
+ if (!px) continue;
3935
+ const dist = Math.abs(Math.log(Math.max(px[0], px[1]) / long));
3936
+ if (dist <= bestDist + ASPECT_TIE_EPSILON) {
3937
+ bestDist = dist;
3938
+ best = resolution;
3939
+ }
3940
+ }
3941
+ return best;
3942
+ }
3621
3943
  function isAutoAspectToken(value) {
3622
3944
  return typeof value === "string" && value.trim().toLowerCase() === "auto";
3623
3945
  }
3946
+ function isVideoAutoAspectToken(value) {
3947
+ return value === "Auto" || value === "auto";
3948
+ }
3949
+ function videoAutoAspectRunsAt(modelId, hasVisualInput) {
3950
+ if (!hasVisualInput || !modelId) return void 0;
3951
+ return MODEL_CATALOG[modelId]?.aspectRatios?.includes("adaptive") ? "adaptive" : void 0;
3952
+ }
3624
3953
  function usableSize(size) {
3625
3954
  return size !== void 0 && Number.isFinite(size.width) && size.width > 0 && Number.isFinite(size.height) && size.height > 0;
3626
3955
  }
@@ -3701,8 +4030,23 @@ function normalizeModelInput(modelId, input, context = {}) {
3701
4030
  out.gifFrameDurationMs = format.levers.gifFrameDurationMs;
3702
4031
  out.svgLevel = format.levers.svgLevel;
3703
4032
  const gif = format.levers.outputFormat === "gif";
3704
- const sourceRatio = !gif && autoAspectNeedsSourceImage(modelId, input.aspectRatio) && usableSize(context.sourceImage) ? nearestCatalogAspectRatio(context.sourceImage.width, context.sourceImage.height, m.aspectRatios ?? []) : void 0;
3705
- if (gif) {
4033
+ const followsSource = !gif && maskEditMatchesSource(modelId, context.masked);
4034
+ const askedRatio = followsSource ? "auto" : input.aspectRatio;
4035
+ const sourceRatio = !gif && autoAspectNeedsSourceImage(modelId, askedRatio) && usableSize(context.sourceImage) ? nearestCatalogAspectRatio(context.sourceImage.width, context.sourceImage.height, m.aspectRatios ?? []) : void 0;
4036
+ if (followsSource && input.aspectRatio !== void 0 && !isAutoAspectToken(input.aspectRatio)) {
4037
+ const to = sourceRatio ?? "auto";
4038
+ if (to !== input.aspectRatio) {
4039
+ adjustments.push({
4040
+ field: "aspectRatio",
4041
+ from: input.aspectRatio,
4042
+ to,
4043
+ reason: sourceRatio !== void 0 ? `A masked edit on ${m.label} keeps the photo's shape \u2014 using "${sourceRatio}", the supported ratio closest to the source image (${context.sourceImage.width}x${context.sourceImage.height}).` : `A masked edit on ${m.label} keeps the photo's shape \u2014 using "auto".`
4044
+ });
4045
+ }
4046
+ out.aspectRatio = to;
4047
+ } else if (followsSource && input.aspectRatio === void 0) {
4048
+ out.aspectRatio = sourceRatio ?? "auto";
4049
+ } else if (gif) {
3706
4050
  if (input.aspectRatio !== void 0 && input.aspectRatio !== "1:1" && !isAutoAspectToken(input.aspectRatio)) {
3707
4051
  adjustments.push({
3708
4052
  field: "aspectRatio",
@@ -3712,12 +4056,12 @@ function normalizeModelInput(modelId, input, context = {}) {
3712
4056
  });
3713
4057
  }
3714
4058
  out.aspectRatio = input.aspectRatio === void 0 ? void 0 : "1:1";
3715
- } else if (sourceRatio !== void 0 && input.aspectRatio !== void 0) {
4059
+ } else if (sourceRatio !== void 0 && askedRatio !== void 0) {
3716
4060
  const { width, height } = context.sourceImage;
3717
4061
  const why = m.autoAspectFromSourceImage === true ? `${m.label}'s own "auto" does not keep the photo's shape` : `${m.label} has no "auto" aspect ratio`;
3718
4062
  adjustments.push({
3719
4063
  field: "aspectRatio",
3720
- from: input.aspectRatio,
4064
+ from: input.aspectRatio ?? askedRatio,
3721
4065
  to: sourceRatio,
3722
4066
  reason: `${why} \u2014 using "${sourceRatio}", the supported ratio closest to the source image's shape (${width}x${height}).`
3723
4067
  });
@@ -3725,7 +4069,21 @@ function normalizeModelInput(modelId, input, context = {}) {
3725
4069
  } else {
3726
4070
  out.aspectRatio = snap("aspectRatio", input.aspectRatio, m.aspectRatios);
3727
4071
  }
3728
- if (gif) {
4072
+ if (followsSource) {
4073
+ const asked = snap("resolution", input.resolution, m.resolutions, defaultResolutionFor(modelId));
4074
+ const nearest = resolutionNearestSource(modelId, out.aspectRatio, context.sourceImage);
4075
+ const from = asked ?? m.defaultResolution ?? m.resolutions?.[0];
4076
+ if (nearest !== void 0 && from !== void 0 && nearest !== from) {
4077
+ const { width, height } = context.sourceImage;
4078
+ adjustments.push({
4079
+ field: "resolution",
4080
+ from,
4081
+ to: nearest,
4082
+ reason: `A masked edit on ${m.label} is delivered at the photo's own size (${width}x${height}) \u2014 rendering at ${nearest}, the size nearest it.`
4083
+ });
4084
+ }
4085
+ out.resolution = nearest ?? asked;
4086
+ } else if (gif) {
3729
4087
  if (input.resolution !== void 0) {
3730
4088
  adjustments.push({
3731
4089
  field: "resolution",
@@ -3991,6 +4349,8 @@ var MODEL_VALUE_LABELS = {
3991
4349
  "adaptive": "Adaptive",
3992
4350
  // image resolutions
3993
4351
  "1K": "1K (Standard)",
4352
+ // Only Seedream 5.5 lists it.
4353
+ "1.5K": "1.5K (Medium)",
3994
4354
  "2K": "2K (High)",
3995
4355
  "4K": "4K (Ultra)",
3996
4356
  "4k": "4K",
@@ -4161,6 +4521,6 @@ function modelIdsByKindMode(kind, modes, opts = {}) {
4161
4521
  return ids;
4162
4522
  }
4163
4523
 
4164
- export { FLUX2_RES_MP, IMAGE_GIF_FRAME_SIZE, IMAGE_OUTPUT_FORMAT_LABELS, IMAGE_SVG_LEVEL_LABELS, MASKLESS_OUTPUT_FORMATS, MODEL_CATALOG, MODEL_INPUT_ADJUSTMENT_FIELDS, MODEL_KINDS, MODEL_MAKERS, MODEL_RECOMMENDATIONS, SEEDANCE_DRAFT_FINALIZE_MAX_SEC, SEEDANCE_DRAFT_FINALIZE_MIN_SEC, SEEDANCE_DRAFT_FINALIZE_PROVIDER, SEEDANCE_DRAFT_FINALIZE_RESOLUTION, SEEDANCE_DRAFT_MODELS, SEEDANCE_DRAFT_RESOLUTION, SPEECH_UNIT_PRICE_NOTE, TRANSPARENT_OUTPUT_FORMATS, VIDEO_DURATION_AUTO, aspectRatioOptionsByKind, autoAspectNeedsSourceImage, backgroundOptionsByKind, buildModelMenu, creditRangesAll, defaultResolutionFor, durationsByMode, fitAspectRatioToModel, getAspectRatioOptions, getCreditRange, getDurationsForModel, getModel, getQualityOptions, getResolutionOptions, groupByFamily, groupByKindAndFamily, hasFeature, isAutoAspectToken, isAutoVideoDuration, isFlux2Model, isModelMakerId, isSeedanceDraftCapable, listModels, modelIdsByKindMode, modelMakerOf, modelTakesSeed, modelsWithFeature, nearestCatalogAspectRatio, normalizeModelInput, normalizeVideoRequestParams, outputFormatOptionsByKind, qualityOptionsByKind, resolutionAtAspectRatio, resolutionOptionsByKind, resolutionsAtAspectRatio, seedanceDraftFinalizeBillableSec, seedanceDraftFinalizeCreditId, svgLevelOptionsByKind, validateModelInput };
4165
- //# sourceMappingURL=chunk-KOLC7AF2.js.map
4166
- //# sourceMappingURL=chunk-KOLC7AF2.js.map
4524
+ export { FLUX2_RES_MP, IMAGE_GIF_FRAME_SIZE, IMAGE_OUTPUT_FORMAT_LABELS, IMAGE_SVG_LEVEL_LABELS, MASKLESS_OUTPUT_FORMATS, MINIMAX_H3_IMAGE_DEFAULT_RESOLUTION, MINIMAX_H3_IMAGE_I2I, MINIMAX_H3_IMAGE_MAX_INPUT_IMAGES, MINIMAX_H3_IMAGE_RESOLUTIONS, MINIMAX_H3_IMAGE_T2I, MODEL_CATALOG, MODEL_INPUT_ADJUSTMENT_FIELDS, MODEL_KINDS, MODEL_MAKERS, MODEL_RECOMMENDATIONS, SEEDANCE_DRAFT_FINALIZE_MAX_SEC, SEEDANCE_DRAFT_FINALIZE_MIN_SEC, SEEDANCE_DRAFT_FINALIZE_PROVIDER, SEEDANCE_DRAFT_FINALIZE_RESOLUTION, SEEDANCE_DRAFT_MODELS, SEEDANCE_DRAFT_RESOLUTION, SEEDREAM_5_5_DEFAULT_RESOLUTION, SEEDREAM_5_5_I2I, SEEDREAM_5_5_MAX_INPUT_IMAGES, SEEDREAM_5_5_MIN_PROMPT_CHARS, SEEDREAM_5_5_RESOLUTIONS, SEEDREAM_5_5_T2I, SPEECH_UNIT_PRICE_NOTE, TRANSPARENT_OUTPUT_FORMATS, VIDEO_DURATION_AUTO, aspectRatioOptionsByKind, autoAspectNeedsSourceImage, backgroundOptionsByKind, buildModelMenu, creditRangesAll, defaultResolutionFor, durationsByMode, fitAspectRatioToModel, getAspectRatioOptions, getCreditRange, getDurationsForModel, getModel, getQualityOptions, getResolutionOptions, groupByFamily, groupByKindAndFamily, hasFeature, isAutoAspectToken, isAutoVideoDuration, isFlux2Model, isMinimaxH3Image, isMinimaxH3ImageI2i, isModelMakerId, isSeedanceDraftCapable, isSeedream55, isSeedream55I2i, isVideoAutoAspectToken, listModels, maskEditMatchesSource, maskedEditResolution, minimaxH3ImageCreditId, modelIdsByKindMode, modelMakerOf, modelTakesSeed, modelsWithFeature, nearestCatalogAspectRatio, normalizeModelInput, normalizeVideoRequestParams, outputFormatOptionsByKind, qualityOptionsByKind, resolutionAtAspectRatio, resolutionNearestSource, resolutionOptionsByKind, resolutionsAtAspectRatio, seedanceDraftFinalizeBillableSec, seedanceDraftFinalizeCreditId, seedream55Resolution, sourceImageSizeNeeded, svgLevelOptionsByKind, validateModelInput, videoAutoAspectRunsAt };
4525
+ //# sourceMappingURL=chunk-5YYN5X57.js.map
4526
+ //# sourceMappingURL=chunk-5YYN5X57.js.map