# Provider Integrations

While the Revenium SDK intercepts your live application traffic, connecting your underlying AI provider accounts (OpenAI, Anthropic, AWS Bedrock, Google Vertex AI, fal.ai, Runway, OpenRouter, LiteLLM) 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 immediately unlocks three core dashboards:

<table><thead><tr><th width="204.390625">Insight</th><th>What It Tells You</th></tr></thead><tbody><tr><td><strong>Providers</strong></td><td>The exact percentage of your provider bill that is actively metered and protected by Revenium.</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>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></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.
* **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.

***

## 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 usage.
* **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 (no billing integration today).
* Other cloud providers (only AWS Bedrock and Google Vertex AI have credit capture in this release).

***

## How Provider Sync Works

1. **Connect provider accounts** via **Settings → Manage AI Accounts → AI Platforms → Add Provider**.
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 [Integrations > 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 hit **Create**.

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                    |
| LiteLLM          | JSON                 | `{"apiKey":"sk-...", "baseUrl":"https://..."}`            | Your LiteLLM proxy admin                   |

***

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

Create a billing-read credential in AWS, then enter the access key, secret, and Cost Explorer region in Revenium. Use the provider instructions in AWS as the source of truth for the current permission names and credential-creation flow.

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

### LiteLLM

Revenium connects to your existing LiteLLM proxy — it does not host LiteLLM. Make sure your proxy has spend tracking and logging enabled. Historical data depth depends on your proxy's retention.

***

## Viewing Your Data

Once a key is authenticated, head to the **Overview** section in the left sidebar. Data populates instantly across three primary tabs:

* **Providers** — coverage ratio (what % of your provider spend Revenium is actively metering) and total top-level spend across all providers.
* **Models** — model efficiency: actual cost per 1M tokens (or per-credit, per-image equivalent) so you can compare model price-performance.
* **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.

A fourth view, **Workspace Management**, 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.

***

## Filtering, Trends & Exports

Each tab supports:

* **Provider filter** — view all providers combined, or drill into a single provider.
* **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.

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                                                |

***

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


---

# Agent Instructions: 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:

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

The question should be specific, self-contained, and written in natural language.
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.
