Piximg logo
📘

Overview

The Piximg API is a simple HTTP endpoint for uploading images from tools, scripts, ShareX, or custom applications. It returns clean, CDN-backed direct URLs plus deletion links and optional gallery URLs for batch uploads.

Fast & Simple

Standard multipart/form-data. Optional API token for Pro features.

🌍

CDN Backed

All images are served via a CDN for fast global delivery.

🔒

Deletion Control

Every upload gets a unique deletion token for image management.

🔗

Endpoint

All uploads, whether single or multiple, use the same endpoint:

POST https://pixi.mg/api

Parameters

  • file Single image upload
  • files[] Multiple images (creates gallery)

Supported Formats

  • PNG, JPEG, GIF, WebP
  • Limits depend on account tier
  • JSON response format
📊

Upload Limits

Upload limits depend on your account tier. Free users have standard limits, while Pro users enjoy higher limits.

🆓

Free Tier

  • 10 files per upload
  • 2MB maximum file size
  • No API token required

Pro Tier

£2/month
  • 20 files per upload
  • 5MB maximum file size
  • API token included
  • Personal gallery & dashboard
Upgrade to Pro →
💡

Anonymous Uploads

Uploads without an API token use free tier limits. Pro users must include their API token in requests to access Pro tier limits.

🔑

Authentication (Optional)

Pro users can generate an API token from their account dashboard to access Pro tier limits and have uploads linked to their account.

Header

X-Piximg-Token: YOUR_API_TOKEN_HERE
🔐

Getting Your API Token

Pro users can generate and manage API tokens from /account/api-tokens. Tokens enable Pro tier limits and link uploads to your account.

# Upload with API token for Pro limits
curl -H "X-Piximg-Token: your_token_here" \
     -F "file=@image.png" \
     https://pixi.mg/api
📤

Single Image Upload

Upload a single image and receive a direct URL, deletion link, and metadata.

# Single image upload using cURL
curl -F "file=@/path/to/image.png" https://pixi.mg/api

Example 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

Upload multiple files using files[] to automatically create a gallery with a shareable URL.

# Multi-image upload (creates a gallery)
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=affb09a203a94654&t=GALLERYTOKEN",
  "images": [
    {
      "direct_url": "https://i.pixi.mg/i/first.png",
      "delete_url": "https://pixi.mg/delete?f=first.png&t=TOKEN1",
      "original_name": "one.png"
    },
    {
      "direct_url": "https://i.pixi.mg/i/second.jpg",
      "delete_url": "https://pixi.mg/delete?f=second.jpg&t=TOKEN2",
      "original_name": "two.jpg"
    }
  ]
}
💡

Gallery URLs

Use gallery_url for sharing collections, or individual direct_url values for embedding images separately.

📋

Response Format

All API responses are JSON objects with the following structure:

success
booleantrue on successful upload, false on error
direct_url
string — Direct CDN link to the uploaded image (single uploads only)
delete_url
string — URL to permanently delete the image. Keep private!
gallery_url
string — Shareable gallery page (multi-upload only)
gallery_delete_url
string — URL to delete entire gallery batch
images
array — Array of image objects, each containing direct_url, delete_url, and original_name

ShareX Configuration

Quick ShareX Setup

Piximg integrates seamlessly with ShareX using a custom uploader configuration file. Set it up in seconds:

  1. 1 Visit /sharex to download the configuration file
  2. 2 Open the .sxcu file to import it into ShareX
  3. 3 Piximg is now available as a custom image uploader in ShareX

💡 Pro Tip: ShareX will automatically use the Piximg API endpoint and handle authentication for you. Images uploaded via ShareX will appear in your Piximg gallery if you're logged in.

⚠️ Important Notes

  • The API may evolve over time. Check this page for updates.
  • Upload limits are enforced server-side and will return an error if exceeded.
  • Avoid abusive or extremely high-volume automated uploads.
  • Cache direct URLs on your side to reduce API calls.
  • Deletion URLs contain sensitive tokens — never expose them publicly.