@@ -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'
@@ -711,6 +726,21 @@ const apiNodeCosts: Record<string, { displayPrice: string | PricingFunction }> =
711726 KlingVirtualTryOnNode : {
712727 displayPrice : '$0.07/Run'
713728 } ,
729+ KlingOmniProTextToVideoNode : {
730+ displayPrice : makeOmniProDurationCalculator ( 0.112 )
731+ } ,
732+ KlingOmniProFirstLastFrameNode : {
733+ displayPrice : makeOmniProDurationCalculator ( 0.112 )
734+ } ,
735+ KlingOmniProImageToVideoNode : {
736+ displayPrice : makeOmniProDurationCalculator ( 0.112 )
737+ } ,
738+ KlingOmniProVideoToVideoNode : {
739+ displayPrice : makeOmniProDurationCalculator ( 0.168 )
740+ } ,
741+ KlingOmniProEditVideoNode : {
742+ displayPrice : '$0.168/second'
743+ } ,
714744 LumaImageToVideoNode : {
715745 displayPrice : ( node : LGraphNode ) : string => {
716746 // Same pricing as LumaVideoNode per CSV
@@ -1885,6 +1915,10 @@ export const useNodePricing = () => {
18851915 KlingDualCharacterVideoEffectNode : [ 'mode' , 'model_name' , 'duration' ] ,
18861916 KlingSingleImageVideoEffectNode : [ 'effect_scene' ] ,
18871917 KlingStartEndFrameNode : [ 'mode' , 'model_name' , 'duration' ] ,
1918+ KlingOmniProTextToVideoNode : [ 'duration' ] ,
1919+ KlingOmniProFirstLastFrameNode : [ 'duration' ] ,
1920+ KlingOmniProImageToVideoNode : [ 'duration' ] ,
1921+ KlingOmniProVideoToVideoNode : [ 'duration' ] ,
18881922 MinimaxHailuoVideoNode : [ 'resolution' , 'duration' ] ,
18891923 OpenAIDalle3 : [ 'size' , 'quality' ] ,
18901924 OpenAIDalle2 : [ 'size' , 'n' ] ,
0 commit comments