Built against OWASP LLM01Benchmark re-run every 6 hoursOpen-source SDK · MIT

SafePrompt Documentation

Send your first validation request, then enforce the verdict before model use.

§ 01

Quick Start

Get an API key, supply the end user IP, and check one input before forwarding it.

Get Started →
§ 02

API Reference

Complete API documentation with request/response examples in multiple languages.

View API Docs →
§ 03

Best Practices

Choose sensitivity, understand session context and stop unsafe or unavailable checks.

Learn More →

Framework Integrations

Inputs to Screen Before Model Use

Prompt Injection

Screens instructions that try to override the rules given to your AI

Jailbreaks

Screens attempts to redirect your AI through roleplay or jailbreak instructions

Data Extraction

Screens requests to extract system instructions or send data to an attacker

Retrieved Content

Check the exact document or tool-result text your model will receive

First Request Checklist

The quick start covers SDK and raw HTTP paths. These four checks belong in either integration.

0

Get an API Key

Start with 10,000 free validations a month, no credit card. Keep the key on your server.

Server-side integrationFree to start
1

Send a Complete Request

Send a POST request to https://api.safeprompt.dev, path /api/v1/validate, with X-API-Key, X-User-IP and Content-Type: application/json. Send a JSON body with prompt and sensitivity: strict.

Server-side integrationExact input text
2

Enforce the Verdict

Require a successful HTTP response and a boolean safe field. Block unsafe checks; stop or retry when validation is unavailable.

Before model contextValid verdict required
3

Check Later Inputs Too

Screen retrieved documents and tool results before adding them to context. Backend permissions separately authorize each tool operation.

Each input boundaryScoped tool permissions

Choose Your Next Guide

  • ✓Architecture: pattern, external-reference and AI semantic checks assess submitted text
  • ✓API reference: request fields, response fields, errors and plan quotas
  • ✓Session context: associate checks with a conversation without assuming gradual escalation coverage
  • →Next step: test safe, unsafe and unavailable checks before connecting your model