# Using your own LLM key for AI usage

{% hint style="info" %}
Requires an Enterprise license.
{% endhint %}

{% hint style="info" %}
Before you can use this option, you must contact Tonic.ai to enable it for your account.

After Tonic.ai enables the option for you to use your own LLM key, then until you configure the LLM provider and key, Fabricate does not process any LLM requests.
{% endhint %}

Enterprise accounts can choose to provide an Anthropic or Amazon Bedrock LLM key to use for Fabricate AI features.

When you provide your own LLM key, Tonic.ai does not charge your for AI usage, only for basic access. However, any [configured limit on AI usage cost](https://docs.tonic.ai/fabricate/about-fabricate/tracking-and-limiting-ai-usage-and-cost#limiting-your-ai-usage-overage) still applies.

## Overview of the flow with your own LLM key <a href="#flow-overview-customer-llm-key" id="flow-overview-customer-llm-key"></a>

The following diagram provides an overview of the flow of requests and data when you provide your own LLM key, in this case Amazon Bedrock.

<figure><img src="https://4109733485-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmoU4gTR9LxlzHeWmQCUZ%2Fuploads%2Fks9aKBg6Gn6Qmgne4ebF%2FDiagram_FabricateBYOLLM.png?alt=media&#x26;token=5c5c456f-544c-4cc9-a7ca-65bdab7186d8" alt=""><figcaption><p>Diagram of the flow of requests and data when you use your own LLM key</p></figcaption></figure>

## Enabling the option to provide your own key

To enable the option to use your own LLM key, you must contact Tonic.ai.

After Tonic.ai configures your account to require a custom LLM key, then before you can use any AI features, including Data Agent databases, you must provide the LLM key.

## Selecting the LLM provider

On the **AI** page of **Account Settings**, you set up the LLM provider in the **LLM Provider Settings**.

From the **Provider** dropdown list, select the LLM provider to use.

You can use either Anthropic or Amazon Bedrock.

<figure><img src="https://4109733485-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmoU4gTR9LxlzHeWmQCUZ%2Fuploads%2FwaKDPGCz0tNE3S4TWQ8n%2FAccount_LLMProviderSettings.png?alt=media&#x26;token=517100da-9238-4e30-8f56-5cf93b5a99a9" alt=""><figcaption><p>LLM Provider Settings to configure the LLM key for an Enterprise account</p></figcaption></figure>

## Providing an Anthropic key

If you choose Anthropic, then in the **Anthropic API Key** field, provide your Anthropic key.

## Providing an Amazon Bedrock key

If you choose Amazon Bedrock, then:

1. In the **Amazon Bedrock API Key** field, provide your Amazon Bedrock key.
2. In the **AWS Region** field, specify the AWS Region where your account is located.

## Testing and saving the LLM provider key

To test the provided key, click **Test Credentials**.

To save the configuration, click **Save Changes**.
