Swap one URL. Prompts are never stored. If CostGhost fails, your requests go through unmodified. Fail-open by default.
No SDK changes. No model mapping. 23 declarative routing rules with a learning cache that adapts to your traffic.
Point your existing OpenAI or Anthropic client at our gateway. One base URL change. Your code, prompts, and parameters stay identical.
Every request is classified in <1ms. Budget phase, task type, and priority determine the model. 23 rules, 5 budget phases, no latency overhead.
Low-priority classification? Haiku instead of Opus. Critical reasoning? Best model, guaranteed. You save on requests that never needed the expensive model.
Built on Cloudflare Workers with Durable Objects for per-tenant state. Deployed across 300+ locations. No cold starts.
Every claim on this page is backed by implemented code and automated tests.
Your prompts are never stored. Audit logs contain only metadata: model, cost, latency, tenant ID, timestamp. Prompt logging is explicit opt-in per tenant.
If the Durable Object times out (>800ms), your request goes to the provider unmodified. BYPASS_GATEWAY=true disables CostGhost entirely. Per-tenant configurable.
Set X-CG-Mode: observation. Your requests go through unchanged. CostGhost computes hypothetical savings in the background and logs them to R2.
23 rules ordered by specificity. First match wins. The learning cache (EMA) converges after ~500 requests to the cheapest model per task type that meets quality thresholds.
5 phases: GREEN through HARD_STOP. Sequential transitions only. Idempotent spend recording. Automatic monthly reset. Sub-budgets per team and project.
Every routing decision logged to R2. Append-only NDJSON, partitioned by tenant/day/hour. Full traceability of what was routed where and why.
Two API formats: /v1/chat/completions (OpenAI-compatible) and /v1/messages (Anthropic-native). Routing downgrades within the same provider only. No cross-provider payload rewrite.
No monthly minimum. No commitment. No hidden costs. You pay a platform fee on actual spend routed through CostGhost.
The 5% fee applies to total spend routed through CostGhost, not to savings. If CostGhost saves you nothing, the fee is still 5% of spend. We believe the routing engine pays for itself within the first week.
Change one line in your OpenAI or Anthropic client. No new dependencies, no config files, no migration.
Start with shadow mode. See your savings before you commit. No credit card.
We'll reach out within 24 hours to set up your tenant.