Skip to content

Create response endpoint - OpenResponses API

POST
/v1/responses
curl --request POST \
--url https://example.com/v1/responses \
--header 'Content-Type: application/json' \
--data '{ "adapter": { "generation": "5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a" }, "background": true, "dry_allowed_length": 1, "dry_base": 1, "dry_multiplier": 1, "dry_sequence_breakers": [ "example" ], "files": [ "example" ], "frequency_penalty": 1, "grammar": { "type": "regex", "value": "example" }, "include": [ "file_search_call.results" ], "input": [ { "content": [ { "annotations": [ { "end_index": 1, "file_citation": { "file_id": "example", "quote": "example" }, "start_index": 1, "text": "example", "type": "file_citation" } ], "text": "example", "type": "input_text" } ], "role": "example", "type": "message" } ], "instructions": "example", "logit_bias": "example", "logprobs": true, "max_output_tokens": 1, "max_tool_calls": 1, "max_tool_rounds": 1, "metadata": "example", "min_p": 1, "model": "example", "n": 1, "parallel_tool_calls": true, "presence_penalty": 1, "previous_response_id": "example", "reasoning": { "effort": "none", "summary": "concise" }, "repetition_penalty": 1, "response_format": { "type": "text" }, "stop": "example", "store": true, "stream": true, "stream_options": { "include_usage": true }, "temperature": 1, "text": { "format": { "type": "text" } }, "tool_choice": "none", "tools": [ { "function": { "description": "example", "name": "example", "parameters": "example", "strict": true }, "type": "function" } ], "top_k": 1, "top_logprobs": 1, "top_p": 1, "truncation": "auto" }'
Media type application/json

OpenResponses API create request

object
adapter
One of:
null
background

Whether to run the request in background (async)

boolean | null
dry_allowed_length

DRY allowed length (mistral.rs extension)

integer | null
dry_base

DRY base (mistral.rs extension)

number | null format: float
dry_multiplier

DRY multiplier (mistral.rs extension)

number | null format: float
dry_sequence_breakers

DRY sequence breakers (mistral.rs extension)

Array<string> | null
files

Required output files to surface from tool calls (mistral.rs extension)

Array | null
frequency_penalty

Frequency penalty (-2.0 to 2.0)

number | null format: float
grammar
One of:
null
include

Specifies additional content to include in the response

Array<string> | null
Allowed values: file_search_call.results message.input_image.image_url computer_call_output.output.image_url reasoning.encrypted_content
input
required
One of:

Simple text input

string
instructions

Additional instructions that guide the model’s behavior

string | null
logit_bias

Logit bias for token manipulation

object | null
logprobs

Whether to return log probabilities

boolean
max_output_tokens

Maximum number of output tokens to generate

integer | null
max_tool_calls

Maximum number of tool calls allowed.

NOTE: This parameter is not supported. Setting any value will return an error as mistral.rs does not support limiting the number of tool calls.

integer | null
max_tool_rounds

Maximum number of agentic tool rounds (mistral.rs extension)

integer | null
metadata

User-provided metadata (up to 16 key-value pairs)

min_p

Min-p sampling (mistral.rs extension)

number | null format: double
model

The model to use for this request

string
n

Number of completions to generate

integer
parallel_tool_calls

Whether to allow parallel tool calls.

NOTE: Only true (default) or None is supported. Setting this to false will return an error as mistral.rs does not support disabling parallel tool calls.

boolean | null
presence_penalty

Presence penalty (-2.0 to 2.0)

number | null format: float
previous_response_id

ID of a previous response for multi-turn conversations

string | null
reasoning
One of:
null
repetition_penalty

Repetition penalty (mistral.rs extension)

number | null format: float
response_format
One of:
null
stop
One of:
null
store

Whether to store the response for later retrieval

boolean | null
stream

Whether to stream the response using server-sent events

boolean | null
stream_options
One of:
null
temperature

Temperature for sampling (0-2)

number | null format: double
text
One of:
null
tool_choice
One of:
null
tools

Tool definitions available for the model to call

Array | null
One of:

Tool definition

object
function
required

Function definition for a tool

object
description
string | null
name
required
string
parameters
object | null
strict

When true, the tool’s parameters JSON schema is enforced on the generated arguments via constrained decoding (llguidance).

boolean | null
type
required

Type of tool

string
Allowed values: function
top_k

Top-k sampling (mistral.rs extension)

integer | null
top_logprobs

Number of top log probabilities to return

integer | null
top_p

Top-p (nucleus) sampling parameter (0-1)

number | null format: double
truncation
One of:
null

Response resource or server-sent response events

The main response resource returned by the OpenResponses API

object
adapter_generation

Exact LoRA generation used for this response.

string | null
background

Whether request runs in background

boolean | null
completed_at

Unix timestamp when the response was completed (if completed)

integer | null format: int64
created_at
required

Unix timestamp when the response was created

integer format: int64
error
One of:
null
frequency_penalty

Frequency penalty from the request

number | null format: float
id
required

Unique identifier for this response

string
incomplete_details
One of:
null
instructions

System instructions (if provided)

string | null
max_output_tokens

Max output tokens from the request

integer | null
max_tool_calls

Max tool calls from the request (even if unsupported)

integer | null
metadata

User-provided metadata

model
required

The model used for this response

string
object
required

Object type (always “response”)

string
output
required

Output items generated by the model

Array
One of:
object
content
required
Array
One of:
object
text
required
string
type
required
string
Allowed values: output_text
id
required
string
role
required
string
status
required
string
type
required
string
Allowed values: message
output_text

Concatenated text from all text output content

string | null
parallel_tool_calls

Whether parallel tool calls are enabled

boolean | null
presence_penalty

Presence penalty from the request

number | null format: float
previous_response_id

Previous response ID (for multi-turn conversations)

string | null
reasoning

Reasoning/chain-of-thought content from the model

string | null
status
required

Current status of the response

string
Allowed values: queued in_progress completed failed incomplete cancelled
store

Whether to store the response

boolean | null
temperature

Temperature from the request

number | null format: double
text
One of:
null
tool_choice
One of:
null
tools

Tool definitions from the request

Array | null
One of:

Tool definition

object
function
required

Function definition for a tool

object
description
string | null
name
required
string
parameters
object | null
strict

When true, the tool’s parameters JSON schema is enforced on the generated arguments via constrained decoding (llguidance).

boolean | null
type
required

Type of tool

string
Allowed values: function
top_logprobs

Top logprobs from the request

integer | null
top_p

Top-p from the request

number | null format: double
truncation
One of:
null
usage
One of:
null
Example
{
"incomplete_details": {
"reason": "max_output_tokens"
},
"output": [
{
"content": [
{
"type": "output_text"
}
],
"type": "message"
}
],
"status": "queued",
"text": {
"format": {
"type": "text"
}
},
"tool_choice": "none",
"tools": [
{
"type": "function"
}
],
"truncation": "auto"
}