<!--
{
  "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/Transcript/Prompt/init(id:metadata:segments:options:responseFormat:contextOptions:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "Foundation Models"
    ],
    "preciseIdentifier" : "s:16FoundationModels10TranscriptV6PromptV2id8metadata8segments7options14responseFormat14contextOptionsAESS_SDySSAA29ConvertibleToGeneratedContent_pGSayAC7SegmentOGAA010GenerationL0VAC08ResponseJ0VSgAA07ContextL0Vtcfc"
  },
  "title" : "init(id:metadata:segments:options:responseFormat:contextOptions:)"
}
-->

# init(id:metadata:segments:options:responseFormat:contextOptions:)

Creates a prompt.

```
init(id: String = UUID().uuidString, metadata: [String : any ConvertibleToGeneratedContent] = [:], segments: [Transcript.Segment], options: GenerationOptions = GenerationOptions(), responseFormat: Transcript.ResponseFormat? = nil, contextOptions: ContextOptions = ContextOptions())
```

## Parameters

`id`

A [`Generable`](/documentation/FoundationModels/Generable) type to use as the response format.

`metadata`

Metadata provided as part of this prompt.

`segments`

An array of segments that make up the prompt.

`options`

Options that control how tokens are sampled from the distribution the model produces.

`responseFormat`

A response format that describes the output structure.

`contextOptions`

Settings that configure how the model is prompted.

---

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)