Getting 400 Bad Request when calling azure cognitive services (Image Analyses)

Danilo Rodrigues Alexandre 41 Reputation points
2021-08-04T18:49:21.377+00:00

Hi team,

I have been trying to call the Azure Cognitive Service (Image Analyze) but I am getting error 400. I have scanned all the docs I found about that but could not figure out what is wrong in the HTTP req

As the service requires a POST method, I am using Postman to test it first and then embed it in my code

That's the Azure Service endpoint

120575-image.png

Testing URL: https://picrecogapi.cognitiveservices.azure.com/vision/v3.2/analyze?visualFeatures=Adult%2CDescription&details=Celebrities&model-version=latest

Url Params as per Azure documentation:
120499-image.png

The two required HTTP Headers parameters as per the documentation

120583-image.png

The Image URL parameter in body of the HTTP Post as per documentation

120621-image.png

The error:

120584-image.png

I really appreciate any help on this!

Azure AI services
Azure AI services
A group of Azure services, SDKs, and APIs designed to make apps more intelligent, engaging, and discoverable.
2,645 questions
0 comments No comments
{count} votes

Accepted answer
  1. GiftA-MSFT 11,161 Reputation points
    2021-08-05T22:03:14.657+00:00

    Hi, thanks for reaching out. The content type is application/json so you need to enter the url in JSON format in the request body as shown below:

    120982-image.png

    Hope this helps!


0 additional answers

Sort by: Most helpful