Worked examples
Each example stands alone. Save the JSON and Rego files shown on the page, choose Python, TypeScript or cURL, and run the client with your API key. All requests use https://api.blatent.ai.
| Example | What it demonstrates | Extra context needed |
|---|---|---|
| Classify a message | Descriptions, enums and a boolean decision | None |
| Extract a booking | Text, identifier patterns and date-time formats | None |
| Connect output fields | Conditional fields and legal combinations | None |
| Apply permissions | Schema conditions plus Rego checks against scopes and state | Application-supplied permission snapshot |
| Check totals | Extracted values with exact arithmetic consistency | None |
| Extract facts and calculate | Variables extracted from prose and checked arithmetic steps | None |
| Order dates | Relationships between timestamps and an allowed window | Window supplied as state |
| Constrain a poem | Exact text counts and policy repair feedback | None |
Examples distinguish the model's interpretation from what the schema and policy enforce. Outputs marked illustrative explain the response shape. Observed results are identified separately; the poem also demonstrates policy-guided search. See evaluation for testing your own inputs.