ResponseRequest

@Serializable
data class ResponseRequest(val model: ModelId, val input: ResponseInput? = null, val instructions: String? = null, val maxOutputTokens: Int? = null, val metadata: Map<String, String>? = null, val parallelToolCalls: Boolean? = null, val previousResponseId: ResponseId? = null, val reasoning: ResponseReasoning? = null, val store: Boolean? = null, val temperature: Double? = null, val text: ResponseText? = null, val toolChoice: JsonElement? = null, val tools: List<ResponseTool>? = null, val topP: Double? = null, val truncation: String? = null, val user: String? = null)

Creates a model response.

Constructors

Link copied to clipboard
constructor(model: ModelId, input: ResponseInput? = null, instructions: String? = null, maxOutputTokens: Int? = null, metadata: Map<String, String>? = null, parallelToolCalls: Boolean? = null, previousResponseId: ResponseId? = null, reasoning: ResponseReasoning? = null, store: Boolean? = null, temperature: Double? = null, text: ResponseText? = null, toolChoice: JsonElement? = null, tools: List<ResponseTool>? = null, topP: Double? = null, truncation: String? = null, user: String? = null)

Properties

Link copied to clipboard
@SerialName(value = "input")
val input: ResponseInput? = null

Text or structured input.

Link copied to clipboard
@SerialName(value = "instructions")
val instructions: String? = null

Optional instructions that prepended to model context.

Link copied to clipboard
@SerialName(value = "max_output_tokens")
val maxOutputTokens: Int? = null

Upper bound for generated output tokens.

Link copied to clipboard
@SerialName(value = "metadata")
val metadata: Map<String, String>? = null

Arbitrary metadata for this response.

Link copied to clipboard
@SerialName(value = "model")
val model: ModelId

Model to use for this response.

Link copied to clipboard
@SerialName(value = "parallel_tool_calls")
val parallelToolCalls: Boolean? = null

Whether the model can execute multiple tool calls in parallel.

Link copied to clipboard
@SerialName(value = "previous_response_id")
val previousResponseId: ResponseId? = null

Continue from a previous response.

Link copied to clipboard
@SerialName(value = "reasoning")
val reasoning: ResponseReasoning? = null

Reasoning configuration.

Link copied to clipboard
@SerialName(value = "store")
val store: Boolean? = null

Whether to store this response for evals/distillation products.

Link copied to clipboard
@SerialName(value = "temperature")
val temperature: Double? = null

Sampling temperature.

Link copied to clipboard
@SerialName(value = "text")
val text: ResponseText? = null

Text output format configuration.

Link copied to clipboard
@SerialName(value = "tool_choice")
val toolChoice: JsonElement? = null

Tool choice strategy.

Link copied to clipboard
@SerialName(value = "tools")
val tools: List<ResponseTool>? = null

Tools available to the model.

Link copied to clipboard
@SerialName(value = "top_p")
val topP: Double? = null

Nucleus sampling parameter.

Link copied to clipboard
@SerialName(value = "truncation")
val truncation: String? = null

Truncation strategy.

Link copied to clipboard
@SerialName(value = "user")
val user: String? = null

End-user identifier.