Features Built for Peace of Mind
Budget protection, cost tracking, and seamless integration—everything you need to build with AI confidently.
Budget Protection That Actually Works
Set your budget. CostShield enforces it at the API level—no room for errors, no surprise bills. Sleep well knowing your costs are capped.
Set your maximum monthly spend. When you hit the limit, CostShield blocks all requests until the next reset. No overages, ever.
Enforced via database transactions with row-level locking (race condition protected).
Set soft limits (e.g., 80% of budget) to receive warnings before hitting the hard cap. Grace periods available.
Configurable thresholds: 50%, 75%, 90%, 100%, 110% (grace).
Budgets auto-reset monthly. Customize the reset day (1-28) to match your billing cycle.
See Every Token. Track Every Dollar.
Know exactly where your AI budget goes. Real-time tracking, detailed logs, and insights to optimize spending.
Every API call logged in real-time. See model, tokens, cost, duration, and status. Filterable and searchable.
Precise token counting using tiktoken library. Input and output tokens tracked separately. 99.9% match with OpenAI's billing.
Visualize spending by model, day, week, month. Identify cost trends and anomalies. Exportable to CSV, JSON, PDF.
Built for OpenClaw. Works in Minutes.
CostShield is the only OpenAI proxy designed specifically for OpenClaw users. One config change, instant budget protection.
Add CostShield to OpenClaw with a single config file edit. No code changes needed.
{
"models": {
"providers": {
"costshield": {
"baseUrl": "https://api.costshield.dev",
"apiKey": "${COSTSHIELD_API_KEY}"
}
}
}
}Works with OpenClaw 2026.1.29 and later. Streaming, all models, all features supported. OpenAI-compatible API.
Drop-In Replacement for OpenAI API
Use your existing OpenAI client library. Just change the base URL.
Use your existing OpenAI client library. Just change the base URL.
// JavaScript
const openai = new OpenAI({
apiKey: process.env.COSTSHIELD_API_KEY,
baseURL: "https://api.costshield.dev/v1"
});Full streaming support for real-time responses. No buffering. Token counting during stream.
Bank-Level Security. Your Keys, Safe.
Your OpenAI API keys are encrypted with AES-256-GCM before storage. Master keys never leave secure environment.
Your OpenAI API keys encrypted with AES-256-GCM before storage. GDPR, SOC-2 ready.
All traffic uses TLS 1.3. Certificate pinning available for enterprise.
CostShield only logs metadata (model, tokens, cost). Your actual prompts and responses are never stored.
Every API call logged with timestamp, user, cost. Exportable for compliance.
Works With Your Favorite Tools
One-line config change
Setup guide →Use as base_url in LLM wrapper
Example code →Pass custom base_url
Example code →Configure proxy in config_list
Example code →Ready to Protect Your AI Budget?
Join developers who never worry about runaway OpenAI costs.