DocsAPI ReferenceCookbookConsole
gRPC Reference
Chat
Image
Batch Management
new
Models
Auth Service
Raw Sampling of a Language Model
REST API Reference
Create new response
Retrieve previous response
Delete previous response
Chat completions
Messages (Anthropic compatible - deprecated)
Image generations
Image edits
new
Video generations
new
Video edits
new
Get video generation results
new
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
Create a new batch
new
List batches
new
Get batch
new
List batch requests in a batch
new
Add batch requests to a batch
new
Get processing results of a batch
new
Cancel processing on a batch
new
Completions (legacy)
Completions (Anthropic compatible - deprecated)
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