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.
- Client SDK
- /openai/v1 or /anthropic
- Pipeline
- 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
- Agent HTTPS
- tokensaver-egress
- Provider + ingest
- 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.