Skip to main content
The Gloo Completions V2 API utilizes our Flourishing Engine architecture, a layered, production-ready AI architecture that embeds values, safety, and care directly into today’s best models before, during, and after use.

Flourishing Engine Features

The Flourishing Engine is designed as an AI infrastructure and system that serves human flourishing.
  • Curated Foundational Models: Access the best foundational models available without decision fatigue or unsafe defaults.
  • Safe & Values-Aligned: Values alignment and AI safety is evaluted at every layer of the input and output, considering six dimensions of AI safety (Physical, Ethical, Emotional, Factual, Theological, and Security)
  • Intelligent Routing: Optional automatic model routing optimizes your outputs for quality, cost, and intent.

Why Completions V2?

Completions V2 builds on the standard chat completions format you already know, but adds three powerful routing mechanisms to help you get the best performance for every query.

Choose your Routing Strategy

Routing ModeBest ForHow It Works
AI CoreGeneral chat, customer support, content generationAnalyzes each query and automatically selects the optimal model tier (speed vs. capability)
AI Core SelectProvider preference, testing across model familiesSpecify a provider (OpenAI. Anthropic, Gemini, Open Source) and let Gloo AI pick the best model from that family
AI SelectFull control, benchmarking, specialized tasksExplicitly choose a specific model such as gloo-openai-gpt-5-mini or gloo-anthropic-claude-haiku-4.5

1. AI Core (Auto-Routing) [Recommended]

Let Gloo AI analyze your query and choose the best model automatically:
{
	"messages": [
	 { "role": "user", "content": "How does the Old Testament connect to the New Testament?" }
	],
	"auto_routing": true,
	"stream": false
}
This is ideal when you prefer a provider but still want Gloo’s optimized choice across speed, utility, and reasoning without manual comparison.

2. AI Core Select (Model Provider Selection)

Use AI Core Select if you want to use a specific provider (model_family) but want Gloo AI to optimize your output by choosing the model from within that group.
{
  "messages": [
    { "role": "user", "content": "Draft a sermon" }
  ],
  "model_family": "anthropic",
  "auto_routing": false
}

3. AI Select (Direct Model Choice)

Specify the exact model for your output.
{
  "messages": [
    { "role": "user", "content": "Summarize this article" }
  ],
  "model": "gloo-google-gemini-2.5-pro",
  "auto_routing": false
}
Choose a specific model directly for benchmarking, specialized workflows, or strict reproducibility. You can view supported model ids for this endpoint on this page.

Additional Features

Completions V2 isn’t just about routing—it’s designed to support the broader goal of values-aligned AI that is safe, intelligent, and production-ready.

Denomination-Aware

Customize responses based on theological perspectives:
{
  "messages": [
    { "role": "user", "content": "Who is the Holy Spirit?" }
  ],
  "auto_routing": true,
  "denomination": "evangelical"
}
Supported: "evangelical", "catholic", "mainline", or omit for a general Christian perspective

Streaming Support

Get real-time responses for better UX:
{
  "messages": [...],
  "auto_routing": true,
  "stream": true
}

Tool Calling

Function calling works seamlessly with all routing modes:
{
  "messages": [...],
  "model": "gloo-openai-gpt-5-pro",
  "tools": [
    {
      "type": "function",
      "function": {
        "name": "get_weather",
        "description": "Get current weather",
        "parameters": {...}
      }
    }
  ],
  "tool_choice": "auto"
}

Prerequisites

Before starting, ensure you have: URL: https://platform.ai.gloo.com/ai/v2/completions Operation: POST

Example CURL Request:

curl -X 'POST' \
  'https://platform.ai.gloo.com/ai/v2/completions' \
  -H 'accept: application/json' \
  -H 'Authorization: Bearer ${ACCESS_TOKEN}' \
  -H 'Content-Type: application/json' \
  -d '{
  "messages": [
    {
      "role": "user",
      "content": "How does the Hebrew term 'ruach' in Genesis 1:2 affect translation?"
    }
  ],
  "denomination": "evangelical",
  "auto_routing": true
}'

Request Parameters

ParameterTypeRequired?Description
messagesarrayYesChat message history
auto_routingbooleanConditionalEnable smart routing
modelstringConditionalGloo model id
model_familystringConditionalProvider family (openai, anthropic, google, open source)
denominationstringNoTheological Perspective
streambooleanNoEnable streaming (default: false)
temperaturefloatNoSampling temperature (0.0-2.0)
max_tokensintegerNoMaximum response length
toolsarrayNoFunction calling definitions
Exactly one routing mechanism must be specified: auto_routing, model, or model_family

Response Metadata

{
  "id": "chatcmpl-xyz",
  "object": "chat.completion",
  "created": 1733184562, 
  "model": "gloo-deepseek-chat-v3.1",
  "routing_mechanism": "auto_routing",
  "routing_tier": "tier_4",
  "routing_confidence": 0.87,
  "denomination": "evangelical",
  "provider": "Gloo AI", 
  "choices": [...],
  "usage": {...}
}