Upload Image

Select an image to upload securely to your server.

Click to upload or drag and drop

PNG, JPG, WEBP up to 2MB

API Documentation

Upload Image

POST /api/upload.php

Required Headers

Header Value
x-api-key Your secret API key (from .env)

Request Body (FormData)

Field Type Description
file File The image to upload (max 2MB, jpg/png/webp)

JSON Response

{
  "success": true,
  "url": "https://yourdomain.com/images/uploads/my_pic_123.jpg",
  "name": "my_pic_123.jpg"
}

cURL Example

curl -X POST https://yourdomain.com/images/api/upload.php \
  -H "x-api-key: YOUR_SECRET_KEY" \
  -F "file=@/path/to/image.jpg"