> ## Documentation Index
> Fetch the complete documentation index at: https://docs.galtea.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Link Datasets

> Link datasets to a specification.

> [!WARNING]
>
> You are reading the docs of Galtea 5.14. [Read this page in the latest version](https://docs.galtea.ai/sdk/api/specification/link-datasets.md).

## Example

```python theme={"system"}
galtea.specifications.link_datasets(
    specification_id=accuracy_specification.id,
    dataset_ids=[dataset_id],
)
```

## Parameters

**specification\_id** `string` *required*

The ID of the specification to link datasets to.

**dataset\_ids** `list[string]` *required*

List of dataset IDs to link to the specification.

Every dataset must belong to the same product as the specification, and its type must match the
specification's dataset type. A dataset of another type is rejected, the same way creating one from
a specification rejects a type that disagrees.

> [!NOTE]
>
> Linking adds this specification to each dataset and keeps the specifications it already links to. A
> dataset can link to several specifications of its product, and a run of one specification scores it
> only with that specification's metrics. Linking a dataset that is already linked changes nothing.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.