Skip to content
Docs

Settings — Schema Validation

Navigate to: Settings → Schema Validation

Schema Validation enforces JSON Schema rules on request and/or response payloads at the gateway, before the request reaches the LLM or after the response returns.

Cross-reference: Full documentation at section 7.7.

Quick steps:

  1. Navigate to Settings → Schema Validation.
  2. Click Add Rule.
  3. Select the Gateway Route to attach the rule to.
  4. Paste a JSON Schema in the Schema editor (draft-07 compatible).
  5. Set Validate Direction: Request, Response, or Both.
  6. Set On Failure: Reject (400), Warn (pass-through with header), or Log Only.
  7. Toggle Enabled on and click Save.

How to test:

  1. Create a rule requiring "model" to be a string in the request body.
  2. Send a request without a model field — should receive a 400 with schema validation details.
  3. Send a valid request — should pass through to the LLM.