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
You must have already uploaded content before grounding against your own publisher.
Request format
The request body is the Responses API request —model, 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 clearscertainty_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 typedoutput[] 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.
Related Documentation
- 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

