Skip to main content
POST
Generate Responses

Authorizations

Authorization
string
header
required

Your Nugen API key, sent as a Bearer token

Headers

X-Session-ID
string | null

Body

application/json

A request in the OpenAI Responses API compatible format.

model
string
required

Model ID to use for the response

Example:

"model_01kmqm4nrn9fw6r"

input
required

Input to the model — either a plain string or an array of message objects with "role" (system, user, or assistant) and "content"

instructions
string | null

System-level instructions (maps to system message)

max_output_tokens
integer | null

Maximum tokens to generate

temperature
number | null
default:1

Sampling temperature

Required range: 0 <= x <= 2
top_p
number | null

Nucleus sampling parameter

stream
boolean | null
default:true

Stream partial output as server-sent events. Defaults to true; null means true. Set false for one JSON response, which must complete within 50 seconds or the call answers 504. Use true for long generations.

metadata
Metadata · object | null

Optional metadata, ignored by the model

Response

Successful Response

A response in the Responses format.

id
string
required

Unique identifier of the response

Example:

"resp_9f2c1a7b3d4e5f60718293a4"

created_at
integer
required

Unix time in seconds when the response was created

model
string
required

Model used for the response

output
ResponsesOutputMessage · object[]
required

Generated output messages

usage
ResponsesUsage · object
required

Token usage

object
string
default:response

Always "response".

Allowed value: "response"