Skip to main content
POST
/
ai
/
v2
/
chat
/
completions
/
grounded
curl --request POST \
  --url https://platform.ai.gloo.com/ai/v2/chat/completions/grounded \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "messages": [
    {
      "role": "user",
      "content": "What are practical ways to build stronger community in a local church?"
    }
  ],
  "auto_routing": true,
  "sources_limit": 3,
  "tradition": "evangelical"
}
'
{
  "id": "gen-1769792268-xTKWyq7A9HmEhxzDsAJj",
  "object": "chat.completion",
  "created": 1769792268,
  "model": "gloo-anthropic-claude-sonnet-4.5",
  "provider": "Gloo AI",
  "model_family": "Anthropic",
  "auto_routing": true,
  "routing_mechanism": "auto_routing",
  "routing_tier": "tier_3",
  "routing_confidence": 0.782,
  "tradition": "evangelical",
  "sources_returned": true,
  "choices": [
    {
      "finish_reason": "stop",
      "index": 0,
      "message": {
        "content": "Based on the retrieved sources, here are practical ways to build stronger community...",
        "role": "assistant"
      }
    }
  ],
  "usage": {
    "completion_tokens": 592,
    "prompt_tokens": 2137,
    "total_tokens": 2729
  }
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json

Request body for the grounded completions endpoint. Exactly one routing mechanism (auto_routing, model, or model_family) must be specified.

messages
LlmMessage · object[]
required

Chat message history with role and content fields.

auto_routing
boolean

Enables intelligent model selection. Mutually exclusive with model and model_family.

model
string

Specific Gloo model identifier. Mutually exclusive with auto_routing and model_family.

model_family
enum<string>

Provider family for model selection. Mutually exclusive with auto_routing and model.

Available options:
openai,
anthropic,
google,
open source
rag_publisher
string
default:GlooGrounded

Publisher name to retrieve sources from. Defaults to GlooGrounded when omitted.

sources_limit
integer
default:3

Number of sources to retrieve for grounding (1-10).

Required range: 1 <= x <= 10
tradition
enum<string>

Theological perspective to apply. Options: evangelical, catholic, mainline, not_faith_specific.

Available options:
evangelical,
catholic,
mainline,
not_faith_specific
stream
boolean
default:false

Enables streaming responses via server-sent events.

temperature
number
default:0.7

Sampling temperature controlling randomness.

Required range: 0 <= x <= 2
max_tokens
integer

Maximum number of tokens to generate in the response.

Required range: x >= 1
tools
Tool · object[]

Function calling definitions.

tool_choice
default:none

Controls which tool (if any) the model should use.

Available options:
none,
auto,
required
parallel_tool_calls
boolean
default:true

Allow parallel tool execution.

Response

Successful grounded completion response

Response from the grounded completions endpoint.

id
string

Unique completion identifier.

object
string
default:chat.completion

Object type, always 'chat.completion'.

created
integer

Unix timestamp of when the completion was created.

model
string

The model that was selected and used for the completion.

provider
string

The model provider name.

model_family
string

Provider family of the selected model.

auto_routing
boolean

Indicates whether auto routing was used.

routing_mechanism
string

The routing method used: auto_routing, model_family, or direct_model_selection.

routing_tier
string

The performance tier assigned by the routing system.

routing_confidence
number

Confidence score for the routing decision (0.0 to 1.0).

tradition
string

The theological perspective that was applied to the response.

sources_returned
boolean

Whether RAG was used to retrieve sources and ground the response.

choices
CompletionsV2Choice · object[]

List of completion choices.

usage
CompletionsV2Usage · object

Token consumption metrics.