GET /platform/v2/models).
Like the other direct endpoints, nothing here applies guardrails, output moderation, values-alignment (tradition) or routing. Your request goes to the Claude model you name.
When to use it
Anthropic Messages serves Claude models only. To call models from other providers with the same code, use Direct Responses or Direct Completions, which also serve Claude.
Set up the SDK
Base URL:https://platform.ai.gloo.com/ai/v2/direct/anthropic
The SDK adds /v1/messages to the base URL. Pass your Gloo API key as the SDK’s auth token, which sends it as Authorization: Bearer <key>. Get a key from the API Keys page in Gloo AI Studio.
Use
auth_token (authToken in TypeScript), not api_key. The SDKs send api_key as an x-api-key header, and this endpoint reads your Gloo key from Authorization: Bearer. You can also set ANTHROPIC_BASE_URL and ANTHROPIC_AUTH_TOKEN in the environment and construct the client with no arguments.Send a message
message object. Its model field is the model ID you sent, and usage reports input, output and cache tokens as Anthropic defines them.
anthropic-version is optional. If you send it, it must be 2023-06-01, the version the SDKs send.
Models
Name a Claude model by its Gloo model ID or by Anthropic’s own model ID. Both of these call Claude Opus 5.5:gloo-anthropic-claude-opus-5.5claude-opus-5-5
gloo-anthropic-claude-sonnet-5.5) and Claude Haiku 5.5 (gloo-anthropic-claude-haiku-5.5). See Supported Models for every Claude model and its rates.
- Claude only. A model from another provider returns
404withmodel_not_available. Use Direct Responses for those models. - Retired models return an error instead of a replacement. On this endpoint, a retired Claude model ID returns
404withmodel_retired, and the message names the model to use instead. Yourthinkingand effort settings were written for the model you named, so Gloo does not move them to another model for you. (Other direct endpoints serve the replacement; see Model Lifecycle.)
Streaming
Setstream: true, or use the SDK’s streaming helpers. Events are Anthropic’s own (message_start, content_block_delta, message_stop and the rest), passed through as Claude sends them.
- Errors before the stream starts are real HTTP errors. Nothing is sent until Claude’s first event arrives, so a request that fails before then gets an HTTP status (
429,529and so on) that your SDK can retry, never an error inside a200. - Errors after the stream starts end the stream with an
event: error, as on Anthropic’s API. - Use streaming for long outputs. A non-streaming request with
max_tokensabove 21,333 returns400, the same limit the SDKs apply. Long non-streaming requests can also time out with504.
Thinking and effort
thinking and output_config are sent to Claude as you write them, so you control reasoning exactly as you would on Anthropic’s API.
- Adaptive thinking. Claude 5 models, such as Opus 5.5 and Sonnet 5.5, think adaptively. Set the depth with
output_config.effort(low,medium,high,xhighormax). - Showing the reasoning. On current Claude models,
thinkingblocks come back with empty text unless you setdisplay: "summarized", which returns a readable summary of the reasoning. With thethinking-display-updates-2026-08-18beta,display: "updates"returns short progress notes between tool calls instead. - Multi-turn. You can send the assistant’s turns back as the SDK returns them, thinking blocks included. Gloo doesn’t pass earlier
thinkingorredacted_thinkingblocks to the model; each new turn starts its own reasoning, and tool loops continue as normal. Thex-gloo-ignored-paramsresponse header listsmessages.thinkingwhen this happens. max_tokenscovers thinking. Thinking tokens count towardmax_tokens. If you ask for more than the model’s output limit, Gloo lowersmax_tokensto that limit and names the value it used in thex-gloo-adjusted-paramsresponse header, for examplemax_tokens=128000.
Tool use
Define your own tools intools, exactly as in Anthropic’s API, and send results back in tool_result blocks. tool_choice is passed through.
These Anthropic-defined tools are also supported:
400 with tool_not_supported.
Prompt caching
cache_control works as it does on Anthropic’s API: set it at the top level to cache automatically, or on individual blocks for fine-grained control. Check usage.cache_creation_input_tokens and usage.cache_read_input_tokens to confirm cache hits. See Prompt Caching for how cached tokens are billed.
What the request can include
Body fields:model, messages, system, max_tokens, stop_sequences, stream, temperature, top_p, top_k, tools, tool_choice, thinking, output_config, cache_control, metadata, and context_management with the context-management-2025-06-27 beta.
Any other top-level field is dropped and named in the x-gloo-ignored-params response header; the request still runs.
- Content blocks: text, images (base64 or URL), documents (base64, plain text, custom content or URL), search results, tool use and tool results, thinking blocks, and web search blocks when the request includes the web search tool. File ID sources are not supported.
- Messages take the
userandassistantroles. Put instructions in the top-levelsystemfield; messages with thesystemrole return400. metadata: onlyuser_idis used, and Gloo does not pass your value to the model provider as you sent it.
400 naming what was refused.
Beta features
Send betas in theanthropic-beta header, or with the SDK’s betas option on client.beta.messages. These are supported:
Any other beta is dropped and named in the
x-gloo-ignored-betas response header. If the request needed that beta, Claude rejects it and you get 400 with beta_not_forwarded.
Not available on this endpoint
OnlyPOST /v1/messages is served. Token counting (/v1/messages/count_tokens) and the models list (/v1/models) return 404 with endpoint_not_available; use GET /platform/v2/models for the model catalog. Message Batches and the Files API are not available.
Limits
- Request size: up to 32 MB per request. A larger body returns
413withrequest_too_large. - Concurrent requests: each organization can have a limited number of Messages requests in flight at once. Past that, you get
429withrate_limit_errorandretry-after: 1. The SDKs retry it for you. - Output length:
max_tokensabove the model’s output limit is lowered to that limit (see Thinking and effort), except on non-streaming requests: there,max_tokensabove 21,333 returns400rather than being lowered (see Streaming).
Errors
Errors use Anthropic’s error shape, so the SDK raises its usual exception classes (RateLimitError, InternalServerError and so on) and applies its usual retry rules:
error.message is safe to show your users. error.details.code is the value to branch on, and details.developer_message, when present, tells you what to change. The request-id header carries the same request_id; include it when you contact support.
Requests on this endpoint are served by Anthropic only, with no failover to another provider, so retry a
529 rather than treating it as final.

