AI cost protection

Something is wrong right now.

Monrow runs inside your app and stops runaway AI spend before it bankrupts you. Three lines to install. No proxy. No latency.

Free forever · Pro $29/mo · what's in Pro · Anthropic + OpenAI SDK

terminal · stderr
Example data
╭─────────────────────────────────────────────────────────────╮
│  MONROW  ·  RUNAWAY LOOP DETECTED                            │
╰─────────────────────────────────────────────────────────────╯

User  usr_bf29  made  127 requests  in  4m 12s
That's 30× their normal rate.

If unchecked for 1 hour:        ~$182.40
If unchecked for 24 hours:      ~$4,377.60

Last 3 requests:
  21:04:18  claude-sonnet-4-5  "summarize the following text..."  $0.41
  21:04:18  claude-sonnet-4-5  "summarize the following text..."  $0.41
  21:04:19  claude-sonnet-4-5  "summarize the following text..."  $0.41

Monrow stopped the next call before it ran.

Throwing MonrowAbuseError. Catch it to fall back gracefully.
→ Replay or inspect: npx monrow incidents show inc_a4f29c
What Monrow prints in your terminal when it catches something. This one example. Real customers see their own users, their own apps, their own dollar amounts.

AI bugs are different from normal bugs.

A retry loop in a normal API costs cents. A retry loop against Claude can cost thousands overnight. Most observability tools detect these problems after the bill arrives.

Monrow catches them in the process, before the next call fires.

01 · Detection

Catch it before the next call fires.

Monrow watches every AI call your app makes. When patterns get dangerous — runaway loops, cost ceilings, velocity spikes — it throws an error before the next call fires. Your code catches it and falls back. The disaster doesn't happen.

A REAL FAILURE MODE

A retry bug caused one user to hit Claude 2,968 times in 14 minutes.

Projected 24h cost: $6,104

Monrow blocked the next request before it executed.

import { Monrow, MonrowAbuseError } from '@monrow/sdk';
import Anthropic from '@anthropic-ai/sdk';

const monrow = new Monrow();
const anthropic = monrow.wrap(
  new Anthropic({ apiKey: process.env.ANTHROPIC_API_KEY })
);

try {
  await anthropic.messages.create({
    model: 'claude-sonnet-4-5',
    max_tokens: 1024,
    monrow: { user: 'usr_bf29' },
    messages: [{ role: 'user', content: 'hello' }],
  });
} catch (err) {
  if (err instanceof MonrowAbuseError) {
    return cachedFallback();
  }
  throw err;
}
  • Runaway loops

    When one user fires the same prompt 100 times in 5 minutes, Monrow stops the next call.

  • Cost ceilings

    Set a max-spend per user. Hit the limit, the next call throws.

  • Velocity spikes

    When a user's request rate spikes 5× their baseline, Monrow logs the incident silently. Tune from there.

02 · Attribution

This part of your product is structurally expensive.

Tag your AI calls with a feature name. Monrow shows you which features are quietly burning down your margins. The problem isn't always a bug — sometimes the design is just expensive. You can't fix what you can't see.

anthropic call with feature tagtypescript
await anthropic.messages.create({
  model: 'claude-sonnet-4-5',
  monrow: { user: 'usr_bf29', feature: 'checkout-flow' },
  messages: [...]
});
terminal · npx monrow report --by-featureshell
$ npx monrow report --by-feature

COST REPORT — LAST 30 DAYS · BY FEATURE
FEATURE              REQUESTS    COST       USERS
checkout-flow        2,968       $1,247.30  340
onboarding           1,734         $312.18  298
chat                 2,968          $89.04  412
summarization          299       $4,377.60   18  ⚠
─────────────────────────────────────────────────
TOTAL                7,969       $6,026.12

Local report is free forever. Cloud dashboard is Pro — adds cross-instance aggregation, 90-day history, and click-through to per-feature detail pages.

03 · Panic surface

Here's what just happened — pause everything from anywhere.

At 2am when something's wrong, you have one URL. One click. Every server stops making AI calls until you click again. Block one specific user. See your live spend per hour. Then go back to bed.

monrow.io/control — bookmark it. Auto-releases after 5 min.

The panic surface. Bookmark it. Hope you never need it.

Post-mortem

A retry loop projected $6,104 overnight.
Nothing flagged it until the bill arrived.

  1. 9:14 PM

    Summarization endpoint called

    A user submitted a document. The API returned 200. Everything looked healthy.

  2. 9:14 PM – 9:28 PM

    Retry loop fires silently

    A bug caused the client to retry on every response. 2,968 requests in 14 minutes. Datadog showed healthy request rates. Sentry showed no errors. The Anthropic dashboard showed spend climbing — but only if you were watching.

  3. 9:28 PM

    Discovered via billing alert

    The engineer found out the next morning when Anthropic sent a spend notification. By then, the damage was done.

Without Monrow

  • Request 1: 200 OK
  • Request 100: 200 OK
  • Request 2,968: 200 OK
  • Next morning: $6,104 bill

With Monrow

  • Requests 1–100: 200 OK
  • Request 101: MonrowAbuseError thrown
  • Your catch block runs
  • Projected damage: $0

Monrow stopped the next call before it ran. Your code caught the error and fell back gracefully.

Why existing tools missed it

Datadog monitors infrastructure — healthy servers, healthy requests.

Sentry catches errors — but 200 OK is not an error.

Anthropic's dashboard shows spend — but only after it happens.

Monrow runs inside your process. It sees the pattern before the next call fires. That's the only layer where this can be stopped.

Free protects your app from disasters. Pro tells you what's happening and who's causing it.

Security

Security by design.

Monrow is local-first and auditable. Here's exactly what it does — and doesn't — do on your machine.

No proxy

Your AI calls go directly to Anthropic. Monrow is not in the network path. No traffic is routed through our servers unless you explicitly enable cloud sync.

No background services

Monrow does not install daemons, LaunchAgents, cron jobs, or any persistent background process. When your app stops, Monrow stops.

No prompt collection

Prompts and responses never leave your process. Cloud sync (Pro only, opt-in) transmits only metadata: model name, token counts, cost, and your custom tags.

Verifiable

Run npx monrow doctor to see exactly what files Monrow has written and what network requests it has made. The full source is on GitHub — read every line.

How it works — no proxy

YOUR APP
    │
    ▼
MONROW SDK
(runs in your process)
    │
    ▼
ANTHROPIC API

Monrow sees:

  • ✓ token counts
  • ✓ timing
  • ✓ your tags

Monrow never sees:

  • ✗ prompts
  • ✗ responses
  • ✗ API keys

npx monrow doctorRead SECURITY.md →View source →

FAQ

Straight answers.

If something's missing, email founder@monrow.io.

No. The SDK runs inside your app process. AI calls go directly to Anthropic. Nothing leaves your servers unless you opt into Pro cloud sync — and even then, we only receive metadata (model name, token counts, cost, your custom user/feature tags). Never prompts, never responses.

Your app keeps working. The SDK is local — it has no network dependency for protection. If you're on Pro, cloud sync queues events to disk and retries when we're back up. The panic surface is the only feature that requires monrow.io to be available; you'd lose the ability to remote-pause, but local detection keeps protecting.

Monrow throws an error. Your code catches it like any other error and does whatever fallback makes sense — return a cached response, show a friendly message, queue for retry. The user's next AI call doesn't happen until your code says it should.

Rate-based extrapolation. If a user's spending $0.05/minute right now, we project that to $72/day. Real spend is logged separately. We mark projections with `~` so the difference is clear.

Coming soon. Anthropic SDK only at launch. The architecture is provider-agnostic — OpenAI support is a wrapper away.

One click in Settings → Billing, or via the Stripe customer portal. The free SDK keeps working — you just lose cloud sync, the panic surface, and the dashboard.

The SDK is MIT licensed. The cloud (dashboard, panic surface, ingest endpoint) is not. We may open-source pieces of it later — no commitment yet.

Not in v1. Maybe later. Tell us if you need it.

The free SDK's runaway loop detector works on a single server. When you scale to two, each server sees half the traffic — neither fires. The loop runs unchecked overnight. Pro aggregates across all your servers so the threshold is always accurate.

Pricing

Free SDK. Pro $29 when you need the cloud.

Free

$0forever

No card required.

  • Runaway loop detection — throws before the next call fires
  • Cost ceiling enforcement per user
  • Velocity spike detection
  • npx monrow doctor — verify what it's doing
  • Zero network calls, no account, MIT licensed
Pro

Pro

$29/mo

Cancel anytime.

  • Cost reports — see which users and features are driving spend
  • Incident history — investigate every runaway loop after it fires
  • Real-time Slack & webhook alerts
  • AI margin intelligence dashboard
  • Cross-server protection — free detector sees one server. Pro sees all of them.
  • Remote kill switch — pause every server from your phone at 2am
  • Cross-instance aggregation — unified view across all servers
  • Coming soon: Stripe revenue matching
Start Free, Upgrade Anytime →

Free SDK works without signing up. Pro requires an account at monrow.io.