@nodaro/shared 3.31.0 → 3.32.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 (372) hide show
  1. package/README.md +17 -0
  2. package/dist/chunk-2NIQO2J3.cjs +54 -0
  3. package/dist/chunk-2NIQO2J3.cjs.map +1 -0
  4. package/dist/chunk-2OJIVO7R.cjs +32 -0
  5. package/dist/chunk-2OJIVO7R.cjs.map +1 -0
  6. package/dist/chunk-2RF4Z7KG.cjs +803 -0
  7. package/dist/chunk-2RF4Z7KG.cjs.map +1 -0
  8. package/dist/chunk-3CUFITU7.js +1905 -0
  9. package/dist/chunk-3CUFITU7.js.map +1 -0
  10. package/dist/chunk-3RYKIUAE.js +86 -0
  11. package/dist/chunk-3RYKIUAE.js.map +1 -0
  12. package/dist/chunk-44I73CQS.cjs +194 -0
  13. package/dist/chunk-44I73CQS.cjs.map +1 -0
  14. package/dist/chunk-5AUSSJIM.cjs +3372 -0
  15. package/dist/chunk-5AUSSJIM.cjs.map +1 -0
  16. package/dist/chunk-5PC6JBGJ.cjs +1419 -0
  17. package/dist/chunk-5PC6JBGJ.cjs.map +1 -0
  18. package/dist/chunk-5RU2HCW2.js +30 -0
  19. package/dist/chunk-5RU2HCW2.js.map +1 -0
  20. package/dist/chunk-5THUHJ3E.js +46 -0
  21. package/dist/chunk-5THUHJ3E.js.map +1 -0
  22. package/dist/chunk-5U7VLG43.js +141 -0
  23. package/dist/chunk-5U7VLG43.js.map +1 -0
  24. package/dist/chunk-6DAWSVX2.cjs +103 -0
  25. package/dist/chunk-6DAWSVX2.cjs.map +1 -0
  26. package/dist/chunk-6DKDOWBL.js +1567 -0
  27. package/dist/chunk-6DKDOWBL.js.map +1 -0
  28. package/dist/chunk-6IJOPRZP.cjs +197 -0
  29. package/dist/chunk-6IJOPRZP.cjs.map +1 -0
  30. package/dist/chunk-7G7G42KS.js +86 -0
  31. package/dist/chunk-7G7G42KS.js.map +1 -0
  32. package/dist/chunk-AINCI23X.js +2171 -0
  33. package/dist/chunk-AINCI23X.js.map +1 -0
  34. package/dist/chunk-AROWPFO2.js +773 -0
  35. package/dist/chunk-AROWPFO2.js.map +1 -0
  36. package/dist/chunk-AVQK77G6.cjs +2000 -0
  37. package/dist/chunk-AVQK77G6.cjs.map +1 -0
  38. package/dist/chunk-C57NEO3X.js +3327 -0
  39. package/dist/chunk-C57NEO3X.js.map +1 -0
  40. package/dist/chunk-CK3GK34R.js +1381 -0
  41. package/dist/chunk-CK3GK34R.js.map +1 -0
  42. package/dist/chunk-E2TGXG6X.cjs +1770 -0
  43. package/dist/chunk-E2TGXG6X.cjs.map +1 -0
  44. package/dist/chunk-EK362Q45.cjs +38 -0
  45. package/dist/chunk-EK362Q45.cjs.map +1 -0
  46. package/dist/chunk-FBV5DF6D.js +95 -0
  47. package/dist/chunk-FBV5DF6D.js.map +1 -0
  48. package/dist/chunk-FG4E7MTG.cjs +4 -0
  49. package/dist/chunk-FG4E7MTG.cjs.map +1 -0
  50. package/dist/chunk-G6IIVKMO.js +26 -0
  51. package/dist/chunk-G6IIVKMO.js.map +1 -0
  52. package/dist/chunk-HGC5JNVA.cjs +1503 -0
  53. package/dist/chunk-HGC5JNVA.cjs.map +1 -0
  54. package/dist/chunk-HSHCCBIV.js +255 -0
  55. package/dist/chunk-HSHCCBIV.js.map +1 -0
  56. package/dist/chunk-IEBZHTPE.js +254 -0
  57. package/dist/chunk-IEBZHTPE.js.map +1 -0
  58. package/dist/chunk-ISJDAFKS.js +1604 -0
  59. package/dist/chunk-ISJDAFKS.js.map +1 -0
  60. package/dist/chunk-J6KHW2E5.cjs +1963 -0
  61. package/dist/chunk-J6KHW2E5.cjs.map +1 -0
  62. package/dist/chunk-J7BMO73N.cjs +114 -0
  63. package/dist/chunk-J7BMO73N.cjs.map +1 -0
  64. package/dist/chunk-JL4C5VJ7.cjs +488 -0
  65. package/dist/chunk-JL4C5VJ7.cjs.map +1 -0
  66. package/dist/chunk-JSGIEF6Z.cjs +1087 -0
  67. package/dist/chunk-JSGIEF6Z.cjs.map +1 -0
  68. package/dist/chunk-JSNV5O2F.cjs +34 -0
  69. package/dist/chunk-JSNV5O2F.cjs.map +1 -0
  70. package/dist/chunk-JWA5SGCS.js +203 -0
  71. package/dist/chunk-JWA5SGCS.js.map +1 -0
  72. package/dist/chunk-JX5YZ4DH.cjs +430 -0
  73. package/dist/chunk-JX5YZ4DH.cjs.map +1 -0
  74. package/dist/chunk-KHCBJ7KD.js +42 -0
  75. package/dist/chunk-KHCBJ7KD.js.map +1 -0
  76. package/dist/chunk-KU6S7IYV.cjs +210 -0
  77. package/dist/chunk-KU6S7IYV.cjs.map +1 -0
  78. package/dist/chunk-LKAIXWK3.js +181 -0
  79. package/dist/chunk-LKAIXWK3.js.map +1 -0
  80. package/dist/chunk-LPW3XNC2.js +471 -0
  81. package/dist/chunk-LPW3XNC2.js.map +1 -0
  82. package/dist/chunk-M36G6SRP.js +447 -0
  83. package/dist/chunk-M36G6SRP.js.map +1 -0
  84. package/dist/chunk-MRXGWL42.cjs +4 -0
  85. package/dist/chunk-MRXGWL42.cjs.map +1 -0
  86. package/dist/chunk-NB72XWXQ.cjs +54 -0
  87. package/dist/chunk-NB72XWXQ.cjs.map +1 -0
  88. package/dist/chunk-NEJ2PV4C.cjs +211 -0
  89. package/dist/chunk-NEJ2PV4C.cjs.map +1 -0
  90. package/dist/chunk-NT6IJH4L.cjs +273 -0
  91. package/dist/chunk-NT6IJH4L.cjs.map +1 -0
  92. package/dist/chunk-O5MP52U2.cjs +526 -0
  93. package/dist/chunk-O5MP52U2.cjs.map +1 -0
  94. package/dist/chunk-O7PUQLJ3.cjs +818 -0
  95. package/dist/chunk-O7PUQLJ3.cjs.map +1 -0
  96. package/dist/chunk-PQHS255G.js +1369 -0
  97. package/dist/chunk-PQHS255G.js.map +1 -0
  98. package/dist/chunk-PRYE7AZQ.cjs +1227 -0
  99. package/dist/chunk-PRYE7AZQ.cjs.map +1 -0
  100. package/dist/chunk-Q4CDQ2KO.js +21 -0
  101. package/dist/chunk-Q4CDQ2KO.js.map +1 -0
  102. package/dist/chunk-QELDJGDK.cjs +1714 -0
  103. package/dist/chunk-QELDJGDK.cjs.map +1 -0
  104. package/dist/chunk-QJRP44ZO.js +769 -0
  105. package/dist/chunk-QJRP44ZO.js.map +1 -0
  106. package/dist/chunk-QNGNOU4Z.js +29 -0
  107. package/dist/chunk-QNGNOU4Z.js.map +1 -0
  108. package/dist/chunk-RJL7RCEM.cjs +159 -0
  109. package/dist/chunk-RJL7RCEM.cjs.map +1 -0
  110. package/dist/chunk-RN3RMBJZ.js +1164 -0
  111. package/dist/chunk-RN3RMBJZ.js.map +1 -0
  112. package/dist/chunk-S5DMKUWK.cjs +1273 -0
  113. package/dist/chunk-S5DMKUWK.cjs.map +1 -0
  114. package/dist/chunk-SES6GDBQ.cjs +624 -0
  115. package/dist/chunk-SES6GDBQ.cjs.map +1 -0
  116. package/dist/chunk-TNPDV7I4.cjs +2346 -0
  117. package/dist/chunk-TNPDV7I4.cjs.map +1 -0
  118. package/dist/chunk-TZBIY5C3.js +187 -0
  119. package/dist/chunk-TZBIY5C3.js.map +1 -0
  120. package/dist/chunk-TZE673G6.js +3 -0
  121. package/dist/chunk-TZE673G6.js.map +1 -0
  122. package/dist/chunk-ULXI7A6Q.cjs +1047 -0
  123. package/dist/chunk-ULXI7A6Q.cjs.map +1 -0
  124. package/dist/chunk-VIWSWVAW.js +1782 -0
  125. package/dist/chunk-VIWSWVAW.js.map +1 -0
  126. package/dist/chunk-VWGNPMJZ.cjs +19 -0
  127. package/dist/chunk-VWGNPMJZ.cjs.map +1 -0
  128. package/dist/chunk-WDIBOWAA.js +1054 -0
  129. package/dist/chunk-WDIBOWAA.js.map +1 -0
  130. package/dist/chunk-WNG7HRVA.cjs +25 -0
  131. package/dist/chunk-WNG7HRVA.cjs.map +1 -0
  132. package/dist/chunk-WNVQ3SMB.cjs +96 -0
  133. package/dist/chunk-WNVQ3SMB.cjs.map +1 -0
  134. package/dist/chunk-WRSWH7US.cjs +285 -0
  135. package/dist/chunk-WRSWH7US.cjs.map +1 -0
  136. package/dist/chunk-XAMC4S53.js +17 -0
  137. package/dist/chunk-XAMC4S53.js.map +1 -0
  138. package/dist/chunk-XNISPHTZ.js +1039 -0
  139. package/dist/chunk-XNISPHTZ.js.map +1 -0
  140. package/dist/chunk-Y2PM3FFL.js +3 -0
  141. package/dist/chunk-Y2PM3FFL.js.map +1 -0
  142. package/dist/chunk-YBPBK5KI.js +1030 -0
  143. package/dist/chunk-YBPBK5KI.js.map +1 -0
  144. package/dist/chunk-YHRG7UOC.js +31 -0
  145. package/dist/chunk-YHRG7UOC.js.map +1 -0
  146. package/dist/chunk-YWNYGYI7.cjs +31 -0
  147. package/dist/chunk-YWNYGYI7.cjs.map +1 -0
  148. package/dist/chunk-YYV35XOS.js +122 -0
  149. package/dist/chunk-YYV35XOS.js.map +1 -0
  150. package/dist/chunk-Z2OL5AJD.cjs +133 -0
  151. package/dist/chunk-Z2OL5AJD.cjs.map +1 -0
  152. package/dist/chunk-Z4AZW6FY.js +920 -0
  153. package/dist/chunk-Z4AZW6FY.js.map +1 -0
  154. package/dist/chunk-ZDFHA2EC.js +572 -0
  155. package/dist/chunk-ZDFHA2EC.js.map +1 -0
  156. package/dist/chunk-ZNZDQAXN.js +175 -0
  157. package/dist/chunk-ZNZDQAXN.js.map +1 -0
  158. package/dist/chunk-ZRL2UFTH.cjs +1073 -0
  159. package/dist/chunk-ZRL2UFTH.cjs.map +1 -0
  160. package/dist/chunk-ZT77RY6R.js +404 -0
  161. package/dist/chunk-ZT77RY6R.js.map +1 -0
  162. package/dist/entries/apps.cjs +155 -0
  163. package/dist/entries/apps.cjs.map +1 -0
  164. package/dist/entries/apps.d.cts +283 -0
  165. package/dist/entries/apps.d.ts +283 -0
  166. package/dist/entries/apps.js +10 -0
  167. package/dist/entries/apps.js.map +1 -0
  168. package/dist/entries/captions.cjs +124 -0
  169. package/dist/entries/captions.cjs.map +1 -0
  170. package/dist/entries/captions.d.cts +354 -0
  171. package/dist/entries/captions.d.ts +354 -0
  172. package/dist/entries/captions.js +3 -0
  173. package/dist/entries/captions.js.map +1 -0
  174. package/dist/entries/catalogs.cjs +165 -0
  175. package/dist/entries/catalogs.cjs.map +1 -0
  176. package/dist/entries/catalogs.d.cts +385 -0
  177. package/dist/entries/catalogs.d.ts +385 -0
  178. package/dist/entries/catalogs.js +4 -0
  179. package/dist/entries/catalogs.js.map +1 -0
  180. package/dist/entries/credits.cjs +592 -0
  181. package/dist/entries/credits.cjs.map +1 -0
  182. package/dist/entries/credits.d.cts +1429 -0
  183. package/dist/entries/credits.d.ts +1429 -0
  184. package/dist/entries/credits.js +11 -0
  185. package/dist/entries/credits.js.map +1 -0
  186. package/dist/entries/edl.cjs +409 -0
  187. package/dist/entries/edl.cjs.map +1 -0
  188. package/dist/entries/edl.d.cts +1199 -0
  189. package/dist/entries/edl.d.ts +1199 -0
  190. package/dist/entries/edl.js +4 -0
  191. package/dist/entries/edl.js.map +1 -0
  192. package/dist/entries/entities.cjs +530 -0
  193. package/dist/entries/entities.cjs.map +1 -0
  194. package/dist/entries/entities.d.cts +1371 -0
  195. package/dist/entries/entities.d.ts +1371 -0
  196. package/dist/entries/entities.js +5 -0
  197. package/dist/entries/entities.js.map +1 -0
  198. package/dist/entries/i18n.cjs +48 -0
  199. package/dist/entries/i18n.cjs.map +1 -0
  200. package/dist/entries/i18n.d.cts +69 -0
  201. package/dist/entries/i18n.d.ts +69 -0
  202. package/dist/entries/i18n.js +3 -0
  203. package/dist/entries/i18n.js.map +1 -0
  204. package/dist/entries/llm-models.cjs +177 -0
  205. package/dist/entries/llm-models.cjs.map +1 -0
  206. package/dist/entries/llm-models.d.cts +435 -0
  207. package/dist/entries/llm-models.d.ts +435 -0
  208. package/dist/entries/llm-models.js +4 -0
  209. package/dist/entries/llm-models.js.map +1 -0
  210. package/dist/entries/media.cjs +335 -0
  211. package/dist/entries/media.cjs.map +1 -0
  212. package/dist/entries/media.d.cts +518 -0
  213. package/dist/entries/media.d.ts +518 -0
  214. package/dist/entries/media.js +6 -0
  215. package/dist/entries/media.js.map +1 -0
  216. package/dist/entries/model-catalog.cjs +247 -0
  217. package/dist/entries/model-catalog.cjs.map +1 -0
  218. package/dist/entries/model-catalog.d.cts +202 -0
  219. package/dist/entries/model-catalog.d.ts +202 -0
  220. package/dist/entries/model-catalog.js +6 -0
  221. package/dist/entries/model-catalog.js.map +1 -0
  222. package/dist/entries/models.cjs +833 -0
  223. package/dist/entries/models.cjs.map +1 -0
  224. package/dist/entries/models.d.cts +287 -0
  225. package/dist/entries/models.d.ts +287 -0
  226. package/dist/entries/models.js +8 -0
  227. package/dist/entries/models.js.map +1 -0
  228. package/dist/entries/nodes.cjs +789 -0
  229. package/dist/entries/nodes.cjs.map +1 -0
  230. package/dist/entries/nodes.d.cts +1600 -0
  231. package/dist/entries/nodes.d.ts +1600 -0
  232. package/dist/entries/nodes.js +16 -0
  233. package/dist/entries/nodes.js.map +1 -0
  234. package/dist/entries/organizations.cjs +80 -0
  235. package/dist/entries/organizations.cjs.map +1 -0
  236. package/dist/entries/organizations.d.cts +466 -0
  237. package/dist/entries/organizations.d.ts +466 -0
  238. package/dist/entries/organizations.js +3 -0
  239. package/dist/entries/organizations.js.map +1 -0
  240. package/dist/entries/pipeline.cjs +594 -0
  241. package/dist/entries/pipeline.cjs.map +1 -0
  242. package/dist/entries/pipeline.d.cts +2617 -0
  243. package/dist/entries/pipeline.d.ts +2617 -0
  244. package/dist/entries/pipeline.js +5 -0
  245. package/dist/entries/pipeline.js.map +1 -0
  246. package/dist/entries/scene3d.cjs +704 -0
  247. package/dist/entries/scene3d.cjs.map +1 -0
  248. package/dist/entries/scene3d.d.cts +4284 -0
  249. package/dist/entries/scene3d.d.ts +4284 -0
  250. package/dist/entries/scene3d.js +3 -0
  251. package/dist/entries/scene3d.js.map +1 -0
  252. package/dist/entries/social.cjs +714 -0
  253. package/dist/entries/social.cjs.map +1 -0
  254. package/dist/entries/social.d.cts +1366 -0
  255. package/dist/entries/social.d.ts +1366 -0
  256. package/dist/entries/social.js +5 -0
  257. package/dist/entries/social.js.map +1 -0
  258. package/dist/entries/types.cjs +13 -0
  259. package/dist/entries/types.cjs.map +1 -0
  260. package/dist/entries/types.d.cts +162 -0
  261. package/dist/entries/types.d.ts +162 -0
  262. package/dist/entries/types.js +4 -0
  263. package/dist/entries/types.js.map +1 -0
  264. package/dist/entries/ugc.cjs +279 -0
  265. package/dist/entries/ugc.cjs.map +1 -0
  266. package/dist/entries/ugc.d.cts +575 -0
  267. package/dist/entries/ugc.d.ts +575 -0
  268. package/dist/entries/ugc.js +6 -0
  269. package/dist/entries/ugc.js.map +1 -0
  270. package/dist/entries/video.cjs +549 -0
  271. package/dist/entries/video.cjs.map +1 -0
  272. package/dist/entries/video.d.cts +1791 -0
  273. package/dist/entries/video.d.ts +1791 -0
  274. package/dist/entries/video.js +8 -0
  275. package/dist/entries/video.js.map +1 -0
  276. package/dist/entries/workflow.cjs +574 -0
  277. package/dist/entries/workflow.cjs.map +1 -0
  278. package/dist/entries/workflow.d.cts +1733 -0
  279. package/dist/entries/workflow.d.ts +1733 -0
  280. package/dist/entries/workflow.js +5 -0
  281. package/dist/entries/workflow.js.map +1 -0
  282. package/dist/fan-out-meta-Bu6VyXcZ.d.cts +19 -0
  283. package/dist/fan-out-meta-Bu6VyXcZ.d.ts +19 -0
  284. package/dist/gemini-omni-voices-zeRXxSbZ.d.cts +174 -0
  285. package/dist/gemini-omni-voices-zeRXxSbZ.d.ts +174 -0
  286. package/dist/image-overlay-layers-CyBfRhxJ.d.cts +208 -0
  287. package/dist/image-overlay-layers-CyBfRhxJ.d.ts +208 -0
  288. package/dist/index.cjs +7731 -27084
  289. package/dist/index.cjs.map +1 -1
  290. package/dist/index.d.cts +32 -24198
  291. package/dist/index.d.ts +32 -24198
  292. package/dist/index.js +40 -25220
  293. package/dist/index.js.map +1 -1
  294. package/dist/model-catalog-flJYaa-g.d.cts +561 -0
  295. package/dist/model-catalog-flJYaa-g.d.ts +561 -0
  296. package/dist/presentation-types-0ENOCjoj.d.cts +61 -0
  297. package/dist/presentation-types-0ENOCjoj.d.ts +61 -0
  298. package/dist/presentation-utils-BIqiCzSA.d.cts +90 -0
  299. package/dist/presentation-utils-BdiObtwq.d.ts +90 -0
  300. package/dist/scene-node-types-DjenYFLO.d.cts +1949 -0
  301. package/dist/scene-node-types-DjenYFLO.d.ts +1949 -0
  302. package/dist/supported-fonts-CRoF1gOy.d.cts +16 -0
  303. package/dist/supported-fonts-CRoF1gOy.d.ts +16 -0
  304. package/dist/types-BRlFPEru.d.cts +511 -0
  305. package/dist/types-BRlFPEru.d.ts +511 -0
  306. package/dist/types-DffyGSy5.d.cts +67 -0
  307. package/dist/types-DffyGSy5.d.ts +67 -0
  308. package/package.json +102 -1
  309. package/src/__tests__/add-captions-plan.test.ts +6 -2
  310. package/src/__tests__/caption-edge-dash.test.ts +23 -0
  311. package/src/__tests__/fixtures/root-exports.baseline.json +4625 -0
  312. package/src/__tests__/input-field-extra-keys.test.ts +1 -0
  313. package/src/__tests__/no-internal-imports.test.ts +1 -1
  314. package/src/__tests__/node-aspect-ratio.test.ts +25 -0
  315. package/src/__tests__/node-runtime-keys.test.ts +9 -0
  316. package/src/__tests__/package-entries.test.ts +50 -0
  317. package/src/__tests__/pitch-tempo-pricing.test.ts +21 -0
  318. package/src/__tests__/preview-gate-use-case.test.ts +151 -0
  319. package/src/__tests__/run-continuation.test.ts +7 -1
  320. package/src/__tests__/site-capture-node.test.ts +58 -0
  321. package/src/__tests__/ugc-lane-wires.test.ts +228 -0
  322. package/src/__tests__/ugc-node-wires.test.ts +9 -3
  323. package/src/__tests__/ugc-run-state.test.ts +5 -4
  324. package/src/__tests__/video-analysis-catalog-sync.test.ts +1 -1
  325. package/src/__tests__/video-analysis-pricing.test.ts +6 -6
  326. package/src/__tests__/voice-changer-pro-quote.test.ts +79 -0
  327. package/src/add-captions-plan.ts +9 -3
  328. package/src/caption-edge-dash.ts +33 -0
  329. package/src/credit-estimators/index.ts +22 -1
  330. package/src/credit-estimators/pitch-tempo.ts +15 -1
  331. package/src/credit-estimators/speech.ts +72 -4
  332. package/src/credit-estimators/unit-quote.ts +52 -0
  333. package/src/credit-estimators/video-sfx.ts +15 -0
  334. package/src/credit-estimators/voice-changer-pro-quote.ts +138 -0
  335. package/src/entity-image-handle.ts +2 -0
  336. package/src/entries/apps.ts +63 -0
  337. package/src/entries/captions.ts +34 -0
  338. package/src/entries/catalogs.ts +65 -0
  339. package/src/entries/credits.ts +104 -0
  340. package/src/entries/edl.ts +42 -0
  341. package/src/entries/entities.ts +144 -0
  342. package/src/entries/i18n.ts +31 -0
  343. package/src/entries/llm-models.ts +63 -0
  344. package/src/entries/media.ts +36 -0
  345. package/src/entries/model-catalog.ts +89 -0
  346. package/src/entries/models.ts +266 -0
  347. package/src/entries/nodes.ts +245 -0
  348. package/src/entries/organizations.ts +9 -0
  349. package/src/entries/pipeline.ts +43 -0
  350. package/src/entries/scene3d.ts +27 -0
  351. package/src/entries/social.ts +297 -0
  352. package/src/entries/types.ts +26 -0
  353. package/src/entries/ugc.ts +14 -0
  354. package/src/entries/video.ts +59 -0
  355. package/src/entries/workflow.ts +172 -0
  356. package/src/fan-out-rows.ts +2 -0
  357. package/src/index.ts +25 -1845
  358. package/src/json-kinds.ts +4 -0
  359. package/src/model-catalog.ts +36 -34
  360. package/src/node-mappable-fields.ts +1 -0
  361. package/src/node-run-routes.ts +2 -0
  362. package/src/node-runtime-keys.ts +8 -0
  363. package/src/normalize-node-params.ts +30 -0
  364. package/src/presentation-utils.ts +5 -0
  365. package/src/preview-gate.ts +92 -14
  366. package/src/producer-types.ts +16 -2
  367. package/src/run-continuation.ts +21 -0
  368. package/src/site-capture-node.ts +82 -0
  369. package/src/ugc-lane-wires.ts +246 -0
  370. package/src/ugc-node-wires.ts +37 -7
  371. package/src/ugc-run-state.ts +5 -3
  372. package/src/video-analysis-pricing.ts +31 -29
@@ -0,0 +1,3372 @@
1
+ 'use strict';
2
+
3
+ // src/seedance-draft.ts
4
+ var SEEDANCE_DRAFT_MODELS = ["seedance-2-5"];
5
+ function isSeedanceDraftCapable(provider) {
6
+ return !!provider && SEEDANCE_DRAFT_MODELS.includes(provider);
7
+ }
8
+ var SEEDANCE_DRAFT_RESOLUTION = "480p";
9
+ var SEEDANCE_DRAFT_FINALIZE_PROVIDER = "seedance-2-5-hd";
10
+ var SEEDANCE_DRAFT_FINALIZE_RESOLUTION = "1080p";
11
+ var SEEDANCE_DRAFT_FINALIZE_MIN_SEC = 4;
12
+ var SEEDANCE_DRAFT_FINALIZE_MAX_SEC = 30;
13
+ function seedanceDraftFinalizeBillableSec(measuredSec) {
14
+ const whole = Math.max(1, Math.ceil(measuredSec - 0.25));
15
+ return Math.min(SEEDANCE_DRAFT_FINALIZE_MAX_SEC, Math.max(SEEDANCE_DRAFT_FINALIZE_MIN_SEC, whole));
16
+ }
17
+ function seedanceDraftFinalizeCreditId(durationSec, hasRefVideo) {
18
+ const n = seedanceDraftFinalizeBillableSec(durationSec);
19
+ return `${SEEDANCE_DRAFT_FINALIZE_PROVIDER}:${n}s${hasRefVideo ? "-ref" : ""}`;
20
+ }
21
+
22
+ // src/flux2-pricing.ts
23
+ var FLUX2_RES_MP = ["0.5", "1", "2", "4"];
24
+ function isFlux2Model(m) {
25
+ return m === "flux-2-klein" || m === "flux-2-pro" || m === "flux-2-max";
26
+ }
27
+
28
+ // src/video-duration-auto.ts
29
+ var VIDEO_DURATION_AUTO = -1;
30
+ function isAutoVideoDuration(duration) {
31
+ const n = typeof duration === "string" ? parseInt(duration, 10) : duration;
32
+ return n === VIDEO_DURATION_AUTO;
33
+ }
34
+
35
+ // src/model-catalog.ts
36
+ 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
+ var MODEL_RECOMMENDATIONS = [
38
+ // image
39
+ { intent: "best for typography / logos / text-heavy", modelIds: ["gpt-image-2", "gpt-image-2-5-flare"], note: "GPT Image 2 for exact copy, labels and non-Latin text; GPT Image 2.5 Flare is close and faster." },
40
+ // Notes name the RANKING, not the price — the price sits in the generated
41
+ // table directly below them and in `pricing`, so restating it here just
42
+ // creates a copy that rots (this one said "1 credit" long after it was 2).
43
+ { intent: "cheapest realistic image", modelIds: ["z-image", "qwen", "imagen4-fast"], note: "Z-Image is the cheapest. Qwen / Imagen4 Fast for slightly higher quality." },
44
+ { intent: "highest fidelity image", modelIds: ["gpt-image-2", "gpt-image-2-5-sunburst", "imagen4-ultra"], note: "GPT Image 2 for characters and identity; GPT Image 2.5 Sunburst for wide or in-between ratios GPT Image 2 can't draw." },
45
+ { intent: "image edit / restyle", modelIds: ["gpt-image-2-5-flare-i2i", "gpt-image-2-i2i", "seedream-5-pro-i2i"], note: "GPT Image 2.5 Flare keeps pose, framing and product detail; GPT Image 2 i2i for identity-critical edits; Seedream 5 Pro for instruction-based edits." },
46
+ { intent: "highest-resolution image", modelIds: ["topaz-image-upscale", "gpt-image-2", "gpt-image-2-5-sunburst"], note: "Generate at the model's top tier, then Topaz upscale 4x (Topaz's only lever is the 1x/2x/4x factor)." },
47
+ { intent: "background removal / cutout", modelIds: ["recraft-remove-bg"], note: "Cheap, no prompt needed." },
48
+ // video
49
+ { 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." },
50
+ { intent: "cheap batch video clips", modelIds: ["veo3.1", "wan-turbo", "bytedance-lite"], note: "VEO 3.1 Fast is the best price/quality balance with native audio." },
51
+ { intent: "video with start + end frame", modelIds: ["veo3", "veo3.1", "kling-turbo", "minimax", "hailuo-standard", "seedance-2"], note: "All listed support an end frame; VEO uses imageUrls[start, end]." },
52
+ { intent: "music / song generation", modelIds: ["suno-v6", "suno-v6_wild", "suno-v6_mini", "suno-v5_5"], note: "V6 is the default flagship; V6 Wild for bolder, less predictable results; V6 Mini when speed matters; v5.5 / v5 / v4 keep their own character. Same price." },
53
+ { intent: "voice over / narration", modelIds: ["elevenlabs-v4", "elevenlabs-v3", "elevenlabs-v4-turbo", "elevenlabs-turbo"], note: "v4 is the default: [audio tags] for emotion and up to 10,000 characters per request. v3 is the previous expressive model, still selectable. v4 Turbo keeps v4's tags at Turbo's credit price; Turbo v2.5 is the cheapest for plain narration without tags." },
54
+ { intent: "lip-sync a portrait to audio", modelIds: ["kling-avatar-pro", "kling-avatar", "infinitalk"], note: "Pro for best mouth shape; InfiniTalk for resolution control." },
55
+ { intent: "transcription / captions", modelIds: ["elevenlabs-stt", "incredibly-fast-whisper", "whisper"], note: "Captions need WORD timestamps: ElevenLabs STT (always) or Incredibly Fast Whisper. Plain Whisper returns phrase segments only." },
56
+ { intent: "motion transfer (drive a subject by another video)", modelIds: ["motion-transfer", "kling-3.0-motion"], note: "Kling 2.6 base is cheap; Kling 3.0 is premium." }
57
+ ];
58
+ var NANO_BANANA_RATIOS = ["1:1", "16:9", "9:16", "4:3", "3:4", "3:2", "2:3", "4:5", "5:4", "21:9"];
59
+ var NANO_BANANA_2_LITE_RATIOS = ["auto", "1:1", "16:9", "9:16", "4:3", "3:4", "3:2", "2:3", "4:5", "5:4", "21:9", "4:1", "1:4", "8:1", "1:8"];
60
+ var NANO_BANANA_2_1_RATIOS = ["auto", "1:1", "16:9", "9:16", "4:3", "3:4", "3:2", "2:3", "4:5", "5:4", "21:9", "4:1", "1:4", "8:1", "1:8"];
61
+ var FLUX_RATIOS = ["1:1", "16:9", "9:16", "4:3", "3:4", "3:2", "2:3"];
62
+ var KONTEXT_RATIOS = ["1:1", "16:9", "9:16", "4:3", "3:4", "21:9"];
63
+ var GROK_RATIOS = ["1:1", "16:9", "9:16", "3:2", "2:3"];
64
+ var GPT_IMAGE_RATIOS = ["1:1", "3:2", "2:3"];
65
+ var GPT_IMAGE_2_RATIOS = ["auto", "1:1", "16:9", "9:16", "4:3", "3:4"];
66
+ var GPT_IMAGE_2_5_RATIOS = [
67
+ "auto",
68
+ "1:1",
69
+ "3:2",
70
+ "2:3",
71
+ "4:3",
72
+ "3:4",
73
+ "16:9",
74
+ "9:16",
75
+ "21:9",
76
+ "27:16",
77
+ "16:27",
78
+ "9:8",
79
+ "8:9"
80
+ ];
81
+ var IMAGEN4_RATIOS = ["1:1", "16:9", "9:16", "4:3", "3:4"];
82
+ var IDEOGRAM_RATIOS = ["1:1", "16:9", "9:16", "4:3", "3:4"];
83
+ var SEEDREAM_RATIOS = ["1:1", "16:9", "9:16", "4:3", "3:4", "3:2", "2:3", "21:9"];
84
+ var Z_IMAGE_RATIOS = ["1:1", "16:9", "9:16", "4:3", "3:4"];
85
+ var VIDEO_RATIOS_HV = ["16:9", "9:16"];
86
+ var VIDEO_RATIOS_HVS = ["16:9", "9:16", "1:1"];
87
+ var WAN_27_IMAGE_RATIOS = ["1:1", "16:9", "9:16", "4:3", "3:4", "21:9", "8:1", "1:8"];
88
+ var VIDEO_RATIOS_HVS345 = ["16:9", "9:16", "1:1", "4:3", "3:4"];
89
+ var VIDEO_RATIOS_SEEDANCE_2 = ["16:9", "9:16", "1:1", "4:3", "3:4", "21:9", "adaptive"];
90
+ var VIDEO_RATIOS_HAPPYHORSE_11 = ["16:9", "9:16", "1:1", "4:3", "3:4", "4:5", "5:4", "21:9", "9:21"];
91
+ var VIDEO_RATIOS_WAN_3 = ["adaptive", "16:9", "4:3", "1:1", "3:4", "9:16"];
92
+ var IMAGE_MODELS = {
93
+ // ── Google Nano Banana ──
94
+ "nano-banana": {
95
+ id: "nano-banana",
96
+ kind: "image",
97
+ // Accepts a reference image via image_input — works as both t2i (no
98
+ // ref) and i2i (with ref) under the same id, so list in both modes.
99
+ modes: ["t2i", "i2i"],
100
+ family: "Google",
101
+ label: "Nano Banana",
102
+ series: "Nano Banana",
103
+ description: "Budget-friendly realistic generation. Wide aspect-ratio support up to 21:9.",
104
+ useCases: ["realistic", "general", "fast"],
105
+ features: ["reference-image"],
106
+ aspectRatios: NANO_BANANA_RATIOS,
107
+ pricing: [{ identifier: "nano-banana", credits: 10, note: "1K" }],
108
+ mcpHidden: true
109
+ },
110
+ "nano-banana-2": {
111
+ id: "nano-banana-2",
112
+ kind: "image",
113
+ // Accepts reference images via image_input — same as the rest of the
114
+ // Nano Banana family — so reachable for both t2i and i2i.
115
+ modes: ["t2i", "i2i"],
116
+ family: "Google",
117
+ label: "Nano Banana 2",
118
+ series: "Nano Banana",
119
+ description: "Newer Nano Banana with native resolution control (1K/2K/4K) and Google Search context.",
120
+ useCases: ["realistic", "high-res", "factual"],
121
+ features: ["reference-image", "google-search"],
122
+ aspectRatios: NANO_BANANA_RATIOS,
123
+ resolutions: ["1K", "2K", "4K"],
124
+ pricing: [
125
+ { identifier: "nano-banana-2", credits: 20, note: "1K default" },
126
+ { identifier: "nano-banana-2:2K", credits: 50, note: "2K" },
127
+ { identifier: "nano-banana-2:4K", credits: 50, note: "4K" }
128
+ ]
129
+ },
130
+ "nano-banana-2-1": {
131
+ id: "nano-banana-2-1",
132
+ kind: "image",
133
+ // Single id for both modes, like nano-banana-2: optional input images via
134
+ // image_input (up to 10) on the one endpoint.
135
+ modes: ["t2i", "i2i"],
136
+ family: "Google",
137
+ label: "Nano Banana 2.1",
138
+ series: "Nano Banana",
139
+ description: "Google's high-efficiency image model for generation and editing \u2014 sharper quality, prompt adherence, character consistency and text rendering, up to 10 references and 4K output.",
140
+ useCases: ["realistic", "character", "typography", "high-res"],
141
+ features: ["reference-image"],
142
+ aspectRatios: NANO_BANANA_2_1_RATIOS,
143
+ resolutions: ["1K", "2K", "4K"],
144
+ pricing: [
145
+ { identifier: "nano-banana-2-1", credits: 10, note: "1K default" },
146
+ { identifier: "nano-banana-2-1:2K", credits: 20, note: "2K" },
147
+ { identifier: "nano-banana-2-1:4K", credits: 30, note: "4K" }
148
+ ]
149
+ },
150
+ "nano-banana-2-lite": {
151
+ id: "nano-banana-2-lite",
152
+ kind: "image",
153
+ // Same single-id shape as nano-banana-2: optional input images on the one
154
+ // endpoint (via image_urls, up to 10), so reachable for both t2i and i2i.
155
+ modes: ["t2i", "i2i"],
156
+ family: "Google",
157
+ label: "Nano Banana 2 Lite",
158
+ series: "Nano Banana",
159
+ description: "Lightweight Nano Banana 2 (Gemini 3.1 Flash-Lite) \u2014 fast, low-cost 1K generation and editing.",
160
+ useCases: ["realistic", "drafts", "iteration"],
161
+ features: ["reference-image"],
162
+ aspectRatios: NANO_BANANA_2_LITE_RATIOS,
163
+ // 1K only — no resolution lever, flat pricing.
164
+ pricing: [{ identifier: "nano-banana-2-lite", credits: 10, note: "1K flat" }]
165
+ },
166
+ "nano-banana-pro": {
167
+ id: "nano-banana-pro",
168
+ kind: "image",
169
+ modes: ["t2i", "i2i"],
170
+ family: "Google",
171
+ label: "Nano Banana Pro",
172
+ series: "Nano Banana",
173
+ description: "Top-tier Nano Banana \u2014 best for text rendering, diagrams, and complex compositions.",
174
+ useCases: ["typography", "diagrams", "premium", "text-heavy"],
175
+ features: ["reference-image"],
176
+ aspectRatios: NANO_BANANA_RATIOS,
177
+ resolutions: ["1K", "2K", "4K"],
178
+ pricing: [
179
+ { identifier: "nano-banana-pro", credits: 45, note: "1K / 2K" },
180
+ { identifier: "nano-banana-pro:4K", credits: 60, note: "4K" }
181
+ ]
182
+ },
183
+ "nano-banana-edit": {
184
+ id: "nano-banana-edit",
185
+ kind: "image",
186
+ modes: ["edit"],
187
+ family: "Google",
188
+ label: "Nano Banana Edit",
189
+ series: "Nano Banana",
190
+ description: "Image-to-image edits via Google's Nano Banana family. Good general-purpose editor.",
191
+ useCases: ["edit", "remix", "general"],
192
+ features: ["reference-image"],
193
+ aspectRatios: NANO_BANANA_RATIOS,
194
+ pricing: [{ identifier: "nano-banana-edit", credits: 10 }]
195
+ },
196
+ // ── Black Forest Labs (Flux) ──
197
+ "flux": {
198
+ id: "flux",
199
+ kind: "image",
200
+ modes: ["t2i"],
201
+ family: "Black Forest Labs",
202
+ label: "Flux 2 Pro",
203
+ series: "Flux",
204
+ description: "Flux 2 Pro text-to-image. Strong realism, fast. Resolution lever to 2K.",
205
+ useCases: ["realistic", "general"],
206
+ features: ["reference-image"],
207
+ aspectRatios: FLUX_RATIOS,
208
+ resolutions: ["1K", "2K"],
209
+ pricing: [
210
+ { identifier: "flux", credits: 13, note: "1K default" },
211
+ { identifier: "flux:2K", credits: 20, note: "2K" }
212
+ ]
213
+ },
214
+ "flux-flex": {
215
+ id: "flux-flex",
216
+ kind: "image",
217
+ modes: ["t2i"],
218
+ family: "Black Forest Labs",
219
+ label: "Flux 2 Flex",
220
+ series: "Flux",
221
+ description: "Flux 2 Flex \u2014 premium fidelity, more flexible composition. Pricier than Pro.",
222
+ useCases: ["premium", "fidelity", "realistic"],
223
+ features: ["reference-image"],
224
+ aspectRatios: FLUX_RATIOS,
225
+ resolutions: ["1K", "2K"],
226
+ pricing: [
227
+ { identifier: "flux-flex", credits: 35, note: "1K default" },
228
+ { identifier: "flux-flex:2K", credits: 60, note: "2K" }
229
+ ]
230
+ },
231
+ "flux-i2i": {
232
+ id: "flux-i2i",
233
+ kind: "image",
234
+ modes: ["i2i"],
235
+ family: "Black Forest Labs",
236
+ label: "Flux 2 Flex (I2I)",
237
+ series: "Flux",
238
+ description: "Image-to-image with Flux Flex. Honors source image structure while applying prompt.",
239
+ useCases: ["edit", "restyle", "transform"],
240
+ features: ["reference-image"],
241
+ aspectRatios: FLUX_RATIOS,
242
+ resolutions: ["1K", "2K"],
243
+ pricing: [
244
+ { identifier: "flux-i2i", credits: 60, note: "1K default" },
245
+ { identifier: "flux-i2i:2K", credits: 60, note: "2K" }
246
+ ]
247
+ },
248
+ "flux-pro-i2i": {
249
+ id: "flux-pro-i2i",
250
+ kind: "image",
251
+ modes: ["i2i"],
252
+ family: "Black Forest Labs",
253
+ label: "Flux 2 Pro (I2I)",
254
+ series: "Flux",
255
+ description: "Image-to-image with Flux Pro. Cheaper than Flex variant, good general edits.",
256
+ useCases: ["edit", "restyle"],
257
+ features: ["reference-image"],
258
+ aspectRatios: FLUX_RATIOS,
259
+ resolutions: ["1K", "2K"],
260
+ pricing: [
261
+ { identifier: "flux-pro-i2i", credits: 13, note: "1K default" },
262
+ { identifier: "flux-pro-i2i:2K", credits: 20, note: "2K" }
263
+ ]
264
+ },
265
+ "flux-kontext": {
266
+ id: "flux-kontext",
267
+ kind: "image",
268
+ // Kontext supports both pure t2i (no input image) and edit (with input).
269
+ modes: ["t2i", "edit"],
270
+ family: "Black Forest Labs",
271
+ label: "Flux Kontext Pro",
272
+ series: "Flux",
273
+ description: "Context-aware editing and style transfer. Strong at preserving subject identity through edits.",
274
+ useCases: ["edit", "style-transfer", "preserve-identity"],
275
+ features: ["reference-image"],
276
+ aspectRatios: KONTEXT_RATIOS,
277
+ pricing: [{ identifier: "flux-kontext", credits: 13 }]
278
+ },
279
+ "flux-kontext-max": {
280
+ id: "flux-kontext-max",
281
+ kind: "image",
282
+ modes: ["t2i", "edit"],
283
+ family: "Black Forest Labs",
284
+ label: "Flux Kontext Max",
285
+ series: "Flux",
286
+ description: "Premium Kontext \u2014 highest fidelity context-aware edits.",
287
+ useCases: ["edit", "style-transfer", "premium"],
288
+ features: ["reference-image"],
289
+ aspectRatios: KONTEXT_RATIOS,
290
+ pricing: [{ identifier: "flux-kontext-max", credits: 25 }]
291
+ },
292
+ // ── Replicate "Open" (uncensored) — run direct via Replicate, not KIE ──
293
+ "flux-2-klein": {
294
+ id: "flux-2-klein",
295
+ kind: "image",
296
+ modes: ["t2i"],
297
+ family: "Black Forest Labs",
298
+ label: "Flux 2 Klein (Open)",
299
+ series: "Flux",
300
+ description: "Open Flux 2 9B from BFL \u2014 fast, no safety filter. Runs direct on Replicate.",
301
+ useCases: ["realistic", "fast", "unfiltered"],
302
+ features: ["reference-image"],
303
+ aspectRatios: FLUX_RATIOS,
304
+ resolutions: ["0.5 MP", "1 MP", "2 MP", "4 MP"],
305
+ pricing: [
306
+ { identifier: "flux-2-klein", credits: 3 },
307
+ // 1MP 0ref (default)
308
+ { identifier: "flux-2-klein:1MP:0ref", credits: 3 },
309
+ // min — same point on the grid as the bare default
310
+ { identifier: "flux-2-klein:4MP:8ref", credits: 108 }
311
+ // max
312
+ ]
313
+ },
314
+ "kontext-multi": {
315
+ id: "kontext-multi",
316
+ kind: "image",
317
+ modes: ["i2i", "edit"],
318
+ family: "Black Forest Labs",
319
+ label: "Kontext Multi (Open)",
320
+ series: "Flux",
321
+ description: "Multi-image Flux Kontext Pro via Replicate \u2014 up to 4 input images, no safety filter.",
322
+ useCases: ["edit", "multi-reference", "unfiltered"],
323
+ features: ["reference-image"],
324
+ aspectRatios: KONTEXT_RATIOS,
325
+ pricing: [{ identifier: "kontext-multi", credits: 30 }]
326
+ },
327
+ "flux-2-pro": {
328
+ id: "flux-2-pro",
329
+ kind: "image",
330
+ modes: ["t2i", "i2i"],
331
+ family: "Black Forest Labs",
332
+ label: "Flux 2 Pro (Safety Tolerance)",
333
+ series: "Flux",
334
+ description: "BFL Flux 2 Pro flagship via Replicate \u2014 exposes the `safety_tolerance` lever pinned to 5 (max for Pro). Accepts up to 4 reference images.",
335
+ useCases: ["realistic", "high-quality", "unfiltered", "reference"],
336
+ features: ["reference-image"],
337
+ aspectRatios: FLUX_RATIOS,
338
+ resolutions: ["0.5 MP", "1 MP", "2 MP", "4 MP"],
339
+ pricing: [
340
+ { identifier: "flux-2-pro", credits: 23 },
341
+ // 2MP 0ref (default)
342
+ { identifier: "flux-2-pro:0.5MP:0ref", credits: 12 },
343
+ // min
344
+ { identifier: "flux-2-pro:4MP:8ref", credits: 278 }
345
+ // max
346
+ ]
347
+ },
348
+ "flux-2-max": {
349
+ id: "flux-2-max",
350
+ kind: "image",
351
+ modes: ["t2i", "i2i"],
352
+ family: "Black Forest Labs",
353
+ label: "Flux 2 Max (Safety Tolerance)",
354
+ series: "Flux",
355
+ description: "BFL Flux 2 Max \u2014 even larger sibling of Pro via Replicate, safety_tolerance=5, up to 8 reference images. Variable pricing by MP and ref count.",
356
+ useCases: ["realistic", "high-quality", "unfiltered", "multi-reference"],
357
+ features: ["reference-image"],
358
+ aspectRatios: FLUX_RATIOS,
359
+ resolutions: ["0.5 MP", "1 MP", "2 MP", "4 MP"],
360
+ pricing: [
361
+ { identifier: "flux-2-max", credits: 70 },
362
+ // 2MP 0ref (default)
363
+ { identifier: "flux-2-max:0.5MP:0ref", credits: 18 },
364
+ // min
365
+ { identifier: "flux-2-max:4MP:8ref", credits: 620 }
366
+ // max
367
+ ]
368
+ },
369
+ // ── OpenAI (GPT Image) ──
370
+ "gpt-image": {
371
+ id: "gpt-image",
372
+ kind: "image",
373
+ modes: ["t2i"],
374
+ family: "OpenAI",
375
+ label: "GPT Image 1.5",
376
+ series: "GPT Image",
377
+ description: "Best for text rendering, typography, logos, and graphic design. Limited aspect ratios.",
378
+ useCases: ["typography", "logo", "graphic-design", "text-heavy"],
379
+ features: ["reference-image"],
380
+ aspectRatios: GPT_IMAGE_RATIOS,
381
+ qualities: ["medium", "high"],
382
+ pricing: [
383
+ { identifier: "gpt-image", credits: 10, note: "medium default" },
384
+ { identifier: "gpt-image:high", credits: 60, note: "high quality" }
385
+ ],
386
+ valueLabels: { "3:2": "3:2 (Landscape)", "2:3": "2:3 (Portrait)" },
387
+ mcpHidden: true
388
+ },
389
+ "gpt-image-i2i": {
390
+ id: "gpt-image-i2i",
391
+ kind: "image",
392
+ modes: ["i2i"],
393
+ family: "OpenAI",
394
+ label: "GPT Image 1.5 (I2I)",
395
+ series: "GPT Image",
396
+ description: "Image-to-image with GPT Image 1.5. Good text-aware edits.",
397
+ useCases: ["edit", "typography", "remix"],
398
+ features: ["reference-image"],
399
+ aspectRatios: GPT_IMAGE_RATIOS,
400
+ qualities: ["medium", "high"],
401
+ pricing: [
402
+ { identifier: "gpt-image-i2i", credits: 10, note: "medium default" },
403
+ { identifier: "gpt-image-i2i:high", credits: 60, note: "high quality" }
404
+ ],
405
+ valueLabels: { "3:2": "3:2 (Landscape)", "2:3": "2:3 (Portrait)" },
406
+ mcpHidden: true
407
+ },
408
+ "gpt-image-2": {
409
+ id: "gpt-image-2",
410
+ kind: "image",
411
+ modes: ["t2i"],
412
+ family: "OpenAI",
413
+ label: "GPT Image 2",
414
+ series: "GPT Image",
415
+ description: "Next-gen GPT Image \u2014 broader aspect ratios, resolution-based pricing (1K/2K/4K).",
416
+ useCases: ["typography", "high-res", "general"],
417
+ features: ["reference-image"],
418
+ aspectRatios: GPT_IMAGE_2_RATIOS,
419
+ resolutions: ["1K", "2K", "4K"],
420
+ pricing: [
421
+ { identifier: "gpt-image-2", credits: 15, note: "1K default" },
422
+ { identifier: "gpt-image-2:2K", credits: 30, note: "2K" },
423
+ { identifier: "gpt-image-2:4K", credits: 60, note: "4K" }
424
+ ],
425
+ safetyFilter: { stochastic: true, fallback: "nano-banana-pro" },
426
+ featured: true
427
+ },
428
+ "gpt-image-2-i2i": {
429
+ id: "gpt-image-2-i2i",
430
+ kind: "image",
431
+ modes: ["i2i"],
432
+ family: "OpenAI",
433
+ label: "GPT Image 2 (I2I)",
434
+ series: "GPT Image",
435
+ description: "Image-to-image with GPT Image 2.",
436
+ safetyFilter: { stochastic: true, fallback: "nano-banana-pro" },
437
+ useCases: ["edit", "high-res"],
438
+ features: ["reference-image"],
439
+ aspectRatios: GPT_IMAGE_2_RATIOS,
440
+ resolutions: ["1K", "2K", "4K"],
441
+ pricing: [
442
+ { identifier: "gpt-image-2-i2i", credits: 15, note: "1K default" },
443
+ { identifier: "gpt-image-2-i2i:2K", credits: 30, note: "2K" },
444
+ { identifier: "gpt-image-2-i2i:4K", credits: 60, note: "4K" }
445
+ ]
446
+ },
447
+ "gpt-image-2-5-flare": {
448
+ id: "gpt-image-2-5-flare",
449
+ kind: "image",
450
+ modes: ["t2i"],
451
+ family: "OpenAI",
452
+ label: "GPT Image 2.5 Flare",
453
+ series: "GPT Image",
454
+ description: "Fast everyday GPT Image 2.5 - higher quality than GPT Image 2 at about half the latency. The default of the pair: social and creator content, campaign variants, thumbnails, rapid iteration, high-volume work.",
455
+ useCases: ["typography", "high-res", "general", "draft"],
456
+ features: ["reference-image"],
457
+ aspectRatios: GPT_IMAGE_2_5_RATIOS,
458
+ resolutions: ["1K", "2K", "4K"],
459
+ pricing: [
460
+ { identifier: "gpt-image-2-5-flare", credits: 15, note: "1K default" },
461
+ { identifier: "gpt-image-2-5-flare:2K", credits: 25, note: "2K" },
462
+ { identifier: "gpt-image-2-5-flare:4K", credits: 40, note: "4K" }
463
+ ],
464
+ valueLabels: {
465
+ "3:2": "3:2 (Landscape)",
466
+ "2:3": "2:3 (Portrait)",
467
+ "27:16": "27:16 (Ultra-wide)",
468
+ "16:27": "16:27 (Ultra-tall)",
469
+ "9:8": "9:8 (Near-square)",
470
+ "8:9": "8:9 (Near-square)"
471
+ },
472
+ safetyFilter: { stochastic: true, fallback: "nano-banana-pro" }
473
+ },
474
+ "gpt-image-2-5-flare-i2i": {
475
+ id: "gpt-image-2-5-flare-i2i",
476
+ kind: "image",
477
+ modes: ["i2i"],
478
+ family: "OpenAI",
479
+ label: "GPT Image 2.5 Flare (I2I)",
480
+ series: "GPT Image",
481
+ description: "Fast GPT Image 2.5 edits (up to 16 source images) - the default when you are iterating rather than finishing.",
482
+ useCases: ["edit", "high-res"],
483
+ features: ["reference-image"],
484
+ aspectRatios: GPT_IMAGE_2_5_RATIOS,
485
+ resolutions: ["1K", "2K", "4K"],
486
+ pricing: [
487
+ { identifier: "gpt-image-2-5-flare-i2i", credits: 15, note: "1K default" },
488
+ { identifier: "gpt-image-2-5-flare-i2i:2K", credits: 25, note: "2K" },
489
+ { identifier: "gpt-image-2-5-flare-i2i:4K", credits: 40, note: "4K" }
490
+ ],
491
+ valueLabels: {
492
+ "3:2": "3:2 (Landscape)",
493
+ "2:3": "2:3 (Portrait)",
494
+ "27:16": "27:16 (Ultra-wide)",
495
+ "16:27": "16:27 (Ultra-tall)",
496
+ "9:8": "9:8 (Near-square)",
497
+ "8:9": "8:9 (Near-square)"
498
+ },
499
+ safetyFilter: { stochastic: true, fallback: "nano-banana-pro" }
500
+ },
501
+ "gpt-image-2-5-sunburst": {
502
+ id: "gpt-image-2-5-sunburst",
503
+ kind: "image",
504
+ modes: ["t2i"],
505
+ family: "OpenAI",
506
+ label: "GPT Image 2.5 Sunburst",
507
+ series: "GPT Image",
508
+ description: "Precision GPT Image 2.5 - trades generation time for tighter control and detail fidelity. Pick it for brand-sensitive and production work: packaging, diagrams, ecommerce retouching, polished campaign creative.",
509
+ useCases: ["typography", "high-res", "general"],
510
+ features: ["reference-image"],
511
+ aspectRatios: GPT_IMAGE_2_5_RATIOS,
512
+ resolutions: ["1K", "2K", "4K"],
513
+ pricing: [
514
+ { identifier: "gpt-image-2-5-sunburst", credits: 15, note: "1K default" },
515
+ { identifier: "gpt-image-2-5-sunburst:2K", credits: 25, note: "2K" },
516
+ { identifier: "gpt-image-2-5-sunburst:4K", credits: 40, note: "4K" }
517
+ ],
518
+ valueLabels: {
519
+ "3:2": "3:2 (Landscape)",
520
+ "2:3": "2:3 (Portrait)",
521
+ "27:16": "27:16 (Ultra-wide)",
522
+ "16:27": "16:27 (Ultra-tall)",
523
+ "9:8": "9:8 (Near-square)",
524
+ "8:9": "8:9 (Near-square)"
525
+ },
526
+ safetyFilter: { stochastic: true, fallback: "nano-banana-pro" }
527
+ },
528
+ "gpt-image-2-5-sunburst-i2i": {
529
+ id: "gpt-image-2-5-sunburst-i2i",
530
+ kind: "image",
531
+ modes: ["i2i"],
532
+ family: "OpenAI",
533
+ label: "GPT Image 2.5 Sunburst (I2I)",
534
+ series: "GPT Image",
535
+ description: "Precision GPT Image 2.5 edits (up to 16 source images) - the most controlled edit in the GPT family, at the cost of a longer run.",
536
+ useCases: ["edit", "high-res"],
537
+ features: ["reference-image"],
538
+ aspectRatios: GPT_IMAGE_2_5_RATIOS,
539
+ resolutions: ["1K", "2K", "4K"],
540
+ pricing: [
541
+ { identifier: "gpt-image-2-5-sunburst-i2i", credits: 15, note: "1K default" },
542
+ { identifier: "gpt-image-2-5-sunburst-i2i:2K", credits: 25, note: "2K" },
543
+ { identifier: "gpt-image-2-5-sunburst-i2i:4K", credits: 40, note: "4K" }
544
+ ],
545
+ valueLabels: {
546
+ "3:2": "3:2 (Landscape)",
547
+ "2:3": "2:3 (Portrait)",
548
+ "27:16": "27:16 (Ultra-wide)",
549
+ "16:27": "16:27 (Ultra-tall)",
550
+ "9:8": "9:8 (Near-square)",
551
+ "8:9": "8:9 (Near-square)"
552
+ },
553
+ safetyFilter: { stochastic: true, fallback: "nano-banana-pro" }
554
+ },
555
+ // ── Ideogram ──
556
+ // Ideogram models use a `rendering_speed` (TURBO / BALANCED / QUALITY)
557
+ // dimension that's distinct from the `quality` lever — frontend exposes
558
+ // it via a separate dropdown — so we don't model it under `qualities`.
559
+ // The composite pricing identifiers (`ideogram-v3:TURBO`, etc.) capture
560
+ // the per-tier credit cost without claiming Claude can pick it from
561
+ // the MCP tool's `quality` enum.
562
+ "ideogram-v3": {
563
+ id: "ideogram-v3",
564
+ kind: "image",
565
+ modes: ["t2i"],
566
+ family: "Ideogram",
567
+ label: "Ideogram V3",
568
+ series: "Ideogram",
569
+ description: "Strong typography and stylized illustration. Speed/quality tiered (TURBO/BALANCED/QUALITY).",
570
+ useCases: ["typography", "illustration", "stylized"],
571
+ aspectRatios: IDEOGRAM_RATIOS,
572
+ pricing: [
573
+ { identifier: "ideogram-v3", credits: 18, note: "BALANCED default" },
574
+ { identifier: "ideogram-v3:TURBO", credits: 18, note: "fastest" },
575
+ { identifier: "ideogram-v3:QUALITY", credits: 18, note: "best quality" }
576
+ ]
577
+ },
578
+ "ideogram-edit": {
579
+ id: "ideogram-edit",
580
+ kind: "image",
581
+ modes: ["edit"],
582
+ family: "Ideogram",
583
+ label: "Ideogram Edit",
584
+ series: "Ideogram",
585
+ description: "Inpainting / mask-based editing with Ideogram. Pair with a mask URL.",
586
+ useCases: ["edit", "inpaint", "typography"],
587
+ features: ["reference-image", "mask"],
588
+ // No aspectRatios — Ideogram Edit takes output dimensions from the input
589
+ // image + mask. Backend strips aspect_ratio for this provider.
590
+ pricing: [
591
+ { identifier: "ideogram-edit", credits: 45, note: "BALANCED default" },
592
+ { identifier: "ideogram-edit:TURBO", credits: 30, note: "fastest" },
593
+ { identifier: "ideogram-edit:QUALITY", credits: 60, note: "best quality" }
594
+ ]
595
+ },
596
+ "ideogram-remix": {
597
+ id: "ideogram-remix",
598
+ kind: "image",
599
+ modes: ["i2i"],
600
+ family: "Ideogram",
601
+ label: "Ideogram Remix",
602
+ series: "Ideogram",
603
+ description: "Ideogram remix \u2014 character-aware restyling driven by reference images.",
604
+ useCases: ["remix", "character", "stylized"],
605
+ features: ["reference-image"],
606
+ aspectRatios: IDEOGRAM_RATIOS,
607
+ pricing: [
608
+ { identifier: "ideogram-remix", credits: 45, note: "BALANCED default" },
609
+ { identifier: "ideogram-remix:TURBO", credits: 30, note: "fastest" },
610
+ { identifier: "ideogram-remix:QUALITY", credits: 60, note: "best quality" }
611
+ ]
612
+ },
613
+ // `ideogram-reframe` was retired 2026-09-15 — KIE's `ideogram/v3-reframe`
614
+ // fails every task upstream (#1331); see IDEOGRAM_PROVIDERS in model-constants.
615
+ // ── Google Imagen ──
616
+ "imagen4": {
617
+ id: "imagen4",
618
+ kind: "image",
619
+ modes: ["t2i"],
620
+ family: "Google",
621
+ label: "Imagen 4",
622
+ series: "Imagen",
623
+ description: "Google's Imagen 4 \u2014 strong photographic quality and prompt fidelity.",
624
+ useCases: ["photographic", "realistic"],
625
+ aspectRatios: IMAGEN4_RATIOS,
626
+ pricing: [{ identifier: "imagen4", credits: 20 }]
627
+ },
628
+ "imagen4-fast": {
629
+ id: "imagen4-fast",
630
+ kind: "image",
631
+ modes: ["t2i"],
632
+ family: "Google",
633
+ label: "Imagen 4 Fast",
634
+ series: "Imagen",
635
+ description: "Cheaper / quicker Imagen 4 tier.",
636
+ useCases: ["fast", "realistic", "general"],
637
+ aspectRatios: IMAGEN4_RATIOS,
638
+ pricing: [{ identifier: "imagen4-fast", credits: 10 }]
639
+ },
640
+ "imagen4-ultra": {
641
+ id: "imagen4-ultra",
642
+ kind: "image",
643
+ modes: ["t2i"],
644
+ family: "Google",
645
+ label: "Imagen 4 Ultra",
646
+ series: "Imagen",
647
+ description: "Premium Imagen 4 \u2014 highest fidelity, slower / more credits.",
648
+ useCases: ["premium", "photographic"],
649
+ aspectRatios: IMAGEN4_RATIOS,
650
+ pricing: [{ identifier: "imagen4-ultra", credits: 30 }]
651
+ },
652
+ // ── Bytedance Seedream ──
653
+ "seedream": {
654
+ id: "seedream",
655
+ kind: "image",
656
+ modes: ["t2i"],
657
+ family: "Bytedance",
658
+ label: "Seedream 4.5",
659
+ series: "Seedream",
660
+ description: "Bytedance's Seedream 4.5 \u2014 precise control, high resolution at 4K via :high.",
661
+ useCases: ["realistic", "high-res", "control"],
662
+ features: ["reference-image"],
663
+ aspectRatios: SEEDREAM_RATIOS,
664
+ qualities: ["basic", "high"],
665
+ pricing: [
666
+ { identifier: "seedream", credits: 16, note: "basic / 2K default" },
667
+ { identifier: "seedream:high", credits: 40, note: "high / 4K" }
668
+ ],
669
+ mcpHidden: true
670
+ },
671
+ "seedream-edit": {
672
+ id: "seedream-edit",
673
+ kind: "image",
674
+ modes: ["edit"],
675
+ family: "Bytedance",
676
+ label: "Seedream 4.5 Edit",
677
+ series: "Seedream",
678
+ description: "Image editing / transforms via Seedream 4.5.",
679
+ useCases: ["edit", "transform"],
680
+ features: ["reference-image"],
681
+ aspectRatios: SEEDREAM_RATIOS,
682
+ qualities: ["basic", "high"],
683
+ pricing: [
684
+ { identifier: "seedream-edit", credits: 16, note: "basic default" },
685
+ { identifier: "seedream-edit:high", credits: 40, note: "high quality" }
686
+ ],
687
+ mcpHidden: true
688
+ },
689
+ "seedream-5-lite": {
690
+ id: "seedream-5-lite",
691
+ kind: "image",
692
+ modes: ["t2i"],
693
+ family: "Bytedance",
694
+ label: "Seedream 5 Lite",
695
+ series: "Seedream",
696
+ description: "Newer Seedream 5 Lite \u2014 instruction-based generation, visual reasoning.",
697
+ useCases: ["realistic", "instruction"],
698
+ features: ["reference-image"],
699
+ aspectRatios: SEEDREAM_RATIOS,
700
+ qualities: ["basic", "high"],
701
+ pricing: [
702
+ { identifier: "seedream-5-lite", credits: 14, note: "basic default" },
703
+ { identifier: "seedream-5-lite:high", credits: 50, note: "high quality" }
704
+ ]
705
+ },
706
+ "seedream-5-lite-i2i": {
707
+ id: "seedream-5-lite-i2i",
708
+ kind: "image",
709
+ modes: ["i2i"],
710
+ family: "Bytedance",
711
+ label: "Seedream 5 Lite (I2I)",
712
+ series: "Seedream",
713
+ description: "Image-to-image with Seedream 5 Lite.",
714
+ useCases: ["edit", "instruction"],
715
+ features: ["reference-image"],
716
+ aspectRatios: SEEDREAM_RATIOS,
717
+ qualities: ["basic", "high"],
718
+ pricing: [
719
+ { identifier: "seedream-5-lite-i2i", credits: 14, note: "basic default" },
720
+ { identifier: "seedream-5-lite-i2i:high", credits: 50, note: "high quality" }
721
+ ]
722
+ },
723
+ "seedream-5-pro": {
724
+ id: "seedream-5-pro",
725
+ kind: "image",
726
+ modes: ["t2i"],
727
+ family: "Bytedance",
728
+ label: "Seedream 5 Pro",
729
+ series: "Seedream",
730
+ description: "Flagship Seedream 5 Pro \u2014 strongest instruction following and visual reasoning. Basic = 1K, high = 2K.",
731
+ useCases: ["realistic", "instruction"],
732
+ features: ["reference-image"],
733
+ aspectRatios: SEEDREAM_RATIOS,
734
+ qualities: ["basic", "high"],
735
+ pricing: [
736
+ { identifier: "seedream-5-pro", credits: 18, note: "basic / 1K default" },
737
+ { identifier: "seedream-5-pro:high", credits: 60, note: "high / 2K" }
738
+ ]
739
+ },
740
+ "seedream-5-pro-i2i": {
741
+ id: "seedream-5-pro-i2i",
742
+ kind: "image",
743
+ modes: ["i2i"],
744
+ family: "Bytedance",
745
+ label: "Seedream 5 Pro (I2I)",
746
+ series: "Seedream",
747
+ description: "Image-to-image with Seedream 5 Pro \u2014 multi-reference instruction edits. Basic = 1K, high = 2K.",
748
+ useCases: ["edit", "instruction"],
749
+ features: ["reference-image"],
750
+ aspectRatios: SEEDREAM_RATIOS,
751
+ qualities: ["basic", "high"],
752
+ pricing: [
753
+ { identifier: "seedream-5-pro-i2i", credits: 19, note: "basic / 1K default" },
754
+ { identifier: "seedream-5-pro-i2i:high", credits: 60, note: "high / 2K" }
755
+ ]
756
+ },
757
+ // Seedream 5 Flash — fast, low-cost Seedream 5. Its lever is KIE's `size`
758
+ // (1K / 1.5K / 2K), NOT the siblings' `quality`: declared as `resolutions`
759
+ // (the KIE config renames it to `size` on the wire). Flat price at every
760
+ // offered size. 1.5K is not offered yet: no other image model or route enum
761
+ // carries it, and its price has not been confirmed.
762
+ // See: docs.kie.ai/market/seedream/5-flash-text-to-image.md
763
+ "seedream-5-flash": {
764
+ id: "seedream-5-flash",
765
+ kind: "image",
766
+ modes: ["t2i"],
767
+ family: "Bytedance",
768
+ label: "Seedream 5 Flash",
769
+ series: "Seedream",
770
+ description: "Fast, low-cost Seedream 5 \u2014 quick generations at 1K or 2K, same price at either size.",
771
+ useCases: ["realistic", "drafts", "iteration"],
772
+ features: ["reference-image"],
773
+ aspectRatios: SEEDREAM_RATIOS,
774
+ resolutions: ["1K", "2K"],
775
+ pricing: [{ identifier: "seedream-5-flash", credits: 10, note: "1K / 2K flat" }]
776
+ },
777
+ "seedream-5-flash-i2i": {
778
+ id: "seedream-5-flash-i2i",
779
+ kind: "image",
780
+ modes: ["i2i"],
781
+ family: "Bytedance",
782
+ label: "Seedream 5 Flash (I2I)",
783
+ series: "Seedream",
784
+ description: "Image-to-image with Seedream 5 Flash \u2014 fast edits from up to 10 input images at 1K or 2K, same price at either size.",
785
+ useCases: ["edit", "iteration"],
786
+ features: ["reference-image"],
787
+ aspectRatios: SEEDREAM_RATIOS,
788
+ resolutions: ["1K", "2K"],
789
+ pricing: [{ identifier: "seedream-5-flash-i2i", credits: 10, note: "1K / 2K flat" }]
790
+ },
791
+ // ── Alibaba Qwen ──
792
+ "qwen": {
793
+ id: "qwen",
794
+ kind: "image",
795
+ modes: ["t2i"],
796
+ family: "Alibaba",
797
+ label: "Qwen",
798
+ series: "Qwen",
799
+ description: "Cheap, fast, decent quality. Native negative-prompt support.",
800
+ useCases: ["fast", "cheap", "general"],
801
+ features: ["reference-image"],
802
+ aspectRatios: IDEOGRAM_RATIOS,
803
+ pricing: [{ identifier: "qwen", credits: 10 }]
804
+ },
805
+ "qwen-i2i": {
806
+ id: "qwen-i2i",
807
+ kind: "image",
808
+ modes: ["i2i"],
809
+ family: "Alibaba",
810
+ label: "Qwen (I2I)",
811
+ series: "Qwen",
812
+ description: "Image-to-image with Qwen.",
813
+ useCases: ["edit", "fast", "cheap"],
814
+ features: ["reference-image"],
815
+ aspectRatios: IDEOGRAM_RATIOS,
816
+ pricing: [{ identifier: "qwen-i2i", credits: 10 }]
817
+ },
818
+ "qwen-edit": {
819
+ id: "qwen-edit",
820
+ kind: "image",
821
+ modes: ["edit"],
822
+ family: "Alibaba",
823
+ label: "Qwen Edit",
824
+ series: "Qwen",
825
+ description: "Qwen image edit endpoint with native negative prompt.",
826
+ useCases: ["edit", "cheap"],
827
+ features: ["reference-image"],
828
+ aspectRatios: IDEOGRAM_RATIOS,
829
+ pricing: [{ identifier: "qwen-edit", credits: 13 }]
830
+ },
831
+ // ── Tongyi-MAI Z-Image ──
832
+ "z-image": {
833
+ id: "z-image",
834
+ kind: "image",
835
+ modes: ["t2i"],
836
+ family: "Tongyi-MAI",
837
+ label: "Z-Image",
838
+ series: "Z-Image",
839
+ description: "Cheapest model in catalog. Fast, stylized output. Limited aspect ratios.",
840
+ useCases: ["cheap", "fast", "stylized"],
841
+ aspectRatios: Z_IMAGE_RATIOS,
842
+ pricing: [{ identifier: "z-image", credits: 2 }],
843
+ featured: true
844
+ },
845
+ // ── xAI Grok ──
846
+ "grok": {
847
+ id: "grok",
848
+ // Grok serves both t2i (image) and t2v (video) under the same id —
849
+ // backend route resolves which by entry point. We classify the catalog
850
+ // entry by primary kind (image) but list both modes so MCP filters and
851
+ // frontend pickers find it under either context.
852
+ kind: "image",
853
+ modes: ["t2i", "t2v"],
854
+ family: "xAI",
855
+ label: "Grok Imagine",
856
+ series: "Grok",
857
+ description: "Expressive, high-contrast output. Supports both image and video.",
858
+ useCases: ["stylized", "expressive", "general"],
859
+ features: ["reference-image"],
860
+ aspectRatios: GROK_RATIOS,
861
+ pricing: [{ identifier: "grok", credits: 10 }]
862
+ },
863
+ "grok-i2i": {
864
+ id: "grok-i2i",
865
+ kind: "image",
866
+ modes: ["i2i"],
867
+ family: "xAI",
868
+ label: "Grok Imagine (I2I)",
869
+ series: "Grok",
870
+ description: "Image-to-image with Grok.",
871
+ useCases: ["edit", "stylized"],
872
+ features: ["reference-image"],
873
+ pricing: [{ identifier: "grok-i2i", credits: 10 }]
874
+ },
875
+ "grok-upscale": {
876
+ id: "grok-upscale",
877
+ kind: "image",
878
+ modes: ["upscale"],
879
+ family: "xAI",
880
+ label: "Grok Upscale",
881
+ series: "Grok",
882
+ description: "Upscale a previously-generated Grok image. Requires the prior task id.",
883
+ useCases: ["upscale"],
884
+ pricing: [{ identifier: "grok-upscale", credits: 25 }]
885
+ },
886
+ // Grok Imagine Image 2.0 — t2i plus task-chained region editing. The edit
887
+ // and segment-map endpoints take a PRIOR grok-2 generation's task id (the
888
+ // job's `kieTaskId` output), not an image URL — same contract as
889
+ // grok-upscale (see TASK_CHAINED_EDIT_PROVIDERS in model-constants).
890
+ "grok-2": {
891
+ id: "grok-2",
892
+ kind: "image",
893
+ modes: ["t2i"],
894
+ family: "xAI",
895
+ label: "Grok Imagine 2",
896
+ series: "Grok",
897
+ description: "Grok Imagine Image 2.0 \u2014 expressive, high-contrast t2i. Generations chain into grok-2-segment (free named region masks) and grok-2-edit (region-targeted edits).",
898
+ useCases: ["stylized", "expressive", "general"],
899
+ // Refs auto-route to grok-2-i2i (segment-map → image-edit chain); ONE
900
+ // reference (REF_IMAGE_MAX_LIMITS).
901
+ features: ["reference-image"],
902
+ aspectRatios: GROK_RATIOS,
903
+ pricing: [{ identifier: "grok-2", credits: 10 }]
904
+ },
905
+ "grok-2-edit": {
906
+ id: "grok-2-edit",
907
+ kind: "image",
908
+ modes: ["edit"],
909
+ family: "xAI",
910
+ label: "Grok Imagine 2 Edit",
911
+ series: "Grok",
912
+ description: "Prompt-edit a prior grok-2 generation by task id. Optional mask indexes (from grok-2-segment) restrict the edit to named regions.",
913
+ useCases: ["edit", "region-edit"],
914
+ pricing: [{ identifier: "grok-2-edit", credits: 10 }]
915
+ },
916
+ // Auto-selected when references are attached to grok-2 (T2I_TO_I2I_VARIANT):
917
+ // the t2i endpoint takes no image, so the FREE segment-map mints a task id
918
+ // from the reference URL and image-edit consumes it. Single reference.
919
+ "grok-2-i2i": {
920
+ id: "grok-2-i2i",
921
+ kind: "image",
922
+ modes: ["i2i"],
923
+ family: "xAI",
924
+ label: "Grok Imagine 2 (reference)",
925
+ series: "Grok",
926
+ description: "grok-2 guided by ONE reference image via the segment-map \u2192 image-edit chain \u2014 preserves the reference's composition while applying the prompt.",
927
+ useCases: ["restyle", "edit", "reference"],
928
+ features: ["reference-image"],
929
+ pricing: [{ identifier: "grok-2-i2i", credits: 10 }]
930
+ },
931
+ "grok-2-segment": {
932
+ id: "grok-2-segment",
933
+ kind: "image",
934
+ modes: ["edit"],
935
+ family: "xAI",
936
+ label: "Grok Imagine 2 Segment Map",
937
+ series: "Grok",
938
+ description: "FREE semantic segment map of a prior grok-2 generation \u2014 named region masks whose indexes feed grok-2-edit's region targeting.",
939
+ useCases: ["segmentation", "region-edit"],
940
+ pricing: [{ identifier: "grok-2-segment", credits: 0, note: "free" }]
941
+ },
942
+ // ── Utilities ──
943
+ "recraft-remove-bg": {
944
+ id: "recraft-remove-bg",
945
+ kind: "image",
946
+ modes: ["remove-bg"],
947
+ family: "Recraft",
948
+ label: "Recraft Remove BG",
949
+ series: "Recraft",
950
+ description: "Remove image background. Cheap utility.",
951
+ useCases: ["background-removal", "utility"],
952
+ features: ["reference-image"],
953
+ pricing: [{ identifier: "recraft-remove-bg", credits: 3 }]
954
+ },
955
+ "recraft-upscale": {
956
+ id: "recraft-upscale",
957
+ kind: "image",
958
+ modes: ["upscale"],
959
+ family: "Recraft",
960
+ label: "Recraft Crisp Upscale",
961
+ series: "Recraft",
962
+ description: "Light-weight image upscale (Recraft Crisp).",
963
+ useCases: ["upscale", "utility"],
964
+ features: ["reference-image"],
965
+ pricing: [{ identifier: "recraft-upscale", credits: 2 }]
966
+ },
967
+ "topaz-image-upscale": {
968
+ id: "topaz-image-upscale",
969
+ kind: "image",
970
+ modes: ["upscale"],
971
+ family: "Topaz",
972
+ label: "Topaz Image Upscale",
973
+ series: "Topaz",
974
+ description: "High-quality image upscale at 1x (enhance only), 2x or 4x. Best for production-ready output.",
975
+ useCases: ["upscale", "high-res", "premium"],
976
+ features: ["reference-image"],
977
+ // No `resolutions`: the provider's only quality lever is `upscale_factor`
978
+ // (1/2/4) — see resolveTopazUpscale. The 2K/4K/8K menu this used to
979
+ // advertise had no provider parameter behind it.
980
+ pricing: [
981
+ { identifier: "topaz-image-upscale", credits: 25, note: "1x / 2x" },
982
+ { identifier: "topaz-image-upscale:4K", credits: 50, note: "4x (legacy identifier)" }
983
+ ]
984
+ }
985
+ };
986
+ var VIDEO_MODELS = {
987
+ // ── Hailuo / MiniMax ──
988
+ "minimax": {
989
+ id: "minimax",
990
+ kind: "video",
991
+ modes: ["i2v", "t2v"],
992
+ family: "MiniMax",
993
+ label: "Hailuo 02 I2V Pro",
994
+ series: "Hailuo",
995
+ description: "Hailuo 02 Pro \u2014 strong photoreal motion, fixed 5-second clips. Supports end frame.",
996
+ useCases: ["realistic", "motion", "narrative"],
997
+ features: ["end-frame"],
998
+ durations: [5],
999
+ defaultDuration: 5,
1000
+ pricing: [{ identifier: "minimax", credits: 143, note: "5s, 1080p" }]
1001
+ },
1002
+ // MiniMax H3 (KIE "minimax-h3") — t2v / i2v (first and/or last frame) /
1003
+ // reference-to-video (9 images / 3 videos ≤15s total / 3 audios ≤15s total;
1004
+ // audio refs require an image or video ref alongside). Two-rate resolution
1005
+ // lever (768P added 2026-08-03): 2K (KIE default) at 36.5 KIE cr/s, 768P at
1006
+ // 22.5 KIE cr/s — billed on output + input-video seconds at the SELECTED
1007
+ // resolution's rate; input images beyond the first 5 add 11 KIE cr each,
1008
+ // reference audio free. Bare duration composites stay the 2K rate (identical
1009
+ // to the pre-lever seeded rows); 768P appends ":768p". Mirrors the Seedance 2
1010
+ // multimodal surface.
1011
+ // docs.kie.ai/market/minimax-h3/{text,image,reference}-to-video.
1012
+ "minimax-h3": {
1013
+ id: "minimax-h3",
1014
+ unlistedResolutionRendersAs: "2K",
1015
+ kind: "video",
1016
+ modes: ["i2v", "t2v"],
1017
+ family: "MiniMax",
1018
+ label: "minimax-h3",
1019
+ series: "Hailuo",
1020
+ description: "MiniMax H3 \u2014 premium multimodal tier: first/last frame + image/video/audio references, native audio, 2K (default) or 768P output, 4-15s per-second pricing.",
1021
+ useCases: ["premium", "narrative"],
1022
+ features: ["end-frame", "audio", "reference-image", "video-reference"],
1023
+ aspectRatios: VIDEO_RATIOS_SEEDANCE_2,
1024
+ durations: [4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15],
1025
+ defaultDuration: 6,
1026
+ // First entry = default (the UI dropdown + fail-safe snap use opts[0], and
1027
+ // 2K is the KIE-side default). Uppercase values are the exact KIE wire enum.
1028
+ resolutions: ["2K", "768P"],
1029
+ valueLabels: { "2K": "2K (default)" },
1030
+ pricing: [
1031
+ { identifier: "minimax-h3", credits: 550, note: "default 6s @2K \u2014 see :Ns variants" },
1032
+ { identifier: "minimax-h3:4s", credits: 370, note: "4s @2K (min)" },
1033
+ { identifier: "minimax-h3:8s", credits: 730, note: "8s @2K" },
1034
+ { identifier: "minimax-h3:15s", credits: 1370, note: "15s @2K (max)" },
1035
+ { identifier: "minimax-h3:4s:768p", credits: 230, note: "4s @768P (min)" },
1036
+ { identifier: "minimax-h3:8s:768p", credits: 450, note: "8s @768P" },
1037
+ { identifier: "minimax-h3:15s:768p", credits: 850, note: "15s @768P (max)" }
1038
+ ]
1039
+ },
1040
+ "hailuo-2.3-pro": {
1041
+ id: "hailuo-2.3-pro",
1042
+ kind: "video",
1043
+ modes: ["i2v"],
1044
+ family: "MiniMax",
1045
+ valueLabels: { "1080P": "1080P (6s max)" },
1046
+ label: "Hailuo 2.3 Pro",
1047
+ series: "Hailuo",
1048
+ description: "Hailuo 2.3 Pro \u2014 newer Hailuo with 768P / 1080P resolutions.",
1049
+ useCases: ["realistic", "motion"],
1050
+ durations: [6, 10],
1051
+ defaultDuration: 6,
1052
+ resolutions: ["768P", "1080P"],
1053
+ pricing: [
1054
+ { identifier: "hailuo-2.3-pro", credits: 200, note: "10s default" },
1055
+ { identifier: "hailuo-2.3-pro:6s", credits: 130, note: "6s" },
1056
+ { identifier: "hailuo-2.3-pro:10s", credits: 200, note: "10s" }
1057
+ ]
1058
+ },
1059
+ "hailuo-2.3": {
1060
+ id: "hailuo-2.3",
1061
+ kind: "video",
1062
+ modes: ["i2v"],
1063
+ family: "MiniMax",
1064
+ resolutions: ["768P", "1080P"],
1065
+ valueLabels: { "1080P": "1080P (6s max)" },
1066
+ label: "Hailuo 2.3 Standard",
1067
+ series: "Hailuo",
1068
+ description: "Cheaper Hailuo 2.3 tier \u2014 good baseline quality.",
1069
+ useCases: ["realistic", "cheap"],
1070
+ durations: [6, 10],
1071
+ defaultDuration: 6,
1072
+ pricing: [
1073
+ { identifier: "hailuo-2.3", credits: 75, note: "6s default" },
1074
+ { identifier: "hailuo-2.3:6s", credits: 80, note: "6s" },
1075
+ { identifier: "hailuo-2.3:10s", credits: 130, note: "10s" }
1076
+ ]
1077
+ },
1078
+ "hailuo-standard": {
1079
+ id: "hailuo-standard",
1080
+ kind: "video",
1081
+ modes: ["i2v", "t2v"],
1082
+ family: "MiniMax",
1083
+ label: "Hailuo 02 Standard",
1084
+ series: "Hailuo",
1085
+ description: "Hailuo 02 Standard \u2014 economical option with end-frame support.",
1086
+ useCases: ["cheap", "motion"],
1087
+ features: ["end-frame"],
1088
+ durations: [6, 10],
1089
+ defaultDuration: 6,
1090
+ resolutions: ["512P", "768P"],
1091
+ pricing: [
1092
+ { identifier: "hailuo-standard", credits: 75, note: "6s default" },
1093
+ { identifier: "hailuo-standard:6s", credits: 80, note: "6s" },
1094
+ { identifier: "hailuo-standard:10s", credits: 130, note: "10s" }
1095
+ ]
1096
+ },
1097
+ // ── Google VEO ──
1098
+ "veo3": {
1099
+ id: "veo3",
1100
+ kind: "video",
1101
+ modes: ["i2v", "t2v"],
1102
+ family: "Google",
1103
+ label: "VEO 3.1 Quality",
1104
+ series: "VEO",
1105
+ description: "Google VEO 3.1 Quality \u2014 premium cinematic video. 4/6/8s clips, optional end frame, native audio. No reference-to-video mode (Fast/Lite only). Flat per-generation pricing across durations.",
1106
+ useCases: ["cinematic", "premium", "narrative"],
1107
+ // NO "reference-image": KIE serves REFERENCE_2_VIDEO on the Fast and Lite
1108
+ // SKUs only. Its own words, on a production job (2026-09-04, app-reports
1109
+ // lane G): "Reference to video only supports the Veo Fast model and Veo
1110
+ // Lite model." Until 2026-09-15 this entry claimed the feature, so the
1111
+ // editor offered the reference handles, the adapter sent
1112
+ // generationType: "REFERENCE_2_VIDEO", and the call came back 422 every
1113
+ // time — after credits were reserved. `veo3.1` (KIE `veo3_fast`) and
1114
+ // `veo3_lite` DO serve it and keep the flag.
1115
+ features: ["end-frame", "audio"],
1116
+ durations: [4, 6, 8],
1117
+ defaultDuration: 8,
1118
+ aspectRatios: VIDEO_RATIOS_HV,
1119
+ // 720p (default) + 1080p inline. 4K generates the base at 1080p then chains
1120
+ // KIE's /api/v1/veo/get-4k-video endpoint (worker handleImageToVideo / handleTextToVideo).
1121
+ resolutions: ["720p", "1080p", "4k"],
1122
+ pricing: [
1123
+ { identifier: "veo3", credits: 1e3, note: "4/6/8s with audio (flat per-generation)" },
1124
+ { identifier: "veo3:4k", credits: 1300, note: "4K (base 1080p \u2192 get-4k-video)" }
1125
+ ],
1126
+ featured: true
1127
+ },
1128
+ "veo3.1": {
1129
+ id: "veo3.1",
1130
+ kind: "video",
1131
+ modes: ["i2v", "t2v"],
1132
+ family: "Google",
1133
+ label: "VEO 3.1 Fast",
1134
+ series: "VEO",
1135
+ description: "VEO 3.1 Fast \u2014 cheaper VEO 3.1 tier, 4/6/8s with audio. Good balance for most uses. Flat per-generation pricing across durations.",
1136
+ useCases: ["cinematic", "fast", "general"],
1137
+ features: ["end-frame", "audio", "reference-image"],
1138
+ durations: [4, 6, 8],
1139
+ defaultDuration: 8,
1140
+ aspectRatios: VIDEO_RATIOS_HV,
1141
+ resolutions: ["720p", "1080p", "4k"],
1142
+ pricing: [
1143
+ { identifier: "veo3.1", credits: 150, note: "4/6/8s with audio @ 720p (flat)" },
1144
+ { identifier: "veo3.1:1080p", credits: 170, note: "4/6/8s with audio @ 1080p (flat)" },
1145
+ { identifier: "veo3.1:4k", credits: 450, note: "4K (base 1080p \u2192 get-4k-video)" }
1146
+ ],
1147
+ featured: true
1148
+ },
1149
+ "veo3_lite": {
1150
+ id: "veo3_lite",
1151
+ kind: "video",
1152
+ modes: ["i2v", "t2v"],
1153
+ family: "Google",
1154
+ label: "VEO 3.1 Lite",
1155
+ series: "VEO",
1156
+ description: "VEO 3.1 Lite \u2014 most cost-effective VEO tier for high-volume generation. 4/6/8s with audio, supports first+last frame.",
1157
+ useCases: ["cinematic", "cheap", "high-volume"],
1158
+ features: ["end-frame", "audio", "reference-image"],
1159
+ durations: [4, 6, 8],
1160
+ defaultDuration: 8,
1161
+ aspectRatios: VIDEO_RATIOS_HV,
1162
+ resolutions: ["720p", "1080p", "4k"],
1163
+ pricing: [
1164
+ { identifier: "veo3_lite", credits: 75, note: "4/6/8s with audio @ 720p (flat)" },
1165
+ { identifier: "veo3_lite:1080p", credits: 90, note: "4/6/8s with audio @ 1080p (flat)" },
1166
+ { identifier: "veo3_lite:4k", credits: 380, note: "4K (base 1080p \u2192 get-4k-video)" }
1167
+ ],
1168
+ featured: false
1169
+ },
1170
+ "gemini-omni-video": {
1171
+ id: "gemini-omni-video",
1172
+ kind: "video",
1173
+ modes: ["i2v", "t2v"],
1174
+ // V2V is served via the i2v handle, not a catalog mode
1175
+ family: "Google",
1176
+ label: "Gemini Omni",
1177
+ series: "Gemini",
1178
+ description: "Google multimodal video with native audio; text/image-to-video + video-edit.",
1179
+ useCases: ["cinematic", "narrative"],
1180
+ features: ["audio", "reference-image"],
1181
+ aspectRatios: VIDEO_RATIOS_HV,
1182
+ resolutions: ["720p", "1080p", "4k"],
1183
+ durations: [4, 6, 8, 10],
1184
+ defaultDuration: 8,
1185
+ pricing: [
1186
+ { identifier: "gemini-omni-video", credits: 315, note: "default \u2014 720p/1080p 4s" },
1187
+ { identifier: "gemini-omni-video:4", credits: 230, note: "720p/1080p 4s" },
1188
+ { identifier: "gemini-omni-video:6", credits: 300, note: "720p/1080p 6s" },
1189
+ { identifier: "gemini-omni-video:8", credits: 380, note: "720p/1080p 8s" },
1190
+ { identifier: "gemini-omni-video:10", credits: 450, note: "720p/1080p 10s" },
1191
+ { identifier: "gemini-omni-video:4k:4", credits: 530, note: "4K 4s" },
1192
+ { identifier: "gemini-omni-video:4k:6", credits: 600, note: "4K 6s" },
1193
+ { identifier: "gemini-omni-video:4k:8", credits: 680, note: "4K 8s" },
1194
+ { identifier: "gemini-omni-video:4k:10", credits: 750, note: "4K 10s" },
1195
+ { identifier: "gemini-omni-video:vref", credits: 600, note: "video-edit 720p/1080p" },
1196
+ { identifier: "gemini-omni-video:4k:vref", credits: 900, note: "video-edit 4K" }
1197
+ ]
1198
+ },
1199
+ // Gemini Omni Flash 1.1 — the faster/cheaper Omni SKU (KIE
1200
+ // `google/gemini-omni-flash-1-1`). Identical request surface to
1201
+ // gemini-omni-video, so every capability below is deliberate PARITY with the
1202
+ // sibling: same 4/6/8/10s ladder, same 720p/1080p + 4K bands, same
1203
+ // features (the KIE schema also exposes first/last frame, but the pro
1204
+ // sibling's frame path is unwired here too — no "end-frame" until it is).
1205
+ // 360p is on the KIE enum but NOT exposed: it sits in the same credit band as
1206
+ // 720p/1080p, so it could only hand the user a worse render at the same price.
1207
+ "gemini-omni-flash": {
1208
+ id: "gemini-omni-flash",
1209
+ kind: "video",
1210
+ modes: ["i2v", "t2v"],
1211
+ // V2V is served via the i2v handle, not a catalog mode
1212
+ family: "Google",
1213
+ label: "Gemini Omni Flash",
1214
+ series: "Gemini",
1215
+ description: "Google Gemini Omni Flash \u2014 faster/cheaper Omni tier: multimodal video with native audio, text/image-to-video + video-edit.",
1216
+ useCases: ["cinematic", "fast"],
1217
+ features: ["audio", "reference-image"],
1218
+ aspectRatios: VIDEO_RATIOS_HV,
1219
+ resolutions: ["720p", "1080p", "4k"],
1220
+ durations: [4, 6, 8, 10],
1221
+ defaultDuration: 8,
1222
+ pricing: [
1223
+ { identifier: "gemini-omni-flash", credits: 270, note: "default \u2014 8s 720p/1080p (the credit builder's duration fallback)" },
1224
+ { identifier: "gemini-omni-flash:4", credits: 160, note: "720p/1080p 4s" },
1225
+ { identifier: "gemini-omni-flash:6", credits: 210, note: "720p/1080p 6s" },
1226
+ { identifier: "gemini-omni-flash:8", credits: 270, note: "720p/1080p 8s" },
1227
+ { identifier: "gemini-omni-flash:10", credits: 320, note: "720p/1080p 10s" },
1228
+ { identifier: "gemini-omni-flash:4k:4", credits: 370, note: "4K 4s" },
1229
+ { identifier: "gemini-omni-flash:4k:6", credits: 420, note: "4K 6s" },
1230
+ { identifier: "gemini-omni-flash:4k:8", credits: 480, note: "4K 8s" },
1231
+ { identifier: "gemini-omni-flash:4k:10", credits: 530, note: "4K 10s" },
1232
+ { identifier: "gemini-omni-flash:vref", credits: 420, note: "video-edit 720p/1080p" },
1233
+ { identifier: "gemini-omni-flash:4k:vref", credits: 630, note: "video-edit 4K" }
1234
+ ]
1235
+ },
1236
+ // ── Kling ──
1237
+ "kling": {
1238
+ id: "kling",
1239
+ kind: "video",
1240
+ modes: ["i2v", "t2v"],
1241
+ family: "Kuaishou",
1242
+ label: "Kling 2.6",
1243
+ series: "Kling",
1244
+ description: "Kling 2.6 I2V \u2014 strong motion realism. 5s/10s, optional native audio.",
1245
+ useCases: ["realistic", "motion", "dance"],
1246
+ features: ["audio"],
1247
+ aspectRatios: VIDEO_RATIOS_HVS,
1248
+ durations: [5, 10],
1249
+ defaultDuration: 5,
1250
+ pricing: [
1251
+ { identifier: "kling", credits: 280, note: "10s no audio default" },
1252
+ { identifier: "kling:5s", credits: 138, note: "5s no audio" },
1253
+ { identifier: "kling:10s", credits: 275, note: "10s no audio" },
1254
+ { identifier: "kling:5s:audio", credits: 275, note: "5s with audio" },
1255
+ { identifier: "kling:10s:audio", credits: 550, note: "10s with audio" }
1256
+ ]
1257
+ },
1258
+ "kling-turbo": {
1259
+ id: "kling-turbo",
1260
+ kind: "video",
1261
+ modes: ["i2v", "t2v"],
1262
+ family: "Kuaishou",
1263
+ label: "Kling 2.5 Turbo Pro",
1264
+ series: "Kling",
1265
+ description: "Faster Kling \u2014 good quality at lower cost. Supports end frame.",
1266
+ useCases: ["fast", "motion", "cheap"],
1267
+ features: ["end-frame"],
1268
+ durations: [5, 10],
1269
+ defaultDuration: 5,
1270
+ pricing: [
1271
+ { identifier: "kling-turbo", credits: 125, note: "5s default" },
1272
+ { identifier: "kling-turbo:5s", credits: 110 },
1273
+ { identifier: "kling-turbo:10s", credits: 210 }
1274
+ ]
1275
+ },
1276
+ "kling-3.0": {
1277
+ id: "kling-3.0",
1278
+ kind: "video",
1279
+ modes: ["i2v", "t2v"],
1280
+ family: "Kuaishou",
1281
+ label: "Kling 3.0",
1282
+ series: "Kling",
1283
+ description: "Premium Kling 3.0 \u2014 variable 3-15s duration, native audio, 720P/1080P.",
1284
+ useCases: ["premium", "narrative", "cinematic"],
1285
+ features: ["end-frame", "audio"],
1286
+ durations: [3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15],
1287
+ defaultDuration: 5,
1288
+ resolutions: ["720P", "1080P"],
1289
+ pricing: [
1290
+ { identifier: "kling-3.0", credits: 500, note: "5s 1080p with audio" },
1291
+ { identifier: "kling-3.0:5s", credits: 270, note: "5s 1080p no audio" },
1292
+ { identifier: "kling-3.0:10s", credits: 680, note: "10s 1080p no audio" },
1293
+ { identifier: "kling-3.0:15s", credits: 1020, note: "15s 1080p no audio" },
1294
+ { identifier: "kling-3.0:5s:audio", credits: 338, note: "5s 1080p with audio" },
1295
+ { identifier: "kling-3.0:10s:audio", credits: 1e3, note: "10s 1080p with audio" },
1296
+ { identifier: "kling-3.0:15s:audio", credits: 1500, note: "15s 1080p with audio" }
1297
+ ],
1298
+ featured: true
1299
+ },
1300
+ "kling-master": {
1301
+ id: "kling-master",
1302
+ kind: "video",
1303
+ modes: ["i2v"],
1304
+ family: "Kuaishou",
1305
+ label: "Kling 2.1 Master",
1306
+ series: "Kling",
1307
+ description: "Master tier I2V \u2014 strong cinematic quality.",
1308
+ useCases: ["cinematic", "premium"],
1309
+ durations: [5, 10],
1310
+ defaultDuration: 5,
1311
+ pricing: [
1312
+ { identifier: "kling-master", credits: 400, note: "5s default" },
1313
+ { identifier: "kling-master:5s", credits: 400 },
1314
+ { identifier: "kling-master:10s", credits: 800 }
1315
+ ]
1316
+ },
1317
+ "kling-3-omni": {
1318
+ id: "kling-3-omni",
1319
+ kind: "video",
1320
+ modes: ["i2v"],
1321
+ family: "Kuaishou",
1322
+ label: "Kling 3 Omni",
1323
+ series: "Kling",
1324
+ description: "Kling 3 Omni via Replicate \u2014 3-15s, 720p/1080p, end frame + reference images, native audio.",
1325
+ useCases: ["motion", "cinematic", "reference"],
1326
+ features: ["end-frame", "reference-image"],
1327
+ durations: [3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15],
1328
+ defaultDuration: 5,
1329
+ resolutions: ["720p", "1080p"],
1330
+ aspectRatios: VIDEO_RATIOS_HVS,
1331
+ pricing: [
1332
+ { identifier: "kling-3-omni", credits: 250, note: "5s 720p default" },
1333
+ { identifier: "kling-3-omni:5s", credits: 250 },
1334
+ { identifier: "kling-3-omni:10s", credits: 500 },
1335
+ { identifier: "kling-3-omni:15s", credits: 750 }
1336
+ ]
1337
+ },
1338
+ // ── xAI Grok video ──
1339
+ "grok-i2v": {
1340
+ id: "grok-i2v",
1341
+ kind: "video",
1342
+ modes: ["i2v"],
1343
+ features: ["reference-image"],
1344
+ family: "xAI",
1345
+ label: "Grok Imagine (I2V)",
1346
+ series: "Grok",
1347
+ description: "Grok image-to-video \u2014 stylized motion. Up to 15s.",
1348
+ useCases: ["stylized", "motion"],
1349
+ durations: [6, 10],
1350
+ defaultDuration: 6,
1351
+ resolutions: ["480p", "720p"],
1352
+ pricing: [
1353
+ { identifier: "grok-i2v", credits: 150, note: "6s default" },
1354
+ { identifier: "grok-i2v:6s", credits: 50 },
1355
+ { identifier: "grok-i2v:10s", credits: 80 },
1356
+ { identifier: "grok-i2v:15s", credits: 100 }
1357
+ ]
1358
+ },
1359
+ // xAI Grok Imagine Video 1.5 — KIE image-to-video (image required). True
1360
+ // per-second billing split 480p/720p. modes:["i2v"] is the honest capability;
1361
+ // it's also surfaced in the text-to-video dropdown for the unified node, where
1362
+ // the t2v route returns a clean "requires an input image" 400.
1363
+ "grok-imagine-video-1.5": {
1364
+ id: "grok-imagine-video-1.5",
1365
+ kind: "video",
1366
+ modes: ["i2v"],
1367
+ // No `reference-image` (locked by video-reference-features.test.ts, 2026-06-28
1368
+ // audit): KIE's grok-imagine endpoint accepts a single image_url (the i2v
1369
+ // start frame) only — there is no reference transport, so advertising the
1370
+ // feature let the editor attach refs that were silently dropped at the
1371
+ // provider. Also kept OUT of VIDEO_REF_LIMITS_BY_PROVIDER for the same reason.
1372
+ family: "xAI",
1373
+ label: "Grok Imagine Video 1.5",
1374
+ series: "Grok",
1375
+ description: "Grok Imagine 1.5 image-to-video \u2014 1\u201315s, 480p/720p, per-second pricing. Requires an input image.",
1376
+ useCases: ["stylized", "motion"],
1377
+ aspectRatios: ["16:9", "9:16", "1:1", "4:3", "3:4"],
1378
+ durations: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15],
1379
+ defaultDuration: 8,
1380
+ resolutions: ["480p", "720p"],
1381
+ pricing: [
1382
+ { identifier: "grok-imagine-video-1.5", credits: 295, note: "default 8s 480p \u2014 see :Ns:res variants" },
1383
+ { identifier: "grok-imagine-video-1.5:8s:480p", credits: 300, note: "8s 480p" },
1384
+ { identifier: "grok-imagine-video-1.5:8s:720p", credits: 510, note: "8s 720p" },
1385
+ { identifier: "grok-imagine-video-1.5:15s:480p", credits: 550, note: "15s 480p (max)" },
1386
+ { identifier: "grok-imagine-video-1.5:15s:720p", credits: 950, note: "15s 720p (max)" }
1387
+ ]
1388
+ },
1389
+ // ── Bytedance Seedance ──
1390
+ "seedance": {
1391
+ id: "seedance",
1392
+ kind: "video",
1393
+ modes: ["i2v", "t2v"],
1394
+ family: "Bytedance",
1395
+ label: "Seedance 1.5 Pro",
1396
+ series: "Seedance",
1397
+ description: "Bytedance Seedance 1.5 Pro \u2014 flexible duration (4/8/12s) with end-frame support.",
1398
+ useCases: ["motion", "narrative"],
1399
+ features: ["end-frame"],
1400
+ durations: [4, 8, 12],
1401
+ defaultDuration: 8,
1402
+ resolutions: ["480p", "720p", "1080p"],
1403
+ pricing: [
1404
+ { identifier: "seedance", credits: 250, note: "8s default" },
1405
+ { identifier: "seedance:4s", credits: 40 },
1406
+ { identifier: "seedance:8s", credits: 70 },
1407
+ { identifier: "seedance:12s", credits: 150 }
1408
+ ],
1409
+ mcpHidden: true
1410
+ },
1411
+ "seedance-2": {
1412
+ id: "seedance-2",
1413
+ kind: "video",
1414
+ modes: ["i2v", "t2v"],
1415
+ family: "Bytedance",
1416
+ label: "Seedance 2",
1417
+ series: "Seedance",
1418
+ description: "Seedance 2 \u2014 premium tier with native audio. Per-second pricing by resolution.",
1419
+ useCases: ["premium", "narrative"],
1420
+ features: ["end-frame", "audio", "reference-image", "video-reference"],
1421
+ aspectRatios: VIDEO_RATIOS_SEEDANCE_2,
1422
+ durations: [4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15],
1423
+ defaultDuration: 8,
1424
+ autoDuration: true,
1425
+ resolutions: ["480p", "720p", "1080p", "4k"],
1426
+ pricing: [
1427
+ { identifier: "seedance-2", credits: 380, note: "default \u2014 see :NsR variants for exact" },
1428
+ { identifier: "seedance-2:8s:480p", credits: 380, note: "8s 480p" },
1429
+ { identifier: "seedance-2:8s:720p", credits: 820, note: "8s 720p" },
1430
+ { identifier: "seedance-2:8s:1080p", credits: 2040, note: "8s 1080p" },
1431
+ { identifier: "seedance-2:8s:480p-ref", credits: 230, note: "8s 480p with reference" },
1432
+ { identifier: "seedance-2:8s:720p-ref", credits: 500, note: "8s 720p with reference" },
1433
+ { identifier: "seedance-2:8s:1080p-ref", credits: 1240, note: "8s 1080p with reference" },
1434
+ { identifier: "seedance-2:8s:4k", credits: 4160, note: "8s 4k" },
1435
+ { identifier: "seedance-2:8s:4k-ref", credits: 2560, note: "8s 4k with reference" }
1436
+ ]
1437
+ },
1438
+ "seedance-2-fast": {
1439
+ id: "seedance-2-fast",
1440
+ kind: "video",
1441
+ modes: ["i2v", "t2v"],
1442
+ family: "Bytedance",
1443
+ label: "Seedance 2 Fast",
1444
+ series: "Seedance",
1445
+ description: "Cheaper / quicker Seedance 2 tier.",
1446
+ useCases: ["fast", "motion"],
1447
+ features: ["end-frame", "audio", "reference-image", "video-reference"],
1448
+ aspectRatios: VIDEO_RATIOS_SEEDANCE_2,
1449
+ durations: [4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15],
1450
+ defaultDuration: 8,
1451
+ autoDuration: true,
1452
+ resolutions: ["480p", "720p"],
1453
+ pricing: [
1454
+ { identifier: "seedance-2-fast", credits: 310, note: "default \u2014 see :NsR variants" },
1455
+ { identifier: "seedance-2-fast:8s:480p", credits: 310 },
1456
+ { identifier: "seedance-2-fast:8s:720p", credits: 660 },
1457
+ { identifier: "seedance-2-fast:8s:480p-ref", credits: 180 },
1458
+ { identifier: "seedance-2-fast:8s:720p-ref", credits: 400 }
1459
+ ]
1460
+ },
1461
+ "seedance-2-mini": {
1462
+ id: "seedance-2-mini",
1463
+ kind: "video",
1464
+ modes: ["i2v", "t2v"],
1465
+ family: "Bytedance",
1466
+ label: "Seedance 2 Mini",
1467
+ series: "Seedance",
1468
+ description: "Budget Seedance 2 tier \u2014 480p/720p only, per-second pricing by resolution.",
1469
+ useCases: ["fast", "motion"],
1470
+ features: ["end-frame", "audio", "reference-image", "video-reference"],
1471
+ aspectRatios: VIDEO_RATIOS_SEEDANCE_2,
1472
+ durations: [4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15],
1473
+ defaultDuration: 8,
1474
+ autoDuration: true,
1475
+ resolutions: ["480p", "720p"],
1476
+ pricing: [
1477
+ { identifier: "seedance-2-mini", credits: 190, note: "default \u2014 see :NsR variants" },
1478
+ { identifier: "seedance-2-mini:8s:480p", credits: 190 },
1479
+ { identifier: "seedance-2-mini:8s:720p", credits: 410 },
1480
+ { identifier: "seedance-2-mini:8s:480p-ref", credits: 120 },
1481
+ { identifier: "seedance-2-mini:8s:720p-ref", credits: 250 }
1482
+ ]
1483
+ },
1484
+ // Seedance 2.5 — the next Seedance generation, not a tier of the 2.0 ladder.
1485
+ // Two levers differ from every 2.0 SKU and drive its own entries throughout:
1486
+ // durations run to 30s (2.0 caps at 15s) and there is NO 4K tier (1080p
1487
+ // arrived on KIE 2026-08-17 — probe-verified; 4k/2k/1440p still rejected).
1488
+ // Reference caps are also wider (30 images / 10 videos / 10 audio) — see
1489
+ // SEEDANCE_2_5_REF_LIMITS in model-constants.
1490
+ "seedance-2-5": {
1491
+ id: "seedance-2-5",
1492
+ kind: "video",
1493
+ modes: ["i2v", "t2v"],
1494
+ family: "Bytedance",
1495
+ label: "Seedance 2.5",
1496
+ series: "Seedance",
1497
+ description: "Seedance 2.5 \u2014 up to 30s in one shot, native audio, wide multimodal references. 480p/720p/1080p.",
1498
+ useCases: ["premium", "narrative", "long-form"],
1499
+ features: ["end-frame", "audio", "reference-image", "video-reference"],
1500
+ aspectRatios: VIDEO_RATIOS_SEEDANCE_2,
1501
+ 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],
1502
+ defaultDuration: 8,
1503
+ autoDuration: true,
1504
+ resolutions: ["480p", "720p", "1080p"],
1505
+ // KIE refuses a seed on Seedance 2.5 (422) — the provider config omits it.
1506
+ noSeed: true,
1507
+ pricing: [
1508
+ { identifier: "seedance-2-5", credits: 1260, note: "default 8s 720p \u2014 see :Ns:res variants for exact" },
1509
+ { identifier: "seedance-2-5:8s:480p", credits: 560, note: "8s 480p" },
1510
+ { identifier: "seedance-2-5:8s:720p", credits: 1260, note: "8s 720p" },
1511
+ { identifier: "seedance-2-5:8s:1080p", credits: 2280, note: "8s 1080p" },
1512
+ { identifier: "seedance-2-5:8s:480p-ref", credits: 340, note: "8s 480p with reference video" },
1513
+ { identifier: "seedance-2-5:8s:720p-ref", credits: 760, note: "8s 720p with reference video" },
1514
+ { identifier: "seedance-2-5:8s:1080p-ref", credits: 1370, note: "8s 1080p with reference video" },
1515
+ { identifier: "seedance-2-5:30s:480p", credits: 2100, note: "30s 480p (max)" },
1516
+ { identifier: "seedance-2-5:30s:720p", credits: 4730, note: "30s 720p (max)" },
1517
+ { identifier: "seedance-2-5:30s:1080p", credits: 8550, note: "30s 1080p (max)" }
1518
+ ]
1519
+ },
1520
+ // ── Wan ──
1521
+ // Wan 3.0 (standard + Prime) — a NEW generation, not a tier of the 2.x ladder.
1522
+ // One id per SKU serves BOTH modes (no t2v twin, no alias): first/last frame
1523
+ // OR an all-purpose reference mode (images/videos/audio, bound in the prompt
1524
+ // as Image1/Video1/Audio1 — no space, unlike Wan 2.x), native audio behind a
1525
+ // boolean `audio` lever, 2-30s at 480p/720p/1080p.
1526
+ // `video-reference` is deliberately NOT declared: KIE accepts reference videos,
1527
+ // but the extend chain is unwired and KIE caps input-video + output at 30s,
1528
+ // which the segment bounds cannot express. Precedent: gemini-omni-video carries
1529
+ // ref limits without the feature. The ref CAPS still live in
1530
+ // VIDEO_REF_LIMITS_BY_PROVIDER (model-constants).
1531
+ // `resolutions` is ascending (repo convention); the DEFAULT tier (720p) is
1532
+ // declared explicitly in PRICING_DEFAULT_RESOLUTION, never by array position.
1533
+ "wan-3": {
1534
+ id: "wan-3",
1535
+ unlistedResolutionRendersAs: "720p",
1536
+ kind: "video",
1537
+ modes: ["i2v", "t2v"],
1538
+ family: "Alibaba",
1539
+ label: "Wan 3.0",
1540
+ series: "Wan",
1541
+ description: "Wan 3.0 \u2014 multimodal: first/last frame or image/video/audio references, native audio, 2-30s at 480p/720p/1080p.",
1542
+ useCases: ["motion", "narrative", "long-form"],
1543
+ features: ["end-frame", "audio", "reference-image"],
1544
+ aspectRatios: VIDEO_RATIOS_WAN_3,
1545
+ durations: [2, 3, 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],
1546
+ defaultDuration: 5,
1547
+ resolutions: ["480p", "720p", "1080p"],
1548
+ pricing: [
1549
+ { identifier: "wan-3", credits: 200, note: "default 5s 720p \u2014 see :Ns:res variants for exact" },
1550
+ { identifier: "wan-3:5s:720p", credits: 200, note: "5s 720p (the default tier)" },
1551
+ { identifier: "wan-3:8s:480p", credits: 160, note: "8s 480p" },
1552
+ { identifier: "wan-3:8s:720p", credits: 320, note: "8s 720p" },
1553
+ { identifier: "wan-3:8s:1080p", credits: 640, note: "8s 1080p" },
1554
+ { identifier: "wan-3:30s:480p", credits: 600, note: "30s 480p (max)" },
1555
+ { identifier: "wan-3:30s:720p", credits: 1200, note: "30s 720p (max)" },
1556
+ { identifier: "wan-3:30s:1080p", credits: 2400, note: "30s 1080p (max)" }
1557
+ ]
1558
+ },
1559
+ "wan-3-prime": {
1560
+ id: "wan-3-prime",
1561
+ unlistedResolutionRendersAs: "720p",
1562
+ kind: "video",
1563
+ modes: ["i2v", "t2v"],
1564
+ family: "Alibaba",
1565
+ label: "Wan 3.0 Prime",
1566
+ series: "Wan",
1567
+ description: "Wan 3.0 Prime \u2014 Alibaba's high-speed Wan 3.0 tier: same multimodal surface and 2-30s range, faster turnaround at a higher per-second rate.",
1568
+ useCases: ["fast", "motion", "narrative"],
1569
+ features: ["end-frame", "audio", "reference-image"],
1570
+ aspectRatios: VIDEO_RATIOS_WAN_3,
1571
+ durations: [2, 3, 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],
1572
+ defaultDuration: 5,
1573
+ resolutions: ["480p", "720p", "1080p"],
1574
+ pricing: [
1575
+ { identifier: "wan-3-prime", credits: 320, note: "default 5s 720p \u2014 see :Ns:res variants for exact" },
1576
+ { identifier: "wan-3-prime:5s:720p", credits: 320, note: "5s 720p (the default tier)" },
1577
+ { identifier: "wan-3-prime:8s:480p", credits: 250, note: "8s 480p" },
1578
+ { identifier: "wan-3-prime:8s:720p", credits: 510, note: "8s 720p" },
1579
+ { identifier: "wan-3-prime:8s:1080p", credits: 1010, note: "8s 1080p" },
1580
+ { identifier: "wan-3-prime:30s:480p", credits: 920, note: "30s 480p (max)" },
1581
+ { identifier: "wan-3-prime:30s:720p", credits: 1890, note: "30s 720p (max)" },
1582
+ { identifier: "wan-3-prime:30s:1080p", credits: 3780, note: "30s 1080p (max)" }
1583
+ ]
1584
+ },
1585
+ "wan-i2v": {
1586
+ id: "wan-i2v",
1587
+ kind: "video",
1588
+ modes: ["i2v"],
1589
+ family: "Alibaba",
1590
+ label: "Wan 2.6 I2V",
1591
+ series: "Wan",
1592
+ description: "Wan 2.6 image-to-video \u2014 5/10/15s at 720p/1080p.",
1593
+ useCases: ["motion", "narrative"],
1594
+ durations: [5, 10, 15],
1595
+ defaultDuration: 5,
1596
+ resolutions: ["720p", "1080p"],
1597
+ pricing: [
1598
+ { identifier: "wan-i2v", credits: 175, note: "5s 720p default" },
1599
+ { identifier: "wan-i2v:5s", credits: 180 },
1600
+ { identifier: "wan-i2v:10s", credits: 350 },
1601
+ { identifier: "wan-i2v:15s", credits: 530 }
1602
+ ]
1603
+ },
1604
+ "wan-turbo": {
1605
+ id: "wan-turbo",
1606
+ kind: "video",
1607
+ modes: ["i2v", "t2v"],
1608
+ family: "Alibaba",
1609
+ label: "Wan 2.2 Turbo",
1610
+ series: "Wan",
1611
+ description: "Cheap, fast Wan turbo \u2014 5s. Serves both i2v and t2v under one id.",
1612
+ useCases: ["cheap", "fast"],
1613
+ aspectRatios: VIDEO_RATIOS_HVS,
1614
+ durations: [5],
1615
+ defaultDuration: 5,
1616
+ resolutions: ["480p", "720p"],
1617
+ // Different KIE endpoints (i2v vs t2v) → different costs under
1618
+ // composite ids. Route picks endpoint based on whether image was supplied.
1619
+ pricing: [
1620
+ { identifier: "wan-turbo", credits: 100, note: "i2v 5s 480p" },
1621
+ { identifier: "wan-turbo-t2v", credits: 200, note: "t2v 5s 720p" }
1622
+ ]
1623
+ },
1624
+ "wan": {
1625
+ id: "wan",
1626
+ kind: "video",
1627
+ // "wan" id covers v2v AND t2v under different KIE endpoints; the
1628
+ // pricing variants tag which mode each cost belongs to.
1629
+ modes: ["v2v", "t2v"],
1630
+ family: "Alibaba",
1631
+ label: "Wan 2.6",
1632
+ series: "Wan",
1633
+ description: "Wan 2.6 \u2014 text-to-video and video-to-video under a single id.",
1634
+ useCases: ["v2v", "t2v", "restyle"],
1635
+ durations: [5],
1636
+ defaultDuration: 5,
1637
+ resolutions: ["720p", "1080p"],
1638
+ pricing: [
1639
+ { identifier: "wan", credits: 175, note: "v2v 5s 720p" },
1640
+ { identifier: "wan-t2v", credits: 270, note: "t2v 5s 1080p" }
1641
+ ]
1642
+ },
1643
+ "wan-flash": {
1644
+ id: "wan-flash",
1645
+ kind: "video",
1646
+ modes: ["v2v"],
1647
+ family: "Alibaba",
1648
+ label: "Wan Flash V2V",
1649
+ series: "Wan",
1650
+ description: "Faster Wan V2V variant.",
1651
+ useCases: ["v2v", "fast"],
1652
+ pricing: [{ identifier: "wan-flash", credits: 100 }]
1653
+ },
1654
+ "wan-videoedit": {
1655
+ id: "wan-videoedit",
1656
+ kind: "video",
1657
+ modes: ["v2v"],
1658
+ family: "Alibaba",
1659
+ label: "Wan 2.7 VideoEdit",
1660
+ series: "Wan",
1661
+ description: "Guided video editing with optional reference image, audio control, and prompt expansion.",
1662
+ useCases: ["v2v", "restyle", "reference"],
1663
+ resolutions: ["720p", "1080p"],
1664
+ pricing: [{ identifier: "wan-videoedit", credits: 320 }]
1665
+ },
1666
+ // ── Wan 2.7 ──
1667
+ "wan-2.7": {
1668
+ id: "wan-2.7",
1669
+ kind: "image",
1670
+ modes: ["t2i"],
1671
+ family: "Alibaba",
1672
+ label: "Wan 2.7",
1673
+ series: "Wan",
1674
+ description: "Wan 2.7 text-to-image \u2014 1K/2K/4K, up to 9 optional style/character reference images.",
1675
+ useCases: ["photorealistic", "stylized", "reference"],
1676
+ features: ["reference-image"],
1677
+ aspectRatios: WAN_27_IMAGE_RATIOS,
1678
+ resolutions: ["1K", "2K", "4K"],
1679
+ pricing: [
1680
+ { identifier: "wan-2.7", credits: 20, note: "1K base" },
1681
+ { identifier: "wan-2.7:2K", credits: 40, note: "2K" },
1682
+ { identifier: "wan-2.7:4K", credits: 80, note: "4K" }
1683
+ ]
1684
+ },
1685
+ "wan-2.7-pro": {
1686
+ id: "wan-2.7-pro",
1687
+ kind: "image",
1688
+ modes: ["t2i"],
1689
+ family: "Alibaba",
1690
+ label: "Wan 2.7 Pro",
1691
+ series: "Wan",
1692
+ description: "Wan 2.7 Pro text-to-image \u2014 higher quality, 1K/2K/4K, no image input.",
1693
+ useCases: ["photorealistic", "premium"],
1694
+ aspectRatios: WAN_27_IMAGE_RATIOS,
1695
+ resolutions: ["1K", "2K", "4K"],
1696
+ pricing: [
1697
+ { identifier: "wan-2.7-pro", credits: 120, note: "1K base" },
1698
+ { identifier: "wan-2.7-pro:2K", credits: 60, note: "2K" },
1699
+ { identifier: "wan-2.7-pro:4K", credits: 120, note: "4K" }
1700
+ ]
1701
+ },
1702
+ "wan-2.7-i2v": {
1703
+ id: "wan-2.7-i2v",
1704
+ kind: "video",
1705
+ modes: ["i2v"],
1706
+ family: "Alibaba",
1707
+ label: "Wan 2.7 I2V",
1708
+ series: "Wan",
1709
+ description: "Wan 2.7 image-to-video \u2014 2\u201315s at 720p/1080p, supports start+end frame.",
1710
+ useCases: ["motion", "narrative"],
1711
+ durations: [2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15],
1712
+ defaultDuration: 5,
1713
+ resolutions: ["720p", "1080p"],
1714
+ features: ["end-frame"],
1715
+ pricing: [
1716
+ { identifier: "wan-2.7-i2v", credits: 188, note: "5s 720p default" }
1717
+ ]
1718
+ },
1719
+ "wan-2.7-t2v": {
1720
+ id: "wan-2.7-t2v",
1721
+ kind: "video",
1722
+ modes: ["t2v"],
1723
+ family: "Alibaba",
1724
+ label: "Wan 2.7 T2V",
1725
+ series: "Wan",
1726
+ description: "Wan 2.7 text-to-video \u2014 2\u201315s at 720p/1080p.",
1727
+ useCases: ["motion", "narrative"],
1728
+ aspectRatios: VIDEO_RATIOS_HVS345,
1729
+ durations: [2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15],
1730
+ defaultDuration: 5,
1731
+ resolutions: ["720p", "1080p"],
1732
+ pricing: [
1733
+ { identifier: "wan-2.7-t2v", credits: 188, note: "5s 720p default" }
1734
+ ]
1735
+ },
1736
+ // Lightricks LTX 2.3 (Replicate, not KIE). Both variants run one endpoint per
1737
+ // variant and switch behaviour with a `task` discriminator, so t2v and i2v are
1738
+ // the SAME id — no VIDEO_MODE_ALIASES row. `extend` / `retake` are separate
1739
+ // priced ops on the same model (ids below) but are NOT listed in `modes`:
1740
+ // they are driven by the Extend Video / Video Retake nodes' own pickers, and
1741
+ // adding the mode here would duplicate LTX in those menus.
1742
+ // Bands are lowercase to match LTX_DURATION_TIERS' keys in credit-identifiers.ts
1743
+ // and QUALITY_MAP in node-default-mappings.ts.
1744
+ "ltx-2.3-pro": {
1745
+ id: "ltx-2.3-pro",
1746
+ kind: "video",
1747
+ modes: ["i2v", "t2v"],
1748
+ family: "Lightricks",
1749
+ label: "LTX 2.3 Pro",
1750
+ series: "LTX",
1751
+ description: "Lightricks LTX 2.3 Pro \u2014 text/image/audio\u2192video up to 4K, 6/8/10s, end-frame interpolation.",
1752
+ useCases: ["premium", "high-res", "narrative"],
1753
+ features: ["end-frame"],
1754
+ aspectRatios: ["16:9", "9:16"],
1755
+ resolutions: ["1080p", "2k", "4k"],
1756
+ durations: [6, 8, 10],
1757
+ defaultDuration: 6,
1758
+ pricing: [
1759
+ { identifier: "ltx-2.3-pro", credits: 240, note: "default 1080p 6s" },
1760
+ { identifier: "ltx-2.3-pro:1080p:6s", credits: 240 },
1761
+ { identifier: "ltx-2.3-pro:1080p:8s", credits: 320 },
1762
+ { identifier: "ltx-2.3-pro:1080p:10s", credits: 400 },
1763
+ { identifier: "ltx-2.3-pro:2k:6s", credits: 480 },
1764
+ { identifier: "ltx-2.3-pro:2k:8s", credits: 640 },
1765
+ { identifier: "ltx-2.3-pro:2k:10s", credits: 800 },
1766
+ { identifier: "ltx-2.3-pro:4k:6s", credits: 960 },
1767
+ { identifier: "ltx-2.3-pro:4k:8s", credits: 1280 },
1768
+ { identifier: "ltx-2.3-pro:4k:10s", credits: 1600 },
1769
+ { identifier: "ltx-2.3-pro-extend:per-second", credits: 40, note: "extend, per second of new footage" },
1770
+ { identifier: "ltx-2.3-pro-retake:per-second", credits: 40, note: "retake, per second re-rendered" }
1771
+ ]
1772
+ },
1773
+ "ltx-2.3-fast": {
1774
+ id: "ltx-2.3-fast",
1775
+ kind: "video",
1776
+ modes: ["i2v", "t2v"],
1777
+ family: "Lightricks",
1778
+ label: "LTX 2.3 Fast",
1779
+ series: "LTX",
1780
+ description: "Lightricks LTX 2.3 Fast \u2014 text/image\u2192video up to 20s at 1080p (6/8/10s at 2K and 4K). No audio input, no extend.",
1781
+ useCases: ["long-form", "fast", "narrative"],
1782
+ features: ["end-frame"],
1783
+ aspectRatios: ["16:9", "9:16"],
1784
+ resolutions: ["1080p", "2k", "4k"],
1785
+ // Flat union across bands — 12–20s exist only at 1080p (LTX_DURATION_TIERS
1786
+ // in credit-identifiers.ts is the per-band authority and snaps a 2k/4k
1787
+ // request back onto 6/8/10s, so the reservation is always a real tier).
1788
+ durations: [6, 8, 10, 12, 14, 16, 18, 20],
1789
+ defaultDuration: 6,
1790
+ pricing: [
1791
+ { identifier: "ltx-2.3-fast", credits: 180, note: "default 1080p 6s" },
1792
+ { identifier: "ltx-2.3-fast:1080p:6s", credits: 180 },
1793
+ { identifier: "ltx-2.3-fast:1080p:8s", credits: 240 },
1794
+ { identifier: "ltx-2.3-fast:1080p:10s", credits: 300 },
1795
+ { identifier: "ltx-2.3-fast:1080p:12s", credits: 360 },
1796
+ { identifier: "ltx-2.3-fast:1080p:14s", credits: 420 },
1797
+ { identifier: "ltx-2.3-fast:1080p:16s", credits: 480 },
1798
+ { identifier: "ltx-2.3-fast:1080p:18s", credits: 540 },
1799
+ { identifier: "ltx-2.3-fast:1080p:20s", credits: 600 },
1800
+ { identifier: "ltx-2.3-fast:2k:6s", credits: 360 },
1801
+ { identifier: "ltx-2.3-fast:2k:8s", credits: 480 },
1802
+ { identifier: "ltx-2.3-fast:2k:10s", credits: 600 },
1803
+ { identifier: "ltx-2.3-fast:4k:6s", credits: 720 },
1804
+ { identifier: "ltx-2.3-fast:4k:8s", credits: 960 },
1805
+ { identifier: "ltx-2.3-fast:4k:10s", credits: 1200 }
1806
+ ]
1807
+ },
1808
+ // ── HappyHorse (1.1 — ids kept version-less; repointed in place when KIE
1809
+ // delisted 1.0, same param surface, so saved workflows keep working) ──
1810
+ "happyhorse": {
1811
+ id: "happyhorse",
1812
+ kind: "video",
1813
+ modes: ["t2v"],
1814
+ family: "HappyHorse",
1815
+ label: "HappyHorse 1.1",
1816
+ series: "HappyHorse",
1817
+ description: "HappyHorse 1.1 text-to-video \u2014 3\u201315s at 720p/1080p, 9 aspect ratios incl. 21:9/9:21, per-second pricing.",
1818
+ useCases: ["motion", "creative"],
1819
+ aspectRatios: VIDEO_RATIOS_HAPPYHORSE_11,
1820
+ durations: [3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15],
1821
+ defaultDuration: 5,
1822
+ resolutions: ["720p", "1080p"],
1823
+ noSeed: true,
1824
+ // HappyHorse 1.1 dropped `seed` from its schema
1825
+ pricing: [
1826
+ { identifier: "happyhorse", credits: 282, note: "5s 720p default \u2014 per-second: ~5.7 cr/s @720p, ~7.3 cr/s @1080p" }
1827
+ ]
1828
+ },
1829
+ "happyhorse-i2v": {
1830
+ id: "happyhorse-i2v",
1831
+ kind: "video",
1832
+ modes: ["i2v"],
1833
+ family: "HappyHorse",
1834
+ label: "HappyHorse 1.1 I2V",
1835
+ series: "HappyHorse",
1836
+ description: "HappyHorse 1.1 image-to-video \u2014 3\u201315s at 720p/1080p, aspect ratio inferred from input image, per-second pricing.",
1837
+ useCases: ["motion", "creative"],
1838
+ durations: [3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15],
1839
+ defaultDuration: 5,
1840
+ resolutions: ["720p", "1080p"],
1841
+ noSeed: true,
1842
+ // HappyHorse 1.1 dropped `seed` from its schema
1843
+ pricing: [
1844
+ { identifier: "happyhorse-i2v", credits: 282, note: "5s 720p default \u2014 per-second: ~5.7 cr/s @720p, ~7.3 cr/s @1080p" }
1845
+ ]
1846
+ },
1847
+ "happyhorse-ref2v": {
1848
+ id: "happyhorse-ref2v",
1849
+ kind: "video",
1850
+ modes: ["i2v"],
1851
+ family: "HappyHorse",
1852
+ label: "HappyHorse 1.1 Ref2V",
1853
+ series: "HappyHorse",
1854
+ description: "HappyHorse 1.1 reference-to-video \u2014 1\u20139 reference images, 3\u201315s at 720p/1080p, per-second pricing.",
1855
+ useCases: ["motion", "reference"],
1856
+ aspectRatios: VIDEO_RATIOS_HAPPYHORSE_11,
1857
+ durations: [3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15],
1858
+ defaultDuration: 5,
1859
+ resolutions: ["720p", "1080p"],
1860
+ features: ["reference-image"],
1861
+ noSeed: true,
1862
+ // HappyHorse 1.1 dropped `seed` from its schema
1863
+ pricing: [
1864
+ { identifier: "happyhorse-ref2v", credits: 282, note: "5s 720p default \u2014 per-second: ~5.7 cr/s @720p, ~7.3 cr/s @1080p" }
1865
+ ]
1866
+ },
1867
+ "happyhorse-edit": {
1868
+ id: "happyhorse-edit",
1869
+ kind: "video",
1870
+ modes: ["v2v"],
1871
+ family: "HappyHorse",
1872
+ label: "HappyHorse Edit",
1873
+ series: "HappyHorse",
1874
+ description: "HappyHorse video-edit \u2014 video-to-video transformation, up to 60s input, 720p/1080p output.",
1875
+ useCases: ["v2v", "restyle"],
1876
+ resolutions: ["720p", "1080p"],
1877
+ pricing: [
1878
+ { identifier: "happyhorse-edit", credits: 350, note: "720p default (5s-equivalent flat rate)" }
1879
+ ]
1880
+ },
1881
+ // ── Bytedance video lite/pro ──
1882
+ "bytedance-lite": {
1883
+ id: "bytedance-lite",
1884
+ kind: "video",
1885
+ modes: ["i2v", "t2v"],
1886
+ family: "Bytedance",
1887
+ label: "Bytedance Lite I2V",
1888
+ series: "Bytedance",
1889
+ description: "Cheapest Bytedance video tier with end-frame support.",
1890
+ useCases: ["cheap", "motion"],
1891
+ features: ["end-frame"],
1892
+ aspectRatios: VIDEO_RATIOS_HVS,
1893
+ durations: [5, 10],
1894
+ defaultDuration: 5,
1895
+ resolutions: ["480p", "720p", "1080p"],
1896
+ pricing: [{ identifier: "bytedance-lite", credits: 57 }]
1897
+ },
1898
+ "bytedance-pro": {
1899
+ id: "bytedance-pro",
1900
+ kind: "video",
1901
+ modes: ["i2v", "t2v"],
1902
+ family: "Bytedance",
1903
+ label: "Bytedance Pro I2V",
1904
+ series: "Bytedance",
1905
+ description: "Pro Bytedance video tier \u2014 better quality.",
1906
+ useCases: ["motion", "narrative"],
1907
+ aspectRatios: VIDEO_RATIOS_HVS,
1908
+ durations: [5, 10],
1909
+ defaultDuration: 5,
1910
+ resolutions: ["480p", "720p", "1080p"],
1911
+ pricing: [{ identifier: "bytedance-pro", credits: 175 }]
1912
+ },
1913
+ "bytedance-pro-fast": {
1914
+ id: "bytedance-pro-fast",
1915
+ kind: "video",
1916
+ modes: ["i2v"],
1917
+ family: "Bytedance",
1918
+ label: "Bytedance Pro Fast I2V",
1919
+ series: "Bytedance",
1920
+ description: "Faster Bytedance Pro variant.",
1921
+ useCases: ["fast", "motion"],
1922
+ durations: [5, 10],
1923
+ defaultDuration: 5,
1924
+ resolutions: ["720p", "1080p"],
1925
+ pricing: [{ identifier: "bytedance-pro-fast", credits: 90 }]
1926
+ },
1927
+ // ── OpenAI Sora ──
1928
+ // (Sora2 / Sora2-Pro are listed in KIE models but not in STATIC_CREDIT_COSTS;
1929
+ // they're priced at runtime via the per-second tracker, so we omit pricing
1930
+ // arrays with composite entries — `list_models` will fall back to whatever
1931
+ // base entry exists.)
1932
+ // ── Runway ──
1933
+ "runway-kie": {
1934
+ id: "runway-kie",
1935
+ kind: "video",
1936
+ modes: ["i2v", "t2v"],
1937
+ family: "Runway",
1938
+ label: "Runway (via KIE)",
1939
+ series: "Runway",
1940
+ description: "Runway Gen-3 routed through KIE. 5/10s at 720p/1080p.",
1941
+ useCases: ["motion", "narrative"],
1942
+ durations: [5, 10],
1943
+ defaultDuration: 5,
1944
+ resolutions: ["720p", "1080p"],
1945
+ pricing: [{ identifier: "runway-kie", credits: 30, note: "5s 720p" }]
1946
+ },
1947
+ "runway-aleph": {
1948
+ id: "runway-aleph",
1949
+ kind: "video",
1950
+ modes: ["v2v"],
1951
+ family: "Runway",
1952
+ label: "Runway Aleph V2V",
1953
+ series: "Runway",
1954
+ description: "Runway Aleph \u2014 video-to-video conversion.",
1955
+ useCases: ["v2v", "restyle"],
1956
+ pricing: [{ identifier: "runway-aleph", credits: 350, note: "5s clip" }]
1957
+ },
1958
+ // ── Extend / Upscale ──
1959
+ "veo-extend": {
1960
+ id: "veo-extend",
1961
+ kind: "video",
1962
+ modes: ["extend"],
1963
+ family: "Google",
1964
+ label: "VEO Extend",
1965
+ series: "VEO",
1966
+ description: "Extend an existing VEO 3.1 clip by another segment.",
1967
+ useCases: ["extend"],
1968
+ pricing: [
1969
+ { identifier: "veo-extend", credits: 190, note: "VEO 3.1 Fast default" },
1970
+ { identifier: "veo-extend:quality", credits: 790, note: "VEO 3.1 Quality" }
1971
+ ]
1972
+ },
1973
+ "runway-extend": {
1974
+ id: "runway-extend",
1975
+ kind: "video",
1976
+ modes: ["extend"],
1977
+ family: "Runway",
1978
+ label: "Runway Extend",
1979
+ series: "Runway",
1980
+ description: "Extend a Runway video by another clip.",
1981
+ useCases: ["extend"],
1982
+ pricing: [{ identifier: "runway-extend", credits: 320 }]
1983
+ },
1984
+ "seedance-2-extend": {
1985
+ id: "seedance-2-extend",
1986
+ kind: "video",
1987
+ modes: ["extend"],
1988
+ family: "Bytedance",
1989
+ label: "Seedance 2 Extend",
1990
+ series: "Seedance",
1991
+ description: "Extend ANY video: generates the continuation (audio included) and trim-stitches it into one seamless clip.",
1992
+ useCases: ["extend"],
1993
+ durations: [4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15],
1994
+ defaultDuration: 8,
1995
+ resolutions: ["480p", "720p", "1080p"],
1996
+ pricing: [
1997
+ { identifier: "seedance-2-extend", credits: 530, note: "default 8s 720p (ref-mode 50 + 3 stitch) \u2014 see :NsR variants" },
1998
+ { identifier: "seedance-2-extend:8s:480p", credits: 260, note: "8s 480p (23+3)" },
1999
+ { identifier: "seedance-2-extend:8s:720p", credits: 530, note: "8s 720p (50+3)" },
2000
+ { identifier: "seedance-2-extend:8s:1080p", credits: 780, note: "8s 1080p (75+3)" }
2001
+ ]
2002
+ },
2003
+ "veo-1080p": {
2004
+ id: "veo-1080p",
2005
+ kind: "video",
2006
+ modes: ["video-upscale"],
2007
+ family: "Google",
2008
+ label: "VEO 1080p Upscale",
2009
+ series: "VEO",
2010
+ description: "Upscale VEO output to 1080p.",
2011
+ useCases: ["upscale"],
2012
+ pricing: [{ identifier: "veo-1080p", credits: 20 }]
2013
+ },
2014
+ "veo-4k": {
2015
+ id: "veo-4k",
2016
+ kind: "video",
2017
+ modes: ["video-upscale"],
2018
+ family: "Google",
2019
+ label: "VEO 4K Upscale",
2020
+ series: "VEO",
2021
+ description: "Upscale VEO output to 4K.",
2022
+ useCases: ["upscale", "high-res"],
2023
+ pricing: [{ identifier: "veo-4k", credits: 380 }]
2024
+ },
2025
+ // Seedance 2.5 Draft finalize (seedance-draft.ts): re-renders a Seedance 2.5
2026
+ // DRAFT as the same take at 1080p. Priced per output second of the draft; a
2027
+ // draft made with a reference VIDEO bills its `-ref` rate on input + output
2028
+ // seconds. Only works on a completed Seedance 2.5 draft.
2029
+ "seedance-2-5-hd": {
2030
+ id: "seedance-2-5-hd",
2031
+ kind: "video",
2032
+ modes: ["video-upscale"],
2033
+ family: "Bytedance",
2034
+ label: "Seedance 2.5 HD (from draft)",
2035
+ series: "Seedance",
2036
+ description: "Finalize a Seedance 2.5 draft: the same take, frame for frame, re-rendered at 1080p.",
2037
+ useCases: ["upscale", "high-res"],
2038
+ pricing: [
2039
+ { identifier: "seedance-2-5-hd", credits: 3160, note: "default 8s \u2014 see :Ns variants for exact" },
2040
+ { identifier: "seedance-2-5-hd:4s", credits: 1580, note: "4s draft" },
2041
+ { identifier: "seedance-2-5-hd:8s", credits: 3160, note: "8s draft" },
2042
+ { identifier: "seedance-2-5-hd:30s", credits: 11850, note: "30s draft (max)" },
2043
+ { identifier: "seedance-2-5-hd:8s-ref", credits: 1900, note: "per-second rate of a draft made with a reference video; billed on input + output seconds" }
2044
+ ]
2045
+ },
2046
+ "topaz-video": {
2047
+ id: "topaz-video",
2048
+ kind: "video",
2049
+ modes: ["video-upscale"],
2050
+ family: "Topaz",
2051
+ label: "Topaz Video Upscale",
2052
+ series: "Topaz",
2053
+ description: "High-quality video upscale and enhancement.",
2054
+ useCases: ["upscale", "premium"],
2055
+ pricing: [{ identifier: "topaz-video", credits: 190, note: "~5s clip" }]
2056
+ },
2057
+ // ── Motion transfer ──
2058
+ "motion-transfer": {
2059
+ id: "motion-transfer",
2060
+ kind: "video",
2061
+ modes: ["motion-transfer"],
2062
+ family: "Kuaishou",
2063
+ label: "Kling 2.6 Motion Transfer",
2064
+ series: "Kling",
2065
+ description: "Transfer the motion from a driving video onto a still subject. Kling 2.6 base.",
2066
+ useCases: ["motion-transfer"],
2067
+ durations: [5, 10, 15, 30],
2068
+ resolutions: ["720p", "1080p"],
2069
+ pricing: [
2070
+ { identifier: "motion-transfer", credits: 150, note: "10s 720p default" },
2071
+ { identifier: "motion-transfer:5s", credits: 80 },
2072
+ { identifier: "motion-transfer:10s", credits: 150 },
2073
+ { identifier: "motion-transfer:15s", credits: 230 },
2074
+ { identifier: "motion-transfer:30s", credits: 450 },
2075
+ { identifier: "motion-transfer:1080p:10s", credits: 230 }
2076
+ ]
2077
+ },
2078
+ "kling-3.0-motion": {
2079
+ id: "kling-3.0-motion",
2080
+ kind: "video",
2081
+ modes: ["motion-transfer"],
2082
+ family: "Kuaishou",
2083
+ label: "Kling 3.0 Motion Transfer",
2084
+ series: "Kling",
2085
+ description: "Premium motion transfer via Kling 3.0.",
2086
+ useCases: ["motion-transfer", "premium"],
2087
+ durations: [5, 10, 15, 30],
2088
+ resolutions: ["720p", "1080p"],
2089
+ pricing: [
2090
+ { identifier: "kling-3.0-motion", credits: 300, note: "10s 720p default" },
2091
+ { identifier: "kling-3.0-motion:5s", credits: 150 },
2092
+ { identifier: "kling-3.0-motion:10s", credits: 300 },
2093
+ { identifier: "kling-3.0-motion:1080p:10s", credits: 500 }
2094
+ ]
2095
+ },
2096
+ // ── Lip sync / talking-head ──
2097
+ "kling-avatar": {
2098
+ id: "kling-avatar",
2099
+ kind: "video",
2100
+ modes: ["lip-sync"],
2101
+ family: "Kuaishou",
2102
+ label: "Kling Avatar Standard",
2103
+ series: "Kling",
2104
+ description: "Lip-sync a still portrait to driving audio. Standard quality.",
2105
+ useCases: ["lip-sync", "talking-head"],
2106
+ pricing: [{ identifier: "kling-avatar", credits: 280, note: "~14s default" }]
2107
+ },
2108
+ "kling-avatar-pro": {
2109
+ id: "kling-avatar-pro",
2110
+ kind: "video",
2111
+ modes: ["lip-sync"],
2112
+ family: "Kuaishou",
2113
+ label: "Kling Avatar Pro",
2114
+ series: "Kling",
2115
+ description: "Premium lip-sync \u2014 better mouth shape and timing.",
2116
+ useCases: ["lip-sync", "talking-head", "premium"],
2117
+ pricing: [{ identifier: "kling-avatar-pro", credits: 560 }]
2118
+ },
2119
+ "infinitalk": {
2120
+ id: "infinitalk",
2121
+ kind: "video",
2122
+ modes: ["lip-sync"],
2123
+ family: "InfiniTalk",
2124
+ label: "InfiniTalk",
2125
+ series: "InfiniTalk",
2126
+ description: "Audio-driven talking-head from a still image. 480p / 720p.",
2127
+ useCases: ["lip-sync", "talking-head"],
2128
+ resolutions: ["480p", "720p"],
2129
+ pricing: [
2130
+ { identifier: "infinitalk", credits: 420, note: "720p default" },
2131
+ { identifier: "infinitalk:480p", credits: 110 },
2132
+ { identifier: "infinitalk:720p", credits: 420 }
2133
+ ]
2134
+ },
2135
+ "omnihuman-1-5": {
2136
+ id: "omnihuman-1-5",
2137
+ kind: "video",
2138
+ modes: ["lip-sync"],
2139
+ family: "Bytedance",
2140
+ label: "OmniHuman 1.5",
2141
+ series: "OmniHuman",
2142
+ description: "Premium prompt-directed talking avatar from a still image + audio. 720p / 1080p, up to 60s. People, pets, anime.",
2143
+ useCases: ["lip-sync", "talking-head", "premium"],
2144
+ resolutions: ["720p", "1080p"],
2145
+ pricing: [
2146
+ { identifier: "omnihuman-1-5", credits: 4050, note: "60s ceiling (no duration given)" },
2147
+ { identifier: "omnihuman-1-5:15s", credits: 1020 },
2148
+ { identifier: "omnihuman-1-5:30s", credits: 2030 },
2149
+ { identifier: "omnihuman-1-5:60s", credits: 4050 }
2150
+ ]
2151
+ },
2152
+ "hailuo-avatar": {
2153
+ id: "hailuo-avatar",
2154
+ kind: "video",
2155
+ modes: ["lip-sync"],
2156
+ family: "MiniMax",
2157
+ label: "Hailuo Avatar",
2158
+ series: "Hailuo",
2159
+ description: "MiniMax avatar lip-sync.",
2160
+ useCases: ["lip-sync", "talking-head"],
2161
+ pricing: [{ identifier: "hailuo-avatar", credits: 190 }],
2162
+ // Not wired in any provider / not in LIP_SYNC_PROVIDERS — hide from MCP
2163
+ // list_models so the lip_sync tool can't advertise a model its route
2164
+ // rejects with a 400. Re-expose when the provider lands.
2165
+ mcpHidden: true
2166
+ },
2167
+ "sync-lipsync-v3": {
2168
+ id: "sync-lipsync-v3",
2169
+ kind: "video",
2170
+ modes: ["lip-sync"],
2171
+ family: "Sync",
2172
+ label: "Sync Lipsync v3",
2173
+ series: "Sync",
2174
+ description: "Dub existing footage \u2014 re-syncs lips to a new audio track. Video input, billed per second.",
2175
+ useCases: ["lip-sync", "dubbing", "video-to-video"],
2176
+ pricing: [
2177
+ { identifier: "sync-lipsync-v3", credits: 2e4, note: "5-min ceiling (no duration given)" },
2178
+ { identifier: "sync-lipsync-v3:15s", credits: 1e3 },
2179
+ { identifier: "sync-lipsync-v3:30s", credits: 2e3 },
2180
+ { identifier: "sync-lipsync-v3:60s", credits: 4e3 },
2181
+ { identifier: "sync-lipsync-v3:120s", credits: 8e3 },
2182
+ { identifier: "sync-lipsync-v3:300s", credits: 2e4, note: "5-min ceiling" }
2183
+ ]
2184
+ },
2185
+ "volcengine-lipsync": {
2186
+ id: "volcengine-lipsync",
2187
+ kind: "video",
2188
+ modes: ["lip-sync"],
2189
+ family: "Volcengine",
2190
+ label: "Volcengine Lip Sync",
2191
+ series: "Volcengine",
2192
+ description: "Video-to-video AI dubbing \u2014 re-syncs lips to a new vocal track. Multi-speaker (scene detection + speaker ID) in basic mode. Video input, billed per second.",
2193
+ useCases: ["lip-sync", "dubbing", "video-to-video"],
2194
+ pricing: [
2195
+ { identifier: "volcengine-lipsync", credits: 6e3, note: "5-min ceiling (no duration given)" },
2196
+ { identifier: "volcengine-lipsync:15s", credits: 300 },
2197
+ { identifier: "volcengine-lipsync:30s", credits: 600 },
2198
+ { identifier: "volcengine-lipsync:60s", credits: 1200 },
2199
+ { identifier: "volcengine-lipsync:120s", credits: 2400 },
2200
+ { identifier: "volcengine-lipsync:300s", credits: 6e3, note: "5-min ceiling" }
2201
+ ]
2202
+ },
2203
+ // ── Video Depth ── (video-depth node; billed per duration bucket via
2204
+ // videoDepthCreditId in video-depth.ts — `<provider>:<bucket>s`, bare row =
2205
+ // the 300 s ceiling, same shape as volcengine-lipsync.)
2206
+ "video-depth-anything": {
2207
+ id: "video-depth-anything",
2208
+ kind: "video",
2209
+ modes: ["video-depth"],
2210
+ family: "Depth Anything",
2211
+ label: "Video Depth Anything",
2212
+ series: "Depth Anything",
2213
+ description: "Temporally consistent depth video from any clip. Grayscale or colormapped, up to 2,400 frames or 300 seconds.",
2214
+ useCases: ["depth", "video-to-video", "compositing"],
2215
+ pricing: [
2216
+ { identifier: "video-depth-anything", credits: 6e3, note: "5-min ceiling (no duration given)" },
2217
+ { identifier: "video-depth-anything:15s", credits: 300 },
2218
+ { identifier: "video-depth-anything:30s", credits: 600 },
2219
+ { identifier: "video-depth-anything:60s", credits: 1200 },
2220
+ { identifier: "video-depth-anything:120s", credits: 2400 },
2221
+ { identifier: "video-depth-anything:300s", credits: 6e3, note: "5-min ceiling" }
2222
+ ]
2223
+ },
2224
+ "depth-anything-frames": {
2225
+ id: "depth-anything-frames",
2226
+ kind: "video",
2227
+ modes: ["video-depth"],
2228
+ family: "Depth Anything",
2229
+ label: "Depth Anything (per frame)",
2230
+ series: "Depth Anything",
2231
+ description: "Depth Anything v1 run on each frame. Grayscale or inferno colormap; may flicker between frames. Up to 80 s.",
2232
+ useCases: ["depth", "video-to-video"],
2233
+ pricing: [
2234
+ { identifier: "depth-anything-frames", credits: 600, note: "5-min ceiling (no duration given)" },
2235
+ { identifier: "depth-anything-frames:15s", credits: 30 },
2236
+ { identifier: "depth-anything-frames:30s", credits: 60 },
2237
+ { identifier: "depth-anything-frames:60s", credits: 120 },
2238
+ { identifier: "depth-anything-frames:120s", credits: 240 },
2239
+ { identifier: "depth-anything-frames:300s", credits: 600, note: "5-min ceiling" }
2240
+ ]
2241
+ },
2242
+ // ── Gemini video analysis ── (Gemini-only; billed per duration bucket — the
2243
+ // structural credit formula lives in video-analysis-pricing.ts. Composite id
2244
+ // shape `video-analysis:<model>:<bucket>s` mirrors volcengine-lipsync: bare
2245
+ // row = per-model namespace root at the 10-min ceiling, plus one row per bucket.)
2246
+ "gemini-3-flash-video-analysis": {
2247
+ id: "gemini-3-flash-video-analysis",
2248
+ kind: "video",
2249
+ modes: ["video-analysis"],
2250
+ family: "Nodaro",
2251
+ label: "Video Analysis (Fast)",
2252
+ series: "Video Analysis",
2253
+ description: "Analyze a video into a structured shot list (scenes, camera, audio) \u2014 fast, economy tier. Billed per duration bucket.",
2254
+ useCases: ["video-analysis", "shot-list", "fast"],
2255
+ pricing: [
2256
+ { identifier: "video-analysis:gemini-3-flash", credits: 848, note: "10-min ceiling (no duration given)" },
2257
+ { identifier: "video-analysis:gemini-3-flash:60s", credits: 181 },
2258
+ { identifier: "video-analysis:gemini-3-flash:180s", credits: 185 },
2259
+ { identifier: "video-analysis:gemini-3-flash:360s", credits: 515 },
2260
+ { identifier: "video-analysis:gemini-3-flash:600s", credits: 848, note: "10-min ceiling" }
2261
+ ]
2262
+ },
2263
+ "gemini-3.6-flash-video-analysis": {
2264
+ id: "gemini-3.6-flash-video-analysis",
2265
+ kind: "video",
2266
+ modes: ["video-analysis"],
2267
+ family: "Nodaro",
2268
+ label: "Video Analysis (Fast \u2014 legacy)",
2269
+ series: "Video Analysis",
2270
+ description: "Legacy fast-tier analysis model (backed the fast tier from 2026-07 until 2026-07-29). Kept so stored raw-model configs keep running and keep pricing under their own identifier; new fast-tier runs use the current fast model.",
2271
+ useCases: ["video-analysis", "shot-list", "fast"],
2272
+ pricing: [
2273
+ { identifier: "video-analysis:gemini-3.6-flash", credits: 992, note: "10-min ceiling (no duration given)" },
2274
+ { identifier: "video-analysis:gemini-3.6-flash:60s", credits: 204 },
2275
+ { identifier: "video-analysis:gemini-3.6-flash:180s", credits: 219 },
2276
+ { identifier: "video-analysis:gemini-3.6-flash:360s", credits: 602 },
2277
+ { identifier: "video-analysis:gemini-3.6-flash:600s", credits: 992, note: "10-min ceiling" }
2278
+ ]
2279
+ },
2280
+ "gemini-3.1-pro-video-analysis": {
2281
+ id: "gemini-3.1-pro-video-analysis",
2282
+ kind: "video",
2283
+ modes: ["video-analysis"],
2284
+ family: "Nodaro",
2285
+ label: "Video Analysis (Pro)",
2286
+ series: "Video Analysis",
2287
+ description: "Analyze a video into a structured shot list (scenes, camera, audio) \u2014 higher-fidelity, default tier. Billed per duration bucket.",
2288
+ useCases: ["video-analysis", "shot-list", "cinematic"],
2289
+ pricing: [
2290
+ { identifier: "video-analysis:gemini-3.1-pro", credits: 1056, note: "10-min ceiling (no duration given)" },
2291
+ { identifier: "video-analysis:gemini-3.1-pro:60s", credits: 216 },
2292
+ { identifier: "video-analysis:gemini-3.1-pro:180s", credits: 232 },
2293
+ { identifier: "video-analysis:gemini-3.1-pro:360s", credits: 640 },
2294
+ { identifier: "video-analysis:gemini-3.1-pro:600s", credits: 1056, note: "10-min ceiling" }
2295
+ ]
2296
+ },
2297
+ // Both mixed tiers are variants of the same advanced multi-engine analysis
2298
+ // and share this ONE credit family (videoAnalysisCreditSegment maps both;
2299
+ // plan internals live in the private analysis plugin).
2300
+ "mixed-video-analysis": {
2301
+ id: "mixed-video-analysis",
2302
+ kind: "video",
2303
+ modes: ["video-analysis"],
2304
+ family: "Nodaro",
2305
+ label: "Video Analysis (Mixed)",
2306
+ series: "Video Analysis",
2307
+ description: "Our most advanced analysis tier \u2014 multiple analysis engines combined into one result for maximum completeness and accuracy. Billed per duration bucket.",
2308
+ useCases: ["video-analysis", "shot-list", "premium", "most-complete"],
2309
+ pricing: [
2310
+ { identifier: "video-analysis:mixed", credits: 1177, note: "10-min ceiling (no duration given)" },
2311
+ { identifier: "video-analysis:mixed:60s", credits: 270 },
2312
+ { identifier: "video-analysis:mixed:180s", credits: 291 },
2313
+ { identifier: "video-analysis:mixed:360s", credits: 729 },
2314
+ { identifier: "video-analysis:mixed:600s", credits: 1177, note: "10-min ceiling" }
2315
+ ]
2316
+ },
2317
+ // SMART — the accuracy tier. Since the 2026-08-03 hybrid re-plan it is a
2318
+ // multi-roll plan like the others: a native skeleton pass blended with
2319
+ // several donor analysis rolls, with the merged result always refined
2320
+ // (it ignores `selectionMode` — see video-analysis-pricing.ts). Priced
2321
+ // well above them because it genuinely costs more to run.
2322
+ "smart-video-analysis": {
2323
+ id: "smart-video-analysis",
2324
+ kind: "video",
2325
+ modes: ["video-analysis"],
2326
+ family: "Nodaro",
2327
+ label: "Video Analysis (Smart)",
2328
+ series: "Video Analysis",
2329
+ description: "Highest-accuracy analysis \u2014 a hybrid pass that blends a native skeleton read with several donor analysis rolls, then always refines the merged result to find shot boundaries and identify the cast by appearance. Best choice when the shot list will drive regeneration. Billed per duration bucket.",
2330
+ useCases: ["video-analysis", "shot-list", "premium", "most-accurate"],
2331
+ pricing: [
2332
+ { identifier: "video-analysis:smart", credits: 2076, note: "10-min ceiling (no duration given)" },
2333
+ { identifier: "video-analysis:smart:60s", credits: 413 },
2334
+ { identifier: "video-analysis:smart:180s", credits: 503 },
2335
+ { identifier: "video-analysis:smart:360s", credits: 1267 },
2336
+ { identifier: "video-analysis:smart:600s", credits: 2076, note: "10-min ceiling" }
2337
+ ]
2338
+ },
2339
+ // ── AI Audit (`video-audit`) ── a SEPARATE node from video-analysis (own
2340
+ // node type, own route in the private plugin): it re-watches a clip
2341
+ // against its analysis (auto-running a fast analysis first when none is
2342
+ // wired), applies video-verified corrections under guards, and returns a
2343
+ // disclosed report of what was checked, fixed, and left open. These two
2344
+ // rows exist for pricing/MCP-discovery visibility only — the node has no
2345
+ // model picker in V1, so (unlike every other row in this section) they
2346
+ // deliberately carry no `series` and their `modes` has no Models-tab
2347
+ // mapping (see model-tree.ts's MODE_TO_NODE) — they must never appear as
2348
+ // selectable "video-analysis" models. Two credit families, chosen by
2349
+ // whether an analysis is wired into the node; the structural formula lives
2350
+ // in video-analysis-pricing.ts.
2351
+ "video-audit": {
2352
+ id: "video-audit",
2353
+ kind: "video",
2354
+ modes: ["video-audit"],
2355
+ family: "Nodaro",
2356
+ label: "AI Audit",
2357
+ description: "Re-watches a clip against a wired analysis, applies video-verified corrections under guards, and returns a disclosed report of what changed. Billed per duration bucket.",
2358
+ useCases: ["video-audit", "qa", "shot-list", "verification"],
2359
+ pricing: [
2360
+ { identifier: "video-audit", credits: 1073, note: "10-min ceiling (no duration given)" },
2361
+ { identifier: "video-audit:60s", credits: 215 },
2362
+ { identifier: "video-audit:180s", credits: 290 },
2363
+ { identifier: "video-audit:360s", credits: 663 },
2364
+ { identifier: "video-audit:600s", credits: 1073, note: "10-min ceiling" }
2365
+ ]
2366
+ },
2367
+ "video-audit-auto": {
2368
+ id: "video-audit-auto",
2369
+ kind: "video",
2370
+ modes: ["video-audit"],
2371
+ family: "Nodaro",
2372
+ label: "AI Audit (with analysis run)",
2373
+ description: "Same video-verified audit as AI Audit, but auto-runs a fast analysis first when none is wired in, then applies corrections under guards and returns a disclosed report. Billed per duration bucket.",
2374
+ useCases: ["video-audit", "qa", "shot-list", "verification", "auto-analysis"],
2375
+ pricing: [
2376
+ { identifier: "video-audit:auto", credits: 1921, note: "10-min ceiling (no duration given)" },
2377
+ { identifier: "video-audit:auto:60s", credits: 396 },
2378
+ { identifier: "video-audit:auto:180s", credits: 475 },
2379
+ { identifier: "video-audit:auto:360s", credits: 1178 },
2380
+ { identifier: "video-audit:auto:600s", credits: 1921, note: "10-min ceiling" }
2381
+ ]
2382
+ }
2383
+ };
2384
+ var TTS_LANGS_MULTILINGUAL_V2 = [
2385
+ "en",
2386
+ "ja",
2387
+ "zh",
2388
+ "de",
2389
+ "hi",
2390
+ "fr",
2391
+ "ko",
2392
+ "pt",
2393
+ "it",
2394
+ "es",
2395
+ "id",
2396
+ "nl",
2397
+ "tr",
2398
+ "fil",
2399
+ "pl",
2400
+ "sv",
2401
+ "bg",
2402
+ "ro",
2403
+ "ar",
2404
+ "cs",
2405
+ "el",
2406
+ "fi",
2407
+ "hr",
2408
+ "ms",
2409
+ "sk",
2410
+ "da",
2411
+ "ta",
2412
+ "uk",
2413
+ "ru"
2414
+ ];
2415
+ var TTS_LANGS_FLASH_V25 = [...TTS_LANGS_MULTILINGUAL_V2, "hu", "no", "vi"];
2416
+ var TTS_LANGS_V3 = [
2417
+ ...TTS_LANGS_FLASH_V25,
2418
+ "he",
2419
+ "th",
2420
+ "bn",
2421
+ "ur",
2422
+ "fa",
2423
+ "sr",
2424
+ "lt",
2425
+ "lv",
2426
+ "et",
2427
+ "ka",
2428
+ "is",
2429
+ "ca",
2430
+ "af",
2431
+ "sw"
2432
+ ];
2433
+ var TTS_LEVERS_V2 = ["stability", "similarity", "style", "speed", "speakerBoost"];
2434
+ var DIALOGUE_V4_MAX_CHARS = 1e4;
2435
+ var V4_TURBO_MAX_CHARS = 1e4;
2436
+ var AUDIO_MODELS = {
2437
+ // ── ElevenLabs TTS ──
2438
+ "elevenlabs-v3": {
2439
+ id: "elevenlabs-v3",
2440
+ kind: "audio",
2441
+ modes: ["tts"],
2442
+ family: "ElevenLabs",
2443
+ label: "ElevenLabs v3",
2444
+ series: "ElevenLabs",
2445
+ description: "Expressive ElevenLabs TTS \u2014 supports [audio tags] for emotion / pacing. Direct API.",
2446
+ useCases: ["tts", "voice-over", "narration", "expressive"],
2447
+ features: ["audio-tags", "voice-cloning"],
2448
+ pricing: [
2449
+ { identifier: "elevenlabs-v3", credits: 30 },
2450
+ { identifier: "elevenlabs-v3:per-100-chars", credits: 4, note: SPEECH_UNIT_PRICE_NOTE }
2451
+ ],
2452
+ tts: {
2453
+ audioTags: true,
2454
+ ssmlBreaks: false,
2455
+ levers: ["stability"],
2456
+ languageCode: true,
2457
+ timestamps: true,
2458
+ // measured 2026-10-06: /with-timestamps answers 200 at the same character cost
2459
+ // Rejects previous_text / next_text with a 400 (probed 2026-10-04).
2460
+ stitching: false,
2461
+ maxChars: 5e3,
2462
+ // official cap (probed: 5,200 chars accepted; keep the clamp)
2463
+ languages: TTS_LANGS_V3
2464
+ }
2465
+ },
2466
+ "elevenlabs-v4": {
2467
+ id: "elevenlabs-v4",
2468
+ kind: "audio",
2469
+ modes: ["tts"],
2470
+ family: "ElevenLabs",
2471
+ label: "ElevenLabs v4",
2472
+ series: "ElevenLabs",
2473
+ description: "Newest ElevenLabs TTS \u2014 [audio tags], stability and similarity control, up to 10,000 characters per request. Direct API.",
2474
+ useCases: ["tts", "voice-over", "narration", "expressive", "long-form"],
2475
+ features: ["audio-tags", "voice-cloning"],
2476
+ pricing: [
2477
+ { identifier: "elevenlabs-v4", credits: 30 },
2478
+ { identifier: "elevenlabs-v4:per-100-chars", credits: 4, note: SPEECH_UNIT_PRICE_NOTE }
2479
+ ],
2480
+ // The default speech model (DEFAULT_TTS_PROVIDER) carries the star.
2481
+ featured: true,
2482
+ tts: {
2483
+ audioTags: true,
2484
+ ssmlBreaks: false,
2485
+ levers: ["stability", "similarity"],
2486
+ languageCode: true,
2487
+ timestamps: true,
2488
+ // measured 2026-10-06: /with-timestamps answers 200 at the same character cost
2489
+ // Accepts previous_text / next_text (probed 2026-10-04).
2490
+ stitching: true,
2491
+ maxChars: 1e4,
2492
+ // The curated picker, the same 46 as v3. The model itself lists 85
2493
+ // (it adds e.g. Cantonese, Maltese, Mongolian, Burmese, Uzbek); widening
2494
+ // the picker is its own change — it needs a name and a translation per language.
2495
+ languages: TTS_LANGS_V3
2496
+ }
2497
+ },
2498
+ "elevenlabs-v4-turbo": {
2499
+ id: "elevenlabs-v4-turbo",
2500
+ kind: "audio",
2501
+ modes: ["tts"],
2502
+ family: "ElevenLabs",
2503
+ label: "ElevenLabs v4 Turbo",
2504
+ series: "ElevenLabs",
2505
+ description: "Faster, cheaper ElevenLabs v4 at lower fidelity \u2014 [audio tags], stability and similarity control, at Turbo's credit price. Prefer v4 when quality matters. Direct API.",
2506
+ useCases: ["tts", "voice-over", "narration", "expressive", "fast"],
2507
+ features: ["audio-tags", "voice-cloning"],
2508
+ // Flat per request at parity with Turbo v2.5 (what a run costs where length
2509
+ // pricing is off); per started 100 characters at Turbo's rate where it is on
2510
+ // (decided 2026-10-06).
2511
+ pricing: [
2512
+ { identifier: "elevenlabs-v4-turbo", credits: 15 },
2513
+ { identifier: "elevenlabs-v4-turbo:per-100-chars", credits: 2, note: SPEECH_UNIT_PRICE_NOTE }
2514
+ ],
2515
+ tts: {
2516
+ // Every value below was measured 2026-10-07 from live calls to eleven_v4_turbo.
2517
+ audioTags: true,
2518
+ // measured 2026-10-07: a tagged line → 200; Scribe hears no tag word spoken and lists [chuckles] as an audio event
2519
+ ssmlBreaks: false,
2520
+ levers: ["stability", "similarity"],
2521
+ // measured 2026-10-07: /v1/models can_use_style / can_use_speaker_boost both false, as v4; stability + similarity_boost → 200
2522
+ languageCode: true,
2523
+ // measured 2026-10-07: language_code "he" with Hebrew text → 200
2524
+ timestamps: true,
2525
+ // measured 2026-10-07: /with-timestamps answers 200 at the same character cost as the plain call
2526
+ stitching: true,
2527
+ // measured 2026-10-07: previous_text / next_text → 200, at the same character cost (context not billed)
2528
+ maxChars: V4_TURBO_MAX_CHARS,
2529
+ // The curated picker, the same 46 as v4 and v3 (the model lists 85; widening is its own change).
2530
+ languages: TTS_LANGS_V3
2531
+ // measured 2026-10-07: all 46 present in the model's 85-language list
2532
+ }
2533
+ },
2534
+ "elevenlabs-turbo": {
2535
+ id: "elevenlabs-turbo",
2536
+ kind: "audio",
2537
+ modes: ["tts"],
2538
+ family: "ElevenLabs",
2539
+ label: "ElevenLabs Turbo v2.5",
2540
+ series: "ElevenLabs",
2541
+ description: "Fast, cheap ElevenLabs TTS via the direct ElevenLabs API. Good for narration.",
2542
+ useCases: ["tts", "narration", "fast"],
2543
+ // The flat row carries no note (a "per 1K chars" note once described a
2544
+ // scaling that never existed; the minimum under length pricing is 8 units, 16).
2545
+ pricing: [
2546
+ { identifier: "elevenlabs-turbo", credits: 15 },
2547
+ { identifier: "elevenlabs-turbo:per-100-chars", credits: 2, note: SPEECH_UNIT_PRICE_NOTE }
2548
+ ],
2549
+ tts: {
2550
+ audioTags: false,
2551
+ ssmlBreaks: true,
2552
+ levers: TTS_LEVERS_V2,
2553
+ languageCode: true,
2554
+ timestamps: true,
2555
+ // measured 2026-10-06: /with-timestamps answers 200 at the same character cost
2556
+ // Measured 2026-10-06: the direct API accepts previous_text / next_text on this model (200).
2557
+ stitching: true,
2558
+ maxChars: 4e4,
2559
+ // == eleven_flash_v2_5 (functionally equivalent)
2560
+ languages: TTS_LANGS_FLASH_V25
2561
+ }
2562
+ },
2563
+ "elevenlabs-multilingual": {
2564
+ id: "elevenlabs-multilingual",
2565
+ kind: "audio",
2566
+ modes: ["tts"],
2567
+ family: "ElevenLabs",
2568
+ label: "ElevenLabs Multilingual v2",
2569
+ series: "ElevenLabs",
2570
+ description: "Multi-language ElevenLabs TTS via the direct ElevenLabs API.",
2571
+ useCases: ["tts", "multilingual"],
2572
+ // The flat row carries no note (the old "per 1K chars" described a scaling that never existed).
2573
+ pricing: [
2574
+ { identifier: "elevenlabs-multilingual", credits: 30 },
2575
+ { identifier: "elevenlabs-multilingual:per-100-chars", credits: 4, note: SPEECH_UNIT_PRICE_NOTE }
2576
+ ],
2577
+ tts: {
2578
+ audioTags: false,
2579
+ ssmlBreaks: true,
2580
+ levers: TTS_LEVERS_V2,
2581
+ // The API reference: "This parameter is not supported for multilingual_v2 models."
2582
+ languageCode: false,
2583
+ timestamps: true,
2584
+ // measured 2026-10-06: /with-timestamps answers 200 at the same character cost
2585
+ // Measured 2026-10-06: the direct API accepts previous_text / next_text on this model (200).
2586
+ stitching: true,
2587
+ maxChars: 1e4,
2588
+ languages: TTS_LANGS_MULTILINGUAL_V2
2589
+ }
2590
+ },
2591
+ "elevenlabs-dialogue": {
2592
+ id: "elevenlabs-dialogue",
2593
+ kind: "audio",
2594
+ // Its own mode, never "tts": the script shape (inputs[]) doesn't fit the
2595
+ // single-text generate_speech contract, so list_models must never offer
2596
+ // it there. The dialogue-capable MCP verb is `generate_dialogue`.
2597
+ modes: ["dialogue"],
2598
+ family: "ElevenLabs",
2599
+ label: "ElevenLabs Dialogue v3",
2600
+ series: "ElevenLabs",
2601
+ description: "Multi-speaker dialogue via the direct ElevenLabs API \u2014 give it a script, it voices each role (any voice: premade, library, or cloned).",
2602
+ useCases: ["tts", "dialogue", "multi-speaker"],
2603
+ features: ["audio-tags", "voice-cloning"],
2604
+ // Flat per request, whatever the length (decided 2026-10-06: the old
2605
+ // "per 1K chars" note described a scaling that never existed).
2606
+ pricing: [
2607
+ { identifier: "elevenlabs-dialogue", credits: 25 },
2608
+ { identifier: "elevenlabs-dialogue:per-100-chars", credits: 4, note: SPEECH_UNIT_PRICE_NOTE }
2609
+ ],
2610
+ tts: {
2611
+ audioTags: true,
2612
+ ssmlBreaks: false,
2613
+ levers: ["stability"],
2614
+ // The dialogue route has offered exactly these three since it shipped
2615
+ // (routes/text-to-dialogue.ts). Kept as the platform's v3 dialogue contract.
2616
+ stabilitySteps: [0, 0.5, 1],
2617
+ languageCode: true,
2618
+ timestamps: true,
2619
+ // measured 2026-10-06: /with-timestamps answers 200 at the same character cost
2620
+ // The dialogue funnel does not read this field (its own lane; phase 2 declares
2621
+ // the v4 dialogue model's value). v3 underneath.
2622
+ stitching: false,
2623
+ // Total across lines. The documented 2,000 is a recommendation, not a
2624
+ // limit (2,500 and 5,000 both probed 200); capped like v3, the model underneath.
2625
+ maxChars: 5e3,
2626
+ languages: TTS_LANGS_V3
2627
+ }
2628
+ },
2629
+ "elevenlabs-dialogue-v4": {
2630
+ id: "elevenlabs-dialogue-v4",
2631
+ kind: "audio",
2632
+ // Its own mode, never "tts" — the same reason as v3 dialogue above.
2633
+ modes: ["dialogue"],
2634
+ family: "ElevenLabs",
2635
+ label: "ElevenLabs Dialogue v4",
2636
+ series: "ElevenLabs",
2637
+ description: "Multi-speaker dialogue on ElevenLabs v4 \u2014 [audio tags], stability and similarity control. Direct API.",
2638
+ useCases: ["tts", "dialogue", "multi-speaker"],
2639
+ features: ["audio-tags", "voice-cloning"],
2640
+ // Flat per request, the same as v3 dialogue (decided 2026-10-06).
2641
+ pricing: [
2642
+ { identifier: "elevenlabs-dialogue-v4", credits: 25 },
2643
+ { identifier: "elevenlabs-dialogue-v4:per-100-chars", credits: 4, note: SPEECH_UNIT_PRICE_NOTE }
2644
+ ],
2645
+ tts: {
2646
+ audioTags: true,
2647
+ ssmlBreaks: false,
2648
+ levers: ["stability", "similarity"],
2649
+ languageCode: true,
2650
+ timestamps: true,
2651
+ // measured 2026-10-06: /with-timestamps answers 200 at the same character cost
2652
+ // Dialogue models never stitch neighbour text (the funnel does not read this).
2653
+ stitching: false,
2654
+ maxChars: DIALOGUE_V4_MAX_CHARS,
2655
+ // The curated picker, v3's 46 (v4 lists 85; widening is its own change).
2656
+ languages: TTS_LANGS_V3
2657
+ }
2658
+ },
2659
+ // ── ElevenLabs voice utilities ──
2660
+ // (voice cloning was retired platform-wide on 2026-09-15 — no catalog entry,
2661
+ // no price, no MCP tool; existing clones still resolve as TTS voice ids.)
2662
+ "elevenlabs-voice-design": {
2663
+ id: "elevenlabs-voice-design",
2664
+ kind: "audio",
2665
+ modes: ["voice-design"],
2666
+ family: "ElevenLabs",
2667
+ label: "ElevenLabs Voice Design",
2668
+ series: "ElevenLabs",
2669
+ description: "Design a synthetic voice from a description (no reference clip needed).",
2670
+ useCases: ["voice-design", "synthetic"],
2671
+ pricing: [{ identifier: "elevenlabs-voice-design", credits: 50 }]
2672
+ },
2673
+ "elevenlabs-voice-changer": {
2674
+ id: "elevenlabs-voice-changer",
2675
+ kind: "audio",
2676
+ modes: ["voice-changer"],
2677
+ family: "ElevenLabs",
2678
+ label: "ElevenLabs Voice Changer",
2679
+ series: "ElevenLabs",
2680
+ description: "Speech-to-speech: convert one voice to another while preserving prosody.",
2681
+ useCases: ["voice-conversion", "dubbing"],
2682
+ pricing: [{ identifier: "elevenlabs-voice-changer", credits: 40 }]
2683
+ },
2684
+ "elevenlabs-stt": {
2685
+ id: "elevenlabs-stt",
2686
+ kind: "audio",
2687
+ modes: ["stt"],
2688
+ family: "ElevenLabs",
2689
+ label: "ElevenLabs STT",
2690
+ series: "ElevenLabs",
2691
+ description: "Speech-to-text with WORD-level timestamps (always on), speaker diarization and audio-event tags. The engine to use when the transcript feeds captions.",
2692
+ useCases: ["transcription", "stt", "captions"],
2693
+ features: ["word-timestamps", "diarization", "audio-events"],
2694
+ pricing: [{ identifier: "elevenlabs-stt", credits: 22 }]
2695
+ },
2696
+ "incredibly-fast-whisper": {
2697
+ id: "incredibly-fast-whisper",
2698
+ kind: "audio",
2699
+ modes: ["stt"],
2700
+ family: "OpenAI",
2701
+ label: "Incredibly Fast Whisper",
2702
+ series: "Whisper",
2703
+ description: "Fast Whisper speech-to-text. Returns WORD-level timestamps when asked, so its transcript can feed captions.",
2704
+ useCases: ["transcription", "stt", "captions"],
2705
+ features: ["word-timestamps"],
2706
+ pricing: [{ identifier: "incredibly-fast-whisper", credits: 40 }]
2707
+ },
2708
+ "whisper": {
2709
+ id: "whisper",
2710
+ kind: "audio",
2711
+ modes: ["stt"],
2712
+ family: "OpenAI",
2713
+ label: "Whisper",
2714
+ series: "Whisper",
2715
+ description: "Whisper speech-to-text \u2014 PHRASE-level segments only, NO word timestamps. Fine for a transcript or a static subtitle; not for word-timed (kinetic) captions.",
2716
+ useCases: ["transcription", "stt"],
2717
+ pricing: [{ identifier: "whisper", credits: 40 }]
2718
+ },
2719
+ "elevenlabs-isolation": {
2720
+ id: "elevenlabs-isolation",
2721
+ kind: "audio",
2722
+ modes: ["isolation"],
2723
+ family: "ElevenLabs",
2724
+ label: "ElevenLabs Voice Isolation",
2725
+ series: "ElevenLabs",
2726
+ description: "Strip background noise / music from a vocal track.",
2727
+ useCases: ["cleanup", "isolation"],
2728
+ pricing: [{ identifier: "elevenlabs-isolation", credits: 74, note: "variable per second" }]
2729
+ },
2730
+ "elevenlabs-dubbing": {
2731
+ id: "elevenlabs-dubbing",
2732
+ kind: "audio",
2733
+ modes: ["dubbing"],
2734
+ family: "ElevenLabs",
2735
+ label: "ElevenLabs Dubbing",
2736
+ series: "ElevenLabs",
2737
+ description: "Translate + dub audio or a whole video into a new language \u2014 video in, dubbed video out. Async.",
2738
+ useCases: ["dubbing", "multilingual"],
2739
+ pricing: [{ identifier: "elevenlabs-dubbing", credits: 40, note: "per minute of the dubbed span (min 1)" }]
2740
+ },
2741
+ "elevenlabs-dubbing-v2": {
2742
+ id: "elevenlabs-dubbing-v2",
2743
+ kind: "audio",
2744
+ modes: ["dubbing"],
2745
+ family: "ElevenLabs",
2746
+ label: "ElevenLabs Dubbing v2",
2747
+ series: "ElevenLabs",
2748
+ description: "Translate + dub audio or a whole video into a new language \u2014 video in, dubbed video out. Async.",
2749
+ useCases: ["dubbing", "multilingual"],
2750
+ pricing: [{ identifier: "elevenlabs-dubbing-v2", credits: 1100, note: "per minute of the dubbed span (min 1)" }]
2751
+ },
2752
+ "elevenlabs-forced-alignment": {
2753
+ id: "elevenlabs-forced-alignment",
2754
+ kind: "audio",
2755
+ modes: ["forced-alignment"],
2756
+ family: "ElevenLabs",
2757
+ label: "ElevenLabs Forced Alignment",
2758
+ series: "ElevenLabs",
2759
+ description: "Align an existing transcript to audio with word-level timestamps.",
2760
+ useCases: ["alignment", "captions"],
2761
+ pricing: [{ identifier: "elevenlabs-forced-alignment", credits: 30 }]
2762
+ },
2763
+ // ── ElevenLabs SFX ──
2764
+ "elevenlabs-sfx": {
2765
+ id: "elevenlabs-sfx",
2766
+ kind: "audio",
2767
+ modes: ["sfx"],
2768
+ family: "ElevenLabs",
2769
+ label: "ElevenLabs Sound Effects",
2770
+ series: "ElevenLabs",
2771
+ description: "Generate short sound effects from a text prompt.",
2772
+ useCases: ["sfx", "ambient"],
2773
+ // Priced per whole second asked for (`elevenlabs-sfx:<n>s`, 1–30 s, rounded
2774
+ // up — textToAudioCreditId); representative rows, every second has its own.
2775
+ // First row = the default variant (a request with no duration bills 5 s).
2776
+ pricing: [
2777
+ { identifier: "elevenlabs-sfx:5s", credits: 5, note: "5s \u2014 also the price when no duration is set; 1 credit per second, rounded up" },
2778
+ { identifier: "elevenlabs-sfx:1s", credits: 1, note: "1s (min)" },
2779
+ { identifier: "elevenlabs-sfx:10s", credits: 10, note: "10s" },
2780
+ { identifier: "elevenlabs-sfx:30s", credits: 30, note: "30s (max)" }
2781
+ ]
2782
+ },
2783
+ // ── Suno music ──
2784
+ "suno": {
2785
+ id: "suno",
2786
+ kind: "audio",
2787
+ modes: ["music"],
2788
+ family: "Suno",
2789
+ label: "Suno v4",
2790
+ series: "Suno",
2791
+ dataValue: "V4",
2792
+ description: "Suno v4 music generation \u2014 full songs with vocals, multiple genres.",
2793
+ useCases: ["music", "song", "vocals"],
2794
+ pricing: [{ identifier: "suno", credits: 30, note: "per generation" }]
2795
+ },
2796
+ "suno-v5": {
2797
+ id: "suno-v5",
2798
+ kind: "audio",
2799
+ modes: ["music"],
2800
+ family: "Suno",
2801
+ label: "Suno v5",
2802
+ series: "Suno",
2803
+ dataValue: "V5",
2804
+ description: "Suno v5 \u2014 better vocal quality than v4, more genres. Same price.",
2805
+ useCases: ["music", "song", "vocals", "premium"],
2806
+ pricing: [{ identifier: "suno-v5", credits: 30, note: "per generation" }]
2807
+ },
2808
+ "suno-v5_5": {
2809
+ id: "suno-v5_5",
2810
+ kind: "audio",
2811
+ modes: ["music"],
2812
+ family: "Suno",
2813
+ label: "Suno v5.5",
2814
+ series: "Suno",
2815
+ dataValue: "V5_5",
2816
+ description: "Suno v5.5 \u2014 improved audio quality and expressiveness over v5.",
2817
+ useCases: ["music", "song", "vocals", "premium"],
2818
+ pricing: [{ identifier: "suno-v5_5", credits: 30, note: "per generation" }]
2819
+ },
2820
+ "suno-v6": {
2821
+ id: "suno-v6",
2822
+ kind: "audio",
2823
+ modes: ["music"],
2824
+ family: "Suno",
2825
+ label: "Suno V6",
2826
+ series: "Suno",
2827
+ dataValue: "V6",
2828
+ description: "Suno V6 \u2014 greater musical expression with more natural vocals and richer details. The flagship and the default.",
2829
+ useCases: ["music", "song", "vocals", "premium"],
2830
+ pricing: [{ identifier: "suno-v6", credits: 30, note: "per generation" }],
2831
+ featured: true
2832
+ },
2833
+ "suno-v6_wild": {
2834
+ id: "suno-v6_wild",
2835
+ kind: "audio",
2836
+ modes: ["music"],
2837
+ family: "Suno",
2838
+ label: "Suno V6 Wild",
2839
+ series: "Suno",
2840
+ dataValue: "V6_WILD",
2841
+ description: "Suno V6 Wild \u2014 pushes creative boundaries for bolder, more distinctive musical expression; more varied, less predictable results.",
2842
+ useCases: ["music", "song", "vocals", "experimental"],
2843
+ pricing: [{ identifier: "suno-v6_wild", credits: 30, note: "per generation" }]
2844
+ },
2845
+ "suno-v6_mini": {
2846
+ id: "suno-v6_mini",
2847
+ kind: "audio",
2848
+ modes: ["music"],
2849
+ family: "Suno",
2850
+ label: "Suno V6 Mini",
2851
+ series: "Suno",
2852
+ dataValue: "V6_MINI",
2853
+ description: "Suno V6 Mini \u2014 lightweight and fast, balancing quality and speed for effortless creation.",
2854
+ useCases: ["music", "song", "vocals", "fast"],
2855
+ pricing: [{ identifier: "suno-v6_mini", credits: 30, note: "per generation" }]
2856
+ }
2857
+ };
2858
+ var MODEL_CATALOG = {
2859
+ ...IMAGE_MODELS,
2860
+ ...VIDEO_MODELS,
2861
+ ...AUDIO_MODELS
2862
+ };
2863
+ function listModels(filter) {
2864
+ const all = Object.values(MODEL_CATALOG);
2865
+ if (!filter) return all;
2866
+ return all.filter((m) => {
2867
+ if (filter.kind && m.kind !== filter.kind) return false;
2868
+ if (filter.mode && !m.modes.includes(filter.mode)) return false;
2869
+ if (filter.family && m.family.toLowerCase() !== filter.family.toLowerCase()) return false;
2870
+ return true;
2871
+ });
2872
+ }
2873
+ function groupByFamily(entries) {
2874
+ const groups = /* @__PURE__ */ new Map();
2875
+ for (const m of entries) {
2876
+ const list = groups.get(m.family);
2877
+ if (list) list.push(m);
2878
+ else groups.set(m.family, [m]);
2879
+ }
2880
+ return Array.from(groups.entries()).map(([family, models]) => ({ family, models }));
2881
+ }
2882
+ var MODEL_KINDS = ["image", "video", "audio"];
2883
+ function groupByKindAndFamily(entries) {
2884
+ return MODEL_KINDS.map((kind) => ({ kind, families: groupByFamily(entries.filter((m) => m.kind === kind)) })).filter((section) => section.families.length > 0);
2885
+ }
2886
+ function getModel(id) {
2887
+ return MODEL_CATALOG[id];
2888
+ }
2889
+ function validateModelInput(modelId, input) {
2890
+ const m = MODEL_CATALOG[modelId];
2891
+ if (!m) return null;
2892
+ if (input.aspectRatio !== void 0) {
2893
+ if (!m.aspectRatios) {
2894
+ return {
2895
+ field: "aspectRatio",
2896
+ message: `Model "${modelId}" does not have an aspect_ratio lever \u2014 omit it.`,
2897
+ allowed: null
2898
+ };
2899
+ }
2900
+ if (!m.aspectRatios.includes(input.aspectRatio)) {
2901
+ return {
2902
+ field: "aspectRatio",
2903
+ message: `Model "${modelId}" does not support aspect_ratio "${input.aspectRatio}". Supported: ${m.aspectRatios.join(", ")}.`,
2904
+ allowed: m.aspectRatios
2905
+ };
2906
+ }
2907
+ }
2908
+ if (input.resolution !== void 0) {
2909
+ if (!m.resolutions) {
2910
+ return {
2911
+ field: "resolution",
2912
+ message: `Model "${modelId}" does not have a resolution lever \u2014 omit it.`,
2913
+ allowed: null
2914
+ };
2915
+ }
2916
+ if (!m.resolutions.includes(input.resolution)) {
2917
+ return {
2918
+ field: "resolution",
2919
+ message: `Model "${modelId}" does not support resolution "${input.resolution}". Supported: ${m.resolutions.join(", ")}.`,
2920
+ allowed: m.resolutions
2921
+ };
2922
+ }
2923
+ }
2924
+ if (input.quality !== void 0) {
2925
+ if (!m.qualities) {
2926
+ return {
2927
+ field: "quality",
2928
+ message: `Model "${modelId}" does not have a quality lever \u2014 omit it.`,
2929
+ allowed: null
2930
+ };
2931
+ }
2932
+ if (!m.qualities.includes(input.quality)) {
2933
+ return {
2934
+ field: "quality",
2935
+ message: `Model "${modelId}" does not support quality "${input.quality}". Supported: ${m.qualities.join(", ")}.`,
2936
+ allowed: m.qualities
2937
+ };
2938
+ }
2939
+ }
2940
+ if (input.duration !== void 0) {
2941
+ if (!m.durations) {
2942
+ return {
2943
+ field: "duration",
2944
+ message: `Model "${modelId}" does not have a duration lever \u2014 omit it.`,
2945
+ allowed: null
2946
+ };
2947
+ }
2948
+ const isAuto = m.autoDuration === true && isAutoVideoDuration(input.duration);
2949
+ if (!isAuto && !m.durations.includes(input.duration)) {
2950
+ return {
2951
+ field: "duration",
2952
+ message: `Model "${modelId}" does not support duration ${input.duration}s. Supported: ${m.durations.join(", ")}s.`,
2953
+ allowed: m.durations
2954
+ };
2955
+ }
2956
+ }
2957
+ return null;
2958
+ }
2959
+ function defaultResolutionFor(modelId) {
2960
+ if (!isFlux2Model(modelId)) return void 0;
2961
+ return modelId === "flux-2-klein" ? "1 MP" : "2 MP";
2962
+ }
2963
+ function sameOptionValue(a, b) {
2964
+ if (a === b) return true;
2965
+ const norm = (v) => String(v).trim().toLowerCase().replace(/\s*mp$/, "").replace(/\s+/g, "");
2966
+ const na = norm(a);
2967
+ const nb = norm(b);
2968
+ if (na === nb) return true;
2969
+ const fa = Number(na);
2970
+ const fb = Number(nb);
2971
+ return Number.isFinite(fa) && Number.isFinite(fb) && fa === fb;
2972
+ }
2973
+ function isAutoAspectToken(value) {
2974
+ return typeof value === "string" && value.trim().toLowerCase() === "auto";
2975
+ }
2976
+ function usableSize(size) {
2977
+ return size !== void 0 && Number.isFinite(size.width) && size.width > 0 && Number.isFinite(size.height) && size.height > 0;
2978
+ }
2979
+ var ASPECT_TIE_EPSILON = 1e-9;
2980
+ function nearestCatalogAspectRatio(sourceWidth, sourceHeight, ratios) {
2981
+ if (!usableSize({ width: sourceWidth, height: sourceHeight })) return void 0;
2982
+ const target = Math.log(sourceWidth / sourceHeight);
2983
+ let best;
2984
+ let bestDist = Infinity;
2985
+ for (const ratio of ratios) {
2986
+ const [rw, rh] = ratio.split(":").map(Number);
2987
+ if (!rw || !rh || rw < 0 || rh < 0) continue;
2988
+ const dist = Math.abs(Math.log(rw / rh) - target);
2989
+ if (dist < bestDist - ASPECT_TIE_EPSILON) {
2990
+ bestDist = dist;
2991
+ best = ratio;
2992
+ }
2993
+ }
2994
+ return best;
2995
+ }
2996
+ function autoAspectNeedsSourceImage(modelId, aspectRatio) {
2997
+ if (!modelId || !isAutoAspectToken(aspectRatio)) return false;
2998
+ const ratios = MODEL_CATALOG[modelId]?.aspectRatios;
2999
+ return ratios !== void 0 && ratios.length > 0 && !ratios.some(isAutoAspectToken);
3000
+ }
3001
+ function normalizeModelInput(modelId, input, context = {}) {
3002
+ const m = MODEL_CATALOG[modelId];
3003
+ const adjustments = [];
3004
+ if (!m) return { ...input, adjustments };
3005
+ const out = { ...input, adjustments };
3006
+ const snap = (field, value, allowed, preferred) => {
3007
+ if (value === void 0) return void 0;
3008
+ if (!allowed || allowed.length === 0) {
3009
+ adjustments.push({
3010
+ field,
3011
+ from: value,
3012
+ to: void 0,
3013
+ reason: `${m.label} has no ${field} setting \u2014 the value was dropped.`
3014
+ });
3015
+ return void 0;
3016
+ }
3017
+ if (allowed.includes(value)) return value;
3018
+ const canonical = allowed.find((a) => sameOptionValue(a, value));
3019
+ if (canonical !== void 0) return canonical;
3020
+ const next = preferred !== void 0 && allowed.includes(preferred) ? preferred : allowed[0];
3021
+ adjustments.push({
3022
+ field,
3023
+ from: value,
3024
+ to: next,
3025
+ reason: `${m.label} does not support ${field} "${value}" \u2014 using "${next}" instead. Supported: ${allowed.join(", ")}.`
3026
+ });
3027
+ return next;
3028
+ };
3029
+ const sourceRatio = autoAspectNeedsSourceImage(modelId, input.aspectRatio) && usableSize(context.sourceImage) ? nearestCatalogAspectRatio(context.sourceImage.width, context.sourceImage.height, m.aspectRatios ?? []) : void 0;
3030
+ if (sourceRatio !== void 0 && input.aspectRatio !== void 0) {
3031
+ const { width, height } = context.sourceImage;
3032
+ adjustments.push({
3033
+ field: "aspectRatio",
3034
+ from: input.aspectRatio,
3035
+ to: sourceRatio,
3036
+ reason: `${m.label} has no "auto" aspect ratio \u2014 using "${sourceRatio}", the supported ratio closest to the source image's shape (${width}x${height}).`
3037
+ });
3038
+ out.aspectRatio = sourceRatio;
3039
+ } else {
3040
+ out.aspectRatio = snap("aspectRatio", input.aspectRatio, m.aspectRatios);
3041
+ }
3042
+ out.resolution = snap(
3043
+ "resolution",
3044
+ input.resolution,
3045
+ m.resolutions,
3046
+ defaultResolutionFor(modelId)
3047
+ );
3048
+ out.quality = snap("quality", input.quality, m.qualities);
3049
+ out.duration = m.autoDuration === true && isAutoVideoDuration(input.duration) ? input.duration : snap("duration", input.duration, m.durations);
3050
+ if (modelId === "gpt-image-2" || modelId === "gpt-image-2-i2i") {
3051
+ if (out.aspectRatio === "auto" && out.resolution !== void 0 && out.resolution !== "1K") {
3052
+ adjustments.push({
3053
+ field: "resolution",
3054
+ from: out.resolution,
3055
+ to: "1K",
3056
+ reason: `${m.label} only renders 1K at the "auto" aspect ratio.`
3057
+ });
3058
+ out.resolution = "1K";
3059
+ } else if (out.aspectRatio === "1:1" && out.resolution === "4K") {
3060
+ adjustments.push({
3061
+ field: "resolution",
3062
+ from: "4K",
3063
+ to: "2K",
3064
+ reason: `${m.label} cannot render 4K at a 1:1 aspect ratio.`
3065
+ });
3066
+ out.resolution = "2K";
3067
+ }
3068
+ }
3069
+ return out;
3070
+ }
3071
+ var PASSTHROUGH_ASPECT_TOKENS = /* @__PURE__ */ new Set(["auto", "adaptive"]);
3072
+ var RESOLUTION_BAND_PIXELS = {
3073
+ "2k": 1440,
3074
+ "4k": 2160,
3075
+ "8k": 4320
3076
+ };
3077
+ function bandPixels(token) {
3078
+ const t = token.trim().toLowerCase();
3079
+ if (RESOLUTION_BAND_PIXELS[t] !== void 0) return RESOLUTION_BAND_PIXELS[t];
3080
+ const m = /^(\d+)p$/.exec(t);
3081
+ return m ? Number(m[1]) : void 0;
3082
+ }
3083
+ function nearestResolutionBand(token, allowed) {
3084
+ let highest = allowed[allowed.length - 1];
3085
+ let highestPx = -Infinity;
3086
+ for (const a of allowed) {
3087
+ const px = bandPixels(a);
3088
+ if (px !== void 0 && px > highestPx) {
3089
+ highestPx = px;
3090
+ highest = a;
3091
+ }
3092
+ }
3093
+ const want = bandPixels(token);
3094
+ if (want === void 0) return highest;
3095
+ let best = highest;
3096
+ let bestDist = Infinity;
3097
+ for (const a of allowed) {
3098
+ const px = bandPixels(a);
3099
+ if (px === void 0) continue;
3100
+ const d = Math.abs(px - want);
3101
+ if (d < bestDist) {
3102
+ bestDist = d;
3103
+ best = a;
3104
+ }
3105
+ }
3106
+ return best;
3107
+ }
3108
+ function nearestAspectRatio(token, allowed) {
3109
+ const [w, h] = token.split(":").map(Number);
3110
+ if (!w || !h) return void 0;
3111
+ const target = Math.log(w / h);
3112
+ let best;
3113
+ let bestDist = Infinity;
3114
+ for (const c of allowed) {
3115
+ const [cw, ch] = c.split(":").map(Number);
3116
+ if (!cw || !ch) continue;
3117
+ const d = Math.abs(Math.log(cw / ch) - target);
3118
+ if (d < bestDist) {
3119
+ bestDist = d;
3120
+ best = c;
3121
+ }
3122
+ }
3123
+ return best;
3124
+ }
3125
+ function fitAspectRatioToModel(modelId, ratio) {
3126
+ const token = ratio.trim();
3127
+ const allowed = MODEL_CATALOG[modelId]?.aspectRatios;
3128
+ if (!allowed?.length || token === "" || PASSTHROUGH_ASPECT_TOKENS.has(token.toLowerCase())) return token;
3129
+ const exact = allowed.find((a) => a === token) ?? allowed.find((a) => a.toLowerCase() === token.toLowerCase());
3130
+ if (exact !== void 0) return exact;
3131
+ return nearestAspectRatio(token, allowed.filter((a) => !PASSTHROUGH_ASPECT_TOKENS.has(a.toLowerCase()))) ?? allowed[0];
3132
+ }
3133
+ function readOptionToken(value) {
3134
+ if (value === void 0 || value === null) return void 0;
3135
+ const s = (typeof value === "string" ? value : String(value)).trim();
3136
+ return s === "" ? void 0 : s;
3137
+ }
3138
+ function normalizeVideoRequestParams(modelId, input) {
3139
+ const m = MODEL_CATALOG[modelId];
3140
+ const aspect = readOptionToken(input.aspectRatio);
3141
+ const requestedRes = readOptionToken(input.resolution);
3142
+ const draft = input.draft === true && isSeedanceDraftCapable(modelId);
3143
+ const res = draft ? SEEDANCE_DRAFT_RESOLUTION : requestedRes;
3144
+ const out = { aspectRatio: aspect, resolution: res, adjustments: [] };
3145
+ if (draft && requestedRes !== void 0 && requestedRes.toLowerCase() !== SEEDANCE_DRAFT_RESOLUTION) {
3146
+ out.adjustments.push({
3147
+ field: "resolution",
3148
+ from: requestedRes,
3149
+ to: SEEDANCE_DRAFT_RESOLUTION,
3150
+ reason: `A Seedance draft renders at ${SEEDANCE_DRAFT_RESOLUTION} only \u2014 using "${SEEDANCE_DRAFT_RESOLUTION}" instead of "${requestedRes}". Finalize the draft to get the same take at 1080p.`
3151
+ });
3152
+ }
3153
+ if (!m) return out;
3154
+ if (m.aspectRatios?.length && aspect && !PASSTHROUGH_ASPECT_TOKENS.has(aspect.toLowerCase())) {
3155
+ const next = fitAspectRatioToModel(modelId, aspect);
3156
+ if (next.toLowerCase() !== aspect.toLowerCase()) {
3157
+ out.adjustments.push({
3158
+ field: "aspectRatio",
3159
+ from: aspect,
3160
+ to: next,
3161
+ reason: `${m.label} does not support aspect ratio "${aspect}" \u2014 using "${next}" instead. Supported: ${m.aspectRatios.join(", ")}.`
3162
+ });
3163
+ }
3164
+ out.aspectRatio = next;
3165
+ }
3166
+ if (m.resolutions?.length && res) {
3167
+ const allowed = m.resolutions;
3168
+ const exact = allowed.find((a) => a === res) ?? allowed.find((a) => a.toLowerCase() === res.toLowerCase());
3169
+ if (exact !== void 0) {
3170
+ out.resolution = exact;
3171
+ } else {
3172
+ const next = m.unlistedResolutionRendersAs ?? nearestResolutionBand(res, allowed);
3173
+ out.adjustments.push({
3174
+ field: "resolution",
3175
+ from: res,
3176
+ to: next,
3177
+ reason: `${m.label} does not support resolution "${res}" \u2014 using "${next}" instead. Supported: ${allowed.join(", ")}.`
3178
+ });
3179
+ out.resolution = next;
3180
+ }
3181
+ }
3182
+ return out;
3183
+ }
3184
+ var MODEL_VALUE_LABELS = {
3185
+ // aspect ratios
3186
+ "1:1": "1:1 (Square)",
3187
+ "16:9": "16:9 (Landscape)",
3188
+ "9:16": "9:16 (Portrait)",
3189
+ "21:9": "21:9 (Ultra-wide)",
3190
+ "9:21": "9:21 (Tall ultra-wide)",
3191
+ "auto": "Auto",
3192
+ "adaptive": "Adaptive",
3193
+ // image resolutions
3194
+ "1K": "1K (Standard)",
3195
+ "2K": "2K (High)",
3196
+ "4K": "4K (Ultra)",
3197
+ "4k": "4K",
3198
+ "2k": "2K",
3199
+ "8K": "8K (Ultra)",
3200
+ // qualities
3201
+ "medium": "Medium (Balanced)",
3202
+ "high": "High (Detailed)",
3203
+ "basic": "Basic (2K)",
3204
+ "TURBO": "Turbo (fast)",
3205
+ "BALANCED": "Balanced",
3206
+ "QUALITY": "Quality (best)"
3207
+ };
3208
+ function decorateLabel(model, value) {
3209
+ return model.valueLabels?.[value] ?? MODEL_VALUE_LABELS[value] ?? value;
3210
+ }
3211
+ function getAspectRatioOptions(modelId) {
3212
+ const m = MODEL_CATALOG[modelId];
3213
+ if (!m?.aspectRatios) return null;
3214
+ return m.aspectRatios.map((v) => ({ value: v, label: decorateLabel(m, v) }));
3215
+ }
3216
+ function getResolutionOptions(modelId) {
3217
+ const m = MODEL_CATALOG[modelId];
3218
+ if (!m?.resolutions) return null;
3219
+ return m.resolutions.map((v) => ({ value: v, label: decorateLabel(m, v) }));
3220
+ }
3221
+ function getQualityOptions(modelId) {
3222
+ const m = MODEL_CATALOG[modelId];
3223
+ if (!m?.qualities) return null;
3224
+ return m.qualities.map((v) => ({ value: v, label: decorateLabel(m, v) }));
3225
+ }
3226
+ function getDurationsForModel(modelId) {
3227
+ const m = MODEL_CATALOG[modelId];
3228
+ if (!m?.durations) return null;
3229
+ return [...m.durations];
3230
+ }
3231
+ function getCreditRange(modelId) {
3232
+ const m = MODEL_CATALOG[modelId];
3233
+ if (!m || m.pricing.length < 2) return null;
3234
+ let min = Infinity;
3235
+ let max = -Infinity;
3236
+ for (const p of m.pricing) {
3237
+ if (p.credits < min) min = p.credits;
3238
+ if (p.credits > max) max = p.credits;
3239
+ }
3240
+ return { min, max };
3241
+ }
3242
+ function hasFeature(modelId, feature) {
3243
+ return MODEL_CATALOG[modelId]?.features?.includes(feature) ?? false;
3244
+ }
3245
+ function modelTakesSeed(modelId) {
3246
+ if (!modelId) return true;
3247
+ return MODEL_CATALOG[modelId]?.noSeed !== true;
3248
+ }
3249
+ function modelsWithFeature(feature) {
3250
+ return Object.values(MODEL_CATALOG).filter((m) => m.features?.includes(feature)).map((m) => m.id);
3251
+ }
3252
+ function durationsByMode(mode) {
3253
+ const out = {};
3254
+ for (const m of Object.values(MODEL_CATALOG)) {
3255
+ if (!m.modes.includes(mode)) continue;
3256
+ if (!m.durations) continue;
3257
+ out[m.id] = [...m.durations];
3258
+ }
3259
+ return out;
3260
+ }
3261
+ function resolutionOptionsByKind(kind) {
3262
+ const out = {};
3263
+ for (const m of Object.values(MODEL_CATALOG)) {
3264
+ if (m.kind !== kind) continue;
3265
+ if (!m.resolutions) continue;
3266
+ out[m.id] = m.resolutions.map((v) => ({ value: v, label: decorateLabel(m, v) }));
3267
+ }
3268
+ return out;
3269
+ }
3270
+ function aspectRatioOptionsByKind(kind) {
3271
+ const out = {};
3272
+ for (const m of Object.values(MODEL_CATALOG)) {
3273
+ if (m.kind !== kind) continue;
3274
+ if (!m.aspectRatios) continue;
3275
+ out[m.id] = m.aspectRatios.map((v) => ({ value: v, label: decorateLabel(m, v) }));
3276
+ }
3277
+ return out;
3278
+ }
3279
+ function qualityOptionsByKind(kind) {
3280
+ const out = {};
3281
+ for (const m of Object.values(MODEL_CATALOG)) {
3282
+ if (m.kind !== kind) continue;
3283
+ if (!m.qualities) continue;
3284
+ out[m.id] = m.qualities.map((v) => ({ value: v, label: decorateLabel(m, v) }));
3285
+ }
3286
+ return out;
3287
+ }
3288
+ function buildModelMenu(kind, allowlist) {
3289
+ const resByModel = resolutionOptionsByKind(kind);
3290
+ const arByModel = aspectRatioOptionsByKind(kind);
3291
+ const i2v = durationsByMode("i2v");
3292
+ const t2v = durationsByMode("t2v");
3293
+ const out = [];
3294
+ for (const id of allowlist) {
3295
+ const entry = MODEL_CATALOG[id];
3296
+ if (!entry || entry.kind !== kind) continue;
3297
+ const durations = Array.from(/* @__PURE__ */ new Set([...i2v[id] ?? [], ...t2v[id] ?? []])).sort((a, b) => a - b).map((n) => ({ value: n, label: `${n}s` }));
3298
+ out.push({
3299
+ id: entry.id,
3300
+ label: entry.label,
3301
+ resolutions: [...resByModel[id] ?? []],
3302
+ aspectRatios: [...arByModel[id] ?? []],
3303
+ durations
3304
+ });
3305
+ }
3306
+ return out;
3307
+ }
3308
+ function creditRangesAll() {
3309
+ const out = {};
3310
+ for (const m of Object.values(MODEL_CATALOG)) {
3311
+ const range = getCreditRange(m.id);
3312
+ if (range) out[m.id] = range;
3313
+ }
3314
+ return out;
3315
+ }
3316
+ function modelIdsByKindMode(kind, modes, opts = {}) {
3317
+ const includeHidden = opts.includeHidden === true;
3318
+ const ids = Object.values(MODEL_CATALOG).filter((m) => kind === null ? true : m.kind === kind).filter((m) => m.modes.some((md) => modes.includes(md))).filter((m) => includeHidden || !m.mcpHidden).map((m) => m.id).sort();
3319
+ if (ids.length === 0) {
3320
+ throw new Error(
3321
+ `modelIdsByKindMode: no models match kind=${kind ?? "*"} modes=[${modes.join(",")}]`
3322
+ );
3323
+ }
3324
+ return ids;
3325
+ }
3326
+
3327
+ exports.FLUX2_RES_MP = FLUX2_RES_MP;
3328
+ exports.MODEL_CATALOG = MODEL_CATALOG;
3329
+ exports.MODEL_KINDS = MODEL_KINDS;
3330
+ exports.MODEL_RECOMMENDATIONS = MODEL_RECOMMENDATIONS;
3331
+ exports.SEEDANCE_DRAFT_FINALIZE_MAX_SEC = SEEDANCE_DRAFT_FINALIZE_MAX_SEC;
3332
+ exports.SEEDANCE_DRAFT_FINALIZE_MIN_SEC = SEEDANCE_DRAFT_FINALIZE_MIN_SEC;
3333
+ exports.SEEDANCE_DRAFT_FINALIZE_PROVIDER = SEEDANCE_DRAFT_FINALIZE_PROVIDER;
3334
+ exports.SEEDANCE_DRAFT_FINALIZE_RESOLUTION = SEEDANCE_DRAFT_FINALIZE_RESOLUTION;
3335
+ exports.SEEDANCE_DRAFT_MODELS = SEEDANCE_DRAFT_MODELS;
3336
+ exports.SEEDANCE_DRAFT_RESOLUTION = SEEDANCE_DRAFT_RESOLUTION;
3337
+ exports.SPEECH_UNIT_PRICE_NOTE = SPEECH_UNIT_PRICE_NOTE;
3338
+ exports.VIDEO_DURATION_AUTO = VIDEO_DURATION_AUTO;
3339
+ exports.aspectRatioOptionsByKind = aspectRatioOptionsByKind;
3340
+ exports.autoAspectNeedsSourceImage = autoAspectNeedsSourceImage;
3341
+ exports.buildModelMenu = buildModelMenu;
3342
+ exports.creditRangesAll = creditRangesAll;
3343
+ exports.defaultResolutionFor = defaultResolutionFor;
3344
+ exports.durationsByMode = durationsByMode;
3345
+ exports.fitAspectRatioToModel = fitAspectRatioToModel;
3346
+ exports.getAspectRatioOptions = getAspectRatioOptions;
3347
+ exports.getCreditRange = getCreditRange;
3348
+ exports.getDurationsForModel = getDurationsForModel;
3349
+ exports.getModel = getModel;
3350
+ exports.getQualityOptions = getQualityOptions;
3351
+ exports.getResolutionOptions = getResolutionOptions;
3352
+ exports.groupByFamily = groupByFamily;
3353
+ exports.groupByKindAndFamily = groupByKindAndFamily;
3354
+ exports.hasFeature = hasFeature;
3355
+ exports.isAutoAspectToken = isAutoAspectToken;
3356
+ exports.isAutoVideoDuration = isAutoVideoDuration;
3357
+ exports.isFlux2Model = isFlux2Model;
3358
+ exports.isSeedanceDraftCapable = isSeedanceDraftCapable;
3359
+ exports.listModels = listModels;
3360
+ exports.modelIdsByKindMode = modelIdsByKindMode;
3361
+ exports.modelTakesSeed = modelTakesSeed;
3362
+ exports.modelsWithFeature = modelsWithFeature;
3363
+ exports.nearestCatalogAspectRatio = nearestCatalogAspectRatio;
3364
+ exports.normalizeModelInput = normalizeModelInput;
3365
+ exports.normalizeVideoRequestParams = normalizeVideoRequestParams;
3366
+ exports.qualityOptionsByKind = qualityOptionsByKind;
3367
+ exports.resolutionOptionsByKind = resolutionOptionsByKind;
3368
+ exports.seedanceDraftFinalizeBillableSec = seedanceDraftFinalizeBillableSec;
3369
+ exports.seedanceDraftFinalizeCreditId = seedanceDraftFinalizeCreditId;
3370
+ exports.validateModelInput = validateModelInput;
3371
+ //# sourceMappingURL=chunk-5AUSSJIM.cjs.map
3372
+ //# sourceMappingURL=chunk-5AUSSJIM.cjs.map