API Reference
Proxy Endpoints
The endpoints that Claude Proxies, Codex Proxies and Gemini Proxies serve to coding agents.
Proxy endpoints serve Claude Code, Claude Desktop, Codex CLI and Gemini CLI through a Claude Proxy, Codex Proxy or Gemini Proxy, in the format each tool sends. Each needs the inference scope and an x-mr-router header naming the proxy. A Claude Proxy serves each request on its route with the route's model id and key; a Codex Proxy and a Gemini Proxy forward it to OpenAI or Google as sent. See Claude Proxy, Codex Proxy, Gemini Proxy and Agents & Editors.
Claude Proxy
A Claude Proxy serves these endpoints:
| Endpoint | Format | Use |
|---|---|---|
POST /v1/messages | Anthropic | Requests on the Anthropic route. |
POST /v1/messages/count_tokens | Anthropic | Token counting at no cost, with its own rate limit of 300 per minute. Served only through a Claude Proxy. |
POST /bedrock/model/{model}/invoke | Amazon Bedrock | Requests on Bedrock routes. |
POST /bedrock/model/{model}/invoke-with-response-stream | Amazon Bedrock | Streaming requests on Bedrock routes. |
POST /vertex/projects/{project}/locations/{location}/publishers/anthropic/models/{model}:rawPredict | Google Vertex | Requests on Vertex routes. |
POST /vertex/projects/{project}/locations/{location}/publishers/anthropic/models/{model}:streamRawPredict | Google Vertex | Streaming requests on Vertex routes. |
POST /vertex/projects/{project}/locations/{location}/publishers/anthropic/models/count-tokens:rawPredict | Google Vertex | Token counting on Vertex routes. |
GET /v1/models | Anthropic | The models the proxy serves, with models:read. |
On the Vertex endpoints, the project and location in the path come from the tool's settings, and on every endpoint the Claude Proxy serves the request from its own route, region and provider key.
Codex Proxy
A Codex Proxy serves this endpoint, for OpenAI models only:
| Endpoint | Format | Forwards to |
|---|---|---|
POST /v1/responses | OpenAI Responses | OpenAI |
With an organization OpenAI key on the proxy, the client's OpenAI credential is replaced. Without one, the client's own OpenAI API key in Authorization is forwarded, and the Multi-Router key goes in X-MR-Api-Token. A WebSocket upgrade is refused with 400.
Gemini Proxy
A Gemini Proxy serves these endpoints, for Gemini models only, with the organization's Gemini key:
| Endpoint | Format | Forwards to |
|---|---|---|
POST /v1beta/models/{model}:generateContent | Gemini | Google Gemini API |
POST /v1beta/models/{model}:streamGenerateContent?alt=sse | Gemini, server-sent events | Google Gemini API |
The Multi-Router key can go in x-goog-api-key, as Gemini clients send their key. Errors from Multi-Router use Google's error format.