<!--
{
  "availability" : [
    "iOS: 27.0.0 -",
    "iPadOS: 27.0.0 -",
    "macCatalyst: 27.0.0 -",
    "macOS: 27.0.0 -",
    "visionOS: 27.0.0 -",
    "watchOS: 27.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "FoundationModels",
  "identifier" : "/documentation/FoundationModels/LanguageModel",
  "metadataVersion" : "0.1.0",
  "role" : "Protocol",
  "symbol" : {
    "kind" : "Protocol",
    "modules" : [
      "Foundation Models"
    ],
    "preciseIdentifier" : "s:16FoundationModels13LanguageModelP"
  },
  "title" : "LanguageModel"
}
-->

# LanguageModel

A protocol that you use to interface with a model.

```
protocol LanguageModel : Sendable
```

## Overview

Implement this protocol to create a bridge between a model and the framework.
The protocol describes the capabilities and the configuration for your model. An
[`Executor`](/documentation/FoundationModels/LanguageModel/Executor) does the work of translating framework types into the types your
platform expects, and streams results back through [`LanguageModelExecutorGenerationChannel`](/documentation/FoundationModels/LanguageModelExecutorGenerationChannel).
Because most of the work is done in the executor, keep the type that adopts this
protocol intentionally light.

When your implementation is ready to adopt, distribute your solution with Swift
Package Manager so developers can easily integrate it into their project. After
they add your package, they simply initialize a [`LanguageModelSession`](/documentation/FoundationModels/LanguageModelSession) with
your model:

```swift
// Initialize a session with a custom server model.
let session = LanguageModelSession(model: MyCustomServerLanguageModel())
// Use the same API surface to prompt the model.
let response = try await session.respond(to: "Tell me a joke!")
```

## Topics

### Inspecting model capabilities

[`capabilities`](/documentation/FoundationModels/LanguageModel/capabilities)

The capabilities of this language model.

### Getting the executor configuration

[`executorConfiguration`](/documentation/FoundationModels/LanguageModel/executorConfiguration)

A configuration for an executor capable of running this model.

[`Executor`](/documentation/FoundationModels/LanguageModel/Executor)



---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)