---
title: GeneratedContent
framework: foundationmodels
role: symbol
role_heading: Structure
path: foundationmodels/generatedcontent
---

# GeneratedContent

A type that represents structured, generated content.

## Declaration

```swift
struct GeneratedContent
```

## Mentioned in

Expanding generation with tool calling Generating Swift data structures with guided generation

## Overview

Overview Generated content may contain a single value, an array, or key-value pairs with unique keys.

## Topics

### Creating generated content

- [init(_:)](foundationmodels/generatedcontent/init(_:).md)
- [init(_:id:)](foundationmodels/generatedcontent/init(_:id:).md)
- [init(elements:id:)](foundationmodels/generatedcontent/init(elements:id:).md)
- [init(properties:id:)](foundationmodels/generatedcontent/init(properties:id:).md)
- [init(properties:id:uniquingKeysWith:)](foundationmodels/generatedcontent/init(properties:id:uniquingkeyswith:).md)
- [init(json:)](foundationmodels/generatedcontent/init(json:).md)
- [init(kind:id:)](foundationmodels/generatedcontent/init(kind:id:).md)
- [GeneratedContent.ParsingError](foundationmodels/generatedcontent/parsingerror.md)
- [null](foundationmodels/generatedcontent/null.md)

### Accessing the content

- [kind](foundationmodels/generatedcontent/kind-swift.property.md)
- [GeneratedContent.Kind](foundationmodels/generatedcontent/kind-swift.enum.md)
- [value(_:)](foundationmodels/generatedcontent/value(_:).md)
- [value(_:forProperty:)](foundationmodels/generatedcontent/value(_:forproperty:).md)
- [isComplete](foundationmodels/generatedcontent/iscomplete.md)
- [generatedContent](foundationmodels/generatedcontent/generatedcontent.md)
- [jsonString](foundationmodels/generatedcontent/jsonstring.md)
- [debugDescription](foundationmodels/generatedcontent/debugdescription.md)

### Identifying a generation

- [id](foundationmodels/generatedcontent/id.md)
- [GenerationID](foundationmodels/generationid.md)

## Relationships

### Conforms To

- [ConvertibleFromGeneratedContent](foundationmodels/convertiblefromgeneratedcontent.md)
- [ConvertibleToGeneratedContent](foundationmodels/convertibletogeneratedcontent.md)
- [CustomDebugStringConvertible](swift/customdebugstringconvertible.md)
- [Equatable](swift/equatable.md)
- [Generable](foundationmodels/generable.md)
- [InstructionsRepresentable](foundationmodels/instructionsrepresentable.md)
- [PromptRepresentable](foundationmodels/promptrepresentable.md)
- [Sendable](swift/sendable.md)
- [SendableMetatype](swift/sendablemetatype.md)

## See Also

### Structured output

- [Generating Swift data structures with guided generation](foundationmodels/generating-swift-data-structures-with-guided-generation.md)
- [Generable](foundationmodels/generable.md)
- [GenerationSchema](foundationmodels/generationschema.md)
- [DynamicGenerationSchema](foundationmodels/dynamicgenerationschema.md)
- [ConvertibleToGeneratedContent](foundationmodels/convertibletogeneratedcontent.md)
- [ConvertibleFromGeneratedContent](foundationmodels/convertiblefromgeneratedcontent.md)
