Skip to main content
The Guard Gateway is the primary way to route AI traffic through BeyondGuard. Requests and responses follow the OpenAI chat completions format, so you can point an existing OpenAI-compatible client at it by changing only the base URL and the auth header — no changes to your prompts or model configuration. Every response carries additional BeyondGuard metadata fields, each prefixed with __beyond_guard_, that report the security verdict.

Endpoint

The {gateway-id} in the path is specific to the gateway you configured in your panel, and the <token> is a valid API token issued from that panel. Treat the token like any other long-lived secret.

Send a request

Requests use the standard chat completions body.

Read the verdict

Every response combines the familiar chat completions envelope with BeyondGuard’s own metadata. The two fields you will use most often:
  • __beyond_guard_checks_result.passed — true if the request cleared every security control.
  • __beyond_guard_rejection_codes — populated with reason codes when passed is false.
When passed is false, inspect __beyond_guard_rejection_codes and __beyond_guard_checks_result.details to see exactly which control fired and why.

Response fields

Standard fields

BeyondGuard metadata

Token usage in __beyond_guard_token_usage shows 0 for guard-only requests that were resolved before reaching the language model — for example, a prompt injection denied at the input stage.

Example response

A request that passes all input controls returns the chat completion alongside a populated __beyond_guard_checks_result:
When a control fails, passed is false, __beyond_guard_rejection_codes lists the reason, and details carries the failing control’s verdict, confidence, and evidence.

Quickstart

Route your first request through the Guard Gateway.

Controls Catalog

The controls that produce each verdict.

Policy Configuration

Set the thresholds and outcomes the gateway enforces.

How It Works

Where the gateway sits in your architecture.