Skip to main content

Upload File

POST/api/v1/media/files/upload

Upload files (images, documents, etc.) to your dedicated SpiderMedia bucket.

warning

The API playground above does not support file uploads. Use cURL, Postman, or code examples below instead. This endpoint requires multipart/form-data, not JSON.

Request

filefilerequired

The file to upload (max 100MB)

folderstring

Optional folder path within your bucket (e.g., "logos", "images/products")

Response

successboolean

Whether the upload succeeded

urlstring

Public URL to access the uploaded file

keystring

File key within the bucket

content_typestring

MIME type of the uploaded file

sizeinteger

File size in bytes

Example

curl -X POST "https://spideriq.ai/api/v1/media/files/upload" \
-H "Authorization: Bearer cli_abc123:sk_xxx:secret_xxx" \
-F "file=@company-logo.png" \
-F "folder=logos"

Response Example

{
"success": true,
"url": "https://media.spideriq.ai/client-cli-abc123/logos/company-logo.png",
"key": "logos/company-logo.png",
"content_type": "image/png",
"size": 15234,
"bucket_name": "client-cli-abc123"
}