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.

Ironclad Monthly Limits
Hard budget enforcement

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).

Grace Periods & Alerts
Soft limits and warnings

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).

Flexible Budget Cycles
Auto-reset & custom cycles

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.

Live Request Stream
Real-time request logs

Every API call logged in real-time. See model, tokens, cost, duration, and status. Filterable and searchable.

Accurate Token Counts
99.9% accuracy

Precise token counting using tiktoken library. Input and output tokens tracked separately. 99.9% match with OpenAI's billing.

Cost Analytics
Visualize spending

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.

Configure in Seconds
One-line setup

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}"
      }
    }
  }
}
Full Compatibility
Tested with every version

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.

No SDK, No New API to Learn
OpenAI-compatible

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"
});
Streaming Support
Server-Sent Events (SSE)

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.

AES-256 Encryption at Rest

Your OpenAI API keys encrypted with AES-256-GCM before storage. GDPR, SOC-2 ready.

Encrypted in Transit

All traffic uses TLS 1.3. Certificate pinning available for enterprise.

We Don't Store Your Prompts

CostShield only logs metadata (model, tokens, cost). Your actual prompts and responses are never stored.

Complete Audit Trail

Every API call logged with timestamp, user, cost. Exportable for compliance.

Works With Your Favorite Tools

OpenClaw
Native integration

One-line config change

Setup guide →
LangChain
Compatible

Use as base_url in LLM wrapper

Example code →
LlamaIndex
Compatible

Pass custom base_url

Example code →
AutoGen
Compatible

Configure proxy in config_list

Example code →

Ready to Protect Your AI Budget?

Join developers who never worry about runaway OpenAI costs.