Skip to main content
Demarker

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.

CLI
npx demarker identify image.png
npx demarker clean image.png --max-credits 1 --attest-rights

MCP server (@demarker/mcp)

Add to CursorAdd to VS Code
Claude Code, with a key to clean images
claude mcp add demarker --env DEMARKER_API_KEY=sk_live_YOUR_KEY -- npx -y @demarker/mcp
Claude Desktop, Windsurf, Cline and others (JSON config)
{
  "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/upload

Get a presigned URL (15 minutes) to PUT your image to.

free
POST /api/v1/scan

Keyless 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 key
POST /api/v1/identify

Create a job from the uploadKey and run the free scan. Returns the report, the offers and the price table.

free
POST /api/v1/jobs/{id}/process

Run the GPU clean and debit its credits. A short balance returns 402 and the job stays identified.

per offer
GET /api/v1/jobs/{id}

Status, report, offers and a one-hour URL for the result.

free
GET /api/v1/jobs

List your jobs.

free
DELETE /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.

free
GET /api/v1/balance

Your credit balance.

free
GET /api/v1/pricing

The public price table.

free
GET/POST/DELETE /api/v1/webhooks

Manage webhooks for job.identified, job.refused, job.process_blocked, job.completed and job.failed.

free

Quickstart

curl
# 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