In short.
The xAI API Tools Overview is an introductory guide for developers adding search and actions to Grok applications, but exact costs and detailed implementation constraints are absent. It distinguishes tools executed by the service from custom functions handled by your application. Five examples show streaming requests through SDKs or HTTP, using grok-4.7 as the example model. The page helps explain the integration choices; complete custom-function handling, operational limits and commercial terms require further documentation. No code or API requests were executed.
Researched and written by an AI model and checked by a second AI model. How it works
Coverage includes the complete selected documentation page at [https://docs.x.ai/developers/tools/overview.md]: both tool categories, the pricing explanation, execution sequence, all five quick-start examples, citation guidance and next-step links. Linked pricing, tool-specific, function-calling and citation pages are excluded; their contents and notices were not assessed. The supplied page has no explicit redistribution licence or separately packaged library file. No code or API requests were executed.
The overview
Identity
This is the xAI API documentation page about tools, available at [https://docs.x.ai/developers/tools/overview.md]. It teaches how Grok applications can request information or actions beyond generating text. The resource is documentation with embedded examples, rather than an installable tool or model.
Assessment
The page is useful for understanding the difference between hosted tools and custom function calls, and for seeing the basic shape of a streaming request. Its main practical gap is depth: it does not provide complete custom-function handling, detailed tool schemas or operational limits. It supports an initial integration decision, but does not establish reliability, performance or production readiness.
Users
The guide suits developers building Grok applications that need current information, calculations, document retrieval or application-specific actions. Beginners get a short explanation of the tool-call cycle; experienced developers get examples for several clients. Readers still need familiarity with API credentials, programming and streamed responses to adapt the snippets.
Capabilities
The page lists hosted tools for web search and browsing, searching X posts and accounts, running Python in a sandbox, generating or editing images, and searching uploaded documents. Custom functions can connect model requests to database queries, external APIs or business logic.
The quick-start examples enable web search, X search and code execution. Image generation, document search and custom functions are described or linked, but their implementations are not demonstrated here. The API is documented as returning source URLs for information gathered through tools where applicable.
Using it
Requirements
The examples require an xAI API credential, referenced through XAI_API_KEY, and access to the API. Client choices include the JavaScript packages ai and @ai-sdk/xai, the OpenAI SDK in Python or JavaScript, the xai_sdk Python module, or curl.
The snippets name grok-4.7. The page does not establish the full model compatibility list, account eligibility, regional availability, required runtime versions or dependency versions. Custom functions also require application code to implement the requested operations.
Mechanism
An application supplies available tools with its request. The model decides whether to request a tool or answer directly, processes returned information, and can continue making calls before producing its final response.
Hosted tools execute on the provider's servers. For custom functions, the model returns a request for the application to handle. Defining a function therefore does not itself implement the database query or business action. The page describes this distinction but does not show the complete custom-function exchange.
Setup
Choose one documented client and make the xAI credential available as XAI_API_KEY. The OpenAI SDK examples configure the base URL as [https://api.x.ai/v1], then create a streaming Responses request. The curl example sends the request to [https://api.x.ai/v1/responses].
Those examples set the model to grok-4.7 and declare web_search, x_search and code_interpreter. The AI SDK and native xAI SDK examples use their own helper functions, including codeExecution() or code_execution(). Package installation instructions and version pins are not supplied.
Example
The sample task asks for recent updates about SpaceXSI while making web search, X search and code execution available. The model decides which available tools to use; declaring all three does not establish that every request invokes all three.
The OpenAI SDK examples print response.output_text.delta events. The AI SDK example also handles URL source events, while the native xAI Python example accesses response.citations. No response transcript or execution result is supplied, and none of these examples was run for this report.
Assessment & evidence
Limitations
The overview does not specify rate limits, maximum tool-call counts, timeouts, retry behavior, sandbox restrictions, document limits or detailed error handling. Its snippets also do not demonstrate custom-function result submission or recovery from failed tool calls.
Search accuracy, citation completeness, code-execution behavior, latency and SDK compatibility were not assessed. The presence of citation URLs does not by itself establish that an answer accurately represents its sources.
Reasoning
The documented execution split suggests a practical choice: hosted tools can reduce the tool-execution code an application must maintain, while custom functions let the application implement its own operations. This is an architectural inference from the described mechanism, not a measured productivity benefit.
Because the model chooses whether to call tools and may make several calls, tool use and cost can vary between tasks. The page explains that flexibility but supplies no measurements of its effects.
Alternatives
Within the page, the main functional choice is between hosted tools and custom functions. The integration choices are the AI SDK, OpenAI SDK, native xAI Python SDK and direct HTTP. These are different access routes to the documented service, not demonstrated differences in model quality.
The page does not compare competing providers, local execution systems or other learning resources. Their relative costs, capabilities and suitability cannot be determined from this evidence.
Evidence
The evidence is the complete page at [https://docs.x.ai/developers/tools/overview.md], captured on 2026-11-14 at 03:41:08.971 UTC. Its source SHA-256 is 4454ac7fb13009472a45550f4cd29bf7800dcf146b6ae85c65645077d13a2da8.
This is first-party explanatory documentation containing examples, rather than runtime results or an independent evaluation. It supports descriptions of the advertised interface and workflow; it does not establish observed performance or successful execution.
Access & freshness
Costs
The page says charges combine token usage and tool invocations. A single query can trigger multiple tool calls, so its cost cannot be inferred from the number of user messages alone.
Exact token rates, invocation prices, allowances and spending controls are unknown from this page. It links to [https://docs.x.ai/developers/pricing#tools-pricing], but that page's contents are outside the supplied evidence. No request cost was measured.
Rights
The supplied page contains no explicit licence for redistributing its documentation or snippets. SDK licences, API contractual terms, output ownership and rights governing retrieved material are not established here. Data retention and privacy terms are also absent. Public access to the documentation does not establish those permissions.
Freshness
The capture date establishes when this page snapshot was obtained. The supplied text includes no publication date, last-updated timestamp or pinned SDK versions. Its use of grok-4.7 is an example identifier, not proof of current availability or the latest model release. Availability, compatibility and pricing after capture remain unverified.
Actions
Use this overview to choose a client and identify whether the task needs a hosted tool or an application-defined function. Before implementation, consult the relevant tool reference for its schema and constraints, and confirm model availability and applicable prices.
For an initial trial, adapt one documented request, inspect streamed text and citation data, and record actual token usage and tool invocations. For custom functions, continue with [https://docs.x.ai/developers/tools/function-calling] to obtain the missing invocation-handling details. These are suggested next steps; no trial has been performed.
