tradition for a theological perspective. You get curated foundational models, the best available without decision fatigue or unsafe defaults. Guardrails, moderation, and values alignment consider six dimensions of AI safety (Physical, Ethical, Emotional, Factual, Theological, and Security). Comparing endpoints? See Endpoint types for how to choose between guarded, direct, and grounded endpoints.
For new integrations, the Responses API (
POST /ai/v2/guarded/responses) runs this same guarded pipeline, including tradition, on the OpenAI-compatible Responses shape. Completions V2 remains fully supported and is the home of the routing, model_family, and grounded features below; use it when you need them.Prerequisites
You need:- A Gloo AI Studio account
- Your API key from the API Keys page
- Authentication setup - Complete the Authentication Tutorial first
Quick start
URL:https://platform.ai.gloo.com/ai/v2/guarded/chat/completions
Operation: POST
Choose how the model is selected
Completions V2 builds on the standard chat completions format and adds three ways to choose the model for each request: AI Select, AI Core Select and AI Core. Send exactly one of them. We recommend AI Select, naming the model you want, for most applications; the other two let Gloo choose for you when that suits your use case.1. Pinned model
AI Select (recommended): specify the exact model for your output:2. Model family
AI Core Select: specify a model provider (model_family) and let Gloo AI choose the model from within that group:
3. Auto-routing (opt-in)
AI Core: let Gloo AI analyze your query and choose a model:With auto-routing, the model can change between calls. Avoid it when you need reproducible output or consistent tool calls, and pin a
model instead.Request parameters
Sendmessages and exactly one routing mechanism: model, model_family, or auto_routing: true. Add tradition for a theological perspective.
For every parameter and response field, see the Completions V2 API reference.
Reasoning summaries
Withreasoning_effort set to a level other than none, a model that returns a summary carries it in choices[0].message.reasoning_content (or delta.reasoning_content chunks before the answer on a stream). Grounded Completions works the same way. For effort levels and which models return a summary, see Reasoning; for examples on every endpoint, see the Reasoning tutorial. New to reasoning models? Models That Think Before They Answer explains what reasoning is and when it helps.
Features
Tradition-Aware
Customize responses based on theological perspectives:"evangelical", "catholic", "mainline", "not_faith_specific", or omit for a general Christian perspective. The tradition value is sent with your request to steer the response; it is a prompt-level setting, not a guarantee of any particular doctrinal position. "not_faith_specific" requires an explicit model and cannot be combined with auto_routing or model_family.
Streaming Support
Get real-time responses for better UX (how streaming works):Tool Calling
Function calling works with all routing modes. Define tools in your request and the selected model invokes them as needed:- Multiple SDK examples (Python, TypeScript, AgentKit)
- Model compatibility and streaming support
- Multi-step tool workflows
- Best practices and patterns
Prompt Caching
Reduce costs and latency by caching prompt prefixes across requests. The caching type depends on your model provider:- Explicit caching (Anthropic): Add the
X-Cache-TTLheader to your request to opt in. System messages are automatically cached. - Implicit caching (OpenAI, DeepSeek): Caching is automatic for prompts with 1,024+ tokens. For OpenAI, you can optionally add
prompt_cache_keyto improve cache hit rates.
Response Metadata
The response is a standardchat.completion object with routing metadata added:
- All modes:
model(the Gloo model ID that handled the request),provider(always"Gloo AI"),model_family,auto_routing, androuting_mechanism(auto_routing,model_family, ordirect_model_selection). - Auto-routing and model family modes only:
routing_tierandrouting_confidence(0-1). They are not included with direct model selection, since no routing decision is made. - If set in the request:
tradition.
Best practices
Migrating from Completions V1
If you use the V1 completions endpoint (/ai/v1/chat/completions), here’s how to migrate to V2.
Coming from the retired Chat and Message API instead? Follow the Chat migration guide.
Endpoint Change
Request Parameter Changes
The main difference is how you specify model selection:
If you’re not specifying a model in V1, V1 used a fixed default model. V2 requires an explicit choice, so pin a model (the closest match to V1 behavior):
"auto_routing": true instead.
If you’re specifying a model in V1, you can continue using the model parameter in V2:
V1 Request:
New V2-Only Parameters
Response Changes
V2 responses include routing metadata that varies by routing mode; see Response Metadata. Example (auto-routing with tradition):routing_tier and routing_confidence are only included for auto-routing and model family modes. The tradition field is only included if specified in the request.Migration Checklist
- Update the endpoint URL from
/ai/v1/to/ai/v2/ - Add a routing mechanism to your request:
- Pin a model with
model(auto_routing: falseis optional) - Or use
model_familyto let Gloo select a model from a provider - Or opt in to
auto_routing: trueto let Gloo choose per request
- Pin a model with
- Update model IDs to V2-supported models
- (Optional) Add
traditionparameter for theology-aware responses - Update response handling to accommodate new metadata fields
Next steps
Step-by-step tutorial
Build with Completions V2 using code in six languages.
Grounded Completions
Ground answers in your own content.
Tool Use
Let models call your functions.
API Reference
Every request and response field, with a live playground.

