By Fatskills Exam Guides Team — the exam nerds behind 28,500+ quizzes and 2.1M practice questions across 500+ global exams.
The Azure AI Vision Analyze API is a pre-built, serverless service that extracts structured insights from images—such as objects, people, text, and scenes—without requiring custom ML model training. It’s critical in ML pipelines where real-time or batch image understanding is needed, such as: - Retail: Automatically tagging product images for search and recommendations (e.g., "blue sneakers, size 10, running shoes").- Healthcare: Extracting text from medical forms (OCR) and detecting anomalies in X-rays (via custom vision if needed).- Media & Entertainment: Generating alt-text for accessibility (captions) and moderating user-uploaded content (tags for "violence," "adult content").- Logistics: Reading shipping labels (OCR) and verifying package contents (object detection).
Unlike Azure Custom Vision (which requires training), the Analyze API is zero-shot—you call it with an image URL or binary data, and it returns JSON with tags, captions, dense captions, and OCR results.
Azure AI Vision (Computer Vision) Service: Microsoft’s managed API for image analysis, including object detection, OCR, facial recognition, and scene understanding. Best for pre-built, low-code image insights (no training required).
Analyze API (Image Analysis 4.0): The latest version of Azure’s image analysis endpoint. Returns tags, captions, dense captions, objects, people, and OCR in a single call. Optimized for low latency and high accuracy on common scenarios.
Tags: Keywords describing the image (e.g., "dog," "beach," "sunset"). Useful for search indexing, content filtering, and recommendation systems.
Captions: A single natural-language sentence summarizing the image (e.g., "A dog playing on the beach"). Used for accessibility (alt-text) and content moderation.
Dense Captions: Multiple detailed descriptions of regions in the image (e.g., "A golden retriever running," "A blue beach ball"). Useful for fine-grained analysis (e.g., detecting multiple objects in a scene).
OCR (Optical Character Recognition): Extracts printed or handwritten text from images (e.g., receipts, forms, street signs). Azure’s OCR supports 164 languages and handles rotated, skewed, or low-quality text.
Read API (vs. OCR in Analyze API): A dedicated OCR endpoint for large documents (PDFs, multi-page TIFFs). Use this instead of the Analyze API’s OCR for high-volume text extraction (e.g., invoices, contracts).
Azure AI Document Intelligence (formerly Form Recognizer): A specialized OCR + layout analysis service for structured documents (tables, key-value pairs). Use this for invoices, receipts, or ID cards (not general images).
Azure Cognitive Search: A search service that can index and retrieve images based on tags, captions, or OCR text from the Analyze API. Useful for building image search engines.
Azure Functions / Logic Apps: Serverless tools to orchestrate the Analyze API (e.g., trigger OCR on new blob uploads). Logic Apps has a built-in "Computer Vision" connector for no-code workflows.
Azure Blob Storage: Where you store images before/after analysis. The Analyze API can read directly from blob URLs (no need to download locally).
Azure Event Grid: Triggers real-time processing when new images are uploaded to Blob Storage (e.g., "Run OCR on this new receipt").
Cost Model (Pay-as-you-go): Pricing is per 1,000 transactions (e.g., $1.50 per 1,000 images for the Analyze API). OCR is more expensive ($1.50 per 1,000 pages for Read API vs. $1.00 for Analyze API OCR).
Goal: Process 10,000 product images daily, extract tags/captions, and store results in a database for search.
product-images
sneakers.jpg
shirt.png
from azure.cognitiveservices.vision.computervision import ComputerVisionClient from azure.cognitiveservices.vision.computervision.models import VisualFeatureTypes from msrest.authentication import CognitiveServicesCredentials # Authenticate endpoint = "https://<your-resource-name>.cognitiveservices.azure.com/" key = "<your-api-key>" client = ComputerVisionClient(endpoint, CognitiveServicesCredentials(key)) # Image URL (from Blob Storage) image_url = "https://<storage-account>.blob.core.windows.net/product-images/sneakers.jpg" # Call Analyze API (get tags, captions, OCR) features = [ VisualFeatureTypes.tags, VisualFeatureTypes.description, # Captions VisualFeatureTypes.denseCaptions, VisualFeatureTypes.objects, VisualFeatureTypes.read # OCR ] response = client.analyze_image(image_url, features) # Extract results print("Tags:", [tag.name for tag in response.tags]) print("Caption:", response.description.captions[0].text) print("Dense Captions:", [caption.text for caption in response.dense_captions.dense_captions]) print("OCR Text:", [line.text for line in response.read.result.lines])
image_id
tags
caption
ocr_text
timestamp
json { "id": "sneakers.jpg", "tags": ["sneakers", "running shoes", "blue", "outdoor"], "caption": "A pair of blue running shoes on a white background", "ocr_text": ["Nike Air Zoom", "Size 10", "$129.99"], "processed_at": "2024-05-20T12:00:00Z" }
When a new blob is added to the container
def main(myblob: func.InputStream): # Get image URL blob_url = f"https://{myblob.name.split('/')[0]}.blob.core.windows.net/{myblob.name}"
# Call Analyze API (same as Step 3) response = client.analyze_image(blob_url, features) # Store in Cosmos DB (use Azure SDK) document = { "id": myblob.name.split('/')[-1], "tags": [tag.name for tag in response.tags], "caption": response.description.captions[0].text, "ocr_text": [line.text for line in response.read.result.lines] } container.upsert_item(document)
```
"Find all images with 'running shoes' and 'blue'"
time.sleep(2 retry_count)
language="fr"
language="es"
language="unk"
Exam Trap: If the question mentions "tables" or "key-value pairs", pick Document Intelligence, not the Analyze API.
Azure Cognitive Search vs. Analyze API:
A media company needs to automatically generate alt-text for 50,000 images in their CMS. The images are stored in Azure Blob Storage. Which Azure service should they use to process the images with minimal code? - A) Azure Custom Vision - B) Azure AI Vision Analyze API - C) Azure AI Document Intelligence - D) Azure Cognitive Search
Answer: B) Azure AI Vision Analyze APIExplanation: The Analyze API’s captions feature is designed for alt-text generation, and it can read directly from Blob Storage with no custom model training.
A logistics company scans 10,000 shipping labels daily. The labels are multi-page PDFs with rotated text. Which Azure service will provide the most accurate OCR results with the least management overhead? - A) Azure AI Vision Analyze API - B) Azure AI Vision Read API - C) Azure AI Document Intelligence - D) Azure Form Recognizer (Legacy)
Answer: B) Azure AI Vision Read APIExplanation: The Read API is optimized for multi-page documents (PDFs, TIFFs) and handles rotated text better than the Analyze API. Document Intelligence is better for structured forms (e.g., invoices).
A retail company wants to build a product search engine where users can find items by describing them (e.g., "red dress with flowers"). Which combination of Azure services should they use? - A) Azure AI Vision Analyze API + Azure Cognitive Search - B) Azure Custom Vision + Azure Blob Storage - C) Azure AI Document Intelligence + Azure SQL Database - D) Azure Form Recognizer + Azure Cosmos DB
Answer: A) Azure AI Vision Analyze API + Azure Cognitive SearchExplanation: The Analyze API extracts tags/captions, and Cognitive Search indexes them for semantic search. Custom Vision is overkill for this zero-shot scenario.
Join 4M+ learners. Unlock unlimited quizzes, wrong-answer tracking, flashcards + reminders, study guides, and 1-on-1 challenges.