/v1/services endpoint.
Chat Completions API
web_context_search is also available on /v1/chat/completions. It requires stream: true:
delta.tool_callschunks show the model composing its search query (function nameweb_context_search)- a
delta.nearai_tool_resultchunk carries the search results that were injected back into the model’s context - regular
delta.content(anddelta.reasoning_content) chunks stream the final answer
Unlike client-side function calling, you never receive a
finish_reason: "tool_calls" response that you have to answer — the search loop runs entirely server-side, on infrastructure operated by NEAR AI.See Also
- Stateless Responses — client-managed functions and unsupported built-in tools
- OpenAI Compatibility — SDK setup
- Prompt Caching — search context benefits from cache-read pricing on repeated turns