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

# Connect providers

> Register the OpenAI, Anthropic, and Azure upstreams the gateway forwards to

A provider is an upstream LLM service the gateway forwards requests to. You connect providers once
on the Providers page, and the gateway routes traffic to them from there.

## Add a provider

On the **Providers** page under Settings, add a provider and fill in:

* **Name**: a label you choose, such as `openai`. Routing rules refer to providers by this name.
* **Base URL**: the provider's API root, such as `https://api.openai.com`.
* **Format**: the wire protocol and auth the provider expects. One of `openai`, `anthropic`, or `azure_openai`.
* **API key**: the provider's secret. Enter it here, in the portal.
* **API version** (Azure only): appended to each request as `?api-version=...`.

Save your changes. The gateway picks up the new provider right away, with no restart.

<img width="700" style={{ borderRadius: "0.5rem" }} src="https://mintcdn.com/openlayer-docs/a2_1CfDP3O8kf5P1/images/gateway/provider_config.png?fit=max&auto=format&n=a2_1CfDP3O8kf5P1&q=85&s=2dae03df249e936a524ed3648af4feb8" alt="Connecting a provider on the Providers page" data-path="images/gateway/provider_config.png" />

<Note>
  Provider keys are encrypted before they're stored, and the portal never shows
  one again after you save it. The page displays a hint instead, the first and
  last few characters, so you can tell which key is in place. To replace a key,
  enter the new one over it.
</Note>

A provider with no key stored returns **503** on every request routed to it, and shows as having no
key on the Providers page. Other providers keep serving.

## Supported formats

| Format | Speaks | Auth header | Use for |
| - | - | - | - |
| `openai` | OpenAI Responses API | `Authorization: Bearer` | OpenAI and OpenAI-compatible providers |
| `anthropic` | Anthropic Messages API | `x-api-key` | Anthropic |
| `azure_openai` | OpenAI Responses API | `Authorization: Bearer` | Azure OpenAI / Foundry (OpenAI models); set an API version |

`azure_openai` uses the same wire protocol as `openai`, with an API version appended to every
request.

## Default routing

With no routing rules, requests pass through by format: an OpenAI-style request (to `/v1/responses`)
goes to your `openai` provider, and an Anthropic-style request (to `/v1/messages`) goes to your
`anthropic` provider. To send traffic anywhere else, see [Route requests](/docs/gateway/route-requests).

## Azure and Microsoft Foundry

Point the **Base URL** at the resource path the model lives under, including its prefix (for example
`.../openai` for OpenAI models or `.../anthropic` for Anthropic models). Use the `azure_openai`
format with an API version for OpenAI models, or the `anthropic` format for Anthropic models hosted
on Foundry.


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