Formerly known as Azure AI Services or Azure Cognitive Services is a unified collection of prebuilt AI capabilities within the Microsoft Foundry platform
Thanks for the question, please follow the below quickstart sample for image url.
Here is the document for the Use images in your AI chats.
# Packages required:
import requests
import json
api_base = '<your_azure_openai_endpoint>'
deployment_name = '<your_deployment_name>'
API_KEY = '<your_azure_openai_key>'
base_url = f"{api_base}openai/deployments/{deployment_name}"
headers = {
"Content-Type": "application/json",
"api-key": API_KEY
}
# Prepare endpoint, headers, and request body
endpoint = f"{base_url}/chat/completions?api-version=2023-12-01-preview"
data = {
"messages": [
{ "role": "system", "content": "You are a helpful assistant." },
{ "role": "user", "content": [
{ "type": "text", "text": "Describe this picture:" },
{ "type": "image_url", "url": "<URL or base-64-encoded image>" }
] }
],
"max_tokens": 100
}
# Make the API call
response = requests.post(endpoint, headers=headers, data=json.dumps(data))
print(f"Status Code: {response.status_code}")
print(response.text)