Skip to main content
A sub-account identifies who a charge belongs to within a provider. It might be a cloud project, a Grafana stack, a GitHub member, or a customer behind an AI gateway. Use sub-accounts to compare their spend and consumption in the same cost view. A CostGraph tenant is the workspace that contains your connected data and access settings. Provider sub-accounts appear inside that tenant’s cost data. They do not create separate CostGraph workspaces. Your CostGraph organization can contain several tenants. The following diagram shows customers grouped as sub-accounts within one tenant’s gateway data.
A CostGraph organization contains Production and Staging tenants. Production contains an AI gateway with acme, globex, and acme-qa customer sub-accounts, while Staging has separate data and settings.

Define sub-account identifiers

Sub-account rows come from identifiers in the data you connect or send.
  • Provider integrations import their account, project, stack, or user identifiers.
  • AI gateways can report a customer identifier with each request’s usage.
  • FOCUS imports can provide SubAccountId, SubAccountName, and SubAccountType.
For example, agentgateway can read acme from the x-costgraph-customer-id request header and export it as a customer metric attribute. After processing, the usage appears under the acme sub-account. Follow Attribute usage to your customers for the policy and request configuration.

Read the cost breakdown

Use the breakdown to compare what each sub-account consumed and what it cost. The following capture shows agentgateway expanded into its customer sub-accounts. The customer costs contribute to the provider total.
An expanded agentgateway cost row showing a total of $809.84 and acme, globex, and acme-qa sub-accounts contributing $392.73, $392.73, and $24.38.

Existing CostGraph capture with anonymized customer names.

1

Show sub-accounts

Open your cost breakdown and enable the Sub-accounts column. Each row shows its largest sub-accounts as chips.
2

Inspect usage and cost

Expand a row to see its sub-account breakdown. Compare usage quantity, unit, unit price, and billed, list, and contracted costs.If cost rises while usage stays similar, inspect the rate and discounts. If usage rises too, investigate what drove that consumption.
3

Focus the view

Select a sub-account to filter the view to it. You can also use sub-account as a grouping or filter directly.

Missing and mixed data

The breakdown distinguishes missing attribution from data that cannot be combined. CostGraph does not add hours and gigabytes into one quantity. Inspect the individual sub-accounts when a combined row omits quantity or unit price.

Provider identifiers

Each provider defines its own billing hierarchy. CostGraph keeps the provider’s identifier and type so you can distinguish an account, project, stack, or customer.

Sub-account data sources

Provider integrations import the sub-account information the provider supplies. AI gateways attribute requests to customers. FOCUS imports can specify a sub-account for each row.

AI gateways

Attribute model usage to the customers making requests.

Push FOCUS data

Include customer and sub-account identifiers in imported cost data.