diff --git a/.speakeasy/in.openapi.yaml b/.speakeasy/in.openapi.yaml index 34b80486..009546f7 100644 --- a/.speakeasy/in.openapi.yaml +++ b/.speakeasy/in.openapi.yaml @@ -12,7 +12,7 @@ info: url: https://opensource.org/licenses/MIT components: schemas: - FileCitationAnnotation: + FileCitation: type: object properties: type: @@ -35,7 +35,7 @@ components: file_id: file-abc123 filename: research_paper.pdf index: 0 - URLCitationAnnotation: + URLCitation: type: object properties: type: @@ -62,7 +62,7 @@ components: end_index: 42 title: OpenRouter Documentation url: https://openrouter.ai/docs - FilePathAnnotation: + FilePath: type: object properties: type: @@ -81,7 +81,12 @@ components: type: file_path file_id: file-xyz789 index: 0 - OutputTextContent: + OpenAIResponsesAnnotation: + anyOf: + - $ref: '#/components/schemas/FileCitation' + - $ref: '#/components/schemas/URLCitation' + - $ref: '#/components/schemas/FilePath' + ResponseOutputText: type: object properties: type: @@ -93,10 +98,7 @@ components: annotations: type: array items: - anyOf: - - $ref: '#/components/schemas/FileCitationAnnotation' - - $ref: '#/components/schemas/URLCitationAnnotation' - - $ref: '#/components/schemas/FilePathAnnotation' + $ref: '#/components/schemas/OpenAIResponsesAnnotation' required: - type - text @@ -109,7 +111,7 @@ components: end_index: 42 title: Paris - Wikipedia url: https://en.wikipedia.org/wiki/Paris - RefusalContent: + OpenAIResponsesRefusalContent: type: object properties: type: @@ -152,13 +154,12 @@ components: type: array items: anyOf: - - $ref: '#/components/schemas/OutputTextContent' - - $ref: '#/components/schemas/RefusalContent' + - $ref: '#/components/schemas/ResponseOutputText' + - $ref: '#/components/schemas/OpenAIResponsesRefusalContent' required: - id - role - type - - status - content example: id: msg-abc123 @@ -168,6 +169,21 @@ components: content: - type: output_text text: Hello! How can I help you today? + OpenResponsesOutputMessage: + allOf: + - $ref: '#/components/schemas/OutputMessage' + - type: object + properties: {} + description: An output message item + example: + id: msg-123 + type: message + role: assistant + status: completed + content: + - type: output_text + text: Hello! How can I help you? + annotations: [] ReasoningTextContent: type: object properties: @@ -218,6 +234,17 @@ components: encrypted_content: type: string nullable: true + status: + anyOf: + - type: string + enum: + - completed + - type: string + enum: + - incomplete + - type: string + enum: + - in_progress required: - type - id @@ -228,6 +255,22 @@ components: summary: - type: summary_text text: Analyzed the problem using first principles + OpenResponsesOutputItemReasoning: + allOf: + - $ref: '#/components/schemas/OutputItemReasoning' + - type: object + properties: {} + description: An output item containing reasoning + example: + id: reasoning-123 + type: reasoning + status: completed + summary: + - type: summary_text + text: Analyzed the problem and found the optimal solution. + content: + - type: reasoning_text + text: First, we analyze the problem... OutputItemFunctionCall: type: object properties: @@ -243,6 +286,17 @@ components: type: string call_id: type: string + status: + anyOf: + - type: string + enum: + - completed + - type: string + enum: + - incomplete + - type: string + enum: + - in_progress required: - type - name @@ -342,28 +396,8 @@ components: status: completed ResponsesOutputItem: anyOf: - - allOf: - - $ref: '#/components/schemas/OutputMessage' - - type: object - properties: {} - example: - id: msg-abc123 - role: assistant - type: message - status: completed - content: - - type: output_text - text: Hello! How can I help you today? - - allOf: - - $ref: '#/components/schemas/OutputItemReasoning' - - type: object - properties: {} - example: - type: reasoning - id: reasoning-abc123 - summary: - - type: summary_text - text: Analyzed the problem using first principles + - $ref: '#/components/schemas/OpenResponsesOutputMessage' + - $ref: '#/components/schemas/OpenResponsesOutputItemReasoning' - allOf: - $ref: '#/components/schemas/OutputItemFunctionCall' - type: object @@ -421,6 +455,21 @@ components: - server_error - rate_limit_exceeded - invalid_prompt + - vector_store_timeout + - invalid_image + - invalid_image_format + - invalid_base64_image + - invalid_image_url + - image_too_large + - image_too_small + - image_parse_error + - image_content_policy_violation + - invalid_image_mode + - image_file_too_large + - unsupported_image_media_type + - empty_image_file + - failed_to_download_image + - image_file_not_found message: type: string required: @@ -430,89 +479,7 @@ components: example: code: rate_limit_exceeded message: Rate limit exceeded. Please try again later. - ResponsesUsage: - type: object - properties: - input_tokens: - type: number - input_tokens_details: - type: object - properties: - cached_tokens: - type: number - required: - - cached_tokens - output_tokens: - type: number - output_tokens_details: - type: object - properties: - reasoning_tokens: - type: number - required: - - reasoning_tokens - total_tokens: - type: number - cost: - type: number - nullable: true - description: Cost of the completion - is_byok: - type: boolean - description: Whether a request was made using a Bring Your Own Key configuration - cost_details: - type: object - properties: - upstream_inference_cost: - type: number - nullable: true - upstream_inference_input_cost: - type: number - upstream_inference_output_cost: - type: number - required: - - upstream_inference_input_cost - - upstream_inference_output_cost - required: - - input_tokens - - input_tokens_details - - output_tokens - - output_tokens_details - - total_tokens - description: Token usage information for the response - example: - input_tokens: 10 - output_tokens: 25 - total_tokens: 35 - input_tokens_details: - cached_tokens: 0 - output_tokens_details: - reasoning_tokens: 0 - cost: 0.0012 - OpenResponsesReasoning: - allOf: - - $ref: '#/components/schemas/OutputItemReasoning' - - type: object - properties: - signature: - type: string - nullable: true - format: - type: string - nullable: true - enum: - - unknown - - openai-responses-v1 - - xai-responses-v1 - - anthropic-claude-v1 - description: Reasoning output item with signature and format extensions - example: - type: reasoning - id: reasoning-abc123 - summary: - - type: summary_text - text: Step by step analysis - OpenResponsesInputText: + ResponseInputText: type: object properties: type: @@ -528,7 +495,7 @@ components: example: type: input_text text: Hello, how can I help you? - OpenResponsesInputImage: + ResponseInputImage: type: object properties: type: @@ -552,7 +519,7 @@ components: type: input_image detail: auto image_url: https://example.com/image.jpg - OpenResponsesInputFile: + ResponseInputFile: type: object properties: type: @@ -575,91 +542,6 @@ components: type: input_file file_id: file-abc123 filename: document.pdf - OpenResponsesInputContent: - oneOf: - - $ref: '#/components/schemas/OpenResponsesInputText' - - $ref: '#/components/schemas/OpenResponsesInputImage' - - $ref: '#/components/schemas/OpenResponsesInputFile' - discriminator: - propertyName: type - mapping: - input_text: '#/components/schemas/OpenResponsesInputText' - input_image: '#/components/schemas/OpenResponsesInputImage' - input_file: '#/components/schemas/OpenResponsesInputFile' - description: Content item in a response input message - example: - type: input_text - text: Hello, how can I help you? - OpenResponsesEasyInputMessage: - type: object - properties: - type: - type: string - enum: - - message - role: - anyOf: - - type: string - enum: - - user - - type: string - enum: - - system - - type: string - enum: - - assistant - - type: string - enum: - - developer - content: - anyOf: - - type: array - items: - $ref: '#/components/schemas/OpenResponsesInputContent' - - type: string - required: - - role - - content - description: Simplified input message format that accepts string or array content - example: - role: user - content: What is the weather today? - OpenResponsesInputMessageItem: - type: object - properties: - id: - type: string - type: - type: string - enum: - - message - role: - anyOf: - - type: string - enum: - - user - - type: string - enum: - - system - - type: string - enum: - - developer - content: - type: array - items: - $ref: '#/components/schemas/OpenResponsesInputContent' - required: - - id - - role - - content - description: Input message item with structured content array - example: - id: msg-abc123 - type: message - role: user - content: - - type: input_text - text: What is the weather today? ToolCallStatus: type: string enum: @@ -667,217 +549,77 @@ components: - completed - incomplete example: completed - OpenResponsesFunctionToolCall: + OpenResponsesRequestMetadata: + type: object + nullable: true + additionalProperties: + type: string + maxLength: 512 + description: >- + Metadata key-value pairs for the request. Keys must be ≤64 characters and cannot contain brackets. Values must + be ≤512 characters. Maximum 16 pairs allowed. + example: + user_id: '123' + session_id: abc-def-ghi + OpenResponsesFunctionTool: type: object properties: type: type: string enum: - - function_call - call_id: - type: string + - function name: type: string - arguments: - type: string - id: + description: type: string - status: - $ref: '#/components/schemas/ToolCallStatus' + nullable: true + strict: + type: boolean + nullable: true + parameters: + type: object + nullable: true + additionalProperties: + nullable: true required: - type - - call_id - name - - arguments - - id - description: A function call initiated by the model + - parameters + description: Function tool definition example: - id: call-abc123 - type: function_call - call_id: call-abc123 + type: function name: get_weather - arguments: '{"location":"San Francisco"}' - status: completed - OpenResponsesFunctionCallOutput: + description: Get the current weather in a location + parameters: + type: object + properties: + location: + type: string + description: The city and state + unit: + type: string + enum: + - celsius + - fahrenheit + required: + - location + ResponsesSearchContextSize: + type: string + enum: + - low + - medium + - high + description: Size of the search context for web search tools + example: medium + ResponsesWebSearchUserLocation: type: object + nullable: true properties: type: type: string enum: - - function_call_output - id: - type: string - call_id: - type: string - output: - type: string - status: - $ref: '#/components/schemas/ToolCallStatus' - required: - - type - - id - - call_id - - output - description: The output from a function call execution - example: - type: function_call_output - id: output-abc123 - call_id: call-abc123 - output: '{"temperature":72,"conditions":"sunny"}' - status: completed - OpenResponsesInputItem: - anyOf: - - $ref: '#/components/schemas/OpenResponsesReasoning' - - $ref: '#/components/schemas/OpenResponsesEasyInputMessage' - - $ref: '#/components/schemas/OpenResponsesInputMessageItem' - - $ref: '#/components/schemas/OpenResponsesFunctionToolCall' - - $ref: '#/components/schemas/OpenResponsesFunctionCallOutput' - - allOf: - - $ref: '#/components/schemas/OutputMessage' - - type: object - properties: {} - example: - id: msg-abc123 - role: assistant - type: message - status: completed - content: - - type: output_text - text: Hello! How can I help you today? - - allOf: - - $ref: '#/components/schemas/OutputItemReasoning' - - type: object - properties: {} - example: - type: reasoning - id: reasoning-abc123 - summary: - - type: summary_text - text: Analyzed the problem using first principles - - allOf: - - $ref: '#/components/schemas/OutputItemFunctionCall' - - type: object - properties: {} - example: - type: function_call - id: call-abc123 - name: get_weather - arguments: '{"location":"San Francisco","unit":"celsius"}' - call_id: call-abc123 - - allOf: - - $ref: '#/components/schemas/OutputItemWebSearchCall' - - type: object - properties: {} - example: - type: web_search_call - id: search-abc123 - status: completed - - allOf: - - $ref: '#/components/schemas/OutputItemFileSearchCall' - - type: object - properties: {} - example: - type: file_search_call - id: filesearch-abc123 - queries: - - machine learning algorithms - - neural networks - status: completed - - allOf: - - $ref: '#/components/schemas/OutputItemImageGenerationCall' - - type: object - properties: {} - example: - type: image_generation_call - id: imagegen-abc123 - result: iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mNk+M9QDwADhgGAWjR9awAAAABJRU5ErkJggg== - status: completed - description: An item in the input array for a response request - example: - role: user - content: What is the weather today? - OpenResponsesInput: - anyOf: - - type: string - - type: array - items: - $ref: '#/components/schemas/OpenResponsesInputItem' - - nullable: true - description: Input for a response request - can be a string or array of items - example: - - role: user - content: What is the weather today? - OpenResponsesRequestMetadata: - type: object - nullable: true - additionalProperties: - type: string - maxLength: 512 - description: >- - Metadata key-value pairs for the request. Keys must be ≤64 characters and cannot contain brackets. Values must - be ≤512 characters. Maximum 16 pairs allowed. - example: - user_id: '123' - session_id: abc-def-ghi - OpenResponsesFunctionTool: - type: object - properties: - type: - type: string - enum: - - function - name: - type: string - description: - type: string - nullable: true - strict: - type: boolean - nullable: true - parameters: - type: object - nullable: true - additionalProperties: - nullable: true - required: - - type - - name - - parameters - description: Function tool definition - example: - type: function - name: get_weather - description: Get the current weather in a location - parameters: - type: object - properties: - location: - type: string - description: The city and state - unit: - type: string - enum: - - celsius - - fahrenheit - required: - - location - ResponsesSearchContextSize: - type: string - enum: - - low - - medium - - high - description: Size of the search context for web search tools - example: medium - ResponsesWebSearchUserLocation: - type: object - nullable: true - properties: - type: - type: string - enum: - - approximate - city: + - approximate + city: type: string nullable: true country: @@ -986,116 +728,7 @@ components: filters: allowed_domains: - example.com - OpenResponsesToolUnion: - oneOf: - - allOf: - - $ref: '#/components/schemas/OpenResponsesFunctionTool' - - type: object - properties: {} - description: Function tool definition - example: - type: function - name: get_weather - description: Get the current weather in a location - parameters: - type: object - properties: - location: - type: string - description: The city and state - unit: - type: string - enum: - - celsius - - fahrenheit - required: - - location - - $ref: '#/components/schemas/OpenResponsesWebSearchPreviewTool' - - $ref: '#/components/schemas/OpenResponsesWebSearchPreview20250311Tool' - - $ref: '#/components/schemas/OpenResponsesWebSearchTool' - - $ref: '#/components/schemas/OpenResponsesWebSearch20250826Tool' - description: Union of all supported tool definitions - example: - type: function - name: get_weather - description: Get the current weather in a location - parameters: - type: object - properties: - location: - type: string - description: The city and state - unit: - type: string - enum: - - celsius - - fahrenheit - required: - - location - ToolChoiceTypes: - type: object - properties: - type: - anyOf: - - type: string - enum: - - file_search - - type: string - enum: - - web_search_preview - - type: string - enum: - - web_search_preview_2025_03_11 - - type: string - enum: - - computer_use_preview - - type: string - enum: - - code_interpreter - required: - - type - description: Force the model to call a tool of a specific type - example: - type: web_search_preview - ToolChoiceFunction: - type: object - properties: - type: - type: string - enum: - - function - name: - type: string - required: - - type - - name - description: Force the model to call a specific function - example: - type: function - name: get_weather - OpenResponsesToolChoice: - anyOf: - - type: string - enum: - - auto - - type: string - enum: - - none - - type: string - enum: - - required - - $ref: '#/components/schemas/ToolChoiceTypes' - - allOf: - - $ref: '#/components/schemas/ToolChoiceFunction' - - type: object - properties: {} - description: Force the model to call a specific function - example: - type: function - name: get_weather - description: Controls which tool the model should call - example: auto - OpenResponsesPrompt: + OpenAIResponsesPrompt: type: object nullable: true properties: @@ -1105,50 +738,28 @@ components: type: object nullable: true additionalProperties: - $ref: '#/components/schemas/OpenResponsesInputContent' + oneOf: + - $ref: '#/components/schemas/ResponseInputText' + - $ref: '#/components/schemas/ResponseInputImage' + - $ref: '#/components/schemas/ResponseInputFile' + discriminator: + propertyName: type + mapping: + input_text: '#/components/schemas/ResponseInputText' + input_image: '#/components/schemas/ResponseInputImage' + input_file: '#/components/schemas/ResponseInputFile' required: - id - description: Prompt template with variables for the response - example: - id: prompt-abc123 - variables: - name: - type: input_text - text: John ReasoningSummaryVerbosity: type: string enum: - auto - concise - detailed - OpenResponsesReasoningConfig: + ResponsesFormatText: type: object - nullable: true properties: - effort: - type: string - nullable: true - enum: - - high - - medium - - low - - minimal - summary: - $ref: '#/components/schemas/ReasoningSummaryVerbosity' - max_tokens: - type: number - nullable: true - enabled: - type: boolean - nullable: true - description: Configuration for reasoning mode in the response - example: - summary: auto - enabled: true - OpenResponsesFormatText: - type: object - properties: - type: + type: type: string enum: - text @@ -1157,7 +768,7 @@ components: description: Plain text response format example: type: text - OpenResponsesFormatJSONObject: + ResponsesFormatJSONObject: type: object properties: type: @@ -1169,7 +780,7 @@ components: description: JSON object response format example: type: json_object - OpenResponsesFormatJSONSchema: + ResponsesFormatTextJSONSchemaConfig: type: object properties: type: @@ -1205,19 +816,19 @@ components: type: number required: - name - OpenResponsesFormatTextConfig: + ResponseFormatTextConfig: anyOf: - - $ref: '#/components/schemas/OpenResponsesFormatText' - - $ref: '#/components/schemas/OpenResponsesFormatJSONObject' - - $ref: '#/components/schemas/OpenResponsesFormatJSONSchema' + - $ref: '#/components/schemas/ResponsesFormatText' + - $ref: '#/components/schemas/ResponsesFormatJSONObject' + - $ref: '#/components/schemas/ResponsesFormatTextJSONSchemaConfig' description: Text response format configuration example: type: text - OpenResponsesTextConfig: + ResponseTextConfig: type: object properties: format: - $ref: '#/components/schemas/OpenResponsesFormatTextConfig' + $ref: '#/components/schemas/ResponseFormatTextConfig' verbosity: type: string nullable: true @@ -1279,7 +890,34 @@ components: - max_output_tokens - content_filter usage: - $ref: '#/components/schemas/ResponsesUsage' + type: object + properties: + input_tokens: + type: number + input_tokens_details: + type: object + properties: + cached_tokens: + type: number + required: + - cached_tokens + output_tokens: + type: number + output_tokens_details: + type: object + properties: + reasoning_tokens: + type: number + required: + - reasoning_tokens + total_tokens: + type: number + required: + - input_tokens + - input_tokens_details + - output_tokens + - output_tokens_details + - total_tokens max_tool_calls: type: number nullable: true @@ -1295,19 +933,198 @@ components: type: number nullable: true instructions: - $ref: '#/components/schemas/OpenResponsesInput' + anyOf: + - type: string + - type: array + items: + anyOf: + - type: object + properties: + type: + type: string + enum: + - message + role: + anyOf: + - type: string + enum: + - user + - type: string + enum: + - system + - type: string + enum: + - assistant + - type: string + enum: + - developer + content: + anyOf: + - type: array + items: + oneOf: + - $ref: '#/components/schemas/ResponseInputText' + - $ref: '#/components/schemas/ResponseInputImage' + - $ref: '#/components/schemas/ResponseInputFile' + discriminator: + propertyName: type + mapping: + input_text: '#/components/schemas/ResponseInputText' + input_image: '#/components/schemas/ResponseInputImage' + input_file: '#/components/schemas/ResponseInputFile' + - type: string + required: + - role + - content + - type: object + properties: + id: + type: string + type: + type: string + enum: + - message + role: + anyOf: + - type: string + enum: + - user + - type: string + enum: + - system + - type: string + enum: + - developer + content: + type: array + items: + oneOf: + - $ref: '#/components/schemas/ResponseInputText' + - $ref: '#/components/schemas/ResponseInputImage' + - $ref: '#/components/schemas/ResponseInputFile' + discriminator: + propertyName: type + mapping: + input_text: '#/components/schemas/ResponseInputText' + input_image: '#/components/schemas/ResponseInputImage' + input_file: '#/components/schemas/ResponseInputFile' + required: + - id + - role + - content + - type: object + properties: + type: + type: string + enum: + - function_call_output + id: + type: string + call_id: + type: string + output: + type: string + status: + $ref: '#/components/schemas/ToolCallStatus' + required: + - type + - id + - call_id + - output + - type: object + properties: + type: + type: string + enum: + - function_call + call_id: + type: string + name: + type: string + arguments: + type: string + id: + type: string + status: + $ref: '#/components/schemas/ToolCallStatus' + required: + - type + - call_id + - name + - arguments + - $ref: '#/components/schemas/OutputItemImageGenerationCall' + - $ref: '#/components/schemas/OutputMessage' + - nullable: true metadata: $ref: '#/components/schemas/OpenResponsesRequestMetadata' tools: type: array items: - $ref: '#/components/schemas/OpenResponsesToolUnion' + oneOf: + - allOf: + - $ref: '#/components/schemas/OpenResponsesFunctionTool' + - type: object + properties: {} + description: Function tool definition + example: + type: function + name: get_weather + description: Get the current weather in a location + parameters: + type: object + properties: + location: + type: string + description: The city and state + unit: + type: string + enum: + - celsius + - fahrenheit + required: + - location + - $ref: '#/components/schemas/OpenResponsesWebSearchPreviewTool' + - $ref: '#/components/schemas/OpenResponsesWebSearchPreview20250311Tool' + - $ref: '#/components/schemas/OpenResponsesWebSearchTool' + - $ref: '#/components/schemas/OpenResponsesWebSearch20250826Tool' tool_choice: - $ref: '#/components/schemas/OpenResponsesToolChoice' + anyOf: + - type: string + enum: + - auto + - type: string + enum: + - none + - type: string + enum: + - required + - type: object + properties: + type: + type: string + enum: + - function + name: + type: string + required: + - type + - name + - type: object + properties: + type: + anyOf: + - type: string + enum: + - web_search_preview_2025_03_11 + - type: string + enum: + - web_search_preview + required: + - type parallel_tool_calls: type: boolean prompt: - $ref: '#/components/schemas/OpenResponsesPrompt' + $ref: '#/components/schemas/OpenAIResponsesPrompt' background: type: boolean nullable: true @@ -1315,7 +1132,19 @@ components: type: string nullable: true reasoning: - $ref: '#/components/schemas/OpenResponsesReasoningConfig' + type: object + nullable: true + properties: + effort: + type: string + nullable: true + enum: + - high + - medium + - low + - minimal + summary: + $ref: '#/components/schemas/ReasoningSummaryVerbosity' service_tier: type: string nullable: true @@ -1334,8 +1163,9 @@ components: - auto - disabled text: - $ref: '#/components/schemas/OpenResponsesTextConfig' + $ref: '#/components/schemas/ResponseTextConfig' required: + - id - object - created_at - model @@ -1391,7 +1221,358 @@ components: enum: - response.created response: - $ref: '#/components/schemas/OpenResponsesNonStreamingResponse' + type: object + properties: + id: + type: string + object: + type: string + enum: + - response + created_at: + type: number + model: + type: string + status: + type: string + enum: + - completed + - incomplete + - in_progress + - failed + - cancelled + - queued + output: + type: array + items: + oneOf: + - $ref: '#/components/schemas/OutputMessage' + - $ref: '#/components/schemas/OutputItemReasoning' + - $ref: '#/components/schemas/OutputItemFunctionCall' + - $ref: '#/components/schemas/OutputItemWebSearchCall' + - $ref: '#/components/schemas/OutputItemFileSearchCall' + - $ref: '#/components/schemas/OutputItemImageGenerationCall' + discriminator: + propertyName: type + mapping: + message: '#/components/schemas/OutputMessage' + reasoning: '#/components/schemas/OutputItemReasoning' + function_call: '#/components/schemas/OutputItemFunctionCall' + web_search_call: '#/components/schemas/OutputItemWebSearchCall' + file_search_call: '#/components/schemas/OutputItemFileSearchCall' + image_generation_call: '#/components/schemas/OutputItemImageGenerationCall' + user: + type: string + nullable: true + output_text: + type: string + prompt_cache_key: + type: string + nullable: true + safety_identifier: + type: string + nullable: true + error: + $ref: '#/components/schemas/ResponsesErrorField' + incomplete_details: + type: object + nullable: true + properties: + reason: + type: string + enum: + - max_output_tokens + - content_filter + usage: + type: object + properties: + input_tokens: + type: number + input_tokens_details: + type: object + properties: + cached_tokens: + type: number + required: + - cached_tokens + output_tokens: + type: number + output_tokens_details: + type: object + properties: + reasoning_tokens: + type: number + required: + - reasoning_tokens + total_tokens: + type: number + required: + - input_tokens + - input_tokens_details + - output_tokens + - output_tokens_details + - total_tokens + max_tool_calls: + type: number + nullable: true + top_logprobs: + type: number + max_output_tokens: + type: number + nullable: true + temperature: + type: number + nullable: true + top_p: + type: number + nullable: true + instructions: + anyOf: + - type: string + - type: array + items: + anyOf: + - type: object + properties: + type: + type: string + enum: + - message + role: + anyOf: + - type: string + enum: + - user + - type: string + enum: + - system + - type: string + enum: + - assistant + - type: string + enum: + - developer + content: + anyOf: + - type: array + items: + oneOf: + - $ref: '#/components/schemas/ResponseInputText' + - $ref: '#/components/schemas/ResponseInputImage' + - $ref: '#/components/schemas/ResponseInputFile' + discriminator: + propertyName: type + mapping: + input_text: '#/components/schemas/ResponseInputText' + input_image: '#/components/schemas/ResponseInputImage' + input_file: '#/components/schemas/ResponseInputFile' + - type: string + required: + - role + - content + - type: object + properties: + id: + type: string + type: + type: string + enum: + - message + role: + anyOf: + - type: string + enum: + - user + - type: string + enum: + - system + - type: string + enum: + - developer + content: + type: array + items: + oneOf: + - $ref: '#/components/schemas/ResponseInputText' + - $ref: '#/components/schemas/ResponseInputImage' + - $ref: '#/components/schemas/ResponseInputFile' + discriminator: + propertyName: type + mapping: + input_text: '#/components/schemas/ResponseInputText' + input_image: '#/components/schemas/ResponseInputImage' + input_file: '#/components/schemas/ResponseInputFile' + required: + - id + - role + - content + - type: object + properties: + type: + type: string + enum: + - function_call_output + id: + type: string + call_id: + type: string + output: + type: string + status: + $ref: '#/components/schemas/ToolCallStatus' + required: + - type + - id + - call_id + - output + - type: object + properties: + type: + type: string + enum: + - function_call + call_id: + type: string + name: + type: string + arguments: + type: string + id: + type: string + status: + $ref: '#/components/schemas/ToolCallStatus' + required: + - type + - call_id + - name + - arguments + - $ref: '#/components/schemas/OutputItemImageGenerationCall' + - $ref: '#/components/schemas/OutputMessage' + - nullable: true + metadata: + $ref: '#/components/schemas/OpenResponsesRequestMetadata' + tools: + type: array + items: + oneOf: + - allOf: + - $ref: '#/components/schemas/OpenResponsesFunctionTool' + - type: object + properties: {} + description: Function tool definition + example: + type: function + name: get_weather + description: Get the current weather in a location + parameters: + type: object + properties: + location: + type: string + description: The city and state + unit: + type: string + enum: + - celsius + - fahrenheit + required: + - location + - $ref: '#/components/schemas/OpenResponsesWebSearchPreviewTool' + - $ref: '#/components/schemas/OpenResponsesWebSearchPreview20250311Tool' + - $ref: '#/components/schemas/OpenResponsesWebSearchTool' + - $ref: '#/components/schemas/OpenResponsesWebSearch20250826Tool' + tool_choice: + anyOf: + - type: string + enum: + - auto + - type: string + enum: + - none + - type: string + enum: + - required + - type: object + properties: + type: + type: string + enum: + - function + name: + type: string + required: + - type + - name + - type: object + properties: + type: + anyOf: + - type: string + enum: + - web_search_preview_2025_03_11 + - type: string + enum: + - web_search_preview + required: + - type + parallel_tool_calls: + type: boolean + prompt: + $ref: '#/components/schemas/OpenAIResponsesPrompt' + background: + type: boolean + nullable: true + previous_response_id: + type: string + nullable: true + reasoning: + type: object + nullable: true + properties: + effort: + type: string + nullable: true + enum: + - high + - medium + - low + - minimal + summary: + $ref: '#/components/schemas/ReasoningSummaryVerbosity' + service_tier: + type: string + nullable: true + enum: + - auto + - default + - flex + - priority + - scale + store: + type: boolean + truncation: + type: string + nullable: true + enum: + - auto + - disabled + text: + $ref: '#/components/schemas/ResponseTextConfig' + required: + - id + - object + - created_at + - model + - output + - error + - incomplete_details + - temperature + - top_p + - instructions + - metadata + - tools + - tool_choice + - parallel_tool_calls sequence_number: type: number required: @@ -1427,43 +1608,745 @@ components: enum: - response.in_progress response: - $ref: '#/components/schemas/OpenResponsesNonStreamingResponse' - sequence_number: - type: number - required: - - type - - response - - sequence_number - description: Event emitted when a response is in progress - example: - type: response.in_progress - response: - id: resp-abc123 - object: response - created_at: 1704067200 - model: gpt-4 - status: in_progress - output: [] - tools: [] - tool_choice: auto - parallel_tool_calls: true - error: null - incomplete_details: null - metadata: null - instructions: null - temperature: null - top_p: null - max_output_tokens: null - sequence_number: 1 - OpenResponsesCompletedEvent: - type: object - properties: - type: + type: object + properties: + id: + type: string + object: + type: string + enum: + - response + created_at: + type: number + model: + type: string + status: + type: string + enum: + - completed + - incomplete + - in_progress + - failed + - cancelled + - queued + output: + type: array + items: + oneOf: + - $ref: '#/components/schemas/OutputMessage' + - $ref: '#/components/schemas/OutputItemReasoning' + - $ref: '#/components/schemas/OutputItemFunctionCall' + - $ref: '#/components/schemas/OutputItemWebSearchCall' + - $ref: '#/components/schemas/OutputItemFileSearchCall' + - $ref: '#/components/schemas/OutputItemImageGenerationCall' + discriminator: + propertyName: type + mapping: + message: '#/components/schemas/OutputMessage' + reasoning: '#/components/schemas/OutputItemReasoning' + function_call: '#/components/schemas/OutputItemFunctionCall' + web_search_call: '#/components/schemas/OutputItemWebSearchCall' + file_search_call: '#/components/schemas/OutputItemFileSearchCall' + image_generation_call: '#/components/schemas/OutputItemImageGenerationCall' + user: + type: string + nullable: true + output_text: + type: string + prompt_cache_key: + type: string + nullable: true + safety_identifier: + type: string + nullable: true + error: + $ref: '#/components/schemas/ResponsesErrorField' + incomplete_details: + type: object + nullable: true + properties: + reason: + type: string + enum: + - max_output_tokens + - content_filter + usage: + type: object + properties: + input_tokens: + type: number + input_tokens_details: + type: object + properties: + cached_tokens: + type: number + required: + - cached_tokens + output_tokens: + type: number + output_tokens_details: + type: object + properties: + reasoning_tokens: + type: number + required: + - reasoning_tokens + total_tokens: + type: number + required: + - input_tokens + - input_tokens_details + - output_tokens + - output_tokens_details + - total_tokens + max_tool_calls: + type: number + nullable: true + top_logprobs: + type: number + max_output_tokens: + type: number + nullable: true + temperature: + type: number + nullable: true + top_p: + type: number + nullable: true + instructions: + anyOf: + - type: string + - type: array + items: + anyOf: + - type: object + properties: + type: + type: string + enum: + - message + role: + anyOf: + - type: string + enum: + - user + - type: string + enum: + - system + - type: string + enum: + - assistant + - type: string + enum: + - developer + content: + anyOf: + - type: array + items: + oneOf: + - $ref: '#/components/schemas/ResponseInputText' + - $ref: '#/components/schemas/ResponseInputImage' + - $ref: '#/components/schemas/ResponseInputFile' + discriminator: + propertyName: type + mapping: + input_text: '#/components/schemas/ResponseInputText' + input_image: '#/components/schemas/ResponseInputImage' + input_file: '#/components/schemas/ResponseInputFile' + - type: string + required: + - role + - content + - type: object + properties: + id: + type: string + type: + type: string + enum: + - message + role: + anyOf: + - type: string + enum: + - user + - type: string + enum: + - system + - type: string + enum: + - developer + content: + type: array + items: + oneOf: + - $ref: '#/components/schemas/ResponseInputText' + - $ref: '#/components/schemas/ResponseInputImage' + - $ref: '#/components/schemas/ResponseInputFile' + discriminator: + propertyName: type + mapping: + input_text: '#/components/schemas/ResponseInputText' + input_image: '#/components/schemas/ResponseInputImage' + input_file: '#/components/schemas/ResponseInputFile' + required: + - id + - role + - content + - type: object + properties: + type: + type: string + enum: + - function_call_output + id: + type: string + call_id: + type: string + output: + type: string + status: + $ref: '#/components/schemas/ToolCallStatus' + required: + - type + - id + - call_id + - output + - type: object + properties: + type: + type: string + enum: + - function_call + call_id: + type: string + name: + type: string + arguments: + type: string + id: + type: string + status: + $ref: '#/components/schemas/ToolCallStatus' + required: + - type + - call_id + - name + - arguments + - $ref: '#/components/schemas/OutputItemImageGenerationCall' + - $ref: '#/components/schemas/OutputMessage' + - nullable: true + metadata: + $ref: '#/components/schemas/OpenResponsesRequestMetadata' + tools: + type: array + items: + oneOf: + - allOf: + - $ref: '#/components/schemas/OpenResponsesFunctionTool' + - type: object + properties: {} + description: Function tool definition + example: + type: function + name: get_weather + description: Get the current weather in a location + parameters: + type: object + properties: + location: + type: string + description: The city and state + unit: + type: string + enum: + - celsius + - fahrenheit + required: + - location + - $ref: '#/components/schemas/OpenResponsesWebSearchPreviewTool' + - $ref: '#/components/schemas/OpenResponsesWebSearchPreview20250311Tool' + - $ref: '#/components/schemas/OpenResponsesWebSearchTool' + - $ref: '#/components/schemas/OpenResponsesWebSearch20250826Tool' + tool_choice: + anyOf: + - type: string + enum: + - auto + - type: string + enum: + - none + - type: string + enum: + - required + - type: object + properties: + type: + type: string + enum: + - function + name: + type: string + required: + - type + - name + - type: object + properties: + type: + anyOf: + - type: string + enum: + - web_search_preview_2025_03_11 + - type: string + enum: + - web_search_preview + required: + - type + parallel_tool_calls: + type: boolean + prompt: + $ref: '#/components/schemas/OpenAIResponsesPrompt' + background: + type: boolean + nullable: true + previous_response_id: + type: string + nullable: true + reasoning: + type: object + nullable: true + properties: + effort: + type: string + nullable: true + enum: + - high + - medium + - low + - minimal + summary: + $ref: '#/components/schemas/ReasoningSummaryVerbosity' + service_tier: + type: string + nullable: true + enum: + - auto + - default + - flex + - priority + - scale + store: + type: boolean + truncation: + type: string + nullable: true + enum: + - auto + - disabled + text: + $ref: '#/components/schemas/ResponseTextConfig' + required: + - id + - object + - created_at + - model + - output + - error + - incomplete_details + - temperature + - top_p + - instructions + - metadata + - tools + - tool_choice + - parallel_tool_calls + sequence_number: + type: number + required: + - type + - response + - sequence_number + description: Event emitted when a response is in progress + example: + type: response.in_progress + response: + id: resp-abc123 + object: response + created_at: 1704067200 + model: gpt-4 + status: in_progress + output: [] + tools: [] + tool_choice: auto + parallel_tool_calls: true + error: null + incomplete_details: null + metadata: null + instructions: null + temperature: null + top_p: null + max_output_tokens: null + sequence_number: 1 + OpenResponsesCompletedEvent: + type: object + properties: + type: type: string enum: - response.completed response: - $ref: '#/components/schemas/OpenResponsesNonStreamingResponse' + type: object + properties: + id: + type: string + object: + type: string + enum: + - response + created_at: + type: number + model: + type: string + status: + type: string + enum: + - completed + - incomplete + - in_progress + - failed + - cancelled + - queued + output: + type: array + items: + oneOf: + - $ref: '#/components/schemas/OutputMessage' + - $ref: '#/components/schemas/OutputItemReasoning' + - $ref: '#/components/schemas/OutputItemFunctionCall' + - $ref: '#/components/schemas/OutputItemWebSearchCall' + - $ref: '#/components/schemas/OutputItemFileSearchCall' + - $ref: '#/components/schemas/OutputItemImageGenerationCall' + discriminator: + propertyName: type + mapping: + message: '#/components/schemas/OutputMessage' + reasoning: '#/components/schemas/OutputItemReasoning' + function_call: '#/components/schemas/OutputItemFunctionCall' + web_search_call: '#/components/schemas/OutputItemWebSearchCall' + file_search_call: '#/components/schemas/OutputItemFileSearchCall' + image_generation_call: '#/components/schemas/OutputItemImageGenerationCall' + user: + type: string + nullable: true + output_text: + type: string + prompt_cache_key: + type: string + nullable: true + safety_identifier: + type: string + nullable: true + error: + $ref: '#/components/schemas/ResponsesErrorField' + incomplete_details: + type: object + nullable: true + properties: + reason: + type: string + enum: + - max_output_tokens + - content_filter + usage: + type: object + properties: + input_tokens: + type: number + input_tokens_details: + type: object + properties: + cached_tokens: + type: number + required: + - cached_tokens + output_tokens: + type: number + output_tokens_details: + type: object + properties: + reasoning_tokens: + type: number + required: + - reasoning_tokens + total_tokens: + type: number + required: + - input_tokens + - input_tokens_details + - output_tokens + - output_tokens_details + - total_tokens + max_tool_calls: + type: number + nullable: true + top_logprobs: + type: number + max_output_tokens: + type: number + nullable: true + temperature: + type: number + nullable: true + top_p: + type: number + nullable: true + instructions: + anyOf: + - type: string + - type: array + items: + anyOf: + - type: object + properties: + type: + type: string + enum: + - message + role: + anyOf: + - type: string + enum: + - user + - type: string + enum: + - system + - type: string + enum: + - assistant + - type: string + enum: + - developer + content: + anyOf: + - type: array + items: + oneOf: + - $ref: '#/components/schemas/ResponseInputText' + - $ref: '#/components/schemas/ResponseInputImage' + - $ref: '#/components/schemas/ResponseInputFile' + discriminator: + propertyName: type + mapping: + input_text: '#/components/schemas/ResponseInputText' + input_image: '#/components/schemas/ResponseInputImage' + input_file: '#/components/schemas/ResponseInputFile' + - type: string + required: + - role + - content + - type: object + properties: + id: + type: string + type: + type: string + enum: + - message + role: + anyOf: + - type: string + enum: + - user + - type: string + enum: + - system + - type: string + enum: + - developer + content: + type: array + items: + oneOf: + - $ref: '#/components/schemas/ResponseInputText' + - $ref: '#/components/schemas/ResponseInputImage' + - $ref: '#/components/schemas/ResponseInputFile' + discriminator: + propertyName: type + mapping: + input_text: '#/components/schemas/ResponseInputText' + input_image: '#/components/schemas/ResponseInputImage' + input_file: '#/components/schemas/ResponseInputFile' + required: + - id + - role + - content + - type: object + properties: + type: + type: string + enum: + - function_call_output + id: + type: string + call_id: + type: string + output: + type: string + status: + $ref: '#/components/schemas/ToolCallStatus' + required: + - type + - id + - call_id + - output + - type: object + properties: + type: + type: string + enum: + - function_call + call_id: + type: string + name: + type: string + arguments: + type: string + id: + type: string + status: + $ref: '#/components/schemas/ToolCallStatus' + required: + - type + - call_id + - name + - arguments + - $ref: '#/components/schemas/OutputItemImageGenerationCall' + - $ref: '#/components/schemas/OutputMessage' + - nullable: true + metadata: + $ref: '#/components/schemas/OpenResponsesRequestMetadata' + tools: + type: array + items: + oneOf: + - allOf: + - $ref: '#/components/schemas/OpenResponsesFunctionTool' + - type: object + properties: {} + description: Function tool definition + example: + type: function + name: get_weather + description: Get the current weather in a location + parameters: + type: object + properties: + location: + type: string + description: The city and state + unit: + type: string + enum: + - celsius + - fahrenheit + required: + - location + - $ref: '#/components/schemas/OpenResponsesWebSearchPreviewTool' + - $ref: '#/components/schemas/OpenResponsesWebSearchPreview20250311Tool' + - $ref: '#/components/schemas/OpenResponsesWebSearchTool' + - $ref: '#/components/schemas/OpenResponsesWebSearch20250826Tool' + tool_choice: + anyOf: + - type: string + enum: + - auto + - type: string + enum: + - none + - type: string + enum: + - required + - type: object + properties: + type: + type: string + enum: + - function + name: + type: string + required: + - type + - name + - type: object + properties: + type: + anyOf: + - type: string + enum: + - web_search_preview_2025_03_11 + - type: string + enum: + - web_search_preview + required: + - type + parallel_tool_calls: + type: boolean + prompt: + $ref: '#/components/schemas/OpenAIResponsesPrompt' + background: + type: boolean + nullable: true + previous_response_id: + type: string + nullable: true + reasoning: + type: object + nullable: true + properties: + effort: + type: string + nullable: true + enum: + - high + - medium + - low + - minimal + summary: + $ref: '#/components/schemas/ReasoningSummaryVerbosity' + service_tier: + type: string + nullable: true + enum: + - auto + - default + - flex + - priority + - scale + store: + type: boolean + truncation: + type: string + nullable: true + enum: + - auto + - disabled + text: + $ref: '#/components/schemas/ResponseTextConfig' + required: + - id + - object + - created_at + - model + - output + - error + - incomplete_details + - temperature + - top_p + - instructions + - metadata + - tools + - tool_choice + - parallel_tool_calls sequence_number: type: number required: @@ -1507,7 +2390,358 @@ components: enum: - response.incomplete response: - $ref: '#/components/schemas/OpenResponsesNonStreamingResponse' + type: object + properties: + id: + type: string + object: + type: string + enum: + - response + created_at: + type: number + model: + type: string + status: + type: string + enum: + - completed + - incomplete + - in_progress + - failed + - cancelled + - queued + output: + type: array + items: + oneOf: + - $ref: '#/components/schemas/OutputMessage' + - $ref: '#/components/schemas/OutputItemReasoning' + - $ref: '#/components/schemas/OutputItemFunctionCall' + - $ref: '#/components/schemas/OutputItemWebSearchCall' + - $ref: '#/components/schemas/OutputItemFileSearchCall' + - $ref: '#/components/schemas/OutputItemImageGenerationCall' + discriminator: + propertyName: type + mapping: + message: '#/components/schemas/OutputMessage' + reasoning: '#/components/schemas/OutputItemReasoning' + function_call: '#/components/schemas/OutputItemFunctionCall' + web_search_call: '#/components/schemas/OutputItemWebSearchCall' + file_search_call: '#/components/schemas/OutputItemFileSearchCall' + image_generation_call: '#/components/schemas/OutputItemImageGenerationCall' + user: + type: string + nullable: true + output_text: + type: string + prompt_cache_key: + type: string + nullable: true + safety_identifier: + type: string + nullable: true + error: + $ref: '#/components/schemas/ResponsesErrorField' + incomplete_details: + type: object + nullable: true + properties: + reason: + type: string + enum: + - max_output_tokens + - content_filter + usage: + type: object + properties: + input_tokens: + type: number + input_tokens_details: + type: object + properties: + cached_tokens: + type: number + required: + - cached_tokens + output_tokens: + type: number + output_tokens_details: + type: object + properties: + reasoning_tokens: + type: number + required: + - reasoning_tokens + total_tokens: + type: number + required: + - input_tokens + - input_tokens_details + - output_tokens + - output_tokens_details + - total_tokens + max_tool_calls: + type: number + nullable: true + top_logprobs: + type: number + max_output_tokens: + type: number + nullable: true + temperature: + type: number + nullable: true + top_p: + type: number + nullable: true + instructions: + anyOf: + - type: string + - type: array + items: + anyOf: + - type: object + properties: + type: + type: string + enum: + - message + role: + anyOf: + - type: string + enum: + - user + - type: string + enum: + - system + - type: string + enum: + - assistant + - type: string + enum: + - developer + content: + anyOf: + - type: array + items: + oneOf: + - $ref: '#/components/schemas/ResponseInputText' + - $ref: '#/components/schemas/ResponseInputImage' + - $ref: '#/components/schemas/ResponseInputFile' + discriminator: + propertyName: type + mapping: + input_text: '#/components/schemas/ResponseInputText' + input_image: '#/components/schemas/ResponseInputImage' + input_file: '#/components/schemas/ResponseInputFile' + - type: string + required: + - role + - content + - type: object + properties: + id: + type: string + type: + type: string + enum: + - message + role: + anyOf: + - type: string + enum: + - user + - type: string + enum: + - system + - type: string + enum: + - developer + content: + type: array + items: + oneOf: + - $ref: '#/components/schemas/ResponseInputText' + - $ref: '#/components/schemas/ResponseInputImage' + - $ref: '#/components/schemas/ResponseInputFile' + discriminator: + propertyName: type + mapping: + input_text: '#/components/schemas/ResponseInputText' + input_image: '#/components/schemas/ResponseInputImage' + input_file: '#/components/schemas/ResponseInputFile' + required: + - id + - role + - content + - type: object + properties: + type: + type: string + enum: + - function_call_output + id: + type: string + call_id: + type: string + output: + type: string + status: + $ref: '#/components/schemas/ToolCallStatus' + required: + - type + - id + - call_id + - output + - type: object + properties: + type: + type: string + enum: + - function_call + call_id: + type: string + name: + type: string + arguments: + type: string + id: + type: string + status: + $ref: '#/components/schemas/ToolCallStatus' + required: + - type + - call_id + - name + - arguments + - $ref: '#/components/schemas/OutputItemImageGenerationCall' + - $ref: '#/components/schemas/OutputMessage' + - nullable: true + metadata: + $ref: '#/components/schemas/OpenResponsesRequestMetadata' + tools: + type: array + items: + oneOf: + - allOf: + - $ref: '#/components/schemas/OpenResponsesFunctionTool' + - type: object + properties: {} + description: Function tool definition + example: + type: function + name: get_weather + description: Get the current weather in a location + parameters: + type: object + properties: + location: + type: string + description: The city and state + unit: + type: string + enum: + - celsius + - fahrenheit + required: + - location + - $ref: '#/components/schemas/OpenResponsesWebSearchPreviewTool' + - $ref: '#/components/schemas/OpenResponsesWebSearchPreview20250311Tool' + - $ref: '#/components/schemas/OpenResponsesWebSearchTool' + - $ref: '#/components/schemas/OpenResponsesWebSearch20250826Tool' + tool_choice: + anyOf: + - type: string + enum: + - auto + - type: string + enum: + - none + - type: string + enum: + - required + - type: object + properties: + type: + type: string + enum: + - function + name: + type: string + required: + - type + - name + - type: object + properties: + type: + anyOf: + - type: string + enum: + - web_search_preview_2025_03_11 + - type: string + enum: + - web_search_preview + required: + - type + parallel_tool_calls: + type: boolean + prompt: + $ref: '#/components/schemas/OpenAIResponsesPrompt' + background: + type: boolean + nullable: true + previous_response_id: + type: string + nullable: true + reasoning: + type: object + nullable: true + properties: + effort: + type: string + nullable: true + enum: + - high + - medium + - low + - minimal + summary: + $ref: '#/components/schemas/ReasoningSummaryVerbosity' + service_tier: + type: string + nullable: true + enum: + - auto + - default + - flex + - priority + - scale + store: + type: boolean + truncation: + type: string + nullable: true + enum: + - auto + - disabled + text: + $ref: '#/components/schemas/ResponseTextConfig' + required: + - id + - object + - created_at + - model + - output + - error + - incomplete_details + - temperature + - top_p + - instructions + - metadata + - tools + - tool_choice + - parallel_tool_calls sequence_number: type: number required: @@ -1543,7 +2777,358 @@ components: enum: - response.failed response: - $ref: '#/components/schemas/OpenResponsesNonStreamingResponse' + type: object + properties: + id: + type: string + object: + type: string + enum: + - response + created_at: + type: number + model: + type: string + status: + type: string + enum: + - completed + - incomplete + - in_progress + - failed + - cancelled + - queued + output: + type: array + items: + oneOf: + - $ref: '#/components/schemas/OutputMessage' + - $ref: '#/components/schemas/OutputItemReasoning' + - $ref: '#/components/schemas/OutputItemFunctionCall' + - $ref: '#/components/schemas/OutputItemWebSearchCall' + - $ref: '#/components/schemas/OutputItemFileSearchCall' + - $ref: '#/components/schemas/OutputItemImageGenerationCall' + discriminator: + propertyName: type + mapping: + message: '#/components/schemas/OutputMessage' + reasoning: '#/components/schemas/OutputItemReasoning' + function_call: '#/components/schemas/OutputItemFunctionCall' + web_search_call: '#/components/schemas/OutputItemWebSearchCall' + file_search_call: '#/components/schemas/OutputItemFileSearchCall' + image_generation_call: '#/components/schemas/OutputItemImageGenerationCall' + user: + type: string + nullable: true + output_text: + type: string + prompt_cache_key: + type: string + nullable: true + safety_identifier: + type: string + nullable: true + error: + $ref: '#/components/schemas/ResponsesErrorField' + incomplete_details: + type: object + nullable: true + properties: + reason: + type: string + enum: + - max_output_tokens + - content_filter + usage: + type: object + properties: + input_tokens: + type: number + input_tokens_details: + type: object + properties: + cached_tokens: + type: number + required: + - cached_tokens + output_tokens: + type: number + output_tokens_details: + type: object + properties: + reasoning_tokens: + type: number + required: + - reasoning_tokens + total_tokens: + type: number + required: + - input_tokens + - input_tokens_details + - output_tokens + - output_tokens_details + - total_tokens + max_tool_calls: + type: number + nullable: true + top_logprobs: + type: number + max_output_tokens: + type: number + nullable: true + temperature: + type: number + nullable: true + top_p: + type: number + nullable: true + instructions: + anyOf: + - type: string + - type: array + items: + anyOf: + - type: object + properties: + type: + type: string + enum: + - message + role: + anyOf: + - type: string + enum: + - user + - type: string + enum: + - system + - type: string + enum: + - assistant + - type: string + enum: + - developer + content: + anyOf: + - type: array + items: + oneOf: + - $ref: '#/components/schemas/ResponseInputText' + - $ref: '#/components/schemas/ResponseInputImage' + - $ref: '#/components/schemas/ResponseInputFile' + discriminator: + propertyName: type + mapping: + input_text: '#/components/schemas/ResponseInputText' + input_image: '#/components/schemas/ResponseInputImage' + input_file: '#/components/schemas/ResponseInputFile' + - type: string + required: + - role + - content + - type: object + properties: + id: + type: string + type: + type: string + enum: + - message + role: + anyOf: + - type: string + enum: + - user + - type: string + enum: + - system + - type: string + enum: + - developer + content: + type: array + items: + oneOf: + - $ref: '#/components/schemas/ResponseInputText' + - $ref: '#/components/schemas/ResponseInputImage' + - $ref: '#/components/schemas/ResponseInputFile' + discriminator: + propertyName: type + mapping: + input_text: '#/components/schemas/ResponseInputText' + input_image: '#/components/schemas/ResponseInputImage' + input_file: '#/components/schemas/ResponseInputFile' + required: + - id + - role + - content + - type: object + properties: + type: + type: string + enum: + - function_call_output + id: + type: string + call_id: + type: string + output: + type: string + status: + $ref: '#/components/schemas/ToolCallStatus' + required: + - type + - id + - call_id + - output + - type: object + properties: + type: + type: string + enum: + - function_call + call_id: + type: string + name: + type: string + arguments: + type: string + id: + type: string + status: + $ref: '#/components/schemas/ToolCallStatus' + required: + - type + - call_id + - name + - arguments + - $ref: '#/components/schemas/OutputItemImageGenerationCall' + - $ref: '#/components/schemas/OutputMessage' + - nullable: true + metadata: + $ref: '#/components/schemas/OpenResponsesRequestMetadata' + tools: + type: array + items: + oneOf: + - allOf: + - $ref: '#/components/schemas/OpenResponsesFunctionTool' + - type: object + properties: {} + description: Function tool definition + example: + type: function + name: get_weather + description: Get the current weather in a location + parameters: + type: object + properties: + location: + type: string + description: The city and state + unit: + type: string + enum: + - celsius + - fahrenheit + required: + - location + - $ref: '#/components/schemas/OpenResponsesWebSearchPreviewTool' + - $ref: '#/components/schemas/OpenResponsesWebSearchPreview20250311Tool' + - $ref: '#/components/schemas/OpenResponsesWebSearchTool' + - $ref: '#/components/schemas/OpenResponsesWebSearch20250826Tool' + tool_choice: + anyOf: + - type: string + enum: + - auto + - type: string + enum: + - none + - type: string + enum: + - required + - type: object + properties: + type: + type: string + enum: + - function + name: + type: string + required: + - type + - name + - type: object + properties: + type: + anyOf: + - type: string + enum: + - web_search_preview_2025_03_11 + - type: string + enum: + - web_search_preview + required: + - type + parallel_tool_calls: + type: boolean + prompt: + $ref: '#/components/schemas/OpenAIResponsesPrompt' + background: + type: boolean + nullable: true + previous_response_id: + type: string + nullable: true + reasoning: + type: object + nullable: true + properties: + effort: + type: string + nullable: true + enum: + - high + - medium + - low + - minimal + summary: + $ref: '#/components/schemas/ReasoningSummaryVerbosity' + service_tier: + type: string + nullable: true + enum: + - auto + - default + - flex + - priority + - scale + store: + type: boolean + truncation: + type: string + nullable: true + enum: + - auto + - disabled + text: + $ref: '#/components/schemas/ResponseTextConfig' + required: + - id + - object + - created_at + - model + - output + - error + - incomplete_details + - temperature + - top_p + - instructions + - metadata + - tools + - tool_choice + - parallel_tool_calls sequence_number: type: number required: @@ -1571,7 +3156,7 @@ components: top_p: null max_output_tokens: null sequence_number: 3 - OpenResponsesErrorEvent: + OpenAIResponsesErrorEvent: type: object properties: type: @@ -1601,6 +3186,18 @@ components: message: Rate limit exceeded. Please try again later. param: null sequence_number: 2 + OpenResponsesErrorEvent: + allOf: + - $ref: '#/components/schemas/OpenAIResponsesErrorEvent' + - type: object + properties: {} + description: Event emitted when an error occurs during streaming + example: + type: error + code: rate_limit_exceeded + message: Rate limit exceeded. Please try again later. + param: null + sequence_number: 2 OpenResponsesOutputItemAddedEvent: type: object properties: @@ -1692,28 +3289,6 @@ components: text: Hello! How can I help you? annotations: [] sequence_number: 8 - OpenResponsesOutputText: - allOf: - - $ref: '#/components/schemas/OutputTextContent' - - type: object - properties: {} - example: - type: output_text - text: The capital of France is Paris. - annotations: - - type: url_citation - start_index: 0 - end_index: 42 - title: Paris - Wikipedia - url: https://en.wikipedia.org/wiki/Paris - OpenResponsesRefusalContent: - allOf: - - $ref: '#/components/schemas/RefusalContent' - - type: object - properties: {} - example: - type: refusal - refusal: I'm sorry, I cannot assist with that request OpenResponsesContentPartAddedEvent: type: object properties: @@ -1729,8 +3304,8 @@ components: type: number part: anyOf: - - $ref: '#/components/schemas/OpenResponsesOutputText' - - $ref: '#/components/schemas/OpenResponsesRefusalContent' + - $ref: '#/components/schemas/ResponseOutputText' + - $ref: '#/components/schemas/OpenAIResponsesRefusalContent' sequence_number: type: number required: @@ -1766,8 +3341,8 @@ components: type: number part: anyOf: - - $ref: '#/components/schemas/OpenResponsesOutputText' - - $ref: '#/components/schemas/OpenResponsesRefusalContent' + - $ref: '#/components/schemas/ResponseOutputText' + - $ref: '#/components/schemas/OpenAIResponsesRefusalContent' sequence_number: type: number required: @@ -1809,14 +3384,7 @@ components: top_logprobs: type: array items: - allOf: - - $ref: '#/components/schemas/OpenResponsesTopLogprobs' - - type: object - properties: {} - description: Alternative token with its log probability - example: - token: hello - logprob: -0.5 + $ref: '#/components/schemas/OpenResponsesTopLogprobs' required: - logprob - token @@ -1985,10 +3553,7 @@ components: annotation_index: type: number annotation: - anyOf: - - $ref: '#/components/schemas/FileCitationAnnotation' - - $ref: '#/components/schemas/URLCitationAnnotation' - - $ref: '#/components/schemas/FilePathAnnotation' + $ref: '#/components/schemas/OpenAIResponsesAnnotation' required: - type - output_index @@ -2071,7 +3636,7 @@ components: name: get_weather arguments: '{"city": "San Francisco", "units": "celsius"}' sequence_number: 6 - OpenResponsesReasoningDeltaEvent: + OpenAIResponsesReasoningDeltaEvent: type: object properties: type: @@ -2103,7 +3668,20 @@ components: content_index: 0 delta: First, we need sequence_number: 4 - OpenResponsesReasoningDoneEvent: + OpenResponsesReasoningDeltaEvent: + allOf: + - $ref: '#/components/schemas/OpenAIResponsesReasoningDeltaEvent' + - type: object + properties: {} + description: Event emitted when reasoning text delta is streamed + example: + type: response.reasoning_text.delta + output_index: 0 + item_id: item-1 + content_index: 0 + delta: First, we need + sequence_number: 4 + OpenAIResponsesReasoningDoneEvent: type: object properties: type: @@ -2135,7 +3713,20 @@ components: content_index: 0 text: First, we need to identify the key components and then combine them logically. sequence_number: 6 - OpenResponsesReasoningSummaryPartAddedEventSchema: + OpenResponsesReasoningDoneEvent: + allOf: + - $ref: '#/components/schemas/OpenAIResponsesReasoningDoneEvent' + - type: object + properties: {} + description: Event emitted when reasoning text streaming is complete + example: + type: response.reasoning_text.done + output_index: 0 + item_id: item-1 + content_index: 0 + text: First, we need to identify the key components and then combine them logically. + sequence_number: 6 + OpenAIResponsesReasoningSummaryPartAddedEvent: type: object properties: type: @@ -2169,6 +3760,21 @@ components: type: summary_text text: '' sequence_number: 3 + OpenResponsesReasoningSummaryPartAddedEvent: + allOf: + - $ref: '#/components/schemas/OpenAIResponsesReasoningSummaryPartAddedEvent' + - type: object + properties: {} + description: Event emitted when a reasoning summary part is added + example: + type: response.reasoning_summary_part.added + output_index: 0 + item_id: item-1 + summary_index: 0 + part: + type: summary_text + text: '' + sequence_number: 3 OpenResponsesReasoningSummaryPartDoneEvent: type: object properties: @@ -2203,7 +3809,7 @@ components: type: summary_text text: Analyzing the problem step by step to find the optimal solution. sequence_number: 7 - OpenResponsesReasoningSummaryTextDeltaEvent: + OpenAIResponsesReasoningSummaryTextDeltaEvent: type: object properties: type: @@ -2235,7 +3841,20 @@ components: summary_index: 0 delta: Analyzing sequence_number: 4 - OpenResponsesReasoningSummaryTextDoneEvent: + OpenResponsesReasoningSummaryTextDeltaEvent: + allOf: + - $ref: '#/components/schemas/OpenAIResponsesReasoningSummaryTextDeltaEvent' + - type: object + properties: {} + description: Event emitted when reasoning summary text delta is streamed + example: + type: response.reasoning_summary_text.delta + item_id: item-1 + output_index: 0 + summary_index: 0 + delta: Analyzing + sequence_number: 4 + OpenAIResponsesReasoningSummaryTextDoneEvent: type: object properties: type: @@ -2267,7 +3886,20 @@ components: summary_index: 0 text: Analyzing the problem step by step to find the optimal solution. sequence_number: 6 - OpenResponsesImageGenCallInProgress: + OpenResponsesReasoningSummaryTextDoneEvent: + allOf: + - $ref: '#/components/schemas/OpenAIResponsesReasoningSummaryTextDoneEvent' + - type: object + properties: {} + description: Event emitted when reasoning summary text streaming is complete + example: + type: response.reasoning_summary_text.done + item_id: item-1 + output_index: 0 + summary_index: 0 + text: Analyzing the problem step by step to find the optimal solution. + sequence_number: 6 + OpenAIResponsesImageGenCallInProgress: type: object properties: type: @@ -2285,12 +3917,18 @@ components: - item_id - output_index - sequence_number + OpenResponsesImageGenCallInProgress: + allOf: + - $ref: '#/components/schemas/OpenAIResponsesImageGenCallInProgress' + - type: object + properties: {} + description: Image generation call in progress example: type: response.image_generation_call.in_progress - item_id: item-abc123 output_index: 0 sequence_number: 1 - OpenResponsesImageGenCallGenerating: + item_id: call-123 + OpenAIResponsesImageGenCallGenerating: type: object properties: type: @@ -2308,12 +3946,18 @@ components: - item_id - output_index - sequence_number + OpenResponsesImageGenCallGenerating: + allOf: + - $ref: '#/components/schemas/OpenAIResponsesImageGenCallGenerating' + - type: object + properties: {} + description: Image generation call is generating example: type: response.image_generation_call.generating - item_id: item-abc123 output_index: 0 sequence_number: 2 - OpenResponsesImageGenCallPartialImage: + item_id: call-123 + OpenAIResponsesImageGenCallPartialImage: type: object properties: type: @@ -2337,14 +3981,20 @@ components: - sequence_number - partial_image_b64 - partial_image_index + OpenResponsesImageGenCallPartialImage: + allOf: + - $ref: '#/components/schemas/OpenAIResponsesImageGenCallPartialImage' + - type: object + properties: {} + description: Image generation call with partial image example: type: response.image_generation_call.partial_image - item_id: item-abc123 output_index: 0 sequence_number: 3 - partial_image_b64: iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJ + item_id: call-123 + partial_image_b64: base64encodedimage... partial_image_index: 0 - OpenResponsesImageGenCallCompleted: + OpenAIResponsesImageGenCallCompleted: type: object properties: type: @@ -2362,17 +4012,25 @@ components: - item_id - output_index - sequence_number + OpenResponsesImageGenCallCompleted: + allOf: + - $ref: '#/components/schemas/OpenAIResponsesImageGenCallCompleted' + - type: object + properties: {} + description: Image generation call completed example: type: response.image_generation_call.completed - item_id: item-abc123 output_index: 0 sequence_number: 4 + item_id: call-123 OpenResponsesStreamEvent: oneOf: - allOf: - $ref: '#/components/schemas/OpenResponsesCreatedEvent' - type: object - properties: {} + properties: + response: + $ref: '#/components/schemas/OpenResponsesNonStreamingResponse' description: Event emitted when a response is created example: type: response.created @@ -2397,7 +4055,9 @@ components: - allOf: - $ref: '#/components/schemas/OpenResponsesInProgressEvent' - type: object - properties: {} + properties: + response: + $ref: '#/components/schemas/OpenResponsesNonStreamingResponse' description: Event emitted when a response is in progress example: type: response.in_progress @@ -2422,7 +4082,9 @@ components: - allOf: - $ref: '#/components/schemas/OpenResponsesCompletedEvent' - type: object - properties: {} + properties: + response: + $ref: '#/components/schemas/OpenResponsesNonStreamingResponse' description: Event emitted when a response has completed successfully example: type: response.completed @@ -2455,7 +4117,9 @@ components: - allOf: - $ref: '#/components/schemas/OpenResponsesIncompleteEvent' - type: object - properties: {} + properties: + response: + $ref: '#/components/schemas/OpenResponsesNonStreamingResponse' description: Event emitted when a response is incomplete example: type: response.incomplete @@ -2480,7 +4144,9 @@ components: - allOf: - $ref: '#/components/schemas/OpenResponsesFailedEvent' - type: object - properties: {} + properties: + response: + $ref: '#/components/schemas/OpenResponsesNonStreamingResponse' description: Event emitted when a response has failed example: type: response.failed @@ -2502,17 +4168,7 @@ components: top_p: null max_output_tokens: null sequence_number: 3 - - allOf: - - $ref: '#/components/schemas/OpenResponsesErrorEvent' - - type: object - properties: {} - description: Event emitted when an error occurs during streaming - example: - type: error - code: rate_limit_exceeded - message: Rate limit exceeded. Please try again later. - param: null - sequence_number: 2 + - $ref: '#/components/schemas/OpenResponsesErrorEvent' - allOf: - $ref: '#/components/schemas/OpenResponsesOutputItemAddedEvent' - type: object @@ -2556,9 +4212,9 @@ components: properties: part: anyOf: - - $ref: '#/components/schemas/OpenResponsesOutputText' + - $ref: '#/components/schemas/ResponseOutputText' - $ref: '#/components/schemas/ReasoningTextContent' - - $ref: '#/components/schemas/OpenResponsesRefusalContent' + - $ref: '#/components/schemas/OpenAIResponsesRefusalContent' description: Event emitted when a new content part is added to an output item example: type: response.content_part.added @@ -2576,9 +4232,9 @@ components: properties: part: anyOf: - - $ref: '#/components/schemas/OpenResponsesOutputText' + - $ref: '#/components/schemas/ResponseOutputText' - $ref: '#/components/schemas/ReasoningTextContent' - - $ref: '#/components/schemas/OpenResponsesRefusalContent' + - $ref: '#/components/schemas/OpenAIResponsesRefusalContent' description: Event emitted when a content part is complete example: type: response.content_part.done @@ -2654,147 +4310,56 @@ components: annotation_index: 0 annotation: type: url_citation - url: https://example.com - title: Example - start_index: 0 - end_index: 7 - - allOf: - - $ref: '#/components/schemas/OpenResponsesFunctionCallArgumentsDeltaEvent' - - type: object - properties: {} - description: Event emitted when function call arguments are being streamed - example: - type: response.function_call_arguments.delta - item_id: item-1 - output_index: 0 - delta: '{"city": "San' - sequence_number: 4 - - allOf: - - $ref: '#/components/schemas/OpenResponsesFunctionCallArgumentsDoneEvent' - - type: object - properties: {} - description: Event emitted when function call arguments streaming is complete - example: - type: response.function_call_arguments.done - item_id: item-1 - output_index: 0 - name: get_weather - arguments: '{"city": "San Francisco", "units": "celsius"}' - sequence_number: 6 - - allOf: - - $ref: '#/components/schemas/OpenResponsesReasoningDeltaEvent' - - type: object - properties: {} - description: Event emitted when reasoning text delta is streamed - example: - type: response.reasoning_text.delta - output_index: 0 - item_id: item-1 - content_index: 0 - delta: First, we need - sequence_number: 4 - - allOf: - - $ref: '#/components/schemas/OpenResponsesReasoningDoneEvent' - - type: object - properties: {} - description: Event emitted when reasoning text streaming is complete - example: - type: response.reasoning_text.done - output_index: 0 - item_id: item-1 - content_index: 0 - text: First, we need to identify the key components and then combine them logically. - sequence_number: 6 - - allOf: - - $ref: '#/components/schemas/OpenResponsesReasoningSummaryPartAddedEventSchema' - - type: object - properties: {} - description: Event emitted when a reasoning summary part is added - example: - type: response.reasoning_summary_part.added - output_index: 0 - item_id: item-1 - summary_index: 0 - part: - type: summary_text - text: '' - sequence_number: 3 - - allOf: - - $ref: '#/components/schemas/OpenResponsesReasoningSummaryPartDoneEvent' - - type: object - properties: {} - description: Event emitted when a reasoning summary part is complete - example: - type: response.reasoning_summary_part.done - output_index: 0 - item_id: item-1 - summary_index: 0 - part: - type: summary_text - text: Analyzing the problem step by step to find the optimal solution. - sequence_number: 7 - - allOf: - - $ref: '#/components/schemas/OpenResponsesReasoningSummaryTextDeltaEvent' - - type: object - properties: {} - description: Event emitted when reasoning summary text delta is streamed - example: - type: response.reasoning_summary_text.delta - item_id: item-1 - output_index: 0 - summary_index: 0 - delta: Analyzing - sequence_number: 4 - - allOf: - - $ref: '#/components/schemas/OpenResponsesReasoningSummaryTextDoneEvent' - - type: object - properties: {} - description: Event emitted when reasoning summary text streaming is complete - example: - type: response.reasoning_summary_text.done - item_id: item-1 - output_index: 0 - summary_index: 0 - text: Analyzing the problem step by step to find the optimal solution. - sequence_number: 6 - - allOf: - - $ref: '#/components/schemas/OpenResponsesImageGenCallInProgress' - - type: object - properties: {} - example: - type: response.image_generation_call.in_progress - item_id: item-abc123 - output_index: 0 - sequence_number: 1 + url: https://example.com + title: Example + start_index: 0 + end_index: 7 - allOf: - - $ref: '#/components/schemas/OpenResponsesImageGenCallGenerating' + - $ref: '#/components/schemas/OpenResponsesFunctionCallArgumentsDeltaEvent' - type: object properties: {} + description: Event emitted when function call arguments are being streamed example: - type: response.image_generation_call.generating - item_id: item-abc123 + type: response.function_call_arguments.delta + item_id: item-1 output_index: 0 - sequence_number: 2 + delta: '{"city": "San' + sequence_number: 4 - allOf: - - $ref: '#/components/schemas/OpenResponsesImageGenCallPartialImage' + - $ref: '#/components/schemas/OpenResponsesFunctionCallArgumentsDoneEvent' - type: object properties: {} + description: Event emitted when function call arguments streaming is complete example: - type: response.image_generation_call.partial_image - item_id: item-abc123 + type: response.function_call_arguments.done + item_id: item-1 output_index: 0 - sequence_number: 3 - partial_image_b64: iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJ - partial_image_index: 0 + name: get_weather + arguments: '{"city": "San Francisco", "units": "celsius"}' + sequence_number: 6 + - $ref: '#/components/schemas/OpenResponsesReasoningDeltaEvent' + - $ref: '#/components/schemas/OpenResponsesReasoningDoneEvent' + - $ref: '#/components/schemas/OpenResponsesReasoningSummaryPartAddedEvent' - allOf: - - $ref: '#/components/schemas/OpenResponsesImageGenCallCompleted' + - $ref: '#/components/schemas/OpenResponsesReasoningSummaryPartDoneEvent' - type: object properties: {} + description: Event emitted when a reasoning summary part is complete example: - type: response.image_generation_call.completed - item_id: item-abc123 + type: response.reasoning_summary_part.done output_index: 0 - sequence_number: 4 + item_id: item-1 + summary_index: 0 + part: + type: summary_text + text: Analyzing the problem step by step to find the optimal solution. + sequence_number: 7 + - $ref: '#/components/schemas/OpenResponsesReasoningSummaryTextDeltaEvent' + - $ref: '#/components/schemas/OpenResponsesReasoningSummaryTextDoneEvent' + - $ref: '#/components/schemas/OpenResponsesImageGenCallInProgress' + - $ref: '#/components/schemas/OpenResponsesImageGenCallGenerating' + - $ref: '#/components/schemas/OpenResponsesImageGenCallPartialImage' + - $ref: '#/components/schemas/OpenResponsesImageGenCallCompleted' description: Union of all possible event types emitted during response streaming example: type: response.created @@ -2919,7 +4484,252 @@ components: field: temperature reason: Must be between 0 and 2 user_id: user-abc123 - OpenResponsesIncludable: + OpenResponsesReasoning: + allOf: + - $ref: '#/components/schemas/OutputItemReasoning' + - type: object + properties: + signature: + type: string + nullable: true + format: + type: string + nullable: true + enum: + - unknown + - openai-responses-v1 + - xai-responses-v1 + - anthropic-claude-v1 + description: Reasoning output item with signature and format extensions + example: + type: reasoning + id: reasoning-abc123 + summary: + - type: summary_text + text: Step by step analysis + OpenResponsesEasyInputMessage: + type: object + properties: + type: + type: string + enum: + - message + role: + anyOf: + - type: string + enum: + - user + - type: string + enum: + - system + - type: string + enum: + - assistant + - type: string + enum: + - developer + content: + anyOf: + - type: array + items: + oneOf: + - $ref: '#/components/schemas/ResponseInputText' + - $ref: '#/components/schemas/ResponseInputImage' + - $ref: '#/components/schemas/ResponseInputFile' + discriminator: + propertyName: type + mapping: + input_text: '#/components/schemas/ResponseInputText' + input_image: '#/components/schemas/ResponseInputImage' + input_file: '#/components/schemas/ResponseInputFile' + - type: string + required: + - role + - content + OpenResponsesInputMessageItem: + type: object + properties: + id: + type: string + type: + type: string + enum: + - message + role: + anyOf: + - type: string + enum: + - user + - type: string + enum: + - system + - type: string + enum: + - developer + content: + type: array + items: + oneOf: + - $ref: '#/components/schemas/ResponseInputText' + - $ref: '#/components/schemas/ResponseInputImage' + - $ref: '#/components/schemas/ResponseInputFile' + discriminator: + propertyName: type + mapping: + input_text: '#/components/schemas/ResponseInputText' + input_image: '#/components/schemas/ResponseInputImage' + input_file: '#/components/schemas/ResponseInputFile' + required: + - role + - content + OpenResponsesFunctionToolCall: + type: object + properties: + type: + type: string + enum: + - function_call + call_id: + type: string + name: + type: string + arguments: + type: string + id: + type: string + status: + $ref: '#/components/schemas/ToolCallStatus' + required: + - type + - call_id + - name + - arguments + - id + description: A function call initiated by the model + example: + id: call-abc123 + type: function_call + call_id: call-abc123 + name: get_weather + arguments: '{"location":"San Francisco"}' + status: completed + OpenResponsesFunctionCallOutput: + type: object + properties: + type: + type: string + enum: + - function_call_output + id: + type: string + call_id: + type: string + output: + type: string + status: + $ref: '#/components/schemas/ToolCallStatus' + required: + - type + - id + - call_id + - output + description: The output from a function call execution + example: + type: function_call_output + id: output-abc123 + call_id: call-abc123 + output: '{"temperature":72,"conditions":"sunny"}' + status: completed + OpenResponsesInput: + anyOf: + - type: string + - type: array + items: + anyOf: + - $ref: '#/components/schemas/OpenResponsesReasoning' + - $ref: '#/components/schemas/OpenResponsesEasyInputMessage' + - $ref: '#/components/schemas/OpenResponsesInputMessageItem' + - $ref: '#/components/schemas/OpenResponsesFunctionToolCall' + - $ref: '#/components/schemas/OpenResponsesFunctionCallOutput' + - $ref: '#/components/schemas/OpenResponsesOutputMessage' + - $ref: '#/components/schemas/OpenResponsesOutputItemReasoning' + - allOf: + - $ref: '#/components/schemas/OutputItemFunctionCall' + - type: object + properties: {} + example: + type: function_call + id: call-abc123 + name: get_weather + arguments: '{"location":"San Francisco","unit":"celsius"}' + call_id: call-abc123 + - allOf: + - $ref: '#/components/schemas/OutputItemWebSearchCall' + - type: object + properties: {} + example: + type: web_search_call + id: search-abc123 + status: completed + - allOf: + - $ref: '#/components/schemas/OutputItemFileSearchCall' + - type: object + properties: {} + example: + type: file_search_call + id: filesearch-abc123 + queries: + - machine learning algorithms + - neural networks + status: completed + - allOf: + - $ref: '#/components/schemas/OutputItemImageGenerationCall' + - type: object + properties: {} + example: + type: image_generation_call + id: imagegen-abc123 + result: iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mNk+M9QDwADhgGAWjR9awAAAABJRU5ErkJggg== + status: completed + description: Input for a response request - can be a string or array of items + example: + - role: user + content: What is the weather today? + OpenResponsesResponseText: + allOf: + - $ref: '#/components/schemas/ResponseTextConfig' + - type: object + properties: {} + description: Text output configuration including format and verbosity + example: + format: + type: text + verbosity: medium + OpenResponsesReasoningConfig: + type: object + nullable: true + properties: + effort: + type: string + nullable: true + enum: + - high + - medium + - low + - minimal + summary: + $ref: '#/components/schemas/ReasoningSummaryVerbosity' + max_tokens: + type: number + nullable: true + enabled: + type: boolean + nullable: true + description: Configuration for reasoning mode in the response + example: + summary: auto + enabled: true + OpenAIResponsesIncludable: type: string enum: - file_search_call.results @@ -2927,19 +4737,17 @@ components: - computer_call_output.output.image_url - reasoning.encrypted_content - code_interpreter_call.outputs - description: Fields to include in the response that would normally be omitted - example: message.input_image.image_url - OpenResponsesServiceTier: + ServiceTier: type: string nullable: true enum: - auto - default - flex - - priority - scale + - priority example: auto - OpenResponsesTruncation: + Truncation: type: string nullable: true enum: @@ -3077,13 +4885,7 @@ components: type: object properties: input: - allOf: - - $ref: '#/components/schemas/OpenResponsesInput' - - anyOf: - - type: string - - type: array - items: - $ref: '#/components/schemas/OpenResponsesInputItem' + $ref: '#/components/schemas/OpenResponsesInput' instructions: type: string nullable: true @@ -3092,9 +4894,67 @@ components: tools: type: array items: - $ref: '#/components/schemas/OpenResponsesToolUnion' + oneOf: + - allOf: + - $ref: '#/components/schemas/OpenResponsesFunctionTool' + - type: object + properties: {} + description: Function tool definition + example: + type: function + name: get_weather + description: Get the current weather in a location + parameters: + type: object + properties: + location: + type: string + description: The city and state + unit: + type: string + enum: + - celsius + - fahrenheit + required: + - location + - $ref: '#/components/schemas/OpenResponsesWebSearchPreviewTool' + - $ref: '#/components/schemas/OpenResponsesWebSearchPreview20250311Tool' + - $ref: '#/components/schemas/OpenResponsesWebSearchTool' + - $ref: '#/components/schemas/OpenResponsesWebSearch20250826Tool' tool_choice: - $ref: '#/components/schemas/OpenResponsesToolChoice' + anyOf: + - type: string + enum: + - auto + - type: string + enum: + - none + - type: string + enum: + - required + - type: object + properties: + type: + type: string + enum: + - function + name: + type: string + required: + - type + - name + - type: object + properties: + type: + anyOf: + - type: string + enum: + - web_search_preview_2025_03_11 + - type: string + enum: + - web_search_preview + required: + - type parallel_tool_calls: type: boolean nullable: true @@ -3105,7 +4965,7 @@ components: items: type: string text: - $ref: '#/components/schemas/OpenResponsesTextConfig' + $ref: '#/components/schemas/OpenResponsesResponseText' reasoning: $ref: '#/components/schemas/OpenResponsesReasoningConfig' max_output_tokens: @@ -3129,12 +4989,12 @@ components: type: string nullable: true prompt: - $ref: '#/components/schemas/OpenResponsesPrompt' + $ref: '#/components/schemas/OpenAIResponsesPrompt' include: type: array nullable: true items: - $ref: '#/components/schemas/OpenResponsesIncludable' + $ref: '#/components/schemas/OpenAIResponsesIncludable' background: type: boolean nullable: true @@ -3145,9 +5005,9 @@ components: type: boolean nullable: true service_tier: - $ref: '#/components/schemas/OpenResponsesServiceTier' + $ref: '#/components/schemas/ServiceTier' truncation: - $ref: '#/components/schemas/OpenResponsesTruncation' + $ref: '#/components/schemas/Truncation' stream: type: boolean nullable: true