Skip to main content
POST
Create a response

Authorizations

Authorization
string
header
required

An API key from the console, starting with nl_live_ or nl_test_.

Body

application/json

Parameters not listed here are ignored. stop, logit_bias, previous_response_id, conversation, background, prompt and tools other than functions are rejected with 400 unsupported_parameter.

model
enum<string>
required
Available options:
writer-0.1
input
required
instructions
string

The system prompt.

max_output_tokens
integer

Caps the output, plan included. Without max_output_tokens the model can write up to 32768 tokens. Larger values are lowered to 32768 and to the room left in the 262144-token context window.

Required range: x >= 1
stream
boolean
default:false

Stream the answer as server-sent events.

text
object
tools
object[]
tool_choice
Available options:
auto,
none,
required
parallel_tool_calls
boolean

Set to false to ask for at most one call.

temperature
number

Accepted and range-checked, but writer-0.1 samples with its own fixed settings, so it doesn't change the answer.

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

Accepted and range-checked, but writer-0.1 samples with its own fixed settings, so it doesn't change the answer.

Required range: 0 <= x <= 1
user
string

Passed to the model.

safety_identifier
string

Passed to the model as user.

metadata
object

Response

The response, or a stream of events.

id
string
required
Example:

"resp_abc123"

object
string
required
Allowed value: "response"
created_at
integer
required
status
enum<string>
required
Available options:
completed,
incomplete
model
string
required
output
(Message · object | Function call · object)[]
required
incomplete_details
object | null
usage
object | null