Models - List
Gets a list of all models that are accessible by the Azure OpenAI resource. These include base models as well as all successfully completed fine-tuned models owned by the Azure OpenAI resource.
GET {endpoint}/openai/models?api-version=2024-10-21
URI Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
|
endpoint
|
path | True |
string (url) |
Supported Cognitive Services endpoints (protocol and hostname, for example: https://aoairesource.openai.azure.com. Replace "aoairesource" with your Azure OpenAI account name). |
|
api-version
|
query | True |
string |
The requested API version. |
Request Header
| Name | Required | Type | Description |
|---|---|---|---|
| api-key | True |
string |
Provide your Cognitive Services Azure OpenAI account key here. |
Responses
| Name | Type | Description |
|---|---|---|
| 200 OK |
Success |
|
| Other Status Codes |
An error occurred. |
Security
api-key
Provide your Cognitive Services Azure OpenAI account key here.
Type:
apiKey
In:
header
Examples
Getting all models owned by account.
Sample request
GET https://aoairesource.openai.azure.com/openai/models?api-version=2024-10-21
Sample response
{
"data": [
{
"status": "succeeded",
"capabilities": {
"fine_tune": true,
"inference": true,
"completion": true,
"chat_completion": false,
"embeddings": false
},
"lifecycle_status": "generally-available",
"deprecation": {
"fine_tune": 1677662127,
"inference": 1709284527
},
"id": "curie",
"created_at": 1646126127,
"object": "model"
},
{
"status": "succeeded",
"model": "curie",
"fine_tune": "ft-72a2792ef7d24ba7b82c7fe4a37e379f",
"capabilities": {
"fine_tune": false,
"inference": true,
"completion": true,
"chat_completion": false,
"embeddings": false
},
"lifecycle_status": "generally-available",
"deprecation": {
"inference": 1709284527
},
"id": "curie.ft-72a2792ef7d24ba7b82c7fe4a37e379f",
"created_at": 1646126127,
"object": "model"
}
],
"object": "list"
}
Definitions
| Name | Description |
|---|---|
| Capabilities |
Capabilities |
| Deprecation |
Deprecation |
| Error |
Error |
|
Error |
ErrorCode |
|
Error |
ErrorResponse |
|
Fine |
FineTuningState |
|
Inner |
InnerError |
|
Inner |
InnerErrorCode |
|
Life |
LifeCycleStatus |
| Model |
Model |
|
Model |
ModelList |
|
Type |
TypeDiscriminator |
Capabilities
Capabilities
| Name | Type | Description |
|---|---|---|
| chat_completion |
boolean |
A value indicating whether a model supports chat completion. |
| completion |
boolean |
A value indicating whether a model supports completion. |
| embeddings |
boolean |
A value indicating whether a model supports embeddings. |
| fine_tune |
boolean |
A value indicating whether a model can be used for fine tuning. |
| inference |
boolean |
A value indicating whether a model can be deployed. |
Deprecation
Deprecation
| Name | Type | Description |
|---|---|---|
| fine_tune |
integer (unixtime) |
The end date of fine tune support of this model. Will be |
| inference |
integer (unixtime) |
The end date of inference support of this model. |
Error
Error
| Name | Type | Description |
|---|---|---|
| code |
ErrorCode |
|
| details |
Error[] |
The error details if available. |
| innererror |
InnerError |
|
| message |
string minLength: 1 |
The message of this error. |
| target |
string |
The location where the error happened if available. |
ErrorCode
ErrorCode
| Value | Description |
|---|---|
| conflict |
The requested operation conflicts with the current resource state. |
| invalidPayload |
The request data is invalid for this operation. |
| forbidden |
The operation is forbidden for the current user/api key. |
| notFound |
The resource is not found. |
| unexpectedEntityState |
The operation cannot be executed in the current resource's state. |
| itemDoesAlreadyExist |
The item does already exist. |
| serviceUnavailable |
The service is currently not available. |
| internalFailure |
Internal error. Please retry. |
| quotaExceeded |
Quota exceeded. |
| jsonlValidationFailed |
Validation of jsonl data failed. |
| fileImportFailed |
Import of file failed. |
| tooManyRequests |
Too many requests. Please retry later. |
| unauthorized |
The current user/api key is not authorized for the operation. |
| contentFilter |
Image generation failed as a result of our safety system. |
ErrorResponse
ErrorResponse
| Name | Type | Description |
|---|---|---|
| error |
Error |
FineTuningState
FineTuningState
| Value | Description |
|---|---|
| created |
The operation was created. This state is not returned by Azure OpenAI and exposed only for compatibility. It can be categorized as an inactive state. |
| pending |
The operation is not yet queued to be processed in the future. It can be categorized as an inactive state. |
| running |
The operation has started to be processed. It can be categorized as an active state. |
| succeeded |
The operation has successfully be processed and is ready for consumption. It can be categorized as a terminal state. |
| cancelled |
The operation has been cancelled and is incomplete. It can be categorized as a terminal state. |
| failed |
The operation has completed processing with a failure and cannot be further consumed. It can be categorized as a terminal state. |
InnerError
InnerError
| Name | Type | Description |
|---|---|---|
| code |
InnerErrorCode |
|
| innererror |
InnerError |
InnerErrorCode
InnerErrorCode
| Value | Description |
|---|---|
| invalidPayload |
The request data is invalid for this operation. |
LifeCycleStatus
LifeCycleStatus
| Value | Description |
|---|---|
| preview |
Model is in preview and covered by the service preview terms. |
| generally-available |
Model is generally available. |
Model
Model
| Name | Type | Description |
|---|---|---|
| capabilities |
Capabilities |
|
| created_at |
integer (unixtime) |
A timestamp when this job or item was created (in unix epochs). |
| deprecation |
Deprecation |
|
| fine_tune |
string |
The fine tune job identity (fine-tune-id) if this is a fine tune model; otherwise |
| id |
string |
The identity of this item. |
| lifecycle_status |
LifeCycleStatus |
|
| model |
string |
The base model identity (model-id) if this is a fine tune model; otherwise |
| object |
TypeDiscriminator |
|
| status |
FineTuningState |
ModelList
ModelList
| Name | Type | Description |
|---|---|---|
| data |
Model[] |
The list of items. |
| object |
TypeDiscriminator |
TypeDiscriminator
TypeDiscriminator
| Value | Description |
|---|---|
| list |
This object represents a list of other objects. |
| fine_tuning.job |
This object represents a fine tune job. |
| file |
This object represents a file. |
| fine_tuning.job.event |
This object represents an event of a fine tuning job. |
| fine_tuning.job.checkpoint |
This object represents a checkpoint of a fine tuning job. |
| model |
This object represents a model (can be a base model or fine tune job result). |
| batch |
This object represents a batch. |
| upload |
This object represents a file upload. |
| upload.part |
This object represents part of a file upload. |