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

# Provider keys

> Connect your own Anthropic, OpenAI or Google key so routing can send calls to those models.

With a provider key connected, Routing can send calls to that provider's models, and your tools can name one of those models directly. Provider keys are on every plan.

## Connect a key

1. Open **Routing** and go to the **Providers** tab.

2. Add a key and pick the provider: Anthropic, OpenAI or Google. A provider can have more than one key.

   ![The first step of Add a provider: Anthropic, OpenAI or Google](https://mintcdn.com/senselab/7GJRxwA5n_G2FDq5/images/sensei/routing-add-provider.png?fit=max\&auto=format\&n=7GJRxwA5n_G2FDq5\&q=85\&s=8810c4bacee3b767655c48481aaebf48)

3. Paste the key. It is checked with the provider, encrypted, and never shown again. The page shows its last four characters.

4. Add an optional label so your team knows which key it is.

5. Choose the models the key serves. For models that support it, choose how much each one reasons.

Routing and sessions can use the models you chose and no others. Only an account admin can add, rotate or revoke keys.

## Use a provider model

There are two ways to reach a model on your key.

Let Routing decide. Tools keep sending `Sensei` as the model, and a [rule](https://docs.sense-lab.ai/sensei/routing/rules.md) sends the calls you choose to the provider model.

Or name the model in the call. Set the model to `<provider>/<model>`, for example `openai/gpt-5`. The call is served by that model and no rule is consulted.

```bash theme={null}
curl https://models.sense-lab.ai/v1/chat/completions \
  -H "Authorization: Bearer $SENSEI_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model":"openai/gpt-5","messages":[{"role":"user","content":"hello"}]}'
```

## Billing

The provider bills the tokens of calls served on your key. Sensei charges by the request: the first 1,000 requests a month that models on your keys answer are free, and after that they cost \$1 per 1,000, drawn from your credits.

* A request is one call to a model. A turn usually makes several.
* The 1,000 are for the account, not for each person or key, and the count starts again on the first of each month (UTC).
* A request that failed or was refused is not counted.
* With the free requests used and no credits left, requests on your keys are refused with `own_key_free_requests_used` until you add credits or the month ends.

Calls on these models appear on **Sessions** and **Usage & cost** with the model that served them. **Usage & cost** shows how many of the month's free requests are used.

## Data

The content of calls served on your own provider keys is never kept for your model and never used to improve Sensei. A turn a provider's model served does get an outcome and a summary in your account, and your later sessions read that summary as a Learning, whichever model serves them. See [Learnings on routed calls](https://docs.sense-lab.ai/sensei/routing/overview.md#learnings-on-routed-calls). Calls go from Sensei to the provider directly. What Sensei holds to serve a provider's calls is listed with each provider on the **Providers** tab.

## When a provider fails

A call routed by a rule moves to the next model in the rule's chain when a provider key is missing or rejected, and ends on Sensei. A call that names a provider model directly has no chain, so it returns the provider's error. See the `byok_` codes in the [error reference](https://docs.sense-lab.ai/sensei/reference/errors.md#provider-keys).


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