API Documentation
Integrate Injecto into your AI app in under 5 minutes. Screen every user prompt before it reaches your LLM.
Base URL
Authentication
Pass your API key in the x-api-key header on every request. Get a key on the pricing page.
Quickstart
POST/demo/detect
Free, unauthenticated endpoint for testing and demos. Rate limited. Use /api/detect in production.
POST/api/detect
Production endpoint for direct user prompts. Requires a valid API key. Returns full verdict with risk score, severity, and attack classification.
POST/api/scan-rag
Scans retrieved documents/chunks for indirect prompt injection before they're added to your LLM's context — for RAG pipelines, tool outputs, and any content your app fetches rather than the user typing directly. Requires a valid API key.
Each item in chunks accepts text (required), source, source_trust (one of verified / internal / unverified / untrusted), and optional raw_markup for hidden-text detection.
GET/api/stats
Check your plan and request usage. Requires API key.
Response fields
| Field | Type | Description |
|---|---|---|
| safe | boolean | true = safe to pass to your LLM |
| risk_score | integer | 0–100. Higher = more dangerous |
| severity | string | LOW / MEDIUM / HIGH |
| attack_types | array | Human-readable attack categories detected |
| patterns | array | Exact phrases that triggered detection |
| prompt_length | integer | Word count of input |
Attack types
| Type | Description |
|---|---|
| Instruction Override | "ignore previous instructions" and variants |
| Role Hijacking | "pretend you are" / "you are now" attacks |
| Prompt Leaking | Attempts to extract system prompt or config |
| Jailbreak Attack | DAN, developer mode, and constraint removal |
| Persona Injection | Gradual identity substitution via "new persona" |
| Privilege Escalation | "act as system" and similar elevation attempts |
| Safety Bypass | Direct "bypass safety" / "disable restrictions" |
| Firewall Block | Hardcoded forbidden content (passwords, secrets) |
| Indirect Injection (Third-Party Directive) | Instructions embedded in retrieved content, not the user's own prompt |
| Concealed Instruction (Hidden Text) | display:none / white-on-white / zero-size text hiding a payload from human review |
Error codes
| Status | Meaning |
|---|---|
| 400 | Missing or empty prompt/chunks field |
| 401 | No API key provided |
| 403 | Invalid API key |
| 429 | Monthly request limit reached — upgrade plan |