# OpenAI- and Anthropic-compatible API for open models: what each endpoint supports
URL: https://docs.munito.ai/api-compatibility

Munito AI is an OpenAI-compatible API for open-source models. It serves the OpenAI Chat Completions and Responses APIs and the Anthropic Messages API, each with streaming, tool calls and structured outputs.

Set the base URL of your SDK. The OpenAI SDK, in Python or TypeScript, uses `https://api.munito.ai/inference/v1`, and the Anthropic SDK uses `https://api.munito.ai/inference`.
[Migrate from OpenAI or Anthropic](https://docs.munito.ai/migrate-from-openai) gives the code and the model names.

## What each endpoint supports [#what-each-endpoint-supports]

|                                                     | Chat Completions                                | Responses                                                        | Messages                              |
| --------------------------------------------------- | ----------------------------------------------- | ---------------------------------------------------------------- | ------------------------------------- |
| Format                                              | OpenAI                                          | OpenAI                                                           | Anthropic                             |
| Path                                                | `POST /v1/chat/completions`                     | `POST /v1/responses`                                             | `POST /v1/messages`                   |
| [Streaming](https://docs.munito.ai/streaming)                   | `stream: true`                                  | `stream: true`                                                   | `stream: true`                        |
| [Tool calls](https://docs.munito.ai/tool-calling)               | Function tools                                  | Function tools and namespace tools                               | Client tools                          |
| A forced tool call returns                          | `finish_reason: "tool_calls"`                   | A `function_call` item                                           | `stop_reason: "tool_use"`             |
| [Structured outputs](https://docs.munito.ai/structured-outputs) | `response_format`: `json_schema`, `json_object` | `text.format`: `json_schema`, `json_object`                      | `output_config.format`: `json_schema` |
| [Reasoning controls](https://docs.munito.ai/reasoning)          | `reasoning_effort`, `chat_template_kwargs`      | `reasoning.effort`, `chat_template_kwargs`                       | `thinking`, `output_config.effort`    |
| Reasoning text                                      | `message.reasoning`                             | A `reasoning` item                                               | A `thinking` block                    |
| [`store`](https://docs.munito.ai/data-privacy)                  | `false` by default                              | `false` by default                                               | Not available                         |
| Logprobs                                            | `logprobs`, `top_logprobs`                      | `top_logprobs`, with `include: ["message.output_text.logprobs"]` | Not available                         |
| [Images](https://docs.munito.ai/vision)                         | `image_url`, and `video_url` for video          | `input_image`                                                    | `image` blocks                        |
| [Cached input tokens](https://docs.munito.ai/prompt-caching)    | `usage.prompt_tokens_details.cached_tokens`     | `usage.input_tokens_details.cached_tokens`                       | `usage.cache_read_input_tokens`       |
| [Errors](https://docs.munito.ai/errors)                         | OpenAI error body                               | OpenAI error body                                                | Anthropic error body                  |

Each path starts with `https://api.munito.ai/inference`.
A request can use only the features of its model. For example, an image to a text-only model returns `400`.

## Differences from OpenAI and Anthropic [#differences-from-openai-and-anthropic]

- **Forced tool calls.** When `tool_choice` names a tool, the call ends with `finish_reason: "tool_calls"` on Chat Completions and `stop_reason: "tool_use"` on Messages, also in a stream. Some open-model servers end this call with `stop` or `end_turn`. An agent loop that checks this value then misses the call.
- **Reasoning and `max_tokens`.** A reasoning model writes its reasoning before the answer, and `max_tokens` limits the two together. With a small limit, `content` is `null` and `finish_reason` is `length`. Set `max_tokens` to 2048 or more. See [Reasoning](https://docs.munito.ai/reasoning).
- **Thinking text.** On Messages, a `thinking` block holds the reasoning of the model as the model wrote it, not a summary. With `thinking: {"type": "adaptive", "display": "omitted"}`, each thinking block has an empty text and keeps its `signature`. In a stream, each `thinking_delta` has an empty text.
- **Thinking off.** A model that cannot turn its reasoning off, such as `zai-org/glm-5.3-flash`, runs at its lowest effort with `thinking: {"type": "disabled"}`. The answer then keeps a short `thinking` block.
- **`store`.** OpenAI stores each response unless `store` is `false`. Munito AI stores a response only with `store: true` or `background: true`, and `previous_response_id` needs a stored response. Add `store: true` where your code chains responses. See [Data privacy](https://docs.munito.ai/data-privacy).
- **Codex.** The Responses API accepts the `namespace` tools, the hosted `web_search` tool and the `client_metadata` field that Codex sends, so a stock Codex runs. A call to a namespace tool comes back with its `namespace` and its `name`. See [Codex](https://docs.munito.ai/codex).
- **Errors.** Chat Completions and Responses send the OpenAI error body, and a validation error names the field in `param`. Messages sends the Anthropic error body, with the error type of each status. Each SDK therefore raises its usual exceptions. See [Errors](https://docs.munito.ai/errors).

## Parameters that Munito AI cannot apply [#parameters-that-munito-ai-cannot-apply]

A parameter that Munito AI cannot apply returns `400`, and the error names the parameter. Stock clients send some values on each request, so these values do not fail:

- A `max_tokens` above the model maximum drops to the maximum.
- A reasoning level that the model does not have moves to the nearest level that the model has.
- On Responses, Munito AI removes the hosted `web_search` tool, and the model answers without a search. `client_metadata` has no effect. A `tool_choice` that forces a web search returns `400`.
- On Messages, `context_management` has no effect, and the model does not keep to `thinking.budget_tokens`.

## Models [#models]

Each public chat model, such as `qwen/qwen3.8-27b`, `zai-org/glm-5.3-flash` and `deepseek-ai/deepseek-v4-flash`, answers on the three endpoints with tool calls and structured outputs.
[Models and pricing](https://docs.munito.ai/models) lists the inputs and the reasoning levels of each model.
