NullSpend
FinOps layer for AI agents — cost tracking, budget enforcement, and human-in-the-loop approval.
FinOps layer for AI agents — cost tracking, budget enforcement, and human-in-the-loop approval.
The Problem
AI agents call LLMs autonomously. Without guardrails, a single runaway loop can burn through thousands of dollars before anyone notices. Existing observability tools can alert you after the damage is done. NullSpend prevents it.
How It Works
Your App ──► NullSpend Proxy ──► OpenAI / Anthropic
│ │
│ ◄── streams back ────┘
│
▼
Dashboard & WebhooksTwo config changes. No SDK. No code rewrite.
# Before # After
OPENAI_BASE_URL=https://api.openai.com/v1 OPENAI_BASE_URL=https://proxy.nullspend.dev/v1Add an X-NullSpend-Key header and every request is tracked, budgeted, and visible.
Features
| Feature | What It Does |
|---|---|
| Cost tracking | Per-request cost calculation for every model — input, output, cached, and reasoning tokens |
| Cost attribution | Break down AI spend by customer, team, or feature. Group by API key or any tag, drill into daily trends, export CSV for finance |
| Budget enforcement | Hard spending ceilings. The proxy returns 429 before the request reaches the provider |
| Velocity limits | Detect runaway loops — block when spend rate exceeds a threshold within a time window |
| Session limits | Per-conversation spend caps tied to a session ID |
| Tags | Attribute costs to teams, environments, features, or anything else via X-NullSpend-Tags |
| Tracing | W3C traceparent propagation and custom trace IDs for request correlation |
| Webhooks | 15 event types with HMAC-SHA256 signing — cost events, budget exceeded, velocity alerts, threshold crossings |
| HITL approvals | Human-in-the-loop approval workflow for high-cost or sensitive operations |
| Organizations | Team collaboration with roles (owner, admin, member, viewer), per-org billing, and invitation management |
| Request logging | Opt-in capture of full request/response bodies (including streaming) for debugging and audit (Pro/Enterprise) |
| Session replay | Group LLM calls by session ID, view the full chronological timeline, expand to see request/response bodies |
| Multi-provider | OpenAI and Anthropic in a single dashboard with provider breakdown |
| MCP support | Budget enforcement for Model Context Protocol servers and proxies |
Trust Model
The proxy never modifies your requests or responses. Your provider API keys stay with you — they pass through to the upstream provider and are never stored. By default, NullSpend sees only the token counts in the response to calculate cost — prompt content is not logged. Pro and Enterprise plans can opt in to request/response body logging for debugging and audit purposes; bodies are stored encrypted in R2 with per-org lifecycle policies.
Pricing
| Free | Pro | Enterprise | |
|---|---|---|---|
| Price | $0/mo | $49/mo | Custom |
| Proxied spend | $5K/mo | $50K/mo | Unlimited |
| Budgets | 3 | Unlimited | Unlimited |
| API keys | 10 | Unlimited | Unlimited |
| Team members | 3 (viewers unlimited) | Unlimited | Unlimited |
| Webhooks | 2 endpoints | 25 endpoints | Unlimited |
| Data retention | 30 days | 90 days | Unlimited |
| Request logging | -- | Full request/response bodies | Full request/response bodies |
| Key features | Cost tracking, budgets, team orgs | Unlimited keys/budgets/members, request logging | SSO/SAML, custom RBAC, dedicated support |
Get Started
Set up cost tracking in under 2 minutes:
- OpenAI Quickstart
- Anthropic Quickstart
- Use with AI Coding Assistants — copy-paste blocks for Cursor, Claude Code, Copilot
- Migrating from Helicone
For AI agents: fetch /llms.txt for the complete machine-readable API reference.
API Reference
Build programmatic integrations with the NullSpend API:
- API Overview — authentication, pagination, errors, ID formats
- Cost Events — ingest and query cost data
- API Keys — key management and identity introspection
- Budgets — spending limits and budget status
- Webhooks — endpoint management and delivery history
- Actions — human-in-the-loop approval workflows
SDKs
Client libraries and adapters for integrating NullSpend into your stack:
- JavaScript SDK —
@nullspend/sdk— TypeScript/JavaScript client for the NullSpend API - Python SDK —
nullspend— Python client for the NullSpend API - Claude Agent Adapter —
@nullspend/claude-agent— routes Claude Agent SDK calls through the proxy - MCP Server —
@nullspend/mcp-server— exposes approval tools to any MCP client - MCP Proxy —
@nullspend/mcp-proxy— gates upstream MCP tool calls through approval and budget enforcement