FoundationModels · IOS API REFERENCE
Attachment
struct · iOS 27.0+ · SDK 27.1
struct Attachment<Content>An asset provided to the model. Use `Attachment` to include media such as images alongside text in your prompts and instructions. ```swift let response = try await session.respond { "Describe this image:" Attachment(image) } ``` Use the ``label(_:)`` method to assign a label to an attachment. Labels help the model identify specific attachments when making tool calls. ```swift Prompt { "Compare these two images:" Attachment(firstImage) .label("image-0") Attachment(secondImage) .label("image-1") } ```
Members (0)
This type has no directly callable members in this snapshot. See the framework’s skipped declarations for unsupported APIs.
Skipped declarations
No declarations were skipped in this snapshot.