> ## Documentation Index
> Fetch the complete documentation index at: https://docs.naga.ac/llms.txt
> Use this file to discover all available pages before exploring further.

# Differences from OpenAI and Anthropic

> What changes when you point an OpenAI or Anthropic SDK at NagaAI.

Code written for the official OpenAI or Anthropic API works against NagaAI after you change the base URL, the key and the model id. NagaAI ids come from [`/v1/models`](/get-started/models) and use dots where Anthropic uses hyphens: `claude-opus-5.5`, not `claude-opus-5-5`.

## Not supported

**Responses keeps no state.** NagaAI ignores `previous_response_id`, `store`, `conversation`, `background` and `prompt`. Send the whole conversation in `input` on every call, including the output items of earlier turns. A request that relies on `previous_response_id` gets an answer without that context and no error.

**No stored objects.** There are no Files, Batches, Assistants, Realtime, fine-tuning or legacy `/v1/completions` endpoints, and no `GET` by id for responses, completions or models. These paths return `404`, and so does `POST /v1/messages/count_tokens`.

**Send files inline or by URL.** There is no Files API, so a `file_id` fails with `400 file_id_unsupported`. Send the file as base64 in `file_data`, or as a link in `file_url`.

**Web search is the only server-side tool.** `web_search` works in Responses and `web_search_*` in Messages, when the model can search. NagaAI drops `file_search`, `code_interpreter`, computer use, `mcp`, `shell` and Anthropic's `code_execution`, `web_fetch`, `bash`, `text_editor` and `memory`. A tool type NagaAI does not know fails with `400`. Chat Completions has no web search: `web_search_options` has no effect.

**No explicit prompt caching.** NagaAI drops `cache_control` in Messages and `prompt_cache_key` in the OpenAI formats. Models with automatic caching still report cache hits in `usage`, billed at `per_cached_input_token`. The [`cache` routing strategy](/build/routing) prefers providers that return such hits.

**NagaAI ignores vendor headers:** `anthropic-beta`, `anthropic-version`, `OpenAI-Organization` and `OpenAI-Project`.

## Works differently

**NagaAI drops unknown fields instead of refusing them.** A request with `n: 2`, `seed`, `logprobs`, `logit_bias`, `user`, `metadata`, `service_tier` or `prediction` gets `200`, and NagaAI ignores those fields. You always get one choice, and `logprobs` is `null`. NagaAI ignores a misspelled field name the same way.

**A parameter can be dropped per request.** `supported_parameters` in [`/v1/models`](/get-started/models) lists what at least one provider of the model accepts. When the provider serving your request does not accept `temperature`, `tools`, `response_format` or `reasoning_effort`, NagaAI removes that field for this request.

**The provider can change between requests.** Latency, cache hits and exact wording can differ between two identical requests. See [Routing](/build/routing).

**The response names the catalog model.** `model` holds the NagaAI id, even if you called an alias. NagaAI generates the `id` (`chatcmpl-…`, `resp_…`, `msg_…`), and you cannot fetch a response by it later.

**Cost is not in the response.** `usage` has token counts. Prices are in `pricing` of `/v1/models`, and spend per day, model and key is in [`/v1/account/activity`](/account/balance-and-activity).

**Some status codes differ.**

| Situation       | NagaAI                   | OpenAI                   |
| --------------- | ------------------------ | ------------------------ |
| Balance too low | `402 insufficient_quota` | `429 insufficient_quota` |
| Unknown model   | `400 model_not_found`    | `404 model_not_found`    |

A retired model returns `410 model_deprecated`, and a request no provider could serve returns `503` without provider details. In `/v1/messages` NagaAI uses Anthropic's error types, such as `billing_error` for `402`. See [Errors](/build/error-handling).

**Thinking budgets become effort levels.** In Messages, the model does not stop exactly at `thinking.budget_tokens`, and a budget under 1024 fails with `400`. See [Thinking](/api/messages/thinking-blocks).

**Images return a URL by default.** `/v1/images/generations` and `/v1/images/edits` return `data[].url`, a link to a copy NagaAI keeps. Pass `response_format: "b64_json"` to get base64.

**Transcriptions return text only.** `/v1/audio/transcriptions` and `/v1/audio/translations` return `{"text": "..."}`. NagaAI ignores `response_format`, `timestamp_granularities` and `temperature`.

## Requests NagaAI changes

NagaAI changes these requests instead of returning an error:

* It removes a trailing assistant message (prefill) for models that cannot continue one. The model answers from scratch.
* It lowers a `max_tokens` that does not fit in the model's context window together with the input. The answer can then end with `finish_reason: "length"`.
* It moves `reasoning_effort` to the nearest level the model supports.
* On some models without schema support, it turns `json_schema` into JSON mode and adds the schema to the prompt. Validate the JSON in your code.

## NagaAI extensions

* Every chat model works on all three chat endpoints: a Claude model through Chat Completions, a GPT model through Messages.
* [`routing.strategy`](/build/routing) and the `x-naga-routing-strategy` header.
* Chat Completions returns the model's reasoning in `reasoning_content` and `reasoning_details`, in responses and in stream deltas. See [Reasoning](/api/chat-completions/reasoning).
* Chat Completions and Messages return images from models that draw: `message.images` and `image` blocks.
* Chat Completions accepts more audio formats than the official API. See [Multimodal content](/api/chat-completions/multimodal-content#audio).
