Customer story
How Declair tracks receipt OCR costs in production
Declair is invoicing software for Dutch freelancers. Pro users scan receipts with Claude — Spillr shows what each OCR call actually costs.
Feature label
receipt-ocr
Model
claude-sonnet-4-6
Typical cost per scan
~$0.009
Example from production traffic verified June 2026. Actual cost varies by receipt size and token count.
The challenge
Receipt OCR is a Pro feature: users photograph a bonnetje, Claude extracts vendor, date, amount, and VAT. It works well — but every upload is an API call with unpredictable token usage. A dense receipt image costs more than a simple one.
Anthropic's usage page shows totals per API key. It does not answer the question that matters for a solo-built SaaS: what does OCR cost me per user, per month, and is it eating my margin on the Pro plan?
The solution
Declair routes Anthropic calls through proxy.spillr.io and tags every OCR request with X-Spillr-Feature: receipt-ocr. No changes to the OCR prompt logic — only the client base URL and two headers.
import Anthropic from '@anthropic-ai/sdk';
const client = new Anthropic({
baseURL: 'https://proxy.spillr.io/anthropic',
defaultHeaders: {
'X-Spillr-Key': process.env.SPILLR_KEY,
'X-Spillr-Feature': 'receipt-ocr',
},
});
// Declair sends the receipt image + extraction prompt as usual.
const res = await client.messages.create({
model: 'claude-sonnet-4-6',
max_tokens: 1024,
messages: [{ role: 'user', content: ocrPrompt }],
});- →Receipt images and extracted text are never stored by Spillr — only token counts and USD cost.
- →The Spillr dashboard shows daily OCR spend, model breakdown, and request volume.
- →Budget alerts can fire before OCR spend spikes — useful when testing new prompts or models.
What changed
Per-scan visibility
Every receipt upload logs as receipt-ocr with exact input/output tokens and USD cost — not buried in a monthly Anthropic total.
Margin clarity
With ~$0.009 per typical scan, Declair can reason about Pro pricing vs. OCR COGS instead of guessing after the invoice arrives.
Same-day setup
Integration took one baseURL change and two headers. Production traffic verified end-to-end in June 2026.
Room to grow
When Declair adds more AI features, each gets its own X-Spillr-Feature label — OCR costs stay separate from future workflows.
“I built Spillr because I needed it for Declair. OCR is the kind of feature where costs are real but invisible until month end — I wanted per-feature numbers without adopting a full LLM observability stack.”
Why Spillr over heavier tools
Helicone, Langfuse, and LangSmith are excellent for teams that need tracing, evals, and prompt management. Declair needed something narrower: cost per feature, budget guardrails, no prompt storage. Spillr is built for that — a proxy plus dashboard, not a full LLM platform.
See also: Anthropic cost monitoring, LLM budget management
Track your AI feature costs the same way.
Free during beta. Change one URL, add two headers, see per-feature spend on your next deploy.