> For the complete documentation index, see [llms.txt](https://docs.finout.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.finout.io/billing-integrations/ai-providers/connect-openrouter-costs-design-partner-brief.md). Agents can also search and read this documentation through its [MCP server](https://docs.finout.io/~gitbook/mcp).

# Connect OpenRouter Costs - Design Partner Brief

### Overview

Finout's OpenRouter integration ingests the spend OpenRouter charges to your credits from OpenRouter's Analytics API, and shows it alongside your cloud and SaaS services in Finout. As a design partner, you get the integration first and shape what it exposes.

This brief covers what we need from you to connect and validate the integration:

* A read-only **Management key**
* A few details about your OpenRouter setup
* A source of truth we can reconcile against

#### What you get

Costs are the amounts OpenRouter charges to your credits, net of any discounts OpenRouter applies.&#x20;

The dimensions below reflect the current design and may be extended or renamed as development progresses.

| Dimension            | What it means                                                                           |
| -------------------- | --------------------------------------------------------------------------------------- |
| **Model**            | The model served, e.g. `anthropic/claude-4.5-haiku`                                     |
| **Model vendor**     | Who publishes the model (Anthropic, OpenAI, Mistral, Meta…)                             |
| **API key**          | The OpenRouter key that made the request, by name                                       |
| **Cost type**        | Inference, cache, discount, web search, file parsing — OpenRouter's own cost components |
| **Billing category** | Credits (billed by OpenRouter) or BYOK (billed by your provider)                        |
| **Usage**            | Tokens (prompt + completion) on inference rows                                          |

{% hint style="info" %}
&#x20;**BYOK traffic:** if you route requests through OpenRouter with your own provider keys, Finout shows two things: OpenRouter's routing fee, and OpenRouter's estimate of the upstream model cost as a separate cost type, tagged BYOK. The estimate is what OpenRouter reports, not the provider's invoice. If the same provider is also connected to Finout directly, exclude the BYOK billing category in your OpenRouter reports to avoid counting that spend twice.&#x20;

**Not shown:** the platform fee OpenRouter charges when you buy credits, which no OpenRouter API exposes.
{% endhint %}

#### Step 1: Create a Management key

Finout reads OpenRouter's Analytics API with a **Management key**. A regular inference API key cannot access analytics and will fail validation.

{% hint style="success" %}
**Prerequisite:** You need admin access to your OpenRouter organization.
{% endhint %}

1. **Sign in** to OpenRouter and **open** [Settings → Management Keys](https://openrouter.ai/settings/management-keys).
2. **Click** **New key**.
3. **Enter** a **Name** with a clear identifier (e.g. Finout Integration).
4. **Choose** an expiration per your company policy.
5. **Copy** the key immediately and store it securely — it will not be shown again.

#### Step 2: Share Credentials with Finout

Provide the Management key using [Finout's Credentials Vault](https://docs.finout.io/integrations/third-party/credentials-vault) - this ensures the credential is stored and accessed securely.

1. In Finout, navigate to the Settings page's [Cost Centers tab](https://app.finout.io/app/settings/cost-centers).
2. Click **Add cost center**, select Credentials Vault, and click **Next**.
3. Name the JSON Key "OpenRouter Management Key".
4. Paste the key value you obtained in Step 1 into the **Secret** field.
5. Click **Next** to submit your credentials.

#### Step 3: Tell us about your setup

A few answers shape how we configure and validate your cost center. Please share your answers with Finout.

* **Plan:** Pay-as-you-go, Business, or Enterprise? If Enterprise, does your contract include a committed spend or discounted model rates?
* **Billing mode:** Will traffic run on OpenRouter credits, your own provider keys (BYOK), or a mix? For BYOK, which providers?
* **Organizations and workspaces:** How many OpenRouter organizations do you use, and do you separate teams by workspace or by API key?

#### Step 4: Give us a source of truth

We validate the integration by reconciling what Finout shows against what OpenRouter shows you. Once you have at least one full month of traffic, share:

1. **Activity page export** for one closed calendar month, from [OpenRouter → Activity](https://openrouter.ai/activity). This is the primary comparison; Finout's daily totals should match it exactly.
2. **Credit purchase history** for the same month (OpenRouter → Credits). Purchases exceed usage by the platform fee; we confirm that is the only gap.

#### Security and data handling

* The Management key is read-only for analytics. It cannot make inference requests or change your OpenRouter configuration.
* Finout reads billing metadata only: cost, token counts, model, API key, workspace. No prompts or completions are ever read.
* Removing the integration stops syncing. Revoke the key in OpenRouter yourself; Finout cannot do that on your behalf.
* If your organization uses OpenRouter's IP allowlist (Enterprise plan, Settings → Security), add Finout's IP addresses to it before connecting; otherwise OpenRouter rejects Finout's requests. See [Finout IP Whitelist](https://docs.finout.io/settings/finout-ip-whitelist) for the current list.


---

# 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.finout.io/billing-integrations/ai-providers/connect-openrouter-costs-design-partner-brief.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
