Files
Upload a file
POST /api/upload
Send a multipart/form-data request with a file field.
Restrictions
| Parameter | Value |
|---|---|
| Maximum size | 200 MB |
| Supported image formats | JPEG, PNG, GIF, WebP |
| Supported video formats | MP4, WebM, MOV |
Success response - 201 Created
{
"upload": {
"slug": "aB3kX9",
"title": null,
"url": "https://pixhub.ro/i/aB3kX9",
"direct_url": "https://pixhub.ro/i/aB3kX9.jpg",
"thumb_url": "https://pixhub.ro/t/aB3kX9",
"mime_type": "image/jpeg",
"size": 204800,
"views": 0,
"likes": 0,
"created_at": "2026-06-28T12:00:00+00:00"
}
}
Request cost: Each upload consumes 10 quota units. An account on the default limit can perform up to 6 uploads per minute.
List files
GET /api/uploads
Returns your own files, most recent first, 50 per page.
Query parameters
| Parameter | Type | Description |
|---|---|---|
page | integer | Page number (default: 1) |
Success response - 200 OK
{
"data": [ { /* file object */ }, ... ],
"current_page": 1,
"last_page": 4,
"per_page": 50,
"total": 183
}
Get a single file
GET /api/uploads/{slug}
Returns the full details of one of your own files, identified by its slug.
Success response - 200 OK
{
"upload": { /* file object */ }
}
Returns 404 if the slug doesn't exist or doesn't belong to your account.
Delete a file
DELETE /api/uploads/{slug}
Permanently deletes a file and its associated thumbnail. This action cannot be undone.
Success response - 200 OK
{
"deleted": true
}
Returns 404 if the slug doesn't exist or doesn't belong to your account.
Request cost: Each deletion consumes 3 quota units.
The file object
| Field | Type | Description |
|---|---|---|
slug | string | Unique identifier for the file |
title | string | null | Title set by the user |
url | string | URL of the file's page on PixHub |
direct_url | string | Direct URL to the raw file |
thumb_url | string | null | Thumbnail URL (may be null for new files) |
mime_type | string | The file's MIME type |
size | integer | File size in bytes |
views | integer | Total number of views |
likes | integer | Number of likes |
created_at | ISO 8601 string | Time the file was uploaded |