POST
/uploads/{upload_id}/completeComplete an upload
Completes an upload by assembling its parts into a usable file. Supply part_ids in the intended order and optionally provide md5 to verify the uploaded contents; the total uploaded bytes must match the original upload size.
- RetriesRetries up to 2×, 500ms backoff, 30s timeout.
upload_idstringrequired
The identifier of the upload to complete.
Upload completion details specifying the ordered parts and optional checksum.
part_idsarray<string>required
The ordered list of Part IDs.
md5stringoptional
The optional md5 checksum for the file contents to verify if the bytes uploaded matches what you expect.
200Returns the completed upload object with status `completed` and a nested `file` object that is ready for use on the platform.
idstringrequired
The Upload unique identifier, which can be referenced in API endpoints.
created_atintegerrequired
The Unix timestamp (in seconds) for when the Upload was created.
filenamestringrequired
The name of the file to be uploaded.
bytesintegerrequired
The intended number of bytes to be uploaded.
purposestringrequired
The intended purpose of the file. [Please refer here](https://developers.openai.com/api/reference/resources/files#%28resource%29%20files%20%3E%20%28model%29%20file_object%20%3E%20%28schema%29%20%3E%20%28property%29%20purpose) for acceptable values.
statusstringrequired
The status of the Upload.
expires_atintegerrequired
The Unix timestamp (in seconds) for when the Upload will expire.
objectstringoptional
The object type, which is always "upload".
fileobjectoptional
Error handling
part_ids is required and must list the parts in their intended order. upload_id must identify the upload being completed, and the uploaded byte total must match the number declared when the upload was created; md5 may be supplied for checksum verification.