<!--
{
  "availability" : [
    "iOS: 26.0.0 -",
    "iPadOS: 26.0.0 -",
    "macCatalyst: 26.0.0 -",
    "macOS: 26.0.0 -",
    "visionOS: 26.0.0 -",
    "watchOS: 27.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "FoundationModels",
  "identifier" : "/documentation/FoundationModels/GeneratedContent/init(elements:id:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "Foundation Models",
      "FoundationModels"
    ],
    "preciseIdentifier" : "s:16FoundationModels16GeneratedContentV8elements2idACx_AA12GenerationIDVSgtcSTRzAA013ConvertibleTocD0_p7ElementRtzlufc"
  },
  "title" : "init(elements:id:)"
}
-->

# init(elements:id:)

Creates content representing an array of elements you specify.

```
init<S>(elements: S, id: GenerationID? = nil) where S : Sequence, S.Element == any ConvertibleToGeneratedContent
```

---

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)