Skip to main content
POST
/
api
/
v1
/
security
/
scan
Scan Content
curl --request POST \
  --url https://api.promptguard.dev/api/v1/security/scan \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "content": "<string>",
  "type": "prompt"
}
'
{
  "blocked": true,
  "decision": "<string>",
  "reason": "<string>",
  "confidence": 123,
  "eventId": "<string>",
  "processingTimeMs": 123,
  "threatType": "<string>"
}

Authorizations

Authorization
string
header
required

API Key authentication for developer endpoints (/api/v1/*). Use format: 'Bearer pg_api_your_key_here'

Headers

x-api-key
string | null

Body

application/json
content
string
required

Text to scan

Maximum string length: 100000
type
string
default:prompt

Content type: 'prompt' or 'response'

Response

Successful Response

blocked
boolean
required
decision
string
required
reason
string
required
confidence
number
required
eventId
string
required
processingTimeMs
number
required
threatType
string | null