Protect AI Prompt API

The Prompt API from Protect AI — 2 operation(s) for prompt.

Operations 2

POST /analyze/prompt Analyze and sanitize a prompt #
POST /scan/prompt Scan a prompt #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/protectai-prompt-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

protectai-prompt-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: LLM Guard Prompt API
  description: Self-hostable REST API for LLM Guard, Protect AI's open-source (Apache 2.0) security toolkit for LLM interactions.
  termsOfService: https://protectai.com/terms
  contact:
    name: Protect AI / LLM Guard
    url: https://llm-guard.com/
  license:
    name: Apache 2.0
    url: https://www.apache.org/licenses/LICENSE-2.0
  version: '1.0'
servers:
- url: http://localhost:8000
  description: Default local llm-guard-api deployment (FastAPI/Uvicorn).
security:
- bearerAuth: []
- {}
tags:
- name: Prompt
paths:
  /analyze/prompt:
    post:
      operationId: analyzePrompt
      tags:
      - Prompt
      summary: Analyze and sanitize a prompt
      description: Runs the configured input scanners over the supplied prompt and returns the sanitized prompt, an overall validity flag, and per-scanner risk scores. Scanners that redact or anonymize content (for example PII anonymization) apply their changes to the returned sanitized_prompt.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AnalyzePromptRequest'
      responses:
        '200':
          description: Prompt analyzed.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AnalyzePromptResponse'
        '400':
          description: Invalid request.
        '403':
          description: Authentication failed.
  /scan/prompt:
    post:
      operationId: scanPrompt
      tags:
      - Prompt
      summary: Scan a prompt
      description: Runs the configured input scanners over the supplied prompt and returns the validity flag and per-scanner risk scores without returning a modified prompt. Use /analyze/prompt when sanitized text is required.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ScanPromptRequest'
      responses:
        '200':
          description: Prompt scanned.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ScanPromptResponse'
        '400':
          description: Invalid request.
        '403':
          description: Authentication failed.
components:
  schemas:
    AnalyzePromptResponse:
      type: object
      properties:
        sanitized_prompt:
          type: string
          description: The prompt after applicable scanners have redacted or anonymized content.
        is_valid:
          type: boolean
          description: True when the prompt passed all configured scanners.
        scanners:
          type: object
          description: Map of scanner name to risk score (0.0 - 1.0).
          additionalProperties:
            type: number
            format: float
    ScanPromptRequest:
      type: object
      required:
      - prompt
      properties:
        prompt:
          type: string
          description: The user prompt to scan.
        scanners_suppress:
          type: array
          items:
            type: string
    ScanPromptResponse:
      type: object
      properties:
        is_valid:
          type: boolean
        scanners:
          type: object
          additionalProperties:
            type: number
            format: float
    AnalyzePromptRequest:
      type: object
      required:
      - prompt
      properties:
        prompt:
          type: string
          description: The user prompt to analyze and sanitize.
        scanners_suppress:
          type: array
          description: Optional list of scanner names to skip for this request.
          items:
            type: string
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: Optional bearer token authentication, enabled per deployment via the llm-guard-api configuration. Deployments may also run without auth.