Collections API Reference
Collection Management
The base URL for collection management is shared with Management API at https://management-api.x.ai/.
You have to authenticate using xAI Management API Key with the header Authorization: Bearer <your xAI Management API key>.
For more details on provisioning xAI Management API key and using Management API, you can visit
Create a collection
/v1/collections
List all collections
/v1/collections
Get metadata of a collection
/v1/collections/{collection_id}
Delete a collection
/v1/collections/{collection_id}
Update a collection's configuration
/v1/collections/{collection_id}
Add existing document to a collection
/v1/collections/{collection_id}/documents/{file_id}
List documents in a collection
/v1/collections/{collection_id}/documents
Retrieve document metadata
/v1/collections/{collection_id}/documents/{file_id}
Regenerate indices for given document
/v1/collections/{collection_id}/documents/{file_id}
Remove document from a collection
/v1/collections/{collection_id}/documents/{file_id}
Batch get document's metadata
/v1/collections/{collection_id}/documents:batchGet