@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
@@ -25,6 +25,31 @@ function isFlux2Model(m) {
25
25
  return m === "flux-2-klein" || m === "flux-2-pro" || m === "flux-2-max";
26
26
  }
27
27
 
28
+ // src/minimax-h3-image.ts
29
+ var MINIMAX_H3_IMAGE_T2I = "minimax-h3-image";
30
+ var MINIMAX_H3_IMAGE_I2I = "minimax-h3-image-i2i";
31
+ var MINIMAX_H3_IMAGE_RESOLUTIONS = ["1K", "2K", "4K"];
32
+ var MINIMAX_H3_IMAGE_DEFAULT_RESOLUTION = "2K";
33
+ var MINIMAX_H3_IMAGE_MAX_INPUT_IMAGES = 16;
34
+ function isMinimaxH3Image(model) {
35
+ return model === MINIMAX_H3_IMAGE_T2I || model === MINIMAX_H3_IMAGE_I2I;
36
+ }
37
+ function isMinimaxH3ImageI2i(model) {
38
+ return model === MINIMAX_H3_IMAGE_I2I;
39
+ }
40
+ function pricedResolution(resolution) {
41
+ const asked = typeof resolution === "string" ? resolution.trim().toLowerCase() : "";
42
+ return MINIMAX_H3_IMAGE_RESOLUTIONS.find((r) => r.toLowerCase() === asked) ?? MINIMAX_H3_IMAGE_DEFAULT_RESOLUTION;
43
+ }
44
+ function minimaxH3ImageCreditId(provider, resolution, referenceImageCount) {
45
+ const size = pricedResolution(resolution);
46
+ const asked = Number.isFinite(referenceImageCount) ? Math.trunc(referenceImageCount) : 0;
47
+ const edit = provider === MINIMAX_H3_IMAGE_I2I || asked > 0;
48
+ if (!edit) return `${MINIMAX_H3_IMAGE_T2I}:${size}`;
49
+ const images = Math.min(Math.max(1, asked), MINIMAX_H3_IMAGE_MAX_INPUT_IMAGES);
50
+ return `${MINIMAX_H3_IMAGE_I2I}:${size}:${images}ref`;
51
+ }
52
+
28
53
  // src/video-duration-auto.ts
29
54
  var VIDEO_DURATION_AUTO = -1;
30
55
  function isAutoVideoDuration(duration) {
@@ -32,6 +57,24 @@ function isAutoVideoDuration(duration) {
32
57
  return n === VIDEO_DURATION_AUTO;
33
58
  }
34
59
 
60
+ // src/seedream-5-5.ts
61
+ var SEEDREAM_5_5_T2I = "seedream-5-5";
62
+ var SEEDREAM_5_5_I2I = "seedream-5-5-i2i";
63
+ var SEEDREAM_5_5_RESOLUTIONS = ["1K", "1.5K", "2K"];
64
+ var SEEDREAM_5_5_DEFAULT_RESOLUTION = "2K";
65
+ var SEEDREAM_5_5_MAX_INPUT_IMAGES = 10;
66
+ var SEEDREAM_5_5_MIN_PROMPT_CHARS = 5;
67
+ function isSeedream55I2i(model) {
68
+ return model === SEEDREAM_5_5_I2I;
69
+ }
70
+ function isSeedream55(model) {
71
+ return model === SEEDREAM_5_5_T2I || model === SEEDREAM_5_5_I2I;
72
+ }
73
+ function seedream55Resolution(resolution) {
74
+ const asked = typeof resolution === "string" ? resolution.trim().toUpperCase() : "";
75
+ return SEEDREAM_5_5_RESOLUTIONS.find((r) => r === asked) ?? SEEDREAM_5_5_DEFAULT_RESOLUTION;
76
+ }
77
+
35
78
  // src/model-catalog.ts
36
79
  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";
37
80
  var MODEL_MAKERS = {
@@ -60,6 +103,7 @@ function isModelMakerId(value) {
60
103
  return typeof value === "string" && Object.hasOwn(MODEL_MAKERS, value);
61
104
  }
62
105
  function modelMakerOf(entry) {
106
+ if (entry.ownLabel === true) return void 0;
63
107
  return isModelMakerId(entry.maker) ? { id: entry.maker, name: MODEL_MAKERS[entry.maker].name } : void 0;
64
108
  }
65
109
  var MODEL_RECOMMENDATIONS = [
@@ -72,6 +116,7 @@ var MODEL_RECOMMENDATIONS = [
72
116
  { 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." },
73
117
  { 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." },
74
118
  { 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)." },
119
+ { 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." },
75
120
  { intent: "background removal / cutout", modelIds: ["recraft-remove-bg"], note: "Cheap, no prompt needed." },
76
121
  // video
77
122
  { 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." },
@@ -131,6 +176,23 @@ var GPT_IMAGE_2_6_RATIOS = [
131
176
  "1:3"
132
177
  ];
133
178
  var GPT_IMAGE_2_6_ECONOMY_RATIOS = ["auto", "1:1", "16:9", "9:16", "3:2", "2:3", "21:9", "4:3"];
179
+ var GPT_IMAGE_2_6_OUTPUT_SIZES = {
180
+ "1:1": { "1K": [1024, 1024], "2K": [2048, 2048], "4K": [2880, 2880] },
181
+ "3:2": { "1K": [1536, 1024], "2K": [2048, 1360], "4K": [3520, 2336] },
182
+ "2:3": { "1K": [1024, 1536], "2K": [1360, 2048], "4K": [2336, 3520] },
183
+ "4:3": { "1K": [1024, 768], "2K": [2048, 1536], "4K": [3312, 2480] },
184
+ "3:4": { "1K": [768, 1024], "2K": [1536, 2048], "4K": [2480, 3312] },
185
+ "5:4": { "1K": [1280, 1024], "2K": [2560, 2048], "4K": [3216, 2576] },
186
+ "4:5": { "1K": [1024, 1280], "2K": [2048, 2560], "4K": [2576, 3216] },
187
+ "16:9": { "1K": [1536, 864], "2K": [2048, 1152], "4K": [3840, 2160] },
188
+ "9:16": { "1K": [864, 1536], "2K": [1152, 2048], "4K": [2160, 3840] },
189
+ "2:1": { "1K": [2048, 1024], "2K": [2688, 1344], "4K": [3840, 1920] },
190
+ "1:2": { "1K": [1024, 2048], "2K": [1344, 2688], "4K": [1920, 3840] },
191
+ "21:9": { "1K": [2016, 864], "2K": [2688, 1152], "4K": [3840, 1648] },
192
+ "9:21": { "1K": [864, 2016], "2K": [1152, 2688], "4K": [1648, 3840] },
193
+ "3:1": { "1K": [1536, 512], "2K": [3072, 1024], "4K": [3840, 1280] },
194
+ "1:3": { "1K": [512, 1536], "2K": [1024, 3072], "4K": [1280, 3840] }
195
+ };
134
196
  var GPT_IMAGE_2_6_VALUE_LABELS = {
135
197
  "3:2": "3:2 (Landscape)",
136
198
  "2:3": "2:3 (Portrait)",
@@ -157,6 +219,10 @@ var GPT_IMAGE_2_6_SVG_LEVELS = ["standard", "detailed", "max"];
157
219
  var IMAGEN4_RATIOS = ["1:1", "16:9", "9:16", "4:3", "3:4"];
158
220
  var IDEOGRAM_RATIOS = ["1:1", "16:9", "9:16", "4:3", "3:4"];
159
221
  var SEEDREAM_RATIOS = ["1:1", "16:9", "9:16", "4:3", "3:4", "3:2", "2:3", "21:9"];
222
+ 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"];
223
+ var SEEDREAM_5_5_I2I_RATIOS = ["auto", ...SEEDREAM_RATIOS];
224
+ var SEEDREAM_5_5_BACKGROUNDS = ["auto", "opaque", "transparent"];
225
+ var SEEDREAM_5_5_FORMATS = ["png", "jpeg"];
160
226
  var Z_IMAGE_RATIOS = ["1:1", "16:9", "9:16", "4:3", "3:4"];
161
227
  var VIDEO_RATIOS_HV = ["16:9", "9:16"];
162
228
  var VIDEO_RATIOS_HVS = ["16:9", "9:16", "1:1"];
@@ -751,11 +817,13 @@ var IMAGE_MODELS = {
751
817
  maker: "openai",
752
818
  label: "GPT Image 2.6 Flare (I2I)",
753
819
  series: "GPT Image",
754
- 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.",
755
- useCases: ["edit", "high-res"],
756
- features: ["reference-image"],
820
+ 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.",
821
+ useCases: ["edit", "inpaint", "high-res"],
822
+ features: ["reference-image", "mask"],
757
823
  aspectRatios: GPT_IMAGE_2_6_RATIOS,
758
824
  autoAspectFromSourceImage: true,
825
+ outputSizes: GPT_IMAGE_2_6_OUTPUT_SIZES,
826
+ maskEditMatchesSource: true,
759
827
  resolutions: ["1K", "2K", "4K"],
760
828
  qualities: ["auto", "low", "medium", "high", "xhigh", "max"],
761
829
  defaultQuality: "medium",
@@ -859,11 +927,13 @@ var IMAGE_MODELS = {
859
927
  maker: "openai",
860
928
  label: "GPT Image 2.6 Sunburst (I2I)",
861
929
  series: "GPT Image",
862
- 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.",
863
- useCases: ["edit", "high-res"],
864
- features: ["reference-image"],
930
+ 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.",
931
+ useCases: ["edit", "inpaint", "high-res"],
932
+ features: ["reference-image", "mask"],
865
933
  aspectRatios: GPT_IMAGE_2_6_RATIOS,
866
934
  autoAspectFromSourceImage: true,
935
+ outputSizes: GPT_IMAGE_2_6_OUTPUT_SIZES,
936
+ maskEditMatchesSource: true,
867
937
  resolutions: ["1K", "2K", "4K"],
868
938
  qualities: ["auto", "low", "medium", "high", "xhigh", "max"],
869
939
  defaultQuality: "medium",
@@ -1185,6 +1255,120 @@ var IMAGE_MODELS = {
1185
1255
  resolutions: ["1K", "2K"],
1186
1256
  pricing: [{ identifier: "seedream-5-flash-i2i", credits: 10, note: "1K / 2K flat" }]
1187
1257
  },
1258
+ // Seedream 5.5 — a different model from Seedream 5 Lite, Pro and Flash, priced
1259
+ // by its size (1K and 1.5K the same, 2K dearer) and, on an edit, by each input
1260
+ // image (the rows are `ee/billing/seedream-5-5-pricing.ts`).
1261
+ // See: docs.kie.ai/market/seedream/5-5-text-to-image.md
1262
+ // docs.kie.ai/market/seedream/5-5-image-to-image.md
1263
+ "seedream-5-5": {
1264
+ id: "seedream-5-5",
1265
+ kind: "image",
1266
+ modes: ["t2i"],
1267
+ family: "Bytedance",
1268
+ maker: "bytedance",
1269
+ label: "Seedream 5.5",
1270
+ series: "Seedream",
1271
+ 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.",
1272
+ useCases: ["realistic", "typography", "product", "transparent"],
1273
+ features: ["reference-image"],
1274
+ aspectRatios: SEEDREAM_RATIOS,
1275
+ strictAspectRatios: true,
1276
+ resolutions: SEEDREAM_5_5_RESOLUTIONS,
1277
+ defaultResolution: SEEDREAM_5_5_DEFAULT_RESOLUTION,
1278
+ backgrounds: SEEDREAM_5_5_BACKGROUNDS,
1279
+ outputFormats: SEEDREAM_5_5_FORMATS,
1280
+ pricing: [
1281
+ { identifier: "seedream-5-5", credits: 16, note: "2K default" },
1282
+ { identifier: "seedream-5-5:1K", credits: 9, note: "1K" },
1283
+ { identifier: "seedream-5-5:1.5K", credits: 9, note: "1.5K, the same as 1K" },
1284
+ { identifier: "seedream-5-5:2K", credits: 16, note: "2K" }
1285
+ ]
1286
+ },
1287
+ "seedream-5-5-i2i": {
1288
+ id: "seedream-5-5-i2i",
1289
+ kind: "image",
1290
+ modes: ["i2i"],
1291
+ family: "Bytedance",
1292
+ maker: "bytedance",
1293
+ label: "Seedream 5.5 (I2I)",
1294
+ series: "Seedream",
1295
+ 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).",
1296
+ useCases: ["edit", "iteration", "transparent"],
1297
+ features: ["reference-image"],
1298
+ aspectRatios: SEEDREAM_5_5_I2I_RATIOS,
1299
+ strictAspectRatios: true,
1300
+ resolutions: SEEDREAM_5_5_RESOLUTIONS,
1301
+ defaultResolution: SEEDREAM_5_5_DEFAULT_RESOLUTION,
1302
+ backgrounds: SEEDREAM_5_5_BACKGROUNDS,
1303
+ outputFormats: SEEDREAM_5_5_FORMATS,
1304
+ pricing: [
1305
+ { identifier: "seedream-5-5-i2i", credits: 20, note: "2K, one input image (the default)" },
1306
+ { identifier: "seedream-5-5-i2i:1K:1ref", credits: 13, note: "1K, one input image (the least)" },
1307
+ { identifier: "seedream-5-5-i2i:1.5K:1ref", credits: 13, note: "1.5K, one input image" },
1308
+ { identifier: "seedream-5-5-i2i:2K:1ref", credits: 20, note: "2K, one input image" },
1309
+ { identifier: "seedream-5-5-i2i:1K:10ref", credits: 45, note: "1K, ten input images" },
1310
+ { identifier: "seedream-5-5-i2i:2K:10ref", credits: 52, note: "2K, ten input images (the most)" }
1311
+ ]
1312
+ },
1313
+ // ── MiniMax H3 Image ──
1314
+ // MiniMax's H3 image model (KIE `minimax-h3/text-to-image` and
1315
+ // `minimax-h3/image-edit`). Not the H3 video model `minimax-h3`. A prompt
1316
+ // runs the text-to-image id; with reference images the run moves to the
1317
+ // edit id (`T2I_TO_I2I_VARIANT`). Priced by size, 1K and 2K the same, and an
1318
+ // edit by its reference images (`minimaxH3ImageCreditId`). "auto" is listed
1319
+ // LAST so a fallback that takes the first ratio lands on a real one: from a
1320
+ // prompt KIE's rewriter picks the ratio, in an edit it follows the first
1321
+ // reference image. KIE's prompt expansion is left on and its custom
1322
+ // width/height is not offered.
1323
+ // See: docs.kie.ai/market/minimax-h3/text-to-image.md
1324
+ // docs.kie.ai/market/minimax-h3/image-edit.md
1325
+ "minimax-h3-image": {
1326
+ id: "minimax-h3-image",
1327
+ kind: "image",
1328
+ modes: ["t2i"],
1329
+ family: "MiniMax",
1330
+ maker: "minimax",
1331
+ label: "MiniMax H3 Image",
1332
+ series: "MiniMax Image",
1333
+ 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.",
1334
+ useCases: ["typography", "high-res", "general"],
1335
+ features: ["reference-image"],
1336
+ aspectRatios: MINIMAX_H3_IMAGE_RATIOS,
1337
+ resolutions: MINIMAX_H3_IMAGE_RESOLUTIONS,
1338
+ defaultResolution: MINIMAX_H3_IMAGE_DEFAULT_RESOLUTION,
1339
+ outputFormats: ["png", "jpeg"],
1340
+ pricing: [
1341
+ { identifier: "minimax-h3-image", credits: 5, note: "2K default" },
1342
+ { identifier: "minimax-h3-image:1K", credits: 5, note: "1K" },
1343
+ { identifier: "minimax-h3-image:2K", credits: 5, note: "2K" },
1344
+ { identifier: "minimax-h3-image:4K", credits: 14, note: "4K" }
1345
+ ]
1346
+ },
1347
+ "minimax-h3-image-i2i": {
1348
+ id: "minimax-h3-image-i2i",
1349
+ kind: "image",
1350
+ modes: ["i2i"],
1351
+ family: "MiniMax",
1352
+ maker: "minimax",
1353
+ label: "MiniMax H3 Image (I2I)",
1354
+ series: "MiniMax Image",
1355
+ 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.",
1356
+ useCases: ["edit", "typography", "multi-reference"],
1357
+ features: ["reference-image"],
1358
+ aspectRatios: MINIMAX_H3_IMAGE_RATIOS,
1359
+ resolutions: MINIMAX_H3_IMAGE_RESOLUTIONS,
1360
+ defaultResolution: MINIMAX_H3_IMAGE_DEFAULT_RESOLUTION,
1361
+ outputFormats: ["png", "jpeg"],
1362
+ pricing: [
1363
+ { identifier: "minimax-h3-image-i2i", credits: 6, note: "2K, one reference image" },
1364
+ { identifier: "minimax-h3-image-i2i:1K:1ref", credits: 6, note: "1K, one reference image (the least)" },
1365
+ { identifier: "minimax-h3-image-i2i:2K:1ref", credits: 6, note: "2K, one reference image" },
1366
+ { identifier: "minimax-h3-image-i2i:2K:4ref", credits: 10, note: "2K, four reference images" },
1367
+ { identifier: "minimax-h3-image-i2i:4K:1ref", credits: 15, note: "4K, one reference image" },
1368
+ { identifier: "minimax-h3-image-i2i:2K:16ref", credits: 25, note: "2K, sixteen reference images" },
1369
+ { identifier: "minimax-h3-image-i2i:4K:16ref", credits: 34, note: "4K, sixteen reference images (the most)" }
1370
+ ]
1371
+ },
1188
1372
  // ── Alibaba Qwen ──
1189
1373
  "qwen": {
1190
1374
  id: "qwen",
@@ -1384,6 +1568,28 @@ var IMAGE_MODELS = {
1384
1568
  { identifier: "topaz-image-upscale", credits: 25, note: "1x / 2x" },
1385
1569
  { identifier: "topaz-image-upscale:4K", credits: 50, note: "4x (legacy identifier)" }
1386
1570
  ]
1571
+ },
1572
+ "nodaro-image-upscale": {
1573
+ id: "nodaro-image-upscale",
1574
+ kind: "image",
1575
+ modes: ["upscale"],
1576
+ family: "Nodaro Upscale",
1577
+ ownLabel: true,
1578
+ label: "Nodaro Image Upscale",
1579
+ series: "Nodaro Upscale",
1580
+ 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.",
1581
+ useCases: ["upscale", "high-res", "typography", "utility"],
1582
+ features: ["reference-image"],
1583
+ // No `resolutions`: the one lever is the upscale factor (`NODARO_IMAGE_UPSCALE_FACTORS`).
1584
+ // The price follows the OUTPUT's total pixels (`@nodaro/render-rules`
1585
+ // nodaro-image-upscale-pricing.ts); the bare id is the hold when the image's size
1586
+ // cannot be read before the run, settled to the delivered output's tier.
1587
+ pricing: [
1588
+ { identifier: "nodaro-image-upscale:2K", credits: 4, note: "output up to 4,194,304 pixels (2048 \xD7 2048)" },
1589
+ { identifier: "nodaro-image-upscale:4K", credits: 10, note: "output up to 16,777,216 pixels (4096 \xD7 4096)" },
1590
+ { identifier: "nodaro-image-upscale:8K", credits: 30, note: "output up to 67,108,864 pixels (8192 \xD7 8192)" },
1591
+ { 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" }
1592
+ ]
1387
1593
  }
1388
1594
  };
1389
1595
  var VIDEO_MODELS = {
@@ -1849,6 +2055,50 @@ var VIDEO_MODELS = {
1849
2055
  { identifier: "kling-4-keyframes:30s:1080p", credits: 3190, note: "30s 1080p (max)" }
1850
2056
  ]
1851
2057
  },
2058
+ // Kling 4.0 Flash — ONE id over KIE's two Flash endpoints, picked by what is
2059
+ // wired (backend kie/kling4.ts): a start frame alone runs on
2060
+ // docs.kie.ai/market/kling/v4-flash-keyframe-to-video, where it is the exact
2061
+ // opening frame; everything else (text, reference images, videos,
2062
+ // characters, or a start frame beside any of them) runs on
2063
+ // docs.kie.ai/market/kling/v4-flash-reference-to-video, where a start frame
2064
+ // joins the reference images as on kling-4. Reference: up to 10 images, 5
2065
+ // videos (2-20s together) and 7 characters (15 in all). No standalone voices:
2066
+ // audio clip N becomes wired character N's voice when that character has 2-4
2067
+ // images (otherwise the clip is dropped). No end
2068
+ // frame, no 1080p, no seed. 3-20s, 720p, native audio always on. Per-second
2069
+ // billing; a reference-video run bills its input seconds too.
2070
+ "kling-4-flash": {
2071
+ id: "kling-4-flash",
2072
+ kind: "video",
2073
+ modes: ["i2v", "t2v"],
2074
+ family: "Kuaishou",
2075
+ maker: "kuaishou",
2076
+ label: "Kling 4.0 Flash",
2077
+ series: "Kling",
2078
+ 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.",
2079
+ useCases: ["fast", "cheap", "narrative", "reference"],
2080
+ // No `voices` array on Flash: a reference audio clip is a character's voice
2081
+ // (`voice-references` names that input "Voice Refs"). No `audio-soundtrack`
2082
+ // (the clips are voices, never a soundtrack), no `end-frame`, no
2083
+ // `video-reference` (the generate-video-pro extend chain is unwired, as on
2084
+ // kling-4).
2085
+ features: ["audio", "reference-image", "reference-to-video", "character-subjects", "voice-references"],
2086
+ aspectRatios: VIDEO_RATIOS_KLING_4,
2087
+ durations: [3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20],
2088
+ defaultDuration: 5,
2089
+ resolutions: ["720p"],
2090
+ unlistedResolutionRendersAs: "720p",
2091
+ noSeed: true,
2092
+ // neither Flash schema has a `seed` (additionalProperties: false)
2093
+ pricing: [
2094
+ { identifier: "kling-4-flash", credits: 220, note: "default 5s 720p \u2014 see :Ns:720p variants for exact" },
2095
+ { identifier: "kling-4-flash:5s:720p", credits: 220, note: "5s 720p (the default tier)" },
2096
+ { identifier: "kling-4-flash:3s:720p", credits: 130, note: "3s 720p (min)" },
2097
+ { identifier: "kling-4-flash:10s:720p", credits: 430, note: "10s 720p" },
2098
+ { identifier: "kling-4-flash:20s:720p", credits: 850, note: "20s 720p (max)" },
2099
+ { 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" }
2100
+ ]
2101
+ },
1852
2102
  // ── xAI Grok video ──
1853
2103
  "grok-i2v": {
1854
2104
  id: "grok-i2v",
@@ -1872,35 +2122,50 @@ var VIDEO_MODELS = {
1872
2122
  { identifier: "grok-i2v:15s", credits: 100 }
1873
2123
  ]
1874
2124
  },
1875
- // xAI Grok Imagine Video 1.5 — KIE image-to-video (image required). True
1876
- // per-second billing split 480p/720p. modes:["i2v"] is the honest capability;
1877
- // it's also surfaced in the text-to-video dropdown for the unified node, where
1878
- // the t2v route returns a clean "requires an input image" 400.
2125
+ // xAI Grok Imagine Video 1.5 — KIE image-to-video
2126
+ // (docs.kie.ai/market/grok-imagine/1-5-preview), built by the backend's
2127
+ // bespoke runner (kie/grok-video-15.ts). The start frame is the exact first
2128
+ // frame and an end frame the exact last frame; one picture wired as both is a
2129
+ // seamless loop (KIE `loop_url`). The Image References are up to 4
2130
+ // in-between frames (KIE `keyframes`), spread evenly over the clip at whole
2131
+ // seconds — frames only, never loose references, so `keyframes` is declared
2132
+ // (it also keeps the model out of generate-video-pro, whose segments would
2133
+ // send cast references as frames). modes:["i2v"] and no `reference-to-video`:
2134
+ // every run needs its start image, in-between frames included. It is also
2135
+ // surfaced in the text-to-video dropdown for the unified node, where the t2v
2136
+ // route returns a clean "requires an input image" 400. Per-second billing by
2137
+ // resolution, with no per-image part.
1879
2138
  "grok-imagine-video-1.5": {
1880
2139
  id: "grok-imagine-video-1.5",
1881
2140
  kind: "video",
1882
2141
  modes: ["i2v"],
1883
- // No `reference-image` (locked by video-reference-features.test.ts, 2026-06-28
1884
- // audit): KIE's grok-imagine endpoint accepts a single image_url (the i2v
1885
- // start frame) only — there is no reference transport, so advertising the
1886
- // feature let the editor attach refs that were silently dropped at the
1887
- // provider. Also kept OUT of VIDEO_REF_LIMITS_BY_PROVIDER for the same reason.
2142
+ features: ["end-frame", "reference-image", "keyframes"],
1888
2143
  family: "xAI",
1889
2144
  maker: "xai",
1890
2145
  label: "Grok Imagine Video 1.5",
1891
2146
  series: "Grok",
1892
- description: "Grok Imagine 1.5 image-to-video \u2014 1\u201315s, 480p/720p, per-second pricing. Requires an input image.",
2147
+ 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.",
1893
2148
  useCases: ["stylized", "motion"],
1894
2149
  aspectRatios: ["16:9", "9:16", "1:1", "4:3", "3:4"],
1895
2150
  durations: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15],
1896
2151
  defaultDuration: 8,
1897
- resolutions: ["480p", "720p"],
2152
+ resolutions: ["480p", "720p", "1080p"],
2153
+ // normalizeGrokVideo15Resolution sends 480p for anything off the list.
2154
+ unlistedResolutionRendersAs: "480p",
2155
+ // KIE refuses 1080p beside anything but a lone start frame ("1080p is only
2156
+ // supported for text-to-video or a single image used as the first frame",
2157
+ // a staging run 2026-11-12): no end frame, loop or in-between frames.
2158
+ startFrameOnlyResolutions: ["1080p"],
2159
+ noSeed: true,
2160
+ // the KIE schema has no `seed` (additionalProperties: false)
1898
2161
  pricing: [
1899
- { identifier: "grok-imagine-video-1.5", credits: 295, note: "default 8s 480p \u2014 see :Ns:res variants" },
1900
- { identifier: "grok-imagine-video-1.5:8s:480p", credits: 300, note: "8s 480p" },
1901
- { identifier: "grok-imagine-video-1.5:8s:720p", credits: 510, note: "8s 720p" },
1902
- { identifier: "grok-imagine-video-1.5:15s:480p", credits: 550, note: "15s 480p (max)" },
1903
- { identifier: "grok-imagine-video-1.5:15s:720p", credits: 950, note: "15s 720p (max)" }
2162
+ { identifier: "grok-imagine-video-1.5", credits: 50, note: "default 8s 480p \u2014 see :Ns:res variants" },
2163
+ { identifier: "grok-imagine-video-1.5:8s:480p", credits: 50, note: "8s 480p" },
2164
+ { identifier: "grok-imagine-video-1.5:8s:720p", credits: 90, note: "8s 720p" },
2165
+ { identifier: "grok-imagine-video-1.5:8s:1080p", credits: 160, note: "8s 1080p" },
2166
+ { identifier: "grok-imagine-video-1.5:15s:480p", credits: 90, note: "15s 480p (max)" },
2167
+ { identifier: "grok-imagine-video-1.5:15s:720p", credits: 170, note: "15s 720p (max)" },
2168
+ { identifier: "grok-imagine-video-1.5:15s:1080p", credits: 300, note: "15s 1080p (max)" }
1904
2169
  ]
1905
2170
  },
1906
2171
  // ── Bytedance Seedance ──
@@ -2007,6 +2272,7 @@ var VIDEO_MODELS = {
2007
2272
  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],
2008
2273
  defaultDuration: 8,
2009
2274
  autoDuration: true,
2275
+ referenceTaskTypes: ["reference", "edit", "extend"],
2010
2276
  resolutions: ["480p", "720p", "1080p"],
2011
2277
  // KIE refuses a seed on Seedance 2.5 (422) — the provider config omits it.
2012
2278
  noSeed: true,
@@ -2564,24 +2830,45 @@ var VIDEO_MODELS = {
2564
2830
  useCases: ["extend"],
2565
2831
  pricing: [{ identifier: "runway-extend", credits: 320 }]
2566
2832
  },
2567
- "seedance-2-extend": {
2568
- id: "seedance-2-extend",
2833
+ // Seedance extends ANY video, one provider per model. Each is priced on its
2834
+ // own rows (`seedanceExtendCreditId`), one per second added and resolution.
2835
+ // The earlier single id `seedance-2-extend` is retired and runs as Seedance 2.5.
2836
+ "seedance-2-5-extend": {
2837
+ id: "seedance-2-5-extend",
2569
2838
  kind: "video",
2570
2839
  modes: ["extend"],
2571
2840
  family: "Bytedance",
2572
2841
  maker: "bytedance",
2573
- label: "Seedance 2 Extend",
2842
+ label: "Seedance 2.5 Extend",
2574
2843
  series: "Seedance",
2575
- description: "Extend ANY video: generates the continuation (audio included) and trim-stitches it into one seamless clip.",
2844
+ description: "Extend ANY video with Seedance 2.5: 4\u201330s continuation (audio included), stitched into one seamless clip.",
2845
+ useCases: ["extend"],
2846
+ 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],
2847
+ defaultDuration: 8,
2848
+ resolutions: ["480p", "720p", "1080p"],
2849
+ pricing: [
2850
+ { identifier: "seedance-2-5-extend:8s:720p", credits: 950, note: "default 8s 720p \u2014 see :Ns:res variants for exact" },
2851
+ { identifier: "seedance-2-5-extend:8s:480p", credits: 425, note: "8s 480p" },
2852
+ { identifier: "seedance-2-5-extend:8s:1080p", credits: 2375, note: "8s 1080p" }
2853
+ ]
2854
+ },
2855
+ "seedance-2-0-extend": {
2856
+ id: "seedance-2-0-extend",
2857
+ kind: "video",
2858
+ modes: ["extend"],
2859
+ family: "Bytedance",
2860
+ maker: "bytedance",
2861
+ label: "Seedance 2.0 Extend",
2862
+ series: "Seedance",
2863
+ description: "Extend ANY video with Seedance 2.0: 4\u201315s continuation (audio included), stitched into one seamless clip.",
2576
2864
  useCases: ["extend"],
2577
2865
  durations: [4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15],
2578
2866
  defaultDuration: 8,
2579
2867
  resolutions: ["480p", "720p", "1080p"],
2580
2868
  pricing: [
2581
- { identifier: "seedance-2-extend", credits: 530, note: "default 8s 720p (ref-mode 50 + 3 stitch) \u2014 see :NsR variants" },
2582
- { identifier: "seedance-2-extend:8s:480p", credits: 260, note: "8s 480p (23+3)" },
2583
- { identifier: "seedance-2-extend:8s:720p", credits: 530, note: "8s 720p (50+3)" },
2584
- { identifier: "seedance-2-extend:8s:1080p", credits: 780, note: "8s 1080p (75+3)" }
2869
+ { identifier: "seedance-2-0-extend:8s:720p", credits: 625, note: "default 8s 720p \u2014 see :Ns:res variants for exact" },
2870
+ { identifier: "seedance-2-0-extend:8s:480p", credits: 288, note: "8s 480p" },
2871
+ { identifier: "seedance-2-0-extend:8s:1080p", credits: 1550, note: "8s 1080p" }
2585
2872
  ]
2586
2873
  },
2587
2874
  "veo-1080p": {
@@ -3620,9 +3907,51 @@ var MODEL_INPUT_ADJUSTMENT_FIELDS = [
3620
3907
  var IMAGE_GIF_FRAME_SIZE = 512;
3621
3908
  var MASKLESS_OUTPUT_FORMATS = ["gif", "svg"];
3622
3909
  var TRANSPARENT_OUTPUT_FORMATS = ["png", "webp"];
3910
+ function maskEditMatchesSource(modelId, masked) {
3911
+ return masked === true && !!modelId && MODEL_CATALOG[modelId]?.maskEditMatchesSource === true;
3912
+ }
3913
+ function sourceImageSizeNeeded(modelId, aspectRatio, masked) {
3914
+ return autoAspectNeedsSourceImage(modelId, aspectRatio) || maskEditMatchesSource(modelId, masked);
3915
+ }
3916
+ function maskedEditResolution(modelId, levers, sourceImage) {
3917
+ if (!maskEditMatchesSource(modelId, true) || !usableSize(sourceImage)) return void 0;
3918
+ const str = (v) => typeof v === "string" && v.length > 0 ? v : void 0;
3919
+ return normalizeModelInput(
3920
+ modelId,
3921
+ { aspectRatio: str(levers.aspectRatio), resolution: str(levers.resolution), background: str(levers.background), outputFormat: str(levers.outputFormat) },
3922
+ { sourceImage, masked: true }
3923
+ ).resolution;
3924
+ }
3925
+ function resolutionNearestSource(modelId, aspectRatio, source) {
3926
+ const m = MODEL_CATALOG[modelId];
3927
+ const table = m?.outputSizes;
3928
+ if (!table || typeof aspectRatio !== "string" || !usableSize(source)) return void 0;
3929
+ if (!Object.prototype.hasOwnProperty.call(table, aspectRatio)) return void 0;
3930
+ const sizes = table[aspectRatio];
3931
+ const long = Math.max(source.width, source.height);
3932
+ let best;
3933
+ let bestDist = Infinity;
3934
+ for (const resolution of m.resolutions ?? Object.keys(sizes)) {
3935
+ const px = Object.prototype.hasOwnProperty.call(sizes, resolution) ? sizes[resolution] : void 0;
3936
+ if (!px) continue;
3937
+ const dist = Math.abs(Math.log(Math.max(px[0], px[1]) / long));
3938
+ if (dist <= bestDist + ASPECT_TIE_EPSILON) {
3939
+ bestDist = dist;
3940
+ best = resolution;
3941
+ }
3942
+ }
3943
+ return best;
3944
+ }
3623
3945
  function isAutoAspectToken(value) {
3624
3946
  return typeof value === "string" && value.trim().toLowerCase() === "auto";
3625
3947
  }
3948
+ function isVideoAutoAspectToken(value) {
3949
+ return value === "Auto" || value === "auto";
3950
+ }
3951
+ function videoAutoAspectRunsAt(modelId, hasVisualInput) {
3952
+ if (!hasVisualInput || !modelId) return void 0;
3953
+ return MODEL_CATALOG[modelId]?.aspectRatios?.includes("adaptive") ? "adaptive" : void 0;
3954
+ }
3626
3955
  function usableSize(size) {
3627
3956
  return size !== void 0 && Number.isFinite(size.width) && size.width > 0 && Number.isFinite(size.height) && size.height > 0;
3628
3957
  }
@@ -3703,8 +4032,23 @@ function normalizeModelInput(modelId, input, context = {}) {
3703
4032
  out.gifFrameDurationMs = format.levers.gifFrameDurationMs;
3704
4033
  out.svgLevel = format.levers.svgLevel;
3705
4034
  const gif = format.levers.outputFormat === "gif";
3706
- const sourceRatio = !gif && autoAspectNeedsSourceImage(modelId, input.aspectRatio) && usableSize(context.sourceImage) ? nearestCatalogAspectRatio(context.sourceImage.width, context.sourceImage.height, m.aspectRatios ?? []) : void 0;
3707
- if (gif) {
4035
+ const followsSource = !gif && maskEditMatchesSource(modelId, context.masked);
4036
+ const askedRatio = followsSource ? "auto" : input.aspectRatio;
4037
+ const sourceRatio = !gif && autoAspectNeedsSourceImage(modelId, askedRatio) && usableSize(context.sourceImage) ? nearestCatalogAspectRatio(context.sourceImage.width, context.sourceImage.height, m.aspectRatios ?? []) : void 0;
4038
+ if (followsSource && input.aspectRatio !== void 0 && !isAutoAspectToken(input.aspectRatio)) {
4039
+ const to = sourceRatio ?? "auto";
4040
+ if (to !== input.aspectRatio) {
4041
+ adjustments.push({
4042
+ field: "aspectRatio",
4043
+ from: input.aspectRatio,
4044
+ to,
4045
+ 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".`
4046
+ });
4047
+ }
4048
+ out.aspectRatio = to;
4049
+ } else if (followsSource && input.aspectRatio === void 0) {
4050
+ out.aspectRatio = sourceRatio ?? "auto";
4051
+ } else if (gif) {
3708
4052
  if (input.aspectRatio !== void 0 && input.aspectRatio !== "1:1" && !isAutoAspectToken(input.aspectRatio)) {
3709
4053
  adjustments.push({
3710
4054
  field: "aspectRatio",
@@ -3714,12 +4058,12 @@ function normalizeModelInput(modelId, input, context = {}) {
3714
4058
  });
3715
4059
  }
3716
4060
  out.aspectRatio = input.aspectRatio === void 0 ? void 0 : "1:1";
3717
- } else if (sourceRatio !== void 0 && input.aspectRatio !== void 0) {
4061
+ } else if (sourceRatio !== void 0 && askedRatio !== void 0) {
3718
4062
  const { width, height } = context.sourceImage;
3719
4063
  const why = m.autoAspectFromSourceImage === true ? `${m.label}'s own "auto" does not keep the photo's shape` : `${m.label} has no "auto" aspect ratio`;
3720
4064
  adjustments.push({
3721
4065
  field: "aspectRatio",
3722
- from: input.aspectRatio,
4066
+ from: input.aspectRatio ?? askedRatio,
3723
4067
  to: sourceRatio,
3724
4068
  reason: `${why} \u2014 using "${sourceRatio}", the supported ratio closest to the source image's shape (${width}x${height}).`
3725
4069
  });
@@ -3727,7 +4071,21 @@ function normalizeModelInput(modelId, input, context = {}) {
3727
4071
  } else {
3728
4072
  out.aspectRatio = snap("aspectRatio", input.aspectRatio, m.aspectRatios);
3729
4073
  }
3730
- if (gif) {
4074
+ if (followsSource) {
4075
+ const asked = snap("resolution", input.resolution, m.resolutions, defaultResolutionFor(modelId));
4076
+ const nearest = resolutionNearestSource(modelId, out.aspectRatio, context.sourceImage);
4077
+ const from = asked ?? m.defaultResolution ?? m.resolutions?.[0];
4078
+ if (nearest !== void 0 && from !== void 0 && nearest !== from) {
4079
+ const { width, height } = context.sourceImage;
4080
+ adjustments.push({
4081
+ field: "resolution",
4082
+ from,
4083
+ to: nearest,
4084
+ 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.`
4085
+ });
4086
+ }
4087
+ out.resolution = nearest ?? asked;
4088
+ } else if (gif) {
3731
4089
  if (input.resolution !== void 0) {
3732
4090
  adjustments.push({
3733
4091
  field: "resolution",
@@ -3993,6 +4351,8 @@ var MODEL_VALUE_LABELS = {
3993
4351
  "adaptive": "Adaptive",
3994
4352
  // image resolutions
3995
4353
  "1K": "1K (Standard)",
4354
+ // Only Seedream 5.5 lists it.
4355
+ "1.5K": "1.5K (Medium)",
3996
4356
  "2K": "2K (High)",
3997
4357
  "4K": "4K (Ultra)",
3998
4358
  "4k": "4K",
@@ -4168,6 +4528,11 @@ exports.IMAGE_GIF_FRAME_SIZE = IMAGE_GIF_FRAME_SIZE;
4168
4528
  exports.IMAGE_OUTPUT_FORMAT_LABELS = IMAGE_OUTPUT_FORMAT_LABELS;
4169
4529
  exports.IMAGE_SVG_LEVEL_LABELS = IMAGE_SVG_LEVEL_LABELS;
4170
4530
  exports.MASKLESS_OUTPUT_FORMATS = MASKLESS_OUTPUT_FORMATS;
4531
+ exports.MINIMAX_H3_IMAGE_DEFAULT_RESOLUTION = MINIMAX_H3_IMAGE_DEFAULT_RESOLUTION;
4532
+ exports.MINIMAX_H3_IMAGE_I2I = MINIMAX_H3_IMAGE_I2I;
4533
+ exports.MINIMAX_H3_IMAGE_MAX_INPUT_IMAGES = MINIMAX_H3_IMAGE_MAX_INPUT_IMAGES;
4534
+ exports.MINIMAX_H3_IMAGE_RESOLUTIONS = MINIMAX_H3_IMAGE_RESOLUTIONS;
4535
+ exports.MINIMAX_H3_IMAGE_T2I = MINIMAX_H3_IMAGE_T2I;
4171
4536
  exports.MODEL_CATALOG = MODEL_CATALOG;
4172
4537
  exports.MODEL_INPUT_ADJUSTMENT_FIELDS = MODEL_INPUT_ADJUSTMENT_FIELDS;
4173
4538
  exports.MODEL_KINDS = MODEL_KINDS;
@@ -4179,6 +4544,12 @@ exports.SEEDANCE_DRAFT_FINALIZE_PROVIDER = SEEDANCE_DRAFT_FINALIZE_PROVIDER;
4179
4544
  exports.SEEDANCE_DRAFT_FINALIZE_RESOLUTION = SEEDANCE_DRAFT_FINALIZE_RESOLUTION;
4180
4545
  exports.SEEDANCE_DRAFT_MODELS = SEEDANCE_DRAFT_MODELS;
4181
4546
  exports.SEEDANCE_DRAFT_RESOLUTION = SEEDANCE_DRAFT_RESOLUTION;
4547
+ exports.SEEDREAM_5_5_DEFAULT_RESOLUTION = SEEDREAM_5_5_DEFAULT_RESOLUTION;
4548
+ exports.SEEDREAM_5_5_I2I = SEEDREAM_5_5_I2I;
4549
+ exports.SEEDREAM_5_5_MAX_INPUT_IMAGES = SEEDREAM_5_5_MAX_INPUT_IMAGES;
4550
+ exports.SEEDREAM_5_5_MIN_PROMPT_CHARS = SEEDREAM_5_5_MIN_PROMPT_CHARS;
4551
+ exports.SEEDREAM_5_5_RESOLUTIONS = SEEDREAM_5_5_RESOLUTIONS;
4552
+ exports.SEEDREAM_5_5_T2I = SEEDREAM_5_5_T2I;
4182
4553
  exports.SPEECH_UNIT_PRICE_NOTE = SPEECH_UNIT_PRICE_NOTE;
4183
4554
  exports.TRANSPARENT_OUTPUT_FORMATS = TRANSPARENT_OUTPUT_FORMATS;
4184
4555
  exports.VIDEO_DURATION_AUTO = VIDEO_DURATION_AUTO;
@@ -4202,9 +4573,17 @@ exports.hasFeature = hasFeature;
4202
4573
  exports.isAutoAspectToken = isAutoAspectToken;
4203
4574
  exports.isAutoVideoDuration = isAutoVideoDuration;
4204
4575
  exports.isFlux2Model = isFlux2Model;
4576
+ exports.isMinimaxH3Image = isMinimaxH3Image;
4577
+ exports.isMinimaxH3ImageI2i = isMinimaxH3ImageI2i;
4205
4578
  exports.isModelMakerId = isModelMakerId;
4206
4579
  exports.isSeedanceDraftCapable = isSeedanceDraftCapable;
4580
+ exports.isSeedream55 = isSeedream55;
4581
+ exports.isSeedream55I2i = isSeedream55I2i;
4582
+ exports.isVideoAutoAspectToken = isVideoAutoAspectToken;
4207
4583
  exports.listModels = listModels;
4584
+ exports.maskEditMatchesSource = maskEditMatchesSource;
4585
+ exports.maskedEditResolution = maskedEditResolution;
4586
+ exports.minimaxH3ImageCreditId = minimaxH3ImageCreditId;
4208
4587
  exports.modelIdsByKindMode = modelIdsByKindMode;
4209
4588
  exports.modelMakerOf = modelMakerOf;
4210
4589
  exports.modelTakesSeed = modelTakesSeed;
@@ -4215,11 +4594,15 @@ exports.normalizeVideoRequestParams = normalizeVideoRequestParams;
4215
4594
  exports.outputFormatOptionsByKind = outputFormatOptionsByKind;
4216
4595
  exports.qualityOptionsByKind = qualityOptionsByKind;
4217
4596
  exports.resolutionAtAspectRatio = resolutionAtAspectRatio;
4597
+ exports.resolutionNearestSource = resolutionNearestSource;
4218
4598
  exports.resolutionOptionsByKind = resolutionOptionsByKind;
4219
4599
  exports.resolutionsAtAspectRatio = resolutionsAtAspectRatio;
4220
4600
  exports.seedanceDraftFinalizeBillableSec = seedanceDraftFinalizeBillableSec;
4221
4601
  exports.seedanceDraftFinalizeCreditId = seedanceDraftFinalizeCreditId;
4602
+ exports.seedream55Resolution = seedream55Resolution;
4603
+ exports.sourceImageSizeNeeded = sourceImageSizeNeeded;
4222
4604
  exports.svgLevelOptionsByKind = svgLevelOptionsByKind;
4223
4605
  exports.validateModelInput = validateModelInput;
4224
- //# sourceMappingURL=chunk-A6HRY3WF.cjs.map
4225
- //# sourceMappingURL=chunk-A6HRY3WF.cjs.map
4606
+ exports.videoAutoAspectRunsAt = videoAutoAspectRunsAt;
4607
+ //# sourceMappingURL=chunk-MYJQELFN.cjs.map
4608
+ //# sourceMappingURL=chunk-MYJQELFN.cjs.map