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
model
string
required

Model identifier to route the request to.

Example:

"gpt-4o-mini"

messages
ChatMessage · object[]
required

Conversation history in OpenAI Chat Completions format.

Minimum array length: 1
tools
Tool · object[] | null
tool_choice
response_format
TextResponseFormat · object
temperature
number | null
Required range: 0 <= x <= 2
top_p
number | null
Required range: 0 <= x <= 1
stream
boolean | null
default:false
stream_options
StreamOptions · object | null
stop
max_completion_tokens
integer | null
Required range: x >= 1
reasoning_effort
enum<string>
Available options:
none,
minimal,
low,
medium,
high,
xhigh
presence_penalty
number | null
Required range: -2 <= x <= 2
frequency_penalty
number | null
Required range: -2 <= x <= 2
logit_bias
Logit Bias · object
parallel_tool_calls
boolean
prediction
Prediction · object | null
web_search_options
Web Search Options · object
image_config
ImageConfig · object | null

Response

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

id
string
required
created
integer
required
model
string
required
choices
ChatCompletionChoiceResponse · object[]
required
object
string
default:chat.completion
Allowed value: "chat.completion"
usage
ChatCompletionUsageResponse · object | null