A stable schema contract for every LLM.
Provider‑agnostic structured outputs with fail‑closed guarantees. Catch drift in CI before it hits prod.
Works with OpenAI, Anthropic, and local models.
curl -X POST https://schemashield.ai/v1/shield \
-H "Authorization: Bearer <YOUR_API_KEY>" \
-H "Content-Type: application/json" \
-d '{
"provider":"openai",
"model": "gpt-4.1-mini",
"prompt":"Extract a product {name, priceUSD:number}. Text: iPhone 15 costs $799.",
"schema":{
"type":"object",
"properties":{"name":{"type":"string"},"priceUSD":{"type":"number"}},
"required":["name","priceUSD"],
"additionalProperties":false
}
}'
Response: { ok: true, data } or { ok: false, error, diff }.
Native JSON modes ≠ guarantees
Provider JSON modes help—but don’t ensure enums, regexes, or shape constraints across changes.
SchemaShield guarantees across providers
Hard schema validation + tolerant repair + CI drift guard. Fail‑closed with minimal diffs.
Hard guarantees
JSON must match your schema—or we return non‑200 with a minimal diff so pipelines fail predictably.
Provider‑agnostic
Keep your LLMs. We use native structured outputs when available; fall back to grammar or repair.
Fast repair path
Tolerant parse + sanitizer fixes common breakages (quotes, trailing commas, type coercion).
How it works
- Post
promptandschemato/v1/shield. - Constrain → validate → attempt repair if needed.
- Return valid JSON or a fail‑closed diff. No silent best‑effort.
CI Guard (GitHub Action)
# .github/workflows/shield.yml
- uses: schemashield/schemashield-action@v1
with:
provider: openai
model: gpt-4.1-mini
schemas: ./schemas
prompts: ./prompts
seeds: 3
Blocks merges on schema breaks or semantic checks (regex/enums/ranges).
Simple pricing
Free to start. Scale as you need.
Team
$29/month
- Unlimited projects
- 250k validations, 15k repairs
- CI: 5 repos, 5 seats
FAQ
What exactly is “fail‑closed”?
If output can’t be validated or repaired, we return non‑200 with a minimal schema diff. Your job/CI fails predictably.
Will repair change meaning?
Repair only fixes syntax/shape. Semantic validators (regex/enums/ranges) are optional and explicit.
What’s the overhead?
Typical 30–90ms validation path. Repair path adds ~100–300ms. Retries/backoff are configurable.
Do you store my data?
Not by default. Enable persist=true for debugging. PII‑scrub toggle in logs.