Documentation
API Reference
Base URL: http://localhost:8080/api/v1
Authentication
All endpoints require an API key. Generate one from the API Keys page. Include it in every request:
X-API-Key: wmr_your_key_here
Remove Watermark
The core endpoint. Send an image + mask in one request, get the clean result back instantly as base64.
/api/v1/images/removeOne-shot watermark removal. Provide an image (URL or base64) and a mask (base64 or template ID). Returns the processed image as base64 PNG. Costs 1 credit.
Parameters
image_url | string (optional) - public URL to fetch the image from |
image_base64 | string (optional) - base64-encoded image data |
mask_data | string (optional) - base64 PNG mask, white = area to remove, black = keep |
template_id | uuid (optional) - use a saved template instead of mask_data |
expand_mask | boolean (default: true) - auto-dilate mask edges for cleaner results |
Response
{
"result_base64": "iVBORw0KGgo... (base64 PNG)",
"width": 800,
"height": 600,
"credits_charged": 1,
"duration_ms": 42
}Example
curl -X POST http://localhost:8080/api/v1/images/remove \
-H "X-API-Key: wmr_your_key" \
-H "Content-Type: application/json" \
-d '{
"image_url": "https://example.com/watermarked.jpg",
"mask_data": "data:image/png;base64,iVBOR..."
}'Templates
Save a mask as a reusable template. When applied to new images, the mask auto-resizes to match different dimensions.
/api/v1/templatesList all your saved templates, sorted by most used.
Response
{
"templates": [{
"id": "550e8400-e29b-41d4-a716-446655440000",
"name": "Shutterstock Logo",
"mode": "basic",
"expand_mask": true,
"source_width": 800,
"source_height": 600,
"use_count": 42,
"created_at": "2026-04-05T10:30:00Z"
}]
}Example
curl http://localhost:8080/api/v1/templates \ -H "X-API-Key: wmr_your_key"
/api/v1/templatesSave a new template from a mask. Include the original image dimensions so the mask can be auto-resized for different images later.
Parameters
name | string (required) - label for the template |
mask_data | string (required) - base64 PNG mask |
source_width | int (required) - width of the image the mask was drawn on |
source_height | int (required) - height of the image the mask was drawn on |
mode | string (default: "basic") |
expand_mask | boolean (default: true) |
Response
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"name": "Shutterstock Logo",
...
}Example
curl -X POST http://localhost:8080/api/v1/templates \
-H "X-API-Key: wmr_your_key" \
-H "Content-Type: application/json" \
-d '{
"name": "Shutterstock Logo",
"mask_data": "data:image/png;base64,iVBOR...",
"source_width": 800,
"source_height": 600
}'/api/v1/images/remove (with template)Apply a saved template instead of providing a raw mask. The mask auto-resizes if the target image has different dimensions.
Response
{
"result_base64": "iVBOR...",
"width": 1200,
"height": 900,
"credits_charged": 1,
"duration_ms": 38
}Example
curl -X POST http://localhost:8080/api/v1/images/remove \
-H "X-API-Key: wmr_your_key" \
-H "Content-Type: application/json" \
-d '{
"image_url": "https://example.com/new-photo.jpg",
"template_id": "550e8400-e29b-41d4-a716-446655440000"
}'/api/v1/templates/{id}Delete a template and its stored mask.
Response
204 No Content
Example
curl -X DELETE http://localhost:8080/api/v1/templates/TEMPLATE_UUID \ -H "X-API-Key: wmr_your_key"
Credits
Check your remaining balance and view transaction history.
/api/v1/creditsReturns current credit balance and last 50 transactions (debits, refunds, bonuses).
Response
{
"balance": 9,
"transactions": [
{
"id": "uuid",
"amount": -1,
"type": "processing",
"description": "Basic fill - photo.jpg",
"created_at": "2026-04-05T10:30:00Z"
},
{
"amount": 10,
"type": "signup_bonus",
"description": "Welcome bonus credits"
}
]
}Example
curl http://localhost:8080/api/v1/credits \ -H "X-API-Key: wmr_your_key"
Jobs
Retrieve processing history and job results.
/api/v1/jobsList your processing jobs with pagination. Each job includes status, mode, credits charged, and result URL.
Parameters
page | int (default: 1) |
per_page | int (default: 20, max: 100) |
Response
{
"jobs": [{
"job_id": "uuid",
"status": "completed",
"progress": 100,
"mode": "basic",
"credits_charged": 1,
"result_url": "/storage/processed/...",
"created_at": "2026-04-05T10:30:00Z"
}],
"total": 42,
"page": 1,
"per_page": 20
}Example
curl "http://localhost:8080/api/v1/jobs?page=1&per_page=10" \ -H "X-API-Key: wmr_your_key"
/api/v1/jobs/{id}Get a single job by ID.
Response
{
"job_id": "uuid",
"status": "completed",
"progress": 100,
"mode": "basic",
"credits_charged": 1,
"result_url": "/storage/processed/..."
}Example
curl http://localhost:8080/api/v1/jobs/JOB_UUID \ -H "X-API-Key: wmr_your_key"