Direct Completions API Reference
Send OpenAI-compatible chat completion requests directly to a model, without guardrails.
Error Reference: Direct Completions
Authorizations
Headers
Body
OpenAI-compatible chat completion request. Both messages and model are required; all other fields are optional and forwarded to the selected provider as-is.
Chat messages array
Gloo model ID (e.g. 'gloo-anthropic-claude-opus-5.5')
Enable streaming
Maximum tokens to generate
Sampling temperature
Nucleus sampling parameter
Frequency penalty
Presence penalty
Stop sequences
Tool definitions. Supported tool types: 'function' (custom function tools), native web search (any 'web_search'-prefixed type), and 'image_generation'; other tool types are rejected with a validation error.
Tool choice strategy
Response format
Streaming options, e.g. {include_usage: true} to receive a usage SSE chunk at the end of the stream.
Whether to enable parallel function calling. Stripped automatically when tools is missing, null, or empty.
How much a reasoning model thinks before it answers, from least to most. The levels a given model takes are in its reasoning.effort_levels on GET /platform/v2/models. A level the model does not take normally runs at the nearest level it does; on Gemini 2.5 models xhigh and max can be refused with a 400, so send high. See the Reasoning guide (/api-guides/reasoning).
none, minimal, low, medium, high, xhigh, max OpenAI Responses API cache key. Enables persistent prompt caching.
Response
Successful direct Chat Completion. If stream is false or omitted, the response is JSON. If stream=true, the response is a Server-Sent Events stream.
A non-streaming OpenAI-compatible Chat Completion returned by the selected model.
Unique completion identifier.
Object type, always chat.completion.
"chat.completion"Unix timestamp when the completion was created.
Model that generated the completion.
Completions generated by the model.
Token usage when supplied by the provider.
Parameters that were ignored or not applied as sent, such as sampling parameters the selected model does not take. The request still succeeds.

