POST /api/storage/upload
Uploads a file using a multipart/form-data request and returns a public CDN URL. Save the path field from the response — you need it to delete the file later.
Required Header
x-api-key: your pk_live_… or sk_live_… key.
Request Body
Send the request asmultipart/form-data with a single field:
The file to upload. Accepted as a binary file input (e.g., from an
<input type="file"> element
or a file buffer in Node.js).Response Fields
Human-readable confirmation (e.g.,
"File uploaded successfully").The public CDN URL where the file can be accessed. All uploaded files are publicly accessible —
do not upload sensitive or private documents.
The internal storage path in the format
PROJECT_ID/filename.ext. Save this value — you
must provide it when deleting the file.The storage backend used (e.g.,
"internal").File Limits
| Limit | Value |
|---|---|
| Max file size | 10 MB per file |
| Total storage quota | 100 MB (default plan) |
Code Examples
Success Response
Errors
| Status | Cause |
|---|---|
400 Bad Request | Missing file field in the multipart form |
401 Unauthorized | Missing or invalid API key |
413 Payload Too Large | File exceeds the 10 MB size limit |
