TOKEN LEDGER

Know exactly
what your
AI costs.

Know exactly
what your
AI costs.

A precise ledger for every model call. Read the usage your provider already returns, price it against the latest rate, and keep every micro-unit accountable.

A precise ledger for every model call. Read the usage your provider already returns, price it against the latest rate, and keep every micro-unit accountable.

SELF-HOST IN 5 MINS

SELF-HOST IN 5 MINS

SEE THE BREAKDOWN

SEE THE BREAKDOWN

OVERHEAD

<1MS

PROMPT STORED

NONE

LICENSE

APACHE-2.1

DAILY SPEND · 30 DAYS

DAILY SPEND · 30 DAYS

MTD $48.86 / $40.00

MTD $48.86 / $40.00

Wrap the client you already have. Every completion that resolves is metered, priced and attributed — by model, by API key, by tenant, by feature — and lands on the dashboard within seconds. Cache reads and writes are billed at their own rates rather than folded in, because the cheap tokens are usually the loud ones

BATCH WINDOW

5 S / 20 EVENTS

INGEST BODY

1–100 EVENTS

MONEY UNIT

MICRO-USD, INT

PRICE SYNC

DAILY 06:00 UTC

Everything needed to integrate spendgraph: two minutes for the SDK, or plain HTTP if you prefer.

METER EVERYTHING

#

#

?

/

#

/

$

#

?

@

?

#

$

&

/

#

@

&

$

$

/

&

#

@

?

&

&

$

?

$

#

&

@

$

@

?

?

?

@

/

?

?

$

@

/

?

?

?

@

&

$

?

$

$

@

/

@

#

&

$

$

$

/

@

$

#

/

&

#

@

$

&

&

#

/

?

&

#

/

&

?

@

&

@

$

#

#

/

@

&

&

$

#

?

$

#

@

/

/

@

#

@

@

?

&

#

$

$

/

#

#

&

&

?

&

@

#

?

&

/

?

$

&

$

@

Input, output, cache reads and cache writes — captured per request, off the hot path.

PRICE IT IN DOLLARS

#

?

#

/

$

@

@

$

/

&

$

?

#

#

/

#

@

/

&

/

&

&

$

&

/

?

#

$

#

&

@

&

@

$

&

&

@

@

/

@

/

&

@

&

&

&

&

$

$

@

#

&

&

@

?

/

&

#

/

@

&

/

&

@

/

#

$

&

&

?

#

$

&

#

/

#

/

&

?

/

/

&

/

&

$

&

?

/

?

?

@

Model price tables applied at ingest, so tokens become a number finance can read.

KEEP IT YOURS

&

#

#

@

$

@

@

?

?

$

?

$

?

$

$

&

@

/

?

$

@

?

@

#

@

?

$

/

#

&

@

#

#

?

/

?

$

@

$

&

$

#

@

&

$

#

$

@

&

/

#

/

/

?

/

#

?

?

#

$

$

&

?

@

$

/

/

@

?

@

?

$

@

&

@

$

#

?

?

?

#

@

$

&

/

/

@

?

@

&

/

#

@

#

$

&

#

?

/

&

$

$

$

#

#

?

?

/

&

@

&

#

$

?

@

?

?

$

@

@

#

&

$

$

/

/

$

&

$

/

?

$

#

&

&

&

/

$

&

#

?

?

@

/

#

&

&

$

#

#

&

#

$

?

$

/

$

@

/

@

@

#

/

/

@

&

?

@

&

&

?

/

?

?

?

/

#

?

#

/

/

@

#

/

#

#

$

$

#

@

@

$

#

/

&

?

One container, one Postgres, zero prompts stored. Runs entirely in your account.

METER EVERYTHING

#

#

?

/

#

/

$

#

?

@

?

#

$

&

/

#

@

&

$

$

/

&

#

@

?

&

&

$

?

$

#

&

@

$

@

?

?

?

@

/

?

?

$

@

/

?

?

?

@

&

$

?

$

$

@

/

@

#

&

$

$

$

/

@

$

#

/

&

#

@

$

&

&

#

/

?

&

#

/

&

?

@

&

@

$

#

#

/

@

&

&

$

#

?

$

#

@

/

/

@

#

@

@

?

&

#

$

$

/

#

#

&

&

?

&

@

#

?

&

/

?

$

&

$

@

Input, output, cache reads and cache writes — captured per request, off the hot path.

PRICE IT IN DOLLARS

#

?

#

/

$

@

@

$

/

&

$

?

#

#

/

#

@

/

&

/

&

&

$

&

/

?

#

$

#

&

@

&

@

$

&

&

@

@

/

@

/

&

@

&

&

&

&

$

$

@

#

&

&

@

?

/

&

#

/

@

&

/

&

@

/

#

$

&

&

?

#

$

&

#

/

#

/

&

?

/

/

&

/

&

$

&

?

/

?

?

@

Model price tables applied at ingest, so tokens become a number finance can read.

KEEP IT YOURS

&

#

#

@

$

@

@

?

?

$

?

$

?

$

$

&

@

/

?

$

@

?

@

#

@

?

$

/

#

&

@

#

#

?

/

?

$

@

$

&

$

#

@

&

$

#

$

@

&

/

#

/

/

?

/

#

?

?

#

$

$

&

?

@

$

/

/

@

?

@

?

$

@

&

@

$

#

?

?

?

#

@

$

&

/

/

@

?

@

&

/

#

@

#

$

&

#

?

/

&

$

$

$

#

#

?

?

/

&

@

&

#

$

?

@

?

?

$

@

@

#

&

$

$

/

/

$

&

$

/

?

$

#

&

&

&

/

$

&

#

?

?

@

/

#

&

&

$

#

#

&

#

$

?

$

/

$

@

/

@

@

#

/

/

@

&

?

@

&

&

?

/

?

?

?

/

#

?

#

/

/

@

#

/

#

#

$

$

#

@

@

$

#

/

&

?

One container, one Postgres, zero prompts stored. Runs entirely in your account.

01 / BREAKDOWN

EVERY DOLLAR,

TRACED TO A

CAUSE

EVERY DOLLAR,

TRACED TO A

CAUSE

EVERY DOLLAR, TRACED TO A CAUSE

Provider dashboards give you one number a month. SpendGraph converts raw token usage into costs and slices it along the dimensions your team actually argues about.

BY MODEL

See which model quietly became your biggest line item.

BY FEATURE

Attribute spend to the product surface that generated it.

BY TENANT

Per-customer cost of goods, ready for margin analysis.

BY API KEY

Isolate environments, jobs, agents and rogue scripts.

BY REQUEST

Drill into a single event: tokens in, tokens out, dollars.

BY PERIOD

Hour, day, month — with drift against last period.

02 / SDK REFERANCE

A statement for your AI stack

A statement for your AI stack

A statement for your AI stack

Token accounting including cache reads and cache writes, priced per model and rolled up into a number you can put in front of a finance team.

WORKSPACE
acme-ai / production

PERIOD
Mar 01 — Mar 31

MODEL / FEATURE

TOKENS

PER 1M

COST

claude-sonnet-4.5

doc-summariser

40.2M

$1.00

$16,460.00

gpt-5.1

agent-runtime

31.7M

$2.50

$7,925.00

gemini-3-pro

search-rerank

22.4M

$1.25

$2,800.00

cloude-haiku-4.5

inline-autocomplete

96.5M

$0.80

$7,720.00

gpt-5.1-mini

support-triage

63.1M

$0.45

$2,839.50

cache-read

all features

184.9M

$0.10

$1,849.00

Cache savings

Budget

$4,120.60

$40,000.00

TOTAL

TOTAL

$39,643.50

$39,643.50

Cost is computed at ingest against the newest published price and stored as an integer count of micro-USD — so the statement above is arithmetic, not an estimate.

03 / WIRE IT UP

Two lines. Then stop thinking about it

Two lines. Then stop thinking about it

Two lines. Then stop thinking about it

Auto-instrument the SDKs you already use, or record usage manually when you own the transport. The collector batches, retries and never blocks a response.

APP/OPENAI.TS

import { spendgraph } from "@spendgraph/sdk";

// wrap the client you already have

const openai = spendgraph.instrument(new OpenAI(), {

feature: "support-triage",

tenant: user.orgId, });


await openai.chat.completions.create({ ... });

// -> usage, cache tokens and cost recorded async

AUTO-INSTRUMENTATION

OpenAI, Anthropic, Gemini, Bedrock, Vercel AI SDK.

MANUAL EVENTS

POST a usage event from any language or runtime.

BUDGETS & ALERTS

Thresholds per feature, tenant or key — Slack or webhook.

04 /PRIVECY

Your traffic never leaves your account

Your traffic never leaves your account

Your traffic never leaves your account

Auto-instrument the SDKs you already use, or record usage manually when you own the transport. The collector batches, retries and never blocks a response.

SELF-HOSTED

Runs in your own account. One container, one Postgres.

METADATA ONLY

Token counts and model metadata — never your prompts.

FAIL-OPEN

If SpendGraph is down, your requests still ship.

NON-BLOCKING

nstrumentation batches off the hot path. Sub-ms overhead.

OPEN SOURCE

Apache-2.0. Read every line that touches your traffic

NO LOCK-IN

Plain SQL schema. Export or query it yourself.

Meter everything

SELF-HOST IN 5 MINS

SEE THE BREAKDOWN