Create a Response
POST
Create a Response
Get your free API key
Start with 10,000 Monthly Token Limit on our Free Plan. No credit card required. Your tokens automatically reset on the 1st of each month.
string
required
Model identifier (see
/v1/models.string or array
required
User input (string or conversation array).
integer
required
Maximum tokens in response (≥1).
integer
Alias for
max_output_tokens (deprecated, use max_output_tokens).string or array
System instructions/prompt.
number
default:"0.7"
Sampling temperature (0.0-1.0).
number
default:"1.0"
Nucleus sampling (0.0-1.0).
boolean
default:"false"
Enable streaming response.
array
default:"[]"
Available function/tool definitions.
string/object
default:"auto"
Tool selection strategy.
boolean
default:"true"
Enable parallel tool execution.
string
default:"disabled"
Truncation strategy: “auto” or “disabled”.
string
End-user identifier for tracking.
object
Custom metadata (max 16 key-value pairs).
boolean
default:"true"
Store conversation in database.
string
Previous response ID for conversation continuation.
object
Text output format configuration.
object
Reasoning configuration (effort: “low”, “medium”, “high”).
Returns
string
Response ID (format:
resp_ + 48 hex chars).string
Always “response”.
integer
Unix timestamp (seconds).
string
“completed”, “failed”, “incomplete”, “in_progress”, “cancelled”, “queued”.
object/null
Error details if
status is “failed”.object/null
Reason if
status is “incomplete”.string/array/null
Echoed instructions parameter.
integer/null
Echoed max output tokens.
string
Model used for generation.
array
Array of output items (messages, function calls, etc.).
boolean
Whether parallel tool calls are enabled.
string/null
Previous response ID if continuation.
object
Reasoning effort and summary.
boolean
Whether conversation was stored.
number
Temperature used.
object
Text format configuration.
string/object
Tool choice strategy.
array
Available tools.
number
Nucleus sampling parameter.
string
Truncation strategy.
object
Detailed token usage.
string/null
User identifier if provided.
object
Custom metadata if provided.
Return Examples
Response 200
Create a Response