Skip to main content
Applies to:
  • Plan - Any
  • Deployment - Any
  • Use case - Resolve model availability errors caused by using the wrong OpenAI API base URL in the Braintrust OpenAI provider settings

Summary

Some OpenAI models return errors Attempted to access ressource with incorrect regional hostname. Please make your request to xx.api.openai.com when run from Braintrust. This usually means your OpenAI account is scoped to a regional API endpoint. Update the OpenAI API base URL in Braintrust to the correct regional endpoint such as https://us.api.openai.com/v1.

What is happening

Braintrust forwards your OpenAI requests to the API base URL configured in Settings. If your OpenAI account is restricted to a regional endpoint, calls to the default/global endpoint will fail for models that are region-locked. You see errors originating from OpenAI rather than Braintrust. Example messages you might see include model not found, This model is not available in your current region, or HTTP 403 from the OpenAI API.

Fix or suggestion

Option 1: Update the API base URL in Braintrust (most common fix)

  1. Go to Settings > Models > OpenAI.
  2. Open More settings or the API base URL field.
  3. Enter the regional endpoint assigned to your OpenAI account. For example: https://us.api.openai.com/v1.
  4. Save the settings and re-run the experiment or prompt.
Use the same API key that is valid for that regional endpoint.

Option 2: Verify OpenAI account model access (if changing the endpoint is not possible)

  1. Sign in to your OpenAI account console.
  2. Go to the Project where you API key belongs to.
  3. Confirm which regions and models your account is allowed to use.
  4. If your account lacks access to a model, contact OpenAI support to request access or region changes.

How to confirm it worked

  • Re-run the experiment or prompt that previously failed. The model should return a normal response instead of an error.
  • Verify the previous error messages such as model not found or This model is not available in your current region no longer appear.

Notes

  • The error originates from OpenAI when endpoints are mismatched, not from Braintrust.
  • For details on model eligibility and data residency, see OpenAI’s documentation: https://developers.openai.com/api/docs/guides/your-data#which-models-and-features-are-eligible-for-data-residency.