curl --request POST \
--url https://api.openai.com/v1/uploads/{upload_id}/complete \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"part_ids": [
"<string>"
],
"md5": "<string>"
}
'{
"id": "<string>",
"created_at": 123,
"filename": "<string>",
"bytes": 123,
"purpose": "<string>",
"status": "pending",
"expires_at": 123,
"object": "upload",
"file": {
"id": "<string>",
"bytes": 123,
"created_at": 123,
"filename": "<string>",
"object": "file",
"purpose": "assistants",
"status": "uploaded",
"expires_at": 123,
"status_details": "<string>"
}
}Completes the Upload.
Within the returned Upload object, there is a nested File 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.
curl --request POST \
--url https://api.openai.com/v1/uploads/{upload_id}/complete \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"part_ids": [
"<string>"
],
"md5": "<string>"
}
'{
"id": "<string>",
"created_at": 123,
"filename": "<string>",
"bytes": 123,
"purpose": "<string>",
"status": "pending",
"expires_at": 123,
"object": "upload",
"file": {
"id": "<string>",
"bytes": 123,
"created_at": 123,
"filename": "<string>",
"object": "file",
"purpose": "assistants",
"status": "uploaded",
"expires_at": 123,
"status_details": "<string>"
}
}Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
The ID of the Upload.
"upload_abc123"
OK
The Upload object can accept byte chunks in the form of Parts.
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.
pending, completed, cancelled, expired The Unix timestamp (in seconds) for when the Upload will expire.
The object type, which is always "upload".
upload The ready File object after the Upload is completed.
Show child attributes
Was this page helpful?