NullSpend Docs

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 & Webhooks

Two config changes. No SDK. No code rewrite.

# Before                                    # After
OPENAI_BASE_URL=https://api.openai.com/v1   OPENAI_BASE_URL=https://proxy.nullspend.dev/v1

Add an X-NullSpend-Key header and every request is tracked, budgeted, and visible.

Features

FeatureWhat It Does
Cost trackingPer-request cost calculation for every model — input, output, cached, and reasoning tokens
Cost attributionBreak down AI spend by customer, team, or feature. Group by API key or any tag, drill into daily trends, export CSV for finance
Budget enforcementHard spending ceilings. The proxy returns 429 before the request reaches the provider
Velocity limitsDetect runaway loops — block when spend rate exceeds a threshold within a time window
Session limitsPer-conversation spend caps tied to a session ID
TagsAttribute costs to teams, environments, features, or anything else via X-NullSpend-Tags
TracingW3C traceparent propagation and custom trace IDs for request correlation
Webhooks15 event types with HMAC-SHA256 signing — cost events, budget exceeded, velocity alerts, threshold crossings
HITL approvalsHuman-in-the-loop approval workflow for high-cost or sensitive operations
OrganizationsTeam collaboration with roles (owner, admin, member, viewer), per-org billing, and invitation management
Request loggingOpt-in capture of full request/response bodies (including streaming) for debugging and audit (Pro/Enterprise)
Session replayGroup LLM calls by session ID, view the full chronological timeline, expand to see request/response bodies
Multi-providerOpenAI and Anthropic in a single dashboard with provider breakdown
MCP supportBudget 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

FreeProEnterprise
Price$0/mo$49/moCustom
Proxied spend$5K/mo$50K/moUnlimited
Budgets3UnlimitedUnlimited
API keys10UnlimitedUnlimited
Team members3 (viewers unlimited)UnlimitedUnlimited
Webhooks2 endpoints25 endpointsUnlimited
Data retention30 days90 daysUnlimited
Request logging--Full request/response bodiesFull request/response bodies
Key featuresCost tracking, budgets, team orgsUnlimited keys/budgets/members, request loggingSSO/SAML, custom RBAC, dedicated support

Get Started

Set up cost tracking in under 2 minutes:

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 SDKnullspend — 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

On this page