@@ -49,6 +49,21 @@ const calculateRunwayDurationPrice = (node: LGraphNode): string => {
4949 return `$${ cost } /Run`
5050}
5151
52+ const makeOmniProDurationCalculator =
53+ ( pricePerSecond : number ) : PricingFunction =>
54+ ( node : LGraphNode ) : string => {
55+ const durationWidget = node . widgets ?. find (
56+ ( w ) => w . name === 'duration'
57+ ) as IComboWidget
58+ if ( ! durationWidget ) return `$${ pricePerSecond . toFixed ( 3 ) } /second`
59+
60+ const seconds = parseFloat ( String ( durationWidget . value ) )
61+ if ( ! Number . isFinite ( seconds ) ) return `$${ pricePerSecond . toFixed ( 3 ) } /second`
62+
63+ const cost = pricePerSecond * seconds
64+ return `$${ cost . toFixed ( 2 ) } /Run`
65+ }
66+
5267const pixversePricingCalculator = ( node : LGraphNode ) : string => {
5368 const durationWidget = node . widgets ?. find (
5469 ( w ) => w . name === 'duration_seconds'
@@ -706,6 +721,21 @@ const apiNodeCosts: Record<string, { displayPrice: string | PricingFunction }> =
706721 KlingVirtualTryOnNode : {
707722 displayPrice : '$0.07/Run'
708723 } ,
724+ KlingOmniProTextToVideoNode : {
725+ displayPrice : makeOmniProDurationCalculator ( 0.112 )
726+ } ,
727+ KlingOmniProFirstLastFrameNode : {
728+ displayPrice : makeOmniProDurationCalculator ( 0.112 )
729+ } ,
730+ KlingOmniProImageToVideoNode : {
731+ displayPrice : makeOmniProDurationCalculator ( 0.112 )
732+ } ,
733+ KlingOmniProVideoToVideoNode : {
734+ displayPrice : makeOmniProDurationCalculator ( 0.168 )
735+ } ,
736+ KlingOmniProEditVideoNode : {
737+ displayPrice : '$0.168/second'
738+ } ,
709739 LumaImageToVideoNode : {
710740 displayPrice : ( node : LGraphNode ) : string => {
711741 // Same pricing as LumaVideoNode per CSV
@@ -1880,6 +1910,10 @@ export const useNodePricing = () => {
18801910 KlingDualCharacterVideoEffectNode : [ 'mode' , 'model_name' , 'duration' ] ,
18811911 KlingSingleImageVideoEffectNode : [ 'effect_scene' ] ,
18821912 KlingStartEndFrameNode : [ 'mode' , 'model_name' , 'duration' ] ,
1913+ KlingOmniProTextToVideoNode : [ 'duration' ] ,
1914+ KlingOmniProFirstLastFrameNode : [ 'duration' ] ,
1915+ KlingOmniProImageToVideoNode : [ 'duration' ] ,
1916+ KlingOmniProVideoToVideoNode : [ 'duration' ] ,
18831917 MinimaxHailuoVideoNode : [ 'resolution' , 'duration' ] ,
18841918 OpenAIDalle3 : [ 'size' , 'quality' ] ,
18851919 OpenAIDalle2 : [ 'size' , 'n' ] ,
0 commit comments