---
title: Model providers external to Databricks
description: Register model providers external to Databricks through model provider services, then govern credentials, access, usage, and cost with Unity Gateway.
canonical_url: https://docs.databricks.com/gcp/en/ai-gateway/model-provider-services
---

# Model providers external to Databricks

Bring model capacity from external providers, such as OpenAI, Anthropic, or Amazon Bedrock, to Databricks through a model provider service in Unity Catalog. A model provider service provides one control point for encrypted credentials, access, usage, and cost. Register each provider one time, and many users and model services can route to it without handling the credentials.

On Databricks, an external model provider is a Unity Catalog securable object (a model provider service) that stores a provider's connection details and encrypted credentials. Because Unity Catalog stores providers, you govern access with the same privileges you use for data, query external models through Unity Gateway without exposing secrets, and track usage and cost from a single governance layer.

## What is a model provider service?

A model provider service lives in a Unity Catalog catalog and schema and uses a three-part name, such as `main.default.openai_prod`. It holds:

* The **provider type** (for example, OpenAI or Amazon Bedrock).
* The **connection configuration** for that provider, such as an endpoint base URL or cloud region.
* The provider **credentials**, which Databricks encrypts and stores. Databricks does not return credentials on read. For Google Gemini Enterprise, you can reference an existing service credential by name instead of storing a service account key, and the credential stays where it is. See [Authenticate Google Gemini Enterprise with a service credential](https://docs.databricks.com/gcp/en/ai-gateway/create-model-provider-services.md#gemini-service-credential).

Because a model provider service is a Unity Catalog securable, you manage it the same way you manage other governed objects:

* Grant and revoke access with Unity Catalog privileges.
* Discover it in Catalog Explorer alongside your other data and AI assets.
* Configure Unity Gateway features such as rate limits and inference tables on it.

Callers query a model provider service directly through Unity Gateway by referencing its name, and they don't see the stored credentials. A model provider service can also supply the external provider that a model service routes to, giving administrators a single, governed chokepoint for provider credentials.

## <a id="supported-providers" />Supported providers

A model provider service supports only the following external providers and authentication methods.

| Provider                               | Authentication                                                                                                                                                                       |
| -------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| OpenAI                                 | API key, or each caller's own [ChatGPT subscription](https://docs.databricks.com/gcp/en/ai-gateway/chatgpt-subscription-support.md) (Go, Plus, Pro, or Enterprise)                   |
| Azure OpenAI                           | API key, or Microsoft Entra ID Databricks service principal (tenant ID, client ID, and client secret)                                                                                |
| Anthropic                              | API key, or each caller's own [Claude subscription](https://docs.databricks.com/gcp/en/ai-gateway/claude-max-anthropic-enterprise-support.md) (Pro, Max, Team, or Enterprise)        |
| Amazon Bedrock (bedrock-runtime)       | AWS access key pair (access key ID and secret access key)                                                                                                                            |
| Amazon Bedrock Mantle (bedrock-mantle) | AWS access key pair (access key ID and secret access key)                                                                                                                            |
| Microsoft Foundry                      | API key, or Microsoft Entra ID Databricks service principal (tenant ID, client ID, and client secret)                                                                                |
| Google Gemini Enterprise               | Service account key (JSON) with GCP project ID and region, or a [service credential](https://docs.databricks.com/gcp/en/connect/unity-catalog/cloud-services/service-credentials.md) |
| Custom                                 | Bearer token, or an API key sent in an HTTP header you name, with an endpoint base URL                                                                                               |

The **Amazon Bedrock** provider connects to the AWS `bedrock-runtime` endpoint. **Amazon Bedrock Mantle** is a separate provider for `bedrock-mantle`. The two endpoints have different API support and can use different model IDs.

When a custom provider's endpoint expects its API key in a specific header rather than as a bearer token, you can name that header. See [Send a custom provider API key in a header](https://docs.databricks.com/gcp/en/ai-gateway/create-model-provider-services.md#custom-header-auth).

Instead of storing a provider credential inline, you can back it with a customer-owned Unity Catalog secret, so the value stays governed in Unity Catalog and rotating it takes effect with no change to the model provider service. See [Back a provider credential with a Unity Catalog secret](https://docs.databricks.com/gcp/en/ai-gateway/create-model-provider-services.md#uc-secret-auth).

## Why govern external providers in Unity Catalog?

Without a central registry, every team that uses an external model embeds its own provider credentials in application code or notebooks. Model provider services move that configuration into Unity Catalog so you can:

* **Define a provider once.** Register the credentials and connection details in one place, then let many users and model services share it without ever handling the secret.
* **Govern access with Unity Catalog privileges.** Use the same `GRANT` and `REVOKE` statements you use for other securables to govern who can query each provider.
* **Query across workspaces.** A model provider service is available in any workspace that shares its metastore.
* **Track usage and cost.** Unity Gateway records usage for queries that route through a model provider service. See [Track model usage](https://docs.databricks.com/gcp/en/ai-gateway/usage-tracking.md). Databricks also computes estimated spend for requests routed to external models. See [How spend is calculated](https://docs.databricks.com/gcp/en/ai-gateway/cost-observability.md#external-models).
* **Track lineage.** See the model services that route to a provider and the downstream assets that consume its payloads. See [Track model service and provider lineage](https://docs.databricks.com/gcp/en/data-governance/unity-catalog/ai-gateway-service-lineage.md).

## Privileges

The following Unity Catalog privileges apply to model provider services. A principal also needs `USE CATALOG` and `USE SCHEMA` on the parent catalog and schema.

| Privilege                        | Grants the ability to                                                      |
| -------------------------------- | -------------------------------------------------------------------------- |
| `CREATE SERVICE` (on the schema) | Create a model provider service in the schema.                             |
| `EXECUTE`                        | Query the model provider service through Unity Gateway.                    |
| `READ METADATA`                  | View the model provider service and its configuration without querying it. |
| `MANAGE`                         | Edit, delete, and grant access to the model provider service.              |

For how to grant and revoke these privileges, see [Discover and govern access to external model providers (model provider services)](https://docs.databricks.com/gcp/en/ai-gateway/govern-model-provider-services.md).

## Track model provider service spend in budgets

To include estimated model provider service spend in a [Unity Gateway budget](https://docs.databricks.com/gcp/en/ai-gateway/budgets.md), select **Include external model providers** when creating the budget. External model spend then counts toward the budget's alert and block usage thresholds.

External model spend estimates reflect any [price multiplier](https://docs.databricks.com/gcp/en/ai-gateway/create-model-provider-services.md#configure-a-price-multiplier) configured on the model provider service.

For more information about estimated external model spend, see [How spend is calculated](https://docs.databricks.com/gcp/en/ai-gateway/cost-observability.md#external-models).

## Next steps

* [Create and manage providers with Model Provider Services](https://docs.databricks.com/gcp/en/ai-gateway/create-model-provider-services.md)
* [Query external model providers (model provider services)](https://docs.databricks.com/gcp/en/ai-gateway/query-model-provider-services.md)
* [Discover and govern access to external model providers (model provider services)](https://docs.databricks.com/gcp/en/ai-gateway/govern-model-provider-services.md)
* [Track model usage](https://docs.databricks.com/gcp/en/ai-gateway/usage-tracking.md)
* [Track and analyze AI spend with Unity Gateway](https://docs.databricks.com/gcp/en/ai-gateway/cost-observability.md)
* [Track model service and provider lineage](https://docs.databricks.com/gcp/en/data-governance/unity-catalog/ai-gateway-service-lineage.md)
