Skip to main content
Azure API Management puts AI backends behind a single endpoint with shared authentication, rate limiting, and logging. Azure AI Gateway is the Braintrust provider that calls that endpoint, and it supports models that use the OpenAI Chat Completions, OpenAI Responses, or Anthropic Messages API.

Add Azure AI Gateway as an AI provider

Add the provider, point it at your API Management endpoint, then register the models your gateway serves. Every field after the API key sits on the Form tab.
1

Add the provider

Go to Settings > AI providers, then click Organization provider or Project provider, depending on the scope you want.Select Azure AI Gateway.
2

Enter your API key

Paste the API key for your Azure AI Gateway.
API keys are stored as one-way cryptographic hashes, never in plaintext.
3

Set the API base URL

Set API base URL to your Azure API Management endpoint, including a path.For example: https://<gateway-name>.azure-api.net/default/modelsThe Advanced tab edits these same settings as YAML, if you’d rather paste a configuration than fill in fields.
4

Add request headers

Under Headers, click Header for any header your API Management endpoint requires. Braintrust forwards these with every request to your gateway.Skip this step if your endpoint needs only the API key.
5

Register your models

Under Models, click Model for each model your gateway serves. Enter the model name your gateway exposes, then click and, under Model options, set the Format to match the API that model uses, as described in Model formats.
6

Set the endpoint options

Three switches control how Braintrust calls your gateway:
  • Enable failover by default: Off by default. When on, a failed request retries on another configured provider that serves the same model.
  • This endpoint supports streaming: On by default. Turn it off if your endpoint can’t stream, and Braintrust requests a complete response, then streams it back to your client.
  • Include the default registry of Azure AI Gateway models: On by default, but Braintrust ships no model list for Azure AI Gateway, so it adds nothing. The models you register are the only ones available.
7

Create the provider

Click Create.

Model formats

Braintrust appends a format-specific path to your API base URL, so each model’s Format determines which endpoint on your gateway receives the request. Models that require the OpenAI Responses API go to openai/v1/responses instead, whichever Format you set. That covers o1-pro, o3-pro, gpt-5-pro, gpt-5.3 and later, and any gpt-5 model with -codex in its name. The Gemini format can’t be used with a custom API base URL, so it isn’t available for Azure AI Gateway. Configure your API Management endpoint to route these paths to the corresponding backend.

Resources