Piximg API Documentation
The Piximg API provides a simple, lightweight HTTP interface for uploading images. It is designed for automation tools, custom scripts, ShareX, command-line workflows, and the Piximg desktop app. All uploads return clean direct URLs and optional deletion links.
Upload Endpoint
All uploads — single or multiple — are handled through:
POST /api
- Single upload field:
file - Multiple uploads:
files[] - Accepted formats: PNG, JPEG, GIF, WebP
- Returns: JSON (direct URL, delete link, and image metadata)
Single Image Upload
Ideal for ShareX, CLI scripts, or any tool that uploads one file at a time:
# Example using curl (single image)
curl -F "file=@/path/to/image.png" https://pixi.mg/api
# Example JSON response
{
"success": true,
"direct_url": "https://i.pixi.mg/i/abc123.png",
"delete_url": "https://pixi.mg/delete?f=abc123.png&t=DELETETOKEN",
"images": [
{
"direct_url": "https://i.pixi.mg/i/abc123.png",
"delete_url": "https://pixi.mg/delete?f=abc123.png&t=DELETETOKEN",
"original_name": "image.png"
}
]
}
Multiple Images & Galleries
Uploading multiple files creates a gallery with its own shareable URL.
# Example using curl (multi-image)
curl -F "files[]=@/path/to/one.png" \
-F "files[]=@/path/to/two.jpg" \
https://pixi.mg/api
# Example response
{
"success": true,
"gallery_url": "https://pixi.mg/g/affb09a203a94654",
"gallery_delete_url": "https://pixi.mg/delete-gallery?g=affb09a&t=TOKEN",
"images": [
{
"direct_url": "https://i.pixi.mg/i/first.png",
"delete_url": "https://pixi.mg/delete?f=first.png&t=A",
"original_name": "one.png"
},
{
"direct_url": "https://i.pixi.mg/i/second.jpg",
"delete_url": "https://pixi.mg/delete?f=second.jpg&t=B",
"original_name": "two.jpg"
}
]
}
Notes:
- Use
direct_urlfor embedding or sharing. delete_urlremoves a single file.gallery_urlis created when multiple images are uploaded.gallery_delete_urlremoves the entire gallery batch.
ShareX Configuration
Piximg integrates easily with ShareX using a custom uploader file:
- Open
/sharex - Download the
.sxcufile - ShareX will auto-import Piximg as your image uploader
The Piximg API may evolve over time. Please be considerate and avoid excessive request rates or automated abuse.