Collections API
Search in Collections
The base url for searching collections is shared with REST API at https://api.x.ai. You have to authenticate using xAI API Key with the header Authorization: Bearer <your xAI API key>.
Search content in a collection
/v1/documents/search
Search for content related to the query within the given collections.
Request Body
query
string
required
The query to search for which will be embedded using the same embedding model as the one used for the source to query.
source
object
required
DocumentsSource defines the source of documents to search over.
Response Body
matches
array
The search matches.
Did you find this page helpful?