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

Authorizations

X-API-Key
string
header
required

PromptGuard API key for developer endpoints. Keys start with pg_live_ and are created in the dashboard.

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'

Pattern: ^(prompt|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