AI Cost Attribution Layer

Know which customers
drove your AI spend.

OpenAI can't tell you which customer drove your bill. We can. Our open-source SDK instruments your LLM calls, tags them to customers, and pipes usage data to Stripe.

MIT LicensedSOC 2 CompliantSelf-hostable
Data FlowLive
{ }
Your Code
ai.chat.completions.create()
LLM Request
OpenAI
Direct connection
Telemetry
Attribute
Metadata only
$
Stripe
Billing meter
Customeracme_corp
Featuresummarizer
Cost$0.24

AI Provider Invoices

January 2026
GPT-5.2$38,420.00
Claude Sonnet 4.5$4,180.50
GPT-5-mini$720.00
Total$43,320.50
“Which customers drove this?”
The Problem

Your AI bill has no customer breakdown.

OpenAI sends one number. Anthropic sends another. You can't tell which customers drove those costs — or whether your pricing even covers them. Replace your brittle internal logging with infrastructure that works.

×
Engineering builds internal loggingWeeks of work. Breaks constantly. Finance never trusts it.
×
Finance can't calculate unit economics"Which customers are profitable on AI?" No one can answer.
×
Customers have no usage visibilityThey're billed for AI features but can't see what they consumed.
How It Works

Two lines of code. Full attribution.

Wrap your LLM calls with our SDK. We capture tokens, model, cost, and latency — tagged to your customer and feature.

your-app.ts
import { Attribute } from '@attribute/sdk'

const ai = new Attribute({
  apiKey: process.env.ATTRIBUTE_KEY,
  provider: 'openai'
})

// Use exactly like the OpenAI SDK
const response = await ai.chat.completions.create({
  model: "gpt-5.2",
  messages: [
    { role: "user", content: prompt }
  ],

  // Add these two lines:
  customerId: "cus_abc123",
  feature: "summarizer"
})

// → LLM call goes direct to OpenAI
// → Telemetry sent async to Attribute
1

Install the SDK

npm install @attribute/sdk — works with OpenAI, Anthropic, Azure, and Bedrock.

2

Tag customers and features

Add customerId and feature. We capture tokens, cost, model, and latency automatically.

3

Connect to Stripe

One-click OAuth. We push metered usage directly to Stripe's billing meters.

4

Embed customer portals

Drop in our React component. Customers see their usage by feature.

Customer Usage Portals

Show customers what they're paying for.

Customers paying for AI expect visibility. Attribute provides embeddable, white-labeled dashboards that live inside your app — usage by feature, limits, and history.

🔒app.yoursaas.com/settings/usage
Current Usage
$247.80
of $300 included
Requests
12,847
+18% vs last month
Tokens
2.4M
input + output
Remaining
$52.20
12 days left
Usage limit83% used
You'll be notified at 90%. Overages billed at $0.02/1K tokens.

Daily usage

7D
30D
90D
<AttributePortal customerId="cus_abc123" />

One component. Shows usage by feature. Themed to your brand.

Security

Your keys. Your calls. Our telemetry.

Attribute is not a proxy. Your LLM requests go directly to OpenAI, Anthropic, or your provider of choice. We only receive usage metadata — never prompts, never responses, never API keys.

🔑
Your API keys stay localKeys are never sent to Attribute. They stay in your environment.
Direct provider callsRequests go straight to OpenAI/Anthropic. No middleman, no added latency.
📊
Metadata onlyWe receive: token counts, model used, latency, cost. Not your prompts or completions.
🔒
SOC 2 compliantEnterprise-grade security. Your compliance team will approve.
Why It Matters

Attribution unlocks better unit economics.

Price with confidence

See actual cost-per-customer before setting prices. Move from flat fees to usage-based pricing with data, not guesses.

Catch margin problems early

Identify unprofitable accounts before they drain runway. Real-time visibility, not month-end surprises.

Build customer trust

Customers paying for AI expect to see their usage. Portals reduce billing disputes and churn.

Works with your stack

OpenAI
Anthropic
Azure
Bedrock
Stripe
Pricing

Free during beta.

We're looking for design partners to shape the product. Early adopters get full access — free — while we figure out pricing together.

Full SDK + attribution
Customer usage portals
Stripe integration
Direct access to founders
Become a design partner

Get early access.

We're onboarding design partners now. Join the waitlist and we'll reach out.