Skip to content

Commit 2c437ac

Browse files
authored
feat(api-nodes-pricing): add prices for Kling O1 video model (#7077)
## Summary Add price badges for the upcoming API nodes. ## Screenshots (if applicable) <img width="1242" height="1094" alt="Screenshot From 2025-12-01 14-03-22" src="https://github.com/user-attachments/assets/8f7909ea-f629-4dde-a075-ca31a9fff2ac" /> ┆Issue is synchronized with this [Notion page](https://www.notion.so/PR-7077-feat-api-nodes-pricing-add-prices-for-Kling-O1-video-model-2bc6d73d36508152843ff96196317ff8) by [Unito](https://www.unito.io)
1 parent b97b21a commit 2c437ac

File tree

1 file changed

+34
-0
lines changed

1 file changed

+34
-0
lines changed

src/composables/node/useNodePricing.ts

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -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+
5267
const 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

Comments
 (0)