Caveman Cloud· HostedGovernance & Billing
Allocate AI spend to teams, people, and cost centers
Attribute Caveman Cloud model spend to people, teams, workflows, and customers with personal keys, key labels, projects, and headers for chargeback.
Caveman Cloud attributes every gateway request to the key that signed it, the project it ran under, and any workflow, agent, or end-user labels it carries. Set these up deliberately and the Spend page becomes a ready-made showback or chargeback report: cost per team, per developer, per product feature, or per customer. This page shows which signals to set and how they map to report axes.
Attribution signals#
Model, provider, endpoint, and task type are recorded automatically and show what the money bought rather than who spent it.
Set up chargeback#
Use one project per cost center
Split projects by product line or environment (for example
support-bot-prodandsupport-bot-staging). Projects are the cleanest subtotal finance can charge, and each one gets its own budget.Label every key
Add consistent lowercase labels such as
team-payments,env-prod, andcc-4120. Agree on a naming scheme up front so reports group cleanly.Give developers personal keys
Bind a key to each developer for local work and coding agents. Their spend then appears under their name on the People axis.
Tag workflows in code
Send
x-cave-workflowwith the job name (resolve-ticket,summarize-thread), or set a default workflow on the key. Workflows are the closest unit to a cost object a finance team can price.Send end-user hashes for per-customer cost
If you resell AI features, send
x-cave-user-hashwith a stable, opaque customer identifier. It is stored as sent and never linked to a member of your organization.
curl "${CAVE_GATEWAY_URL}/openai/v1/chat/completions" \
-H "authorization: Bearer ${CAVE_API_KEY}" \
-H "x-cave-upstream-key: ${OPENAI_API_KEY}" \
-H "x-cave-workflow: resolve-ticket" \
-H "x-cave-user-hash: 8f14e45fceea167a" \
-H "content-type: application/json" \
-d '{"model": "gpt-4o-mini", "messages": [{"role": "user", "content": "Hi"}]}'See Authentication for the gateway URL and provider key options.
Read the reports#
Open Spend and pick an axis. Axes are split into who spent (People, Coding agents, Keys, Labels, End users, Projects, Workflows) and what it bought (Task types, Models, Providers, Endpoints). Each axis has an unattributed bucket, such as No person attributed or Unlabeled workflow, so you can see how much spend still lacks a label.
For custom reports or exports to a finance system, query spend directly with SQL. More on reading spend in Traces and spend. To chart allocation over time or alert on it, build a custom dashboard.
Who can see per-person spend#
Owners, Admins, and members with the Billing role can read billing and per-person spend. Every member can see the traffic on their own personal key.