Programmatic access to your AlzCloud files. Available on Starter and Pro plans.
https://cloud.alz.name.ng/api/v1
All API requests require your API key. Find it in your Dashboard under API Key. Pass it as a header:
X-API-Key: your_api_key_here
Or as a query parameter (less secure):
GET /api/v1/files?api_key=your_api_key_here
| Code | Meaning |
|---|---|
| 401 | Missing or invalid API key |
| 403 | API access not available on your plan |
| 404 | File not found |
| 400 | Bad request (missing fields, file too large) |
| 500 | Server error — try again later |
curl https://cloud.alz.name.ng/api/v1/me \ -H "X-API-Key: your_key"
// Response
{
"id": 1,
"username": "yourname",
"email": "you@example.com",
"plan": "starter",
"storage_used": 10485760,
"storage_used_human": "10 MB",
"storage_limit": 53687091200,
"storage_limit_human": "50 GB"
}
// Response
{
"used": 10485760,
"used_human": "10 MB",
"limit": 53687091200,
"limit_human": "50 GB",
"remaining_human": "49.99 GB",
"percent": 0
}
| Param | Type | Default | Description |
|---|---|---|---|
| limit | number | 20 | Max files to return (max 100) |
| offset | number | 0 | Pagination offset |
// Response
{
"files": [
{
"id": 1,
"original_name": "video.mp4",
"slug": "abc123def456",
"mime_type": "video/mp4",
"size": 52428800,
"size_human": "50 MB",
"file_type": "video",
"downloads": 12,
"url": "https://cloud.alz.name.ng/f/abc123def456",
"download_url": "https://cloud.alz.name.ng/dl/abc123def456",
"embed_url": "https://cloud.alz.name.ng/embed/abc123def456"
}
],
"total": 42,
"limit": 20,
"offset": 0
}
curl https://cloud.alz.name.ng/api/v1/files/abc123def456 \ -H "X-API-Key: your_key"
Send as multipart/form-data. Field name must be file.
curl -X POST https://cloud.alz.name.ng/api/v1/upload \ -H "X-API-Key: your_key" \ -F "file=@/path/to/video.mp4"
// Response (201 Created)
{
"success": true,
"slug": "abc123def456",
"name": "video.mp4",
"size": 52428800,
"size_human": "50 MB",
"mime_type": "video/mp4",
"file_type": "video",
"url": "https://cloud.alz.name.ng/f/abc123def456",
"download_url": "https://cloud.alz.name.ng/dl/123456",
"embed_url": "https://cloud.alz.name.ng/embed/abc123def456"
}
JavaScript example:
const form = new FormData();
form.append('file', fileBlob, 'myfile.mp4');
const res = await fetch('https://cloud.alz.name.ng/api/v1/upload', {
method: 'POST',
headers: { 'X-API-Key': 'your_key' },
body: form,
});
const data = await res.json();
console.log(data.url);
curl -X DELETE https://cloud.alz.name.ng/api/v1/files/abc123def456 \ -H "X-API-Key: your_key"
// Response
{ "success": true, "message": "File deleted." }