Docs / Choose a path

LLM egress

Two ways to send LLM traffic through TokenSaver: SaaS HTTP drop-in base URLs, or a local MITM client proxy.

A. HTTP drop-in (SaaS)

Point OpenAI- or Anthropic-compatible clients at TokenSaver. Same SDKs — different base URL.

HTTP egress
  1. Client SDK
  2. /openai/v1 or /anthropic
  3. Pipeline
  4. Provider
export OPENAI_BASE_URL=https://api.tokensaver.fr/openai/v1
export OPENAI_API_KEY=ts_…

# Anthropic-shaped clients
export ANTHROPIC_BASE_URL=https://api.tokensaver.fr/anthropic
export ANTHROPIC_API_KEY=ts_…

Contracts: OpenAI-compatible, Anthropic-compatible.

B. Client proxy MITM (OSS)

Use when you keep a provider subscription (e.g. Claude Pro/Max) and still want Flux IA + policies — without rewriting the agent’s base URL. Package: tokensaver-egress · PyPI

Client MITM
  1. Agent HTTPS
  2. tokensaver-egress
  3. Provider + ingest
  4. Flux IA
pip install -U tokensaver-egress
tokensaver-egress setup          # key, ingest URL, MITM CA
tokensaver-egress claude         # or: serve / run

Prefer tokensaver-cli route when you can point the agent at TokenSaver HTTP / MCP directly. Prefer MITM when the agent must keep talking to the provider origin.