---
title: "init(input:output:metadata:)"
framework: foundationmodels
role: symbol
role_heading: Initializer
path: "foundationmodels/languagemodelsession/usage-swift.struct/init(input:output:metadata:)"
---

# init(input:output:metadata:)

Creates a usage value with the given token counts.

## Declaration

```swift
init(input: LanguageModelSession.Usage.Input, output: LanguageModelSession.Usage.Output, metadata: [String : any Sendable & Codable & Equatable] = [:])
```

## Parameters

- `input`: Token counts for the transcript.
- `output`: Token counts for the response.
- `metadata`: Additional usage statistics from the language model.
