# createPieceUrlPDP

> **createPieceUrlPDP**(`cid`, `pdpUrl`): `string`

Defined in: [packages/synapse-core/src/utils/piece-url.ts:34](https://github.com/FilOzone/synapse-sdk/blob/32f86959b0bf15557657ea412e31a0897440ca98/packages/synapse-core/src/utils/piece-url.ts#L34)

Create a piece URL for the PDP API

## Parameters

| Parameter | Type | Description |
| ------ | ------ | ------ |
| `cid` | `string` | The PieceCID identifier |
| `pdpUrl` | `string` | The PDP URL |

## Returns

`string`

The PDP URL for the piece

## Example

```ts
const pdpUrl = 'https://pdp.example.com'
const cid = 'bafkzcibcd4bdomn3tgwgrh3g532zopskstnbrd2n3sxfqbze7rxt7vqn7veigmy'
const pieceUrl = createPieceUrlPDP(cid, pdpUrl)
console.log(pieceUrl) // https://pdp.example.com/piece/bafkzcibcd4bdomn3tgwgrh3g532zopskstnbrd2n3sxfqbze7rxt7vqn7veigmy
```