SpendLint

Catch AI API cost regressions before they ship

SpendLint keeps one verified dataset of official LLM API prices, computes what your workload costs from it, and lets your repository declare a budget that CI enforces on every pull request.

A model swap from Claude Sonnet 5 to Claude Opus 5 on 1,000 requests a day (3,000 input, 600 output tokens each) moves the bill from $360.00 to $900.00 per month. A SpendLint budget contract turns that into a failed CI check with the exact delta.

Flagship model prices today

ModelInput / 1MOutput / 1MVerifiedPage
Claude Sonnet 5$2.00$10.002026-09-05All anthropic prices
GPT-5.4$2.50$15.002026-09-05All openai prices
Gemini 3.1 Pro Preview$2.00$12.002026-09-05All google prices
GPT-5$1.25$10.002026-09-05All azure-openai prices

USD per 1 million tokens, standard tier. Full tables: Claude, OpenAI, Gemini, Azure OpenAI.

Cheapest current models for a 3,000 in / 600 out workload

ModelPer requestPer month at 1,000 req/day
GPT-5 nano azure-openai$0.000390$11.70
GPT-5 nano openai$0.000390$11.70
GPT-4.1 nano azure-openai$0.000540$16.20
Gemini 2.5 Flash-Lite google$0.000540$16.20
GPT-4.1 nano openai$0.000540$16.20
GPT-4o mini azure-openai$0.000810$24.30
GPT-4o mini openai$0.000810$24.30
GPT-5.6 Luna openai$0.001320$39.60

Compare every model side by side or run your own workload.

Budget contracts

Add a spendlint.yaml to your repository, describe the workload, and the GitHub Action reports PASS, WARN or FAIL with the projected before and after cost and the rule that broke.

version: 1
rules:
  max_monthly_usd: 500
  max_cost_per_request_usd: 0.02
  max_regression_pct: 20
npx spendlint check --contract spendlint.yaml --workload workload.json --baseline workload.baseline.json

Output for the Sonnet 5 to Opus 5 swap above: FAIL, delta +$540.00/month (+150.00%), rules max_monthly_usd, max_cost_per_request_usd and max_regression_pct violated, five cheaper compliant models listed. Try a contract in the browser or read the setup guide.

What SpendLint does not do

Reference pages

Claude API pricing

Every Claude model with input, output, cache and batch prices.

OpenAI API pricing

GPT-5.x, o-series and mini models, cached input and batch.

Gemini API pricing

Gemini 3.x and 2.5 with long-context tiers and promotional periods.

Azure OpenAI pricing

Global Standard list prices from the Azure Retail Prices API.

Claude Code cost

What a developer seat costs per day and month, with Anthropic's own figures.

JSON API

The same dataset as machine-readable JSON with provenance on every row.