mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-04-21 06:49:37 +00:00
[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:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user