Documentation
Costslice docs
Costslice is a pass-through OpenAI proxy plus a tenant P&L. It is not an AI gateway: no routing, fallbacks, semantic cache, or virtual keys. We store usage metadata only — never prompts or completions.
- 10-minute quickstart — Python, Node, and Vercel AI SDK
- Proxy host:
https://api.costslice.com/v1 - App:
https://costslice.com - Usage API:
GET https://costslice.com/api/v1/spendwithx-cs-key
What we store
Per request: org, request id, timestamp, provider, model, tenant, feature, env, token counts, cost, latency, status, and whether cost came from the provider, an estimate, or an unpriced model. No body. No payload logging in MVP, and we do not train on customer data because we do not keep it.
Headers
| Authorization | Your OpenAI key. Forwarded. Never logged. |
| x-cs-key | Costslice workspace key. Identifies your org. |
| x-cs-tenant | Opaque tenant id, max 128 chars. Not an email. |
| x-cs-feature | Feature name, max 128 chars. |
| x-cs-env | prod | staging | dev. Defaults to prod. |
Missing tenant: we accept OpenAI user, then fall back to untagged. We fail-open on tags so a forgotten header never eats the completion.