curl --request POST \
--url https://api.openai.com/v1/uploads/{upload_id}/cancel \
--header 'Authorization: Bearer <token>'
{
"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,
"expires_at": 123,
"filename": "<string>",
"object": "file",
"purpose": "assistants",
"status": "uploaded",
"status_details": "<string>"
}
}
Cancels the Upload. No Parts may be added after an Upload is cancelled.
curl --request POST \
--url https://api.openai.com/v1/uploads/{upload_id}/cancel \
--header 'Authorization: Bearer <token>'
{
"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,
"expires_at": 123,
"filename": "<string>",
"object": "file",
"purpose": "assistants",
"status": "uploaded",
"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.
Was this page helpful?