Skip to main content
POST
Create a response (OpenAI-compatible, non-streaming)

Headers

x-api-key
string
required

Body

application/json

Request body for POST /v1/responses. Any other field set to a non-empty value, such as stream, tools or previous_response_id, returns 400 until it is supported.

model
string
required

Model to use. See GET /v1/models/available for the models you can use.

input
required

The user's text, or a list of message items with role user, assistant, system or developer. Message content is a string or a list of input_text and output_text parts. At least one user message is required; other item types and image or file parts return 400.

instructions
string | null

System prompt. Joined with any system or developer messages in input, in that order.

max_output_tokens
integer | null

Maximum number of tokens to generate. When the limit is reached, status is incomplete with reason max_output_tokens.

Required range: x >= 1
temperature
number | null

Sampling temperature, 0 to 2. Omitted by default so the model's own default applies.

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

Nucleus sampling cutoff.

Response

Successful Response

A completed or incomplete response, in the OpenAI Responses API shape.

id
string
required

Response identifier, resp_ prefixed.

created_at
integer
required

Unix time the response was created.

model
string
required

The model that answered.

status
enum<string>
required

incomplete when max_output_tokens cut the answer short.

Available options:
completed,
incomplete
output
ResponseOutputMessage · object[]
required

One assistant message.

usage
ResponseUsage · object
required
object
string
default:response
Allowed value: "response"
incomplete_details
IncompleteDetails · object | null

Set only when status is incomplete.

error
null

Always null; failures are HTTP errors.