REST API Documentation
Complete reference for programmatic media ingestion, streaming, batch operations, and full error payloads
Authentication
All REST API endpoints require authentication using your account API Key.
You can pass your API key in any of the following 3 standard formats:
x-api-key
Recommended for backend servers and API clients.
Authorization
Standard Bearer <key> token header.
Append ?api_key=<key> to request URL.
Error Handling & HTTP Status Codes
Comprehensive overview of standard error payloads and HTTP status codes returned by the API.
When any request fails, the API responds with standard HTTP status codes and a JSON body containing a descriptive
error
field. This makes error parsing reliable across all programming languages.
{
"error": "Descriptive explanation of why the request was rejected."
}
HTTP Status Codes Reference & Meanings
Missing or Invalid Request Payload
Triggered when required fields (like
file
or filenames) are missing, empty, or if more than 20 files are submitted in one upload.
Authentication Failed
API Key is absent from request headers/parameters or does not match any registered account.
Resource Not Found
The specified project identifier does not belong to the user, or the target media asset filename does not exist.
Ingestion Timeout
Asynchronous background file ingestion supervisor exceeded the 30-second timeout threshold.
File Storage / IO Failure
Server was unable to persist file to disk storage (e.g. disk space exhausted or write permission error).
Internal Server Error
An unhandled backend process failure or unexpected supervisor task termination occurred.
/api/projects/:identifier/upload
Upload Media Assets
Upload 1 to 20 media files (images, videos, audio, documents, archives) or direct public URLs (max 500MB each) into a project or subfolder.
Path Parameters
identifier
required
string
The unique project identifier (e.g. proj_my_project).
Request Payload Fields (Multipart Form-Data or JSON)
file
or
files
or
media
file or url required
binary file(s)
Binary file payload via multipart form-data. Attach single or multiple files (max 20 files per request, max 500MB each).
url
or
urls
or
file_url
file or url required
string or array
Direct HTTP/HTTPS link(s) to download and store. Supported in JSON body or form fields (max 20 URLs per request, max 500MB each).
filename
optional
string
Optional custom filename override when importing a single file from URL.
folder
or
folder_name
optional
string
Target subfolder path (e.g. marketing/2026). Creates folders automatically if non-existent.
Possible Response Payloads
{
"success": true,
"message": "Media uploaded successfully",
"data": {
"id": 104,
"publicUrl": "https://cloud.skdm.in/assets/proj_my_project/a9f1b2c3_banner.png"
}
}
{
"error": "Missing file parameter or URL. Please attach file(s) under key 'file', 'files', or 'media', or provide URL(s) under key 'url' or 'urls'."
}
{
"error": "Maximum 20 files/URLs allowed per upload request."
}
{
"error": "Unauthorized. Valid API key required via x-api-key header, Authorization: Bearer <key>, or api_key query parameter."
}
{
"error": "Project not found for identifier 'proj_my_project'"
}
{
"error": "Failed to save media: :enospc"
}
/api/projects/:identifier/assets/:filename
Delete Single Media Asset
Permanently remove a stored asset from the project container and underlying disk storage.
Path Parameters
identifier
required
string
Project identifier.
filename
required
string
The internal unique storage filename of the asset (e.g. 4a9e2b1f_banner.png).
Possible Response Payloads
{
"message": "Media asset deleted successfully",
"file_name": "4a9e2b1f_banner.png"
}
{
"error": "Media asset '4a9e2b1f_banner.png' not found in project 'proj_my_project'"
}
/api/projects/:identifier/assets
Batch Delete Media Assets
Delete multiple media assets in a single atomic API call.
JSON Body Payload
filenames
required
string[]
A JSON array containing the storage filenames to delete.
Possible Response Payloads
{
"success": true,
"message": "2 media assets deleted successfully",
"deleted_filenames": [
"4a9e2b1f_photo1.jpg",
"8c7d6e5a_photo2.jpg"
]
}
{
"error": "Please provide a non-empty list of filenames under key 'filenames'."
}
{
"error": "Project not found for identifier 'proj_my_project'"
}
/assets/:identifier/*path
Public Media Streaming & CDN Delivery
High-speed streaming endpoint for serving images, streaming HTML5 video/audio with byte-range seeks, and downloading documents.
This route is completely public (no auth header needed)
and is optimized for direct inclusion in <img src="...">, <video>, or frontend applications.
-
Cache-Control: public, max-age=31536000, immutable(1 year browser & CDN cache) -
Content-Type: <detected MIME type> -
Accept-Ranges: bytes(Fast video scrubber seeking)
Possible Response Payloads
HTTP/1.1 200 OK
Content-Type: image/png
Content-Length: 489201
Cache-Control: public, max-age=31536000, immutable
Accept-Ranges: bytes
<Binary Stream: https://cloud.skdm.in/assets/proj_my_project/4a9e2b1f_banner.png>
{
"error": "Asset 'banner.png' not found for project 'proj_my_project'"
}
# Option A: Upload binary file (multipart/form-data, max 500MB)
curl -X POST "https://cloud.skdm.in/api/projects/proj_my_project/upload" \
-H "x-api-key: your_api_key_here" \
-F "file=@/path/to/banner.png" \
-F "folder=marketing/2026"
# Option B: Upload via direct file URL (downloaded and stored by server, max 500MB)
curl -X POST "https://cloud.skdm.in/api/projects/proj_my_project/upload" \
-H "x-api-key: your_api_key_here" \
-H "Content-Type: application/json" \
-d '{
"url": "https://example.com/assets/banner.png",
"folder": "marketing/2026"
}'
{
"success": true,
"message": "Media uploaded successfully",
"data": {
"id": 104,
"publicUrl": "https://cloud.skdm.in/assets/proj_my_project/a9f1b2c3_banner.png"
}
}
curl -X DELETE "https://cloud.skdm.in/api/projects/proj_my_project/assets" \
-H "x-api-key: your_api_key_here" \
-H "Content-Type: application/json" \
-d '{
"filenames": [
"4a9e2b1f_photo1.jpg",
"8c7d6e5a_photo2.jpg"
]
}'
{
"success": true,
"message": "2 media assets deleted successfully",
"deleted_filenames": [
"4a9e2b1f_photo1.jpg",
"8c7d6e5a_photo2.jpg"
]
}
<!-- HTML Image / CDN Embedding -->
<img src="https://cloud.skdm.in/assets/proj_my_project/4a9e2b1f_banner.png" alt="Banner" />
<!-- HTML5 Video / Audio Streaming with seek ranges -->
<video controls src="https://cloud.skdm.in/assets/proj_my_project/marketing/promo.mp4"></video>
HTTP/1.1 200 OK
Content-Type: image/png
Content-Length: 489201
Cache-Control: public, max-age=31536000, immutable
Accept-Ranges: bytes
<Binary Stream: https://cloud.skdm.in/assets/proj_my_project/4a9e2b1f_banner.png>