Skip to main content
POST

Authorizations

Authorization
string
header
required

Primary authentication for inference endpoints. Send your Naga API key as Authorization: Bearer <api-key>.

Body

application/json

Stateless Messages API endpoint (Anthropic Messages API compatibility).

Request surface is intentionally limited to what maps into our internal /v1/chat/completions pipeline.

model
string
required

Model identifier to route the request to.

Example:

"claude-sonnet-4.5"

max_tokens
integer
required

Maximum number of output tokens to generate.

Required range: x >= 1
messages
MessageParam · object[]
required

Conversation history in Anthropic Messages format.

Required array length: 1 - 100000 elements
system
stream
boolean
default:false

Return Anthropic-style SSE events instead of a single JSON response.

temperature
number | null
Required range: 0 <= x <= 2
top_p
number | null
Required range: 0 <= x <= 1
stop_sequences
string[] | null
tools
(ToolParam · object | WebSearchToolParam · object)[] | null
tool_choice
ToolChoiceAutoParam · object
thinking
ThinkingConfigEnabledParam · object
output_config
OutputConfigParam · object | null

Response

JSON response when stream=false, or Anthropic-style Server-Sent Events when stream=true.

id
string
required
model
string
required
content
(AnthropicTextBlockResponse · object | AnthropicThinkingBlockResponse · object | AnthropicImageBlockResponse · object | AnthropicSearchResultBlockResponse · object | AnthropicToolUseBlockResponse · object)[]
required
created
integer
required
type
string
default:message
Allowed value: "message"
role
string
default:assistant
Allowed value: "assistant"
stop_reason
string | null
stop_sequence
string | null
usage
AnthropicUsageResponse · object | null