MCPcopy Create free account
hub / github.com/TanStack/ai / buildFalUsage

Function buildFalUsage

packages/ai-fal/src/utils/billing.ts:81–91  ·  view source on GitHub ↗
(
  unitsBilled: number | undefined,
)

Source from the content-addressed store, hash-verified

79 * callers can omit `usage` entirely.
80 */
81export function buildFalUsage(
82 unitsBilled: number | undefined,
83): TokenUsage | undefined {
84 if (unitsBilled == null) return undefined
85 return {
86 promptTokens: 0,
87 completionTokens: 0,
88 totalTokens: 0,
89 unitsBilled,
90 }
91}
92
93/**
94 * Wrap a fetch so every fal request's response is inspected for the

Callers 6

getVideoUrlMethod · 0.90
transformResponseMethod · 0.90
transformResponseMethod · 0.90
transformResponseMethod · 0.90
transformResponseMethod · 0.90
billing.test.tsFile · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected