Skip to main content

POST /api/v1/detect/sdk

Sends a text string to the Prompt Inspector detection engine and returns a safety verdict with a confidence score.

Request

Headers

Alternatively, pass the API key via Authorization: Bearer your-api-key.

Body

string
required
The text to analyze. Must be a non-empty string. Maximum length depends on your subscription plan.

Response

Response Fields

Threat Categories

The category field may contain one or more of the following values:
New categories may be added in the future. Your integration should handle unknown category values gracefully.

Example: cURL

Example: Python (requests)

Example: JavaScript (fetch)


GET /api/v1/verify-key

Verifies that an App API Key is valid and active. This endpoint is primarily used by the MCP server during SSE handshake.

Request

Headers

Response

For most integrations, you don’t need to call the verify-key endpoint directly. The SDKs handle authentication automatically — you will receive an AuthenticationError if your key is invalid.