Skip to main content

Overview

Guardrails can wrap any callable compatible with its LLM API interface. For AI Sonar, configure the OpenAI SDK with AI Sonar’s base URL and pass the chat completions callable to your guard.
Type: Validation and structured-output frameworkPrimary Path: OpenAI-compatible Chat CompletionsSupport Confidence: Supported OpenAI-compatible path

Environment

Example

Endpoint Notes

Guardrails focuses on validation around the LLM call. Use the OpenAI-compatible path for chat-completions flows, or pass a custom callable if your application needs a native AI Sonar endpoint.