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

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

Creates a prompt.

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

## Parameters

`id`

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

`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.

---

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)