DocsAPI ReferenceCookbookConsole
REST API Reference
Chat completions
Create new response
new
Retrieve previous response
new
Delete previous response
new
Messages (Anthropic compatible)
Image generations
API key
List models
Get model
List language models
Get language model
List image generation models
Get image generation model
Tokenize text
Get deferred chat completions
Completions (legacy)
Completions (Anthropic compatible - legacy)
gRPC Reference
Chat
Image
Models
Auth Service
Raw Sampling of a Language Model
Collections API Reference
Collection Management
Search in Collections
Files API Reference
List files
Batch upload files
Complete a batch upload file session and process uploaded files
Get file metadata
Delete a file
Update a file's metadata or content
Download a file
Initialize a file upload
Upload a file in chunks
Management API Reference
Accounts and Authorization
Billing Management
Audit Logs
new
Loading...

Collections API Reference

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