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.