Behavior Under Uncertainty
When building privacy infrastructure, silent ambiguity is dangerous. Pseudonymize.io fails closed and maintains strict payload contracts.
What if nothing is detected?
The API returns your payload entirely unchanged with a 200 OK status and an empty entities array.
What if only some values are detected?
The API transforms the detected entities with pseudonyms, and returns the rest of the text/JSON exactly as it was.
What if the input is malformed JSON?
The API immediately drops the payload and returns a 400 Bad Request.
What if the processing exceeds your credit limits?
The API immediately drops the payload and returns 402 Payment Required.
How are tokens and credits accounted?
- Commercial Rate: €1.00 per 1,000,000 tokens processed.
- Metering: The current core wrapper estimates text tokens as character count divided by four, rounded up; JSON uses serialized character count. This is a billing estimate, not an exact model-tokenizer count.
- Accounting Precision: Metered in units of 1 Credit = 1,000 tokens (€0.001 per credit).
- Proportional Billing: A 1,000-token prompt or ticket costs 1 credit (€0.001). 1,000 such requests cost 1,000 credits (€1.00 total). Each successful request is rounded up independently to the next 1,000-token credit, with a minimum charge of €0.001.
- Pre-flight Reservation & Settlement: Credits are estimated and reserved pre-flight. Upon core engine response, the core-reported metered token count settles atomically; any estimation surplus is immediately refunded.
- Telemetry Headers: Every API response attaches
X-Credits-Remaining,X-Credits-Spent, andX-Tokens-Processed.
What if the ML detector is uncertain?
Named Entity Recognition (NER) models use probability thresholds.
- By default, we use a strict confidence threshold (typically
0.85+) to avoid destroying non-sensitive text (false positives). - We prioritize maintaining the integrity of your prompts/data.
- Important: This means a highly ambiguous word (e.g. "May went to Paris." where "May" could be a month or a person) might result in a false negative (the name is not redacted). You must account for this in highly regulated environments.