OpenAI spend per feature — the leak is often the SKU, not the model
Teams blame the model. The leak is often the SKU: a summary job that fires on every ticket, a copilot that retries. Name the feature on the request.
Chat, summary, and copilot share a model and still lose money in different places. A summary that runs on every ticket will outspend a chat that a few seats use. Reprice the SKU, not the model card.
Send x-cs-feature on the same request as x-cs-tenant and x-cs-key. The customer P&L splits OpenAI spend per feature. Point the client at https://api.costslice.com/v1.
api.costslice.com/v1
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",
},
)
Put OPENAI_API_KEY and COSTSLICE_KEY in your product’s environment variables. We never store the OpenAI API key.
Worked example: on the sample, clinical-summary is the SKU that sinks acme-health. Chat on another customer can still look healthy on the same stack. Reprice the feature, not the model. See the sample P&L.
Starter is free. No credit card. Operator: Media Yard LLC, PO Box 73, Pennsauken, NJ 08110. hello@costslice.com