Security & Trust

How TokenSave handles your data, keys, and requests.

🔒

Zero-knowledge SDK

Our recommended integration. The SDK runs entirely inside your own infrastructure. API keys are used locally to make direct calls to AI providers — they are never transmitted to TokenSave servers.

Caching happens in-memory on your server
Model routing decisions made locally
Prompt compression runs on your machine
API calls go directly to the AI provider
Only anonymous usage counts sent to dashboard

// Data flow with SDK

Your App → TokenSave SDK (your server) → AI Provider

Anonymous stats only

(request count, tokens saved)

🖥️

Self-hosting

Deploy TokenSave on your own infrastructure. Our entire codebase is open source — audit every line before deploying.

Full data sovereignty — nothing leaves your network
Audit the source code on GitHub
Deploy on your own infrastructure using our open source code
Compatible with your existing compliance setup
View source on GitHub →
☁️

Cloud proxy — data handling

If you use our hosted proxy, here is exactly what happens with your data:

DataStored?Details
API keysNeverForwarded to provider per-request. Immediately discarded from memory.
PromptsHashed onlyA one-way hash for cache matching. Original text is not stored.
ResponsesCached 30mStored in Redis with TLS in transit. Auto-deleted after 30 minutes.
Usage statsYesRequest count, tokens saved, cache hits. Powers your dashboard.
IP addressesNeverHashed for rate limiting only. Raw IPs never stored.
🛡️

Security measures

Rate limiting

60 requests/minute per key with standard headers

Input validation

All inputs sanitized, control characters stripped

Security headers

HSTS, X-Frame-Options, CSP, XSS protection on every response

Attack path blocking

Common exploit paths (/wp-admin, /.env, /.git) return 404

Request size limits

Maximum 500KB per request, 100K chars per message

Audit logging

All security events logged with hashed IPs

CORS headers

Proper CORS on all API routes for cross-origin access

TLS encryption

All connections use HTTPS with TLS 1.2+

📋

Choose your trust level