> For the complete documentation index, see [llms.txt](https://docs.revenium.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.revenium.io/integrations/provider-integrations.md).

# Provider Integrations

While the Revenium SDK intercepts your live application traffic, connecting your underlying AI provider accounts (OpenAI, Anthropic, AWS Bedrock, Google Vertex AI, Azure, fal.ai, Runway, OpenRouter, LiteLLM, Cursor) unlocks the other half of the FinOps picture: provider-native cost data synced directly from each provider's billing system.

> <i class="fa-square-info">:square-info:</i> **Note on Provider Permissions:** Different AI platforms have different permission models. Always check the specific instructions on the **Link Provider** screen, and use the credential type called out below for each provider. The wrong key type will authenticate but return zero billing data.

When you add your provider API Keys, Revenium actively syncs with the provider to pull granular usage records and workspace data. This unlocks four primary dashboard views:

<table><thead><tr><th width="204.390625">Insight</th><th>What It Tells You</th></tr></thead><tbody><tr><td><strong>Workspaces</strong></td><td>Provider billing and Revenium-metered spend side by side, with a named coverage-health state that helps you identify under-metered activity.</td></tr><tr><td><strong>API Keys</strong></td><td>A breakdown of cost, usage, and tokens by individual API key to help you spot rogue or uninstrumented scripts.</td></tr><tr><td><strong>Models</strong></td><td>The true cost per 1M tokens (or provider-specific unit) across all your active AI models so you can compare performance vs. price.</td></tr><tr><td><strong>Management</strong></td><td>Workspace naming and organization controls that make provider-generated identifiers easier for teams to understand.</td></tr></tbody></table>

***

## Supported Providers

Each connected provider syncs cost, usage, and workspace data using its own native billing API.

* **OpenAI** – GPT, DALL-E, embeddings, and all OpenAI API services. Requires an **Organization Admin API key** — project-scoped keys cannot read billing or usage data.
* **Anthropic** – Claude models and all Anthropic API services. Note: request counts may show as `N/A` because Anthropic's billing API does not expose them.
* **AWS Bedrock** – Synced via the AWS Cost Explorer API. Requires **IAM user credentials** (Access Key ID + Secret), not Bedrock API keys. Bedrock API keys (`ABSK...`) can invoke models but cannot read billing. **Provider credits applied** (AWS Activate, enterprise agreements) are captured per-day per-model and visible on the dashboard.
* **Google Vertex AI** – Synced via BigQuery Billing Export. Cost data has a 24–48 hour delay — this is BigQuery export latency, not a sync issue. **Provider credits applied** (GCP startup credits, enterprise agreements) are captured per-day per-model and visible on the dashboard.
* **fal.ai** – 600+ image, video, audio, and LLM endpoints. Requires an **ADMIN** API key — regular user keys cannot return cost or usage breakdowns.
* **Runway** – Video and image generation (Gen-4, Gen-4 Turbo). Credits are converted to dollars at 1 credit = $0.01.
* **OpenRouter** – Multi-provider gateway with 200+ models. Standard API key required; an optional Provisioning Key (Team/Enterprise plans) unlocks per-user and per-request usage breakdowns.
* **Azure** – Synced via the Azure Cost Management API using a Service Principal. Requires an **App Registration** with Client ID, Client Secret, Tenant ID, and Subscription ID. The Service Principal must have the **Cost Management Reader** role at subscription scope. Cost data is delayed 8–24 hours for EA/MCA agreements and up to 72 hours for Pay-As-You-Go subscriptions.
* **LiteLLM** – Self-hosted proxy with unified access to 100+ LLM providers. Revenium connects to your proxy's API; LiteLLM itself is not hosted by Revenium.
* **Cursor** – Coding-assistant usage synced automatically by Revenium, with no CLI to install. Requires a Cursor **team** API key — a personal user key will not work. Usage is synced every 5 minutes.

***

## Provider Credits (AWS Bedrock + Google Vertex AI)

Customers on AWS or GCP often receive provider credits — AWS Activate, GCP startup credits, enterprise agreements — that reduce their real AI spend. Revenium captures these credits and displays them alongside list-price costs so margin reporting reflects what you're actually paying, not just the sticker price.

### What's Captured

For both AWS Bedrock and Google Vertex AI, Revenium ingests applied credits from each provider's billing surface:

* **AWS Bedrock** – credits retrieved from AWS Cost Explorer alongside Bedrock billing cost data.
* **Google Vertex AI** – credits retrieved from the BigQuery billing export (sums GCP credit types — promotional, committed-usage discounts, and others).

Credits are stored at the same grain as cost: per organization, per workspace, per API key, per model, per day.

### Where To Find It

The provider cost dashboard exposes credits applied per provider so you can see the gap between list-price spend and real spend in one view. Net cost = total cost − credits applied.

{% hint style="info" %}
**Sign convention:** `creditsApplied` is stored as a positive number representing the credit amount. Net cost = `totalCost − creditsApplied`.
{% endhint %}

{% hint style="info" %}
**AWS service-level credits:** Some AWS credits arrive scoped to the Bedrock service rather than to a specific model. These are reported under the model bucket `bedrock-general` so you can still see the spend impact even when AWS does not attribute them to a particular foundation model.
{% endhint %}

### Why It Matters

* **Margin accuracy** — list-price reporting overstates real AI cost when credits are in play.
* **Budget planning** — knowing how much of current spend is offset by credits helps forecast when credits run out.
* **Customer reporting** — net cost is the number that flows to invoicing and chargebacks.

### Out Of Scope

* Azure (billing integration available, but credit capture is not yet supported).
* Other cloud providers (only AWS Bedrock and Google Vertex AI have credit capture in this release).

***

## How Provider Sync Works

1. **Connect provider accounts** from **Connections → Providers** using the **Link Provider** button.
2. **Automatic sync** pulls workspaces, API keys, and usage data from provider billing systems on a regular schedule.
3. **Manual refresh** is available from the Provider Dashboard via the **Refresh Data** button — useful right after adding new keys, or when troubleshooting discrepancies. A manual refresh may take 30–60 seconds.
4. **Historical tracking** compares the current period against the previous period to surface trends and outliers.

***

## How to Link a Provider

1. Head to [Connections → Providers](https://app.revenium.ai/connections/providers) in the left sidebar and click **Link Provider**.
2. Select your AI platform, drop in your credentials, and confirm.

Revenium authenticates the credential and starts syncing historical data immediately.

### Credential Quick Reference

| Provider         | Format               | Key Pattern                                               | Where to Get                               |
| ---------------- | -------------------- | --------------------------------------------------------- | ------------------------------------------ |
| OpenAI           | API Key              | `sk-...` (Org Admin)                                      | OpenAI organization/admin API key settings |
| Anthropic        | API Key              | `sk-ant-...`                                              | Anthropic console API key settings         |
| AWS Bedrock      | IAM Credentials      | Access Key ID (`AKIA...`) + Secret + Region (`us-east-1`) | AWS Console → IAM → Users                  |
| Google Vertex AI | Service Account JSON | `{"type":"service_account",...}`                          | GCP Console → IAM → Service Accounts       |
| fal.ai           | API Key (ADMIN)      | `{uuid}:{hex}`                                            | fal.ai team/admin key settings             |
| Runway           | API Key              | `key_...`                                                 | Runway workspace API key settings          |
| OpenRouter       | JSON                 | `{"apiKey":"sk-or-v1-...", "provisioningKey":"..."}`      | OpenRouter key settings                    |
| Azure            | Service Principal    | Tenant ID + Client ID + Client Secret + Subscription ID   | Azure Portal → App registrations           |
| LiteLLM          | JSON                 | `{"apiKey":"sk-...", "baseUrl":"https://..."}`            | Your LiteLLM proxy admin                   |
| Cursor           | API Key (team)       | Cursor team API key                                       | Cursor team settings                       |

***

## Provider-Specific Setup Notes

### OpenAI

Use an **Organization Admin API key**, not a project-scoped key. Once linked, Revenium syncs project/workspace, API key, usage, cost, model, token, and request data that the provider exposes.

### Anthropic

Use an Anthropic API key with access to billing and usage data. Once linked, Revenium syncs workspace, model-level spend, and token data. Request counts are not available through Anthropic's billing API and may render as `N/A`.

### AWS Bedrock

Bedrock requires IAM credentials with billing read access — not Bedrock model-invocation keys.

**First, enable AWS Cost Explorer.** Cost Explorer must be turned on once per AWS account, manually, in the console — there is no API for this: AWS Console → **Billing and Cost Management** → **Cost Explorer**; opening it for the first time enables it. Until it's enabled, the billing-read calls below fail even with correct credentials. After enabling, AWS takes up to \~24 hours to prepare the first data, so a newly connected Bedrock provider shows an empty dashboard until then — expected, not an error.

Then, in the AWS Console, create an IAM user with programmatic access (an access key), and attach the least-privilege policy below. It grants billing read only, with no model invocation:

```json
{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Sid": "ReveniumBillingRead",
      "Effect": "Allow",
      "Action": [
        "ce:GetCostAndUsage",
        "sts:GetCallerIdentity"
      ],
      "Resource": "*"
    }
  ]
}
```

`ce:GetCostAndUsage` reads Bedrock spend from Cost Explorer; `sts:GetCallerIdentity` reads the account ID that identifies the workspace. Neither action can invoke a model. (Cost Explorer and `GetCallerIdentity` do not support resource-level scoping, so `Resource` is `*`.)

Enter the Access Key ID, Secret Access Key, and the Cost Explorer region — use `us-east-1`, which is Cost Explorer's service endpoint regardless of where your Bedrock workloads run — in Revenium. Revenium checks the credential against Cost Explorer when you connect, so an invalid key — or a Bedrock model-invocation key (`ABSK...`) — is caught right away rather than failing silently later.

{% hint style="info" %}
**Billing delay:** AWS Cost Explorer refreshes cost data at least once every 24 hours and reflects usage only up to the previous day. After you connect, Bedrock billing data can take up to \~24 hours to appear — an empty dashboard right after connect is expected, not a failure. The connection is validated and saved immediately; the cost data follows on AWS's refresh cycle. This is an AWS Cost Explorer pipeline characteristic, not a sync issue.
{% endhint %}

{% hint style="info" %}
**Bedrock agent workloads:** Agent-driven spend — for example Amazon Bedrock AgentCore — arrives through the same billing sync as your other Bedrock service costs. Where AWS reports it scoped to the Bedrock service rather than to a specific foundation model, it appears under the `bedrock-general` model bucket, and it follows the same up-to-24-hour Cost Explorer refresh cycle.
{% endhint %}

### Google Vertex AI

Vertex requires BigQuery Billing Export and a service-account JSON key.

Enable BigQuery Billing Export, create a service account that can read the export dataset and run BigQuery jobs, then paste the service-account JSON into Revenium. Billing export data usually has a 24-48 hour delay.

### fal.ai

Use an **ADMIN** API key, not a regular user key. Once linked, Revenium syncs per-endpoint, per-day cost and usage across image, video, audio, and LLM endpoints where the provider exposes that data.

### Runway

Use a workspace API key. Cost is tracked per model, with provider credit usage converted to USD for reporting.

### OpenRouter

Two key types are supported:

* **API Key** (required) — standard usage data and model access.
* **Provisioning Key** (optional, Team/Enterprise only) — unlocks per-user and per-request usage breakdowns.

Paste credentials as a JSON object: `{"apiKey":"sk-or-v1-...", "provisioningKey":"sk-or-v1-..."}`. Omit `provisioningKey` if you don't have Team/Enterprise access.

### Azure

Azure Cost Management integration uses a Service Principal to pull subscription-level cost data. Follow these steps:

1. **Create an App Registration** — In Azure Portal, go to Microsoft Entra ID > App registrations > New registration. Name it (e.g. "Revenium Cost Manager") and accept default settings.
2. **Generate a Client Secret** — Open your app registration, go to Certificates & secrets > New client secret. Copy the **Value** field immediately — not the Secret ID. The Value is only shown once.
3. **Assign Cost Management Reader role** — Go to Subscriptions > your subscription > Access control (IAM) > Add role assignment. Select **Cost Management Reader** at subscription scope and assign it to the app registration.
4. **Enter credentials in Revenium** — From the app registration Overview page, copy the Directory (Tenant) ID and Application (Client) ID. Copy the Subscription ID from the Subscriptions page. Enter all four values in the Revenium provider form.

You can also paste all four fields as a JSON object using the "Paste JSON instead" option:

```json
{
  "tenantId": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "clientId": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "clientSecret": "your-client-secret-value",
  "subscriptionId": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}
```

{% hint style="info" %}
**Billing delay:** Azure cost data is delayed by 8–24 hours for EA/MCA agreements and up to 72 hours for Pay-As-You-Go (PAYG) subscriptions. This is an Azure billing pipeline limitation, not a sync issue.
{% endhint %}

{% hint style="warning" %}
**Sovereign clouds not supported:** Azure Government, Azure China, and Azure Germany are not supported. Use a commercial Azure subscription.
{% endhint %}

### LiteLLM

Revenium connects to your existing LiteLLM proxy — it does not host LiteLLM. Make sure your proxy has spend tracking and logging enabled, then provide the proxy's admin API key and base URL. Historical data depth depends on your proxy's retention.

This is a **scheduled sync**, not real-time: Revenium pulls spend and usage from the proxy's admin API on a recurring interval, so it informs reporting rather than live enforcement. What is captured follows what your LiteLLM version records — confirm coverage for the request formats you use with a test transaction after connecting.

For **real-time** metering of the same proxy, register the Revenium proxy callback instead — see [LiteLLM Proxy Setup](/integrations/litellm-proxy-setup.md). The provider integration reports what your provider **bills**; the callback and client telemetry report what Revenium **meters**. Billed and metered figures are held independently and shown side by side for reconciliation and coverage-health, so connecting the provider integration is always safe alongside real-time metering.

***

## Viewing Your Data

Once a key is authenticated, open the **Provider Dashboard**. Data populates across four primary views:

* **Workspaces** — provider billing and Revenium-metered spend for the selected period, with coverage-health guidance that helps you identify under-metered activity.
* **API Keys** — per-key cost, usage, tokens, and trend, with a key hint (e.g. `sk-ant-api03-Z4C...EQAA`) so you can spot uninstrumented or rogue scripts without exposing the key.
* **Models** — model efficiency: actual cost per 1M tokens (or per-credit, per-image equivalent) so you can compare model price-performance.
* **Management** — workspace naming and organization controls.

The **Management** view lets you rename provider workspaces. Provider-generated names like `proj_abc123xyz` are cryptic; renaming them to `Production API` or `Customer Support Bot` makes cost tracking intuitive across teams. Workspace history is retained — you can view name-change timestamps and revert to any previous name. You can also map workspaces from different providers to the same display name (e.g. an OpenAI project and an Anthropic workspace both renamed to `Customer Support`) to see combined costs in one row.

> **Note on Syncing:** If you have a large historical footprint, it may take a few moments for all data to appear. Click **View Sync Logs** on the Provider dashboard to verify that Revenium is actively processing your records.

***

## Reconcile Billed and Metered Spend

The **Workspaces** view compares two distinct totals:

* **Provider billing** — charges synchronized from connected provider accounts.
* **Revenium-metered spend** — usage observed by Revenium through instrumented traffic.

These totals answer different questions. Provider billing shows what the provider charged; metered spend shows how much of that activity Revenium can associate with instrumented usage. Do not add the totals together. Use them as reconciliation points for the same selected period.

### Read the Reconciliation Summary

The summary presents provider billing and Revenium-metered spend separately. It also highlights providers that are under-metered so you can identify where the metered view does not yet account for billed activity.

### Interpret Coverage Health

Coverage is shown as a named health state rather than an uncapped raw ratio. Read the state as the dashboard's assessment of the current billed-versus-metered relationship, then use the underlying totals to understand the size of the gap.

The health state avoids presenting an unstable raw ratio as precise coverage when the billed amount is very small.

### Resolve Empty and Partial-Data States

The Workspaces view distinguishes between several conditions instead of treating every empty result as the same problem:

* A required integration is missing.
* Data is temporarily unavailable.
* No spend exists for the selected view.
* No active provider rows are available.

Read the state shown before changing filters or connection settings so you respond to the condition the dashboard has identified.

***

## Getting Started

1. Open the **Provider Dashboard**.
2. Select **Workspaces**.
3. Set the provider and time range you want to review.
4. Compare provider billing with Revenium-metered spend in the summary.
5. Read the named coverage-health state.
6. Review any under-metered providers or empty-state guidance.
7. Move to **API Keys**, **Models**, or **Management** when you need a narrower view.

***

## Filtering, Trends & Exports

Each tab supports:

* **Provider filter** — view all providers combined, or drill into a single provider.
* **Usage-type filter** — narrow the dashboard to the type of activity you want to analyze where this filter is available.
* **Time period** — preset ranges or custom date pickers, with current-vs-previous-period trend indicators (↑ red for cost increases, ↓ green for cost decreases).
* **Cost-range filter** — narrow to a specific spend bracket.
* **Search** — by workspace, key hint, or model name.
* **CSV export** — exports respect current filters and sort order.

Keep the same period while comparing provider billing with Revenium-metered spend so both sides of the reconciliation refer to the same window.

The Models tab also surfaces a **Most Efficient Model** badge — the model with the lowest cost per 1M tokens (or per-unit equivalent for image/video/audio) — and an **Avg Tokens/Req** column for providers that report request counts.

***

## OpenAI Image Cost Tracking

For OpenAI, image generation (DALL-E) is tracked separately from text completions. Image costs appear in the Models tab (with per-image cost metrics by DALL-E version), in the Workspaces tab (rolled into workspace totals), and in API Key Analytics (so you can attribute image generation by key). Tracked metrics include cost per image, total image cost, image count, and resolution mix (standard vs HD).

***

## View Sync Logs

The Provider Dashboard's **View Sync Logs** button opens a per-provider sync history. Each entry shows:

* Sync timestamp.
* Provider success/failure status.
* Summary of workspaces, API keys, and usage data retrieved.
* Specific error messages on failed syncs.

### Common Sync Issues

| Issue                  | Likely Cause                                         | Resolution                                                                           |
| ---------------------- | ---------------------------------------------------- | ------------------------------------------------------------------------------------ |
| No data synced         | Wrong key type or invalid credentials                | Re-authenticate via Manage AI Accounts; confirm the key type matches the table above |
| Partial data           | Provider rate limiting                               | Wait and retry; if the issue persists, review the sync log details                   |
| Stale data             | Sync not running                                     | Click **Refresh Data** or check the account's connection state                       |
| Missing provider       | Not connected                                        | Add it via Manage AI Accounts                                                        |
| Delayed Vertex AI data | BigQuery export is batch-processed                   | Expected 24–48h delay; nothing to fix                                                |
| Delayed Azure data     | Azure billing pipeline latency                       | Expected 8–24h delay (EA/MCA) or up to 72h (PAYG); nothing to fix                    |
| Delayed Bedrock data   | Cost Explorer refreshes at least once every 24 hours | Expected up-to-24h delay, including right after connecting; nothing to fix           |

***

## Common Scenarios

**Identifying a cost spike.** Open Workspaces, set the period to "Last 30 days", and review **Current vs Previous Period**. Click the high-growth workspace, then switch to API Key Analytics filtered by that workspace to find the specific keys driving the increase. Switch to Models to see whether the model mix changed.

**Tracking team API key usage.** Use Workspace Management to rename workspaces by team or project, then open API Key Analytics and search by team name. Identify unused keys (0 requests) for rotation or deactivation, and export per-key data for cost allocation.

**Monthly cost reporting.** Set a custom date range to last month, export Workspaces and Models data to CSV, and combine with your budget/alert data for a complete cost picture.

***

## Best Practices

* **Start with the Workspaces view.** It's the fastest way to understand overall spending patterns and surface the high-cost workspaces worth investigating first.
* **Rename workspaces early.** Provider-generated names are cryptic; assign meaningful names as soon as new workspaces appear so the rest of your team has a usable cost view from day one.
* **Check Models weekly.** Model price-performance shifts; the Models view surfaces cheaper alternatives without sacrificing quality.
* **Audit API keys monthly.** Spot rogue keys, idle keys, and keys whose cost has drifted from intent.
* **Combine with alerts.** Use [Set Budgets & Alerts](/track-and-control-costs/set-budgets-and-alerts.md) to get notified when spending crosses a threshold so the dashboard isn't the only thing watching.

***

## Related Pages

* [SDK Setup](/integrations/sdk-setup.md) — connect Revenium-metered usage.
* [Set Budgets & Alerts](/track-and-control-costs/set-budgets-and-alerts.md) — receive notifications when spending crosses a threshold.

***

## Frequently Asked Questions

<details>

<summary>Why are provider billing and Revenium-metered spend different?</summary>

Provider billing is synchronized from connected provider accounts. Revenium-metered spend comes from instrumented traffic. A difference indicates that the billed and metered sources do not currently cover the same activity.

</details>

<details>

<summary>Why does the dashboard show a health state instead of a raw percentage?</summary>

Named states keep an unstable raw ratio from being presented as precise coverage. Use the state with the billed and metered totals to interpret the result.

</details>

<details>

<summary>What should I do when the Workspaces view is empty?</summary>

Read the empty-state message first. The view distinguishes a missing integration, temporarily unavailable data, no spend, and no active provider rows so you can respond to the actual condition.

</details>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.revenium.io/integrations/provider-integrations.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
