# Types.CreateDatasetInput

Input type describing one Document AI dataset to create.

> Kind: Apex type · Updated: 2026-10-05

Custom Apex type representing one input entry for Client.createDataset().

## Fields

### Fields
| Parameter | Type | Required | Description |
|---|---|---|---|
| datasetId | String | optional | Id of an existing dataset to build on. The new dataset holds that dataset's sources plus the files in resources. Set only by the five-argument constructor. |
| name | String | required | Name of the dataset. |
| description | String | optional | Description of the dataset. |
| resources | List&lt;<a href="#/apex-type-resource">Resource</a>&gt; | optional | The files to add to the dataset. Each needs its Id and library, and its drive Id where the library uses drives. The type defaults to file, and the name is looked up when you leave it blank. |
| context | String | optional | Any text you want back on the Dataset Created event, for example the Id of the record the dataset belongs to. |

## Constructors

```apex
global CreateDatasetInput(
  String name,
  String description,
  List<Resource> resources
)
```

```apex
global CreateDatasetInput(
  String name,
  String description,
  List<Resource> resources,
  String context
)
```

```apex
global CreateDatasetInput(
  String datasetId,
  String name,
  String description,
  List<Resource> resources,
  String context
)
```
