---
title: Transcript.DataAttachment
framework: Foundation Models
role: symbol
role_heading: Structure
platforms: [iOS 27.2+, iPadOS 27.2+, Mac Catalyst 27.2+, macOS 27.2+, visionOS 27.2+, watchOS 27.2+]
path: foundationmodels/transcript/dataattachment
---

# Transcript.DataAttachment

A data attachment payload in a serialized, portable format.

## Declaration

```swift
struct DataAttachment
```

## Overview

Overview A Transcript.DataAttachment records the bytes and identifier of a value that a LanguageModel implementation opted into via supportsDataAttachmentType(_:). It’s what a DataAttachmentRepresentable-conforming type produces from its transcriptRepresentation, and it round-trips through the transcript’s Codable conformance so the transcript remains portable even in environments where the declaring package isn’t installed.

## Topics

### Initializers

- [init(contentType:content:metadata:)](foundationmodels/transcript/dataattachment/init(contenttype:content:metadata:).md)

### Instance Properties

- [content](foundationmodels/transcript/dataattachment/content.md)
- [contentType](foundationmodels/transcript/dataattachment/contenttype.md)
- [metadata](foundationmodels/transcript/dataattachment/metadata.md)

## Relationships

### Conforms To

- [Equatable](swift/equatable.md)
- [Sendable](swift/sendable.md)
- [SendableMetatype](swift/sendablemetatype.md)
