POST
https://spideriq.ai
/
api
/
v1
/
media
/
files
/
upload-base64
Upload File (Base64)
curl --request POST \
  --url https://spideriq.ai/api/v1/media/files/upload-base64 \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "file_data": "<string>",
  "filename": "<string>",
  "content_type": "<string>",
  "folder": "<string>"
}
'
{
  "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"
}
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

file_data
string
required
Base64-encoded file content
filename
string
required
Filename with extension (e.g., “image.png”, “document.pdf”)
content_type
string
MIME type (auto-detected from filename if not provided)
folder
string
Optional folder path within your bucket (e.g., “logos”, “images/products”)

Response

success
boolean
Whether the upload succeeded
url
string
Public URL to access the uploaded file
key
string
File key within the bucket
content_type
string
MIME type of the uploaded file
size
integer
File size in bytes

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:
  1. Method: POST
  2. URL: https://spideriq.ai/api/v1/media/files/upload-base64
  3. Headers:
    • Authorization: Bearer {your_token}
    • Content-Type: application/json
  4. 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:
  1. Method: POST
  2. URL: https://spideriq.ai/api/v1/media/files/upload-base64
  3. Authentication: Header Auth with Authorization: Bearer {token}
  4. Body Content Type: JSON
  5. Body Parameters:
    • file_data: Use expression {{ $binary.data.data }} for binary data
    • filename: Your desired filename
    • folder: Optional folder path