Decision API use cases
Each page takes one job — routing a request, scoring against a rubric, checking a condition — and shows the question shape, the TypeScript call and where the boundary sits.
Turn Screenshots into Typed JSON for Your Agent
Turn screenshots into typed JSON fields with Clairic's extract(): text, numbers, dates, with confidence and null when a value is missing.
Extract Invoice and Receipt Fields with One API Call
Extract invoice number, dates, totals and tax from invoice text or receipt photos with a typed TypeScript SDK.
Judge an AI Answer Before You Show It
Score an answer against a rubric and check whether it is supported by the source before it reaches a user. Typed verdicts, probabilities you can threshold, and an escalation path for low confidence.
Gate a Code Change Before Merge
Score a diff's blast radius and ask whether it touches security or data safety, in one request. Typed thresholds let a reviewer or an agent block, flag or wave through a change.
Triage a Suspicious Email Before Anyone Clicks
Ask one yes/no question about a message's risk and one choice question about handling it, then route on the probability. Low-cost enough to run on every inbound message, not just reported ones.
Choose a Game Character's Next Action
Turn a character's state into JSON, ask one choice question over a fixed action list, and get the pick plus a probability for every option. One request replaces a hand-written if-else tree.
Moderate a Post Before Publishing
Ask one yes/no question about whether a post breaks a specific rule, point at the rule text in state, and route on the probability instead of a single label.