Bloofcat menyediakan API publik yang dapat digunakan oleh developer secara gratis tanpa memerlukan API Key atau Login.
Base URL
Gunakan base URL berikut untuk semua request API:
| Base URL |
|---|
https://api.bloofcat.pro |
Contoh endpoint lengkap:
| Method | Endpoint |
|---|---|
| POST | /api/upload |
| GET | /api/info/:slug |
| GET | /api/download/:slug |
Upload File
POST
/api/upload
Mengunggah file ke server storage (maksimal 700 MB).
Content-Type:multipart/form-data
Parameter Form Data
| Field | Tipe | Wajib | Keterangan |
|---|---|---|---|
file |
File Binary | Ya | File yang akan diunggah (Maks. 700 MB). |
expiry_hours |
Number | Tidak | Durasi file aktif dalam jam (misal 1 atau 24). |
Contoh Response (JSON)
JSON
{
"success": true,
"slug": "3f8a91b2",
"filename": "dokumen.pdf",
"mime_type": "application/pdf",
"size": 1048576,
"expires_at": "2026-10-10T10:00:00.000Z",
"link": "https://bloofcat.pro/f/3f8a91b2",
"download_url": "https://bloofcat.pro/api/download/3f8a91b2"
}
Keamanan File: Ekstensi berbahaya (seperti
.exe, .bat, .sh) otomatis ditolak dengan status 400 Bad Request.Get File Info
GET
/api/info/:slug
Mengambil metadata file tanpa perlu mengunduh isinya.
Contoh Response (JSON)
JSON
{
"success": true,
"slug": "3f8a91b2",
"filename": "dokumen.pdf",
"mime_type": "application/pdf",
"size": 1048576,
"expires_at": "2026-10-10T10:00:00.000Z",
"created_at": "2026-10-09 10:00:00",
"page_url": "https://bloofcat.pro/f/3f8a91b2",
"download_url": "https://bloofcat.pro/api/download/3f8a91b2"
}
Download File
GET
/api/download/:slug
Mengunduh file langsung sebagai stream binary.
HTTP Status Code
200 OK: Stream binary file disajikan.404 Not Found: Slug file tidak ditemukan.410 Gone: File telah kadaluarsa.
Contoh Kode Integrasi
cURL (Upload File)
cURL
curl -X POST https://api.bloofcat.pro/api/upload \
-F "file=@/path/ke/file.zip" \
-F "expiry_hours=24"
JavaScript Fetch (Browser / Node.js)
JavaScript
const formData = new FormData();
formData.append('file', fileInput.files[0]);
formData.append('expiry_hours', '24');
const res = await fetch('/api/upload', {
method: 'POST',
body: formData
});
const data = await res.json();
console.log('Download URL:', data.download_url);