POST /ai/v2/direct/responses sends your request straight to the model you name. It exposes the entire Gloo AI model catalog through a single endpoint — text, vision, reasoning, tool use, and native image generation — with one request and response shape that works the same across every provider.
Direct endpoints add no platform fee. You pay 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.
It takes the same request body as the guarded Responses endpoint; the difference is what runs around it. Nothing here applies guardrails, output moderation, values-alignment (tradition), model_family selection or auto-routing. Choose this when your application owns its own safety and prompting; choose guarded Responses when it should inherit Gloo’s. See Which endpoint should I use? for the full comparison across all three endpoint families.
New to Gloo AI? Direct Responses is a good place to start. If you want Gloo’s guardrails and values-alignment applied, switch to the guarded Responses endpoint: same request shape, different path. If you already use Completions V2, it remains fully supported and backwards-compatible — see Moving from Completions to Responses.
Why the Responses API
The Responses API offers a more capable, forward-looking request shape that the broader ecosystem is standardizing on:- One shape for every modality. Text, image input (vision), and image generation all use the same
inputarray and the same typedoutputarray — no separate endpoints or bespoke payloads per capability. - OpenAI-compatible. The request and response formats mirror the OpenAI Responses API, so existing tooling, SDKs, and mental models carry over directly. Point your base URL at
https://platform.ai.gloo.com/ai/v2/directand go. - Typed, structured output. Responses come back as an
output[]array of typed items (message,image_generation_call, reasoning, tool calls) instead of a single opaquechoices[].message.contentstring — easier to parse, and extensible as new item types arrive. - Built for multimodal. Native image generation and image input are first-class, not bolted on. The same endpoint that answers a text prompt can return a generated image.
Endpoint
URL:https://platform.ai.gloo.com/ai/v2/direct/responses
Operation: POST
Request format
The Responses API usesinput instead of messages, and a few renamed fields. If you know the chat-completions format, the mapping is small:
Conversation state is managed client-side: send the full conversation in
input on every request. previous_response_id and conversation (OpenAI’s server-side conversation chaining) are not supported, and a model’s reasoning is not carried from one request to the next. See Reasoning across turns.Response format
Responses return a typedoutput[] array. Each item has a type; a normal text answer arrives as a message item, a generated image as an image_generation_call item.
Streaming
Set"stream": true to receive the response as Server-Sent Events. Each event has an event: line and a data: line carrying a typed JSON payload:
response.completed (or response.incomplete) carries the response’s top-level fields (id, object, status, usage and the request settings), not nested under a response key and without output[], and text deltas identify their item by output_index rather than item_id. Build the answer from the events before the final one.
Key event types to handle:
response.output_item.added/response.output_item.done— mark the start and end of each typed item inoutput[](includingmessage,image_generation_call, andfunction_call).response.content_part.added/response.content_part.done— mark the start and completion of a content part within an item.response.content_part.doneis the signal that a message’s text is complete, followed byresponse.output_item.done.response.output_text.delta— incremental text tokens for amessageitem.response.function_call_arguments.delta— incremental tool-call argument tokens for afunction_callitem.response.completed— emitted once when the response is finished. For OpenAI models served over OpenAI’s Responses API, itsresponseobject includes the fulloutput[]array andusage; for other models the payload is the response’s top-level fields andusage, withoutoutput[]. An answer cut off atmax_output_tokensends withresponse.incompleteinstead.
message you can show your end users, a developer_message, and an X-Gloo-Error-Code header. A streamed request that fails before any output gets the same HTTP status and body as a non-streamed one (a raised exception in the SDK). A stream that fails after output has started ends with a response.failed event, as in OpenAI’s Responses API: response.error.code is the string error code, and Gloo adds the numeric gloo_code, developer_message and retryable. See Streaming on the direct endpoints.
Reasoning summaries
Setreasoning.effort to choose how much a reasoning model thinks, and reasoning.summary (auto, concise or detailed) to get a summary of its reasoning back as a reasoning item in output[]. Without it, OpenAI and Claude models normally return no summary. A non-streamed response carries the summary for every model that returns one. On a stream, the reasoning arrives as a reasoning item with OpenAI’s events before the answer: response.reasoning_summary_text.delta, or response.reasoning_text.delta for models outside the Anthropic, Google and OpenAI families (details). An effort the model doesn’t run as sent is listed in ignored_params as reasoning.effort=<level>.
This includes Claude Opus 5.5, Sonnet 5.5 and Haiku 5.5, and the earlier Opus 5, Sonnet 5, Fable 5 and Fable 5.1. These Claude models always think: an effort of none runs them at low and returns no summary, and minimal runs them at low and returns the summary when reasoning.summary is set. They decide how much to reason, so at a low effort on an easy prompt they may return no summary. For examples on every endpoint and in every language, see Reasoning.
A request for a summary:
reasoning item before the answer. It has an id and a summary, and no encrypted_content:
Reasoning across turns
Reasoning models can return areasoning item in output[] with a summary of how they reasoned. Gloo does not carry a model’s reasoning from one request to the next: each request is reasoned from the conversation you send in input.
What comes back
Reasoning items keep theirid and summary. They never include encrypted_content, in a non-streamed response or in any streamed event, and that includes requests that ask for include: ["reasoning.encrypted_content"]. That include value is accepted, not rejected; it just returns nothing.
What happens to reasoning you send back
You can still send output items back ininput, reasoning items included. The request is not rejected: Gloo removes the reasoning state before calling any model and answers normally.
- Any
reasoningitem that carriesencrypted_contentis removed, whatever the value is: an OpenAI blob saved from an earlier response, a value from another provider, or anything else. - If the most recent assistant turn loses a reasoning item, every reasoning item in the request is removed, so the model sees a conversation with no reasoning in it rather than reasoning from older turns only.
- Items tied to a removed reasoning item are adjusted so the request stays valid for OpenAI models. In each assistant turn that lost reasoning:
- a
function_callis sent without itsid; itscall_id, and yourfunction_call_outputfor it, are kept; - an assistant
messageis sent without itsid, with its text kept, or removed if it has no text; - hosted and client tool calls OpenAI ties to the reasoning by id (
web_search_call,file_search_call,image_generation_call,code_interpreter_call,computer_call,local_shell_call, the MCP items and similar) are removed, together with your items that answer them; - an
item_referenceto anything removed or sent without its id is removed.
- a
- Requests with no reasoning items are unchanged.
How to tell what was removed
Direct Responses reports removed reasoning inignored_params. input.reasoning=<n> is the number of reasoning items removed because they carried encrypted_content or went with one that did, and input.reasoning_paired=<n> the number of other items removed with them: hosted tool calls, your items answering them, assistant messages with no text and item_reference items (omitted when there were none). input.reasoning does not count the other reasoning items on a request that is converted for the model, those without encrypted_content that did not go with one that did, though those are still not sent to it. Here one reasoning item carrying an OpenAI blob was sent back:
X-Ignored-Params header without counts, for example X-Ignored-Params: input.reasoning, input.reasoning_paired.
A check on a non-streamed response:
response.model_dump(): ignored_params is a Gloo addition, so the SDK keeps it as an extra field rather than a typed attribute.
Direct Responses does not return a reasoning_carryover object or an X-Gloo-Reasoning-Carryover header. Those are how the guarded Responses and Grounded Responses endpoints report removals, described next.
The reasoning_carryover object on Responses and Grounded Responses
It appears only when your input contained at least one reasoning item, or when you asked for include: ["reasoning.encrypted_content"]. Every reasoning item you send back is removed and listed in dropped, including one sent back exactly as it was received, with no encrypted_content. On a non-streamed response the object is a top-level field. Here the first turn’s output was sent back as received, with one reasoning item:
Reasons in
dropped:
On a stream, the counts arrive in the
X-Gloo-Reasoning-Carryover response header (for example received=1, carried=0, dropped=1), and the object arrives as a top-level field of the final response.completed or response.incomplete event. See Responses: Reasoning across turns.
What to do
- Keep sending the full conversation in
inputon every request: your messages, the assistant’s messages, function calls and your function call outputs. You can send output items back as you received them; Gloo removes what it can’t carry and tells you. - Treat reasoning summaries as display text. Show them to your users if they help; sending them back does not give the model its earlier reasoning.
- Restate what the model needs. If a later turn depends on something only a hosted tool call returned, such as web search results, put it in a message: that call can be removed with its turn’s reasoning.
- Don’t build on
encrypted_content. Gloo does not return it, and removes it when you send it.
output back as it was received, reasoning item included, followed by the next user message:
encrypted_content, so for this OpenAI model nothing is removed: there is no input.reasoning entry in ignored_params. The model reasons afresh from the conversation.
Multi-turn behavior
What changes depends on how the model is served. OpenAI models served over OpenAI’s Responses API, including its reasoning models. Gloo passes your input items to OpenAI’s Responses API, so all of the rules in What happens to reasoning you send back apply. Before this change,encrypted_content you sent back was passed to OpenAI and gave the model its earlier reasoning; now it is removed. A reasoning item without encrypted_content is passed on as sent when neither its own turn nor the most recent assistant turn lost a reasoning item.
All other models. Gloo converts your conversation into the format the model accepts, and reasoning items have never been sent to these models. What the model sees does not change. The difference is that removals are now reported in ignored_params, which counts only the reasoning items that carried encrypted_content, or went with one that did; the others are still not sent to the model. An OpenAI-model request that cannot be passed to OpenAI as sent, for example because the first attempt failed before any output, is served this way too.
Moving off encrypted_content and previous_response_id
- If you sent
encrypted_contentback to keep OpenAI reasoning across turns: the request still succeeds, and the model now reasons from the conversation alone. Code that stores the blob can stay or go; Gloo removes it either way. - If you asked for
include: ["reasoning.encrypted_content"]: it returns nothing and you can remove it. - If you used
previous_response_idorconversation: send the earlier turns ininputinstead. Don’t send these parameters, orbackground: true: for those OpenAI models they are passed to OpenAI as sent and the request can fail, and for other models they have no effect. Gloo setsstoreon requests to OpenAI itself, so astorevalue you send has no effect either. Where they have no effect, they can be listed inignored_params.
Multimodal
Image input (vision)
Pass images as input items alongside text. Any vision-capable model accepts them:data: URI.
Image generation
Image-capable models return a generated image as animage_generation_call output item (base64 result). Optional image_generation controls (quality, size) are forwarded to providers that support them.
image_generation_call item in output[]. The result field carries the image as a base64-encoded string:
result to get the image bytes. Optional image_generation controls (quality, size) are forwarded to providers that support them.
OpenAI: image generation via the image_generation tool
OpenAI’s image generation runs as animage_generation tool on a GPT-5 model — gpt-image-1 is not a top-level Responses model (exactly as on OpenAI’s own API, where it is an Images API model rather than a Responses one). Call a GPT-5 model and attach the tool; the model decides when to draw and can combine the image with text in the same response. The tool accepts an optional model field to pin its backing image model (e.g. gpt-image-1) plus quality/size controls:
image_generation_call output item shown above (alongside any reasoning and message items from the GPT-5 model). Image editing works through the same mechanism: include an input_image part in the conversation and it becomes the tool’s edit source.
See Supported Models for which models support image input and image generation.
Pricing & token spend
The Responses API is billed per token at each model’s standard rates — there is no separate or premium price for using/responses. Cost is driven entirely by the model you select and the tokens you consume:
- Per-model rates. Input and output rates vary by model. The live rates are on the Supported Models page and programmatically on
GET /platform/v2/models. - Prompt caching reduces input cost when prompt prefixes repeat — cached tokens are billed at a discounted
cache_readrate. See Prompt Caching. - Image generation is billed using the image model’s token accounting; check the model’s rates on the models endpoint.
- No platform fee. Direct endpoints bill the published per-model rate exactly. The 6.5% platform fee applies to the guarded endpoints, where guardrails run, and to Grounded Completions, which runs on the guarded pipeline. Grounded Responses carries no platform fee.
Supported models
The Responses API works across the full Gloo AI catalog — Anthropic, OpenAI, Google, and open-source families — including the multimodal and image-generation models. Use the Model ID as themodel field. The complete, live list (with capabilities and pricing) is on the Supported Models page.
Moving from Completions to Responses
Completions V2 (/ai/v2/guarded/chat/completions) is fully supported and backwards-compatible — existing integrations continue to work unchanged, and it remains the home of auto-routing and model_family selection. Guardrails, output moderation and tradition have already reached the Responses shape on the guarded Responses endpoint, and RAG grounding on Grounded Responses.
The Responses shape is the better fit for new work because it is the OpenAI-compatible standard and makes multimodal (vision + image generation) first-class. Below the URL, the migration is mostly a rename:
tradition, guardrails and output moderation are available now on the guarded Responses endpoint, and grounded (RAG) responses on Grounded Responses. Auto-routing and model_family selection remain on Completions V2, and grounding with citation metadata on Grounded Completions. Choose this page’s direct endpoint when your application owns its own safety and prompting.Related Documentation
- Supported Models — model IDs, capabilities, and live pricing
- Grounded Responses — RAG-grounded answers in the Responses API format
- Prompt Caching — reduce cost and latency with cached prompt prefixes
- Tool Use — function calling
- Completions V2 — routing, values-alignment, and backwards-compatibility

