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

# Route requests to specific AI providers

export const plans_0 = "Any"

export const deployments_0 = "Any"

export const data_plane_version_0 = undefined

export const use_case_0 = undefined

<Note>
  **Applies to:**

  * Plan - {plans_0}
  * Deployment - {deployments_0}
  * {data_plane_version_0}
  * {use_case_0}
</Note>

## Summary

When multiple AI providers support the same model, Braintrust automatically load balances requests across all available providers. Use the `x-bt-endpoint-name` header to override this behavior and route requests to a specific provider credential. **Note: This feature is only available through API calls and cannot be configured in the Braintrust UI.**

## Configuration Steps

### Step 1: Identify provider credential name

Find the credential name from the AI providers settings page (e.g., `AWS_DEFAULT_CREDENTIALS`, `GOOGLE_DEFAULT_CREDENTIALS`, `OPENAI_API_KEY`). Alternatively, retrieve available providers using the [List AI secrets API endpoint](/api-reference/aisecrets/list-ai_secrets).

### Step 2: Add header to API requests

Include the `x-bt-endpoint-name` header with the provider credential name as the value in your API calls.

```bash theme={"theme":{"light":"github-light","dark":"github-dark-dimmed"}}
curl -X POST "https://api.braintrust.dev/v1/proxy/chat/completions" \
  -H "Authorization: Bearer $BRAINTRUST_API_KEY" \
  -H "Content-Type: application/json" \
  -H "x-bt-endpoint-name: OPENAI_API_KEY" \
  -d '{
    "model": "gpt-5",
    "messages": [{"role": "user", "content": "Hello"}]
  }'

```

### Step 3: Verify provider selection

Check the `x-bt-used-endpoint` response header to confirm which provider handled the request.

```bash theme={"theme":{"light":"github-light","dark":"github-dark-dimmed"}}
curl -i https://api.braintrust.dev/v1/proxy/chat/completions \
  -X POST \
  -H "Authorization: Bearer $BRAINTRUST_API_KEY" \
  -H "Content-Type: application/json" \
  -H "x-bt-endpoint-name: OPENAI_API_KEY" \
  -d '{
    "model": "gpt-5",
    "messages": [
      { "role": "user", "content": "Hello" }
    ]
  }'

# Response will include header:
# x-bt-used-endpoint: OPENAI_API_KEY

```
