I am trying to use the bing image search SDK, but this tutorial doesn't work for me:
from azure.cognitiveservices.search.imagesearch import ImageSearchClient
from msrest.authentication import CognitiveServicesCredentials
# This is my key generated by azure portal
subscription_key = "XXXXXXXXXXXXXXXXX"
# This is my endpoint generated by azure portal
subscription_endpoint = "https://vadmeggy-image-search.cognitiveservices.azure.com/bing/v7.0"
search_term = "bird"
client = ImageSearchClient(endpoint=subscription_endpoint, credentials=CognitiveServicesCredentials(subscription_key))
image_results = client.images.search(query=search_term)
Exception:
azure.cognitiveservices.search.imagesearch.models._models_py3.ErrorResponseException: Operation returned an invalid status code 'Resource Not Found'
What am i missing? I called the REST API and that worked well with the given subscription key. I can fallback to the REST API if the SDK doesn't work, but maybe somebody can help me.