SpiderMedia Storage
SpiderMedia provides per-client media isolation - each client gets their own dedicated storage for files and videos. This ensures complete data separation and enables client-specific media management.Overview
When you register as a SpiderIQ client, you automatically receive:SeaweedFS Bucket
Dedicated S3-compatible bucket for files, images, and logos
PeerTube Channel
Private channel for video imports and hosting
How It Works
Automatic Provisioning
When you register viaPOST /api/v1/clients/register, SpiderMedia automatically:
- Creates a SeaweedFS bucket named
client-{your_client_id} - Creates a PeerTube channel for video storage
- Stores credentials securely in your client record
- Returns media info in the registration response
File Storage
SpiderMedia provides three upload methods depending on your use case:Image Upload (v2.28.8)
Best for: Validated image uploads
POST /api/v1/media/images/uploadMagic byte validation + auto-correctionMultipart Upload
Best for: cURL, Postman, direct file uploads
POST /api/v1/media/files/uploadUses multipart/form-data with actual file bytesBase64 Upload
Best for: Xano, N8N, Make, automation tools
POST /api/v1/media/files/upload-base64Uses JSON with base64-encoded file contentNew in v2.28.8: The Image Upload endpoint validates images using magic byte detection and auto-corrects filename extensions. Use this for guaranteed image validation.
Option 1: Image Upload with Validation (v2.28.8)
For images that need format validation and auto-correction:Option 2: Multipart Upload (cURL/Postman)
Option 2: Base64 Upload (Xano/N8N)
Video Import
Import videos to your private PeerTube channel:1= Public (visible to everyone)2= Unlisted (accessible via link only, default)3= Private (only you can view)
Video Status & Direct URLs
After importing a video, use the status endpoint to check processing progress and get direct .mp4 URLs:Worker Integration
SpiderIQ workers automatically use your client-specific storage when processing jobs. For example, when SpiderSite extracts a company logo:- Worker receives job with your
client_id - Worker fetches your media credentials via internal API
- Logo is uploaded to your bucket, not a shared one
- Result includes URL pointing to your isolated storage
API Endpoints
File Operations
| Endpoint | Method | Description | Content-Type |
|---|---|---|---|
/media/images/upload | POST | Upload image with validation (v2.28.8) | multipart/form-data |
/media/files/upload | POST | Upload file (multipart) | multipart/form-data |
/media/files/upload-base64 | POST | Upload file (base64) | application/json |
/media/files/list | GET | List files in bucket | - |
/media/files/delete | DELETE | Delete files | application/json |
/media/stats | GET | Get storage stats | - |
Video Operations
| Endpoint | Method | Description | Content-Type |
|---|---|---|---|
/media/videos/import | POST | Import video from URL | application/json |
/media/videos/list | GET | List videos in channel | - |
/media/videos/{id}/status | GET | Get video status & URLs | - |
Key difference: File uploads have two endpoints (multipart vs base64). Video import only needs JSON since it downloads from a URL - no file bytes required.
Examples
Upload Company Logo
List All Files
Import Product Video
Get Storage Stats
Public URLs
All files in your bucket are publicly accessible via:https://media.spideriq.ai/client-cli-abc123/logos/logo.pnghttps://media.spideriq.ai/client-cli-abc123/images/product.jpg
Files are publicly accessible by URL but your bucket name is unique to your client_id, providing effective isolation.
Best Practices
Organize with Folders
Organize with Folders
Use folders to organize your files:
logos/- Company logosimages/- Product imagesdocuments/- PDFs and documents
Use Descriptive Names
Use Descriptive Names
Name files descriptively:
- Good:
company-logo-2026.png - Bad:
image1.png
Clean Up Unused Files
Clean Up Unused Files
Periodically delete files you no longer need to manage storage costs.
Xano Integration
Xano doesn’t support multipart/form-data uploads natively. Use the base64 endpoint instead.Upload File in Xano
- Create External API Request
- Configure:
- Method:
POST - URL:
https://spideriq.ai/api/v1/media/files/upload-base64 - Headers:
Authorization:Bearer {your_client_token}Content-Type:application/json
- Body (JSON):
- Method:
Import Video in Xano
Video import is simpler - just send JSON with the video URL:- Create External API Request
- Configure:
- Method:
POST - URL:
https://spideriq.ai/api/v1/media/videos/import - Headers:
Authorization:Bearer {your_client_token}Content-Type:application/json
- Body:
- Method:
Poll Video Status in Xano
After importing, poll the status endpoint untilstatus is ready:
- Method:
GET - URL:
https://spideriq.ai/api/v1/media/videos/{video_id}/status - When
status === "ready", usefile_urlfor the direct .mp4 link
N8N Integration
Upload File in N8N
Use the HTTP Request node:- Method: POST
- URL:
https://spideriq.ai/api/v1/media/files/upload-base64 - Authentication: Header Auth
- Name:
Authorization - Value:
Bearer {your_client_token}
- Name:
- Body Content Type: JSON
- Body Parameters:
file_data:{{ $binary.data.data }}(for binary input)filename:image.jpgfolder:n8n-uploads
Import Video in N8N
- Method: POST
- URL:
https://spideriq.ai/api/v1/media/videos/import - Body Content Type: JSON
- Body:
Troubleshooting
422 Unprocessable Entity on file upload
422 Unprocessable Entity on file upload
Cause: You’re sending JSON to the multipart endpoint.Solution: Use
/media/files/upload-base64 for JSON/base64 uploads, or use proper multipart/form-data with the original endpoint.Media not provisioned
Media not provisioned
If
media_created: false in your client info, your media resources weren’t created during registration. Contact support or use the admin provision endpoint.Upload fails
Upload fails
Check that:
- File size is under 100MB
- File type is supported (images, videos, documents)
- Your API credentials are valid
- You’re using the correct endpoint for your Content-Type
Video import stuck
Video import stuck
Video imports can take time depending on source file size. Use the
/videos/{id}/status endpoint to monitor progress. Status values: importing → transcoding → readyfile_url is null
file_url is null
The
file_url and download_url fields are only populated when video status is ready. Keep polling the status endpoint until processing completes.