For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
Contact usJoin our Discord
HomeAdministration & GovernanceDevelopment and IntegrationAgent ForgeAPI ReferenceSDK Docs
HomeAdministration & GovernanceDevelopment and IntegrationAgent ForgeAPI ReferenceSDK Docs
  • API Reference
    • POSTResponses
    • POSTChat Completions
    • POSTCompletions
    • POSTEmbeddings
    • POSTAudio Transcription
    • POSTDocuments Extract
    • POSTRerank
    • POSTTokenize
    • POSTDetokenize
    • POSTFactuality
    • POSTInjection
    • POSTPII
    • POSTToxicity
    • GETModels
    • GETMCP Servers
    • GETMCP Tools
  • Valid Inputs
    • Enumerations for API
LogoLogo
Contact usJoin our Discord
API Reference

PII

POST
https://{your-pg.api-domain}.com/PII
POST
/PII
$curl -X POST https://{your-pg.api-domain}.com/PII \
> -H "Authorization: Bearer <token>" \
> -H "Content-Type: application/json" \
> -d '{
> "prompt": "My email is [email protected] and my number is 954-123-4567.",
> "replace": true,
> "replace_method": "mask"
>}'
1{
2 "id": "pii-MCZ68Tol2Laj0HgoJtvS5CaSljISkWN1",
3 "object": "pii_check",
4 "created": 1717675949,
5 "checks": [
6 {
7 "index": 0,
8 "new_prompt": "My email is * and my number is *.",
9 "status": "success"
10 }
11 ]
12}
Replace personal information such as names, SSNs, and emails in a given text.
Was this page helpful?
Previous

Toxicity

Next
Built with

Authentication

AuthorizationBearer

Bearer authentication of the form Bearer <token>, where token is your auth token.

Request

This endpoint expects an object.
promptstring or list of stringsRequired
replacebooleanRequired
Whether to replace personal information.
replace_methodstringOptional

The method to use (random, fake, category, mask).

entity_listlist of stringsOptional
An array of entity types that the PII check should ignore.

Response

Successful response.
idstring
Unique ID for the PII check.
objectstring

Type of object (pii_check).

createdinteger
Timestamp of when the PII check was created.
checkslist of objects
The set of vectorized data.

Errors

400
Bad Request Error
403
Forbidden Error