Skip to main content
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.
Person attribution comes only from the personal key a request authenticated with, never from a client header or a name in a prompt. A shared key with no member bound is the correct home for spend that no individual should be charged for.

Set up chargeback

1

Use one project per cost center

Split projects by product line or environment (for example support-bot-prod and support-bot-staging). Projects are the cleanest subtotal finance can charge, and each one gets its own budget.
2

Label every key

Add consistent lowercase labels such as team-payments, env-prod, and cc-4120. Agree on a naming scheme up front so reports group cleanly.
3

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.
4

Tag workflows in code

Send x-cave-workflow with 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.
5

Send end-user hashes for per-customer cost

If you resell AI features, send x-cave-user-hash with a stable, opaque customer identifier. It is stored as sent and never linked to a member of your organization.
Example request with attribution headers
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.
Labels reflect each key’s labels as they are now, and a key with two labels counts under both. Label rows can add up to more than the total, so use projects or keys when you need subtotals that sum exactly.
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.