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 '{ "background": true, "dry_allowed_length": 1, "dry_base": 1, "dry_multiplier": 1, "dry_sequence_breakers": [ "example" ], "frequency_penalty": 1, "grammar": { "type": "regex", "value": "example" }, "include": [ "file_search_call.results" ], "input": [ { "content": [ { "text": "example", "type": "input_text" } ], "role": "example", "type": "message" } ], "instructions": "example", "logit_bias": "example", "logprobs": true, "max_output_tokens": 1, "max_tool_calls": 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", "web_search_options": { "extract_description": "example", "search_context_size": "low", "search_description": "example", "user_location": { "approximate": { "city": "example", "country": "example", "region": "example", "timezone": "example" }, "type": "approximate" } } }'
Media type application/json

OpenResponses API create request

object
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
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
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<object> | null

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
web_search_options
One of:
null

Response created