TL;DR
APIYI fully supports Grok’s official server-side search tools: use the Responses API (/v1/responses) with the web_search / x_search tools. grok-4.5 verifiably performs real searches and returns cited, current results. A default-group key works out of the box.
Verified Results (2026-07-13)
Quick Start
cURL
Python (OpenAI SDK)
X Search Example
Response Structure
Theoutput array contains, in execution order:
usage.server_side_tool_usage_details reports per-tool call counts (web_search_calls / x_search_calls / code_interpreter_calls / mcp_calls, etc.) — worth logging on your side for cost reconciliation.
Billing
A live-search Q&A has two cost components:x_search runs many rounds (24 searches in one measured Q&A), with correspondingly higher token injection and latency than web_search — estimate costs against your expected query volume. Both the search counts and
cached_tokens are self-auditable in the response usage.Notes
- Responses API only:
search_parameterson Chat Completions is gone (410) — don’t use it. - Latency expectations: ~12 s for web_search, ~45 s for x_search (measured; varies with task complexity). Set client timeouts ≥ 120 s.
- Cost control: constrain search behavior in the prompt (e.g. “search at most 2 times”) and monitor
server_side_tool_usage_details. - Verify real search happened: check the
outputarray forweb_search_call(or equivalent) items — an answer with body text but no search items came from training data, not the web.
Related Docs
Grok Overview
Model lineup, pricing, and capability matrix
Code Execution & MCP
The other two server-side tools on the Responses API
Cache Billing
The large input-token injections from search pair well with automatic caching
OpenAI Web Search
Web search usage for the GPT series, for comparison