@@ -947,6 +947,60 @@ const apiNodeCosts: Record<string, { displayPrice: string | PricingFunction }> =
947
947
948
948
return '$0.0172/Run'
949
949
}
950
+ } ,
951
+ MoonvalleyTxt2VideoNode : {
952
+ displayPrice : ( node : LGraphNode ) : string => {
953
+ const lengthWidget = node . widgets ?. find (
954
+ ( w ) => w . name === 'length'
955
+ ) as IComboWidget
956
+
957
+ if ( ! lengthWidget ) return '$1.50-3.00/Run (varies with length)'
958
+
959
+ const length = String ( lengthWidget . value )
960
+ if ( length === '5s' ) {
961
+ return '$1.50/Run'
962
+ } else if ( length === '10s' ) {
963
+ return '$3.00/Run'
964
+ }
965
+
966
+ return '$1.50/Run'
967
+ }
968
+ } ,
969
+ MoonvalleyImg2VideoNode : {
970
+ displayPrice : ( node : LGraphNode ) : string => {
971
+ const lengthWidget = node . widgets ?. find (
972
+ ( w ) => w . name === 'length'
973
+ ) as IComboWidget
974
+
975
+ if ( ! lengthWidget ) return '$1.50-3.00/Run (varies with length)'
976
+
977
+ const length = String ( lengthWidget . value )
978
+ if ( length === '5s' ) {
979
+ return '$1.50/Run'
980
+ } else if ( length === '10s' ) {
981
+ return '$3.00/Run'
982
+ }
983
+
984
+ return '$1.50/Run'
985
+ }
986
+ } ,
987
+ MoonvalleyVideo2VideoNode : {
988
+ displayPrice : ( node : LGraphNode ) : string => {
989
+ const lengthWidget = node . widgets ?. find (
990
+ ( w ) => w . name === 'length'
991
+ ) as IComboWidget
992
+
993
+ if ( ! lengthWidget ) return '$2.00-4.00/Run (varies with length)'
994
+
995
+ const length = String ( lengthWidget . value )
996
+ if ( length === '5s' ) {
997
+ return '$2.00/Run'
998
+ } else if ( length === '10s' ) {
999
+ return '$4.00/Run'
1000
+ }
1001
+
1002
+ return '$2.00/Run'
1003
+ }
950
1004
}
951
1005
}
952
1006
@@ -1015,7 +1069,10 @@ export const useNodePricing = () => {
1015
1069
RecraftVectorizeImageNode : [ 'n' ] ,
1016
1070
RecraftGenerateColorFromImageNode : [ 'n' ] ,
1017
1071
RecraftGenerateImageNode : [ 'n' ] ,
1018
- RecraftGenerateVectorImageNode : [ 'n' ]
1072
+ RecraftGenerateVectorImageNode : [ 'n' ] ,
1073
+ MoonvalleyTxt2VideoNode : [ 'length' ] ,
1074
+ MoonvalleyImg2VideoNode : [ 'length' ] ,
1075
+ MoonvalleyVideo2VideoNode : [ 'length' ]
1019
1076
}
1020
1077
return widgetMap [ nodeType ] || [ ]
1021
1078
}
0 commit comments