# tsfm > TypeScript SDK for Apple's Foundation Models framework — on-device Apple Intelligence inference in Node.js via FFI. macOS 26+, Apple Silicon only. ## Guide - [Getting Started](https://tsfm.dev/guide/getting-started): Installation, requirements, and first usage - [Model Configuration](https://tsfm.dev/guide/model-configuration): SystemLanguageModel entry point and availability checking - [Sessions](https://tsfm.dev/guide/sessions): LanguageModelSession conversation state and generation methods - [Streaming](https://tsfm.dev/guide/streaming): Token-by-token streaming via async iterators - [Structured Output](https://tsfm.dev/guide/structured-output): Constrained generation with schemas and guides - [Tools](https://tsfm.dev/guide/tools): Let the model call your functions during generation - [Transcripts](https://tsfm.dev/guide/transcripts): Save and restore session history across restarts - [Generation Options](https://tsfm.dev/guide/generation-options): Temperature, token limits, and sampling strategy - [Error Handling](https://tsfm.dev/guide/error-handling): Error hierarchy and status code mapping - [Chat & Responses APIs](https://tsfm.dev/guide/chat-api): Drop-in Chat Completions and Responses API interfaces ## API Reference - [Overview](https://tsfm.dev/api/): All public exports at a glance - [SystemLanguageModel](https://tsfm.dev/api/system-language-model): On-device model access and availability - [LanguageModelSession](https://tsfm.dev/api/language-model-session): Session class with all generation methods - [GenerationSchema](https://tsfm.dev/api/generation-schema): Builder for typed structured output schemas - [GenerationOptions](https://tsfm.dev/api/generation-options): Options controlling generation behavior - [Tool](https://tsfm.dev/api/tool): Abstract base class for tool definitions - [Transcript](https://tsfm.dev/api/transcript): Session conversation history serialization - [Errors](https://tsfm.dev/api/errors): Error classes and status code mapping - [Chat & Responses APIs](https://tsfm.dev/api/chat): Client, Stream, and ResponseStream reference ## Examples - [Overview](https://tsfm.dev/examples/): Index of all runnable examples - [Basic](https://tsfm.dev/examples/basic): Simple prompt and response - [Streaming](https://tsfm.dev/examples/streaming): Token-by-token streaming - [Structured Output](https://tsfm.dev/examples/structured-output): Typed object generation with schemas - [JSON Schema](https://tsfm.dev/examples/json-schema): Standard JSON Schema structured output - [Tools](https://tsfm.dev/examples/tools): Tool calling with a calculator - [Generation Options](https://tsfm.dev/examples/generation-options): Temperature and sampling control - [Transcripts](https://tsfm.dev/examples/transcript): Saving and restoring session history - [Content Tagging](https://tsfm.dev/examples/content-tagging): Classification with CONTENT_TAGGING use case - [Chat & Responses APIs](https://tsfm.dev/examples/chat-api): Chat Completions and Responses API examples ## Changelog - [Changelog](https://tsfm.dev/changelog): Release history and version notes