Deployments - Create
Creates a new deployment for the Azure OpenAI resource according to the given specification.
POST {endpoint}/openai/deployments?api-version=2022-12-01
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. |
Request Body
| Name | Required | Type | Description |
|---|---|---|---|
| model | True |
string |
The OpenAI model identifier (model-id) to deploy. Can be a base model or a fine tune. |
| scale_settings | True | ScaleSettings: |
ScaleSettings |
| error |
Error |
Responses
| Name | Type | Description |
|---|---|---|
| 201 Created |
The deployment has been successfully created. Headers Location: string |
|
| Other Status Codes |
An error occurred. |
Security
api-key
Provide your Cognitive Services Azure OpenAI account key here.
Type:
apiKey
In:
header
Examples
Creating a deployment.
Sample Request
POST https://aoairesource.openai.azure.com/openai/deployments?api-version=2022-12-01
{
"scale_settings": {
"capacity": 2,
"scale_type": "manual"
},
"model": "curie"
}
Sample Response
location: https://aoairesource.openai.azure.com/openai/deployments/deployment-afa0669ca01e4693ae3a93baf40f26d6
{
"scale_settings": {
"capacity": 2,
"scale_type": "manual"
},
"model": "curie",
"owner": "organization-owner",
"id": "deployment-afa0669ca01e4693ae3a93baf40f26d6",
"status": "notRunning",
"created_at": 1646126127,
"updated_at": 1646127311,
"object": "deployment"
}
Definitions
| Name | Description |
|---|---|
| Deployment |
Deployment |
| Error |
Error |
|
Error |
ErrorCode |
|
Error |
ErrorResponse |
|
Inner |
InnerError |
|
Inner |
InnerErrorCode |
|
Manual |
ManualScaleSettings |
|
Scale |
ScaleType |
|
Standard |
StandardScaleSettings |
| State |
State |
|
Type |
TypeDiscriminator |
Deployment
Deployment
| Name | Type | Description |
|---|---|---|
| created_at |
integer |
A timestamp when this job or item was created (in unix epochs). |
| error |
Error |
|
| id |
string |
The identity of this item. |
| model |
string |
The OpenAI model identifier (model-id) to deploy. Can be a base model or a fine tune. |
| object |
TypeDiscriminator |
|
| owner |
string |
The owner of this deployment. For Azure OpenAI only "organization-owner" is supported. |
| scale_settings | ScaleSettings: |
ScaleSettings |
| status |
State |
|
| updated_at |
integer |
A timestamp when this job or item was modified last (in unix epochs). |
Error
Error
| Name | Type | Description |
|---|---|---|
| code |
ErrorCode |
|
| details |
Error[] |
The error details if available. |
| innererror |
InnerError |
|
| message |
string |
The message of this error. |
| target |
string |
The location where the error happened if available. |
ErrorCode
ErrorCode
| Name | Type | Description |
|---|---|---|
| conflict |
string |
The requested operation conflicts with the current resource state. |
| fileImportFailed |
string |
Import of file failed. |
| forbidden |
string |
The operation is forbidden for the current user/api key. |
| internalFailure |
string |
Internal error. Please retry. |
| invalidPayload |
string |
The request data is invalid for this operation. |
| itemDoesAlreadyExist |
string |
The item does already exist. |
| jsonlValidationFailed |
string |
Validation of jsonl data failed. |
| notFound |
string |
The resource is not found. |
| quotaExceeded |
string |
Quota exceeded. |
| serviceUnavailable |
string |
The service is currently not available. |
| unexpectedEntityState |
string |
The operation cannot be executed in the current resource's state. |
ErrorResponse
ErrorResponse
| Name | Type | Description |
|---|---|---|
| error |
Error |
InnerError
InnerError
| Name | Type | Description |
|---|---|---|
| code |
InnerErrorCode |
|
| innererror |
InnerError |
InnerErrorCode
InnerErrorCode
| Name | Type | Description |
|---|---|---|
| invalidPayload |
string |
The request data is invalid for this operation. |
ManualScaleSettings
ManualScaleSettings
| Name | Type | Description |
|---|---|---|
| capacity |
integer |
The constant reserved capacity of the inference endpoint for this deployment. |
| scale_type |
string:
manual |
ScaleType |
ScaleType
ScaleType
| Name | Type | Description |
|---|---|---|
| manual |
string |
Scaling of a deployment will happen by manually specifying the capacity of a model. |
| standard |
string |
Scaling of a deployment will happen automatically based on usage. |
StandardScaleSettings
StandardScaleSettings
| Name | Type | Description |
|---|---|---|
| scale_type |
string:
standard |
ScaleType |
State
State
| Name | Type | Description |
|---|---|---|
| canceled |
string |
The operation has been canceled and is incomplete. |
| deleted |
string |
The entity has been deleted but may still be referenced by other entities predating the deletion. |
| failed |
string |
The operation has completed processing with a failure and cannot be further consumed. |
| notRunning |
string |
The operation was created and is not queued to be processed in the future. |
| running |
string |
The operation has started to be processed. |
| succeeded |
string |
The operation has successfully be processed and is ready for consumption. |
TypeDiscriminator
TypeDiscriminator
| Name | Type | Description |
|---|---|---|
| deployment |
string |
This object represents a deployment. |
| file |
string |
This object represents a file. |
| fine-tune |
string |
This object represents a fine tune job. |
| fine-tune-event |
string |
This object represents an event of a fine tune job. |
| list |
string |
This object represents a list of other objects. |
| model |
string |
This object represents a model (can be a base models or fine tune job result). |