Skip to main content
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 and use dots where Anthropic uses hyphens: anthropic/claude-opus-5.5, not claude-opus-5-5.

Not supported

Stored conversations

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

Stored objects and their endpoints

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. Without a Files API, a file_id fails with 400 file_id_unsupported. Send the file as base64 in file_data, or as a link in file_url. See Images and files. web_search_options works in Chat Completions, web_search in Responses and web_search_* in Messages, when the model can search. See Web search. NagaAI drops file_search, code_interpreter, computer use, mcp and shell, and Anthropic’s code_execution, web_fetch, bash, text_editor and memory. A tool type NagaAI doesn’t know fails with 400. To give the model such a capability, run it in your code as a function tool.

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 the cached_input_token price. The cache routing strategy prefers providers that return such hits.

Vendor headers

NagaAI ignores anthropic-beta, anthropic-version, OpenAI-Organization and OpenAI-Project.

Works differently

Unknown and unsupported fields

NagaAI drops a field it doesn’t support instead of refusing the request. A request with n: 2, seed, logprobs, logit_bias, user, metadata, service_tier or prediction gets 200, and those fields have no effect: you always get one choice, and logprobs is null. NagaAI drops a misspelled field name the same way, so check field names when a setting seems to do nothing. The parameters of a model’s operation in /v1/models list what at least one provider of the model accepts. When the provider serving your request doesn’t accept temperature, tools, response_format or reasoning_effort, NagaAI removes that field for this request. The provider can also change between identical requests, see Routing. A provider can limit a parameter to some values, such as at most two stop sequences. NagaAI doesn’t send a value to a provider that limits it out. When every provider of the model limits the parameter and none accepts your value, you get 400 invalid_request_error that names the parameter, and no provider is called.

Response ids and the model field

model holds the NagaAI catalog id, even if you called an alias. NagaAI generates the id (chatcmpl-…, resp_…, msg_…), and you can’t fetch a response by it later. usage has token counts but no cost, see Billing.

Status codes

NagaAI and OpenAI return different statuses in these cases: 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.

Thinking budgets

In Messages, NagaAI turns thinking.budget_tokens into an effort level, so the model doesn’t stop exactly at the budget. A budget under 1024 fails with 400. See Reasoning.

Images and transcriptions

/v1/images/generations and /v1/images/edits return data[].url, a link that NagaAI hosts for 24 hours and then deletes. Download the image on arrival, or pass response_format: "b64_json" to get base64. See Image generation. /v1/audio/transcriptions and /v1/audio/translations return {"text": "..."} only. NagaAI ignores response_format, timestamp_granularities and temperature.

Requests NagaAI changes

Some requests that the provider would refuse, NagaAI changes and sends on:
  • For models that can’t continue a trailing assistant message (prefill), NagaAI removes it. The model answers from scratch.
  • When max_tokens doesn’t fit in the model’s context window together with the input, NagaAI lowers it. The answer can then end with finish_reason: "length".
  • When max_tokens is above the most the provider returns in one answer, NagaAI lowers it to that limit. The answer can then end with finish_reason: "length" too.
  • NagaAI moves reasoning_effort to the nearest level the model supports.
  • With temperature: 0 the model always picks the most likely token, so top_p changes nothing. NagaAI leaves top_p out where the provider refuses the pair.
  • A user message with empty content carries nothing to answer, so NagaAI leaves it out where the provider refuses one.
  • In the conversation history, NagaAI sends {} for a tool call whose arguments isn’t a JSON object. Some providers refuse a history they can’t parse.
  • Where the provider reads only part of JSON Schema in tool parameters, NagaAI rewrites the schema to match. A type like ["boolean", "null"] becomes "boolean", and an enum of numbers moves into the parameter’s description.
  • In tool parameters, required can list a name that properties doesn’t define. NagaAI removes such names where the provider refuses the schema.
  • On some models without schema support, NagaAI turns json_schema into JSON mode and adds the schema to the prompt. Validate the JSON in your code.

NagaAI extensions

NagaAI adds these features to the official formats:
  • Every chat model works on all three chat endpoints: a Claude model through Chat Completions, a GPT model through Messages.
  • routing.strategy 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.
  • 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 Images and files.