Skip to content

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.

Tenant tags: OpenAI cost per tenant. Workflows: n8n OpenAI cost. OpenAI cost P&L.

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

Questions

Can I see OpenAI spend per feature?
Yes. Send x-cs-feature on the same request as x-cs-tenant. The customer P&L splits cost by SKU.
Is the leak usually the model?
Often not. A summary that fires on every ticket can outspend a chat few seats use. Reprice the SKU.
How do I tag a feature?
Put a short name on x-cs-feature, such as chat, summaries, or copilot. Max 128 characters.
Do you store prompts?
No. We meter tagged usage. Bodies never hit our disk.