VibezCheck
Get Started
✦ VIBEZCHECK · THE COST LAYER FOR AI APPLICATIONS

Know what every AI request costs.

Measure AI usage in real dollars, control runaway AI spending, and connect model costs to customers, features, and revenue.

TypeScript · 0 runtime dependencies · No proxy required · Offline-capable pricing
VibezCheck is a TypeScript SDK for AI cost monitoring and LLM usage metering. It calculates the provider cost of AI model requests from usage data, attributes spending to customers and features, and helps applications control AI spending with request and agent budgets.
AI request→usage→provider cost→customer economics
✦ $0.0028 · 1,420 tok · gpt-4o-mini
$npm install vibezcheck
OpenAI
dev modesandbox
openai logo
1import OpenAI from 'openai';
2import { vibez } from 'vibezcheck';
3
4const openai = new OpenAI();
5
6export async function POST(req: Request) {
7 const { messages, customerId } = await req.json();
8
9 const stream = await openai.chat.completions.create({
10 model: 'gpt-5.6-sol',
11 stream: true,
12 messages,
13 });
14
15 // Meter stream in real time with 0ms added latency
16 const meteredStream = vibez.wrapStream(stream, {
17 model: 'gpt-5.6-sol',
18 customer: customerId,
19 });
20
21 return new Response(meteredStream);
22}
Scenario:
Use Case • ChatbotZero Latency (ZDR)

How do I stream LLM tokens and get real-time cost telemetry without adding network latency?

openai logoOpenAIgpt-5.6-sol
Metered locally · Reported async

VibezCheck meters every chunk offline using a local tokenizer index — 0ms added network latency! Notice the live receipt badge below showing exact wholesale cost ($0.00140) and token count (150 tokens).

AI Cost\$0.0014
Customer Charge\$0.0018
Contribution+\$0.0004
✓ Within spend limit✓ Metered✓ Billable
150 tokens • 110ms TTFT
✦$0.0014·150 tok·gpt-5.6-sol·110ms
Streaming Token & Cost Inspection
Zero Retention (ZDR)
Wholesale Unit Cost

$0.00140 USD

Added Latency

0.00ms (Offline Index)

openai logoModel: openai("gpt-5.6-sol")110ms latency
Supported Models & Inference Providers (700+)
Click any model to inspect live rates in sandbox

What VibezCheck Is — and Is Not

VibezCheck is
  • ✓An AI usage metering layer.
  • ✓A request-level cost calculator.
  • ✓A customer/feature cost attribution layer.
  • ✓A spend-control layer.
  • ✓A usage-billing bridge.
  • ✓A developer-first NPM SDK.
  • ✓Eventually, AI unit-economics infrastructure.
VibezCheck is not primarily
  • –A generic LLM observability dashboard.
  • –A token counter.
  • –A logging platform.
  • –A prompt database.
  • –A Stripe wrapper.
  • –A model router.
  • –A generic AI monitoring product.

Tokens are useful for engineers. Dollars are useful for businesses.

AI providers bill applications using model-specific usage units such as input tokens, output tokens, cached tokens, and reasoning usage.

Users do not buy tokens.

They buy messages, documents, agent runs, API calls, credits, and subscriptions.

VibezCheck connects the product action to the provider cost.

1
User Action
Message, doc, run
2
AI Usage
Tokens & tool calls
3
Provider Cost
Calculated micro-dollars
4
Customer Economics
Margin, credits, billing
Measure

Measure every AI request in dollars.

Know what an individual request, customer, feature, model, document, or agent session costs.

Request Cost

Calculate provider cost from model usage in-process using BigInt nano-cent rate cards for 700+ models.

Token Usage

Break down prompt, completion, cached, and reasoning usage where supported by the provider response.

Customer Attribution

Attach customer, organization, feature, and thread identifiers to every request and generation.

Streaming

Meter streaming responses in real time without routing traffic through an external VibezCheck proxy.

Control

Put a ceiling on AI spending.

Agent workflows can make multiple model and tool calls before a user sees the result. VibezCheck lets developers enforce request-level and session-level spending boundaries.

Per-Request Limits

Stop unusually expensive calls using maxCostPerCallUSD.

Token Limits

Set maximum token ceilings per generation to keep prompt expansion within bounded limits.

Agent Budgets

Create hard spending ceilings for multi-step agent workflows via sessionBudgetUSD.

Tool Costs

Account for external tool execution (web search, sandboxes, code interpreters) inside agent economics.

Monetize

Connect AI costs to your pricing.

Once your application knows the provider cost of a request, you can use that usage event inside your own pricing and billing system.

Markup / Pricing Rules

Apply a markup multiplier (e.g. 1.30×) to wholesale provider cost to ensure profitable customer retail pricing.

Credits

Map usage and dollar consumption directly to customer credits, token pools, or feature quotas.

Usage Events

Emit structured economic usage events asynchronously to Stripe, Metronome, Supabase, or custom queues.

Customer Economics

Understand the cost behind every plan, enterprise tenant, product feature, and account in real time.

One line to start metering.

Wrap the model you already use. VibezCheck runs in your application and exposes the usage and cost of the request.

app/api/chat/route.ts
import { streamText } from 'ai';
import { openai } from '@ai-sdk/openai';
import { vibezcheck } from 'vibezcheck';

const result = streamText({
  model: vibezcheck(openai('gpt-4o-mini'), {
    customer: 'user_123',
    maxCostPerCallUSD: 0.50,
  }),
  prompt: 'Summarize quantum computing in three sentences.',
});
✦ $0.000276·1,390 tok·gpt-4o-mini
Read the 5-minute quickstart →

Your application already knows the response. Now let it know the cost.

Without Metering (Before)
const result = await generateText({
  model: openai('gpt-4o-mini'),
  prompt,
});

// You have the response.
// What did it cost?
// Which customer generated it?
// Did an agent exceed its budget?
With VibezCheck (After)
const result = await generateText({
  model: vibezcheck(openai('gpt-4o-mini'), {
    customer: user.id,
    maxCostPerCallUSD: 0.50,
  }),
  prompt,
});

// Real dollar cost calculated.
// Attributed to customer.
// Hard ceiling enforced.
Usage + cost + attribution + protection in the application path.

Built for Production Engineering

Technical specifications designed for zero risk and clean integration

Built for TypeScript
First-class type inference with zero type assertions
0 Runtime Dependencies
Core library has 0 external node_modules bloat
Vercel AI SDK Support
Wraps streamText, generateText, and tool calls
Native Stream Support
Handles OpenAI, Anthropic, Gemini streams in-process
Offline Pricing Catalog
Bundled BigInt rate cards for 700+ frontier models
MIT Licensed
Free, open source, and self-contained in your repo
Answers & Architecture

Frequently Asked Questions

Direct, verifiable answers to common technical and economic questions.

Know the cost before it becomes the bill.

Add AI cost metering to the stack you already use.