MCPcopy Create free account
hub / github.com/pollinations/pollinations / pricingEntries

Function pricingEntries

packages/sdk/src/models.ts:57–63  ·  view source on GitHub ↗
(
    pricing: ModelCatalogItem["pricing"],
)

Source from the content-addressed store, hash-verified

55 * lives here rather than being re-derived per app.
56 */
57export function pricingEntries(
58 pricing: ModelCatalogItem["pricing"],
59): Array<[label: string, value: string]> {
60 return Object.entries(pricing ?? {})
61 .filter(([key]) => key !== "currency")
62 .map(([key, value]) => [humanizePricingKey(key), value]);
63}
64
65function normalizeModel(model: ModelInfo): ModelCatalogItem | null {
66 const id = model.id ?? model.name;

Callers 1

ModulesPageFunction · 0.90

Calls 1

humanizePricingKeyFunction · 0.85

Tested by

no test coverage detected