By George Curta · Last updated 2026-08-12
工作流程:上传、分析、涂黑、下载
无论您使用网页应用、直接调用 API,还是通过 MCP 服务器调用 anonym_legal_redact_image 工具,每张图像都会经过相同的四个步骤。
1. 上传
选择一个 PNG 或 JPG 文件。在向服务器发送任何内容之前,应用会根据您计划的上传限制检查文件类型和大小。
2. 分析
OCR(Tesseract)读取图像中的文字,并记录每段文字的位置。随后,提取出的文字会经过与文档处理相同的 PII 检测器,返回检测到的实体及其位置——此时还不会涂黑任何内容。
3. 涂黑
将 mode 设为 "redact" 重新发起请求,即可在图像像素上直接绘制实心黑框,覆盖每个检测到的区域。这是一种单向的视觉涂黑,而非可逆加密。
4. 下载
涂黑后的图像将以文件形式返回(PNG 或原始内容类型),供您保存到本地——响应发送后,服务器不会保留任何内容。
大小与像素限制
- 仅支持 PNG 和 JPG(JPEG)。目前不支持 TIFF、BMP、WebP、GIF 等其他光栅格式。
- 服务器端图像大小上限为 20 MB。您所在计划自身的限制可能更低——Basic 计划的上传上限为 5 MB(Pro 为 10 MB,Business 为 20 MB);免费计划完全不包含图像涂黑功能。
- 总分辨率(宽 × 高)上限为 150 百万像素。超出该限制的上传会在处理前被拒绝。
OCR 语言支持
OCR 基于 Tesseract 运行。API 的 language 字段接受 ISO 639-1 语言代码(默认为英语 "en"),并映射到对应的 Tesseract 语言包——目前已映射约三十多种语言,包括德语、法语、西班牙语、意大利语、葡萄牙语、荷兰语、波兰语、俄语、乌克兰语、阿拉伯语、希伯来语、印地语、日语、韩语、中文、泰语、越南语和土耳其语。实际可用性取决于 OCR 主机上安装了哪些 Tesseract 语言包;不可用的语言将回退为英语。
API 参考
图像匿名化可直接通过 API 供不经过网页应用的集成使用,也可通过 MCP 服务器以 anonym_legal_redact_image 工具(模式为 "analyze" 或 "redact")的形式供 Claude 等 MCP 客户端使用。
POST /api/presidio/imageAuthentication: 在 Authorization 请求头中使用 Bearer token 进行身份验证(可以是 API 令牌,也可以是已认证的会话,与文本分析端点相同)。没有有效令牌的请求将返回 401。
Request body: 发送 multipart/form-data 格式的请求体。必填字段:file(PNG 或 JPG 图像)和 mode("analyze" 或 "redact")。可选字段:language(ISO 639-1 OCR 语言代码,默认为 "en")、entities(用于限定检测范围的实体类型 JSON 数组)、score_threshold,以及 fill_color(仅在 redact 模式下使用,默认为 "black"), operator (redact mode only: "redact" | "replace" | "mask", default "redact"), and mask_char (redact mode with operator="mask" only, default "*").
Response: 在 analyze 模式下,响应为 JSON 格式:包含检测到的实体(类型、文字位置和置信度分数)以及一个 tokens_charged 字段。在 redact 模式下,响应即为涂黑后的图像本身(二进制格式,Content-Type 为 image/png 或原始类型),令牌花费则通过 X-Tokens-Charged 响应头返回。
常见问题
支持哪些图像格式?
仅支持 PNG 和 JPG(JPEG)。目前不支持 TIFF、BMP、WebP、GIF 等其他光栅格式。
大小和分辨率限制是多少?
总大小 20 MB,总分辨率 150 百万像素,此外还受您所在计划自身上传限制的进一步约束(Basic 为 5 MB,Pro 为 10 MB,Business 为 20 MB)。
图像涂黑是否需要付费计划?
是的。图像涂黑需要 Basic 或更高级别的计划。免费计划仅支持文本匿名化。
涂黑是否可逆?
不可逆。涂黑是直接在图像像素上用不透明黑框覆盖检测到的区域——这是一种单向的视觉涂黑,而非文本匿名化器提供的那种可逆加密。
如何不使用网页应用而直接调用 API?
向 /api/presidio/image 发送 POST 请求,在 Authorization 请求头中携带 Bearer token,请求体为 multipart/form-data 格式,包含 file 和 mode("analyze" 或 "redact")。完整字段列表和响应格式请参见上方的 API 参考部分。
Limitations / Important note
- OCR-based text extraction is probabilistic; low-quality scans and handwriting lower detection recall.
- Redaction is a visual, one-way black box over the detected region — not reversible encryption.
- This page is informational and is not legal advice.
About this page
We update this page when our platform or the law changes.
Read our founder note for how we work.
Each change shows up in the timestamp at the top.
Related reading
We follow these rules
- GDPR (EU 2016/679).
- ISO/IEC 27001:2022, held by our hosting provider.
- NIS2 (EU 2022/2555).
- HIPAA safe harbor under 45 CFR § 164.514(b)(2).
Our promise
We do not sell your data.
We do not train models on your text.
We store your files in Germany.
You can delete your account at any time.
You own your work.
Where we run
Our company HQ is in Saarbrücken, Germany. Our servers run in Hetzner's Falkenstein datacenter.
Hetzner holds ISO 27001 certification.
All data stays in the EU.
Backups run every day.
Need help?
Email support@anonym.legal.
We reply within one business day.
How we test
Automated checks run on every release.
Each surface gets its own sweep script and report.
Human reviewers spot-check the output each week.
We test detection against sample documents before each release.
A failing unit or integration run stops the release.
What we never do
- We never sell your information to third parties.
- We never train models on what you upload.
- We never keep your work after you delete it.
- We never share keys with any outside firm.
- We never run ads inside the product.
Plans in plain words
We sell credits, not seats.
One credit covers one short job.
Long jobs use a few credits each.
Paid plans can buy top-up credits.
Credits reset at the end of each cycle.
Read the plans page for current rates.
Who built this
A small team of engineers and lawyers built this.
We ship from Europe and work in the open.
Our founder note spells out why we started.
Where to start
- Open the web app and try a sample file.
- Learn how credits get counted.
- See current plans and limits.
- Meet the team behind the product.
How the parts fit
A browser add-on cleans text inside Chrome.
A Word plug-in handles drafts in Office.
A small desktop tool works on whole folders.
An agent protocol link feeds large models safely.
All four share one core engine and one rule set.
Words from our team
We started this work after a lunch about cookies.
One friend kept getting odd ads on her phone.
We asked why a court file leaked through a draft.
We sketched the first build on a napkin that week.
By month three we had a tiny demo for a friend.
She used it on her first case the next day.
Common questions we hear
Can the tool read scanned PDFs? Yes, with OCR.
Does it work on long files? Yes, in small chunks.
Can I roll my own rule set? Yes, save it as a preset.
Does it run offline? The desktop build runs offline.
Do you keep my files? No, the cloud build wipes after each run.
Will it learn from my work? No, we never train on inputs.
A short tour of the workflow
Upload a file or paste a snippet of prose.
Pick the entities you want gone from the draft.
Choose a method: replace, mask, hash, encrypt, or redact.
Press run and watch the side panel show each hit.
Skim the result and tweak any rule that misfired.
Save the cleaned file or send it to a teammate.