Overview
Hide personal data in text before an LLM sees it, and restore it in the answer.
Every endpoint lives under https://api.blende.dev/api/v1.
Redact, ask, restore
POST /api/v1/redactwith{"text": …}answers the text with typed tags such as[PERSON_7K2QX9MB], the billedtokensandexpires_at. The mapping stays sealed on Blende’s servers under your key.- Send the tagged text to your LLM. Only tags leave your client.
POST /api/v1/restorewith the answer and the same key puts the originals back.
store_entity_mapping: false stores nothing and answers the mapping, so the SDK restores locally. detailed: true adds the spans, their parts and the model.
Concepts
- Tags are
[KIND_ID]: the kind in capitals and 8 characters of Crockford base32. Restore reads altered tags (case, brackets, separators) and reports invented ones asunknown. - One context per API key. A value keeps its tag across all of the key’s conversations until
POST /api/v1/context/reset, after which old tags restore asunknown. Signed-in apps send a JWT and the user’sBlende-Context-Key. - Policies say what to hide: a built-in (
standard,strict,light), a saved policy’spol_…id, or an inline policy whoseoverrideshide or leave by tag, pattern or range. - Offsets are half-open
[start, end)ranges in Unicode code points of the text as sent. - Tokens of the text sent to redact are the billed unit; restore is not billed.
- No PII in our logs: logs, traces, metrics and errors hold metadata only.
- Errors are RFC 9457 problem details (
application/problem+json) with a stablecode;detailnever echoes input.
Authentication
Send Authorization: Bearer <token>: an API key (bl_live_…, bl_test_…) for developers, or a ZITADEL JWT with Blende-Context-Key for Blende’s apps. Each endpoint names the scope it needs: redact, restore, usage:read, policies:write or admin.