# createDataSetAndAddPieces

```ts
function createDataSetAndAddPieces(client, options): Promise<{
  statusUrl: string;
  txHash: `0x${string}`;
}>;
```

Defined in: [packages/synapse-core/src/warm-storage/data-sets.ts:281](https://github.com/FilOzone/synapse-sdk/blob/1d6c4b9fe34534bf1087dfe41491b72be0b46858/packages/synapse-core/src/warm-storage/data-sets.ts#L281)

Create a data set and add pieces to it

## Parameters

| Parameter | Type | Description |
| ------ | ------ | ------ |
| `client` | `Client`\<`Transport`, `Chain`, `Account`\> | The client to use to create the data set. |
| `options` | [`CreateDataSetAndAddPiecesOptions`](/reference/filoz/synapse-core/warm-storage/type-aliases/createdatasetandaddpiecesoptions/) | The options for the create data set. |

## Returns

[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<\{
  `statusUrl`: `string`;
  `txHash`: `` `0x${string}` ``;
\}\>

The response from the create data set on PDP API.