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

# Create a set

> POST /v1/sets: store a list of addresses or topics and get an id to use in filters.

```http theme={null}
POST https://api.bloklake.com/v1/chains/{chain}/v1/sets
Authorization: Bearer <key>
Content-Type: application/json
```

Creates a set, or finds the existing one with the same values. The id is a hash of the sorted,
deduplicated values, so this call is idempotent. See [Sets](https://docs.bloklake.com/querying/sets.md).

## Body

**kind** `string` *required*

`"address"` (20-byte values) or `"topic"` (32-byte values).

**values** `string[]` *required*

`0x` hex values of the kind's width. Up to 100,000. Duplicates and order don't matter.

**basedOn** `string`

The id of the set this one grows from. A performance hint: it lets the server work out the new
set's matches incrementally. Always pass it when you add values to an existing set.

## Example

```bash theme={null}
curl https://api.bloklake.com/v1/chains/eth/v1/sets \
  -H "Authorization: Bearer $BLOKLAKE_API_KEY" -H 'content-type: application/json' \
  -d '{"kind": "address", "values": ["0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48", "0xdac17f958d2ee523a2206206994597c13d831ec7", "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2"]}'
```

```json theme={null}
{"set_id": "0x2cab7d92e0aa08ea29ffe92cf95896a794a369e5e180e174299c1c958b4a1178", "size": 3, "created": true}
```

## Response

**set\_id** `string`

The set's id. Use it as `addressSet`, `topic0Set`…`topic3Set`, `fromSet` or `toSet`.

**size** `integer`

Number of distinct values.

**created** `boolean`

`false` if a set with the same values already existed.

## Notes

* Sets belong to your project and to this chain. Create them on each chain you use.
* Unused for 7 days, a set is deleted. Re-create it any time: same values, same id.
* 50 sets and 50 MiB per project. Past that, the project's least recently used sets that have
  been idle for 10 minutes or more are deleted to make room; if every set was used more
  recently, `403 quota_exceeded`.
* Up to 1,000,000 values created per minute per project; past that, `429 set_rate_limited`
  with `Retry-After`.
* 100,000 addresses is about 4.6 MB of JSON.


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