Upload files using JSON with base64-encoded content. This endpoint is designed for workflow automation tools (Xano, N8N, Make, etc.) that don’t support multipart/form-data uploads.
For Xano/N8N users: This is the recommended endpoint for file uploads. The standard /upload endpoint requires multipart/form-data which most automation tools don’t support.
Request Body
Base64-encoded file content
Filename with extension (e.g., “image.png”, “document.pdf”)
MIME type (auto-detected from filename if not provided)
Optional folder path within your bucket (e.g., “logos”, “images/products”)
Response
Whether the upload succeeded
Public URL to access the uploaded file
File key within the bucket
MIME type of the uploaded file
Example
curl -X POST "https://spideriq.ai/api/v1/media/files/upload-base64" \
-H "Authorization: Bearer cli_abc123:sk_xxx:secret_xxx" \
-H "Content-Type: application/json" \
-d '{
"file_data": "iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mNk+M9QDwADhgGAWjR9awAAAABJRU5ErkJggg==",
"filename": "pixel.png",
"folder": "images"
}'
{
"success": true,
"url": "https://media.spideriq.ai/client-cli-abc123/images/pixel.png",
"key": "images/pixel.png",
"content_type": "image/png",
"size": 68,
"bucket": "client-cli-abc123",
"file_id": "images/pixel.png"
}
Xano Integration
In Xano, use an External API Request action:
- Method: POST
- URL:
https://spideriq.ai/api/v1/media/files/upload-base64
- Headers:
Authorization: Bearer {your_token}
Content-Type: application/json
- Body (JSON):
{
"file_data": "{base64_encoded_file}",
"filename": "uploaded-file.jpg",
"folder": "xano-uploads"
}
In Xano, you can use the base64_encode function to convert file content to base64 before sending.
N8N Integration
In N8N, use an HTTP Request node:
- Method: POST
- URL:
https://spideriq.ai/api/v1/media/files/upload-base64
- Authentication: Header Auth with
Authorization: Bearer {token}
- Body Content Type: JSON
- Body Parameters:
file_data: Use expression {{ $binary.data.data }} for binary data
filename: Your desired filename
folder: Optional folder path