Observability for your AI API calls
Wrap your OpenAI, Anthropic, or Gemini client in one line. See cost, latency, tokens, and errors for every request — in real time, before the invoice surprises you.
npm install ai-nazar· works with your existing clientRequests — last 14 days
Know your trajectory before finance asks about it
AI usage inside most orgs grows quietly — a new feature ships, adoption climbs, and nobody notices until the volume shows up as a line item nobody budgeted for.
A daily bar chart of request volume, color-coded by that day's error rate, so a spike is never just “more traffic” — you see immediately whether it's healthy growth or a system under strain.
Walk into a planning meeting already knowing whether usage is trending toward your budget ceiling or your infrastructure's limits — instead of finding out from an invoice.
Spend by model
See exactly which model is spending your budget
When five teams are calling three different providers, “what are we spending on AI” becomes a multi-day Slack thread instead of an answer.
A donut chart breaking total spend down by model — GPT, Claude, Gemini, every tier — with exact dollar figures next to each, updated as requests happen, not at month-end reconciliation.
Approve or challenge a model choice with the real dollar number in front of you, on the spot — not three weeks later when it's already baked into next quarter's forecast.
Top models by cost
Find the one model driving most of the bill
Spend rarely spreads evenly. Usually one model — often the most expensive, most capable one — is doing the majority of the damage, and nobody's checked if it needs to be.
A ranked bar chart of your models by total cost, ordered highest to lowest, so the outlier is the first thing you see, not something you have to go dig for.
Make the call teams avoid making themselves: downgrade the expensive model for the requests that don't need it, and defend that decision with a number instead of a hunch.
Requests by outcome
Separate real growth from a system quietly breaking
A rising request count looks like good news on a slide. It's a different story if a growing share of those requests are failing — and that distinction usually gets lost in an aggregate number.
A stacked bar chart splitting every day's volume into successes and errors, so growth and failure are never hiding behind the same total.
Catch a reliability problem in the trend, before it's a support queue — and answer “is this safe to scale” with the chart already open, not a guess made under pressure.
Error rate
One number that tells you if AI is production-ready
Leadership doesn't need every stack trace — they need one honest signal for whether the AI layer is stable enough to put in front of customers, without paging an engineer to ask.
A single radial gauge showing the overall error rate across every model and provider, color-shifted from green to amber to red as it crosses thresholds that actually matter.
Answer “is it safe to ship” in the time it takes to glance at a dashboard — and know when a rollback or a vendor conversation is overdue before a customer tells you first.
Cost trend
Catch the slope before it becomes the number
A single “spend so far” figure hides the shape of what's coming. Costs that are quietly accelerating look identical to flat costs until the total finally lands on someone's desk.
A smoothed area chart of daily spend over time, showing the actual trajectory — flat, climbing, or spiking — instead of a static total that erases the story of how you got there.
Forecast next month's AI line item from a real trend instead of last year's guess, and flag a budget risk to finance while there's still time to act on it.
Slowest models
Know which model is costing you customers, not just dollars
A model can be accurate and still be the reason users abandon a flow. Latency is a cost that doesn't show up on an invoice — it shows up in churn and support tickets instead.
A ranked bar chart of average response time by model, surfacing the slowest performer immediately — the one quietly working against every UX and conversion metric you track elsewhere.
Give product and engineering a shared, undeniable reason to swap or route around a slow model — backed by a number, not a support ticket you can't fully trust.
Error rate by model
Hold every vendor to the same standard, side by side
Provider reliability claims live in marketing pages and status blogs — rarely in a form you can compare against what your own traffic is actually experiencing, model for model.
A ranked bar chart of error rate broken out by individual model, so a provider having a bad week is visible immediately, not buried inside a blended, misleadingly healthy average.
Bring your own evidence to a vendor renewal or an SLA conversation — and decide which models earn a bigger share of your traffic based on how they actually perform for you.
Three lines. That's the whole integration.
No proxy to stand up, no SDK-specific request format to learn. wrapOpenAI() returns the same client you already use — every call just starts reporting.
- Works with streaming, function calling, and tool use out of the box
- Zero added latency — events are reported asynchronously
- TypeScript-first, fully typed responses
npm install ai-nazarimport { Nazar } from "ai-nazar";
import OpenAI from "openai";
const nazar = Nazar.init({
apiKey: "nz_live_xxxxx",
endpoint: "https://ainazar.com",
});
const openai = nazar.wrapOpenAI(new OpenAI());
// every call now streams cost, latency, and
// token usage straight to your dashboard
const res = await openai.chat.completions.create({
model: "gpt-5.5",
messages: [{ role: "user", content: "hello" }],
});Everything you need to run AI in production
Built for teams shipping real AI features, not toy demos.
Cost per request, per model
Every call is priced at the token level the moment it lands — no waiting on a monthly invoice to find out what a bad prompt cost you.
Latency & error tracking
P50/P95 latency and error rates broken down by model and provider, so you know which one is quietly degrading your UX.
Spend anomaly detection
Flags oversized prompts and runaway usage automatically, with an estimated dollar figure for what fixing them would save.
Multi-provider, one view
OpenAI, Anthropic, and Gemini traffic in a single dashboard — compare cost and quality across models without switching tabs.
Drop-in SDK wrapper
Wraps your existing OpenAI client in one line. No proxy to stand up, no changes to how you call the API.
Self-hostable, MIT licensed
Run it on your own infra with your own database. Your prompts and completions never have to leave your network.
From clone to dashboard in minutes
Install the SDK
One package, zero config. Works with your existing OpenAI client code.
Wrap your client
wrapOpenAI() returns a drop-in replacement — same interface, now instrumented.
Watch it in real time
Cost, latency, tokens, and errors show up on the dashboard as requests happen.
Drill into any request, not just the aggregate
Every call is logged with its prompt, response, token counts, latency, and cost — filterable by model, provider, and status. When something's wrong, you don't have to guess which request caused it.
See it on your own trafficBuilt to be trusted with production traffic
Open code you can audit, and a storage layer you control.
Open source, MIT licensed
Every line — SDK and dashboard — is on GitHub. Read it, fork it, or run it air-gapped. Nothing is hidden behind a closed API.
Your data, your database
Self-host with SQLite, Postgres, or Postbase. Prompts and completions are stored wherever you choose — never a black box you can't inspect.
Scoped API keys
Every SDK integration authenticates with its own revocable key — rotate or kill access to any single service without touching the rest.
Free and open source. Self-host or use ours.
No credit card, no seat limits, no gated features.
Self-hosted
Forever free, MIT licensed
- Unlimited requests and API keys
- SQLite, Postgres, or Postbase storage
- Full dashboard, no feature gates
Hosted
To get started — no card required
- Zero infra — sign up and get an API key
- Managed storage and backups
- Same dashboard, always up to date
Frequently asked questions
Does this add latency to my API calls?
No. Events are captured from the response after it returns and reported to the dashboard asynchronously, off the request path. Your call to OpenAI, Anthropic, or Gemini is untouched.
Do my prompts and completions leave my infrastructure?
Only if you use the hosted version. Self-host with SQLite, Postgres, or Postbase and every event stays in a database you control — the dashboard app never has to be reachable from outside your network.
Which providers and SDKs are supported?
OpenAI, Anthropic, and Gemini today, via a wrapper around each provider's official client. It reads from the same request/response objects you already use — no separate SDK-specific call format to learn.
What happens to streaming, function calling, and tool use?
All supported. The wrapper observes the same client methods you already call, including streamed responses and tool-call round trips, so instrumentation doesn't change how you write request code.
Is the hosted version really free?
Yes, to get started — no credit card required. The dashboard, API keys, and full feature set are the same as self-hosting; you're only trading infra ownership for zero setup.
Stop guessing what your AI calls cost
Install the SDK, wrap your client, and watch the numbers come in.