> ## Documentation Index
> Fetch the complete documentation index at: https://docs.xpander.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Licenses and who pays

> The order the LLM Gateway follows to decide who pays for each call.

Every call is paid one of three ways, called license models. The gateway picks one per call, in a fixed order.

![Diagram](https://docs.xpander.ai/images/diagrams/run-llm-gateway-which-key-pays-c8e2d714.svg)

| License model | Who pays | Credits | Budgets |
| - | - | - | - |
| **Included with xpander** | xpander, on its own provider keys | Billed in credits | Counts |
| **Bring your own key** | Your organization, on a provider key you stored | None. Your provider bills you | Counts, at the cost the gateway measures |
| **Bring your own subscription** | The person, on their own Claude plan | None | Counts toward none |

Admins choose which ones people may use in [Policies](https://platform.xpander.ai/governance/policies) ([License model](https://docs.xpander.ai/run/llm-gateway/policies.md#license-model)).

## 1. A person's own Claude plan

> [!NOTE]
>
> Available to organizations where xpander has enabled it. Contact xpander to turn it on.

A call runs on the person's own Claude plan, including its extra usage, only when all of these hold:

* The person uses Claude Code, signed in with their Claude plan, and sends their xpander key in the `x-xpander-api-key` header.
* The model is a Claude model from Anthropic.
* **Bring your own subscription** is on for the person's organization, group and agent.

Otherwise the call is refused with a message naming what is missing. It is never silently moved to company models.

### When the plan hits its limit

**When someone's plan hits its limit** in [Policies](https://platform.xpander.ai/governance/policies) decides what happens until the plan resets:

* **Fall back to company models** (default): the call continues as in step 2, and the person sees their plan is limited and when it resets. Each person can still choose **Pause** under **When my Claude plan hits its limit** in [AI models & keys](https://chat.xpander.ai/?settings=my-gateway).
* **Pause**: the call is refused until the reset, and nothing is charged. The choice is locked for everyone, with *Your admin set calls to pause when a plan hits its limit*.

AI models & keys shows a limited plan, for example *Your Claude plan's usage limit is reached until Thu, Oct 8, 8:00 AM. Calls use company models until then.*

## 2. Company models

Every other call, and any call a limited plan falls back from, runs on a key your organization stored or on xpander's key. **Default license model** in [Policies](https://platform.xpander.ai/governance/policies) decides which:

| Default license model | A key is stored for the provider | No key is stored |
| - | - | - |
| **Bring your own key** | Your key. The provider bills you, no credits used | xpander's key in credits, when **Included with xpander** is on. Otherwise refused, naming the provider that needs a key |
| **Included with xpander** | xpander's key in credits. Your key is not used | xpander's key in credits |

With **Bring your own key**, the first stored key wins, in this order: the agent, the person, the person's primary group, then the organization default ([Whose key pays](https://docs.xpander.ai/run/llm-gateway/providers-and-keys.md#whose-key-pays)).

## Cloud, Hybrid and Air-Gapped

| Your organization runs on | Keys a call can use |
| - | - |
| xpander cloud | A person's own Claude plan, your stored keys, and xpander's keys when **Included with xpander** is on |
| Hybrid | Agents on your install: your stored keys and your install's credentials. People's coding tools (through xpander cloud): their own Claude plan and your stored keys. Never xpander's keys |
| Air-Gapped | Your stored keys and your install's credentials |

On Hybrid and Air-Gapped, every provider your agents use needs a key in **Platform > AI governance > Models** or on the install (`secrets.static`). A call with neither is refused, naming the missing key. Agents of the same organization running in xpander cloud may still use **Included with xpander**.

## See who paid

A request in [Logs](https://platform.xpander.ai/governance/logs) shows its **License model**, and its **Gateway decisions** show which key served it and why. Filter Logs by **License model**. [Usage](https://platform.xpander.ai/governance/usage) splits spend into **Subscription: xpander credits**, **Subscription: your provider keys** and **Subscription: personal Claude and ChatGPT plans**.

## Next steps

> **[Choose license models](https://docs.xpander.ai/run/llm-gateway/policies.md#license-model)**
>
> The License model setting.

> **[Assign keys](https://docs.xpander.ai/run/llm-gateway/providers-and-keys.md#whose-key-pays)**
>
> Whose key pays.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.