Completes the [Upload](/docs/api-reference/uploads/object). Within the returned Upload object, there is a nested [File](/docs/api-reference/files/object) object that is ready to use in the rest of the platform. You can specify the order of the Parts by passing in an ordered list of the Part IDs. The number of bytes uploaded upon completion must match the number of bytes initially specified when creating the Upload object. No Parts may be added after an Upload is completed.
POST /uploads/{upload_id}/complete
Authorizations
Parameters
Path Parameters
The ID of the Upload.
Request Body required
object
The ordered list of Part IDs.
The optional md5 checksum for the file contents to verify if the bytes uploaded matches what you expect.
Responses
200
OK
The Upload object can accept byte chunks in the form of Parts.
object
The Upload unique identifier, which can be referenced in API endpoints.
The Unix timestamp (in seconds) for when the Upload was created.
The name of the file to be uploaded.
The intended number of bytes to be uploaded.
The intended purpose of the file. Please refer here for acceptable values.
The status of the Upload.
The Unix timestamp (in seconds) for when the Upload was created.
The object type, which is always “upload”.
The ready File object after the Upload is completed.
object
The file identifier, which can be referenced in the API endpoints.
The size of the file, in bytes.
The Unix timestamp (in seconds) for when the file was created.
The name of the file.
The object type, which is always file
.
The intended purpose of the file. Supported values are assistants
, assistants_output
, batch
, batch_output
, fine-tune
, fine-tune-results
and vision
.
Deprecated. The current status of the file, which can be either uploaded
, processed
, or error
.
Deprecated. For details on why a fine-tuning training file failed validation, see the error
field on fine_tuning.job
.