Upload File - Part
Adds a Part to an Upload object, where each Part represents a segment of the file you are uploading. Each Part can be up to the standard size limit for file upload, based on the File Purpose. You can continue adding Parts until reaching the Upload size limit of 9 GB.
POST {endpoint}/openai/uploads/{upload-id}/parts?api-version=2024-10-21URI Parameters
| Name | In | Required | Type | Description | 
|---|---|---|---|---|
| data | formData | True | file | |
| 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). | 
| upload-id | path | True | string | The identifier of the upload. | 
| api-version | query | True | string | The requested API version. | 
Request Header
Media Types: "multipart/form-data"
| 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
Upload a part of large file upload operation.
Sample request
POST https://aoairesource.openai.azure.com/openai/uploads/fine-tune-72a2792ef7d24ba7b82c7fe4a37e379f/parts?api-version=2024-10-21
Sample response
{
  "upload_id": "fine-tune-72a2792ef7d24ba7b82c7fe4a37e379f",
  "azure_block_id": "LnmictL3p0u4LH/ko343nw==",
  "id": "uplprt-72a2792ef7d24ba7b82c7fe4a37e379f",
  "created_at": 1646126127,
  "object": "upload.part"
}Definitions
| Name | Description | 
|---|---|
| Error | Error | 
| Error | ErrorCode | 
| Error | ErrorResponse | 
| Inner | InnerError | 
| Inner | InnerErrorCode | 
| Type | TypeDiscriminator | 
| Upload | UploadPartResource | 
Error
Error
| Name | Type | Description | 
|---|---|---|
| code | ErrorCode | |
| details | Error[] | The error details if available. | 
| innererror | InnerError | |
| message | stringminLength: 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 | 
InnerError 
			
			InnerError
| Name | Type | Description | 
|---|---|---|
| code | InnerErrorCode | |
| innererror | InnerError | 
InnerErrorCode  
			
			InnerErrorCode
| Value | Description | 
|---|---|
| invalidPayload | The request data is invalid for this operation. | 
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. | 
UploadPartResource  
			
			UploadPartResource
| Name | Type | Description | 
|---|---|---|
| azure_block_id | string | |
| created_at | integer (unixtime) | A timestamp when this job or item was created (in unix epochs). | 
| id | string | The identity of this item. | 
| object | TypeDiscriminator | |
| upload_id | string |