LinuxCommandLibrary

az-cognitiveservices

Manage Azure Cognitive Services resources

TLDR

Create an API Cognitive Services account in a specific location without confirmation required

$ az cognitiveservices account create [[-n|--name]] [account_name] [[-g|--resource-group]] [resource_group] --kind [API_name] [[-l|--location]] [location] --sku [sku_name] --yes
copy

List usages for Azure Cognitive Services account
$ az cognitiveservices account list-usage [[-n|--name]] [account_name] [[-g|--resource-group]] [resource_group]
copy

Create a deployment for Azure Cognitive Services account
$ az cognitiveservices account deployment create [[-n|--name]] [account_name] [[-g|--resource-group]] [resource_group] --deployment-name [deploy_name] --model-name [model_name] --model-version "[model_version]" --model-format [format_name]
copy

Create a commitment plan for Azure Cognitive Services account
$ az cognitiveservices account commitment-plan create [[-n|--name]] [account_name] [[-g|--resource-group]] [resource_group] --commitment-plan-name "[plan_name]" --hosting-model "[hosting_model]" --plan-type "[plan_type]" --auto-renew [false|true]
copy

Delete a commitment plan from Azure Cognitive Services account
$ az cognitiveservices account commitment-plan delete [[-g|--resource-group]] [resource_group] [[-n|--name]] [account_name] --commitment-plan-name "[plan_name]"
copy

SYNOPSIS

az cognitiveservices [create|delete|keys|list|show] [--resource-group|-g] [--name|-n] [--kind] [--location|-l] [--sku] [--output|-o] [--query] [-h|--help]

PARAMETERS

--debug
    Increase logging verbosity to show all debug logs.

--help -h
    Show this help message and exit.

--kind -k
    Type of Cognitive Service account (e.g., CognitiveServices, OpenAI).

--location -l
    Location for the account (e.g., eastus).

--name -n
    Name of the Cognitive Services account.

--output -o
    Output format (json, table, tsv, yaml).

--query
    JMESPath query string to customize output.

--resource-group -g
    Name of the resource group.

--sku
    SKU name (e.g., S0, F0).

--subscription
    Subscription ID to operate on.

--verbose
    Increase logging verbosity.

DESCRIPTION

The az cognitiveservices command is part of the Azure Command-Line Interface (CLI) for managing Cognitive Services accounts on Microsoft Azure. Cognitive Services provide pre-built AI models for vision, speech, language, decision-making, and more.

Use this command to create, list, update, delete accounts, retrieve API keys, regenerate keys, and deploy models. It supports resource groups, locations, SKUs (pricing tiers like S0, F0), and custom subdomains.

Requires Azure CLI installation and az login. Common workflows include provisioning accounts for specific services (e.g., Computer Vision) and managing access keys for application integration. Supports global parameters for output formatting, querying, and verbosity.

Ideal for DevOps automation, scripting deployments, and hybrid cloud setups on Linux environments.

CAVEATS

Requires Azure CLI >= 2.0, az login, and Contributor role on subscription/resource group. Free tiers (F0) have quotas; paid SKUs for production. Not all regions/kinds supported.

SUBCOMMANDS

create: Provision new account.
keys: List/regenerate API keys.
list: Enumerate accounts by group/subscription.

AUTHENTICATION

Uses Azure AD; supports service principals via az login --service-principal.

HISTORY

Introduced in Azure CLI 2.0 (2018) with Cognitive Services launch. Enhanced in 2021+ for multi-service accounts, OpenAI deployments, and quota management. Tracks Azure AI evolutions like unified SKUs.

SEE ALSO

az-login(1), az-group(1), az-resource(1)

Copied to clipboard