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 gateway schema for OpenAI Responses API request body. Strict request surface: only parameters that map to the gateway's unified model.

model
string
required

Model identifier to route the request to.

Example:

"gpt-4.1-mini"

input
required

Text or structured input items to the model.

instructions
string | null

A system (or developer) message inserted into the model's context.

max_output_tokens
integer | null
Required range: x >= 1
temperature
number | null
Required range: 0 <= x <= 2
top_p
number | null
Required range: 0 <= x <= 1
presence_penalty
number | null
frequency_penalty
number | null
tools
(FunctionTool · object | WebSearchTool · object | WebSearchPreviewTool · object | FileSearchTool · object | ComputerUseTool · object | CodeInterpreterTool · object | McpTool · object | ImageGenerationTool · object | LocalShellTool · object | ShellTool · object | ApplyPatchTool · object | CustomTool · object)[] | null

Corresponds to FunctionTool.

tool_choice
Available options:
auto,
none,
required
parallel_tool_calls
boolean | null
truncation
enum<string> | null
Available options:
auto,
disabled
reasoning
ReasoningConfig · object | null

Corresponds to Reasoning schema.

We keep this as the subset that maps to the gateway's unified reasoning_effort control.

text
ResponseTextConfig · object | null

Corresponds to CreateResponse text parameter.

stream
boolean
default:false

Return a Responses API SSE event stream instead of a single JSON response.

Response

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

id
string
required
created_at
integer
required
status
string
required
model
string
required
output
(ResponseMessageItem · object | ResponseFunctionCallItem · object | ResponseReasoningItem · object | ResponseImageGenerationCallItem · object)[]
required
object
string
default:response
Allowed value: "response"
completed_at
integer | null
incomplete_details
Incomplete Details · object | null
previous_response_id
string | null
instructions
string | null
error
ResponseErrorOutput · object | null
tools
(ResponseFunctionTool · object | ResponseWebSearchTool · object | ResponseWebSearchPreviewTool · object | ResponseFileSearchTool · object | ResponseComputerUseTool · object | ResponseCodeInterpreterTool · object | ResponseMcpTool · object | ResponseImageGenerationTool · object | ResponseLocalShellTool · object | ResponseShellTool · object | ResponseApplyPatchTool · object | ResponseCustomTool · object)[]
tool_choice
truncation
enum<string> | null
Available options:
auto,
disabled
parallel_tool_calls
boolean | null
text
ResponseTextConfigOutput · object | null
top_p
number | null
presence_penalty
number | null
frequency_penalty
number | null
top_logprobs
integer | null
temperature
number | null
reasoning
ResponseReasoningConfigOutput · object | null
usage
ResponseUsageOutput · object | null
max_output_tokens
integer | null
max_tool_calls
integer | null
store
boolean | null
background
boolean | null
service_tier
string | null
metadata
Metadata · object
safety_identifier
string | null
prompt_cache_key
string | null