API
Upload, scan for free, process and download. The full reference is the OpenAPI spec and every error code is listed at /api/v1/errors. Longer guides are coming.
Use it from the terminal or an AI agent
Scanning is free and needs no key. Cleaning needs an API key and credits, and the person using it confirms the rights statement each time.
npx demarker identify image.png
npx demarker clean image.png --max-credits 1 --attest-rightsMCP server (@demarker/mcp)
claude mcp add demarker --env DEMARKER_API_KEY=sk_live_YOUR_KEY -- npx -y @demarker/mcp{
"mcpServers": {
"demarker": {
"command": "npx",
"args": [
"-y",
"@demarker/mcp"
],
"env": {
"DEMARKER_API_KEY": "sk_live_YOUR_KEY"
}
}
}
}The MCP server asks you to confirm the rights statement before any clean and caps spend per call (default 2 credits, set with DEMARKER_MCP_MAX_CREDITS). Agents can also discover this at the server card and the skills index. The CLI, MCP server, client and agent skill are open source at github.com/removeaiwatermark/demarker; the MCP server is in the official registry as io.demarker/mcp, and the skill installs with npx skills add removeaiwatermark/demarker.
Endpoints
POST /api/v1/uploadGet a presigned URL (15 minutes) to PUT your image to.
freePOST /api/v1/scanKeyless scan: upload an image (multipart, field file) and get the free identify result. No API key. Poll GET /api/v1/scan/{id} with the token in X-Claim-Token. Identify only.
free, no keyPOST /api/v1/identifyCreate a job from the uploadKey and run the free scan. Returns the report, the offers and the price table.
freePOST /api/v1/jobs/{id}/processRun the GPU clean and debit its credits. A short balance returns 402 and the job stays identified.
per offerGET /api/v1/jobs/{id}Status, report, offers and a one-hour URL for the result.
freeGET /api/v1/jobsList your jobs.
freeDELETE /api/v1/jobs/{id}Delete the original and the result now (except material held under Privacy Policy section 8). Credits are refunded while the job is still queued.
freeGET /api/v1/balanceYour credit balance.
freeGET /api/v1/pricingThe public price table.
freeGET/POST/DELETE /api/v1/webhooksManage webhooks for job.identified, job.refused, job.process_blocked, job.completed and job.failed.
freeQuickstart
# 0. Create an API key at https://demarker.io/app/settings/api (sign in, verify your email,
# accept the API terms, then click Create key). Copy it when it is shown: it is
# displayed once.
# 1. Get an upload URL
curl -X POST https://demarker.io/api/v1/upload \
-H "Authorization: Bearer sk_live_xxx" \
-H "Content-Type: application/json" \
-d '{"filename": "image.png"}'
# 2. PUT the file to the returned uploadUrl (send the returned contentType)
# 3. Scan it, free
curl -X POST https://demarker.io/api/v1/identify \
-H "Authorization: Bearer sk_live_xxx" \
-H "Content-Type: application/json" \
-d '{"uploadKey": "uploads/api_.../input.png"}'
# 4. Process
# rightsAttested must reflect a real confirmation by the person who owns or may
# edit the image. See the Terms, section 12. The API runs the GPU tier; Quick
# clean is free on the web and is not sold per image.
curl -X POST https://demarker.io/api/v1/jobs/JOB_ID/process \
-H "Authorization: Bearer sk_live_xxx" \
-H "Content-Type: application/json" \
-d '{"tier": "GPU", "rightsAttested": true}'Rules
- Create a key under Settings, API (sign-in required), then authenticate with it as a Bearer sk_live_ key. The key is shown once, so store it safely. 60 requests a minute per key.
- One credit is one GPU clean with output up to 12 MP, or two credits at original size above it. Prices come back with every identify.
- API cleans use credits and get no free daily Quick cleans. Quick clean is not offered through the API yet.
- Every process call needs rightsAttested: true, and it must reflect a real confirmation by the person who owns or may edit the image. Setting it automatically, without that confirmation, breaches the Terms.
- Images over 25 MP can be scanned but not processed.
- Hidden-watermark removal is best effort and cannot be verified from the file.
- Output may still need a label or disclosure where it is published (EU AI Act Article 50, China, India and the places you publish). You are responsible for it.
- Not available in sanctioned jurisdictions or mainland China (451). In India the API is also blocked, and only the free scan on the website is offered.