Connect Bifrost
Bifrost is a self-hosted LLM gateway by Maxim AI that routes requests to model providers and estimates the cost of every call. The Bifrost integration brings that data into DoiT Cloud Intelligence — one event per gateway request, labeled by provider, model, virtual key, team, and customer — so you can analyze who and what drives your LLM usage in Cloud Analytics next to your cloud bill.
Because Bifrost runs in your own infrastructure, this integration works differently from other connectors: instead of DoiT pulling data from a vendor API, you run a small open-source exporter — the bifrost-datahub-exporter — next to your gateway. The exporter polls the gateway's logs API and pushes events to the DataHub API. Your gateway credentials never leave your network, DoiT needs no network access into your environment, and the exporter never reads or transmits prompt or response content.
Bifrost bills nothing: you bring your own provider keys, and the authoritative spend already reaches DoiT through your provider and cloud billing feeds — the Anthropic and OpenAI integrations, Amazon Bedrock in your AWS bill, Vertex AI in your Google Cloud bill. Bifrost prices each request from its model-pricing catalog (including any pricing overrides you configured), and this integration ships those numbers as estimates for attribution and showback. Do not add the Bifrost dataset to your cloud bill totals. Every event carries a cost_basis: estimated system label. Bifrost can also reprice historical requests after catalog or override changes; recent restatements are picked up automatically, and a backfill re-run repairs older ones without double-counting.
Prerequisites
-
A self-hosted Bifrost gateway, version 2.0.0 or later, with logging enabled (it is on by default). Older gateways work best-effort without the input/output cost split.
-
A DataHub subscription included in your DoiT tier.
-
A DoiT account with the DataHub Admin permission to create the API token.
-
Somewhere to run one small container or binary beside your gateway: Kubernetes, docker-compose, or a VM.
Create a DoiT API token
-
Sign in to the DoiT console, select your avatar, and then select Profile.
-
Open the API tab and select Create token.
-
Select the DataHubAdmin scope, give the token a descriptive name, and copy the displayed token. The full token is shown only once.
Run the exporter
The exporter needs two settings: your gateway URL and the DoiT API token. Bifrost's logs API needs no credentials by default; if you enabled admin authentication on the gateway (governance.auth_config), also pass BIFROST_ADMIN_USERNAME and BIFROST_ADMIN_PASSWORD.
docker run -d --name bifrost-datahub-exporter \
-e BIFROST_BASE_URL=http://bifrost:8080 \
-e DOIT_API_KEY=... \
-v bifrost-exporter-state:/state \
ghcr.io/doitintl/bifrost-datahub-exporter:latest
On Kubernetes, use the Helm chart from the exporter repository, and run one exporter per Bifrost deployment — gateway replicas share one log store, so a single exporter covers them all. See the exporter README for the Helm chart, docker-compose, systemd, and air-gapped deployment options, plus the full configuration reference (poll interval, backfill depth, high-volume daily aggregation mode, and more).
The exporter is open source (Apache-2.0), so your security team can review every line that runs in your environment. Container images and static binaries are published per release, built by a public CI workflow, and signed with keyless cosign — see Verifying a release for the verification commands. If you prefer a binary over a container, download it from the repository's Releases page.
To verify the setup, run a single export cycle with the --once flag. Within about 15 minutes, your data appears in the DoiT console under DataHub > Datasets > Bifrost, and in Cloud Analytics reports under the Bifrost provider.
Label your traffic
Attribution labels come from Bifrost's governance hierarchy and request attribution:
-
Virtual key, Team, and Customer: derived automatically from the Bifrost virtual key each call was made with — a virtual key belongs to a team or directly to a customer. Give your virtual keys, teams, and customers descriptive names in Bifrost; the names appear as label values.
-
Feature: mapped from Bifrost's app attribution, which recognizes common tools automatically and buckets unknown callers as "Other" (never exported). To attribute your own applications, register their user agents under the gateway's user-agent mappings, or send a recognizable
User-Agentheader. -
Business unit and Project: exported automatically when your Bifrost plan populates them.
Reporting dimensions
| Cloud Analytics dimension | Bifrost value | Example |
|---|---|---|
| Provider | The DataHub dataset name | Bifrost |
| Service | The upstream model provider | anthropic, openai, bedrock |
| SKU | The model name | claude-sonnet-4-20250514 |
In addition to standard dimensions, the following labels are available:
| Label | Description |
|---|---|
| provider / model | Upstream provider and model |
| virtual_key | The Bifrost virtual key name |
| team | The team the virtual key belongs to |
| customer | The Bifrost governance customer |
| feature | Your application, from Bifrost's app attribution |
| business_unit / bifrost_project | Enterprise governance tiers, when present |
Metrics include Cost (estimated), Usage (total tokens), and the DataHub metrics Prompt Tokens, Completion Tokens, and — on gateway version 2.0.0 and later — Input Cost and Output Cost. Failed requests are exported at zero cost and tagged bifrost/status: error, so error rates stay reportable.
Bifrost costs appear in the GenAI Intelligence dashboard alongside other supported GenAI providers.
Data refresh and backfill
The exporter polls your gateway every five minutes by default, and events become visible in Cloud Analytics about 15 minutes after they are sent. On first run, set BACKFILL_DAYS to import history; backfill depth is bounded by your Bifrost log retention settings and DataHub's two-year window. Re-runs are idempotent — restarting the exporter or re-exporting a window updates existing events instead of double-counting them.
Delete your Bifrost data
Stop the exporter, then delete the Bifrost dataset under DataHub > Datasets in the DoiT console. Deleting the dataset removes all its events from Cloud Analytics.