<!--
{
  "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(properties:id:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "Foundation Models",
      "FoundationModels"
    ],
    "preciseIdentifier" : "s:16FoundationModels16GeneratedContentV10properties2idACs13KeyValuePairsVySSAA013ConvertibleTocD0_pG_AA12GenerationIDVSgtcfc"
  },
  "title" : "init(properties:id:)"
}
-->

# init(properties:id:)

Creates generated content representing a structure with the properties you specify.

```
init(properties: KeyValuePairs<String, any ConvertibleToGeneratedContent>, id: GenerationID? = nil)
```

## Discussion

The order of properties is important. For [`Generable`](/documentation/FoundationModels/Generable) types, the order
must match the order properties in the types `schema`.

---

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)