> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.fabricgateway.ai/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.fabricgateway.ai/_mcp/server.

# Connect Azure OpenAI

> Target URL, credentials, supported endpoints, and deployment names for an Azure OpenAI connection.

The Azure OpenAI connection sends OpenAI-format requests to your Azure OpenAI resource. Clients call the route with the OpenAI API format, and the gateway forwards each request unchanged, apart from the credentials. This topic lists what's specific to Azure OpenAI. For the setup steps, see [Connect an LLM provider](/configure/connections/llm-providers).

## Target URL

Use your resource's endpoint with the `/openai/v1` path, for example `https://my-openai-resource.openai.azure.com/openai/v1`. The console asks for the **Resource name** and builds the URL for you.

The catalog's endpoint paths have no version prefix, so the gateway adds them directly to the target URL, for example `/openai/v1/chat/completions`.

## Credentials

Enter an Azure OpenAI API key when you set up credentials. The gateway sends it in the `api-key` header and replaces any `api-key` header that the client sent. Callers authenticate to the gateway with their gateway key in `fg-api-key`.

The gateway can also authenticate with a Microsoft Entra ID token instead of an API key. It gets the token from a service principal's client secret, or, on a data plane that runs in your Azure environment, from the data plane's managed identity or workload identity. A managed identity or workload identity token belongs to the data plane, so the gateway sends it only to HTTPS Azure AI endpoints in the Azure public, US Government, and China clouds. A token from a client secret is limited to the Azure AI services scope (`https://cognitiveservices.azure.com/.default`), but the gateway doesn't restrict which host it's sent to, so check the connection's target URL.

## Supported endpoints

| Method | Path                    | Notes               |
| ------ | ----------------------- | ------------------- |
| `POST` | `/chat/completions`     | Supports streaming. |
| `POST` | `/responses`            | Supports streaming. |
| `POST` | `/embeddings`           |                     |
| `GET`  | `/models`               |                     |
| `POST` | `/audio/transcriptions` | Multipart upload.   |
| `POST` | `/audio/speech`         |                     |
| `POST` | `/images/generations`   |                     |

Clients add these paths to the route's base URL, the same way an OpenAI SDK does when you set its base URL to the route.

## Deployment names

Azure routes requests by deployment, not by model name. The gateway doesn't map model names to deployments: it sends the `model` field exactly as the client wrote it. Set `model` to your deployment name, and if you restrict models on the connection, list the deployment names. The console's model picker lists only catalog models, so set `allowed_models` through the [admin API](/configure/automation/admin-api).

## Example

```bash
curl "BASE_URL/chat/completions" \
  -H "fg-api-key: GATEWAY_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "my-gpt-4o-deployment",
    "messages": [{ "role": "user", "content": "Hello" }]
  }'
```

Replace `BASE_URL` with the route's base URL and `GATEWAY_KEY` with your gateway key. For how to find both, see [Authenticate and send a request](/use/authenticate).

## Next steps

* [Fail over across providers](/configure/routing/failover)
* [Connect OpenAI](/configure/providers/openai)
* [Restrict model and tool access](/configure/access-and-limits/model-access)