> For the complete documentation index, see [llms.txt](https://docs.visdom.virtuslab.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.visdom.virtuslab.com/visdom-ai-gateway/api-compatibility.md).

# API compatibility

Which OpenAI, Anthropic and MCP endpoints the gateway serves, and where it differs from the source API.

Reference versions: **LiteLLM 1.100.1** and **MCP Context Forge 1.0.10**, compared with the OpenAI and Claude API references and the MCP specification as of **14 September 2026**. *Yes* means native support; *Partial* means support with the differences listed; *No* means no native route (the provider may still be reachable through a pass-through).

## OpenAI API

| Endpoint                                                                            | Support                                      | Differences                                                                                                                                                        |
| ----------------------------------------------------------------------------------- | -------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `POST /v1/chat/completions`                                                         | Yes                                          | OpenAI and Azure pass through 1:1. Other providers are translated; which parameters work depends on the provider. Stored completions (`GET …/{id}`) are not served |
| `POST /v1/completions`                                                              | Yes                                          | Native for OpenAI and Azure; parameter coverage varies by provider                                                                                                 |
| `/v1/responses` (create, retrieve, delete, cancel, input items, compact, WebSocket) | Yes for OpenAI and Azure; Partial for others | Other providers are bridged through chat completions; `previous_response_id` needs the same instance; `input_tokens` is not served                                 |
| `POST /v1/embeddings`                                                               | Yes                                          | `dimensions` and base64 encoding only for some models                                                                                                              |
| `GET /v1/models`                                                                    | Partial                                      | Returns the gateway's aliases available to the key, not provider IDs                                                                                               |
| Images: generations, edits                                                          | Yes                                          | Model limits apply; variations not served                                                                                                                          |
| Audio: transcriptions, speech                                                       | Yes                                          | Translations not served                                                                                                                                            |
| `POST /v1/moderations`                                                              | Yes                                          | OpenAI only                                                                                                                                                        |
| Files, batches                                                                      | Yes                                          | File IDs may differ from provider IDs; batch cost tracking needs LiteLLM Enterprise                                                                                |
| Fine-tuning                                                                         | No in open source                            | Available in LiteLLM Enterprise                                                                                                                                    |
| Realtime (WebSocket, WebRTC)                                                        | Yes                                          | OpenAI, Azure, xAI, Gemini, Vertex AI, Bedrock                                                                                                                     |
| Assistants, threads                                                                 | Partial                                      | Being retired by OpenAI; a subset is served. Use Responses                                                                                                         |
| Vector stores                                                                       | Partial                                      | OpenAI, Azure AI and managed stores (Bedrock KB, Vertex AI Search, Azure AI Search)                                                                                |
| Rerank                                                                              | Yes (extension)                              | Cohere format; not an OpenAI API                                                                                                                                   |
| Conversations, uploads, webhooks, Admin API                                         | No                                           | Reachable only through the `/openai/*` pass-through                                                                                                                |

**Across all OpenAI endpoints:**

* `model` is a gateway alias. Retries and fallback may serve a call from another deployment or provider; response headers say so (`x-litellm-attempted-retries`, `x-litellm-attempted-fallbacks`, `x-litellm-model-id`).
* The gateway adds `x-litellm-*` headers (call ID, cost, duration, key spend) and prefixes provider headers with `llm_provider-`. `x-ratelimit-*` describes the gateway key's limit, not the provider's.
* Errors are mapped to OpenAI error types in the OpenAI envelope.
* A parameter the provider does not support fails the call, or is silently removed with `drop_params` (on in the reference configuration).
* Streamed usage appears only with `stream_options.include_usage`, or when the gateway sets `always_include_stream_usage`.

## Anthropic (Claude) API

| Endpoint                         | Support                                                                                           | Differences                                                                                                                                                                                                                                                                                                     |
| -------------------------------- | ------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `POST /v1/messages`              | Yes for Claude models (Anthropic, Bedrock, Vertex AI, Azure AI Foundry); Partial for other models | Anthropic-format SSE, tools, thinking, `cache_control`, images and PDF pass through. Top-level fields outside a fixed list are dropped (for example `service_tier`); `anthropic-beta` is filtered to known values. Errors come back in the OpenAI envelope. Other models are translated, without prompt caching |
| `POST /v1/messages/count_tokens` | Partial                                                                                           | Only `model`, `messages`, `tools` and `system` are forwarded; other models use a local tokenizer                                                                                                                                                                                                                |
| Message Batches                  | Partial                                                                                           | Through the `/anthropic/*` pass-through, with cost tracking                                                                                                                                                                                                                                                     |
| `GET /v1/models`                 | Partial                                                                                           | Anthropic format when `anthropic-version` is sent; aliases, no pagination                                                                                                                                                                                                                                       |
| Files API                        | Partial                                                                                           | Through `/anthropic/v1/files`                                                                                                                                                                                                                                                                                   |
| Skills API                       | Yes                                                                                               | Routes present; field-level compatibility not verified by us                                                                                                                                                                                                                                                    |
| Managed Agents                   | No                                                                                                | Path collides with the gateway's own agent registry                                                                                                                                                                                                                                                             |
| `/anthropic/{path}` pass-through | Yes                                                                                               | Every endpoint 1:1 with the gateway's virtual key; cost tracked for messages and batches; no routing to other providers                                                                                                                                                                                         |

Clients send the virtual key in `x-api-key` or `Authorization: Bearer`; the Anthropic key stays in the gateway.

## MCP

| Aspect                  | State                                                                                                                                                             |
| ----------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Current specification   | 2026-07-28 – **not supported yet**; planned upstream as a dual-version mode                                                                                       |
| Supported versions      | 2024-11-05, 2025-03-26, 2025-06-18, 2025-11-25 (default)                                                                                                          |
| Version negotiation     | `MCP-Protocol-Version` header and `initialize`; an unsupported version gets HTTP 400 with the supported list. A client that speaks only 2026-07-28 cannot connect |
| Streamable HTTP         | Yes, at `/servers/{id}/mcp` and `/mcp`. Stateless JSON by default; SSE streams and sessions need `USE_STATEFUL_SESSIONS=true`                                     |
| HTTP+SSE (legacy)       | Yes                                                                                                                                                               |
| WebSocket               | Optional relay, off by default; not a standard MCP transport                                                                                                      |
| stdio                   | Through `mcpgateway.wrapper` (client side) and `mcpgateway.translate` (server side)                                                                               |
| Gateway to tool servers | Streamable HTTP or SSE                                                                                                                                            |


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.visdom.virtuslab.com/visdom-ai-gateway/api-compatibility.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
