Home/Guides/Online service: pseudonymize by API, restore with your key

Online service: pseudonymize by API, restore with your key

The online service is Sealforge's anonymization API, with nothing to install: one HTTP request with your licence key. It is also the engine of the application installed with an online offer (Personal Online, online API). It keeps nothing. Its essential use is reversible pseudonymization: you send your key with each request, and it alone opens the values again.

6 min read6 steps Effects in Codex and Claude

Your licence key and the address of the service

Every request carries your licence key in the X-Sealforge-License header (or Authorization: Bearer SF-…): no account to create, no token to renew. The address of the service is https://anonymizer.sealforge.fr; it is written $SEALFORGE_API in this guide.

Only anonymizations use units (/anonymize, /anonymize-file, /anonymize-structured): one unit per successful anonymization up to 100,000 characters, then one more for each started slice. The other calls, restore included, are free. Every response says what it cost in the X-Sealforge-Units header, and what the licence has left in X-Sealforge-Units-Left.

Tip. Keep the licence key out of your code: in an environment variable or a secret store. The application installed with an online offer already knows the address of the service and shows the units left after each anonymization.
Warning. With the online service, your content goes through our servers for the time of the request; it is not kept there. For nothing to leave your perimeter, use an installed edition.

Pseudonymize a text with a named strategy

Name the strategy in centralStrategy: the service applies it, category by category.

curl "$SEALFORGE_API/anonymize" \
  -H "X-Sealforge-License: YOUR-LICENCE-KEY" \
  -H "Content-Type: application/json" \
  -d '{ "text": "Follow up with Ms Dupont.", "centralStrategy": "placeholders" }'

The strategies it offers out of the box:

reversiblereversible pseudonymization of every value, with your key
reversible-identitiesidentities reversible; secrets, social security numbers and bank accounts replaced for good
placeholdersnumbered tokens [[LAST_NAME_1]], for a prompt
pseudonymsrealistic fake values, stable for the same value
same-formatfake values of the same length and shape
maskedvalues partly hidden
redactedvalues replaced with their category [[EMAIL]]
Tip. GET $SEALFORGE_API/policy lists the available strategies with their description.

Reversible pseudonymization: send your key

Add pseudonymKey, a secret of at least 16 characters that you choose, and the reversible strategy:

curl "$SEALFORGE_API/anonymize" \
  -H "X-Sealforge-License: YOUR-LICENCE-KEY" \
  -H "Content-Type: application/json" \
  -d '{ "text": "Follow up with Ms Dupont.", "centralStrategy": "reversible", "pseudonymKey": "$SEALFORGE_PSEUDONYM_KEY" }'

Each value becomes a token that holds it, encrypted with your key: Follow up with Ms [[LAST_NAME~v1~Zk3…]]. The same value always gives the same token under the same key, request after request.

Tip. Without pseudonymKey, the reversible strategy is refused: the tokens must only open with a key you hold, never with the service's.
Warning. The service keeps neither your key nor the values. If you lose the key, the values are lost: there is no other copy.

Restore the real values

Send the text written with the tokens (an AI's answer, a document drafted by a contractor) and the same key to /restore:

curl "$SEALFORGE_API/restore" \
  -H "X-Sealforge-License: YOUR-LICENCE-KEY" \
  -H "Content-Type: application/json" \
  -d '{ "text": "Dear Ms [[LAST_NAME~v1~Zk3…]], your file is complete.", "pseudonymKey": "$SEALFORGE_PSEUDONYM_KEY" }'

{ "text": "Dear Ms Dupont, your file is complete.", "restored": 1, "unreadable": 0 }

The tokens the key opens are replaced. A token made with another key, or altered, stays as it is and is counted in unreadable: it never becomes a wrong value.

Files: CSV, JSON, Excel, images and PDF

A structured file is pseudonymized by column and keeps its format; the key goes in the pseudonymKey form field:

curl "$SEALFORGE_API/anonymize-structured" \
  -H "X-Sealforge-License: YOUR-LICENCE-KEY" \
  -F "file=@clients.csv" \
  -F 'fields=[{ "path": "A", "category": "LAST_NAME", "strategy": "reversible", "headerRow": 1 }]' \
  -F "pseudonymKey=$SEALFORGE_PSEUDONYM_KEY" -o clients.pseudonymized.csv

Images and PDFs are masked with /anonymize-file: the sensitive areas are painted over in the image, which cannot be restored.

Tip. The ASP.NET Core middleware plugs into the service too: set LicenseKey instead of ApiKey.

With your AI assistants: the MCP server in online mode

Installed with an online offer, Sealforge's MCP server already uses the service, with nothing to set. It can also be declared by hand, on a computer the installer did not connect: it reads the files on your computer, has them pseudonymized by the service, and writes the deliverables with the real values.

claude mcp add sealforge \
  -e SEALFORGE_LICENSE_KEY=YOUR-LICENCE-KEY \
  -e SEALFORGE_PSEUDONYM_KEY=your-secret-of-16-characters-or-more \
  -- sealforge-mcp --online "$SEALFORGE_API"

The assistant gets reversible tokens and calls restore_to_file to write the result to disk; it never sees the values.

Tip. Without SEALFORGE_PSEUDONYM_KEY, the key is derived from this computer's own secret. Either way the history stays on the computer, encrypted: values can be restored from one conversation to the next, on this computer.
Warning. The MCP server only protects what goes through its tools: the assistant's own file tools can still open the raw files.

In Codex and Claude Code

In online mode, the MCP server gives your assistants the same tools as the local mode, with the online service behind them.

Codex

  • Declared in ~/.codex/config.toml ([mcp_servers.sealforge]) with --online and the two environment variables.
  • read_file_anonymized returns [[LAST_NAME~v1~…]] tokens: Codex keeps them as they are in what it writes.
  • restore_to_file writes the deliverable with the real values; Codex only gets counts.

Claude Code

  • claude mcp add sealforge … -- sealforge-mcp --online …, then restart Claude Code.
  • Ask: "Read clients.csv with Sealforge"; the read goes through the service, never through Claude's own file tools.
  • Only the reads that pseudonymize count in units on your licence; restoring is free, and status says the units left.