From 1d18583e4288a247f1cbfe2885217431bd2c0dae Mon Sep 17 00:00:00 2001
From: Alexander Piskun <13381981+bigcat88@users.noreply.github.com>
Date: Sat, 6 Dec 2025 14:15:48 +0200
Subject: [PATCH] feat(api-nodes): add pricing for seedream4.5 (#7189)
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
## Summary
The same logic, with price increased by 25% compared to previous version
of this model.
## Screenshots (if applicable)
┆Issue is synchronized with this [Notion
page](https://www.notion.so/PR-7189-feat-api-nodes-add-pricing-for-seedream4-5-2c06d73d3650817b975cf6dc64cbe084)
by [Unito](https://www.unito.io)
---
src/composables/node/useNodePricing.ts | 35 ++++++++++++++++++--------
1 file changed, 24 insertions(+), 11 deletions(-)
diff --git a/src/composables/node/useNodePricing.ts b/src/composables/node/useNodePricing.ts
index 6a6bf0813..7a3a90056 100644
--- a/src/composables/node/useNodePricing.ts
+++ b/src/composables/node/useNodePricing.ts
@@ -1768,6 +1768,9 @@ const apiNodeCosts: Record =
},
ByteDanceSeedreamNode: {
displayPrice: (node: LGraphNode): string => {
+ const modelWidget = node.widgets?.find(
+ (w) => w.name === 'model'
+ ) as IComboWidget
const sequentialGenerationWidget = node.widgets?.find(
(w) => w.name === 'sequential_image_generation'
) as IComboWidget
@@ -1775,21 +1778,31 @@ const apiNodeCosts: Record =
(w) => w.name === 'max_images'
) as IComboWidget
- if (!sequentialGenerationWidget || !maxImagesWidget)
- return '$0.03/Run ($0.03 for one output image)'
-
- if (
- String(sequentialGenerationWidget.value).toLowerCase() === 'disabled'
- ) {
- return '$0.03/Run'
+ const model = String(modelWidget?.value ?? '').toLowerCase()
+ let pricePerImage = 0.03 // default for seedream-4-0-250828 and fallback
+ if (model.includes('seedream-4-5-251128')) {
+ pricePerImage = 0.04
+ } else if (model.includes('seedream-4-0-250828')) {
+ pricePerImage = 0.03
}
- const maxImages = Number(maxImagesWidget.value)
+ if (!sequentialGenerationWidget || !maxImagesWidget) {
+ return `$${pricePerImage}/Run ($${pricePerImage} for one output image)`
+ }
+
+ const seqMode = String(sequentialGenerationWidget.value).toLowerCase()
+ if (seqMode === 'disabled') {
+ return `$${pricePerImage}/Run`
+ }
+
+ const maxImagesRaw = Number(maxImagesWidget.value)
+ const maxImages =
+ Number.isFinite(maxImagesRaw) && maxImagesRaw > 0 ? maxImagesRaw : 1
if (maxImages === 1) {
- return '$0.03/Run'
+ return `$${pricePerImage}/Run`
}
- const cost = (0.03 * maxImages).toFixed(2)
- return `$${cost}/Run ($0.03 for one output image)`
+ const totalCost = (pricePerImage * maxImages).toFixed(2)
+ return `$${totalCost}/Run ($${pricePerImage} for one output image)`
}
},
ByteDanceTextToVideoNode: {