[API Node] Add cost indicators on API nodes (#3924)

Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Chenlei Hu <huchenlei@proton.me>
This commit is contained in:
Christian Byrne
2025-05-20 18:59:11 -07:00
committed by GitHub
parent 356886dc29
commit f08ec0a981
19 changed files with 506 additions and 6 deletions

View File

@@ -2,3 +2,23 @@ export interface ApiNodeCost {
name: string
cost: number
}
/**
* Information about an API node's cost and pricing details
*/
export interface ApiNodeCostData {
/** The vendor/company providing the API service (e.g., 'OpenAI', 'Stability') */
vendor: string
/** The human-readable name of the node as displayed in the UI */
nodeName: string
/** Parameters that affect pricing (e.g., 'size | quality', 'duration', '-' if none) */
pricingParams: string
/** The price range per run (e.g., '$0.05', '$0.04 x n', 'dynamic') */
pricePerRunRange: string
/** Formatted price string for display in the UI */
displayPrice: string
/** URL to the vendor's pricing documentation page */
rateDocumentationUrl?: string
}
export type ApiNodeCostRecord = Record<string, ApiNodeCostData>