Skip to main content
The Grounded Responses API brings Retrieval-Augmented Generation (RAG) to the Responses API. Send a standard Responses API request to the grounded endpoint, and the platform retrieves relevant passages from your uploaded content, injects them as context before generation, and tells you whether the answer was grounded — all in the same OpenAI-compatible request and response shape you already use.
If your integration is built on the chat-completions format, or you need intelligent auto-routing, tradition (values-aligned) responses, or citation metadata, use Grounded Completions on Completions V2. Grounded Responses is the grounding surface for the Responses API shape.

Endpoint

URL: https://platform.ai.gloo.com/ai/v1/grounded/responses Operation: POST
Authentication is identical to the rest of the platform — a Bearer access token from your Client ID / Client Secret. See Manage API Credentials.
You must have already uploaded content before grounding against your own publisher.

Request format

The request body is the Responses API requestmodel, input, instructions, stream, tools, and so on, unchanged — extended with three grounding parameters: Everything else works exactly as on POST /ai/v1/responses: direct model selection via model, string or typed-array input, instructions, max_output_tokens, tools, streaming, and the rest of the request parameters.

When no sources are found

Grounding never fails the request. If retrieval returns nothing — the publisher has no matching content, or no passage clears certainty_threshold — the model is given an explicit note that no publisher sources were retrieved, generation proceeds, and the response reports sources_returned: false. Check that flag (or the streaming header) whenever your product needs to distinguish grounded answers from ungrounded ones.

Response format

The response is standard Responses API output — a typed output[] array plus usage — with one addition: a top-level sources_returned boolean indicating whether retrieved sources grounded the generation.

Streaming

Set "stream": true to receive the same Server-Sent Events as the base Responses API (response.created, response.output_text.delta, response.completed, …) — see Responses API streaming for the event reference. Because the grounding outcome is known before the stream starts, it is delivered as an HTTP response header instead of a body field:

Code examples

The official OpenAI SDKs work by pointing the base URL at the grounded prefix — responses.create then posts to /ai/v1/grounded/responses. The SDKs forward the grounding parameters to the API even though they aren’t in the SDK types: in Python pass them via extra_body; in TypeScript include them top-level with a cast (the Node SDK has no extra_body — it would be sent as a literal field):

Grounded Responses vs. Grounded Completions

Both endpoints run the same retrieval pipeline against the same publisher content. Choose by the API shape and features you need:

Pricing

Grounded Responses is billed like the base Responses API — per token at the selected model’s standard rates, with no separate charge for retrieval. Note that injected sources count as input tokens, so grounded requests naturally carry larger prompts than their ungrounded equivalents; sources_limit is your main lever over that cost. See Responses API pricing.
  • Responses API — base request/response format, streaming events, multimodal
  • Grounded Completions — grounding on the chat-completions shape, with routing, tradition, and citations
  • Upload Content — get your publisher content into the platform
  • Search API — standalone RAG queries without generation