---
title: id
framework: foundationmodels
role: symbol
role_heading: Instance Property
path: foundationmodels/generatedcontent/id
---

# id

A unique id that is stable for the duration of a generated response.

## Declaration

```swift
var id: GenerationID?
```

## Discussion

Discussion A LanguageModelSession produces instances of GeneratedContent that have a non-nil id. When you stream a response, the id is the same for all partial generations in the response stream. Instances of GeneratedContent that you produce manually with initializers have a nil id because the framework didn’t create them as part of a generation.

## See Also

### Identifying a generation

- [GenerationID](foundationmodels/generationid.md)
