PixGB API
REST JSON API for uploads, library management, and ImgBB-style replace. Auth with your Library API token. Integrate into apps, bots, and plugins.
Auth
X-Api-Token: YOUR_TOKEN X-API-Key: YOUR_TOKEN Authorization: Bearer YOUR_TOKEN # or ?key=YOUR_TOKEN
Token lives on Library after you sign in.
Upload
curl -X POST "https://pixgb.com/api/v1/upload" \ -H "X-Api-Token: YOUR_TOKEN" \ -F "image=@photo.jpg" \ -F "name=optional-title.jpg" \ -F "isPrivate=false" \ -F "customSlug=my-logo"
Accepts file or image (multipart or base64), optional resize
(resizeMode, allowUpscale, custom width/height),
and customSlug / slug for a vanity /i/… name.
Direct links include a file extension (e.g. /o/abc123.jpg) so picky BBCode forums accept them.
Response shape
{
"success": true,
"data": {
"url": "https://pixgb.com/i/…",
"display_url": "https://pixgb.com/o/….jpg",
"thumb_url": "https://pixgb.com/t/….jpg",
"links": { "bbcode": "[img]…[/img]", "markdown": "…", "html": "…" }
}
}
Other endpoints
GET /api/v1— discoveryGET /api/v1/account— plan, storage, bandwidthGET /api/v1/images— paginated libraryGET /api/v1/images/{code}PATCH /api/v1/images/{code}—{"isPrivate":true,"customSlug":"my-pic"}POST /api/v1/images/{code}/replace— keep same link, new file (prior version archived)- Responses include
sha256,view_count,bandwidth_bytes, and forumlinks POST /api/v1/images/{code}/resize—resizeMode=2x|3840|custom(+ optional width/height)DELETE /api/v1/images/{code}— Pro: trash 12 months (still uses storage);?permanent=truehard delete
ShareX
Power users: download a custom destination, open it in ShareX, replace YOUR_API_TOKEN with your Library token.
RequestURL: https://pixgb.com/api/v1/upload
Header: X-Api-Token
File form: image
URL: {"json:data.display_url"}
SEO & discovery
After every public upload PixGB automatically: (1) updates /sitemap.xml and /sitemap-latest.xml, (2) pings IndexNow (Bing, Yandex, and partners) with the new page + image URLs, (3) warms the viewer HTML so crawlers get a fast 200. Google has no public “index this URL now” API for normal pages — submit both sitemaps once in Google Search Console. Private / quarantined uploads are not notified.
Browser extension
Install Chrome / Firefox extension — right‑click any image → upload → forum‑safe link copied.
Also works with ShareX, this API, or paste/drop on the site.
Zero-click on the web
Guests can paste or drop images on the homepage without an account (session history at /recent). Apps should use the API above for durable library uploads.