<!--
{
  "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/Input-swift.struct/init(totalTokenCount:cachedTokenCount:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "Foundation Models"
    ],
    "preciseIdentifier" : "s:16FoundationModels38LanguageModelExecutorGenerationChannelV5UsageV5InputV15totalTokenCount06cachedkL0AGSi_Sitcfc"
  },
  "title" : "init(totalTokenCount:cachedTokenCount:)"
}
-->

# init(totalTokenCount:cachedTokenCount:)

Creates input token counts for the transcript submitted to the model.

```
init(totalTokenCount: Int, cachedTokenCount: Int)
```

## Parameters

`totalTokenCount`

The total number of input tokens from the transcript.

`cachedTokenCount`

The number of input tokens served from a cache.

---

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)