ResponseResult

@Serializable(with = ResponseResultSerializer::class)
data class ResponseResult(val id: ResponseId, val objectType: String? = null, val createdAt: Long? = null, val status: String? = null, val error: OpenAIErrorDetails? = null, val incompleteDetails: JsonObject? = null, val instructions: String? = null, val maxOutputTokens: Int? = null, val model: ModelId? = null, val output: List<ResponseResultItem> = emptyList(), val parallelToolCalls: Boolean? = null, val previousResponseId: ResponseId? = null, val reasoning: ResponseReasoningOptions? = null, val store: Boolean? = null, val temperature: Double? = null, val text: JsonObject? = null, val toolChoice: JsonElement? = null, val tools: JsonElement? = null, val topP: Double? = null, val truncation: String? = null, val usage: ResponseUsage? = null, val user: String? = null, val metadata: Map<String, String>? = null, val outputText: String? = null, val background: Boolean? = null, val conversation: JsonObject? = null, val serviceTier: String? = null, val completedAt: Long? = null, val maxToolCalls: Int? = null, val promptCacheKey: String? = null, val promptCacheOptions: ResponsePromptCacheOptions? = null, val contextManagement: List<ResponseContextManagement>? = null, val accessPrograms: ResponseAccessPrograms? = null, val safetyIdentifier: String? = null, val topLogprobs: Int? = null, val moderation: JsonElement? = null, val rawData: JsonObject? = null)

A model response object.

Constructors

Link copied to clipboard
constructor(id: ResponseId, objectType: String? = null, createdAt: Long? = null, status: String? = null, error: OpenAIErrorDetails? = null, incompleteDetails: JsonObject? = null, instructions: String? = null, maxOutputTokens: Int? = null, model: ModelId? = null, output: List<ResponseResultItem> = emptyList(), parallelToolCalls: Boolean? = null, previousResponseId: ResponseId? = null, reasoning: ResponseReasoningOptions? = null, store: Boolean? = null, temperature: Double? = null, text: JsonObject? = null, toolChoice: JsonElement? = null, tools: JsonElement? = null, topP: Double? = null, truncation: String? = null, usage: ResponseUsage? = null, user: String? = null, metadata: Map<String, String>? = null, outputText: String? = null, background: Boolean? = null, conversation: JsonObject? = null, serviceTier: String? = null, completedAt: Long? = null, maxToolCalls: Int? = null, promptCacheKey: String? = null, promptCacheOptions: ResponsePromptCacheOptions? = null, contextManagement: List<ResponseContextManagement>? = null, accessPrograms: ResponseAccessPrograms? = null, safetyIdentifier: String? = null, topLogprobs: Int? = null, moderation: JsonElement? = null, rawData: JsonObject? = null)

Properties

Link copied to clipboard
@SerialName(value = "access_programs")
val accessPrograms: ResponseAccessPrograms? = null

Effective restricted access program configuration.

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

Whether processing runs in the background.

Link copied to clipboard
@SerialName(value = "completed_at")
val completedAt: Long? = null

Completion timestamp.

Link copied to clipboard
@SerialName(value = "context_management")
val contextManagement: List<ResponseContextManagement>? = null

Context management settings.

Link copied to clipboard
@SerialName(value = "conversation")
val conversation: JsonObject? = null

Conversation associated with this response.

Link copied to clipboard
@SerialName(value = "created_at")
val createdAt: Long? = null
Link copied to clipboard
@SerialName(value = "error")
val error: OpenAIErrorDetails? = null
Link copied to clipboard
@SerialName(value = "id")
val id: ResponseId
Link copied to clipboard
@SerialName(value = "incomplete_details")
val incompleteDetails: JsonObject? = null
Link copied to clipboard
@SerialName(value = "instructions")
val instructions: String? = null
Link copied to clipboard
@SerialName(value = "max_output_tokens")
val maxOutputTokens: Int? = null
Link copied to clipboard
@SerialName(value = "max_tool_calls")
val maxToolCalls: Int? = null

Hosted tool call limit.

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

Input/output moderation results.

Link copied to clipboard
@SerialName(value = "object")
val objectType: String? = null
Link copied to clipboard
@SerialName(value = "output")
val output: List<ResponseResultItem>
Link copied to clipboard
@SerialName(value = "output_text")
val outputText: String? = null
Link copied to clipboard
@SerialName(value = "parallel_tool_calls")
val parallelToolCalls: Boolean? = null
Link copied to clipboard
@SerialName(value = "previous_response_id")
val previousResponseId: ResponseId? = null
Link copied to clipboard
@SerialName(value = "prompt_cache_key")
val promptCacheKey: String? = null

Cache routing key.

Link copied to clipboard
@SerialName(value = "prompt_cache_options")
val promptCacheOptions: ResponsePromptCacheOptions? = null

Effective cache options.

Link copied to clipboard
val rawData: JsonObject? = null

Original decoded payload, including unknown fields. This snapshot is unchanged by copy. Encoding a ResponseResult writes its typed properties only; encode this snapshot directly to export every original field or reuse the original output as continuation input.

Link copied to clipboard
@SerialName(value = "reasoning")
val reasoning: ResponseReasoningOptions? = null
Link copied to clipboard
@SerialName(value = "safety_identifier")
val safetyIdentifier: String? = null

End-user safety identifier.

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

Actual processing tier.

Link copied to clipboard
@SerialName(value = "status")
val status: String? = null
Link copied to clipboard
@SerialName(value = "store")
val store: Boolean? = null
Link copied to clipboard
@SerialName(value = "temperature")
val temperature: Double? = null
Link copied to clipboard
@SerialName(value = "text")
val text: JsonObject? = null
Link copied to clipboard
@SerialName(value = "tool_choice")
val toolChoice: JsonElement? = null
Link copied to clipboard
@SerialName(value = "tools")
val tools: JsonElement? = null
Link copied to clipboard
@SerialName(value = "top_logprobs")
val topLogprobs: Int? = null

Requested token log probability count.

Link copied to clipboard
@SerialName(value = "top_p")
val topP: Double? = null
Link copied to clipboard
@SerialName(value = "truncation")
val truncation: String? = null
Link copied to clipboard
@SerialName(value = "usage")
val usage: ResponseUsage? = null
Link copied to clipboard
@SerialName(value = "user")
val user: String? = null