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:
- Navigate to Settings → Schema Validation.
- Click Add Rule.
- Select the Gateway Route to attach the rule to.
- Paste a JSON Schema in the Schema editor (draft-07 compatible).
- Set Validate Direction: Request, Response, or Both.
- Set On Failure: Reject (400), Warn (pass-through with header), or Log Only.
- Toggle Enabled on and click Save.
How to test:
- Create a rule requiring
"model"to be a string in the request body. - Send a request without a
modelfield — should receive a400with schema validation details. - Send a valid request — should pass through to the LLM.