Business plan
Metadata removal API
The same cleaning the website does, as one HTTP request. Send a photo, video, PDF, Office file, audio file or RAW photo and get the clean copy back, with a report of what was removed. There is also an MCP server, so an AI assistant can do it for you.
The API is part of Business, $49 a month. See plans or, if you are on Business, create a key.
Authentication
Create a key under API keys in your account and send it in the Authorization header. A key works until a few days after the billing period it was made in. After each renewal, create a new one.
Authorization: Bearer mr_live_...Clean a file
POST https://www.trymetadatalab.com/api/v1/clean returns the cleaned file. There are three ways to send the file.
As a form upload
curl -X POST https://www.trymetadatalab.com/api/v1/clean \
-H "Authorization: Bearer $API_KEY" \
-F "file=@photo.jpg" \
-o photo-clean.jpgFrom a link
curl -X POST https://www.trymetadatalab.com/api/v1/clean \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{"url": "https://example.com/video.mp4"}' \
-o video-clean.mp4As raw bytes
curl -X POST "https://www.trymetadatalab.com/api/v1/clean?filename=report.pdf" \
-H "Authorization: Bearer $API_KEY" \
--data-binary @report.pdf \
-o report-clean.pdfThe answer carries three headers: X-Metadata-Kind (the file type), X-Metadata-Found (how many details were removed) and X-Metadata-Left (what a second scan still found, normally 0).
Get a JSON report
Add ?format=json and the answer is JSON, with the cleaned file in file_base64.
{
"file_name": "photo-clean.jpg",
"kind": "jpeg",
"bytes_before": 30461,
"bytes_after": 29869,
"found": [
{ "group": "location", "label": "GPS location", "value": "37.77490, -122.41940" },
{ "group": "device", "label": "Camera or phone", "value": "Apple iPhone 15 Pro" }
],
"left": [],
"clean": true,
"notes": [],
"content_type": "image/jpeg",
"file_base64": "..."
}Inspect a file
POST https://www.trymetadatalab.com/api/v1/inspect takes a file the same three ways and returns the list of metadata as JSON. Nothing is changed.
curl -X POST https://www.trymetadatalab.com/api/v1/inspect \
-H "Authorization: Bearer $API_KEY" \
-F "file=@photo.jpg"Limits
- A file uploaded in the request body can be up to 4 MB. That covers most photos and documents.
- For anything larger, send a link. Files fetched from a link can be up to 100 MB.
- One file per request, and a request can run for up to 60 seconds.
- Supported types are the same as on the website. Password-locked PDFs are refused.
Errors
Errors are JSON with a code and a message you can show to a person.
{ "error": { "code": "encrypted", "message": "This PDF is locked with a password. Remove the password, then clean it." } }| Status | Meaning |
|---|---|
| 400 | No file in the request, or a link that cannot be fetched |
| 401 | Missing, wrong or expired API key |
| 413 | The file is over the size limit |
| 415 | The file type is not supported |
| 422 | The file is damaged or locked with a password |
Use it from Claude, ChatGPT or Cursor
The MCP server lets an assistant inspect and clean files when you ask it to. It has two tools, inspect_file and clean_file, and takes a file as a public link or as base64 content.
Server address: https://www.trymetadatalab.com/api/mcp (Streamable HTTP). It uses the same API key, sent as a Bearer token.
Claude Code
claude mcp add --transport http metadata-remover https://www.trymetadatalab.com/api/mcp \
--header "Authorization: Bearer $API_KEY"Cursor and other clients
{
"mcpServers": {
"metadata-remover": {
"url": "https://www.trymetadatalab.com/api/mcp",
"headers": { "Authorization": "Bearer mr_live_..." }
}
}
}Then ask in plain words, for example: “Check what metadata this photo has” or “Remove the metadata from the file at this link.” Clean files up to 3 MB come back inside the chat. For larger ones the assistant gets the report and you download the file with the API.
What happens to files sent to the API
On the website, files never leave your device. The API is different by nature: the file reaches our server, is cleaned in memory and is returned in the same request. It is not written to disk, not logged and not kept after the answer is sent.