AZ-900Chapter 95 of 127Objective 2.2

Azure AI Cognitive Services

This chapter covers Azure AI Cognitive Services, a set of pre-built, pre-trained AI models that you can consume via APIs without needing data science expertise. For the AZ-900 exam, this falls under Objective 2.2 (Describe core Azure architecture services) and typically appears in 5-10% of questions. You'll learn what Cognitive Services are, how they work, their key categories, and how they differ from other Azure AI options like Azure Machine Learning. By the end, you'll be able to identify the correct service for a given scenario and avoid common exam traps.

25 min read
Beginner
Updated May 31, 2026

The Expert Consultant Team

Imagine your company wants to understand customer sentiment from thousands of support emails, but you have no data science team. Instead of hiring and training a full team (which is expensive and slow), you subscribe to a consulting firm that already has experts in language, vision, speech, and decision-making. Each expert has a specialty: one reads text and summarizes emotions, another describes images, a third transcribes phone calls, and a fourth makes recommendations. You send your data to the firm via a secure mailbox (the API endpoint), and each expert processes it using their pre-trained knowledge. You pay only for each task they handle, not for their salaries or training. The firm constantly updates its experts with the latest research, so you always get state-of-the-art results. In Azure, Cognitive Services are these pre-built AI experts, accessible via REST APIs or SDKs, that you integrate into your applications without needing to build, train, or host your own machine learning models.

How It Actually Works

What Are Azure AI Cognitive Services?

Azure AI Cognitive Services are a collection of cloud-based APIs and SDKs that allow developers to add intelligent features — such as vision, speech, language understanding, and decision-making — to their applications without needing to build, train, or host machine learning models. These services are pre-trained by Microsoft using vast datasets and are continuously updated. They are a key part of Microsoft's AI platform, alongside Azure Machine Learning (for custom models) and Azure Bot Service (for conversational AI).

Business Problem Solved

Building AI from scratch requires specialized data scientists, large labeled datasets, powerful GPU infrastructure, and months of development. Cognitive Services solve this by offering ready-to-use AI capabilities that can be integrated with a few lines of code. For example, a retail company can add image recognition to its app to identify products from user photos, or a customer service portal can automatically detect sentiment in support tickets.

How Cognitive Services Work: Step by Step

1.

Choose a service – From the Azure portal, you select a Cognitive Service like Computer Vision, Text Analytics, or Speech-to-Text.

2.

Create a resource – You provision the service in a specific Azure region, choosing a pricing tier (free or paid) and a resource group.

3.

Get an endpoint and key – Azure generates a REST API endpoint URL and two subscription keys. These are used to authenticate requests.

4.

Send data – Your application sends an HTTP request with the input data (e.g., an image URL or text) and the key in the header.

5.

Receive results – The service processes the data and returns a JSON response with the AI output (e.g., a list of objects detected in the image, sentiment scores).

Key Categories

Cognitive Services are grouped into five categories:

Vision: Computer Vision (image analysis, OCR), Custom Vision (train custom image classifiers), Face (detect and analyze faces), and Video Indexer (extract insights from video).

Speech: Speech-to-Text, Text-to-Speech, Speech Translation, and Speaker Recognition.

Language: Text Analytics (sentiment, key phrases, language detection), Language Understanding (LUIS) – now part of Azure Cognitive Service for Language, Translator Text, and QnA Maker (now part of Azure Cognitive Service for Language).

Decision: Anomaly Detector (identify unusual patterns), Content Moderator (flag offensive content), Personalizer (reinforcement learning to recommend actions).

Azure Cognitive Search (formerly Bing Search APIs): Adds AI-powered search capabilities to applications.

Pricing Tiers

Each service offers a Free tier (typically limited to 5,000-20,000 transactions per month) and paid Standard tiers that charge per transaction. For example, Computer Vision's Free tier allows 20 transactions per minute; the Standard tier starts at $1 per 1,000 transactions for image analysis. There is also a dedicated S tier for high-throughput scenarios. You can also purchase a commitment tier for volume discounts.

Comparison to On-Premises Equivalent

Traditionally, on-premises AI required installing software like OpenCV for vision or custom NLP libraries, managing GPU servers, and manually updating models. Cognitive Services eliminate all infrastructure management. The trade-off is that your data leaves your network and is processed in Azure's cloud; for data residency or compliance, you can use containers that run Cognitive Services on-premises (e.g., Azure Cognitive Services containers for Docker).

Azure Portal and CLI Touchpoints

Azure Portal: Navigate to "Cognitive Services" to create a multi-service resource or a single-service resource. You can also access the "Cognitive Services" blade to see all provisioned services.

Azure CLI: Use az cognitiveservices account create to create a service, az cognitiveservices account keys list to get keys, and az cognitiveservices account show to view properties.

Example CLI:

az cognitiveservices account create \
    --name mytextanalytics \
    --resource-group myRG \
    --kind TextAnalytics \
    --sku F0 \
    --location eastus

Security and Compliance

Cognitive Services use Azure Active Directory (AAD) authentication (token-based) or subscription keys. Data is encrypted at rest and in transit. For compliance, you can use customer-managed keys (CMK) for encryption. Some services support private endpoints for network isolation.

Limits and Quotas

Each service has rate limits (e.g., 20 calls per minute for Free tier) and maximum file sizes (e.g., image size for Computer Vision is 4MB). The Standard tier usually has higher limits. If you exceed the limit, you get a 429 (Too Many Requests) error. You can request a quota increase via Azure Support.

Walk-Through

1

Provision a Cognitive Service

In the Azure portal, click 'Create a resource' and search for the specific Cognitive Service you need, such as 'Computer Vision' or 'Text Analytics'. Choose a pricing tier (Free F0 for testing or Standard S0 for production) and select a region (e.g., East US). Assign it to a resource group. Behind the scenes, Azure allocates a managed endpoint and generates two subscription keys. The Free tier is ideal for learning but has low transaction limits (e.g., 5,000 per month). Always create a new resource per application for better cost tracking.

2

Retrieve Endpoint and Keys

After deployment, go to the resource's 'Keys and Endpoint' blade. You'll see a REST API endpoint URL (e.g., https://eastus.api.cognitive.microsoft.com/) and two keys (Key1 and Key2). Use either key in your application's HTTP header as 'Ocp-Apim-Subscription-Key'. Azure uses keys to authenticate and meter usage. Rotate keys periodically for security. Never expose keys in client-side code; instead, use environment variables or Azure Key Vault.

3

Send an API Request

Your application makes an HTTP POST request to the service's endpoint with the input data. For example, to analyze an image, you send a JSON body with a URL to the image or base64-encoded image data. The request includes the subscription key in the header. Azure's API gateway validates the key, routes the request to the appropriate backend model, and processes the data. The entire transaction is counted against your quota.

4

Process the Response

The service returns a JSON response containing the AI output. For Computer Vision, this might include a list of tags, a description, and coordinates of detected objects. Your application parses this JSON and uses the data to perform actions, such as displaying a caption on an image. The response is typically under 1MB. If the service cannot process the input (e.g., image too large or unsupported format), it returns a 400 Bad Request error.

5

Handle Errors and Quotas

If you exceed the rate limit, you receive a 429 (Too Many Requests) response. Implement retry logic with exponential backoff. For billing, monitor usage in Azure Cost Management. To scale, switch to a higher tier or use a multi-service Cognitive Services account. Additionally, some services offer containers for on-premises deployment, which you can orchestrate with Azure Kubernetes Service (AKS) if needed.

What This Looks Like on the Job

Scenario 1: Customer Support Sentiment Analysis A large e-commerce company receives thousands of customer emails daily. They want to automatically flag angry customers for priority response. They use Azure Text Analytics (a Language service) to analyze sentiment (positive, neutral, negative) and extract key phrases. The team provisions a Text Analytics resource in West US with a Standard S0 tier. Their email processing system sends each email's text to the API. The response includes a sentiment score (0 to 1) for each document. Emails with a score below 0.3 are routed to a high-priority queue. Cost is about $0.10 per 1,000 transactions, so for 50,000 emails per month, the cost is $5. A common mistake is using the wrong API endpoint (e.g., using the multi-service endpoint for a single-service key) or forgetting to handle rate limits, causing dropped requests.

Scenario 2: Image Moderation for Social Media A photo-sharing app wants to automatically block inappropriate images. They use Computer Vision to detect adult content and Content Moderator to check for offensive text in images. The team creates a Cognitive Services multi-service resource to manage both APIs under one key. Images are sent via HTTP POST. If the adult score exceeds 0.8, the image is moved to a review queue. They also set up a private endpoint to keep image data within their virtual network. A misconfiguration could be not setting the correct content type (e.g., sending 'application/octet-stream' instead of 'application/json'), leading to errors.

Scenario 3: Real-Time Speech Translation A multinational corporation needs real-time translation for video conferences. They use Speech-to-Text to transcribe audio, then Translator Text to translate to other languages. The team deploys the Speech service in the same region as their users (e.g., East Asia for Asian users) to minimize latency. They use the SDK to stream audio. The cost is $1 per hour of audio processed. If they forget to enable speaker diarization, the transcribed text won't differentiate speakers. Also, using the wrong locale (e.g., 'en-US' for British English) reduces accuracy.

How AZ-900 Actually Tests This

What AZ-900 Tests (Objective 2.2) The exam expects you to identify the correct Cognitive Service for a given business scenario. You must know the five categories (Vision, Speech, Language, Decision, and Azure Cognitive Search) and a few specific services within each. Common scenarios: detecting objects in images → Computer Vision; transcribing speech → Speech-to-Text; translating text → Translator Text; moderating content → Content Moderator or Computer Vision. The exam does NOT require you to remember pricing tiers or API details.

Top Wrong Answers and Why Candidates Choose Them 1. Choosing Azure Machine Learning instead of Cognitive Services – Candidates see 'AI' and pick Azure ML. But Azure ML is for building custom models; Cognitive Services are pre-built. The exam will phrase the question as 'pre-trained' or 'without needing to train a model'. 2. Selecting Bot Service for language understanding – Bot Service is for conversational bots; for language understanding, use Language Understanding (LUIS) or Text Analytics. 3. Confusing Content Moderator with Anomaly Detector – Content Moderator flags offensive content; Anomaly Detector finds unusual patterns in time-series data. 4. Overlooking the multi-service resource – The exam may ask which resource to create when using multiple Cognitive Services. The correct answer is 'Cognitive Services' (multi-service account) to share keys and simplify management.

Specific Terms and Values - The term 'pre-trained' is key – if you see 'pre-built', 'ready-to-use', or 'no training required', think Cognitive Services. - 'Cognitive Services' is the umbrella name; individual services like 'Computer Vision' are children. - The Free tier is called 'F0' and Standard is 'S0'. - 'Subscription key' is the authentication method, not OAuth2 (though AAD is supported).

Memory Trick Use the mnemonic 'VLSD' for the main categories: Vision, Language, Speech, Decision. Add 'Search' for Azure Cognitive Search. When you see a scenario, ask: 'Is the input an image, text, audio, or data?' Image → Vision; Text → Language; Audio → Speech; Data (time-series) → Decision.

Edge Cases - The exam may ask about 'Cognitive Services for Containers' – these are Docker containers that run Cognitive Services on-premises, useful for data residency. - 'Personalizer' is a Decision service that uses reinforcement learning to recommend actions; it's not for simple classification. - 'Video Indexer' is a Vision service for extracting insights from videos, not for real-time video analysis.

Decision Tree Is the scenario about pre-built AI? If yes → Cognitive Services. If custom model needed → Azure ML. Is the input an image? → Vision. Text? → Language. Audio? → Speech. Flagging offensive content? → Content Moderator or Computer Vision (adult detection). Translation? → Translator Text.

Key Takeaways

Cognitive Services are pre-built AI APIs that require no ML expertise to use.

They are grouped into five categories: Vision, Speech, Language, Decision, and Azure Cognitive Search.

Each service has a Free tier (F0) with limited transactions and Standard tiers (S0) for production.

Authentication is via subscription keys or Azure AD tokens.

Cognitive Services can be deployed on-premises using Docker containers for data residency.

On the AZ-900 exam, identify the correct service by the input type (image, text, audio, data).

Common exam scenarios: object detection (Computer Vision), sentiment analysis (Text Analytics), speech transcription (Speech-to-Text), content moderation (Content Moderator).

Easy to Mix Up

These come up on the exam all the time. Here's how to tell them apart.

Azure Cognitive Services

Pre-built, pre-trained AI models

Accessed via APIs or SDKs

No ML expertise needed

Fixed functionality (mostly)

Pay-per-transaction pricing

Azure Machine Learning

Custom ML models built by you

Requires training and deployment

Requires data science skills

Fully customizable

Pay for compute and storage

Watch Out for These

Mistake

Cognitive Services require machine learning expertise to use.

Correct

They are designed for developers without ML expertise. You only need to know how to make HTTP requests and parse JSON. No model training or data science skills are required.

Mistake

All Cognitive Services are available in every Azure region.

Correct

Not all services are available in every region. For example, some services like Personalizer may be limited to certain regions. Always check regional availability in the Azure documentation.

Mistake

Cognitive Services are free to use.

Correct

Only the Free tier (F0) is free up to a limited number of transactions per month. Standard tiers incur costs based on usage. Exceeding the free tier limits results in charges.

Mistake

You can train Cognitive Services with your own data.

Correct

Most Cognitive Services are pre-trained and not customizable. Exceptions include Custom Vision (train custom image classifiers) and Custom Speech (train custom speech models). For other services like Text Analytics, you cannot retrain the model.

Mistake

Cognitive Services can only be accessed via REST APIs.

Correct

While REST APIs are the primary interface, Microsoft also provides SDKs for multiple languages (C#, Python, Java, JavaScript, Go) and client libraries. Additionally, some services offer a web-based test console in the Azure portal.

Frequently Asked Questions

What is the difference between Cognitive Services and Azure Machine Learning?

Cognitive Services are pre-built AI models accessible via APIs – you don't build or train them. Azure Machine Learning is a platform for building, training, and deploying your own custom machine learning models. Use Cognitive Services when you need standard AI capabilities quickly; use Azure ML when you need a custom model trained on your specific data. For AZ-900, remember that Cognitive Services are 'pre-trained' and 'ready-to-use'.

Can I use Cognitive Services on-premises?

Yes, through Azure Cognitive Services containers. These Docker containers allow you to run services like Text Analytics or Computer Vision locally, which is useful for data residency or low-latency requirements. You still need an Azure subscription for licensing and metering, but data stays on-premises. This is a common exam edge case.

How do I authenticate to Cognitive Services?

The primary method is using subscription keys. You get two keys when you create a resource; include one in the HTTP header as 'Ocp-Apim-Subscription-Key'. Alternatively, you can use Azure Active Directory (AAD) tokens for more secure access. For AZ-900, you only need to know that keys are used, not the AAD details.

What is the Free tier limit for Cognitive Services?

The Free tier (F0) typically allows 5,000 to 20,000 transactions per month, depending on the service. For example, Computer Vision's F0 tier allows 20 transactions per minute and 5,000 per month. The Standard tier (S0) has no monthly limit but charges per transaction. The exam may ask about the F0 tier for testing purposes.

Which Cognitive Service would I use to detect objects in an image?

Use Computer Vision, which is part of the Vision category. It can identify thousands of objects, read text (OCR), and generate captions. Custom Vision is used if you need to detect specific objects unique to your business. For AZ-900, if the scenario says 'pre-trained' and 'common objects', choose Computer Vision.

What is the multi-service Cognitive Services resource?

A multi-service Cognitive Services resource (kind 'CognitiveServices') provides a single endpoint and key for multiple Cognitive Services (e.g., Computer Vision, Text Analytics, Translator). This simplifies management and reduces the number of keys. You create it by choosing 'Cognitive Services' in the Azure Marketplace instead of a specific service. The exam may ask which resource to use for multiple services.

Are Cognitive Services included in Azure free account?

Yes, the Azure free account includes access to the Free tier of many Cognitive Services, subject to the limits (e.g., 5,000 transactions per month). This allows you to experiment without cost. However, exceeding the free tier limits will incur charges. For AZ-900, know that you can test Cognitive Services within the free account limits.

Terms Worth Knowing

Ready to put this to the test?

You've just covered Azure AI Cognitive Services — now see how well it sticks with free AZ-900 practice questions. Full explanations included, no account needed.

Done with this chapter?