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.

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

AuthorizationYour OpenAI key. Forwarded. Never logged.
x-cs-keyCostslice workspace key. Identifies your org.
x-cs-tenantOpaque tenant id, max 128 chars. Not an email.
x-cs-featureFeature name, max 128 chars.
x-cs-envprod | 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.