Skip to main content
Runtime Security is a drop‑in firewall for LLM traffic. It scans prompts before they reach the model and responses before they reach the user, catching prompt injection, PII and secret leakage, and dangerous agent tool calls. It’s wire‑compatible with the OpenAI, Anthropic, Gemini, Vertex, and Bedrock SDKs, so most apps integrate by changing one config value.

Three ways to integrate

Pick the mode that matches your stack. They’re not mutually exclusive: most deployments use the reverse proxy for chat traffic and the scan API for batch jobs and agent tool calls.
ModeBest forCode change
Reverse proxyApps that already use the OpenAI / Anthropic SDKSwap one config value (base_url).
Scan APICustom middleware, batch pipelines, non‑LLM text scanningTwo HTTP calls per request.
Tool‑call scanAgent runtimes that execute LLM‑issued tool callsOne HTTP call before each tool_use.

Reverse proxy

Wire‑compatible passthrough. No code changes beyond base_url.

Scan API

Explicit scan/input and scan/output calls around your model.

Tool‑call scan

Block dangerous tool invocations before they execute.

Quickstart by mode

from openai import OpenAI

client = OpenAI(
    base_url="https://api.your-antidote.com/api/runtime-security/proxy/openai/v1",
    api_key="sk-…",                       # your real OpenAI key, forwarded upstream
    default_headers={
        "X-API-Key": "ak_live_…",         # your Antidote key
        "X-Antidote-App-Id": "app_…",     # which App this traffic belongs to
    },
)

resp = client.chat.completions.create(
    model="gpt-4o",
    messages=[{"role": "user", "content": "Hello"}],
)
That’s it. The proxy scans both directions and either forwards (allow), mutates content (redact), or returns a provider‑shaped error (block).

Authentication

All routes accept any of the following credentials. Use X-API-Key for the scan API. For the proxy routes, Authorization is reserved for the upstream provider, so use X-API-Key (OpenAI clients) or X-Antidote-Key (Anthropic clients).
HeaderValueUse it for
X-API-Keyak_live_…Scan API; proxy when calling OpenAI.
X-Antidote-Keyak_live_… or Bearer <jwt>Proxy when calling Anthropic (x-api-key is taken by the provider).
Cookie: antidote_session=…session JWTIn‑app dashboard usage.
X-Antidote-App-IdApp UUID (see Apps)Required on every scan / proxy call. Attributes traffic to an App.
X-Antidote-App-TokenApp tokenRequired when the App has require_signed_token=true.
API keys are issued under Settings → API Keys in the Antidote dashboard. They scope to a workspace and a permission set; Runtime Security needs:
  • runtime_security.scan to call the scan endpoints.
  • runtime_security.view for analytics and event reads.
  • runtime_security.manage to manage Apps and configuration.

Where to next

Apps

Per‑surface configuration: thresholds, detectors, custom rules, tool policy.

Verdicts

What allow / redact / block mean and how to act on them.

Configuration

Workspace and per‑App settings.

Observability

Analytics, events, drift, streaming.