An alarm for your AI spend.
Spikewatch watches the one number that can ruin your month - hourly AI API spend - and messages you the hour it stops looking normal. Read-only by design, open source by default, silent unless something is wrong.
Overview
Your usage page shows yesterday. Your invoice shows last month. Spikewatch shows this hour.
AI providers bill in arrears and report usage on a delay. That gap is where runaway spend lives: a retry loop stuck overnight, an agent recursing through tool calls, a batch job pointed at the wrong model. Spikewatch exists to close that gap to one hour.
Catch it the same hour
Checks run every hour, around the clock. A loop that starts at 2am is in your Slack by 3am - not on the invoice 30 days later.
One message, not a dashboard
There is nothing to check and nothing to configure daily. Spikewatch speaks once per spike and stays quiet the rest of the time.
Your key can't spend
The only credential it ever holds is a read-only usage key. It cannot make API calls, change settings, or see a single prompt.
Open source, inspectable
The detection engine, the hourly job, and the test suite are public. Read the exact code that decides when you get paged.
engine/ on GitHub →Built for the people who pay the bill
Three kinds of teams land here.
Solo founders
You pay the AI bill on a personal card and check it when the statement arrives. Spikewatch is the tripwire between you and a four-figure surprise.
Small teams running agents
Your agents and batch jobs call AI APIs unattended. When one misbehaves, everyone finds out from one message - not from finance at month-end.
Anyone burned once already
The most common signup story: "a loop ran all night and I found out from the invoice." Once is enough.
How it works
Four steps, repeated every hour.
Connect a read-only key
You create an Anthropic Admin API key scoped to usage and cost reports. That scope can read token counts and cost data for your organization - and nothing else. It cannot create a message, cannot spend a dollar, cannot read a prompt. Setup is paste-the-key, pick-a-channel.
Pull the last 15 days of usage
Every hour, the job reads your usage report from the provider API, bucketed by hour and grouped by model. Token counts are converted to estimated dollars using list prices, so the check runs on the same unit your bill uses.
Compare each hour against your normal
"Normal" is not a global average. The default baseline is the median of the same hour of day over the last 14 days - so 3pm is judged against your other 3pms, and a quiet Sunday doesn't dilute a busy Tuesday. A trailing-24-hour baseline is available if your usage has no daily rhythm.
Message you - once - if the line is crossed
If an hour lands at or above your threshold (default 3x normal) and above your floor (default $5), one message goes to your Slack. If the spike continues, the cooldown (default 6 hours) stops repeats. When it clears, the next spike can alert again.
Detection
The rule, in plain English.
"If spend in any hour reaches 3x your usual level for that hour (median of the same hour over the last 14 days), and is at least $5, send one message. The same alert is not repeated for 6 hours."
Every word of that sentence is a parameter you can change. Configuration reference →
Two baselines, because "normal" depends on your shape
| Baseline mode | How "usual" is computed | Needs | Best when |
|---|---|---|---|
| Same hour, 14 days (default) | Median of this hour of day across the previous 14 days | ≥3 matching hours | Usage has a daily rhythm - business-hours traffic, nightly batches |
| Trailing 24 hours | Median of the previous 24 hourly values | ≥12 hours | Usage is steady around the clock, or brand new with no history |
The baseline is a median, not an average - so one big day doesn't quietly raise the bar for every hour after it. Until enough history exists for a baseline, no alert fires: Spikewatch would rather say nothing than guess.
The floor and the cooldown, because raw ratios are noisy
The floor ignores pocket change
3x of a $0.40 hour is $1.20 - technically a spike, actually noise. The floor (default $5/hour) means small absolute spend can never alert, no matter the ratio. You set it to whatever "worth waking up for" means to you.
The cooldown stops the pile-up
A real incident often stays above the line for hours. Without a cooldown you'd get a message every hour of the same fire. Spikewatch sends the first one, suppresses repeats for the window you set (default 6 hours), and tells you how many were suppressed.
A worked example, from the test suite
This exact scenario runs as an automated test before every scheduled check, so the detection you read about is the detection that ships:
| Setup | What the engine sees | Result |
|---|---|---|
| 15 days of hourly data, normal spend $10/hr with a daily 9am bump to $30 | One hour lands at $41 against a $10 baseline for that hour | 1 alert - ratio 4.1x, above the 3x line and the $5 floor |
| Same data, plus the next hour at $45 | Second spike arrives 1 hour after the first | Suppressed - inside the 6-hour cooldown; counted, not sent |
| Same pattern at 1/100th scale (all spend in cents) | Ratios identical, absolute values tiny | 0 alerts - the floor filters pocket change |
How tokens become dollars
Provider usage reports count tokens; your bill counts dollars. The engine converts using published list prices per million tokens, including the cheaper rates for cached tokens:
| Model family | Input / 1M tokens | Output / 1M tokens | Cache handling |
|---|---|---|---|
| Opus | $15 | $75 | Cache writes priced at 1.25x (5-minute) or 2x (1-hour) input rates; cache reads at 0.1x |
| Sonnet | $3 | $15 | |
| Haiku | $1 | $5 |
These are list-price estimates, meant for spike detection - the shape of your spend, not its last cent. If you have a negotiated rate, your invoice will differ slightly; the spike detection is unaffected. The price table lives in one file in the repo and is easy to edit.
Alerts
One message, with everything you need to act.
When the line is crossed, this is the entire message. No digest, no threading, no "you have 47 notifications":
Spikewatch: AI spend is at 3.4x your usual level (threshold 3x).
Hour starting 2026-10-16 04:00 UTC: $41.00. Usual: $12.00.
Where it lands
Slack via an incoming webhook today; email alerts are part of the launch. One channel, one message per spike.
What it tells you
The hour (in UTC), what you spent, what usual looks like, and how far over the line you are. Enough to decide in seconds whether to go look.
What to do next
Open your provider's usage console, find the model or key driving the hour, stop the loop. Spikewatch found the smoke; the extinguisher stays with you.
Don't take the example's word for it
Run your own hours through the same engine.
The live checker runs this exact detection code in your browser. Paste 2+ weeks of hourly spend (or an Anthropic usage report JSON), set your rule, and see precisely which hours would have messaged you - including any that would have been suppressed by the cooldown.
Providers
Anthropic today. Others only when the data access is real.
| Provider | Status | What that means |
|---|---|---|
| Anthropic | Working | Usage and cost reports through the Admin API are confirmed. The hourly job and the live checker both run on this data today. |
| OpenAI | Planned | Added only after usage data access is confirmed working end to end. No "coming soon" integrations that can't actually read your numbers. |
| Google (Gemini) | Planned | |
| OpenRouter | Planned |
Keep your stack
Nothing touches your code, your proxy, or your request path.
No SDK
There is nothing to install and no dependency to version. Spikewatch reads usage from the provider's side, after the fact.
No proxy
Your API traffic never passes through Spikewatch. There is no added latency, no new point of failure, and nothing in the middle of your requests.
No code changes
If you can create a read-only usage key and a Slack webhook, you are done. That is the entire integration surface.
Who it's for
Right for some teams. Wrong for others. Said plainly.
A good fit if you…
- Run agents, cron jobs, or batch pipelines that call AI APIs without a human watching each run.
- Pay the bill yourself - or you're the person finance will ask first.
- Want to be told, not to go looking. You already have enough dashboards.
- Care who can see your prompts. Answer here: nobody. Usage numbers only.
Not the right tool if you need…
- A hard spending cap. Spikewatch warns a human in time to act; it never switches your service off. Set hard caps at your provider.
- Request-level tracing. It reads hourly totals, not individual calls - by design, so your prompts are never in scope.
- Real-time, per-second alerting. Provider usage APIs report on a delay, so hourly is the fastest honest cadence. Anyone promising instant spend alerts is reading the same delayed data faster and calling it real-time.
Next step
See your own numbers through it.
The checker is free, runs in your browser, and stores nothing. If it would have caught something in your last two weeks, you'll know in about a minute.