#### Collections API

# Collections REST API Overview

The Collections API allows you to manage your Collections `documents` and `collections` programmatically.

The base url for `collection` management is shared with [Management API](/developers/rest-api-reference/management) at `https://management-api.x.ai/v1/`. You have to authenticate using **xAI Management API Key** with the header `Authorization: Bearer <your xAI Management API key>`.

> [!NOTE]
>
> For more details on provisioning xAI Management API key and using Management API, you can visit
>
> [Using Management API](/developers/management-api-guide)
>
> .

The base url for searching within `collections` is shared with [REST API](/developers/rest-api-reference) at `https://api.x.ai`. You have to authenticate with the header `Authorization: Bearer <your xAI API key>`.

* [Collection Management](/developers/rest-api-reference/collections/collection)
* [Search in Collections](/developers/rest-api-reference/collections/search)
