---
title: Foundation Models
framework: foundationmodels
role: collection
role_heading: Framework
path: foundationmodels
---

# Foundation Models

Perform tasks with models that specialize in language understanding, structured output, and tool calling.

## Mentioned in

Updating prompts for new model versions

## Overview

Overview The Foundation Models framework provides access to any large language model, like the on-device and Private Cloud Compute models designed for Apple Intelligence. These models help you perform intelligent tasks specific to your use case.

On-device models excel at a diverse range of text generation tasks, like summarization, entity extraction, text and image understanding, refinement, dialog for games, generating creative content, and more. When you need more reasoning capabilities and context size, use Private Cloud Compute or any server model provider. The dynamic profile API provides the flexibility to select the best model configuration for your task, and lets you build many useful abstractions, such as agents or skills. Generate entire Swift data structures with guided generation. With the @Generable macro, you can define custom data structures and the framework provides strong guarantees that the model generates instances of your type. Use Tool to create custom tools that the model can call to assist with handling your request. For example, the model can call a tool that searches a local or online database for information, or calls a service in your app. To use Apple Foundation Models, people need to turn on Apple Intelligence on their device. For a list of supported devices, see Apple Intelligence. What’s new Adding server-side intelligence with Private Cloud Compute Composing dynamic sessions with instructions and profiles Analyzing images with multimodal prompting Build agentic app experiences with the Foundation Models framework Bring an LLM provider to the Foundation Models framework Debug and profile agentic app experiences with Instruments

## Topics

### Essentials

- [Foundation Models updates](updates/foundationmodels.md)
- [Generating content and performing tasks with Foundation Models](foundationmodels/generating-content-and-performing-tasks-with-foundation-models.md)
- [Adding intelligent app features with generative models](foundationmodels/adding-intelligent-app-features-with-generative-models.md)

### Sessions and prompts

- [Prompting an on-device foundation model](foundationmodels/prompting-an-on-device-foundation-model.md)
- [Managing the context window](foundationmodels/managing-the-context-window.md)
- [Updating prompts for new model versions](foundationmodels/updating-prompts-for-new-model-versions.md)
- [LanguageModelSession](foundationmodels/languagemodelsession.md)
- [Instructions](foundationmodels/instructions.md)
- [Prompt](foundationmodels/prompt.md)
- [Transcript](foundationmodels/transcript.md)
- [TranscriptErrorHandlingPolicy](foundationmodels/transcripterrorhandlingpolicy.md)
- [GenerationOptions](foundationmodels/generationoptions.md)
- [ContextOptions](foundationmodels/contextoptions.md)

### Prompt attachments

- [Analyzing images with multimodal prompting](foundationmodels/analyzing-images-with-multimodal-prompting.md)
- [Attachment](foundationmodels/attachment.md)
- [AttachmentContent](foundationmodels/attachmentcontent.md)
- [ImageAttachmentContent](foundationmodels/imageattachmentcontent.md)
- [ImageReference](foundationmodels/imagereference.md)

### Dynamic profiles

- [Composing dynamic sessions with instructions and profiles](foundationmodels/composing-dynamic-sessions-with-instructions-and-profiles.md)
- [Origami: Crafting a dynamic tutorial for Apple Intelligence](foundationmodels/origami-crafting-a-dynamic-tutorial-for-apple-intelligence.md)
- [DynamicInstructions](foundationmodels/dynamicinstructions.md)
- [LanguageModelSession.DynamicProfile](foundationmodels/languagemodelsession/dynamicprofile.md)
- [LanguageModelSession.DynamicProfileModifier](foundationmodels/languagemodelsession/dynamicprofilemodifier.md)
- [LanguageModelSession.Profile](foundationmodels/languagemodelsession/profile.md)

### Structured output

- [Generating Swift data structures with guided generation](foundationmodels/generating-swift-data-structures-with-guided-generation.md)
- [Generable](foundationmodels/generable.md)
- [GenerationSchema](foundationmodels/generationschema.md)
- [DynamicGenerationSchema](foundationmodels/dynamicgenerationschema.md)
- [GeneratedContent](foundationmodels/generatedcontent.md)
- [ConvertibleToGeneratedContent](foundationmodels/convertibletogeneratedcontent.md)
- [ConvertibleFromGeneratedContent](foundationmodels/convertiblefromgeneratedcontent.md)

### Tools

- [Expanding generation with tool calling](foundationmodels/expanding-generation-with-tool-calling.md)
- [Generate dynamic game content with guided generation and tools](foundationmodels/generate-dynamic-game-content-with-guided-generation-and-tools.md)
- [Tool](foundationmodels/tool.md)

### System language model

- [Supporting languages and locales with Foundation Models](foundationmodels/supporting-languages-and-locales-with-foundation-models.md)
- [Categorizing and organizing data with content tags](foundationmodels/categorizing-and-organizing-data-with-content-tags.md)
- [SystemLanguageModel](foundationmodels/systemlanguagemodel.md)
- [LanguageModelError](foundationmodels/languagemodelerror.md)

### Private Cloud Compute

- [Adding server-side intelligence with Private Cloud Compute](foundationmodels/adding-server-side-intelligence-with-private-cloud-compute.md)
- [com.apple.developer.private-cloud-compute](bundleresources/entitlements/com.apple.developer.private-cloud-compute.md)
- [PrivateCloudComputeLanguageModel](foundationmodels/privatecloudcomputelanguagemodel.md)

### Custom language model provider

- [Optimizing key-value caching in language model sessions](foundationmodels/optimizing-key-value-caching-in-language-model-sessions.md)
- [LanguageModel](foundationmodels/languagemodel.md)
- [LanguageModelCapabilities](foundationmodels/languagemodelcapabilities.md)
- [LanguageModelExecutor](foundationmodels/languagemodelexecutor.md)
- [LanguageModelExecutorGenerationChannel](foundationmodels/languagemodelexecutorgenerationchannel.md)
- [LanguageModelExecutorGenerationRequest](foundationmodels/languagemodelexecutorgenerationrequest.md)

### Custom session properties

- [LanguageModelSession.SessionProperty](foundationmodels/languagemodelsession/sessionproperty.md)
- [SessionPropertyKey](foundationmodels/sessionpropertykey.md)
- [SessionPropertyValues](foundationmodels/sessionpropertyvalues.md)
- [SessionPropertyEntry()](foundationmodels/sessionpropertyentry().md)

### Safety

- [Improving the safety of generative model output](foundationmodels/improving-the-safety-of-generative-model-output.md)

### Performance and evaluation

- [Evaluating prompts to measure performance and improve model responses](foundationmodels/evaluating-prompts-to-measure-performance-and-improve-model-responses.md)
- [Evaluating language model responses](evaluations/evaluating-language-model-responses.md)
- [Analyzing the runtime performance of your Foundation Models app](foundationmodels/analyzing-the-runtime-performance-of-your-foundation-models-app.md)
