Savings Layer is part of the BiVelio platform

Your LLM bill, under control. Measured on every call.

Savings answers what your app repeats without calling the provider again, and measures every call with its counter.

The Savings dashboard with the public bench's data: the measured saving and its split by model.
Dashboard with the public bench's data
OpenAIAnthropicGoogleMeasured live with each provider's own counter
Two products

Where do your tokens go: your app, or your coding agent?

Both are licensed per seat and both count with your provider's own meter. They do different jobs, so each makes its own promise — and today only one of them has a published savings figure.

SDK

For Node.js apps, in JavaScript or TypeScript, that call an LLM API with your own key and pay for every token.

It wraps the call inside your code, sends the provider only what has to be paid for, and returns a SavingsReport with every response.

The figure we publish
OpenAIgpt-4o-mini
31.5%less bill (95% interval: 25.7% to 36.7%) on a stream where 30% of requests are exact repeats — GSM8K, SDK 0.4.31

Not a forecast: what you save depends on how much your traffic repeats. Only what your provider's counter confirms counts in your savings report — including repeated requests served without calling your provider, each valued with the counter of the identical request that already ran.

Install
pnpm add @bivelio/savings-layer
Full setup

Gateway

For developers who run Claude Code, Codex CLI or another coding agent on an API key.

One command puts a local meter in front of your terminal, with no code to change. It counts each request your provider reports usage for, with the provider's own counter — for models in our price catalog — and adds it up in your dashboard, by day and by model.

The figure we publish
Anthropic
2.5%of the bill with PRO's cache downgrade, net of the cache misses it causes (95% interval: 1.5% to 3.6%). Simulated at list prices on 51 Claude Code sessions from a single organization, our own.

Not a forecast for your team: it is one organization, one provider and list prices, and it is a small saving that shows where Anthropic spend is high. With PRO, on Anthropic models, it moves cache writes from the one-hour TTL to the five-minute one, only on turns where a large part of the prompt is new — such as a session's first turn or a compaction — and leaves the chained turns of a running session as they are. That changes the price, never what the model reads, and only what your provider's counter confirms counts in your savings report.

Install
npm i -g @bivelio/savings-layer
export BIVELIO_SERVICE_KEY=bvk_…
bvsala claude
Full setup
SDK — for JavaScript and TypeScript apps on an API key
Built for developers

Fewer bill headaches. Without changing provider.

Four facts about the package. None of them is a promise.

dependencies: {}

Zero runtime dependencies

A single ESM bundle. Nothing gets installed next to your code that we did not write; the exact tokenizer is an optional peer.

report.cost.basis

One SavingsReport per call

Four ledgers that are never summed, the cost with its basis (measured or estimated) and traces per stage. It is the same thing your dashboard reads.

app → provider api

Your traffic still goes direct

The SDK wraps the call inside your process. Your prompts never pass through BiVelio: we only ever receive counts and cost.

layer.generateStream(request)

Streaming, same report

generateStream() hands you the answer as the provider writes it and closes with the same SavingsReport as generate(), under the same basis rules: the provider's final counter is read at the end of the stream, and a stream without it is reported as unmeasured and never counts as measured savings. With an output contract, the answer arrives validated, in one piece.

In plain words

What does the SDK actually do?

Four ideas, four eight-second animations.

01

AI charges you per word

Every request to an AI is paid for by the text going in and out. Savings stands in the middle of that path: a request it has already seen and verified is answered without calling the provider again, and whatever you didn't have to pay for drops into your jar.

02

You don't pay twice for the same thing

An AI re-reads everything you already sent it, turn after turn — and the provider charges for it again. Savings prepares every request so the provider applies its discounted price to the repeats. The discount is the provider's; our part is asking for it properly.

03

A receipt you can verify

We don't ask for faith. Every saving is measured with the provider's official meter — the same one they bill you with — and lands on your receipt. Anything that can't be checked against the bill is never announced.

04

Measure free, then pay per seat

Start with the free Measure license: the layer runs in shadow mode and shows what it would have saved on your own traffic. To turn the levers on, you pay a fixed fee per seat, or a Team plan, whether or not you save — and no commission on your savings.

The animations illustrate the idea. The real numbers — measured against live providers — are right below.

No promises: measurements

How do we know it saves? We measure it — and we publish every trial, one by one.

Every scenario runs twice against the real provider: as-is, and with Savings in front. Both results are counted with the provider's own meter — the same one that prices your bill. Here is what came out, error margin included:

Measured against a real provider
OpenAIgpt-4o-mini
31.5%less bill (95% interval: 25.7% to 36.7%) on a stream where 30% of requests are exact repeats — GSM8K, SDK 0.4.31
Anthropicclaude-sonnet-5
75.1%same stream (95% interval: 69.3% to 79.6%). About 41% of the original bill is Anthropic's own prefix-cache discount — the provider's, not ours, and shown apart

Each lever falls into its own ledger, and the ledgers are never added up. In this battery the saving came from repeated requests the SDK served without calling the provider and, on Claude, from the provider's own prefix cache. The npm package ships no compressor.

Compatible with
OpenAIAnthropicGeminiMistralLlamaDeepSeekPerplexityHugging FaceNVIDIA NIMAzure OpenAIBedrockOllamavLLM

Compatible is not measured. The SDK works with any endpoint compatible with the OpenAI API, plus the native Anthropic adapter and the native Gemini adapter (new in 0.4.33). With a savings figure on the public bench, today only OpenAI and Anthropic models; Gemini has no savings figure. What is measured for Gemini: Gemini 3.8 Flash, through its native API, in the weekly live bench of October 1, 2026 — all four batteries, with no layer failures and no refusal cached or credited as savings. That bench checks that the layer breaks nothing and does not overcharge; it does not measure a saving. Also measured: Gemini 3.1 Pro, through its native API, in two partial runs on October 1 – 2, 2026 (its daily provider quota does not fit all four batteries in one day): all four batteries, again with no layer failures and no refusal cached or credited as savings.

The test is a fair experiment: the same task twice — without Savings and with Savings — with the provider's own meter counting both.

Translation, no jargon

On a stream where 30% of requests repeat exactly, the bill went down by 31.5% — between 25.7% and 36.7% with 95% confidence. What you save depends on how much your traffic repeats.

A percentage means nothing without its interval, its model and its traffic: we publish all three.

Honest accounting

Every kind of saving, counted separately — so no number gets inflated.

Every SavingsReport splits the saving into four ledgers — calls avoided, text removed, text compressed, and your provider's own cache discount — and never adds them up into one marketing number.

On the public bench (2026-09-28), what the installed SDK saved came from the first ledger — repeated requests served without calling the provider — and, on Claude, from the fourth, which is your provider's own discount. The npm package ships no compressor. A ledger with no published figure is described here, not advertised.

01

avoided_calls

LLM, retrieval and tool calls that never executed at all.

02

eliminated_tokens

Information dropped because it simply wasn't needed.

03

compressed_tokens

Information kept, but encoded with fewer tokens.

04

provider_cached_tokens

Still in the prompt, but billed or processed more cheaply.

SDK · one lever, on your data, before paying

Paste your data. See how many tokens the SDK would send.

This runs the SDK's real format selector in your browser, on your data. Nothing leaves this page and you don't need an account.

Try an example

…or paste your own JSON here. Nothing leaves your browser.

Loading the optimizer and the exact tokenizer…

What this is, and what it isn't: one lever — how structured data is written into the prompt — on the input tokens of this data. It applies only to data you pass to the SDK as structuredData, not to JSON already written inside your messages. It is not your bill: calls avoided, your provider's cache and the output are not in it, and many requests carry no structured data at all. For the whole SDK, the figure we publish is the one in the measurement section, with its note.

Five lines to start

Run it in your own app. Your prompts never touch our servers.

Drop the SDK in front of your provider. Every response carries a full SavingsReport you can chart — the same numbers the dashboard reads.

# 1 · the package
pnpm add @bivelio/savings-layer

# 2 · the license (from your dashboard)
export BIVELIO_LICENSE_KEY=…

# 3 · wrap the call — this is the entire code change
const layer = createSavingsLayer({ provider, licenseKey, … });
const { text, report } = await layer.generate({ model, messages });

console.log(report.cost.netSavingsRatio)  // ← the saving, measured

Or let one command tailor it to your stack. init reads your package.json (Next.js, Express, the Vercel AI SDK, Mastra, LangChain.js, the Anthropic or the OpenAI SDK) and prints the install line, the exact code for your adapter and a check that spends no tokens: once your license is in place, the layer answers it on your machine, without calling the model. It writes nothing unless you ask it to.

npx @bivelio/savings-layer@latest init
Salesforce HubSpot Odoo Zapier n8n UiPath

Where your automations already live. What gets measured is the call to your provider's API with your key: in a Node.js app, the SDK wraps it; from other code on the official OpenAI or Anthropic SDK, the gateway sits in front and records it for a model with a list price.

Gateway — for coding agents on an API key
Gateway · coding terminals

Claude Code on an API key? See its real spend, token by token.

One command puts a local meter in front of your terminal, with no changes to your code: export your service key and start your agent through bvsala. Your prompts never leave your machine — only counts and cost reach your dashboard.

npm i -g @bivelio/savings-layer
export BIVELIO_SERVICE_KEY=bvk_…

bvsala claude

The gateway measures, with your provider's own counter, every request whose usage the provider reports (for models in our price catalog) and, like the SDK, runs only with an active license: it collects it with your service key and verifies its signature on your machine. With a PRO license, on Anthropic models, it also applies one lever by default: it moves cache writes from the one-hour TTL to the five-minute one only on turns where a large part of the prompt is new — such as a session's first turn or a compaction — and leaves chained turns as they are. That changes the price, never the content the model reads. The other levers stay off until you switch them on. The savings-mode skill is available for your caps, with its effect still to be measured. The gateway also works with Codex CLI, Goose, Qwen Code, opencode, Kilo, Aider and, with your own Anthropic key, GitHub Copilot CLI; for others, such as Cline or Continue, bvsala doctor prints the exact configuration. Cursor cannot be metered, and Gemini CLI not yet. See how it works →

Python or any other language? Point the official OpenAI or Anthropic SDK at the gateway and every request whose usage the provider reports, for a model with a list price, is recorded in this dashboard at that price; the gateway's log says when one is not. bvsala doctor prints the base URL for each SDK. For OpenAI streaming, ask for usage in the request (stream_options.include_usage).

Skill — for coding agents on a subscription plan
savings-mode · free skill

The skill that stretches your subscription caps

No invoice doesn't mean no pain: the five-hour window and the weekly cap. savings-mode is a pure-instructions skill — no proxy, your traffic untouched — that cuts the two masses that actually burn cap: model output and tool results. It's free; what you pay Savings for is knowing how much it saves you.

01

cache reads

The whole context is re-read every turn — which is why keeping it lean matters.

02

cache writes (one hour)

Every tool result is cache-written at a premium before being re-read.

03

model output

A small share of the tokens, at the highest price per token; the skill attacks it directly.

Where a Claude Code session's spend goes, in this order: cache reads, one-hour cache writes and model output — measured with our meter on our own traffic, against the provider's counters. That report is not published, so we don't show its figures. The skill's own effect will be published once A/B-measured — never before.

npx -y @bivelio/savings-layer skill

One command: installs into ~/.claude/skills and activates by itself when the conversation turns to limits or saving tokens.

Book 15-min callWe'll tell you what you'd save on your traffic, without installing anything.
Plans

Measure for free. Pay per seat when you want the savings.

Start with Measure: free and without a card. The layer runs in shadow mode on your own traffic and your dashboard shows what it would have saved, valued with your provider's counter. Pro and Team are billed per seat, in EUR, whether or not you save, and carry no commission on your savings.

Measure

Free

No card. The layer in shadow mode for one organization, up to 5 seats and 20,000 requests a day: nothing you send changes, nothing is served from cache, it is never part of any commission — and you see what it would have saved. Needs @bivelio/savings-layer 0.4.33 or later.

Start free →

Pro

€15 / seat / month

Or €150 / seat / year. Every optimization, the per-request receipt and the dashboard. No commission.

Choose Pro →

Team

€129 / month

10 seats included; each extra seat €12 / month. Or €1,290 / year. No commission.

Choose Team →

Enterprise

Custom

More seats than online checkout allows, your own contract or negotiated invoicing: write to us.

  • Every BV‑SALA optimization, uncapped
  • A receipt per request: SavingsReport with four ledgers, measured and estimated kept apart
  • Savings dashboards & team analytics
  • Your prompts never leave your infrastructure

A seat is one machine or service identity, not a person. You pay for the seats your subscription covers; your dashboard shows how many were in use this month (active on at least 3 days; CI and ephemeral runners don't count).

VAT not included. If your company has an EU VAT number, the reverse charge applies.

Already on the earlier plan with a commission on measured savings? You keep it unchanged; its terms are on the pricing terms page.

Company & ecosystem

BiVelio is a member of the NVIDIA Inception Program.

NVIDIA's program for startups building with AI.

About the program
NVIDIA Inception Program