Complete upload
POSThttps:/api.openai.com/v1/uploads/{upload_id}/complete
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.
Path parameters
upload_idstringRequired
The ID of the Upload.
Request body
part_idsarrayRequired
The ordered list of Part IDs.itemsstring
md5string
The optional md5 checksum for the file contents to verify if the bytes uploaded matches what you expect.
Response
The Upload object with status completed with an additional file property containing the created usable File object.
Example request
1 curl https://api.openai.com/v1/uploads/upload_abc123/complete2 -d '{3 "part_ids": ["part_def456", "part_ghi789"]4 }'
Example response
1 {2 "id": "upload_abc123",3 "object": "upload",4 "bytes": 2147483648,5 "created_at": 1719184911,6 "filename": "training_examples.jsonl",7 "purpose": "fine-tune",8 "status": "completed",9 "expires_at": 1719127296,10 "file": {11 "id": "file-xyz321",12 "object": "file",13 "bytes": 2147483648,14 "created_at": 1719186911,15 "filename": "training_examples.jsonl",16 "purpose": "fine-tune",17 }18 }
Built with