No badges yet
No accepted solutions yet
@ai-billing - AI SDK Middleware that returns usage in dollars
# Installation ```bash npm install @ai-billing/core @ai-billing/openrouter # Example for OpenRouter ``` ## Full-stack @ai-billing examples | Name | Demo Link | Repo | Deploy | |...
@ai-billing - AI SDK Middleware that returns usage in dollars
# [@ai-billing](https://github.com/narevai/ai-billing) also sends usage events to Billing Providers Here is an infographic how: ![Send usage to billing...
@ai-billing - AI SDK Middleware that returns usage in dollars
## OpenAI example **Since OpenAI does not include cost, I use a custom pricing map to return it** [details="Codeblock"] ```typescript import { UIMessage, convertToModelMessages, generateText
@ai-billing - AI SDK Middleware that returns usage in dollars
# [@ai-billing](https://github.com/narevai/ai-billing) If you are building AI applications with the **Vercel AI SDK** and struggling to implement usage-based billing, I wanted to...