Skip to content

API & reference

Redact Preview

POST
/ratchet/redact
curl --request POST \
--url http://localhost:8000/ratchet/redact \
--header 'Content-Type: application/json' \
--data '{}'

Show what the redactor would store for a piece of text: in the gateway’s style (RATCHET_REDACT_STYLE) or ?style=. Nothing is logged or stored. The endpoint is public, so the detector plugin, which may be an NER model costing tens of milliseconds a call, runs only for a caller with a valid API or admin key; anyone else gets the patterns alone (plugin_skipped).

style
Any of:
string
x-api-key
Any of:
string
Media typeapplication/json
Body
object

Example generated

{}

Successful Response

Media typeapplication/json
Response Redact Preview Ratchet Redact Post
object

Example generated

{}

Validation Error

Media typeapplication/json
HTTPValidationError
object
detail
Detail
Array<object>
ValidationError
object
loc
required
Location
Array
msg
required
Message
string
type
required
Error Type
string

Example generated

{
"detail": [
{
"loc": [
"example"
],
"msg": "example",
"type": "example"
}
]
}