API Documentation

Account, activity and service-health endpoints for SmartImageTools.com.

Base URL

https://www.smartimagetools.com

All API endpoints return JSON responses with a success boolean field.

Authentication

Protected endpoints require authentication via HTTP-only cookie. Writes use same-origin JSON requests, and rate-limited responses return 429 with Retry-After. Log in via /api/auth/login to receive the auth cookie automatically.

Endpoints

GET/api/health

Check the API, database and required local processing assets. Returns 503 when a check fails.

Response

{ success, checks: { api, database, assets }, checkedAt }
GET/api/account/usage

Get your own recorded image activity for the past 30 days. Requires a signed-in account.

Response

{ success: true, data: { stats, history } }
GET/api/stats

Get site-wide processing statistics

Response

{ success: true, data: { totalProcessed, todayProcessed, avgProcessingTime } }
GET/api/history

Get your recent activity while signed in. Administrators can access site-wide history.

Response

{ success: true, data: [{ id, file_name, width, height, ... }] }
POST/api/history

Record bounded numeric processing measurements. Filenames, IPs, user-agent strings and client account IDs are discarded. New events expire after 30 days.

Request Body

{ fileSize, width, height, watermarkSize, processingTimeMs, toolType }

Response

{ success: true }
POST/api/auth/register

Register a new user account. New passwords need at least 12 characters and at most 72 UTF-8 bytes.

Request Body

{ name, email, password }

Response

{ success: true, data: { id, name, email, role } }
POST/api/auth/login

Log in to an existing account

Request Body

{ email, password }

Response

{ success: true, data: { id, name, email, role } }
GET/api/auth/me

Get current authenticated user info

Response

{ success: true, data: { id, name, email, role } }
POST/api/feedback

Submit a feedback/contact message

Request Body

{ name, email, message }

Response

{ success: true }
GET/api/blog

Get published blog posts

Response

{ success: true, data: [{ id, title, slug, excerpt, ... }] }

Note on Image Processing

The actual watermark removal happens entirely in the browser using the Canvas API and our JavaScript engine. The API endpoints are for tracking, history, and user management — not for server-side image processing. To integrate watermark removal into your app, use the WatermarkEngine class from the client-side library.