Issue with Azure OpenAI Integration – Ocp-Apim-Sub...
# support
m
Dear VAPI Support Team, I am trying to integrate Azure OpenAI with VAPI and encountered an authentication issue. In the Azure OpenAI API, Microsoft now recommends using the api-key header instead of the previous Ocp-Apim-Subscription-Key. However, in VAPI’s Azure OpenAI settings (see attached screenshot), the field still refers to Ocp-Apim-Subscription-Key. When attempting to connect, I receive the following error: "Error Status Code 401. Access denied due to invalid subscription key. Make sure to provide a valid key for an active subscription." After reviewing Microsoft’s latest API documentation, it appears that Azure OpenAI now requires authentication via api-key, while Ocp-Apim-Subscription-Key is no longer supported for this service: https://learn.microsoft.com/en-sg/answers/questions/2129941/how-to-resolve-error-401-for-azure-openai-curl-com Could you confirm whether VAPI currently expects the old header, and if so, whether there are any plans to update it to align with Microsoft's latest authentication method? Thank you for your support! Best regards, Mario https://cdn.discordapp.com/attachments/1339956981297057892/1339956981452111904/Screenshot_2025-02-14_144815.png?ex=67b09baf&is=67af4a2f&hm=5cd13958bf1174eba8e486d34034eba204cd0a2d6e28578742d338c96446831a&
c
Hey Mario, can you please the bug report over here FYI: We have tested with one of our account and it's working so I suggest raising the ticket to get it resolved? Let me know your thoughts on this.
m
I found the issue, the name of the deployment has to be exactly like the model name provided in the VAPI menu (like "gpt-4o-2024-08-06"). Also the endpoint has to be the shorter ressource endpoint, not the longer deployment endpoint (which would make more sense since its the model deployment which is addressed by VAPI).
31 Views