Grounded Completions
Generate grounded completions with intelligent routing and retrieval-augmented generation (RAG).
Documentation Index
Fetch the complete documentation index at: https://docs.gloo.com/llms.txt
Use this file to discover all available pages before exploring further.
Error Reference: Grounded Completions
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
Request body for the grounded completions endpoint. Exactly one routing mechanism (auto_routing, model, or model_family) must be specified. Messages are optional when omitted and default to a single user message of "Hello world!". An explicit empty messages array is invalid and returns 400.
Chat message history with role and content fields. If omitted, the current service defaults to one user message with content "Hello world!". Explicitly passing an empty array is invalid.
Enables intelligent model selection. Mutually exclusive with model and model_family.
Specific Gloo model identifier. Mutually exclusive with auto_routing and model_family.
Provider family for model selection. Mutually exclusive with auto_routing and model.
openai, anthropic, google, open source Publisher name to retrieve sources from. Defaults to GlooGrounded when omitted.
Number of sources to retrieve for grounding (1-10).
1 <= x <= 10Theological perspective to apply. Options: evangelical, catholic, mainline, not_faith_specific.
evangelical, catholic, mainline, not_faith_specific Enables streaming responses via server-sent events.
Sampling temperature controlling randomness.
0 <= x <= 2Maximum number of tokens to generate in the response.
x >= 1Function calling definitions.
Controls which tool (if any) the model should use.
none, auto, required Allow parallel tool execution.
Include citation metadata for sources utilized by RAG. For streaming responses, citations are prepended as the first SSE event before any content chunks.
Streaming options. Use include_usage=true with stream=true to receive a final usage event.
Response
Successful grounded completion response. If stream is false or omitted, the response is JSON. If stream=true, the response is a Server-Sent Events stream. Once streaming has started, failures are delivered as stream events rather than non-2xx HTTP responses. Content moderation ends the stream with a content_filter event. When include_citations=true and citations are available, the first stream event contains citations.
Response from the grounded completions endpoint.
Unique completion identifier.
Object type, always 'chat.completion'.
Unix timestamp of when the completion was created.
The model that was selected and used for the completion.
The model provider name.
Provider family of the selected model.
Indicates whether auto routing was used.
The routing method used: auto_routing, model_family, or direct_model_selection.
The performance tier assigned by the routing system.
Confidence score for the routing decision (0.0 to 1.0).
The theological perspective that was applied to the response.
Whether RAG was used to retrieve sources and ground the response.
Array of source citations used to ground the response. Only present when include_citations is true in the request.
List of completion choices.
Token consumption metrics.

