- OpenRouter
- Fireworks: the Fireworks bill doesn’t break down by key or user, and lists models by display name.
- Azure CSP: only direct Azure billing is supported.
disable_content_logging to true in the Bifrost OpenTelemetry configuration, as shown in Step 2, so Bifrost does not export prompt or completion content. This data is not used to train any models.
How It Works
Bifrost’s OpenTelemetry plugin sends trace spans for each request tohttps://ingest.vantage.sh/v1/traces, authenticated with an ingest token you create in Vantage. Vantage stores the spans, builds a daily usage index for each provider from them, and joins that usage to your provider costs during each provider’s cost ingestion.
See How LLM Enrichment works for the shared indexing, join, split, and tag pipeline.
How Bifrost Usage Is Matched to Your Bill
Map your Bifrost provider keys to your provider API keys for exact attribution. With a key mapping, a Bifrost key’s usage is tagged only on the cost rows for that API key. Unmapped usage is matched by day, model, and token type (input, output, cache read, and cache write) within each cost integration you select in Step 3. Key mappings are available for OpenAI and Anthropic (Claude API) keys, and you manage them yourself in Step 4. Azure OpenAI and Google Cloud Vertex AI bills don’t break down by API key, so their usage is always matched by day, model, and token type. AWS Bedrock usage is matched to the AWS account each Bifrost deployment declares; see AWS Bedrock Usage Through Bifrost. Tags from Bifrost apply only to usage that went through Bifrost. If you also call your provider directly with the same API key, that usage still appears on your bill under the key, but without Bifrost’s tags. To tag all of a key’s spend, send all of its traffic through Bifrost, or use a separate key for traffic outside Bifrost.Claude Code Usage Through Bifrost
When developers sign in to Claude Code with their Anthropic account (OAuth) and route it through Bifrost, Vantage attributes that usage to each user. On a Claude.ai (Anthropic Analytics) cost integration, each user’s Bifrost usage is matched by email, case-insensitively, to that user’s Claude Code cost rows rather than spread across everyone. Each user’s cost rows then carry the virtual key and dimensions from that user’s Bifrost requests, alongside thevntg:ai:user_email tag the Claude.ai bill already provides. Anthropic usage that Bifrost serves with its own provider key follows the standard matching above.
Per-user matching requires the following:
- You run Bifrost Enterprise.
- Each user exists in Bifrost with the same email as their Claude seat, for example provisioned through SSO, SCIM, or directory sync.
- Each user’s Claude Code requests carry a Bifrost virtual key assigned to that user, sent in the
x-bf-vkheader alongside their OAuth sign-in.
/anthropic route and pass the user’s virtual key in a custom header, for example in their Claude Code settings.json:
ANTHROPIC_API_KEY, ANTHROPIC_AUTH_TOKEN, or apiKeyHelper in this mode, or Claude Code stops using the subscription sign-in. See Bifrost’s Claude Code documentation for details.
AWS Bedrock Usage Through Bifrost
Bedrock costs come from your AWS cost integration. To match each Bifrost deployment’s Bedrock usage to the right AWS account’s cost rows, declare the AWS account on the deployment with the standard OpenTelemetry resource attributecloud.account.id, as shown in Step 2. Bifrost attaches the attribute to the traces it exports, and Vantage matches that deployment’s Bedrock usage only to Bedrock cost rows for that usage account. This doesn’t require an IAM role, an IAM principal on your bill, or CUR 2.0.
When you set cloud.account.id, you are declaring which AWS account pays for the deployment’s Bedrock requests:
- Use the account that signs the requests: Set the 12-digit ID of the AWS account that owns the credentials Bifrost uses to call Bedrock. Don’t infer it from an environment name or from the account that hosts the gateway.
- Vantage uses the value as declared: Bifrost doesn’t discover or verify the account ID. Vantage ignores values that aren’t exactly 12 digits.
- The value covers the whole deployment: It applies to everything the deployment exports, so all of that deployment’s Bedrock traffic must be billed to the declared account.
- Deployments are independent: Several deployments can declare the same account, and deployments that send to the same Vantage feed can declare different accounts.
- Keep it current: Update the value when the account that signs Bedrock requests changes. A wrong value leaves usage unmatched (Account scope empty in Token Metrics) or attributes it to the wrong account.
- It’s for Bedrock only: Vantage reads
cloud.account.idonly for Bedrock usage. Deployments that don’t call Bedrock don’t need it.
- One AWS integration: Vantage spreads the usage across that integration’s accounts in proportion to each account’s billed Bedrock usage that isn’t already covered by usage with a declared account.
- More than one AWS integration: Vantage can’t tell which integration the usage belongs to, so it withholds the usage rather than guess. It appears as Ambiguous sibling withheld in Token Metrics.
vntg:ai:principal_id tag.
If you also use AWS Bedrock LLM Enrichment, don’t report the same Bedrock requests through both sources. Your cost isn’t double counted, but each source’s tags get only part of the matching cost.
How Cost Rows Are Split
Vantage splits each matching provider cost row into enriched rows, allocated proportionally by token share. Splits are additive, so the enriched rows always reconcile to the original total: usage your logs do not cover stays on a leftover row, and cost rows with no matching usage, along with tax line items, pass through unsplit. Enabling enrichment never changes your totals.How Cost Splitting Works
Data Freshness and Backfill
Enrichment runs as part of each provider’s existing cost ingestion, so it follows that provider’s refresh cadence. Recent days are reprocessed within a rolling three-day window so late-arriving traces are picked up. See the provider data refresh documentation for per-provider timing. Enrichment begins from when Bifrost starts exporting traces to Vantage; it does not backfill spend from before the export was running. Re-enrichment reads the already-normalized cost data, so it does not require a full cost re-import. Traces that Bifrost fails to deliver to Vantage are not retried later, so that usage stays untagged. To catch delivery problems early, alert on Bifrost’sfailed to emit trace log message.
Prerequisites
Before you begin, make sure:- An active cost integration exists for at least one supported provider: OpenAI, Anthropic, AWS, Google Cloud, Azure, SpaceXAI, Baseten, Modal, or Together AI.
- You run Bifrost v1.5.9 or later, and can enable its OpenTelemetry plugin (through the Bifrost web UI,
config.json, or Helm values) and set environment variables. See Supported Bifrost Versions. - Your Bifrost deployment has outbound HTTPS access to
ingest.vantage.sh. - You have a Vantage Organization Owner or Integration Owner role. See Role-Based Access Control.
Supported Bifrost Versions
Vantage supports Bifrost v1.5.9 and later. We recommend v2.4.0 or later: earlier versions can occasionally omit token usage from very short streaming responses, which leaves that usage out of Vantage.Set Up Bifrost Enrichment
Setup happens on the feed’s Manage tab in Vantage. After you connect the source and turn on enrichment, follow the four numbered steps on the tab: create an ingest token, configure OpenTelemetry on Bifrost, configure which cost integrations to enrich, and map your provider keys.Step 1: Create the Feed and an Ingest Token
Open the Bifrost integration
Connect the source
Turn on enrichment
Create an ingest token
Production Bifrost), then select Create token.Copy the token
vntg_ti_.Step 2: Configure OpenTelemetry on Bifrost
Under Step 2: Configure OpenTelemetry on Bifrost, Vantage shows the plugin configuration to use. Select the copy icon to copy it:Set the ingest token environment variable
VANTAGE_INGEST_AUTHORIZATION to the complete header value: the word Bearer, a space, and the token from Step 1. Bifrost replaces the whole header value with the variable, so omitting Bearer causes Vantage to reject the traces.(AWS Bedrock only) Declare the AWS account
cloud.account.id to the OTEL_RESOURCE_ATTRIBUTES environment variable. Replace 123456789012 with the 12-digit ID of the AWS account that owns the credentials Bifrost uses to call Bedrock:OTEL_RESOURCE_ATTRIBUTES is already set, append the attribute to the existing comma-separated list instead of replacing it, so you keep your other attributes:env in your Deployment manifest:OTEL_RESOURCE_ATTRIBUTES is an environment variable on the Bifrost process, not a field in the otel plugin’s config.json. Skip this step for deployments that don’t call Bedrock. See AWS Bedrock Usage Through Bifrost for what the value declares and how to choose it.Enable the OpenTelemetry plugin
- Web UI: Go to Observability > OpenTelemetry and enter the values from the table above, including Collector URL, Trace Type, Protocol, and Headers. Use Configure Plugin Tracing to exclude plugin spans.
config.json: Add the configuration as theconfigof theotelplugin:
- Helm: Set the same keys under
bifrost.plugins.otel.configin your values file, and mapVANTAGE_INGEST_AUTHORIZATIONfrom a Kubernetes secret.
trace_headers requires Bifrost v2.0.0 or later. On v1.5.9 to v1.x, use headers instead, with the same Authorization value.Starting with Bifrost v2.3.0, the web UI and API reject env. references in the OpenTelemetry plugin when Bifrost’s dashboard authentication is turned off. In that case, turn on dashboard authentication or configure the plugin through config.json or Helm.Restart Bifrost
config.json or Helm changes. On Kubernetes, applying the updated Deployment manifest rolls out new pods with the new environment. Traces begin flowing to Vantage with your next requests through the gateway.Step 3: Configure Cost Integrations
Under Step 3: Configure Cost Integrations, select Configure Providers. On the Configure Bifrost Providers screen, under Provider Connections, select the connected cost integrations that should receive enrichment from Bifrost, then select Save. Route all traffic for each provider you select through Bifrost, so that every request billed to the integration carries Bifrost’s tags. Vantage enriches costs for the selected integrations on each provider’s next data refresh. Provider cost integrations you connect later are not enriched automatically; return to Configure Providers to enable them.Step 4: Configure Key Mappings
Under Step 4: Configure Key Mappings, map each Bifrost provider key to the OpenAI or Anthropic (Claude API) API key it uses, so Vantage tags that key’s usage only on that API key’s cost rows. A Bifrost key ID is the ID Bifrost assigns to a provider key you configured in Bifrost, not a virtual key. Key mappings are optional; unmapped usage is matched by day, model, and token type. Configure an OpenAI or Anthropic cost integration in Step 3 before you add key mappings. The provider keys you can choose come from the integrations selected there. Once traffic flows, Bifrost keys that Vantage sees in your traces appear in the table automatically with an Unmapped status, and a warning shows how many keys are unmapped. The table lists each key’s Bifrost key ID, Provider, Provider key, and Status (Mapped or Unmapped).Open the mapping dialog
Choose the provider key
Save the mapping
Attribute Usage with Virtual Keys and Request Dimensions
Bifrost Enrichment tags each enriched row with the attribution your gateway already knows about, plus any custom dimensions you attach per request.Virtual Keys
Issue a Bifrost virtual key for each team, application, or customer you want to attribute spend to, and name it accordingly (for example,search-team or support-bot). Vantage tags each request’s usage with the virtual key’s name as vntg:ai:virtual_key. Applications send the virtual key in the x-bf-vk header or as Authorization: Bearer sk-bf-....
Usage without a virtual key carries no vntg:ai:virtual_key tag. New deployments of Bifrost v2.2.6 and later require a virtual key on every request by default. On older versions, and on existing deployments that haven’t turned it on, turn on Enforce Virtual Keys on Inference in Bifrost’s security settings (client.enforce_auth_on_inference in config.json) to attribute all gateway traffic.
Custom Dimensions
Attach your own dimensions withx-bf-dim-<name> request headers. No additional Bifrost configuration is needed. Each dimension becomes a tag on the enriched rows for that request’s usage. The tag key is the header name with the x-bf-dim- prefix removed, lowercased, with hyphens kept, so x-bf-dim-Cost-Center becomes the tag cost-center. Bifrost reserves the names path and method, so x-bf-dim-path and x-bf-dim-method are ignored.
team=search, feature=summarization, and environment=production, along with the virtual key’s name.
Follow these guidelines for dimensions:
- Keep casing consistent: Vantage stores tag values exactly as sent, so
Searchandsearchbecome two different values. Standardize values in your applications, or merge variants afterward with a Virtual Tag. - Use bounded values: Dimensions like team, feature, and environment work well. Avoid per-request identifiers such as request IDs or timestamps: Vantage drops tag keys whose values are nearly unique per request.
- Do not send secrets or personal data: Dimension values become visible tags in Vantage.
Manage Bifrost Enrichment Sources
Manage your feed from the Bifrost integration page. Each account has one Bifrost feed. The Connected Feeds table lists it with its Feed Token, Cost Providers, Status (for example, Pending before an import starts, Importing while one runs, Stable once all imports succeed, Warning if only some imports fail, Error if an import fails, or Paused if enrichment is paused), and Created On date. Select the feed token to open the feed. It has two tabs: Enrichment History and Manage, which holds the Uses section, the setup steps, ingest tokens, provider selection, and key mappings.Choose Which Integrations Are Enriched
On the Manage tab, select Configure Providers to change which connected cost integrations receive enrichment. You can enrich one cost integration per provider, or several AWS integrations. Disabling an integration stops going-forward enrichment for it but leaves its existing enriched history in place.Manage Ingest Tokens
Create additional tokens under Step 1: Manage Ingest Tokens on the Manage tab, for example to give each gateway or environment its own token, or to rotate a token before it expires. To rotate a token, create a replacement, updateVANTAGE_INGEST_AUTHORIZATION on your Bifrost instances and restart them, then select Revoke next to the old token and confirm with Revoke token in the Revoke ingest token? dialog. Requests that use a revoked token are rejected within about 30 seconds, and other tokens keep working. Revoking cannot be undone.
You can also list, create, and revoke ingest tokens with the Vantage API. See List ingest tokens, Create ingest token, and Revoke ingest token.
View Enrichment History
Open the feed and select the Enrichment History tab. The Enrichment Runs table shows every run for this feed. The Enrichment Runs table lists one row per provider cost integration and billing period that ran enrichment, newest first, with columns for the Integration (and its account), Status, Tokens Kept, Log Lines Kept, Bill Match, Billing Period, and Last Run At. Lifecycle changes appear as their own rows: Added when enrichment is first enabled for an integration, and Paused or Resumed when you stop, disable, resume, or re-enable it. The three percentages look similar but measure different things at different stages, so a low number in one column means something very different from a low number in another:LLM Enrichment History
Pause or Resume Enrichment
To pause enrichment, open the feed’s Manage tab and, under Uses, select Pause next to Enrichment. Vantage stops enriching new cost data for the feed, but your existing enriched history is left unchanged and the feed’s ingest tokens keep working. While enrichment is paused, you can’t change the feed’s providers or key mappings. To resume, select Resume next to Enrichment. Resuming restarts going-forward enrichment for the integrations that were active when you paused it; integrations you had already disabled individually stay disabled.View Enriched Costs on Cost Reports
Once enrichment runs, a single provider cost line is split into multiple rows, each carrying enrichment tags. You can filter and group by these tags anywhere tags are supported: Cost Reports, Virtual Tags, Budgets, and Cost Alerts. Because enrichment splits (allocates) your provider costs, enrichment tags behave like Vantage’s cost allocation tags: you can build a Virtual Tag on them, but a cost can be allocated only once, so an enrichment tag can belong to only one allocation chain.Enrichment Tag Reference
Vantage builds each usage record’s tags from the Bifrost trace: yourx-bf-dim-* dimensions and the virtual key name.
team lines up across OpenAI, Anthropic, and the other providers, and you can group your entire AI stack by one team tag. Because Bifrost lowercases header names, x-bf-dim-Team and x-bf-dim-team produce the same team key, but values keep their casing. Dimension names that collide with a Vantage-managed name (such as model or user_id) are re-emitted under the vntg:ai: prefix, and keys that already start with vntg:ai: are ignored.
vntg:ai:* tags (such as vntg:ai:model); split rows also carry the tags from their usage slice. The leftover row (usage not covered by Bifrost traces) keeps the provider’s existing tags and the applicable vntg:ai:* tags but carries none of the slice tags. Request identifiers are never turned into tags. Vantage may also apply a tag denylist to drop noisy or sensitive keys before they become tags.- To group: open the Group By menu, select Tag, and choose the tag key, for example
vntg:ai:model, or one of your own keys such asteam. - To filter: open the Filters menu, click New Rule, select Tag, choose the Tag Key, then pick an operator and one or more values.
Troubleshooting
My feed stays on Pending
My feed stays on Pending
- Enrichment is turned on under Uses on the feed’s Manage tab. A new feed starts with enrichment turned off and shows Paused until you turn it on.
- Bifrost is exporting traces: the OpenTelemetry plugin is enabled with the configuration from Step 2, Bifrost was restarted after you set the environment variable, and requests are flowing through the gateway.
VANTAGE_INGEST_AUTHORIZATIONis set on every Bifrost instance toBearerfollowed by the full token, and the token is Active (not Expired or Revoked) under Step 1: Manage Ingest Tokens.- Bifrost can reach
https://ingest.vantage.shover outbound HTTPS. Check Bifrost’s logs for export errors such as401or403responses, which mean the token is missing, malformed, expired, or revoked. - At least one cost integration is selected under Configure Providers (Step 3), with no more than one per provider other than AWS.
Enrichment History shows No logs
Enrichment History shows No logs
A provider is not being enriched
A provider is not being enriched
- Confirm the provider has exactly one cost integration selected under Configure Providers (AWS can have several). If you see
Select no more than one cost integration per provider.when saving, deselect the extra integration. - Confirm the provider is one of the supported providers and that its cost integration is active. OpenRouter, Fireworks, and Azure CSP aren’t supported through Bifrost.
- For Anthropic, confirm you selected the integration whose bill your Bifrost traffic lands on: Claude.ai for Claude Code subscription usage, or Claude API for usage served with your API keys.
- Allow a full data refresh for that provider to complete after connecting. Enrichment applies on the next refresh.
Bedrock usage isn't attributed to the right AWS account
Bedrock usage isn't attributed to the right AWS account
- Confirm each Bifrost deployment that calls Bedrock has
cloud.account.id=<12-digit account ID>in itsOTEL_RESOURCE_ATTRIBUTESenvironment variable, that the value is the account that signs its Bedrock requests, and that you restarted Bifrost after setting it. See AWS Bedrock Usage Through Bifrost. - Confirm the AWS cost integration that contains that account is selected under Configure Providers.
- On the feed’s Enrichment History tab, open the AWS run’s Token Metrics. Account scope empty means usage declared an account that has no matching Bedrock cost rows. Open its sample records:
failed_on_log_valueslists the account IDs your deployments declared, which you can compare to the accounts on your bill. Ambiguous sibling withheld means usage without a declared account was withheld because more than one AWS integration is selected. - On a Cost Report filtered to Amazon Bedrock, group by account and by
vntg:ai:virtual_keyor one of your dimension tags to confirm each deployment’s enriched costs land on the expected account.
Claude Code usage isn't attributed to individual users
Claude Code usage isn't attributed to individual users
x-bf-vk header. Also confirm the Claude.ai integration, not Claude API, is selected under Configure Providers. Users whose email doesn’t match a Claude Code cost row appear under User email scope empty in the run’s Token Metrics, and its sample records list the emails that didn’t match. See Claude Code Usage Through Bifrost.My costs are not being split
My costs are not being split
- Enrichment is paused, or no usage was received for that billing period.
- The cost row’s model or token type could not be matched to Bifrost usage for that provider, date, and token kind.
- The requests carried no virtual key or dimensions, so there was nothing to split by. Issue virtual keys or attach custom dimensions.
I can't update providers or key mappings
I can't update providers or key mappings
This Bifrost source is stopped. Resume it before updating providers. or This Bifrost source is stopped. Resume it before updating key mappings., enrichment is paused or hasn’t been turned on yet. Under Uses on the Manage tab, select Resume next to Enrichment, or for a new feed, select Enrichment and then Save Uses. See Pause or Resume Enrichment.If Add Key Mapping is unavailable and you see Configure a cost integration in Step 3 before adding key mappings., select an OpenAI or Anthropic (Claude API) cost integration under Configure Providers first.I lost my ingest token
I lost my ingest token
VANTAGE_INGEST_AUTHORIZATION on your Bifrost instances, and restart them. Then revoke the old token. If copying fails in your browser, select Show and copy the token manually before you leave the page.I can't tell which costs were enriched
I can't tell which costs were enriched
- Check coverage in Enrichment History: Open the source’s Enrichment History and review Tokens Kept (the share of your logged tokens Vantage attached to a cost row) and Bill Match (the share of eligible provider cost rows that received logged usage) for each integration and billing period.
- Check a Cost Report: Filter to the provider, then group by one of your own tag keys. Costs from requests that carried that key show its values. The leftover row (the portion of the bill your usage did not cover) and any usage sent without that key appear as Not tagged with the key name.
My totals changed after enabling enrichment
My totals changed after enabling enrichment
Use Cases
Each row below shows example attribution to set up in Bifrost and what it enables in Vantage. The dimension names are examples; you choose your own. All rows assume Bifrost is exporting traces to Vantage.Frequently Asked Questions
Which providers are supported?
Which providers are supported?
Is AWS Bedrock supported?
Is AWS Bedrock supported?
cloud.account.id resource attribute so Vantage can match usage to the right account. See AWS Bedrock Usage Through Bifrost.Do I need to map my Bifrost provider keys to my provider API keys?
Do I need to map my Bifrost provider keys to my provider API keys?
How does Claude Code attribution work?
How does Claude Code attribution work?
vntg:ai:user_email tag from the Claude.ai bill. Each user needs to exist in Bifrost with the same email as their Claude seat and send their own virtual key. See Claude Code Usage Through Bifrost.Do I need to change my application code?
Do I need to change my application code?
x-bf-dim-* headers to requests. Vantage can’t infer ownership from token counts alone.Can I run multiple Bifrost instances or replicas?
Can I run multiple Bifrost instances or replicas?
cloud.account.id on each one.Do I still need Custom LLM Enrichment?
Do I still need Custom LLM Enrichment?
Should I also use Custom LLM Enrichment for the same traffic?
Should I also use Custom LLM Enrichment for the same traffic?
What Vantage permissions do I need to enable this?
What Vantage permissions do I need to enable this?
Will this change my totals or break existing reports?
Will this change my totals or break existing reports?
Does Vantage store my prompt content?
Does Vantage store my prompt content?
disable_content_logging set to true, as in the recommended configuration, Bifrost does not export prompt or completion content to Vantage.