Flow Chart
The multipart upload process consists of three main steps:- Generate pre-signed URLs - Request secure upload URLs from the Plaud API
- Upload file chunks - Upload each file chunk directly to cloud storage
- Complete upload with verification - Notify the API and verify file integrity
Walkthrough
1
Step 1: Create an API Token
First, create an API token using your client credentials to securely access the API. All subsequent requests will need this token.
2
Step 2: Bind a Device to a User
A recording’s ownership is inherited from the user account that owns the device. Therefore, you must bind a device to a user before uploading any recordings from it.
Learn how to bind a device
If your device haven’t been bound with a user account yet, please follow this guide first.
3
Step 3: Generate Upload URLs
Before uploading a recording, call this API to prepare for chunked upload.
The API will automatically calculate how to split your file into chunks and generate a unique upload plan.
You’ll receive a
file_id
, an upload_id
, and a list of secure pre-signed URLs - one for each chunk that needs to be uploaded.4
Step 4: Upload File Chunks
Using the pre-signed URLs from the previous step, upload each file chunk directly to secure cloud storage. For each successful chunk upload, the storage service will return an
ETag
header (a “digital receipt” for that chunk). You must collect all of these ETags.Note for cURL users: The cURL example above shows the structure for uploading a single chunk. The complete multipart upload flow requires uploading multiple chunks in a loop, which is better handled programmatically.
5
Step 5: Complete the Upload
After all chunks are uploaded, make one final call to the Plaud API. Provide the
file_id
, the upload_id
, and the list of “receipts” (part_list
) you collected. The API then verifies that all parts are present and assembles them into the final file.6
Step 6: Execute the Full Script
The following is a complete Python script that handles the entire upload workflow. Create a file named Now, run the script from your terminal:You should see the upload progress and the final file information.
upload_example.py
, paste the code below, and modify the placeholder variables.You will need to install the
requests
and tqdm
packages to run this script:
pip install requests tqdm
Common Error Scenarios
Error Code | Cause |
---|---|
FILE_UPLOAD_FAILED | S3 upload failed or network error, returns 400 |
FILE_MD5_NOT_MATCH | File integrity check failed, returns 400 |
DEVICE_NOT_BOUND | Device not bound to user when using sn, returns 400 |
Explore more
Webhook Notifications
Get real-time notifications on files event via webhooks.