İçeriğe geç
Gurubase Siper
English
Esc
navigateopen⌘Jpreview

Mask in batch

Masks several texts in a single request. The response is mapped to the input order. The length limit is applied over the combined total text.

POST/mask/batch
Request body
requiredapplication/json
textsstring[]required
The list of texts to mask.
transformstring
default: "placeholder"
Allowed:placeholdermasksurrogate
return_vaultboolean
default: false
Responses
200Masking result for each input
resultsMaskResponse[]
Show properties
Array of MaskResponse
masked_textstring
The masked text.
transformstring
spansSpan[]
Show properties
Array of Span
categorystring
startinteger
endinteger
scorenumber
timings_msobject
Total processing time (ms): only { total }.
vaultobject
If return_vault=true, the placeholder to original mapping (sensitive).
401Missing or invalid virtual key
413Too many texts, or the combined total text exceeded the length limit
422Invalid request body
detailValidationError[]
Show properties
Array of ValidationError
locstring | integer[]
Show properties
Array of string | integer
Any of:
string
string
integer
integer
msgstring
typestring
Request
import requests

response = requests.post(
    "https://gw-tr.gurubase.io/mask/batch",
    headers={
        "Content-Type": "application/json"
    },
    json={
  "texts": [
    "Ahmet Yılmaz aradı.",
    "IBAN: TR12 0001 0000 0000 0000 0000 01"
  ]
},
)
Response
{
  "results": [
    {
      "masked_text": "string",
      "transform": "string",
      "spans": [
        {
          "category": "person",
          "start": 0,
          "end": 0,
          "score": 0.85
        }
      ],
      "timings_ms": {},
      "vault": {}
    }
  ]
}