PixHub
Files

Files

Upload a file

POST /api/upload

Send a multipart/form-data request with a file field.

Restrictions

ParameterValue
Maximum size200 MB
Supported image formatsJPEG, PNG, GIF, WebP
Supported video formatsMP4, 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

ParameterTypeDescription
pageintegerPage 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

FieldTypeDescription
slugstringUnique identifier for the file
titlestring | nullTitle set by the user
urlstringURL of the file's page on PixHub
direct_urlstringDirect URL to the raw file
thumb_urlstring | nullThumbnail URL (may be null for new files)
mime_typestringThe file's MIME type
sizeintegerFile size in bytes
viewsintegerTotal number of views
likesintegerNumber of likes
created_atISO 8601 stringTime the file was uploaded