Skip to main content
POST https://api.naga.ac/v1/messages accepts the Anthropic Messages format and serves every chat model in the catalog, whichever company made it. Point the Anthropic SDK at https://api.naga.ac, without /v1. The key works as x-api-key, the SDK default, or as Authorization: Bearer.

Fields, headers and errors

Claude Sonnet 5.5 and the other Claude 5 models think by default, as in Anthropic’s API. So content can open with a thinking block whose text is empty. Read the answer from the text blocks, as the examples above do, rather than from content[0]. max_tokens is required, as in the official API. A system message in the middle of the conversation may hold text only, and any other block in it fails with 400. The anthropic-version and anthropic-beta headers have no effect, so you can leave them out. Errors use Anthropic’s error types by status: authentication_error for 401, billing_error for 402, not_found_error for 404, rate_limit_error for 429. See Errors.

Structured output

output_config.format with {"type": "json_schema", "schema": {...}} asks for JSON that matches the schema. The JSON comes back in the first text block. See Structured outputs.

Prompt caching

cache_control works at the top level and on tools, system text blocks and message blocks, as in the official API. The usage of the response reports the write in cache_creation_input_tokens and the read in cache_read_input_tokens. See Prompt caching.

NagaAI additions

  • routing in the body and the x-naga-routing-strategy header, see Routing.
  • fallbacks, the models to try when model can’t answer, in Anthropic’s shape, see Fallback models.
  • image blocks in the response from models that draw.
  • search_context_size and external_web_access on the web search tool, see Web search.

Ignored and refused fields

  • service_tier, container, mcp_servers, context_management, inference_geo and thinking.display.
  • is_error on tool_result blocks. Say that the tool failed in the result text.
  • Audio blocks fail with 400.
  • POST /v1/messages/count_tokens and the batches API return 404.
More differences are in Differences from OpenAI and Anthropic.