Add xAI Tools to OCI Responses API
- Services: Generative AI
- Release Date: May 29, 2026
OCI Generative AI now supports xAI-compatible tools with xAI models through the OCI Responses API. These tools enable models to access real-time data, analyze external content, and perform computations as part of agent workflows.
Although xAI models are accessed through the OCI Responses API, which is compatible with the OpenAI Responses API, the supported tools are provided by xAI and use xAI-specific tool settings and limits.
- Supported xAI-Compatible Tools
-
- Web Search (
web_search): Search the internet in real time and extract information from web pages. Example use case: competitive intelligence, such as tracking recent competitor launches, pricing changes, partnerships, and market movement. - X Search (
x_search): Search posts, users, and threads on X (formerly Twitter). Example use case: monitoring customer and market signals, such as sentiment, product complaints, and emerging trends from selected X handles. - Code Execution (
code_interpreter): Run Python code for calculations, data analysis, and other compute tasks. Example use case: financial and business analysis, such as retrieving live data, running calculations, and generating computed summaries or scenario comparisons.
- Web Search (
- Key Features
-
- Real-time data access: Retrieve and analyze live web and social media content.
- Code execution: Run Python code within the Responses API for computation and data processing.
- Citations support: Web Search and X Search can return source URLs through
response.citationsfor traceability. - xAI tool settings and limits: Use xAI-specific options and limits instead of OpenAI tool settings.
- Domain and handle controls: Filter search results by allowed or excluded domains or X handles.
- Multimodal understanding: Analyze images and videos returned by search tools when enabled.
- Cross-tool behavior: Enabling image understanding for Web Search also applies to X Search when both tools are used in the same request.
- Web Search Tool Highlights
-
- Supports filtering by allowed or excluded domains.
- Supports image understanding for analyzing images found during search.
- Uses xAI limits, which may differ from OpenAI tool limits.
- X Search Tool Highlights
-
- Supports filtering by allowed or excluded X handles.
- Supports date-based filtering.
- Supports image and video understanding.
For supported models, regions, and examples, see xAI-Compatible Tools. For information about the service, see the Generative AI documentation.