az-cognitiveservices
Manage Azure Cognitive Services resources
TLDR
Create an API Cognitive Services account in a specific location without confirmation required
List usages for Azure Cognitive Services account
Create a deployment for Azure Cognitive Services account
Create a commitment plan for Azure Cognitive Services account
Delete a commitment plan from Azure Cognitive Services account
SYNOPSIS
az cognitiveservices
Common subcommands include:
az cognitiveservices account
az cognitiveservices deployment
az cognitiveservices commitment-tier
PARAMETERS
--help -h
Show help message for the command or subcommand.
--output -o
Output format. Values: json, jsonc, table, tsv, yaml, yamlc, none. Default: json.
--query
JMESPath query string. See http://jmespath.org/ for more information and examples.
--verbose
Increase logging verbosity to show debug logs.
--debug
Increase logging verbosity to show all debug logs.
--subscription
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.
--only-show-errors
Put errors on stderr, and do not show warnings or other information.
--yes -y
Do not prompt for confirmation.
DESCRIPTION
The az-cognitiveservices command refers to the command group within the Azure Command-Line Interface (CLI) used for managing Azure Cognitive Services. These services provide powerful AI capabilities, such as vision, speech, language, and decision-making, which developers can integrate into their applications.
The az cognitiveservices command group allows users to programmatically interact with their Cognitive Services resources in Azure. This includes operations like creating, listing, showing details of, updating, and deleting Cognitive Services accounts, managing API keys, and handling resource deployments. It serves as a vital tool for automating resource provisioning, configuration, and management tasks, making it easier to integrate AI capabilities into continuous integration/continuous deployment (CI/CD) pipelines and scripting environments.
CAVEATS
- Requires the Azure CLI to be installed and configured on the Linux system.
- Users must be authenticated to Azure using az login with appropriate permissions for resource management.
- Understanding of Azure resource groups, subscriptions, and Cognitive Services resource types is essential for effective use.
- API limits and costs are associated with Cognitive Services resources; careful management is advised.
COMMON USAGE PATTERN
To create a Cognitive Services account:
az cognitiveservices account create --name myCognitiveAccount --resource-group myResourceGroup --kind TextAnalytics --sku S0 --location eastus
API KEYS MANAGEMENT
After creating an account, you can retrieve its API keys using:
az cognitiveservices account keys list --name myCognitiveAccount --resource-group myResourceGroup
MODEL DEPLOYMENT (E.G., AZURE OPENAI)
For services like Azure OpenAI, deploying a model is crucial:
az cognitiveservices deployment create --name myDeployment --account-name myOpenAIAccount --resource-group myResourceGroup --model-name gpt-4 --model-version 0613 --model-format OpenAI --sku-name Standard --capacity 1
HISTORY
The Azure CLI has evolved significantly since its initial release, with continuous integration of new Azure services. The Cognitive Services command group was introduced as part of this ongoing development, providing native command-line support for managing these AI services. Its usage has grown steadily alongside the increased adoption of Azure Cognitive Services, becoming a standard tool for developers and operations teams seeking to automate and script their AI infrastructure management within Azure.


