Is there a way to inject custom header to OpenAI call?

In addition to regular API_KEY, BASE_URL etc we need to pass custom HTTP header (processed by API Management layer)

What is the way to do that?

API gpt-35-turbo

Try the following

client = OpenAI(    
api_key="YOUR_API_KEY",
base_url="YOUR_BASE_URL",
default_headers="YOUR_REQUEST_HEADER",
)