Wassitai the structured I/O layer
Guide

Turn unreliable model output into validated objects.

Result

Integrate in two lines

New here? Start with the beginner's guide →

Python

The library the playground is built on.
pip install wassitai

from wassitai import Client
from pydantic import BaseModel

class Invoice(BaseModel):
    number: str
    total: float

client = Client.from_provider("groq", api_key="…", model="…")
invoice = client.generate("Extract the invoice: …", schema=Invoice)

# Parse text you already have — no provider call:
from wassitai import parse
invoice = parse('{"number": "A-1", "total": 9.5}', Invoice)

REST

Same engine, any language.
MethodPathDoes
POST/v1/generateprompt + schema → object
POST/v1/parsetext + schema → object
GET/v1/providerslist providers
GET/healthliveness
curl -X POST $WASSITAI_URL/v1/generate \
  -H "X-Provider-Key: $GROQ_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"provider":"groq","prompt":"Extract the invoice: …",
       "schema":{"number":"str","total":"float"}}'
Errors map to status codes: 422 validation · 401 auth · 429 rate limit · 502 provider · 504 timeout. Interactive reference at /docs.