OpenRoute is recruiting agents — share the AI gateway market →Bare-metal GPU rentals from 1 hour — idle-compute scheduling platform coming soon →
OROpenRoute
  • Models
  • Bare Metal
  • Observability
  • Docs
  • Blog
Guardrails

Safety guardrails on every call

Ontology Route for AI Agent has Guardrails built into the gateway layer. Without touching your business code, validate content entering and leaving the model for compliance, safety and format. Stop risk before it reaches your users, trace every block in the observability chain.

Connect modelsExplore observability

Built-in guardrail types

An out-of-the-box policy library covering input, output and bidirectional scenarios.

Input

PII detection & redaction

Unavailable

Detect ID cards, phone numbers, emails, bank cards and other sensitive data; redact or block automatically. Requires a dedicated service — unavailable for now.

Input

Jailbreak & injection blocking

Detect prompt injection and jailbreak patterns and block the request before it reaches the model.

Both

Credential leak protection

Scan for API keys, tokens and other credentials to prevent sensitive data from leaking in requests or responses.

Output

Content moderation

Score violence, hate, adult and other categories; block or rewrite automatically above threshold.

Output

Structured output validation

Enforce JSON Schema on output and auto-retry on missing or invalid fields.

Both

Custom rules

Combine regex, keyword lists and LLM-as-a-Judge to orchestrate your own guardrails.

Bidirectional guardrail pipeline

Requests pass guardrail checks before reaching the model and responses before reaching the user — block, redact, rewrite or retry on policy hit.

Request guardrails · Input

PII detection

Unavailable · needs self-hosted service

Pass

Jailbreak injection

Hit jailbreak rule

Block

Keywords

No hits

Pass

Model call

gpt-4o

Response guardrails · Output

Content moderation

toxicity 0.02

Pass

JSON Schema

Valid

Pass

Hallucination check

Low confidence

Warn

This request was blocked because it hit the jailbreak rule; the event is recorded in the corresponding trace.

Policy as code

Guardrail rules are managed declaratively, with versioning, review and canary release. Mount them flexibly per task, tenant and environment — every hit flows into the observability chain for a complete audit loop.

  • 版本化与灰度发布
  • 按租户 / 环境差异化挂载
  • 命中记录联动 Trace 审计
  • Versioned with canary release
  • Per-tenant / environment mounting
  • Hits linked to trace auditing
See how hits link to observability
guardrails.yaml
guardrails:
  - id: block-jailbreak
    stage: input
    when: prompt_injection.score > 0.8
    action: block
  - id: mask-pii
    stage: input
    detectors: [email, phone, id_card]
    action: redact
  - id: enforce-schema
    stage: output
    schema_ref: ./order.schema.json
    action: retry
    max_retries: 2

Start from the catalog, connect safely

Pick a model, attach guardrails, turn on observability — build trusted apps in three steps.

Browse model catalog
OROpenRoute· Ontology Route for AI Agent
ModelsProvidersObservabilityGuardrailsPricingBare MetalTerms of ServicePrivacy Policy

Prices are shown in CNY (¥) per million tokens and are for reference only. Live pricing, quotas and billing are subject to the console.

Copyright ©2025-2027 天津聚链科技有限公司版权所有

津ICP备2023007973号-5|beian津公网安备12011402001495号