Quickstart
From nothing to a scrubbed file in three steps.
1. Create an API key
Open API keys in your workspace, name the key after the thing that will use it, and press Create key.
The key is shown exactly onceOnly a hash is stored, so it cannot be shown again — not by the dashboard, and not by support. If you lose it, rotate the key and update whatever was using it.
2. Send a file
The endpoint takes multipart/form-data with a file field. The response body is the cleaned file itself, so write it straight to disk.
curl -X POST "https://www.purifyai.app/api/v1/scrub" \-H "Authorization: Bearer $PURIFYAI_KEY" \-F "file=@photo.png" \-F "mode=all" \-D headers.txt \-o photo_clean.png# The report is in the response headersgrep -i "X-PurifyAI" headers.txt
Read the key from the environmentEvery sample reads
PURIFYAI_KEY rather than embedding the key inline. A key pasted into source is a key that ends up in version control, and rotating it then means touching every place it was copied to.3. Read the report
A successful response body is binary, so the report travels in headers rather than JSON:
HTTP/1.1 200 OKContent-Type: image/pngContent-Disposition: attachment; filename="photo_scrubbed.png"X-PurifyAI-Tags-Removed: 4X-PurifyAI-Format: pngX-PurifyAI-Bytes-Saved: 18244X-PurifyAI-Usage-Count: 12X-RateLimit-Remaining: 118
X-PurifyAI-Tags-Removed: 0 is a success, not a failure — it means the file carried nothing to strip.
Next
- Full endpoint reference — every parameter and response header.
- Errors — what each status code means and whether retrying helps.
- Rate limits & quotas — how much you can send.