Skip to content

Protocol translation

Any model on any endpoint, what is forwarded untouched, and the few things translation cannot carry.

Every model is reachable from every endpoint. Asking for a Claude model over /v1/responses, or a GPT model over /v1/messages, is a supported request.

This is what lets a client that speaks one protocol use models from vendors that speak another, without running a second gateway.

Endpoint Protocol Typical clients
/v1/chat/completions OpenAI chat completions OpenAI SDKs, OpenClaw, Hermes, most editors
/v1/messages Anthropic Messages Anthropic SDKs, Claude Code
/v1/responses OpenAI Responses Codex, newer OpenAI SDKs

Credentials are accepted as Authorization: Bearer, x-api-key, or api-key, because clients disagree about which to send.

When nothing is translated

If your endpoint and the model's provider already speak the same protocol, the request body is forwarded rather than rebuilt. Only the model ID is rewritten.

Cache breakpoints, reasoning signatures, and fields Webway has never heard of all reach the provider untouched, and a provider feature shipped after this page was written works the day it ships.

What translation cannot carry

Off that path, a few things have nowhere to go in the target protocol:

  • Cache breakpoints are dropped when the target is chat completions, which has no cache_control. Providers there cache implicitly, so this costs control, not money.
  • Reasoning signatures are a provider's proof that a thinking block came back unmodified. They are specific to the provider that issued them and cannot be carried to another's protocol, so they are dropped rather than forged.
  • previous_response_id is refused with a 400. Webway does not store conversation state; send the full input array. Ignoring the field would silently drop your history.

Tools, tool results, images, system prompts, stop reasons, streaming order and token counts all survive in both directions.

Token counts

/v1/messages/count_tokens is served for every model, including ones whose provider does not offer it, so Claude Code's context meter works throughout. Counts for those models are estimates.

Cached input is billed at the cached rate and cache writes at the write rate. Usage is normalized before it reaches your invoice: Anthropic excludes cached tokens from input_tokens and OpenAI includes them in prompt_tokens, and GET /v1/models publishes each rate separately.