API Reference

Base URL: https://api.injectshield.dev

Authentication

Pass your API key as a bearer token:

Authorization: Bearer is_live_…

Or via header: X-API-Key: is_live_….

POST /v1/scan

Returns a verdict and (optionally) a sanitized version of the input.

Request body

FieldTypeDefaultDescription
textstring≤ 100,000 chars. Required.
contextenum"unknown"git_commit · web_content · user_input · file_content · email · tool_output
options.sensitivityenum"medium"low · medium · high — threshold tuning
options.return_cleanedbooltrueReturn sanitized text with matches replaced.

Response

{
  "safe": false,
  "confidence": 0.94,
  "threat_type": "instruction_injection",
  "patterns_matched": ["ignore-previous", "system-tag-injection"],
  "cleaned_text": "[REDACTED:instruction_injection]",
  "semantic_score": 0.91,
  "semantic_label": "negative",
  "notes": [],
  "request_id": "req_abc123…"
}

POST /v1/keys (signup)

Public, throttled to 5 signups/IP/day. Sends an API key to the supplied email.

curl -X POST https://api.injectshield.dev/v1/keys \
  -H "Content-Type: application/json" \
  -d '{"email":"[email protected]"}'

GET /v1/keys/me

Returns the email, tier, and monthly usage for the bearer key.

GET /v1/usage

Returns current-month request count + blocked count for the bearer key.

POST /v1/checkout

Creates a Stripe Checkout Session. Body: {tier:"hobby"|"team"|"pro", email}. Returns {url}.

POST /v1/demo

Public, IP-throttled. Same shape as /v1/scan minus auth and usage logging. Useful for the live demo on the landing page; not intended for production traffic.

Threat categories

Limits + errors

StatusCodeMeaning
400bad_json / missing_text / bad_emailMalformed request
401missing_api_key / invalid_api_keyAuth failed
402monthly_limitPlan quota exhausted — upgrade
413text_too_largeText > 100K chars
429rate_limited / signup_throttled / demo_rateBackoff and retry

Defense in depth

InjectShield is one layer of a defense-in-depth strategy. Pair it with: prompt-template constraints, tool argument validation, output filtering, and least-privilege agent permissions. We will not claim 100% detection — that's mathematically impossible.