<!--
{
  "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/LanguageModelExecutorGenerationChannel/Usage",
  "metadataVersion" : "0.1.0",
  "role" : "Structure",
  "symbol" : {
    "kind" : "Structure",
    "modules" : [
      "Foundation Models",
      "FoundationModels"
    ],
    "preciseIdentifier" : "s:16FoundationModels38LanguageModelExecutorGenerationChannelV5UsageV"
  },
  "title" : "LanguageModelExecutorGenerationChannel.Usage"
}
-->

# LanguageModelExecutorGenerationChannel.Usage

Snapshot of an entry’s token totals.

```
struct Usage
```

## Overview

Producers report the current cumulative totals on every update, and consumers replace
prior totals wholesale.

## Topics

### Creating a usage token instance

[`init(input: LanguageModelExecutorGenerationChannel.Usage.Input, output: LanguageModelExecutorGenerationChannel.Usage.Output, metadata: [String : any ConvertibleToGeneratedContent])`](/documentation/FoundationModels/LanguageModelExecutorGenerationChannel/Usage/init(input:output:metadata:))

Creates a usage update.

### Updating the token counts

[`var input: LanguageModelExecutorGenerationChannel.Usage.Input`](/documentation/FoundationModels/LanguageModelExecutorGenerationChannel/Usage/input-swift.property)

The input token counts from the transcript.

[`struct Input`](/documentation/FoundationModels/LanguageModelExecutorGenerationChannel/Usage/Input-swift.struct)

Token counts for the transcript submitted to the model.

[`var output: LanguageModelExecutorGenerationChannel.Usage.Output`](/documentation/FoundationModels/LanguageModelExecutorGenerationChannel/Usage/output-swift.property)

The output token counts from the response.

[`struct Output`](/documentation/FoundationModels/LanguageModelExecutorGenerationChannel/Usage/Output-swift.struct)

Token counts for the output produced by the model.

### Accessing the metadata

[`var metadata: [String : GeneratedContent]`](/documentation/FoundationModels/LanguageModelExecutorGenerationChannel/Usage/metadata)

The additional metadata with a token count.

## Relationships

### Conforms To

[`Sendable`](/documentation/Swift/Sendable)

[`SendableMetatype`](/documentation/Swift/SendableMetatype)

---

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)