AlzCloud API

Programmatic access to your AlzCloud files. Available on Starter and Pro plans.

Base URL: https://cloud.alz.name.ng/api/v1

Authentication

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

Error Codes

CodeMeaning
401Missing or invalid API key
403API access not available on your plan
404File not found
400Bad request (missing fields, file too large)
500Server error — try again later

Account Info

GET /api/v1/me Get your account details
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"
}

Storage Usage

GET /api/v1/storage Storage breakdown
// Response
{
  "used": 10485760,
  "used_human": "10 MB",
  "limit": 53687091200,
  "limit_human": "50 GB",
  "remaining_human": "49.99 GB",
  "percent": 0
}

List Files

GET /api/v1/files List your uploaded files
ParamTypeDefaultDescription
limitnumber20Max files to return (max 100)
offsetnumber0Pagination 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
}

Get File Info

GET /api/v1/files/:slug Get a single file's details
curl https://cloud.alz.name.ng/api/v1/files/abc123def456 \
  -H "X-API-Key: your_key"

Upload File

POST /api/v1/upload Upload a file

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);

Delete File

DELETE /api/v1/files/:slug Permanently delete a file
curl -X DELETE https://cloud.alz.name.ng/api/v1/files/abc123def456 \
  -H "X-API-Key: your_key"
// Response
{ "success": true, "message": "File deleted." }