<!--
{
  "documentType" : "article",
  "framework" : "FoundationModels",
  "identifier" : "/documentation/FoundationModels/transcripts",
  "metadataVersion" : "0.1.0",
  "role" : "collectionGroup",
  "title" : "Transcripts"
}
-->

# Transcripts

Inspect a session’s history and work with the entries, segments, and
attachments it contains.

## Overview

A [`Transcript`](/documentation/FoundationModels/Transcript) is a linear history of everything exchanged with a
[`LanguageModelSession`](/documentation/FoundationModels/LanguageModelSession). It includes the instructions that define the model’s
behavior, the prompts you send, the model’s responses and reasoning, and any
tool calls made along the way. It’s what the session uses as context, and it’s
what you inspect, trim, or pass to a new session to manage the context window.

The history contains a three-level hierarchy:

- **entry**: A single item in the history that represents a role in the
  conversation, such as a prompt or a response.
- **segment**: The smallest unit of content within a content-bearing
  entry. An entry holds its content as an array of segments, which may be
  plain text, schema-shaped structured content, an attachment, or your own
  custom content.
- **attachment**: The nontext payload, such as an image, that an
  attachment segment carries.

To present or analyze a transcript, iterate its entries and switch over the
segment cases to handle each kind of content.

## Topics

### Essentials

[Inspecting session transcripts and reporting model feedback](/documentation/FoundationModels/inspecting-session-transcripts-and-reporting-model-feedback)

Review session history to display the conversation in your app’s UI, manage
the context window, or diagnose and report unexpected model output.

[`struct Transcript`](/documentation/FoundationModels/Transcript)

A linear history of entries that reflect an interaction with a session.

### Transcript entries

[`enum Entry`](/documentation/FoundationModels/Transcript/Entry)

An entry in a transcript.

[`struct Instructions`](/documentation/FoundationModels/Transcript/Instructions)

Instructions you provide to the model that define its behavior.

[`struct Prompt`](/documentation/FoundationModels/Transcript/Prompt)

A prompt from the user to the model.

[`struct Response`](/documentation/FoundationModels/Transcript/Response)

A response from the model.

[`struct Reasoning`](/documentation/FoundationModels/Transcript/Reasoning)

A reasoning entry from the model.

### Segments

[`enum Segment`](/documentation/FoundationModels/Transcript/Segment)

The types of segments that may be included in a transcript entry.

[`struct TextSegment`](/documentation/FoundationModels/Transcript/TextSegment)

A segment containing text.

[`struct StructuredSegment`](/documentation/FoundationModels/Transcript/StructuredSegment)

A segment containing structured content.

[`struct AttachmentSegment`](/documentation/FoundationModels/Transcript/AttachmentSegment)

A segment containing attached files or images.

### Attachments

[`enum Attachment`](/documentation/FoundationModels/Transcript/Attachment)

The types of attached content.

[`struct ImageAttachment`](/documentation/FoundationModels/Transcript/ImageAttachment)

An image attachment in a transcript entry.

### Tool calls

[`struct ToolDefinition`](/documentation/FoundationModels/Transcript/ToolDefinition)

A definition of a tool.

[`struct ToolCalls`](/documentation/FoundationModels/Transcript/ToolCalls)

A collection of tool calls generated by the model.

[`struct ToolCall`](/documentation/FoundationModels/Transcript/ToolCall)

A tool call generated by the model containing the name of a tool and arguments to pass to it.

[`struct ToolOutput`](/documentation/FoundationModels/Transcript/ToolOutput)

A tool output provided back to the model.

### Output formatting

[`struct ResponseFormat`](/documentation/FoundationModels/Transcript/ResponseFormat)

A response format that the model must conform its output to.



---

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)