Safety

Guardrails

Check every prompt and response, then log, warn, block or redact what breaks your rules.

Input and output checksLog, warn, block or redactChanges apply immediately

What is Guardrails?

Guardrails are safety checks that run on every AI request and response. Spro's guardrails inspect prompts before they reach the model and responses before they reach users. They cover sensitive data, toxicity, hidden-text attacks, rate and budget limits and output format. Each guardrail can log, warn, block with HTTP 403, or redact, and you turn them on or off in the dashboard.

AI apps take input you do not control and produce text you did not write. Guardrails put rules in front of the model and behind it, so personal data, abusive content, prompt tricks and malformed output are caught in one place instead of in every service.

Guardrails are split into input checks, which run before the model sees the prompt, and output checks, which run before the answer reaches your user. Configure them per workspace on the Guardrails page. Changes apply right away, with no redeploy.

Key features

What this feature does for your requests.

  • Input guardrails for sensitive information, moderation, language and adversarial text
  • Input rate, budget and token limits for requests, cost and token use
  • Output guardrails for JSON validity, toxicity, bias, refusals and hallucination checks
  • Four actions: log, warn, block (HTTP 403) and redact
  • Blocked requests use no tokens, because the provider never sees them

How it works

4 steps, from setup to the first request.

  1. 01

    Open Guardrails

    Go to the workspace Guardrails page and choose the Input or Output tab.

  2. 02

    Enable and tune

    Turn on the checks you need, then set thresholds or entities.

  3. 03

    Choose an action

    Pick log to observe, warn to flag, block to stop, or redact to mask.

  4. 04

    Watch the results

    Violations appear in your logs, so you can tune before you enforce.

Is it the right fit?

Specific situations where this feature helps, and where it does not.

Good fit if

  • User-facing chat or agents that could receive abusive or unsafe input
  • Outputs that feed a parser or a downstream system where a malformed answer breaks things
  • Teams that must show a documented control in an AI safety review

Not a good fit if

  • Internal tools with trusted input, where checks only add latency
  • Expecting perfect accuracy. Every check has false positives and misses, so plan to review blocked requests

Guardrails FAQs

Common questions about Guardrails.

Route every AI request through SPRO.

One OpenAI-compatible API for 350+ models, with intelligent routing, 29 built-in guardrails, observability, and automatic failover.

Talk to sales