Skip to main content
POST
Create Response

Authorizations

Authorization
string
header
required

Unit API Key

Body

application/json
input
required

Text, image, or file inputs to the model. A string or an array of input items.

model
enum<string>

Model to use. Defaults to agent's configured model.

Available options:
google/gemini-2.5-flash
instructions
string

System (developer) message inserted into the model's context.

max_output_tokens
integer

Upper bound for the number of tokens generated, including reasoning tokens.

Required range: x >= 1
temperature
number
default:1
Required range: 0 <= x <= 2
top_p
number
Required range: 0 <= x <= 1
stream
boolean
store
boolean

Whether to store the generated response for later retrieval.

previous_response_id
string

The unique ID of the previous response, used for multi-turn conversations.

parallel_tool_calls
boolean
default:true
metadata
object

Set of key-value pairs that can be attached to the response.

text
object

Configuration options for the text response from the model.

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

Response

Response object

id
string
object
string
Example:

"response"

created_at
integer
model
string
status
enum<string>
Available options:
completed,
failed,
in_progress,
incomplete
output
object[]
output_text
string

Aggregated text output from all output_text items.

usage
object