# BiVelio Savings Layer > BiVelio Savings Layer (BV-SALA, npm package `@bivelio/savings-layer`) is open source (Apache-2.0) and free with no key, no signup and no telemetry. Its TypeScript SDK cuts LLM API spend inside your app where your traffic repeats: an exact cache and deduplication of identical requests on OpenAI, Anthropic, Gemini and any OpenAI-compatible endpoint (DeepSeek, Qwen, GLM, Moonshot, a local server), plus prompt-cache placement on Anthropic. Its per-request report labels every figure `measured`, `reference` or `estimated`; only measured and reference figures come from the provider's own usage counter. The same package ships a local gateway that meters coding agents (Claude Code, Codex, Gemini CLI, Qwen Code, Goose, opencode, Kilo, Aider, and GitHub Copilot CLI with your own Anthropic key) and any SDK that lets you set a base URL, in any language, in front of Anthropic, OpenAI, Gemini, DeepSeek, Qwen, GLM, Moonshot, MiniMax or OpenRouter, for models with a list price in its catalog; it also forwards to a local server (Ollama, vLLM, LM Studio), whose models have no list price and are not metered in dollars. The Python package (`bivelio-savings-layer` on PyPI) is a measurement client for that gateway. The optional Savings Cloud adds a team dashboard, shared measurement, seats and license management. How much the SDK saves depends on your traffic. Identical requests are not paid twice, and neither are simultaneous ones unless the first is streamed; on Anthropic, a long, stable system prompt is billed at the cached rate. Traffic that never repeats saves about 0 % by default, with one exception that costs more: on Anthropic, a long system prompt that changes on every request (a timestamp, a user id), or is reused only after its 5-minute cache expired, costs about 20 % more than no layer. Put what changes in the user message, or pass `maxCacheBreakpoints: 0` to `AnthropicProvider`. The local gateway measures by default. It has no exact cache, coalescing of identical requests is off unless you set `BVSALA_GATEWAY_COALESCE=1`, and its one default lever (the Anthropic cache-write TTL) saves only when your client pays per token and asks for the one-hour cache. Install: `npm i @bivelio/savings-layer` (the SDK, in your TypeScript/JavaScript app) or `npx @bivelio/savings-layer claude` (the gateway for Claude Code; also codex, goose, qwen, opencode, kilo, gemini, aider, and copilot with your own Anthropic key). Your LLM traffic goes straight to your provider (the gateway is a local proxy on your own machine); with no key, nothing is sent to BiVelio. ## Get started - [Install anywhere, in 60 seconds](https://github.com/BiVelio/bivelio-savings-layer#install-anywhere-in-60-seconds): the SDK, the local gateway for any OpenAI SDK, and one command per coding agent - [npm: @bivelio/savings-layer](https://www.npmjs.com/package/@bivelio/savings-layer): the SDK, the `bvsala` CLI and the local gateway (Apache-2.0, zero runtime dependencies) - [PyPI: bivelio-savings-layer](https://pypi.org/project/bivelio-savings-layer/): a Python measurement client: it routes the official OpenAI and Anthropic SDKs through the local gateway and returns each request's report; it saves nothing by itself - [GitHub repository](https://github.com/BiVelio/bivelio-savings-layer): source code, README, CHANGELOG and the benchmark artifacts ## Docs - [How it works](https://savings.bivelio.com/en/how-it-works): where the layer runs (inside your app or as a local gateway), what it saves, its limits and how it is measured - [Benchmarks](https://savings.bivelio.com/en/benchmarks): the public A/B bench, metered with the provider's own usage counter, every run with its raw JSON report - [Pricing](https://savings.bivelio.com/en/pricing): the open-source engine is free; the optional Savings Cloud has Measure (free: 1 organization per account, up to 5 seats and 20,000 requests a day), Pro (€15 per seat per month or €150 per seat per year), Team (€129 per month with 10 seats included, then €12 per extra seat; €1,290 per year with 10 seats, then €120 per extra seat) and Enterprise (by contract). List prices, VAT not included; the paid plans are a fixed fee, with no commission on your savings. With @bivelio/savings-layer 1.2.5 or later a Measure key applies exactly the same levers as no key and adds the dashboard; older versions only observe with it. - [Paper](https://savings.bivelio.com/en/paper): Verifiable Measurement of Cost Savings in LLM Applications — the method, the results and every limitation - [README as plain text](https://savings.bivelio.com/llms-full.txt): install, both modes, providers, and what is free and what the Cloud adds ## Guides - [Guides to cutting your LLM API bill](https://savings.bivelio.com/en/guides): Practical guides to lower OpenAI, Anthropic, DeepSeek and Qwen API costs: caching, deduplication, Claude Code spend per request, and how to verify savings on your bill. - [How to reduce OpenAI API costs, and prove each saving](https://savings.bivelio.com/en/guides/reduce-openai-api-costs): Six levers that cut an OpenAI bill: caching, deduplication, Batch, model choice, output and input size. When each one pays, and how to check it on your usage. - [Claude prompt caching not working? Why cache reads stay at 0](https://savings.bivelio.com/en/guides/claude-prompt-caching-not-working): Why cache_read_input_tokens stays at 0 on Claude, how to find the byte that breaks the prefix, and how to check your hit rate against Anthropic's usage numbers. - [How much does Claude Code cost? Measure it request by request](https://savings.bivelio.com/en/guides/claude-code-cost-per-request): What Claude Code costs on an API key, what /usage and the Console show, and how to see the cost of every request with a free local gateway. - [OpenAI prompt caching: why cached_tokens is 0 and how to fix it](https://savings.bivelio.com/en/guides/openai-prompt-caching-cached-tokens): A checklist for OpenAI prompt caching when cached_tokens stays at 0: prompt length, prefix order, eviction, routing and streams, with code to track the hit rate. - [Deduplicate identical LLM requests: exact cache and in-flight coalescing](https://savings.bivelio.com/en/guides/deduplicate-llm-requests): Stop paying twice for the same LLM call: a safe cache key, what never to cache, coalescing identical requests in flight, and how to check the saving. - [DeepSeek and Qwen API costs: see cache hits and spend per request](https://savings.bivelio.com/en/guides/deepseek-qwen-api-cost-local-gateway): How DeepSeek and Qwen bill cache hits and misses, how to price a request from its usage fields, and how to meter every request with a free local gateway. - [How to verify LLM cost savings against your provider's bill](https://savings.bivelio.com/en/guides/verify-llm-savings-against-provider-bill): A method to check any LLM savings claim: log the provider's counters, reconcile tokens before dollars, keep measured and estimated apart, and attribute the saving. ## Optional - [What leaves your infrastructure](https://savings.bivelio.com/en/privacy): the exact fields a Savings Cloud key sends, and what is never sent - [CHANGELOG](https://github.com/BiVelio/bivelio-savings-layer/blob/main/CHANGELOG.md): what changed in each release