The Uploads API is designed for files larger than what the Files API can handle in a single request. You split the file into parts, upload each part, then finalize the upload to get a standard file object.
$create() — Initialize the upload session, get an upload_id
$add_part() — Upload each chunk of the file (called multiple times)
$complete() — Finalize and assemble the file; returns a File object
(Optional) $cancel() — Abort if needed
new()UploadsClient$new(parent)
create()UploadsClient$create(purpose, filename, bytes, mime_type = NULL)
add_part()UploadsClient$add_part(upload_id, data)
complete()UploadsClient$complete(upload_id, part_ids, md5 = NULL)
cancel()UploadsClient$cancel(upload_id)
clone()The objects of this class are cloneable with this method.
UploadsClient$clone(deep = FALSE)deepWhether to make a deep clone.
Client for the OpenAI Uploads API. Upload large files in multiple parts
(multipart upload) when the file exceeds the 512 MB Files API limit.
Access via client$uploads.