AI Briefing
KO

Grok Collections API

·2025.12.22 00:00

Key point

xAI released the Collections API for file upload and search.

Details

xAI has released the Collections API, integrated directly into its API. It allows developers to upload various files such as PDFs, Excel files, and codebases to build a knowledge base, and to build RAG applications without separate indexing or search infrastructure.

For the first week, file indexing and storage are free, and search is offered at a flat rate of $2.50 per 1,000 calls.

The key features are as follows.

  • Document understanding: Extracts text using OCR and layout-aware parsing, preserving PDF layouts, Excel table structures, and code syntax.
  • File management: Supports upload, update, and download, and automatically re-indexes when files change to keep collections up to date.
  • Broad format support: Supports a wide range of file formats, with the full list available in the documentation.

Search methods can be chosen to fit the use case.

  • Semantic search: Searches based on the meaning and intent of the question
  • Keyword search: Searches focused on exact term matching
  • Hybrid search: Combines semantic search and keyword search

xAI emphasized strong search performance on real-world RAG tasks in the finance, legal, and coding domains. In its internal Accuracy benchmark, it presented 93.0 for financial tabular and numerical questions, 73.9 for legal complex reasoning, and 86 for coding code understanding and large file systems. The comparison targets were Google Gemini Pro 3 and OpenAI GPT 5.1, with xAI showing an advantage in the finance and coding categories, while Gemini Pro 3 was slightly higher in the legal category.

It also introduced evaluations using financial analysis, LegalBench, and DeepCodeBench, explaining that accurate context retrieval is especially important in fields with long documents and many complex cross-references. On data privacy, it stated that user data stored in Collections is not used for model training unless the user consents.

Developers can create a collection and upload documents using xai_sdk, then call hybrid-mode search either through the collections_search tool or directly via the POST /v1/documents/search API.

This summary was generated automatically by AI. Check the original for the author's claims and context. Copyright belongs to the original author.

Our guide explains how the AI works. Report summary errors, attribution issues, or removal requests via Contact.