Drop-in cost optimization for LLM applications. One line of code patches your existing OpenAI / Anthropic / Mistral / DeepSeek / Groq / Together / Fireworks / OpenRouter / Perplexity / Cerebras / xAI client to route through Tessera's measurement + auto-optimize proxy. You keep your provider account and keys; we route + cache + compress and measure savings on every request.
Free Sandbox tier: 60M tokens / month · no card required · no fee until you upgrade. Get your free key at tesseraai.io/dev.
→ Get free key (email + ToS, 30 seconds, no card)
After signup you get:
- Your
tk_API key (shown once) - A magic-link for the dashboard — see your token counter + savings counter live
- 60M tokens/month at 30 req/min — generous for hobby + side projects
pip install tessera-llm-proxyDrop this at the top of your application's entry point (main.py, app.py, manage.py, wherever your app boots):
import tessera
tessera.activate("tk_your_tessera_key")That's it. Your existing code runs unchanged — openai.OpenAI(), anthropic.Anthropic(), mistralai.Mistral(), and other supported SDK constructors are transparently patched to route through Tessera. Your provider keys (OpenAI sk-..., Anthropic sk-ant-..., etc.) stay in your environment as before; Tessera forwards them upstream untouched.
If you'd rather not put the key in code:
export TESSERA_KEY=tk_your_tessera_keyimport tessera
tessera.activate() # reads TESSERA_KEY from environmentCalling tessera.activate(...) patches the following SDKs at import time (each is opt-in: only patched if the library is installed):
| SDK | Tessera route |
|---|---|
openai (≥1.0) |
https://api.tesseraai.io/v1/openai |
anthropic |
https://api.tesseraai.io/v1/anthropic |
mistralai |
https://api.tesseraai.io/v1/mistral |
cohere |
https://api.tesseraai.io/v1/cohere (Wave 2) |
groq |
https://api.tesseraai.io/v1/groq |
If you use a framework that wraps these SDKs (LangChain, LlamaIndex, CrewAI, AutoGen, Mastra, Pydantic AI, etc.), the patch applies transparently because those frameworks call the underlying SDK constructors which are what we patched.
If you call providers that aren't covered by an official Python SDK (DeepSeek, Together, Fireworks, OpenRouter, Perplexity, Cerebras, xAI), construct an openai.OpenAI client manually with the matching Tessera URL:
from openai import OpenAI
# DeepSeek via Tessera
client = OpenAI(
api_key="sk-deepseek-...",
base_url=tessera.url("deepseek"), # → https://api.tesseraai.io/v1/deepseek
default_headers=tessera.headers(),
)
# Same pattern for: together, fireworks, openrouter, perplexity, cerebras, groq, xaitessera.url(provider) and tessera.headers() are pure helpers — no globals, no patching. Use them when you want explicit, traceable wiring.
import tessera
tessera.activate("tk_...")
assert tessera.is_active(), "Tessera should be active after activate()"
print(tessera.status()) # → ProxyStatus(active=True, providers_patched=['openai', 'anthropic'], proxy_base='https://api.tesseraai.io/v1')To restore the original SDK constructors (e.g. in test teardown):
tessera.deactivate()tessera.activate(
key="tk_...", # or TESSERA_KEY env var
proxy_base="https://api.tesseraai.io/v1", # default; override for staging/dev
feature_tag="checkout-summarizer", # attaches to every request for per-feature attribution
)feature_tag lets you split savings reporting per workload (e.g. one tag per logical feature in your app). You can also set per-request tags by passing extra_body={"tessera_feature_tag": "..."} on individual SDK calls.
Flat monthly subscription, priced by your gross monthly tokens submitted (before optimization). You keep 100% of the measured savings — savings is your ROI proof, not the billing basis.
| Tier | Gross tokens / month | Price / month |
|---|---|---|
| Free Sandbox | ≤ 60M | $0 (no card required) |
| Starter | ≤ 1B | $199 |
| Growth | ≤ 5B | $999 |
| Scale | ≤ 20B | $3,999 |
| Enterprise | 20B+ | Custom |
- Kill-switch available anytime from your portal — pauses optimization, traffic still flows passthrough.
Full terms: https://tesseraai.io/terms
Apache-2.0