Skip to content

Financial controls for the agentic era.

Your agents spend money now. NullSpend is the open-source layer that sees every dollar, stops every runaway, and reconciles the whole thing to a real P&L. Built for the AI-native teams shipping today and the finance teams closing the books tomorrow.

nullspend.dev / margins
CustomerRevenue (30d)AI cost (30d)MarginHealth
north-star-ai$48,200$6,840+85.8%Healthy
acme-corp$31,400$5,960+81.0%Healthy
lighthouse-labs$19,800$4,712+76.2%Healthy
orbital-systems$12,600$4,118+67.3%Moderate
crane-and-co$8,450$3,920+53.6%Moderate
vector-forge$5,200$3,847+26.0%At-risk
meridian-one$3,100$4,248-37.0%Critical
Sample view · actual layout from the dashboard · connect revenue sync to populate your own customers
Velocity breakerTripped
Runaway caught at $47.20

eval-runner-7 spent 10× baseline in 4 minutes. Paused · paged on-call.

Spend rateLast 1h
$182/hr+14%

// THE PROBLEM

Your dashboard shows a total. It should show the truth.

Every AI-native company hits the same wall. Costs per customer swing wildly. Revenue and cost live in separate systems. The loudest customer is not the most profitable one, and nobody knows until the next board meeting.

01

Variance

Cost per customer varies 10x to 100x. Cost per feature and per agent too. You see one total.

02

Velocity

A looped agent burns a month of margin in an afternoon. Nobody sees it until the invoice.

03

Attribution

Your dashboard shows cost. Your billing shows revenue. Nothing joins them at the customer level.

// THE SOLUTION

Every dollar. Every customer. Every agent. Every time.

Connect your billing system. Tag requests with a customer ID. NullSpend joins revenue and AI cost at the customer, feature, and agent level. See trajectory, set health tiers, export to your board deck.

  • Revenue sync every 2 hours, no manual mapping
  • Real cost attribution from actual token counts across 56 models
  • Health tiers you configure: healthy, moderate, at-risk, critical
  • Regression alerts when a customer drops a tier
  • Per-customer, per-feature, and per-agent margin trajectory
  • CSV export for board decks and finance reviews
See how the margin table works →

// ENFORCEMENT

Stop the runaway before it costs you the day.

Most tools log cost after the call returns. NullSpend checks and reserves budget before the request reaches the provider. If the budget is gone, the request is denied. Sub-20ms overhead. No race conditions.

proxy · sdk

Budgets

Hard or soft caps on API keys, customers, agents, or tags. Overdraft modes per budget. Hierarchical inheritance. Enforcement at the proxy, not in the app.

proxy

Runaway detection

Velocity circuit breakers. Loop detection. Session caps. When an agent spends 10x baseline in 60 seconds, NullSpend halts it before the day's budget evaporates.

proxy · sdk · mcp

HITL approval

Agents request more budget. Humans approve in Slack. Scoped, audited, expiring. The budget negotiation primitive your agent framework does not ship.

Plus policies, velocity circuit breakers, session caps, and tag-based inheritance. See all enforcement primitives →

// THREE WAYS TO CONNECT

One control plane. Three ways to plug in.

SDK for granular control. Proxy for zero code changes. MCP for agent-native flows. Use one or all. Best of breed.

SDK · TYPESCRIPT · PYTHON

SDK

When you want per-call control in app code.

import { NullSpend } from "@nullspend/sdk";

const ns = new NullSpend({ apiKey });
const fetch = ns.createTrackedFetch("openai");
  • Auto-calculates cost from response tokens
  • Works with OpenAI, Anthropic, Gemini
  • Available in TypeScript and Python
Read the SDK docs
PROXY · IN-PATH

Proxy

When you want every request governed, no exceptions.

OPENAI_BASE_URL=
  https://proxy.nullspend.dev/v1
  • One env var, every framework
  • Unbypassable
  • Sub-20ms overhead
Read the proxy docs
MCP · AGENT-NATIVE

MCP Server

When your agent asks for its own budget.

{
  "mcpServers": {
    "nullspend": {
      "url": "https://mcp.nullspend.dev"
    }
  }
}
  • Works with Claude, Cursor, any MCP client
  • check_budget, request_budget, get_cost tools
  • Self-governance for autonomous stacks
Read the MCP docs

// OPEN SOURCE

Read the code that decides your margin.

The NullSpend proxy, SDKs, cost engine, and MCP server are all Apache-2.0. Run it on your infrastructure. Read every line of the enforcement logic. Audit the exact formula we use to compute margin.

No vendor lock-in. No black-box billing. No “trust us, the number is right.” The binary we ship on nullspend.dev is the same one you run on your own servers.

$ git clone github.com/NullSpend/nullspend
$ pnpm install && pnpm dev
nullspend running on http://localhost:8787
NullSpend/nullspend
Apache-2.0 · public

// PRICING

Free until it matters.

Free for builders. Accessible for founders. Ready for teams at scale. Custom for enterprise.

Free

$0/mo

Every enforcement primitive in Free. Forever free — unlimited self-hosted.

  • 100,000 governed requests / month
  • 3 budgets
  • Velocity circuit breakers
  • Session spend caps
  • Model & provider mandates
  • Tag-based budgets
  • Multi-org
  • Unlimited team members
  • 7 day data retention
  • 10 API keys
  • 2 webhook endpoints
Start free

Pro

$49/mo

Know which customers make you money. Margin intelligence + Stripe sync.

  • 500,000 governed requests / month
  • Per-customer margin intelligence
  • Stripe revenue sync
  • Cost regression alerts
  • CSV export
  • Soft-block, warn-only & shadow-mode policies
  • 60 day data retention
  • Priority support
Start Pro

Scale

$199/mo

For teams running AI in production at serious volume.

  • 2,000,000 governed requests / month
  • Everything in Pro
  • 180 day data retention
  • SLA on uptime + response time
  • Priority email support
Start Scale

Enterprise

Custom

Compliance-ready governance at any scale.

  • Unlimited governed requests
  • Unlimited budgets
  • Custom data retention
  • Unlimited team members
  • SSO & SAML
  • SCIM provisioning
  • HIPAA BAA available
  • EU data residency
  • Dedicated support
Contact Us

// FAQ

The questions you would ask on a sales call.

If the question you have is not here, open an issue on GitHub or email the founder directly.

How is NullSpend different from other AI cost tools?
Most AI cost tools log what you spent after the request returns. That’s observability, not control. NullSpend checks and reserves budget before the request leaves, attributes cost to the customer who triggered it, and reconciles to your revenue at the customer level. Observability tells you what happened. NullSpend decides what gets to happen.
Do I still need my existing observability tool?
Your choice. NullSpend provides observability natively — traces, session replay, and cost events — so you can either keep your existing tool and run it alongside NullSpend, or migrate fully to NullSpend and retire the other one. Either way, you get the two things observability tools don’t do: real-time budget enforcement and customer-level margin reconciliation.
What happens if NullSpend goes down? Does my app go down?
No. The proxy is a stateless Cloudflare Worker running in 300+ regions, and the SDK is a thin wrapper around fetch with no runtime dependency on nullspend.dev. If the hosted proxy is ever genuinely unreachable, your bypass is a one-line revert ofOPENAI_BASE_URLback to the upstream provider — no code change, no NullSpend lock-in. For production-critical workloads, the entire stack (proxy, SDKs, cost engine, MCP server) is Apache-2.0, so you can run NullSpend on your own infrastructure and decouple from our availability entirely.
Can I self-host?
Yes. The proxy, SDKs, cost engine, and MCP server are all Apache-2.0. Run the entire stack on your own infrastructure. The binary we run at nullspend.dev is the same one you deploy. We don’t offer paid support contracts for self-hosted deployments today — if you need that, talk to us.
How fast can I go live?
Five minutes for the SDK or proxy, plus the time to connect your revenue system. You will see your first cost events in under a minute and your first margin table within two hours of connecting revenue sync.
How does the margin calculation work?
We join revenue (by customer) with AI cost (by request tag) and compute margin at the customer, feature, and agent level. Cost is calculated from actual response tokens across 56 models, not estimated. The formula is documented and the source is readable in the open-source cost-engine package.
What about SOC 2, SSO, and audit logs?
SSO and audit log export are on the Enterprise tier. SOC 2 is on the roadmap. If you have a specific compliance timeline, talk to us.

// START TODAY

See your margin table in five minutes.

Free forever for your first 100,000 requests. No credit card. Apache-2.0 across the stack. Your data stays yours.