Skip to main content
Direct Completions is the OpenAI-compatible Chat Completions format on a direct endpoint: your request goes straight to the model you name, and Gloo adds nothing between your prompt and the provider. Direct endpoints bill the model’s published rate (see the Models page and GET /platform/v2/models). Coming from another gateway? Direct endpoints cost what you would pay going straight to the model providers. Use it when you already have tooling built on the Chat Completions request shape and your application owns its own safety and prompting. If you’re starting fresh, prefer Direct Responses: equally direct, with a more capable request shape and first-class vision and image generation. For Gloo’s guarded pipeline (guardrails, output moderation, values-alignment (tradition), model_family selection, auto-routing), use Completions instead. The two share a request shape; they differ in what runs around it.

Quick start

URL: https://platform.ai.gloo.com/ai/v2/direct/chat/completions
The request and response shapes mirror the OpenAI Chat Completions API, so existing SDKs and tooling work by pointing the base URL at Gloo. For every parameter, see the Direct Completions API reference.

What runs, and what doesn’t

Identical to every direct endpoint; see Endpoint Types for the full list. In short: authentication, entitlement, metering, the model catalog, provider resiliency and rate limits all still apply; guardrails, output moderation, values-alignment and routing deliberately do not.

Output limit

A response that reached the limit ends with finish_reason: "length". If that comes with little or no answer text, raise the limit or lower the reasoning effort. See Set your output limit for reasoning models.

Sampling parameters

temperature, top_p, frequency_penalty and presence_penalty are sent to the model when it takes them. If you don’t set temperature, the model’s own default applies. If your requests relied on a default temperature, set one yourself, for example temperature: 0.7. Two model families don’t always take temperature and top_p: A parameter the model can’t use doesn’t fail the request. The request runs without it, and the response lists it in ignored_params:
On a stream, the names arrive in a response header instead: X-Ignored-Params: temperature, top_p. The header is sent before the first chunk, so it describes the request as it started; see Provider failover. Match on the names in params, not on reason, which can change. Only parameters you sent are listed, and the field and header are left out when nothing was ignored. A field whose name isn’t a plain parameter name (letters, digits, _, . or -, up to 64 characters) is listed once as unrecognized_parameter, and past 32 entries the rest are listed once as more_parameters. A reasoning_effort the model doesn’t run as sent is listed the same way; see Effort levels.

Reasoning summaries

Send reasoning_effort (none, minimal, low, medium, high, and xhigh or max on models that take them) to set how much a reasoning model thinks. A graded effort also asks for a summary of the model’s reasoning. When the model returns one, a non-streamed answer carries it in choices[0].message.reasoning_content, and a stream carries it in delta.reasoning_content. none asks for no reasoning and no summary. The nested form reasoning: {"effort": ...} is accepted too; reasoning_effort wins if you send both. Send a level the model lists. Another level runs at the nearest level below it that the model lists, or at the model’s lowest level when none is below, and is listed in ignored_params (X-Ignored-Params on a stream). See Effort levels. The model catalog shows which efforts each model takes (reasoning.effort_levels) and whether it returns a summary (reasoning.returns_summary).

Claude 5 models

Claude Opus 5.5, Sonnet 5.5 and Haiku 5.5, and the earlier Opus 5, Sonnet 5, Fable 5 and Fable 5.1, return a reasoning summary when you send a reasoning_effort other than none, on streamed and non-streamed requests.
  • none can’t turn their reasoning off. Without reasoning_effort these Claude models reason when they decide a request needs it, and return no summary. none cannot turn reasoning off: it is listed in ignored_params and returns no summary (an answer from a fallback provider may still include reasoning). minimal runs as low and is listed.
  • They decide how much to reason. At a low effort on an easy prompt, the model may return no summary. Fable 5.1 often returns a summary only at xhigh or max.
  • Streamed reasoning can repeat. If the provider fails after a stream has sent reasoning but no answer text, Gloo can send the request to another provider instead of ending the stream with an error. The new provider’s reasoning then arrives in the same stream, starting from the beginning. No chunk marks the switch. If you show reasoning as it arrives, be ready for it to start over, or show only the answer in delta.content. Once answer text has been sent, the stream is not switched this way.
The guarded and grounded endpoints return these summaries the same way, streamed and non-streamed. See Completions. For examples on every endpoint and in every language, see the Reasoning tutorial.

Example

A request to Claude Opus 5.5 with a reasoning effort:
The summary comes back beside the answer:
With "stream": true, the summary arrives before the answer, in chunks whose delta has reasoning_content and a null content, followed by the answer in delta.content:

Images

Models that read images take them as image_url content parts, in the Chat Completions shape. Every Claude, Gemini and Grok chat model reads images, as does every OpenAI GPT model except the open-weight GPT OSS models; check supports_vision in the catalog for the others.
url takes a base64 data: URI or a public https:// link, and an optional detail goes next to it. For worked examples, see Understand Images with Claude (on Direct Responses, the same models) and Images in Conversations.

When a request fails

Every error follows the direct endpoint error contract: a short message you can show your end users, a developer_message that says what happened and what to do, and an X-Gloo-Error-Code header to branch on. A stream that fails before any output gets a real HTTP status, not 200. Cases worth handling explicitly:
  • No provider could serve the model: 503 provider_unavailable (2002), retryable: true. Gloo tries every provider that serves the model first. Retry with exponential backoff. See Every provider unavailable.
  • A temporary problem on Gloo’s side: 503 service_unavailable (3003), retryable: true, with a Retry-After header. Your request and key were not at fault: wait, then retry.
  • The provider declined the request under its content policy: 400 provider_content_policy_violation, with reasons when the provider named categories, or a finish_reason: "content_filter" ending once output has started. Rephrase the request or choose a different model; do not retry it unchanged. See Content Policy Refusals.
For retry budgets and backoff with jitter, see Error Handling and Retries.

Choosing between the direct formats

Use Direct Completions to keep existing Chat Completions tooling on its request shape. For new integrations, and for vision or image generation, use Direct Responses; only the request shape differs. For the full comparison across guarded, direct and grounded endpoints, see Which endpoint should I use?.

Next steps

Direct Responses

The Responses format, straight to the model.

Endpoint Types

Compare guarded, direct, and grounded endpoints.

Supported Models

Model IDs, capabilities, and pricing.

API Reference

Every request and response field, with a live playground.