Package-level declarations

Types

Link copied to clipboard
@Serializable
data class Response(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<ResponseOutputItem> = emptyList(), val parallelToolCalls: Boolean? = null, val previousResponseId: ResponseId? = null, val reasoning: ResponseReasoning? = 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)

A model response object.

Link copied to clipboard
@Serializable
value class ResponseId(val id: String)

The response identifier.

Link copied to clipboard
@Serializable(with = ResponseInput.Serializer::class)
data class ResponseInput(val value: JsonElement)

Input for a response request.

Link copied to clipboard
@Serializable
data class ResponseInputItem(val id: String? = null, val type: String? = null, val status: String? = null, val role: String? = null, val content: JsonElement? = null)

Structured response input item.

Link copied to clipboard
@Serializable
data class ResponseInputTokensDetails(val cachedTokens: Int? = null)

Input token details.

Link copied to clipboard
@Serializable
data class ResponseOutputContent(val type: String? = null, val text: String? = null, val annotations: List<ChatAnnotation>? = null, val refusal: String? = null, val reasoning: JsonElement? = null, val reasoningContent: String? = null)

Content item inside a response output message.

Link copied to clipboard
@Serializable
data class ResponseOutputItem(val id: String? = null, val type: String? = null, val status: String? = null, val role: String? = null, val content: List<ResponseOutputContent>? = null, val name: String? = null, val arguments: String? = null, val callId: String? = null, val summary: JsonElement? = null)

Output item from a response.

Link copied to clipboard
@Serializable
data class ResponseOutputTokensDetails(val reasoningTokens: Int? = null)

Output token details.

Link copied to clipboard
@Serializable
data class ResponseReasoning(val effort: Effort? = null)

Reasoning configuration for response requests.

Link copied to clipboard
@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.

Link copied to clipboard
@Serializable
data class ResponseText(val format: ChatResponseFormat? = null)

Text output configuration for response requests.

Link copied to clipboard
@Serializable
data class ResponseTool(val type: String, val name: String? = null, val description: String? = null, val parameters: Parameters? = null, val strict: Boolean? = null, val searchContextSize: SearchContextSize? = null, val userLocation: UserLocation? = null)

Tool declaration for response requests.

Link copied to clipboard
@Serializable
data class ResponseUsage(val inputTokens: Int? = null, val inputTokensDetails: ResponseInputTokensDetails? = null, val outputTokens: Int? = null, val outputTokensDetails: ResponseOutputTokensDetails? = null, val totalTokens: Int? = null)

Token usage for a response.