Streaming JSON validation for AI

Don't retry. Repair.

Real-time streaming JSON validation with automatic repair cycles. Ensures any LLM output conforms to your JSON Schema before it reaches the user.

Try Demo

How Schema Guard Works

1

Define Your Schema

Provide your JSON Schema. Draft-07 and draft-2020-12 supported with full validation.

2

Stream & Validate

LLM tokens flow through our validator. Valid chunks stream to your app instantly.

3

Auto-Repair

On validation errors, repair context is sent back to the LLM. It self-corrects in real-time.

Interactive Demo

Paste a JSON Schema and see validation in action

Validation results will appear here...

SDK Integration

TypeScript
import { SchemaGuard } from '@schema-guard/sdk';

const guard = new SchemaGuard({ 
  apiKey: process.env.SG_API_KEY 
});

for await (const chunk of guard.stream(
  "Generate a user object",
  { schema: userSchema }
)) {
  console.log(chunk); // Valid JSON
}
Python
from schema_guard import SchemaGuard

guard = SchemaGuard(
    api_key=os.getenv("SG_API_KEY")
)

async for chunk in guard.stream(
    "Generate a user object",
    schema=user_schema
):
    print(chunk)  # Valid JSON

Features

Streaming First

Valid chunks stream instantly. No waiting for complete generation.

🔧

Auto-Repair

Automatic correction cycles with LLM context injection.

📐

Full Schema Support

JSON Schema draft-07 and draft-2020-12.

🔗

LLM Adapters

OpenAI, Anthropic, Google AI — all supported.

Simple, Transparent Pricing

Start free, scale as you grow

Free
$0/mo
  • 10K tokens/month
  • Basic validation
  • Community support
Starter
$29/mo
  • 100K tokens/month
  • All validation features
  • Email support
Popular
Pro
$79/mo
  • 1M tokens/month
  • Priority repair cycles
  • API access + analytics
Enterprise
$249/mo
  • Unlimited tokens
  • Custom repair strategies
  • SLA + dedicated support