Rushikesh Gaidhani
Rushikesh Gaidhani

Reputation: 116

Are there any REST APIs available to retrieve the properties of a deployed Azure OpenAI model?

Are there any REST APIs available that can be used to retrieve the properties of a deployed model or obtain a list of model deployments?

I have searched through the documentation but couldn't find any information specifically listing the properties of deployed models.

docs: https://learn.microsoft.com/en-us/rest/api/azureopenai/models?view=rest-azureopenai-2024-05-01-preview

enter image description here

Upvotes: 0

Views: 442

Answers (2)

kuppan
kuppan

Reputation: 48

As mentioned in the Azure Documentation

you can use the Deployment -GET API which will fetch the following

  1. Model Name
  2. Deployment Type
  3. Model properties
  4. Scale settings
  5. provisioning state

Request HTTP GET https://management.azure.com/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.CognitiveServices/accounts/accountName/deployments/deploymentName?api-version=2023-05-01

Response

    {
  "id": "",
  "name": "deploymentName",
  "type": "Microsoft.CognitiveServices/accounts/deployments",
  "properties": {
    "model": {
      "format": "OpenAI",
      "name": "ada",
      "version": "1"
    },
    "scaleSettings": {
      "scaleType": "Manual",
      "capacity": 1
    },
    "provisioningState": "Succeeded"
  }
}    

Link to Documentation: GET - Model Deployment

Upvotes: 0

Venkatesan
Venkatesan

Reputation: 10455

Are there any REST APIs available to retrieve the properties of a deployed Azure OpenAI model?

You can use the below REST API request to retrieve the properties of a deployed Azure OpenAI model.

In my environment, I had deployed model with the name gpt-35-turbo with properties like below:

Portal: enter image description here

REST API:

GET https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}/deployments/{deploymentName}?api-version=2023-05-01 
Headers: 
Authorization: Bearer <access token>

Output: enter image description here

Reference:

Deployments - Get - REST API (Azure Azure AI Services) | Microsoft Learn

Upvotes: 0

Related Questions