API Documentation
Integrate TinyJPG.co into your workflow with our REST API.
Base URL
https://your-domain.comAll API endpoints return JSON responses with a success boolean field.
Authentication
Protected endpoints require authentication via HTTP-only cookie. Log in via /api/auth/login to receive the auth cookie automatically.
Endpoints
/api/statsGet site-wide processing statistics
Response
{ success: true, data: { totalProcessed, todayProcessed, avgTime } }/api/historyGet recent processing history records
Response
{ success: true, data: [{ id, file_name, width, height, ... }] }/api/historyRecord an image processing event
Request Body
{ fileName, fileSize, width, height, watermarkSize, processingTimeMs }Response
{ success: true, id: 123 }/api/auth/registerRegister a new user account
Request Body
{ name, email, password }Response
{ success: true, data: { id, name, email, role } }/api/auth/loginLog in to an existing account
Request Body
{ email, password }Response
{ success: true, data: { id, name, email, role } }/api/auth/meGet current authenticated user info
Response
{ success: true, data: { id, name, email, role } }/api/feedbackSubmit a feedback/contact message
Request Body
{ name, email, message }Response
{ success: true }/api/blogGet 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.