OpenAI Responses

POST/v1/responses

Use an OpenAI Responses-compatible endpoint for text, tools, and multimodal requests.

The gateway either forwards or translates the request according to the selected model route. Use only fields supported by that model and route.

Core request fields

FieldTypeRequiredDescription
modelstringYesA model ID returned by /v1/models.
inputstring | arrayYesText or a list of Responses input items.
instructionsstringNoHigh-level instructions for this response.
streambooleanNoReturns Responses-style SSE events when true.
toolsarrayNoTools available to the model.
max_output_tokensintegerNoRequested maximum output token count.

Request examples

curl
curl https://api.noxgate.net/v1/responses \
  -H "Authorization: Bearer sk-your-api-key" \
  -H "Content-Type: application/json" \
  -d '{"model":"YOUR_MODEL_ID","input":"Hello","stream":false}'
Python · OpenAI SDK
from openai import OpenAI

client = OpenAI(api_key="sk-your-api-key", base_url="https://api.noxgate.net/v1")
response = client.responses.create(model="YOUR_MODEL_ID", input="Hello")
print(response.output_text)
Node.js · OpenAI SDK
import OpenAI from "openai";

const client = new OpenAI({ apiKey: "sk-your-api-key", baseURL: "https://api.noxgate.net/v1" });
const response = await client.responses.create({ model: "YOUR_MODEL_ID", input: "Hello" });
console.log(response.output_text);

Streaming

With stream=true, the endpoint returns Responses-style SSE events. Process event/data increments and wait for a completion event. Errors after the stream starts may also arrive as events.

curl · SSE
curl https://api.noxgate.net/v1/responses \
  -H "Authorization: Bearer sk-your-api-key" \
  -H "Content-Type: application/json" \
  -d '{"model":"YOUR_MODEL_ID","input":"Hello","stream":true}'

Context compaction

POST /v1/responses/compact uses the same authentication and model routing for Providers that support context compaction. Availability depends on the selected model route.

curl
curl https://api.noxgate.net/v1/responses/compact \
  -H "Authorization: Bearer sk-your-api-key" \
  -H "Content-Type: application/json" \
  -d '{"model":"YOUR_MODEL_ID","input":"Hello","stream":false}'

Successful response

JSON
{"id":"resp_example","object":"response","model":"YOUR_MODEL_ID","status":"completed","output":[],"usage":{"input_tokens":8,"output_tokens":3,"total_tokens":11}}