<!--
{
  "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",
  "metadataVersion" : "0.1.0",
  "role" : "Structure",
  "symbol" : {
    "kind" : "Structure",
    "modules" : [
      "Foundation Models",
      "FoundationModels"
    ],
    "preciseIdentifier" : "s:16FoundationModels10TranscriptV6PromptV"
  },
  "title" : "Transcript.Prompt"
}
-->

# Transcript.Prompt

A prompt from the user to the model.

```
struct Prompt
```

## Overview

Prompts typically contain content sourced directly from the user,
though you may choose to augment prompts by interpolating content from
end users into a template that you control.

## Topics

### Creating a prompt

[`init(id: String, segments: [Transcript.Segment], options: GenerationOptions, responseFormat: Transcript.ResponseFormat?)`](/documentation/FoundationModels/Transcript/Prompt/init(id:segments:options:responseFormat:))

Creates a prompt.

[`init(id: String, metadata: [String : any ConvertibleToGeneratedContent], segments: [Transcript.Segment], options: GenerationOptions, responseFormat: Transcript.ResponseFormat?, contextOptions: ContextOptions)`](/documentation/FoundationModels/Transcript/Prompt/init(id:metadata:segments:options:responseFormat:contextOptions:))

Creates a prompt.

### Inspecting a prompt

[`var id: String`](/documentation/FoundationModels/Transcript/Prompt/id)

The identifier of the prompt.

[`var responseFormat: Transcript.ResponseFormat?`](/documentation/FoundationModels/Transcript/Prompt/responseFormat)

An optional response format that describes the desired output structure.

[`var segments: [Transcript.Segment]`](/documentation/FoundationModels/Transcript/Prompt/segments)

Ordered prompt segments.

[`var options: GenerationOptions`](/documentation/FoundationModels/Transcript/Prompt/options)

Generation options associated with the prompt.

[`var contextOptions: ContextOptions`](/documentation/FoundationModels/Transcript/Prompt/contextOptions)

Configuration of the prompt.

[`var metadata: [String : GeneratedContent]`](/documentation/FoundationModels/Transcript/Prompt/metadata)

Metadata provided as part of this prompt.

## Relationships

### Conforms To

[`Identifiable`](/documentation/Swift/Identifiable)

[`Sendable`](/documentation/Swift/Sendable)

[`Equatable`](/documentation/Swift/Equatable)

[`Copyable`](/documentation/Swift/Copyable)

[`SendableMetatype`](/documentation/Swift/SendableMetatype)

[`CustomStringConvertible`](/documentation/Swift/CustomStringConvertible)

[`Escapable`](/documentation/Swift/Escapable)

---

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)