🤖 AI Summary
xAI has rolled out Live Search in the chat completions API, letting Grok-style chat models query live web, news, X (Twitter), and RSS sources directly instead of requiring you to orchestrate separate search and tool calls. The advanced agentic search capabilities that power Grok.com aren’t yet exposed in the Live Search API, but basic live-querying is available (off by default). This simplifies building real-time, citation-backed assistants while preserving user control over which sources are accessed; xAI disclaims liability for resulting content.
Technically, you enable Live Search by adding a search_parameters object to your chat request (even an empty {} to use defaults) and choosing mode: off/auto/on (auto lets the model decide). Return_citations is true by default and citations appear as a URL list (in the final stream chunk). You can constrain queries with from_date/to_date (ISO8601 or datetime objects), max_search_results (default 20), and a sources array (types: web, news, x, rss) with filters like allowed/excluded_websites (max 5), included/excluded_x_handles (max 10), and minimum post_favorite_count/post_view_count. One RSS link is supported; safe_search is on by default but can be disabled for web/news. Usage exposes the count of sources used (response.usage.num_sources_used). Pricing is usage-based: $25 per 1,000 sources ($0.025 per source), so consider cost vs. breadth of sources when designing queries.
Loading comments...
login to comment
loading comments...
no comments yet