# Bring your own key

Add your OpenAI or Anthropic key, and model calls through the [AI Gateway](/docs/ai-gateway.md) bill your provider account instead of your Veryfront credits.

## Before you start

You need a Veryfront account you own or administer ([Sign in](/sign-in)), and an API key from OpenAI or Anthropic.

## Add your key

**Studio**

1. Open **Account settings** > **AI provider keys**.
2. Click **Add key** next to **OpenAI** or **Anthropic**.
3. Enter the **API key**.
4. Click **Save**. You should now see the end of your key on the provider's row, such as `••••1234`.

## Use your key outside the EU

By default, a project only calls models served in the EU. Your key calls its provider directly, which may serve from outside the EU, so a project refuses it until you allow it there. The switch only affects your key; it leaves Veryfront's own routes as the project sets them.

**Studio**

1. In your project, open **Building blocks** > **Models**.
2. Under **Provider keys**, turn on **Allow provider keys outside the EU**. You should now see your provider answer the project's model calls, with no Veryfront credits charged.

## Remove your key

Removing the key revokes it in Veryfront, and model calls go back to your Veryfront credits.

**Studio**

1. Open **Account settings** > **AI provider keys**.
2. Open the **⋯** menu on the provider's row.
3. Choose **Remove key**.
4. Click **Remove key**. You should now see **Revoked** on the provider's row.

## Troubleshooting

**If a model call answers 403 with `provider-key-policy-denied`**, the project doesn't allow provider keys outside the EU. Turn it on ([Use your key outside the EU](#use-your-key-outside-the-eu)), or remove your key to go back to Veryfront's credits.

## Next steps

* [Track spend](/docs/account/spend.md)
* [Choose models](/docs/agents/models.md)
