Skip to main content
POST
Creates a response from text or structured input. The Responses API represents model output as typed items and is the recommended surface for new agentic workflows.

Endpoint

Headers

Authorization
string
required
API key using the format Bearer $YELU_API_KEY.
Content-Type
string
required
Must be application/json.

Request body

model
string
required
A model ID returned by GET /v1/models.
input
string | array
Text input or an array of typed input messages/items. Supply input unless continuing in a provider-supported way.
instructions
string
High-priority instructions for the response.
previous_response_id
string
ID of a prior response to continue a conversation when the selected model/provider supports stored response state.
max_output_tokens
integer
Maximum output tokens, including model-specific reasoning usage where applicable.
temperature
number
Sampling temperature on models that expose this control.
top_p
number
Nucleus sampling probability on models that expose this control.
stream
boolean
default:"false"
Returns typed Server-Sent Events when true.
tools
array
Tools the model may call, including function definitions supported by the selected model.
tool_choice
string | object
Controls whether and which tool the model may select.
reasoning
object
Reasoning configuration. Supported fields include effort (low, medium, or high) and provider-supported summary controls.
truncation
string
default:"disabled"
auto allows context truncation when supported; disabled fails instead of silently removing context.

Response

id
string
required
Unique response identifier.
object
string
required
Always response for the completed response object.
created_at
integer
required
Unix timestamp for creation.
status
string
required
completed, failed, in_progress, or incomplete.
model
string
required
Model that handled the request.
output
array
required
Typed output items. A message item commonly includes id, status, role, and a content array with output_text objects. Tool calls appear as separate items.
usage
object
Input, output, total, cached, or reasoning token accounting supplied by the selected model.

Error codes

Provider support for stored response state varies. Persist the conversation state your application needs; do not rely solely on previous_response_id without testing the selected model route.
Last modified on July 13, 2026