Hardcoded URI in Azure Open AI gives 404

Magnus Vinterhav 0 Reputation points
2024-11-01T12:27:19.05+00:00

I am trying to call the Azure Open AI service from a Function App. The api URI available in the Open AI interface is hardcoded. It is "https://magnusaitest05.openai.azure.com/openai/deployments/text-embedding-ada-002-v3/embeddings?api-version=2023-05-15". Every time I call it, no matter what I do, from a Function App, or from Postman, it gives 404. The URI cannot be edited. I have no idea why this does not work, but I suspect that this page gives a clue: https://learn.microsoft.com/en-us/azure/ai-services/openai/reference I don't understand all of it, but I would guess that the automatically generated date on my API URI is outdated.

The situation is now that I have tried everything, but there is not so much to try. I am using the uri, and the key, and no matter what I do, the api gives a 404.

I would appreciate some information on how to make this work. Thank you.

Azure OpenAI Service
Azure OpenAI Service
An Azure service that provides access to OpenAI’s GPT-3 models with enterprise capabilities.
4,096 questions
{count} votes

1 answer

Sort by: Most helpful
  1. navba-MSFT 27,550 Reputation points Microsoft Employee Moderator
    2024-11-04T02:46:31.9433333+00:00

    @Magnus Vinterhav Welcome to Microsoft Q&A Forum, Thank you for posting your query here!

    .

    I created a model and was able to access the endpoint using below curl command. It worked fine:

    curl -X POST "https://XXXXXX.openai.azure.com/openai/deployments/text-embedding-ada-002/embeddings?api-version=2024-02-01" -H "Content-Type: application/json" -H "api-key: 48b4fXXXXXXXXXX664" -d "{\"input\": \"Hello, world!\"}"
    

    . Plan 1:

    An Azure OpenAI resource with the text-embedding-ada-002 (Version 2) model deployed. This model is currently only available in certain regions.** Ensure that your resource is in mentioned region.

    .

    Plan 2:

    Try with api-version 2024-02-01.

    .

    Plan 3:

    Ensure that you have provided the correct deployment model name. Please confirm that again from the Azure OpenAi studio.

    User's image

    .

    Hope this helps. If you have any follow-up questions, please let me know. I would be happy to help.

    **

    Please do not forget to "Accept the answer” and “up-vote” wherever the information provided helps you, this can be beneficial to other community members.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.