Skip to main content
The NEAR AI Cloud Responses API is a stateless compatibility layer over Chat Completions. It keeps the OpenAI Responses request, output, and streaming shapes while leaving conversation state and custom-function execution under your application’s control. NEAR AI Cloud executes built-in web search during the request.
A request without built-in tools makes one Chat Completions inference. Built-in web search can use additional inference rounds within the request. NEAR AI Cloud does not store the raw request, response, output items, or conversation history for later retrieval.
store must be false. If you omit it, NEAR AI Cloud treats it as false.

Create a Response

Both streaming and non-streaming requests are supported. Responses include Cache-Control: no-store.

Manage Conversation History

There is no server-side conversation object and no previous_response_id continuation. For each new turn, send the relevant messages again:
Store this history in your application only for as long as your own data-handling policy requires. Repeated, byte-identical history prefixes can still benefit from prompt caching.

Use Client-Managed Functions

Responses accepts custom tools with type: "function". NEAR AI Cloud can ask for a function call, but it never executes that function or starts a server-side agent loop. The client-managed flow is:
  1. Send a stateless request with your function definitions.
  2. If the model requests a function, the response has status: "completed" and a function_call item in output. A streamed response ends with response.completed. Check output for function_call items rather than relying on status.
  3. Execute the function in your application.
  4. Send a new stateless request containing your message history, the returned function_call item, its matching function_call_output, and the same function definitions.
Echo the returned function_call item unchanged. This preserves provider-specific fields needed for the next inference. Include exactly one matching function_call_output later in the same request for each replayed call. Built-in web_search and web_context_search run on NEAR AI Cloud during the request. They do not require your application to execute a function or store response history. Add web_search to tools to let the model search; its optional count sets the maximum results per search. See Web Search for an example and the supported range.

Unsupported Features

The following Responses inputs return 400 invalid_request_error:
  • store: true
  • conversation
  • previous_response_id
  • background: true
  • input_file
  • Built-in file_search, code_interpreter, and computer tools
  • Remote mcp tools and MCP approval or tool-list continuation items
  • Image-generation or image-editing output models; use the Images endpoints instead
For server-side web search in Responses or Chat Completions, see Web Search. You can also expose search as a custom function and execute it in your application.

Retired APIs

The following stateful surfaces are no longer available:
  • /v1/conversations and all subpaths
  • /v1/files and all subpaths
  • GET and DELETE /v1/responses/{response_id}
  • POST /v1/responses/{response_id}/cancel
  • GET /v1/responses/{response_id}/input_items
Missing or invalid API keys receive 401 Unauthorized. Authenticated requests to a retired endpoint receive 410 Gone with migration guidance. Existing historical records and objects are not deleted by the API retirement. Their retention, export, or deletion is handled separately from the public inference contract.

Response IDs and Signatures

A stateless response still has a resp_ ID, but the ID does not refer to retrievable response history. For a completed response, NEAR AI Cloud attempts to store a gateway signature over request and response digests. Signature persistence is best-effort, so GET /v1/signature/resp_* is not guaranteed to succeed. Raw request and response content is not stored with that signature.