acme-health · this month
clinical-summary · prod
This customer is unprofitable.
- LLM cost
- $4,812
- Plan
- $2,400
- Margin
- −101%
- Requests
- 18,240
Cost vs plan
2.0×
- harbor-support−9%Unprofitable
- lumen-chat81%Healthy
For B2B SaaS with AI in the product
This customer is unprofitable.
OpenAI sends one bill. It does not show cost per customer. CostSlice does: by customer and by feature. Then you change the price.
No credit card needed for Starter.
No SOC 2. No HIPAA. Fail-open if we are slow.
acme-health · this month
clinical-summary · prod
This customer is unprofitable.
Cost vs plan
2.0×
OpenAI does not show cost per customer
The OpenAI dashboard is one total. The Costs API is still one total. Neither is cost per customer. CostSlice is.
Tag the feature on the call. Clinical summary, support copilot, docs search — the expensive line is often not the one the team is talking about.
Unprofitable is a badge, an icon, and the word. We do not cap or block LLM traffic. Starter has a hard request cap on the plan, not a kill switch on a customer.
OpenAI invoice · this month
$7,127
One line. Not attributed.
CostSlice · by feature
Your OpenAI API key
Stays yours
Install
One base_url
Starter
Free, no card
Prompt bodies
Never stored
Sample tenants, labeled. These are the same rows you get in a new workspace. Quotes live on the cards.
acme-health · sample
Unprofitable−101%
Plan price $2,400. LLM cost $4,812. Margin −101%. The row is Unprofitable before anyone asks finance.
“We thought the big logo accounts were the problem. The sample P&L put acme-health at the top of the list.”
harbor-support · sample
Unprofitable−9%
Cost $978 on a $900 plan. A small miss, still Unprofitable. Catch it while it is still 9%.
“Nine percent under is still red. Trim the window before this row looks like acme-health.”
lumen-chat · sample
Healthy81%
Cost $612 on a $3,200 plan. Healthy — sage badge, check, and the word. Same stack, different unit economics.
“Chat is healthy here. Stop giving it away on the accounts that are not.”
Two customers unprofitable
| Customer | Status | AI cost | Plan price | Margin | Requests |
|---|---|---|---|---|---|
| acme-healthsample | Unprofitable | $4,812 | $2,400 | -101% | 18,240 |
| harbor-supportsample | Unprofitable | $978 | $900 | -9% | 6,402 |
| lumen-chatsample | Healthy | $612 | $3,200 | 81% | 44,110 |
| northwind-analyticssample | Healthy | $441 | $1,800 | 76% | 3,901 |
| pebble-docssample | Healthy | $188 | $600 | 69% | 2,104 |
| untaggedsampleYour AI still answers | Set price | $96 | — | set price | 412 |
Tenant
acme-health
−101%
Unprofitable · talk pricing
Feature · acme-health
The leak is the SKU, not the model.
Download a cost spreadsheet for finance
acme-health,clinical-summary,4190,-101% harbor-support,copilot,978,-9% lumen-chat,chat,612,81%
Prompt bodies: never stored
When LLM cost is 2× the plan, the row is Unprofitable — badge, icon, and the word. Change the price or cut the feature from the SKU. We report it. We do not cap the tenant.
harbor-support is a small miss. A shorter context window, a cheaper model, or a cache on the hot path. Catch it while the bar is still 9%.
lumen-chat is Healthy on the same stack. The decision is not “turn off AI.” It is stop bundling the expensive line into the cheap plan.
Keep your OpenAI API key. This is a pass-through. Not a virtual key, not a gateway.
Today this is OpenAI. Claude and other models come later. Ten minutes. One header. CostSlice is a pass-through OpenAI proxy plus tenant P&L, not an AI gateway. No routing, fallbacks, cache, or virtual keys.
OpenAI SDK · this project
OpenAI API key. Yours. We never hold it.
01
Set base_url to CostSlice and send x-cs-key. Your OpenAI API key still authenticates the model call.
Request · 412ms
200
gpt-4o-mini
02
Pass opaque ids. Forget a tag and the completion still returns. It lands in untagged so you can fix instrumentation, not firefight dropped calls.
Tenant P&L · this month
acme-health
−101%
Unprofitable · talk pricing
03
See which accounts and features eat LLM margin. Raise a SKU, trim a window, or export CSV for a board pack.
After you sign in, copy x-cs-key from Get Started on the dashboard. Put both secrets in your product’s environment variables. You keep your OpenAI API key. We never store that OpenAI API key.
OPENAI_API_KEY and COSTSLICE_KEY in your product’s environment variables (.env, your server secrets, Vercel). Never in chat. Never inlined into a snippet pasted to Codex.https://api.costslice.com/v1 and send x-cs-key, plus x-cs-tenant (opaque id, never an email), x-cs-feature, x-cs-env (prod or staging).Already calling OpenAI in your product? An engineer changes the OpenAI address in that product to https://api.costslice.com/v1 and sends x-cs-key. Completions still go to OpenAI.
The snippet. It reads keys from your product’s environment variables:
api.costslice.com/v1
x-cs-key · x-cs-tenant · x-cs-feature · x-cs-env
from openai import OpenAI
import os
client = OpenAI(
base_url="https://api.costslice.com/v1",
api_key=os.environ["OPENAI_API_KEY"],
default_headers={
"x-cs-key": os.environ["COSTSLICE_KEY"],
"x-cs-tenant": tenant_id, # opaque id, never an email
"x-cs-feature": "support-copilot",
"x-cs-env": "prod",
},
)
resp = client.chat.completions.create(
model="gpt-5.6-terra",
messages=[{"role": "user", "content": "Summarize this ticket"}],
)org, request id, timestamp, provider, model, tenant, feature, x-cs-env (prod or staging), token counts, cost, latency, status, cost source. Hashed workspace keys. Optional plan prices.
Prompts. Completions. Your OpenAI API key (Authorization is forwarded, never logged). Training on customer data — we do not keep bodies to train on.
Ingest is fail-open. Forgotten tags never drop the call. We do not claim SOC 2 or HIPAA. The DPA is public. For a signed copy, email hello@costslice.com.
Request · metadata only
gpt-4o-mini · 412ms · 200
Before you start
Profit is per customer, not the company bill
Seven days of receipts is enough to see a customer P&L this month. That’s why Pro keeps 90 days.
If we kept prompts we would become a different company. Usage metadata is enough to price a tenant.
A meter that can take down chat is not a meter. Untagged traffic still completes.
Starter is free without a card. Overage on Pro and Scale is $6 / 100k requests.
Starter
$0
Pro
Recommended$79/mo
Scale
$199/mo
No credit card needed for Starter.