@nodaro/shared 3.61.0 → 3.62.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (254) hide show
  1. package/dist/{chunk-IVXSNW2B.cjs → chunk-2D5LQFV4.cjs} +18 -332
  2. package/dist/chunk-2D5LQFV4.cjs.map +1 -0
  3. package/dist/{chunk-XUJC6GHE.cjs → chunk-2HZGDZZN.cjs} +6 -6
  4. package/dist/{chunk-XUJC6GHE.cjs.map → chunk-2HZGDZZN.cjs.map} +1 -1
  5. package/dist/{chunk-43TGSZRJ.js → chunk-2QKF7M2Z.js} +3 -3
  6. package/dist/{chunk-43TGSZRJ.js.map → chunk-2QKF7M2Z.js.map} +1 -1
  7. package/dist/{chunk-7ARKVJTN.cjs → chunk-2W745U4A.cjs} +228 -355
  8. package/dist/chunk-2W745U4A.cjs.map +1 -0
  9. package/dist/{chunk-673E4KYC.js → chunk-3OYO3XCC.js} +70 -6
  10. package/dist/chunk-3OYO3XCC.js.map +1 -0
  11. package/dist/{chunk-FMXFHJWX.cjs → chunk-4ZEFP2FQ.cjs} +4 -4
  12. package/dist/{chunk-FMXFHJWX.cjs.map → chunk-4ZEFP2FQ.cjs.map} +1 -1
  13. package/dist/{chunk-A3FHTSLB.js → chunk-5YYN5X57.js} +302 -27
  14. package/dist/chunk-5YYN5X57.js.map +1 -0
  15. package/dist/{chunk-4KYLNTR7.cjs → chunk-6CSXMWL4.cjs} +4 -4
  16. package/dist/{chunk-4KYLNTR7.cjs.map → chunk-6CSXMWL4.cjs.map} +1 -1
  17. package/dist/{chunk-M3SXUUWC.cjs → chunk-6FQBKI2A.cjs} +4 -11
  18. package/dist/chunk-6FQBKI2A.cjs.map +1 -0
  19. package/dist/{chunk-G4XWVWRI.js → chunk-6G7NN4S4.js} +5 -4
  20. package/dist/chunk-6G7NN4S4.js.map +1 -0
  21. package/dist/{chunk-ZFJN23V4.cjs → chunk-A2PX5IRC.cjs} +4 -4
  22. package/dist/{chunk-ZFJN23V4.cjs.map → chunk-A2PX5IRC.cjs.map} +1 -1
  23. package/dist/{chunk-JHTT2V4A.cjs → chunk-AFYTX4AI.cjs} +52 -43
  24. package/dist/chunk-AFYTX4AI.cjs.map +1 -0
  25. package/dist/chunk-ALRXY4QH.cjs +13 -0
  26. package/dist/chunk-ALRXY4QH.cjs.map +1 -0
  27. package/dist/chunk-AOJ6B7K4.cjs +351 -0
  28. package/dist/chunk-AOJ6B7K4.cjs.map +1 -0
  29. package/dist/{chunk-ZDBPQBAA.js → chunk-C7POAYFE.js} +3 -3
  30. package/dist/{chunk-ZDBPQBAA.js.map → chunk-C7POAYFE.js.map} +1 -1
  31. package/dist/{chunk-B6BG3LV2.js → chunk-CC4V2B7S.js} +3 -3
  32. package/dist/{chunk-B6BG3LV2.js.map → chunk-CC4V2B7S.js.map} +1 -1
  33. package/dist/{chunk-XZKFZMRT.cjs → chunk-CIPPPT7E.cjs} +6 -6
  34. package/dist/{chunk-XZKFZMRT.cjs.map → chunk-CIPPPT7E.cjs.map} +1 -1
  35. package/dist/{chunk-6XVHYD5R.js → chunk-CLAKSLXF.js} +4 -9
  36. package/dist/chunk-CLAKSLXF.js.map +1 -0
  37. package/dist/chunk-CTANEPMY.js +61 -0
  38. package/dist/chunk-CTANEPMY.js.map +1 -0
  39. package/dist/{chunk-WGKAOUEQ.cjs → chunk-D34K455O.cjs} +3 -2
  40. package/dist/chunk-D34K455O.cjs.map +1 -0
  41. package/dist/chunk-E2HZTGYX.js +331 -0
  42. package/dist/chunk-E2HZTGYX.js.map +1 -0
  43. package/dist/{chunk-RQ4F3AJH.cjs → chunk-G3KVK7OU.cjs} +21 -21
  44. package/dist/{chunk-RQ4F3AJH.cjs.map → chunk-G3KVK7OU.cjs.map} +1 -1
  45. package/dist/chunk-G4U3HW6W.js +453 -0
  46. package/dist/chunk-G4U3HW6W.js.map +1 -0
  47. package/dist/{chunk-IRQ3SPX7.js → chunk-GSFB537T.js} +3 -3
  48. package/dist/{chunk-IRQ3SPX7.js.map → chunk-GSFB537T.js.map} +1 -1
  49. package/dist/chunk-HRY7KGAE.cjs +506 -0
  50. package/dist/chunk-HRY7KGAE.cjs.map +1 -0
  51. package/dist/{chunk-VOWJCUMR.js → chunk-I2RQB7VG.js} +3 -3
  52. package/dist/{chunk-VOWJCUMR.js.map → chunk-I2RQB7VG.js.map} +1 -1
  53. package/dist/chunk-IDTKF5EX.cjs +48 -0
  54. package/dist/chunk-IDTKF5EX.cjs.map +1 -0
  55. package/dist/{chunk-5XRRENHD.cjs → chunk-IWWVPR3W.cjs} +88 -11
  56. package/dist/chunk-IWWVPR3W.cjs.map +1 -0
  57. package/dist/{chunk-SCMTN57Y.js → chunk-JJNNM23P.js} +3 -3
  58. package/dist/{chunk-SCMTN57Y.js.map → chunk-JJNNM23P.js.map} +1 -1
  59. package/dist/{chunk-ZZGQRRN7.js → chunk-JZGZ26YB.js} +6 -306
  60. package/dist/chunk-JZGZ26YB.js.map +1 -0
  61. package/dist/{chunk-XROE3CAS.cjs → chunk-KHH54GRP.cjs} +120 -79
  62. package/dist/chunk-KHH54GRP.cjs.map +1 -0
  63. package/dist/{chunk-NJVOJXBS.cjs → chunk-KJSRPHJ2.cjs} +48 -47
  64. package/dist/chunk-KJSRPHJ2.cjs.map +1 -0
  65. package/dist/{chunk-FVVD6XY2.js → chunk-KL6GAYTT.js} +13 -4
  66. package/dist/chunk-KL6GAYTT.js.map +1 -0
  67. package/dist/{chunk-AFQFGZN7.cjs → chunk-KYMHFVAZ.cjs} +8 -6
  68. package/dist/chunk-KYMHFVAZ.cjs.map +1 -0
  69. package/dist/{chunk-F5YEMSNK.cjs → chunk-MYJQELFN.cjs} +320 -26
  70. package/dist/chunk-MYJQELFN.cjs.map +1 -0
  71. package/dist/chunk-N5HH46JF.cjs +68 -0
  72. package/dist/chunk-N5HH46JF.cjs.map +1 -0
  73. package/dist/{chunk-MQZRQ5LM.cjs → chunk-N7OUQK7E.cjs} +8 -8
  74. package/dist/{chunk-MQZRQ5LM.cjs.map → chunk-N7OUQK7E.cjs.map} +1 -1
  75. package/dist/{chunk-UARGJ5IZ.js → chunk-NGKKNSK6.js} +30 -7
  76. package/dist/chunk-NGKKNSK6.js.map +1 -0
  77. package/dist/{chunk-SWVGHAYO.js → chunk-O7RZRUMZ.js} +110 -74
  78. package/dist/chunk-O7RZRUMZ.js.map +1 -0
  79. package/dist/{chunk-C77F4ZTL.js → chunk-PTD6EDUU.js} +3 -3
  80. package/dist/{chunk-C77F4ZTL.js.map → chunk-PTD6EDUU.js.map} +1 -1
  81. package/dist/{chunk-ZNM2LW3D.cjs → chunk-QWYFHQYK.cjs} +78 -53
  82. package/dist/chunk-QWYFHQYK.cjs.map +1 -0
  83. package/dist/{chunk-VB2ARGQ6.js → chunk-RGNHHIMN.js} +3 -3
  84. package/dist/chunk-RGNHHIMN.js.map +1 -0
  85. package/dist/{chunk-MOMFX32D.js → chunk-S24ZBUB4.js} +194 -299
  86. package/dist/chunk-S24ZBUB4.js.map +1 -0
  87. package/dist/{chunk-EWS2VFO4.js → chunk-S5TMRJMX.js} +4 -4
  88. package/dist/{chunk-EWS2VFO4.js.map → chunk-S5TMRJMX.js.map} +1 -1
  89. package/dist/chunk-SMOO5FAH.js +10 -0
  90. package/dist/chunk-SMOO5FAH.js.map +1 -0
  91. package/dist/{chunk-RUHKBEFF.js → chunk-SYWR5G3T.js} +16 -7
  92. package/dist/chunk-SYWR5G3T.js.map +1 -0
  93. package/dist/{chunk-FQXRYPCX.cjs → chunk-TRVWMKNE.cjs} +337 -52
  94. package/dist/chunk-TRVWMKNE.cjs.map +1 -0
  95. package/dist/{chunk-LLOIAGFB.js → chunk-UDDVDQMF.js} +292 -35
  96. package/dist/chunk-UDDVDQMF.js.map +1 -0
  97. package/dist/{chunk-PONP5J5E.cjs → chunk-V24EPI5N.cjs} +13 -3
  98. package/dist/chunk-V24EPI5N.cjs.map +1 -0
  99. package/dist/{chunk-5I4T4QR5.cjs → chunk-VACPZPUA.cjs} +5 -5
  100. package/dist/{chunk-5I4T4QR5.cjs.map → chunk-VACPZPUA.cjs.map} +1 -1
  101. package/dist/{chunk-HGI2VKIV.js → chunk-Y6X7UJSD.js} +10 -9
  102. package/dist/chunk-Y6X7UJSD.js.map +1 -0
  103. package/dist/chunk-YCXRSWCQ.js +42 -0
  104. package/dist/chunk-YCXRSWCQ.js.map +1 -0
  105. package/dist/entries/apps.cjs +44 -44
  106. package/dist/entries/apps.js +9 -9
  107. package/dist/entries/credits.cjs +217 -152
  108. package/dist/entries/credits.d.cts +105 -3
  109. package/dist/entries/credits.d.ts +105 -3
  110. package/dist/entries/credits.js +13 -8
  111. package/dist/entries/entities.cjs +188 -143
  112. package/dist/entries/entities.d.cts +122 -1
  113. package/dist/entries/entities.d.ts +122 -1
  114. package/dist/entries/entities.js +2 -1
  115. package/dist/entries/llm-models.d.cts +2 -1
  116. package/dist/entries/llm-models.d.ts +2 -1
  117. package/dist/entries/media.cjs +92 -87
  118. package/dist/entries/media.d.cts +11 -1
  119. package/dist/entries/media.d.ts +11 -1
  120. package/dist/entries/media.js +3 -2
  121. package/dist/entries/model-catalog.cjs +195 -103
  122. package/dist/entries/model-catalog.d.cts +90 -4
  123. package/dist/entries/model-catalog.d.ts +90 -4
  124. package/dist/entries/model-catalog.js +5 -5
  125. package/dist/entries/models.cjs +407 -294
  126. package/dist/entries/models.d.cts +4 -3
  127. package/dist/entries/models.d.ts +4 -3
  128. package/dist/entries/models.js +6 -5
  129. package/dist/entries/nodes.cjs +241 -233
  130. package/dist/entries/nodes.d.cts +15 -2
  131. package/dist/entries/nodes.d.ts +15 -2
  132. package/dist/entries/nodes.js +10 -10
  133. package/dist/entries/pipeline.cjs +152 -152
  134. package/dist/entries/pipeline.d.cts +2 -1
  135. package/dist/entries/pipeline.d.ts +2 -1
  136. package/dist/entries/pipeline.js +3 -3
  137. package/dist/entries/ugc.cjs +71 -71
  138. package/dist/entries/ugc.js +4 -4
  139. package/dist/entries/video.cjs +308 -204
  140. package/dist/entries/video.d.cts +480 -98
  141. package/dist/entries/video.d.ts +480 -98
  142. package/dist/entries/video.js +8 -4
  143. package/dist/entries/workflow.cjs +102 -102
  144. package/dist/entries/workflow.d.cts +5 -4
  145. package/dist/entries/workflow.d.ts +5 -4
  146. package/dist/entries/workflow.js +2 -2
  147. package/dist/{gpt-image-2-6-BeZdT-pW.d.cts → gpt-image-2-6-jIRQBRag.d.cts} +6 -0
  148. package/dist/{gpt-image-2-6-BeZdT-pW.d.ts → gpt-image-2-6-jIRQBRag.d.ts} +6 -0
  149. package/dist/index.cjs +2309 -1886
  150. package/dist/index.d.cts +9 -9
  151. package/dist/index.d.ts +9 -9
  152. package/dist/index.js +26 -23
  153. package/dist/{model-catalog-BgSvskgY.d.cts → model-catalog-CCEcv08q.d.cts} +128 -14
  154. package/dist/{model-catalog-BgSvskgY.d.ts → model-catalog-CCEcv08q.d.ts} +128 -14
  155. package/dist/{model-constants-DHd9jwQ7.d.ts → model-constants-B88p6XR0.d.ts} +299 -19
  156. package/dist/{model-constants-DHd9jwQ7.d.cts → model-constants-Cf3zaITt.d.cts} +299 -19
  157. package/package.json +1 -1
  158. package/src/__tests__/extend-providers.test.ts +114 -0
  159. package/src/__tests__/fixtures/mask-composite-quote-parity.json +118 -0
  160. package/src/__tests__/fixtures/root-exports.baseline.json +68 -0
  161. package/src/__tests__/gpt-image-2-6-formats.test.ts +4 -1
  162. package/src/__tests__/grok-video-15-catalog.test.ts +189 -0
  163. package/src/__tests__/gvp-supported-providers.test.ts +5 -2
  164. package/src/__tests__/minimax-h3-image.test.ts +140 -0
  165. package/src/__tests__/model-makers.test.ts +49 -11
  166. package/src/__tests__/model-tree.test.ts +13 -0
  167. package/src/__tests__/retired-video-provider.test.ts +15 -5
  168. package/src/__tests__/seedance-25-catalog-modes.test.ts +1 -1
  169. package/src/__tests__/seedance-task-type.test.ts +178 -0
  170. package/src/__tests__/seedream-5-5.test.ts +117 -0
  171. package/src/__tests__/unit-contract-compose.test.ts +27 -1
  172. package/src/__tests__/unit-contracts.test.ts +20 -6
  173. package/src/__tests__/upscale-factors.test.ts +107 -0
  174. package/src/__tests__/video-character-refs.test.ts +20 -2
  175. package/src/__tests__/video-collapse-parity.test.ts +19 -0
  176. package/src/__tests__/video-overlay-geometry.test.ts +68 -0
  177. package/src/__tests__/video-overlay-layer-plan.test.ts +3 -4
  178. package/src/__tests__/video-overlay-layouts.test.ts +529 -0
  179. package/src/__tests__/video-overlay-pricing.test.ts +61 -0
  180. package/src/__tests__/video-overlay-validate.test.ts +128 -0
  181. package/src/__tests__/video-overlay-wired-kind.test.ts +207 -0
  182. package/src/__tests__/video-overlay.test.ts +280 -194
  183. package/src/__tests__/video-ref-limits.test.ts +2 -1
  184. package/src/__tests__/video-reference-only.test.ts +6 -2
  185. package/src/__tests__/video-start-frame-only.test.ts +98 -0
  186. package/src/__tests__/wired-character-names.test.ts +220 -0
  187. package/src/credit-estimators/index.ts +8 -0
  188. package/src/credit-estimators/video-overlay.ts +70 -0
  189. package/src/credit-identifiers.ts +94 -1
  190. package/src/entity-image-url.ts +21 -0
  191. package/src/entries/credits.ts +14 -0
  192. package/src/entries/entities.ts +14 -0
  193. package/src/entries/model-catalog.ts +35 -1
  194. package/src/entries/models.ts +34 -0
  195. package/src/entries/nodes.ts +2 -0
  196. package/src/entries/video.ts +6 -0
  197. package/src/generated/unit-contracts.ts +8 -1
  198. package/src/gpt-image-2-6.ts +6 -0
  199. package/src/input-image-pricing.ts +76 -0
  200. package/src/mask-composite.ts +11 -0
  201. package/src/minimax-h3-image.ts +61 -0
  202. package/src/model-catalog.ts +355 -37
  203. package/src/model-constants.ts +590 -32
  204. package/src/node-default-mappings.ts +12 -2
  205. package/src/node-execution-state.ts +4 -3
  206. package/src/producer-types.ts +23 -1
  207. package/src/seedance-task-type.ts +37 -0
  208. package/src/seedream-5-5.ts +45 -0
  209. package/src/unit-contract-compose.ts +4 -1
  210. package/src/upscale-factors.ts +111 -0
  211. package/src/video-character-refs.ts +7 -4
  212. package/src/video-overlay-geometry.ts +99 -0
  213. package/src/video-overlay-input.ts +25 -0
  214. package/src/video-overlay-layout-ids.ts +48 -0
  215. package/src/video-overlay-layouts.ts +315 -0
  216. package/src/video-overlay-validate.ts +223 -0
  217. package/src/video-overlay-video-layers.ts +304 -0
  218. package/src/video-overlay.ts +165 -297
  219. package/src/video-ui-defaults.ts +8 -6
  220. package/src/wired-character-names.ts +202 -0
  221. package/dist/chunk-5XRRENHD.cjs.map +0 -1
  222. package/dist/chunk-673E4KYC.js.map +0 -1
  223. package/dist/chunk-6XVHYD5R.js.map +0 -1
  224. package/dist/chunk-7ARKVJTN.cjs.map +0 -1
  225. package/dist/chunk-7WGKP3EU.js +0 -23
  226. package/dist/chunk-7WGKP3EU.js.map +0 -1
  227. package/dist/chunk-A3FHTSLB.js.map +0 -1
  228. package/dist/chunk-AFQFGZN7.cjs.map +0 -1
  229. package/dist/chunk-F5YEMSNK.cjs.map +0 -1
  230. package/dist/chunk-FQXRYPCX.cjs.map +0 -1
  231. package/dist/chunk-FVVD6XY2.js.map +0 -1
  232. package/dist/chunk-G4XWVWRI.js.map +0 -1
  233. package/dist/chunk-HGI2VKIV.js.map +0 -1
  234. package/dist/chunk-IVXSNW2B.cjs.map +0 -1
  235. package/dist/chunk-JHTT2V4A.cjs.map +0 -1
  236. package/dist/chunk-KHZAQGRP.js +0 -17
  237. package/dist/chunk-KHZAQGRP.js.map +0 -1
  238. package/dist/chunk-LLOIAGFB.js.map +0 -1
  239. package/dist/chunk-M3SXUUWC.cjs.map +0 -1
  240. package/dist/chunk-MOMFX32D.js.map +0 -1
  241. package/dist/chunk-NCOGGRRP.cjs +0 -27
  242. package/dist/chunk-NCOGGRRP.cjs.map +0 -1
  243. package/dist/chunk-NJVOJXBS.cjs.map +0 -1
  244. package/dist/chunk-PONP5J5E.cjs.map +0 -1
  245. package/dist/chunk-RUHKBEFF.js.map +0 -1
  246. package/dist/chunk-SWVGHAYO.js.map +0 -1
  247. package/dist/chunk-UARGJ5IZ.js.map +0 -1
  248. package/dist/chunk-VB2ARGQ6.js.map +0 -1
  249. package/dist/chunk-WGKAOUEQ.cjs.map +0 -1
  250. package/dist/chunk-XROE3CAS.cjs.map +0 -1
  251. package/dist/chunk-ZLDFPVVI.cjs +0 -19
  252. package/dist/chunk-ZLDFPVVI.cjs.map +0 -1
  253. package/dist/chunk-ZNM2LW3D.cjs.map +0 -1
  254. package/dist/chunk-ZZGQRRN7.js.map +0 -1
@@ -30,7 +30,10 @@
30
30
 
31
31
  import { isSeedanceDraftCapable, SEEDANCE_DRAFT_RESOLUTION } from "./seedance-draft.js"
32
32
  import { isFlux2Model } from "./flux2-pricing.js"
33
+ import { MINIMAX_H3_IMAGE_DEFAULT_RESOLUTION, MINIMAX_H3_IMAGE_RESOLUTIONS } from "./minimax-h3-image.js"
33
34
  import { isAutoVideoDuration } from "./video-duration-auto.js"
35
+ import type { DeclaredSeedanceTaskType } from "./seedance-task-type.js"
36
+ import { SEEDREAM_5_5_DEFAULT_RESOLUTION, SEEDREAM_5_5_RESOLUTIONS } from "./seedream-5-5.js"
34
37
 
35
38
  export type ModelKind = "image" | "video" | "audio"
36
39
 
@@ -202,15 +205,20 @@ export function isModelMakerId(value: unknown): value is ModelMakerId {
202
205
  }
203
206
 
204
207
  /**
205
- * The maker of a catalog entry, in its wire shape — undefined when its `maker`
206
- * is not a registry id (an entry built at run time without one). Never throws,
207
- * so one bad entry cannot fail a whole model listing.
208
+ * The maker of a catalog entry, in its wire shape — undefined for a model
209
+ * offered under the deployment's own label (`ownLabel`, which names none —
210
+ * even an entry built at run time, or by a JavaScript caller, that also names a
211
+ * maker) and when its `maker` is not a registry id (an entry built at run time
212
+ * without one). Never throws, so one bad entry cannot fail a whole model
213
+ * listing.
208
214
  */
209
- export function modelMakerOf(entry: Pick<ModelCatalogEntry, "maker">): ModelMaker | undefined {
215
+ export function modelMakerOf(entry: Pick<ModelCatalogEntry, "maker" | "ownLabel">): ModelMaker | undefined {
216
+ if (entry.ownLabel === true) return undefined
210
217
  return isModelMakerId(entry.maker) ? { id: entry.maker, name: MODEL_MAKERS[entry.maker].name } : undefined
211
218
  }
212
219
 
213
- export interface ModelCatalogEntry {
220
+ /** Every field of a catalog entry but who it is offered under (`maker` / `ownLabel`, {@link ModelCatalogEntry}). */
221
+ export interface ModelCatalogEntryFields {
214
222
  id: string
215
223
  kind: ModelKind
216
224
  /**
@@ -223,12 +231,6 @@ export interface ModelCatalogEntry {
223
231
  modes: readonly ModelMode[]
224
232
  /** Vendor / lab that produced the model. Used for UI grouping. */
225
233
  family: string
226
- /**
227
- * The company that made the model (see {@link MODEL_MAKERS}). REQUIRED, so a
228
- * new model cannot ship without one; every model of a `family` names the same
229
- * maker.
230
- */
231
- maker: ModelMakerId
232
234
  /** Display name (NOT the id — the id is the API enum value). */
233
235
  label: string
234
236
  /**
@@ -291,8 +293,10 @@ export interface ModelCatalogEntry {
291
293
  * `"voice-references"` (video models only) means the model takes each
292
294
  * reference AUDIO clip as a VOICE sample — who speaks and how they sound —
293
295
  * and makes its own soundtrack, rather than conditioning on the audio itself
294
- * (Kling 4.0: KIE `voices`, `@VoiceN` in the prompt). The editor names that
295
- * input "Voice Refs" for such a model.
296
+ * (Kling 4.0: KIE `voices`, `@VoiceN` in the prompt; Kling 4.0 Flash: each
297
+ * clip is a wired character's voice, KIE `elements[].voice_url` — see
298
+ * `audioBindsToCharacters`). The editor names that input "Voice Refs" for
299
+ * such a model.
296
300
  *
297
301
  * `"audio-soundtrack"` (video models only) means the platform can play the
298
302
  * model's FIRST reference audio clip as the result's soundtrack: it sends
@@ -327,6 +331,24 @@ export interface ModelCatalogEntry {
327
331
  * as before. "auto" stays in `aspectRatios`, so every menu still offers it.
328
332
  */
329
333
  autoAspectFromSourceImage?: true
334
+ /**
335
+ * The provider's endpoint refuses an aspect ratio this model does not list.
336
+ * Set only when that was read from the provider's own schema: a ratio field
337
+ * marked required, with a closed list (Seedream 5.5: text to image requires
338
+ * one of its eight ratios and has no "auto"; its edit takes "auto" and the
339
+ * same eight; docs.kie.ai/market/seedream/5-5-text-to-image.md and
340
+ * 5-5-image-to-image.md). The lanes that pass a stored ratio straight on (a
341
+ * Scene, a surround continuation) move a ratio such a model does not list to
342
+ * the nearest one it does, checked against the model the request reaches
343
+ * (`aspectRatioForStrictModel` in the backend), and send every other model's
344
+ * ratio exactly as stored.
345
+ *
346
+ * A ratio missing from `aspectRatios` is NOT evidence the provider refuses
347
+ * it. Measured 2026-11-11: the provider rendered 21:9 (1916×821) and 4:5
348
+ * (1122×1402) for GPT Image 2, whose list names neither. Do not set this flag
349
+ * from a catalog list alone, and do not snap those lanes for every model.
350
+ */
351
+ strictAspectRatios?: true
330
352
  /**
331
353
  * The pixel size (width, height) this model renders at each aspect ratio and
332
354
  * size, from the provider's own table, for a PNG, JPEG or WebP. Read where a
@@ -373,6 +395,16 @@ export interface ModelCatalogEntry {
373
395
  * the two cannot drift.
374
396
  */
375
397
  unlistedResolutionRendersAs?: string
398
+ /**
399
+ * The resolutions (catalog spelling) at which this video model takes a start
400
+ * frame ONLY: no end frame, no loop and no in-between frames beside it. A run
401
+ * that would send any of them at such a resolution is refused before any
402
+ * credits are held, with one sentence (`videoStartFrameOnlyProblem`), on the
403
+ * API routes, the workflow run and the editor's Run; the editor offers the
404
+ * resolution only while nothing but a start frame is wired. Declared from the
405
+ * provider's own refusal, never guessed.
406
+ */
407
+ startFrameOnlyResolutions?: readonly string[]
376
408
  qualities?: readonly string[]
377
409
  /**
378
410
  * The quality a run renders at when none is named, where that is not the
@@ -430,6 +462,16 @@ export interface ModelCatalogEntry {
430
462
  * the longest clip and settled on the delivered one.
431
463
  */
432
464
  autoDuration?: boolean
465
+ /**
466
+ * The reference task types this model accepts as a declaration (see
467
+ * `SEEDANCE_REFERENCE_TASK_TYPES`): what the request's reference media is for
468
+ * — a `reference`, an `edit` of the reference video, or an `extend` of it.
469
+ * The list is what is honoured: `resolveSeedanceTaskType` declares only a
470
+ * value listed here, and anything else runs as Auto. Absent or empty: the
471
+ * model takes no such declaration and the provider guesses from the prompt.
472
+ * `supportsReferenceTaskType` says whether the list is non-empty.
473
+ */
474
+ referenceTaskTypes?: readonly DeclaredSeedanceTaskType[]
433
475
  /**
434
476
  * The model takes NO seed: its provider schema has none, so a seed the
435
477
  * request carries is dropped before the provider call and repeat runs vary.
@@ -479,6 +521,23 @@ export interface ModelCatalogEntry {
479
521
  tts?: TtsCapabilities
480
522
  }
481
523
 
524
+ /**
525
+ * Who a model is offered under — exactly one of:
526
+ *
527
+ * - `maker`: the company that made it (see {@link MODEL_MAKERS}). Every model
528
+ * names one unless it is marked `ownLabel`, so a new model cannot ship
529
+ * without saying whose it is; every model of a `family` names the same maker.
530
+ * - `ownLabel: true`: the model is offered under the deployment's own label and
531
+ * names no maker (decided 2026-11-11). `GET /v1/models` leaves `maker` out
532
+ * for it and returns `logoUrl: null`; MCP `list_models` leaves `maker` out (it
533
+ * never carries `logoUrl`); a client shows no maker. Such a model may not
534
+ * carry a `maker` (`model-makers.test.ts`).
535
+ */
536
+ export type ModelCatalogEntry = ModelCatalogEntryFields & (
537
+ | { maker: ModelMakerId; ownLabel?: never }
538
+ | { ownLabel: true; maker?: never }
539
+ )
540
+
482
541
  /**
483
542
  * Editorial recommendations — short "best for X" picks Claude can echo back
484
543
  * to the user when they don't know which model to use. Surfaces as a "Quick
@@ -500,6 +559,7 @@ export const MODEL_RECOMMENDATIONS: readonly ModelRecommendation[] = [
500
559
  { intent: "highest fidelity image", modelIds: ["gpt-image-2", "gpt-image-2-6-sunburst", "imagen4-ultra"], note: "GPT Image 2 for characters and identity; GPT Image 2.6 Sunburst for wide or in-between ratios GPT Image 2 can't draw." },
501
560
  { intent: "image edit / restyle", modelIds: ["gpt-image-2-6-flare-i2i", "gpt-image-2-i2i", "seedream-5-pro-i2i"], note: "GPT Image 2.6 Flare changes what you ask and keeps the rest; GPT Image 2 i2i for identity-critical edits; Seedream 5 Pro for instruction-based edits." },
502
561
  { intent: "highest-resolution image", modelIds: ["topaz-image-upscale", "gpt-image-2", "gpt-image-2-6-sunburst"], note: "Generate at the model's top tier, then Topaz upscale 4x (Topaz's only lever is the 1x/2x/4x factor)." },
562
+ { intent: "upscale an image with text, labels or logos", modelIds: ["nodaro-image-upscale"], note: "Keeps lettering exactly as written. 1x enhances at the same size; up to 8x. Priced by the output's size, so a small picture costs little." },
503
563
  { intent: "background removal / cutout", modelIds: ["recraft-remove-bg"], note: "Cheap, no prompt needed." },
504
564
  // video
505
565
  { 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." },
@@ -610,6 +670,21 @@ const GPT_IMAGE_2_6_SVG_LEVELS = ["standard", "detailed", "max"] as const
610
670
  const IMAGEN4_RATIOS = ["1:1", "16:9", "9:16", "4:3", "3:4"] as const
611
671
  const IDEOGRAM_RATIOS = ["1:1", "16:9", "9:16", "4:3", "3:4"] as const
612
672
  const SEEDREAM_RATIOS = ["1:1", "16:9", "9:16", "4:3", "3:4", "3:2", "2:3", "21:9"] as const
673
+ // MiniMax H3 Image: ten fixed ratios at every size, and "auto" — listed last, so
674
+ // a fallback that takes the first ratio never lands on it
675
+ // (docs.kie.ai/market/minimax-h3/text-to-image + image-edit).
676
+ const MINIMAX_H3_IMAGE_RATIOS = ["1:1", "16:9", "9:16", "4:3", "3:4", "3:2", "2:3", "5:4", "4:5", "21:9", "auto"] as const
677
+ // Seedream 5.5 (docs.kie.ai/market/seedream/5-5-{text,image}-to-image): the
678
+ // text-to-image endpoint REQUIRES a real ratio, the eight above; the edit
679
+ // endpoint takes the same eight plus `auto`, its own default (listed first, as
680
+ // on the GPT Image edits, so a stale ratio on an edit falls back to keeping the
681
+ // photo's shape rather than to a fixed one).
682
+ const SEEDREAM_5_5_I2I_RATIOS = ["auto", ...SEEDREAM_RATIOS] as const
683
+ // Its sizes (KIE's `size`), the default being 2K (`SEEDREAM_5_5_DEFAULT_RESOLUTION`),
684
+ // a background setting (transparent only with PNG: TRANSPARENT_OUTPUT_FORMATS
685
+ // moves it to auto with JPEG), and PNG (its default) or JPEG.
686
+ const SEEDREAM_5_5_BACKGROUNDS = ["auto", "opaque", "transparent"] as const
687
+ const SEEDREAM_5_5_FORMATS = ["png", "jpeg"] as const
613
688
  const Z_IMAGE_RATIOS = ["1:1", "16:9", "9:16", "4:3", "3:4"] as const
614
689
 
615
690
  const VIDEO_RATIOS_HV = ["16:9", "9:16"] as const
@@ -1651,6 +1726,121 @@ const IMAGE_MODELS: Record<string, ModelCatalogEntry> = {
1651
1726
  resolutions: ["1K", "2K"],
1652
1727
  pricing: [{ identifier: "seedream-5-flash-i2i", credits: 10, note: "1K / 2K flat" }],
1653
1728
  },
1729
+ // Seedream 5.5 — a different model from Seedream 5 Lite, Pro and Flash, priced
1730
+ // by its size (1K and 1.5K the same, 2K dearer) and, on an edit, by each input
1731
+ // image (the rows are `ee/billing/seedream-5-5-pricing.ts`).
1732
+ // See: docs.kie.ai/market/seedream/5-5-text-to-image.md
1733
+ // docs.kie.ai/market/seedream/5-5-image-to-image.md
1734
+ "seedream-5-5": {
1735
+ id: "seedream-5-5",
1736
+ kind: "image",
1737
+ modes: ["t2i"] as const,
1738
+ family: "Bytedance",
1739
+ maker: "bytedance",
1740
+ label: "Seedream 5.5",
1741
+ series: "Seedream",
1742
+ description: "Seedream 5.5 - more natural light, materials and skin, and dense small text that stays readable. A transparent background in one step, PNG or JPEG, at 1K, 1.5K or 2K (the default); 1K and 1.5K cost the same.",
1743
+ useCases: ["realistic", "typography", "product", "transparent"],
1744
+ features: ["reference-image"],
1745
+ aspectRatios: SEEDREAM_RATIOS,
1746
+ strictAspectRatios: true,
1747
+ resolutions: SEEDREAM_5_5_RESOLUTIONS,
1748
+ defaultResolution: SEEDREAM_5_5_DEFAULT_RESOLUTION,
1749
+ backgrounds: SEEDREAM_5_5_BACKGROUNDS,
1750
+ outputFormats: SEEDREAM_5_5_FORMATS,
1751
+ pricing: [
1752
+ { identifier: "seedream-5-5", credits: 16, note: "2K default" },
1753
+ { identifier: "seedream-5-5:1K", credits: 9, note: "1K" },
1754
+ { identifier: "seedream-5-5:1.5K", credits: 9, note: "1.5K, the same as 1K" },
1755
+ { identifier: "seedream-5-5:2K", credits: 16, note: "2K" },
1756
+ ],
1757
+ },
1758
+ "seedream-5-5-i2i": {
1759
+ id: "seedream-5-5-i2i",
1760
+ kind: "image",
1761
+ modes: ["i2i"] as const,
1762
+ family: "Bytedance",
1763
+ maker: "bytedance",
1764
+ label: "Seedream 5.5 (I2I)",
1765
+ series: "Seedream",
1766
+ description: "Seedream 5.5 edits - change what you ask, round after round, and the rest of the picture stays as it was. Up to 10 input images, priced per image; a transparent background, PNG or JPEG, at 1K, 1.5K or 2K (the default).",
1767
+ useCases: ["edit", "iteration", "transparent"],
1768
+ features: ["reference-image"],
1769
+ aspectRatios: SEEDREAM_5_5_I2I_RATIOS,
1770
+ strictAspectRatios: true,
1771
+ resolutions: SEEDREAM_5_5_RESOLUTIONS,
1772
+ defaultResolution: SEEDREAM_5_5_DEFAULT_RESOLUTION,
1773
+ backgrounds: SEEDREAM_5_5_BACKGROUNDS,
1774
+ outputFormats: SEEDREAM_5_5_FORMATS,
1775
+ pricing: [
1776
+ { identifier: "seedream-5-5-i2i", credits: 20, note: "2K, one input image (the default)" },
1777
+ { identifier: "seedream-5-5-i2i:1K:1ref", credits: 13, note: "1K, one input image (the least)" },
1778
+ { identifier: "seedream-5-5-i2i:1.5K:1ref", credits: 13, note: "1.5K, one input image" },
1779
+ { identifier: "seedream-5-5-i2i:2K:1ref", credits: 20, note: "2K, one input image" },
1780
+ { identifier: "seedream-5-5-i2i:1K:10ref", credits: 45, note: "1K, ten input images" },
1781
+ { identifier: "seedream-5-5-i2i:2K:10ref", credits: 52, note: "2K, ten input images (the most)" },
1782
+ ],
1783
+ },
1784
+
1785
+ // ── MiniMax H3 Image ──
1786
+ // MiniMax's H3 image model (KIE `minimax-h3/text-to-image` and
1787
+ // `minimax-h3/image-edit`). Not the H3 video model `minimax-h3`. A prompt
1788
+ // runs the text-to-image id; with reference images the run moves to the
1789
+ // edit id (`T2I_TO_I2I_VARIANT`). Priced by size, 1K and 2K the same, and an
1790
+ // edit by its reference images (`minimaxH3ImageCreditId`). "auto" is listed
1791
+ // LAST so a fallback that takes the first ratio lands on a real one: from a
1792
+ // prompt KIE's rewriter picks the ratio, in an edit it follows the first
1793
+ // reference image. KIE's prompt expansion is left on and its custom
1794
+ // width/height is not offered.
1795
+ // See: docs.kie.ai/market/minimax-h3/text-to-image.md
1796
+ // docs.kie.ai/market/minimax-h3/image-edit.md
1797
+ "minimax-h3-image": {
1798
+ id: "minimax-h3-image",
1799
+ kind: "image",
1800
+ modes: ["t2i"] as const,
1801
+ family: "MiniMax",
1802
+ maker: "minimax",
1803
+ label: "MiniMax H3 Image",
1804
+ series: "MiniMax Image",
1805
+ description: "MiniMax H3 Image: detailed pictures up to about 16 MP at 4K, with readable text inside the picture. Ten shapes plus auto, the same price at 1K and 2K (2K by default), PNG or JPEG.",
1806
+ useCases: ["typography", "high-res", "general"],
1807
+ features: ["reference-image"],
1808
+ aspectRatios: MINIMAX_H3_IMAGE_RATIOS,
1809
+ resolutions: MINIMAX_H3_IMAGE_RESOLUTIONS,
1810
+ defaultResolution: MINIMAX_H3_IMAGE_DEFAULT_RESOLUTION,
1811
+ outputFormats: ["png", "jpeg"],
1812
+ pricing: [
1813
+ { identifier: "minimax-h3-image", credits: 5, note: "2K default" },
1814
+ { identifier: "minimax-h3-image:1K", credits: 5, note: "1K" },
1815
+ { identifier: "minimax-h3-image:2K", credits: 5, note: "2K" },
1816
+ { identifier: "minimax-h3-image:4K", credits: 14, note: "4K" },
1817
+ ],
1818
+ },
1819
+ "minimax-h3-image-i2i": {
1820
+ id: "minimax-h3-image-i2i",
1821
+ kind: "image",
1822
+ modes: ["i2i"] as const,
1823
+ family: "MiniMax",
1824
+ maker: "minimax",
1825
+ label: "MiniMax H3 Image (I2I)",
1826
+ series: "MiniMax Image",
1827
+ description: "MiniMax H3 Image edits: change or combine up to 16 reference images in one edit, with readable text, up to about 16 MP at 4K. Priced by size and by reference image; auto keeps the first image's shape.",
1828
+ useCases: ["edit", "typography", "multi-reference"],
1829
+ features: ["reference-image"],
1830
+ aspectRatios: MINIMAX_H3_IMAGE_RATIOS,
1831
+ resolutions: MINIMAX_H3_IMAGE_RESOLUTIONS,
1832
+ defaultResolution: MINIMAX_H3_IMAGE_DEFAULT_RESOLUTION,
1833
+ outputFormats: ["png", "jpeg"],
1834
+ pricing: [
1835
+ { identifier: "minimax-h3-image-i2i", credits: 6, note: "2K, one reference image" },
1836
+ { identifier: "minimax-h3-image-i2i:1K:1ref", credits: 6, note: "1K, one reference image (the least)" },
1837
+ { identifier: "minimax-h3-image-i2i:2K:1ref", credits: 6, note: "2K, one reference image" },
1838
+ { identifier: "minimax-h3-image-i2i:2K:4ref", credits: 10, note: "2K, four reference images" },
1839
+ { identifier: "minimax-h3-image-i2i:4K:1ref", credits: 15, note: "4K, one reference image" },
1840
+ { identifier: "minimax-h3-image-i2i:2K:16ref", credits: 25, note: "2K, sixteen reference images" },
1841
+ { identifier: "minimax-h3-image-i2i:4K:16ref", credits: 34, note: "4K, sixteen reference images (the most)" },
1842
+ ],
1843
+ },
1654
1844
 
1655
1845
  // ── Alibaba Qwen ──
1656
1846
  "qwen": {
@@ -1859,6 +2049,28 @@ const IMAGE_MODELS: Record<string, ModelCatalogEntry> = {
1859
2049
  { identifier: "topaz-image-upscale:4K", credits: 50, note: "4x (legacy identifier)" },
1860
2050
  ],
1861
2051
  },
2052
+ "nodaro-image-upscale": {
2053
+ id: "nodaro-image-upscale",
2054
+ kind: "image",
2055
+ modes: ["upscale"] as const,
2056
+ family: "Nodaro Upscale",
2057
+ ownLabel: true,
2058
+ label: "Nodaro Image Upscale",
2059
+ series: "Nodaro Upscale",
2060
+ description: "Image upscale at 1x (enhance only), 2x, 4x or 8x. Restores detail and keeps lettering exactly as written; the output is the input times the factor, nothing cropped. Priced by the output's size.",
2061
+ useCases: ["upscale", "high-res", "typography", "utility"],
2062
+ features: ["reference-image"],
2063
+ // No `resolutions`: the one lever is the upscale factor (`NODARO_IMAGE_UPSCALE_FACTORS`).
2064
+ // The price follows the OUTPUT's total pixels (`@nodaro/render-rules`
2065
+ // nodaro-image-upscale-pricing.ts); the bare id is the hold when the image's size
2066
+ // cannot be read before the run, settled to the delivered output's tier.
2067
+ pricing: [
2068
+ { identifier: "nodaro-image-upscale:2K", credits: 4, note: "output up to 4,194,304 pixels (2048 × 2048)" },
2069
+ { identifier: "nodaro-image-upscale:4K", credits: 10, note: "output up to 16,777,216 pixels (4096 × 4096)" },
2070
+ { identifier: "nodaro-image-upscale:8K", credits: 30, note: "output up to 67,108,864 pixels (8192 × 8192)" },
2071
+ { identifier: "nodaro-image-upscale", credits: 30, note: "held when the image's size cannot be read before the run; the output's tier is charged" },
2072
+ ],
2073
+ },
1862
2074
  }
1863
2075
 
1864
2076
  // =============================================================================
@@ -2325,6 +2537,49 @@ const VIDEO_MODELS: Record<string, ModelCatalogEntry> = {
2325
2537
  { identifier: "kling-4-keyframes:30s:1080p", credits: 3190, note: "30s 1080p (max)" },
2326
2538
  ],
2327
2539
  },
2540
+ // Kling 4.0 Flash — ONE id over KIE's two Flash endpoints, picked by what is
2541
+ // wired (backend kie/kling4.ts): a start frame alone runs on
2542
+ // docs.kie.ai/market/kling/v4-flash-keyframe-to-video, where it is the exact
2543
+ // opening frame; everything else (text, reference images, videos,
2544
+ // characters, or a start frame beside any of them) runs on
2545
+ // docs.kie.ai/market/kling/v4-flash-reference-to-video, where a start frame
2546
+ // joins the reference images as on kling-4. Reference: up to 10 images, 5
2547
+ // videos (2-20s together) and 7 characters (15 in all). No standalone voices:
2548
+ // audio clip N becomes wired character N's voice when that character has 2-4
2549
+ // images (otherwise the clip is dropped). No end
2550
+ // frame, no 1080p, no seed. 3-20s, 720p, native audio always on. Per-second
2551
+ // billing; a reference-video run bills its input seconds too.
2552
+ "kling-4-flash": {
2553
+ id: "kling-4-flash",
2554
+ kind: "video",
2555
+ modes: ["i2v", "t2v"] as const,
2556
+ family: "Kuaishou",
2557
+ maker: "kuaishou",
2558
+ label: "Kling 4.0 Flash",
2559
+ series: "Kling",
2560
+ description: "Kling 4.0 Flash — the faster, lower-cost Kling 4.0 at 720p, up to 20s with native audio; a start frame, reference images, videos and characters (each can carry a voice clip), or plain text.",
2561
+ useCases: ["fast", "cheap", "narrative", "reference"],
2562
+ // No `voices` array on Flash: a reference audio clip is a character's voice
2563
+ // (`voice-references` names that input "Voice Refs"). No `audio-soundtrack`
2564
+ // (the clips are voices, never a soundtrack), no `end-frame`, no
2565
+ // `video-reference` (the generate-video-pro extend chain is unwired, as on
2566
+ // kling-4).
2567
+ features: ["audio", "reference-image", "reference-to-video", "character-subjects", "voice-references"],
2568
+ aspectRatios: VIDEO_RATIOS_KLING_4,
2569
+ durations: [3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20],
2570
+ defaultDuration: 5,
2571
+ resolutions: ["720p"],
2572
+ unlistedResolutionRendersAs: "720p",
2573
+ noSeed: true, // neither Flash schema has a `seed` (additionalProperties: false)
2574
+ pricing: [
2575
+ { identifier: "kling-4-flash", credits: 220, note: "default 5s 720p — see :Ns:720p variants for exact" },
2576
+ { identifier: "kling-4-flash:5s:720p", credits: 220, note: "5s 720p (the default tier)" },
2577
+ { identifier: "kling-4-flash:3s:720p", credits: 130, note: "3s 720p (min)" },
2578
+ { identifier: "kling-4-flash:10s:720p", credits: 430, note: "10s 720p" },
2579
+ { identifier: "kling-4-flash:20s:720p", credits: 850, note: "20s 720p (max)" },
2580
+ { identifier: "kling-4-flash:8s:720p-ref", credits: 230, note: "per-second anchor with a reference video: billed × (output + max(output, input seconds)) ÷ 8" },
2581
+ ],
2582
+ },
2328
2583
 
2329
2584
  // ── xAI Grok video ──
2330
2585
  "grok-i2v": {
@@ -2349,35 +2604,49 @@ const VIDEO_MODELS: Record<string, ModelCatalogEntry> = {
2349
2604
  { identifier: "grok-i2v:15s", credits: 100 },
2350
2605
  ],
2351
2606
  },
2352
- // xAI Grok Imagine Video 1.5 — KIE image-to-video (image required). True
2353
- // per-second billing split 480p/720p. modes:["i2v"] is the honest capability;
2354
- // it's also surfaced in the text-to-video dropdown for the unified node, where
2355
- // the t2v route returns a clean "requires an input image" 400.
2607
+ // xAI Grok Imagine Video 1.5 — KIE image-to-video
2608
+ // (docs.kie.ai/market/grok-imagine/1-5-preview), built by the backend's
2609
+ // bespoke runner (kie/grok-video-15.ts). The start frame is the exact first
2610
+ // frame and an end frame the exact last frame; one picture wired as both is a
2611
+ // seamless loop (KIE `loop_url`). The Image References are up to 4
2612
+ // in-between frames (KIE `keyframes`), spread evenly over the clip at whole
2613
+ // seconds — frames only, never loose references, so `keyframes` is declared
2614
+ // (it also keeps the model out of generate-video-pro, whose segments would
2615
+ // send cast references as frames). modes:["i2v"] and no `reference-to-video`:
2616
+ // every run needs its start image, in-between frames included. It is also
2617
+ // surfaced in the text-to-video dropdown for the unified node, where the t2v
2618
+ // route returns a clean "requires an input image" 400. Per-second billing by
2619
+ // resolution, with no per-image part.
2356
2620
  "grok-imagine-video-1.5": {
2357
2621
  id: "grok-imagine-video-1.5",
2358
2622
  kind: "video",
2359
2623
  modes: ["i2v"] as const,
2360
- // No `reference-image` (locked by video-reference-features.test.ts, 2026-06-28
2361
- // audit): KIE's grok-imagine endpoint accepts a single image_url (the i2v
2362
- // start frame) only — there is no reference transport, so advertising the
2363
- // feature let the editor attach refs that were silently dropped at the
2364
- // provider. Also kept OUT of VIDEO_REF_LIMITS_BY_PROVIDER for the same reason.
2624
+ features: ["end-frame", "reference-image", "keyframes"],
2365
2625
  family: "xAI",
2366
2626
  maker: "xai",
2367
2627
  label: "Grok Imagine Video 1.5",
2368
2628
  series: "Grok",
2369
- description: "Grok Imagine 1.5 image-to-video — 1–15s, 480p/720p, per-second pricing. Requires an input image.",
2629
+ description: "Grok Imagine Video 1.5 — 1–15s at 480p, 720p or 1080p, per-second pricing. An exact first and last frame (the same image as both makes a seamless loop) and up to 4 in-between frames. Requires an input image.",
2370
2630
  useCases: ["stylized", "motion"],
2371
2631
  aspectRatios: ["16:9", "9:16", "1:1", "4:3", "3:4"],
2372
2632
  durations: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15],
2373
2633
  defaultDuration: 8,
2374
- resolutions: ["480p", "720p"],
2634
+ resolutions: ["480p", "720p", "1080p"],
2635
+ // normalizeGrokVideo15Resolution sends 480p for anything off the list.
2636
+ unlistedResolutionRendersAs: "480p",
2637
+ // KIE refuses 1080p beside anything but a lone start frame ("1080p is only
2638
+ // supported for text-to-video or a single image used as the first frame",
2639
+ // a staging run 2026-11-12): no end frame, loop or in-between frames.
2640
+ startFrameOnlyResolutions: ["1080p"],
2641
+ noSeed: true, // the KIE schema has no `seed` (additionalProperties: false)
2375
2642
  pricing: [
2376
- { identifier: "grok-imagine-video-1.5", credits: 295, note: "default 8s 480p — see :Ns:res variants" },
2377
- { identifier: "grok-imagine-video-1.5:8s:480p", credits: 300, note: "8s 480p" },
2378
- { identifier: "grok-imagine-video-1.5:8s:720p", credits: 510, note: "8s 720p" },
2379
- { identifier: "grok-imagine-video-1.5:15s:480p", credits: 550, note: "15s 480p (max)" },
2380
- { identifier: "grok-imagine-video-1.5:15s:720p", credits: 950, note: "15s 720p (max)" },
2643
+ { identifier: "grok-imagine-video-1.5", credits: 50, note: "default 8s 480p — see :Ns:res variants" },
2644
+ { identifier: "grok-imagine-video-1.5:8s:480p", credits: 50, note: "8s 480p" },
2645
+ { identifier: "grok-imagine-video-1.5:8s:720p", credits: 90, note: "8s 720p" },
2646
+ { identifier: "grok-imagine-video-1.5:8s:1080p", credits: 160, note: "8s 1080p" },
2647
+ { identifier: "grok-imagine-video-1.5:15s:480p", credits: 90, note: "15s 480p (max)" },
2648
+ { identifier: "grok-imagine-video-1.5:15s:720p", credits: 170, note: "15s 720p (max)" },
2649
+ { identifier: "grok-imagine-video-1.5:15s:1080p", credits: 300, note: "15s 1080p (max)" },
2381
2650
  ],
2382
2651
  },
2383
2652
 
@@ -2485,6 +2754,7 @@ const VIDEO_MODELS: Record<string, ModelCatalogEntry> = {
2485
2754
  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],
2486
2755
  defaultDuration: 8,
2487
2756
  autoDuration: true,
2757
+ referenceTaskTypes: ["reference", "edit", "extend"],
2488
2758
  resolutions: ["480p", "720p", "1080p"],
2489
2759
  // KIE refuses a seed on Seedance 2.5 (422) — the provider config omits it.
2490
2760
  noSeed: true,
@@ -3042,24 +3312,45 @@ const VIDEO_MODELS: Record<string, ModelCatalogEntry> = {
3042
3312
  useCases: ["extend"],
3043
3313
  pricing: [{ identifier: "runway-extend", credits: 320 }],
3044
3314
  },
3045
- "seedance-2-extend": {
3046
- id: "seedance-2-extend",
3315
+ // Seedance extends ANY video, one provider per model. Each is priced on its
3316
+ // own rows (`seedanceExtendCreditId`), one per second added and resolution.
3317
+ // The earlier single id `seedance-2-extend` is retired and runs as Seedance 2.5.
3318
+ "seedance-2-5-extend": {
3319
+ id: "seedance-2-5-extend",
3320
+ kind: "video",
3321
+ modes: ["extend"] as const,
3322
+ family: "Bytedance",
3323
+ maker: "bytedance",
3324
+ label: "Seedance 2.5 Extend",
3325
+ series: "Seedance",
3326
+ description: "Extend ANY video with Seedance 2.5: 4–30s continuation (audio included), stitched into one seamless clip.",
3327
+ useCases: ["extend"],
3328
+ 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],
3329
+ defaultDuration: 8,
3330
+ resolutions: ["480p", "720p", "1080p"],
3331
+ pricing: [
3332
+ { identifier: "seedance-2-5-extend:8s:720p", credits: 950, note: "default 8s 720p — see :Ns:res variants for exact" },
3333
+ { identifier: "seedance-2-5-extend:8s:480p", credits: 425, note: "8s 480p" },
3334
+ { identifier: "seedance-2-5-extend:8s:1080p", credits: 2375, note: "8s 1080p" },
3335
+ ],
3336
+ },
3337
+ "seedance-2-0-extend": {
3338
+ id: "seedance-2-0-extend",
3047
3339
  kind: "video",
3048
3340
  modes: ["extend"] as const,
3049
3341
  family: "Bytedance",
3050
3342
  maker: "bytedance",
3051
- label: "Seedance 2 Extend",
3343
+ label: "Seedance 2.0 Extend",
3052
3344
  series: "Seedance",
3053
- description: "Extend ANY video: generates the continuation (audio included) and trim-stitches it into one seamless clip.",
3345
+ description: "Extend ANY video with Seedance 2.0: 4–15s continuation (audio included), stitched into one seamless clip.",
3054
3346
  useCases: ["extend"],
3055
3347
  durations: [4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15],
3056
3348
  defaultDuration: 8,
3057
3349
  resolutions: ["480p", "720p", "1080p"],
3058
3350
  pricing: [
3059
- { identifier: "seedance-2-extend", credits: 530, note: "default 8s 720p (ref-mode 50 + 3 stitch) — see :NsR variants" },
3060
- { identifier: "seedance-2-extend:8s:480p", credits: 260, note: "8s 480p (23+3)" },
3061
- { identifier: "seedance-2-extend:8s:720p", credits: 530, note: "8s 720p (50+3)" },
3062
- { identifier: "seedance-2-extend:8s:1080p", credits: 780, note: "8s 1080p (75+3)" },
3351
+ { identifier: "seedance-2-0-extend:8s:720p", credits: 625, note: "default 8s 720p — see :Ns:res variants for exact" },
3352
+ { identifier: "seedance-2-0-extend:8s:480p", credits: 288, note: "8s 480p" },
3353
+ { identifier: "seedance-2-0-extend:8s:1080p", credits: 1550, note: "8s 1080p" },
3063
3354
  ],
3064
3355
  },
3065
3356
  "veo-1080p": {
@@ -4303,6 +4594,31 @@ export function isAutoAspectToken(value: unknown): boolean {
4303
4594
  return typeof value === "string" && value.trim().toLowerCase() === "auto"
4304
4595
  }
4305
4596
 
4597
+ /**
4598
+ * True for the video request's "Auto" ratio — the unified node's
4599
+ * provider-agnostic token — in exactly the spellings a video provider adapter
4600
+ * receives it as (`"Auto"`, `"auto"`). Narrower than {@link isAutoAspectToken}
4601
+ * on purpose: it is the wire rule's own match, so a reader of it agrees with
4602
+ * what is sent.
4603
+ */
4604
+ export function isVideoAutoAspectToken(value: string | undefined): boolean {
4605
+ return value === "Auto" || value === "auto"
4606
+ }
4607
+
4608
+ /**
4609
+ * The ratio a video model runs the "Auto" token ({@link isVideoAutoAspectToken})
4610
+ * at: `"adaptive"` (match the input) when the request has a visual input to
4611
+ * match — a frame, a reference image or a reference video — and the model's
4612
+ * catalog lists `"adaptive"`; otherwise `undefined`, and the provider adapter
4613
+ * sends its own fixed default. The ONE mapping: the KIE adapter sends what it
4614
+ * says, and the Seedance reference task type resolver reads it to tell a ratio
4615
+ * it would replace from one that already runs at the ratio it forces.
4616
+ */
4617
+ export function videoAutoAspectRunsAt(modelId: string | undefined, hasVisualInput: boolean): "adaptive" | undefined {
4618
+ if (!hasVisualInput || !modelId) return undefined
4619
+ return MODEL_CATALOG[modelId]?.aspectRatios?.includes("adaptive") ? "adaptive" : undefined
4620
+ }
4621
+
4306
4622
  function usableSize(size: SourceImageSize | undefined): size is SourceImageSize {
4307
4623
  return (
4308
4624
  size !== undefined &&
@@ -5005,6 +5321,8 @@ const MODEL_VALUE_LABELS: Record<string, string> = {
5005
5321
  "adaptive": "Adaptive",
5006
5322
  // image resolutions
5007
5323
  "1K": "1K (Standard)",
5324
+ // Only Seedream 5.5 lists it.
5325
+ "1.5K": "1.5K (Medium)",
5008
5326
  "2K": "2K (High)",
5009
5327
  "4K": "4K (Ultra)",
5010
5328
  "4k": "4K",