# TypeSafe AI

> How to use TypeSafe's System One API

- **Introduction**: Jev is TypeSafe's flagship model and the first System One model. Send state and typed questions; get structured answers your code can use directly.
- **Quick start**: Prefer to just dive in? Here's everything you need to get started immediately.
- **System One**: System One models make fast, structured decisions for software. Jev is TypeSafe's flagship model and the first System One model.
- **State**: What state is, how to structure it, and how to give a System One model the context it needs.
- **Primitives (Questions)**: The three TypeSafe question types (Choice, Score, Noul), the typed answers they return, how to choose between them, and how to ask several at once.
- **Choice**: A Choice is a System One question type for selecting one option from a defined set. The answer includes the selected option, a probability for each option, and confidence.
- **Score**: A Score is a System One question type for rating content against ordered, descriptive levels. The answer includes a score, a probability for each level, and confidence.
- **Noul**: A Noul question asks the model to evaluate a yes/no question and return the probability that the answer is yes.
- **Advanced: structure**: Instructions, Choice options, Score levels, and Noul criteria all accept JSON structure.
- **AI primer**: Why TypeSafe trains decision models with calibrated probabilities instead of optimizing for generated text.
- **Confidence**: How TypeSafe reports certainty, how it differs from probability, and how to use it to control system behavior.
- **How to build with TypeSafe**: Design AI-powered software by keeping code in control and giving System One narrow, structured decisions.
- **Example use cases**: Explore TypeSafe use cases by industry and turn promising ideas into software workflows.
- **Patterns**: Architectural patterns for building systems with TypeSafe.
- **Speculative fan-out**: Send many questions in a single call, including speculative ones, and let your code decide what's relevant.
- **Confidence-gated routing**: Use confidence as a second axis. The answer tells you what; confidence tells you whether to act.
- **Composite scoring**: Break a complex judgment into atomic scores, combine with weights you control in code.
- **Intent routing**: Classify incoming requests and route each to the optimal handler: deterministic logic, a specialist LLM, or a human.
- **Demos**: Interactive examples showing what's possible with TypeSafe.
- **Smart home assistant demo**: Demo code: a smart home assistant that uses TypeSafe to evaluate user requests.
- **Client SDKs**: Install a TypeSafe client SDK and use typed questions and answers in your application.
- **TypeSafe Python SDK**: Install the TypeSafe Python SDK and get started with asynchronous or synchronous API calls.
- **Usage**: Guides and patterns for working with the TypeSafe Python SDK.
- **Changelog**: Python clients for the TypeSafe AI API
- **API reference**: Python clients for the TypeSafe AI API
- **Async client**: Use AsyncTypeSafeClient to ask questions, list models, and configure asynchronous TypeSafe API requests.
- **Sync client**: Use TypeSafeClient to ask questions, list models, and configure synchronous TypeSafe API requests.
- **Questions**: Provide state and ask yes/no, choice, and score questions using objects or dictionaries.
- **Answers and responses**: Read answers, confidence scores, token usage, and available models returned by the TypeSafe API.
- **Retries**: Configure retries with RetryPolicy — attempt count, retryable statuses, backoff, and retry headers handling.
- **Common types**: Common types for TypeSafe API SDK.
- **Exceptions**: Handle TypeSafe API errors, rate limits, connection failures, and timeouts.
- **Constants**: Default settings and environment variable names for the TypeSafe Python SDK.
- **JavaScript SDK**: API reference for JavaScript SDK.
- **Function: choice()**: Function to ask choice questions.
- **Function: noul()**: Function to ask yes/no questions.
- **Function: score()**: Function to ask score questions.
- **Models**: Overview of models available in TypeSafe.
- **Agent skill**: Drop-in skill for Claude Code, Codex, and other agent environments.
- **Legal**: Legal documents and policies for TypeSafe.
- **Jev 1.13 jaggedness**: Known issues and jagged edges with Jev 1.13.
- **Self-consistency: nouls**: Routing uncertain probabilities to human review while keeping underlying noul values visible.
- **Self-consistency: choices**: Adding uncertain outcomes to moderation decisions.
- **Parallel questions**: Efficient questioning methods in TypeSafe calls.
- **Re-ranking**: Method for improving accuracy in legal queries.
- **Line-by-line search**: Implementing semantic search in legal documents.
- **Structure recovery**: Techniques for reconstructing Markdown formatting.
- **Function calling**: Mapping natural-language trading requests to TypeSafe questions.
- **Skill suggestion**: Optimal skill selection for agent tasks.
- **Knowledge graph entity alignment**: Aligning product details across catalogs.
- **Classifying RAG passages**: Scoring and evaluating retrieved passages.
- **Double-checking citations**: Verifying citations against source documents.
- **Guardrails for LLMs**: Screening messages in LLM apps.
- **SDE cascade**: Structured-data-extraction methodology.
- **Date extraction**: Techniques for extracting date information from documents.
- **Pre-parsed value extraction**: Extracting contact information using regexes.
- **Hierarchical classification**: Document classification through taxonomies.
- **Autoresearch feature discovery**: Automating feature discovery in TypeSafe.
