# Responses

## Create a response

> Creates a streaming or non-streaming response using OpenResponses API format

```json
{"openapi":"3.1.0","info":{"title":"Interactive AI Responses API","version":"1.0.0"},"tags":[{"name":"beta.responses","description":"beta.responses endpoints"}],"servers":[{"url":"https://app.interactive.ai/api/v1","description":"Production server"}],"security":[{"apiKey":[]}],"components":{"securitySchemes":{"apiKey":{"type":"http","scheme":"bearer","description":"API key as bearer token in Authorization header"}},"schemas":{"OpenResponsesRequest":{"type":"object","properties":{"input":{"$ref":"#/components/schemas/OpenResponsesInput"},"instructions":{"type":"string","nullable":true},"metadata":{"$ref":"#/components/schemas/OpenResponsesRequestMetadata"},"tools":{"type":"array","items":{"oneOf":[{"allOf":[{"$ref":"#/components/schemas/OpenResponsesFunctionTool"},{"type":"object","properties":{}}],"description":"Function tool definition"},{"$ref":"#/components/schemas/OpenResponsesWebSearchPreviewTool"},{"$ref":"#/components/schemas/OpenResponsesWebSearchPreview20250311Tool"},{"$ref":"#/components/schemas/OpenResponsesWebSearchTool"},{"$ref":"#/components/schemas/OpenResponsesWebSearch20250826Tool"}]}},"tool_choice":{"$ref":"#/components/schemas/OpenAIResponsesToolChoice"},"parallel_tool_calls":{"type":"boolean","nullable":true},"model":{"type":"string"},"models":{"type":"array","items":{"type":"string"}},"text":{"$ref":"#/components/schemas/OpenResponsesResponseText"},"reasoning":{"$ref":"#/components/schemas/OpenResponsesReasoningConfig"},"max_output_tokens":{"type":"number","nullable":true},"temperature":{"type":"number","nullable":true,"minimum":0,"maximum":2},"top_p":{"type":"number","nullable":true,"minimum":0},"top_logprobs":{"type":"integer","nullable":true,"minimum":0,"maximum":20},"max_tool_calls":{"type":"integer","nullable":true},"presence_penalty":{"type":"number","nullable":true,"minimum":-2,"maximum":2},"frequency_penalty":{"type":"number","nullable":true,"minimum":-2,"maximum":2},"top_k":{"type":"number"},"image_config":{"type":"object","additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"}]},"description":"Provider-specific image configuration options. Keys and values vary by model/provider."},"modalities":{"type":"array","items":{"$ref":"#/components/schemas/ResponsesOutputModality"},"description":"Output modalities for the response. Supported values are \"text\" and \"image\"."},"prompt_cache_key":{"type":"string","nullable":true},"previous_response_id":{"type":"string","nullable":true},"prompt":{"$ref":"#/components/schemas/OpenAIResponsesPrompt"},"include":{"type":"array","nullable":true,"items":{"$ref":"#/components/schemas/OpenAIResponsesIncludable"}},"background":{"type":"boolean","nullable":true},"safety_identifier":{"type":"string","nullable":true},"store":{"type":"boolean","const":false,"default":false},"service_tier":{"type":"string","enum":["auto"],"default":"auto"},"truncation":{"allOf":[{"$ref":"#/components/schemas/OpenAIResponsesTruncation"},{}]},"stream":{"type":"boolean","default":false},"provider":{"type":"object","nullable":true,"properties":{"allow_fallbacks":{"type":"boolean","nullable":true,"description":"Whether to allow backup providers to serve requests\n- true: (default) when the primary provider (or your custom providers in \"order\") is unavailable, use the next best provider.\n- false: use only the primary/custom provider, and return the upstream error if it's unavailable.\n"},"require_parameters":{"type":"boolean","nullable":true,"description":"Whether to filter providers to only those that support the parameters you've provided. If this setting is omitted or set to false, then providers will receive only the parameters they support, and ignore the rest."},"data_collection":{"$ref":"#/components/schemas/DataCollection"},"zdr":{"type":"boolean","nullable":true,"description":"Whether to restrict routing to only ZDR (Zero Data Retention) endpoints. When true, only endpoints that do not retain prompts will be used."},"enforce_distillable_text":{"type":"boolean","nullable":true,"description":"Whether to restrict routing to only models that allow text distillation. When true, only models where the author has allowed distillation will be used."},"order":{"type":"array","nullable":true,"items":{"anyOf":[{"$ref":"#/components/schemas/ProviderName"},{"type":"string"}]},"description":"An ordered list of provider slugs. The router will attempt to use the first provider in the subset of this list that supports your requested model, and fall back to the next if it is unavailable. If no providers are available, the request will fail with an error message."},"only":{"type":"array","nullable":true,"items":{"anyOf":[{"$ref":"#/components/schemas/ProviderName"},{"type":"string"}]},"description":"List of provider slugs to allow. If provided, this list is merged with your account-wide allowed provider settings for this request."},"ignore":{"type":"array","nullable":true,"items":{"anyOf":[{"$ref":"#/components/schemas/ProviderName"},{"type":"string"}]},"description":"List of provider slugs to ignore. If provided, this list is merged with your account-wide ignored provider settings for this request."},"quantizations":{"type":"array","nullable":true,"items":{"$ref":"#/components/schemas/Quantization"},"description":"A list of quantization levels to filter the provider by."},"sort":{"anyOf":[{"$ref":"#/components/schemas/ProviderSort"},{"$ref":"#/components/schemas/ProviderSortConfig"},{"nullable":true}],"description":"The sorting strategy to use for this request, if \"order\" is not specified. When set, no load balancing is performed."},"max_price":{"type":"object","properties":{"prompt":{"$ref":"#/components/schemas/BigNumberUnion"},"completion":{"$ref":"#/components/schemas/BigNumberUnion"},"image":{"$ref":"#/components/schemas/BigNumberUnion"},"audio":{"$ref":"#/components/schemas/BigNumberUnion"},"request":{"$ref":"#/components/schemas/BigNumberUnion"}},"description":"The object specifying the maximum price you want to pay for this request. USD price per million tokens, for prompt and completion."},"preferred_min_throughput":{"$ref":"#/components/schemas/PreferredMinThroughput"},"preferred_max_latency":{"$ref":"#/components/schemas/PreferredMaxLatency"}},"additionalProperties":false,"description":"When multiple model providers are available, optionally indicate your routing preference."},"plugins":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"id":{"type":"string","enum":["auto-router"]},"enabled":{"type":"boolean","description":"Set to false to disable the auto-router plugin for this request. Defaults to true."},"allowed_models":{"type":"array","items":{"type":"string"},"description":"List of model patterns to filter which models the auto-router can route between. Supports wildcards (e.g., \"anthropic/*\" matches all Anthropic models). When not specified, uses the default supported models list."}},"required":["id"]},{"type":"object","properties":{"id":{"type":"string","enum":["moderation"]}},"required":["id"]},{"type":"object","properties":{"id":{"type":"string","enum":["web"]},"enabled":{"type":"boolean","description":"Set to false to disable the web-search plugin for this request. Defaults to true."},"max_results":{"type":"number"},"search_prompt":{"type":"string"},"engine":{"$ref":"#/components/schemas/WebSearchEngine"}},"required":["id"]},{"type":"object","properties":{"id":{"type":"string","enum":["file-parser"]},"enabled":{"type":"boolean","description":"Set to false to disable the file-parser plugin for this request. Defaults to true."},"pdf":{"$ref":"#/components/schemas/PDFParserOptions"}},"required":["id"]},{"type":"object","properties":{"id":{"type":"string","enum":["response-healing"]},"enabled":{"type":"boolean","description":"Set to false to disable the response-healing plugin for this request. Defaults to true."}},"required":["id"]}]},"description":"Plugins you want to enable for this request, including their settings."},"route":{"type":"string","nullable":true,"enum":["fallback","sort"],"deprecated":true,"description":"**DEPRECATED** Use providers.sort.partition instead. Backwards-compatible alias for providers.sort.partition. Accepts legacy values: \"fallback\" (maps to \"model\"), \"sort\" (maps to \"none\")."},"user":{"type":"string","maxLength":128,"description":"A unique identifier representing your end-user, which helps distinguish between different users of your app. This allows your app to identify specific users in case of abuse reports, preventing your entire app from being affected by the actions of individual users. Maximum of 128 characters."},"session_id":{"type":"string","maxLength":128,"description":"A unique identifier for grouping related requests (e.g., a conversation or agent workflow) for observability. If provided in both the request body and the x-session-id header, the body value takes precedence. Maximum of 128 characters."}},"description":"Request schema for Responses endpoint"},"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/ResponsesOutputMessage"},{"$ref":"#/components/schemas/ResponsesOutputItemReasoning"},{"$ref":"#/components/schemas/ResponsesOutputItemFunctionCall"},{"$ref":"#/components/schemas/ResponsesWebSearchCallOutput"},{"$ref":"#/components/schemas/ResponsesOutputItemFileSearchCall"},{"$ref":"#/components/schemas/ResponsesImageGenerationCall"}]}}],"description":"Input for a response request - can be a string or array of items"},"OpenResponsesReasoning":{"allOf":[{"$ref":"#/components/schemas/OutputItemReasoning"},{"type":"object","properties":{"signature":{"type":"string","nullable":true},"format":{"type":"string","nullable":true,"enum":["unknown","openai-responses-v1","azure-openai-responses-v1","xai-responses-v1","anthropic-claude-v1","google-gemini-v1"]}}}],"description":"Reasoning output item with signature and format extensions"},"OutputItemReasoning":{"type":"object","properties":{"type":{"type":"string","enum":["reasoning"]},"id":{"type":"string"},"content":{"type":"array","items":{"$ref":"#/components/schemas/ReasoningTextContent"}},"summary":{"type":"array","items":{"$ref":"#/components/schemas/ReasoningSummaryText"}},"encrypted_content":{"type":"string","nullable":true},"status":{"anyOf":[{"type":"string","enum":["completed"]},{"type":"string","enum":["incomplete"]},{"type":"string","enum":["in_progress"]}]}},"required":["type","id","summary"]},"ReasoningTextContent":{"type":"object","properties":{"type":{"type":"string","enum":["reasoning_text"]},"text":{"type":"string"}},"required":["type","text"]},"ReasoningSummaryText":{"type":"object","properties":{"type":{"type":"string","enum":["summary_text"]},"text":{"type":"string"}},"required":["type","text"]},"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"},{"allOf":[{"$ref":"#/components/schemas/ResponseInputImage"},{"type":"object","properties":{}}],"description":"Image input content item"},{"$ref":"#/components/schemas/ResponseInputFile"},{"$ref":"#/components/schemas/ResponseInputAudio"},{"$ref":"#/components/schemas/ResponseInputVideo"}]}},{"type":"string"}]}},"required":["role","content"]},"ResponseInputText":{"type":"object","properties":{"type":{"type":"string","enum":["input_text"]},"text":{"type":"string"}},"required":["type","text"],"description":"Text input content item"},"ResponseInputImage":{"type":"object","properties":{"type":{"type":"string","enum":["input_image"]},"detail":{"type":"string","enum":["auto","high","low"]},"image_url":{"type":"string","nullable":true}},"required":["type","detail"],"description":"Image input content item"},"ResponseInputFile":{"type":"object","properties":{"type":{"type":"string","enum":["input_file"]},"file_id":{"type":"string","nullable":true},"file_data":{"type":"string"},"filename":{"type":"string"},"file_url":{"type":"string"}},"required":["type"],"description":"File input content item"},"ResponseInputAudio":{"type":"object","properties":{"type":{"type":"string","enum":["input_audio"]},"input_audio":{"type":"object","properties":{"data":{"type":"string"},"format":{"type":"string","enum":["mp3","wav"]}},"required":["data","format"]}},"required":["type","input_audio"],"description":"Audio input content item"},"ResponseInputVideo":{"type":"object","properties":{"type":{"type":"string","enum":["input_video"]},"video_url":{"type":"string","description":"A base64 data URL or remote URL that resolves to a video file"}},"required":["type","video_url"],"description":"Video input content item"},"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"},{"allOf":[{"$ref":"#/components/schemas/ResponseInputImage"},{"type":"object","properties":{}}],"description":"Image input content item"},{"$ref":"#/components/schemas/ResponseInputFile"},{"$ref":"#/components/schemas/ResponseInputAudio"},{"$ref":"#/components/schemas/ResponseInputVideo"}]}}},"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"},"ToolCallStatus":{"type":"string","nullable":true,"enum":["in_progress","completed","incomplete"]},"OpenResponsesFunctionCallOutput":{"type":"object","properties":{"type":{"type":"string","enum":["function_call_output"]},"id":{"type":"string","nullable":true},"call_id":{"type":"string"},"output":{"type":"string"},"status":{"$ref":"#/components/schemas/ToolCallStatus"}},"required":["type","call_id","output"],"description":"The output from a function call execution"},"ResponsesOutputMessage":{"allOf":[{"$ref":"#/components/schemas/OutputMessage"},{"type":"object","properties":{}}],"description":"An output message item"},"OutputMessage":{"type":"object","properties":{"id":{"type":"string"},"role":{"type":"string","enum":["assistant"]},"type":{"type":"string","enum":["message"]},"status":{"anyOf":[{"type":"string","enum":["completed"]},{"type":"string","enum":["incomplete"]},{"type":"string","enum":["in_progress"]}]},"content":{"type":"array","items":{"anyOf":[{"$ref":"#/components/schemas/ResponseOutputText"},{"$ref":"#/components/schemas/OpenAIResponsesRefusalContent"}]}}},"required":["id","role","type","content"]},"ResponseOutputText":{"type":"object","properties":{"type":{"type":"string","enum":["output_text"]},"text":{"type":"string"},"annotations":{"type":"array","items":{"$ref":"#/components/schemas/OpenAIResponsesAnnotation"}},"logprobs":{"type":"array","items":{"type":"object","properties":{"token":{"type":"string"},"bytes":{"type":"array","items":{"type":"number"}},"logprob":{"type":"number"},"top_logprobs":{"type":"array","items":{"type":"object","properties":{"token":{"type":"string"},"bytes":{"type":"array","items":{"type":"number"}},"logprob":{"type":"number"}},"required":["token","bytes","logprob"]}}},"required":["token","bytes","logprob","top_logprobs"]}}},"required":["type","text"]},"OpenAIResponsesAnnotation":{"anyOf":[{"$ref":"#/components/schemas/FileCitation"},{"$ref":"#/components/schemas/URLCitation"},{"$ref":"#/components/schemas/FilePath"}]},"FileCitation":{"type":"object","properties":{"type":{"type":"string","enum":["file_citation"]},"file_id":{"type":"string"},"filename":{"type":"string"},"index":{"type":"number"}},"required":["type","file_id","filename","index"]},"URLCitation":{"type":"object","properties":{"type":{"type":"string","enum":["url_citation"]},"url":{"type":"string"},"title":{"type":"string"},"start_index":{"type":"number"},"end_index":{"type":"number"}},"required":["type","url","title","start_index","end_index"]},"FilePath":{"type":"object","properties":{"type":{"type":"string","enum":["file_path"]},"file_id":{"type":"string"},"index":{"type":"number"}},"required":["type","file_id","index"]},"OpenAIResponsesRefusalContent":{"type":"object","properties":{"type":{"type":"string","enum":["refusal"]},"refusal":{"type":"string"}},"required":["type","refusal"]},"ResponsesOutputItemReasoning":{"allOf":[{"$ref":"#/components/schemas/OutputItemReasoning"},{"type":"object","properties":{"signature":{"type":"string","nullable":true,"description":"A signature for the reasoning content, used for verification"},"format":{"type":"string","nullable":true,"enum":["unknown","openai-responses-v1","azure-openai-responses-v1","xai-responses-v1","anthropic-claude-v1","google-gemini-v1"],"description":"The format of the reasoning content"}}}],"description":"An output item containing reasoning"},"ResponsesOutputItemFunctionCall":{"allOf":[{"$ref":"#/components/schemas/OutputItemFunctionCall"},{"type":"object","properties":{}}]},"OutputItemFunctionCall":{"type":"object","properties":{"type":{"type":"string","enum":["function_call"]},"id":{"type":"string"},"name":{"type":"string"},"arguments":{"type":"string"},"call_id":{"type":"string"},"status":{"anyOf":[{"type":"string","enum":["completed"]},{"type":"string","enum":["incomplete"]},{"type":"string","enum":["in_progress"]}]}},"required":["type","name","arguments","call_id"]},"ResponsesWebSearchCallOutput":{"allOf":[{"$ref":"#/components/schemas/OutputItemWebSearchCall"},{"type":"object","properties":{}}]},"OutputItemWebSearchCall":{"type":"object","properties":{"type":{"type":"string","enum":["web_search_call"]},"id":{"type":"string"},"status":{"$ref":"#/components/schemas/WebSearchStatus"}},"required":["type","id","status"]},"WebSearchStatus":{"type":"string","enum":["completed","searching","in_progress","failed"]},"ResponsesOutputItemFileSearchCall":{"allOf":[{"$ref":"#/components/schemas/OutputItemFileSearchCall"},{"type":"object","properties":{}}]},"OutputItemFileSearchCall":{"type":"object","properties":{"type":{"type":"string","enum":["file_search_call"]},"id":{"type":"string"},"queries":{"type":"array","items":{"type":"string"}},"status":{"$ref":"#/components/schemas/WebSearchStatus"}},"required":["type","id","queries","status"]},"ResponsesImageGenerationCall":{"allOf":[{"$ref":"#/components/schemas/OutputItemImageGenerationCall"},{"type":"object","properties":{}}]},"OutputItemImageGenerationCall":{"type":"object","properties":{"type":{"type":"string","enum":["image_generation_call"]},"id":{"type":"string"},"result":{"type":"string","nullable":true,"default":null},"status":{"$ref":"#/components/schemas/ImageGenerationStatus"}},"required":["type","id","status"]},"ImageGenerationStatus":{"type":"string","enum":["in_progress","completed","generating","failed"]},"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."},"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"},"OpenResponsesWebSearchPreviewTool":{"type":"object","properties":{"type":{"type":"string","enum":["web_search_preview"]},"search_context_size":{"$ref":"#/components/schemas/ResponsesSearchContextSize"},"user_location":{"$ref":"#/components/schemas/WebSearchPreviewToolUserLocation"}},"required":["type"],"description":"Web search preview tool configuration"},"ResponsesSearchContextSize":{"type":"string","enum":["low","medium","high"],"description":"Size of the search context for web search tools"},"WebSearchPreviewToolUserLocation":{"type":"object","nullable":true,"properties":{"type":{"type":"string","enum":["approximate"]},"city":{"type":"string","nullable":true},"country":{"type":"string","nullable":true},"region":{"type":"string","nullable":true},"timezone":{"type":"string","nullable":true}},"required":["type"]},"OpenResponsesWebSearchPreview20250311Tool":{"type":"object","properties":{"type":{"type":"string","enum":["web_search_preview_2025_03_11"]},"search_context_size":{"$ref":"#/components/schemas/ResponsesSearchContextSize"},"user_location":{"$ref":"#/components/schemas/WebSearchPreviewToolUserLocation"}},"required":["type"],"description":"Web search preview tool configuration (2025-03-11 version)"},"OpenResponsesWebSearchTool":{"type":"object","properties":{"type":{"type":"string","enum":["web_search"]},"filters":{"type":"object","nullable":true,"properties":{"allowed_domains":{"type":"array","nullable":true,"items":{"type":"string"}}}},"search_context_size":{"$ref":"#/components/schemas/ResponsesSearchContextSize"},"user_location":{"$ref":"#/components/schemas/ResponsesWebSearchUserLocation"}},"required":["type"],"description":"Web search tool configuration"},"ResponsesWebSearchUserLocation":{"type":"object","nullable":true,"properties":{"type":{"type":"string","enum":["approximate"]},"city":{"type":"string","nullable":true},"country":{"type":"string","nullable":true},"region":{"type":"string","nullable":true},"timezone":{"type":"string","nullable":true}},"description":"User location information for web search"},"OpenResponsesWebSearch20250826Tool":{"type":"object","properties":{"type":{"type":"string","enum":["web_search_2025_08_26"]},"filters":{"type":"object","nullable":true,"properties":{"allowed_domains":{"type":"array","nullable":true,"items":{"type":"string"}}}},"search_context_size":{"$ref":"#/components/schemas/ResponsesSearchContextSize"},"user_location":{"$ref":"#/components/schemas/ResponsesWebSearchUserLocation"}},"required":["type"],"description":"Web search tool configuration (2025-08-26 version)"},"OpenAIResponsesToolChoice":{"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"]}]},"OpenResponsesResponseText":{"allOf":[{"$ref":"#/components/schemas/ResponseTextConfig"},{"type":"object","properties":{}}],"description":"Text output configuration including format and verbosity"},"ResponseTextConfig":{"type":"object","properties":{"format":{"$ref":"#/components/schemas/ResponseFormatTextConfig"},"verbosity":{"type":"string","nullable":true,"enum":["high","low","medium"]}},"description":"Text output configuration including format and verbosity"},"ResponseFormatTextConfig":{"anyOf":[{"$ref":"#/components/schemas/ResponsesFormatText"},{"$ref":"#/components/schemas/ResponsesFormatJSONObject"},{"$ref":"#/components/schemas/ResponsesFormatTextJSONSchemaConfig"}],"description":"Text response format configuration"},"ResponsesFormatText":{"type":"object","properties":{"type":{"type":"string","enum":["text"]}},"required":["type"],"description":"Plain text response format"},"ResponsesFormatJSONObject":{"type":"object","properties":{"type":{"type":"string","enum":["json_object"]}},"required":["type"],"description":"JSON object response format"},"ResponsesFormatTextJSONSchemaConfig":{"type":"object","properties":{"type":{"type":"string","enum":["json_schema"]},"name":{"type":"string"},"description":{"type":"string"},"strict":{"type":"boolean","nullable":true},"schema":{"type":"object","additionalProperties":{"nullable":true}}},"required":["type","name","schema"],"description":"JSON schema constrained response format"},"OpenResponsesReasoningConfig":{"allOf":[{"$ref":"#/components/schemas/OpenAIResponsesReasoningConfig"},{"type":"object","nullable":true,"properties":{"max_tokens":{"type":"number","nullable":true},"enabled":{"type":"boolean","nullable":true}}}],"description":"Configuration for reasoning mode in the response"},"OpenAIResponsesReasoningConfig":{"type":"object","nullable":true,"properties":{"effort":{"$ref":"#/components/schemas/OpenAIResponsesReasoningEffort"},"summary":{"$ref":"#/components/schemas/ReasoningSummaryVerbosity"}}},"OpenAIResponsesReasoningEffort":{"type":"string","nullable":true,"enum":["xhigh","high","medium","low","minimal","none"]},"ReasoningSummaryVerbosity":{"type":"string","enum":["auto","concise","detailed"]},"ResponsesOutputModality":{"type":"string","enum":["text","image"]},"OpenAIResponsesPrompt":{"type":"object","nullable":true,"properties":{"id":{"type":"string"},"variables":{"type":"object","nullable":true,"additionalProperties":{"anyOf":[{"type":"string"},{"$ref":"#/components/schemas/ResponseInputText"},{"$ref":"#/components/schemas/ResponseInputImage"},{"$ref":"#/components/schemas/ResponseInputFile"}]}}},"required":["id"]},"OpenAIResponsesIncludable":{"type":"string","enum":["file_search_call.results","message.input_image.image_url","computer_call_output.output.image_url","reasoning.encrypted_content","code_interpreter_call.outputs"]},"OpenAIResponsesTruncation":{"type":"string","nullable":true,"enum":["auto","disabled"]},"DataCollection":{"type":"string","nullable":true,"enum":["deny","allow"],"description":"Data collection setting. If no available model provider meets the requirement, your request will return an error.\n- allow: (default) allow providers which store user data non-transiently and may train on it\n\n- deny: use only providers which do not collect user data."},"ProviderName":{"type":"string","enum":["AI21","AionLabs","Alibaba","Amazon Bedrock","Amazon Nova","Anthropic","Arcee AI","AtlasCloud","Avian","Azure","BaseTen","BytePlus","Black Forest Labs","Cerebras","Chutes","Cirrascale","Clarifai","Cloudflare","Cohere","Crusoe","DeepInfra","DeepSeek","Featherless","Fireworks","Friendli","GMICloud","Google","Google AI Studio","Groq","Hyperbolic","Inception","Inceptron","InferenceNet","Infermatic","Inflection","Liquid","Mara","Mancer 2","Minimax","ModelRun","Mistral","Modular","Moonshot AI","Morph","NCompass","Nebius","NextBit","Novita","Nvidia","OpenAI","OpenInference","Parasail","Perplexity","Phala","Relace","SambaNova","Seed","SiliconFlow","Sourceful","Stealth","StreamLake","Switchpoint","Together","Upstage","Venice","WandB","Xiaomi","xAI","Z.AI","FakeProvider"]},"Quantization":{"type":"string","enum":["int4","int8","fp4","fp6","fp8","fp16","bf16","fp32","unknown"]},"ProviderSort":{"type":"string","enum":["price","throughput","latency"]},"ProviderSortConfig":{"type":"object","properties":{"by":{"anyOf":[{"$ref":"#/components/schemas/ProviderSort"},{"type":"null"}]},"partition":{"anyOf":[{"type":"string","enum":["model","none"]},{"type":"null"}]}}},"BigNumberUnion":{"type":"string","description":"A value in string format that is a large number"},"PreferredMinThroughput":{"anyOf":[{"type":"number"},{"$ref":"#/components/schemas/PercentileThroughputCutoffs"},{"nullable":true}],"description":"Preferred minimum throughput (in tokens per second). Can be a number (applies to p50) or an object with percentile-specific cutoffs. Endpoints below the threshold(s) may still be used, but are deprioritized in routing. When using fallback models, this may cause a fallback model to be used instead of the primary model if it meets the threshold."},"PercentileThroughputCutoffs":{"type":"object","properties":{"p50":{"type":"number","nullable":true,"description":"Minimum p50 throughput (tokens/sec)"},"p75":{"type":"number","nullable":true,"description":"Minimum p75 throughput (tokens/sec)"},"p90":{"type":"number","nullable":true,"description":"Minimum p90 throughput (tokens/sec)"},"p99":{"type":"number","nullable":true,"description":"Minimum p99 throughput (tokens/sec)"}},"description":"Percentile-based throughput cutoffs. All specified cutoffs must be met for an endpoint to be preferred."},"PreferredMaxLatency":{"anyOf":[{"type":"number"},{"$ref":"#/components/schemas/PercentileLatencyCutoffs"},{"nullable":true}],"description":"Preferred maximum latency (in seconds). Can be a number (applies to p50) or an object with percentile-specific cutoffs. Endpoints above the threshold(s) may still be used, but are deprioritized in routing. When using fallback models, this may cause a fallback model to be used instead of the primary model if it meets the threshold."},"PercentileLatencyCutoffs":{"type":"object","properties":{"p50":{"type":"number","nullable":true,"description":"Maximum p50 latency (seconds)"},"p75":{"type":"number","nullable":true,"description":"Maximum p75 latency (seconds)"},"p90":{"type":"number","nullable":true,"description":"Maximum p90 latency (seconds)"},"p99":{"type":"number","nullable":true,"description":"Maximum p99 latency (seconds)"}},"description":"Percentile-based latency cutoffs. All specified cutoffs must be met for an endpoint to be preferred."},"WebSearchEngine":{"type":"string","enum":["native","exa"],"description":"The search engine to use for web search."},"PDFParserOptions":{"type":"object","properties":{"engine":{"$ref":"#/components/schemas/PDFParserEngine"}},"description":"Options for PDF parsing."},"PDFParserEngine":{"type":"string","enum":["mistral-ocr","pdf-text","native"],"description":"The engine to use for parsing PDF files."},"OpenResponsesNonStreamingResponse":{"allOf":[{"$ref":"#/components/schemas/OpenAIResponsesNonStreamingResponse"},{"type":"object","properties":{"output":{"type":"array","items":{"$ref":"#/components/schemas/ResponsesOutputItem"}},"usage":{"$ref":"#/components/schemas/OpenResponsesUsage"}}}],"description":"Complete non-streaming response from the Responses API"},"OpenAIResponsesNonStreamingResponse":{"type":"object","properties":{"id":{"type":"string"},"object":{"type":"string","enum":["response"]},"created_at":{"type":"number"},"model":{"type":"string"},"status":{"$ref":"#/components/schemas/OpenAIResponsesResponseStatus"},"completed_at":{"type":"number","nullable":true},"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":{"$ref":"#/components/schemas/OpenAIResponsesIncompleteDetails"},"usage":{"$ref":"#/components/schemas/OpenAIResponsesUsage"},"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},"presence_penalty":{"type":"number","nullable":true},"frequency_penalty":{"type":"number","nullable":true},"instructions":{"$ref":"#/components/schemas/OpenAIResponsesInput"},"metadata":{"$ref":"#/components/schemas/OpenResponsesRequestMetadata"},"tools":{"type":"array","items":{"oneOf":[{"allOf":[{"$ref":"#/components/schemas/OpenResponsesFunctionTool"},{"type":"object","properties":{}}],"description":"Function tool definition"},{"$ref":"#/components/schemas/OpenResponsesWebSearchPreviewTool"},{"$ref":"#/components/schemas/OpenResponsesWebSearchPreview20250311Tool"},{"$ref":"#/components/schemas/OpenResponsesWebSearchTool"},{"$ref":"#/components/schemas/OpenResponsesWebSearch20250826Tool"}]}},"tool_choice":{"$ref":"#/components/schemas/OpenAIResponsesToolChoice"},"parallel_tool_calls":{"type":"boolean"},"prompt":{"$ref":"#/components/schemas/OpenAIResponsesPrompt"},"background":{"type":"boolean","nullable":true},"previous_response_id":{"type":"string","nullable":true},"reasoning":{"$ref":"#/components/schemas/OpenAIResponsesReasoningConfig"},"service_tier":{"$ref":"#/components/schemas/OpenAIResponsesServiceTier"},"store":{"type":"boolean"},"truncation":{"$ref":"#/components/schemas/OpenAIResponsesTruncation"},"text":{"$ref":"#/components/schemas/ResponseTextConfig"}},"required":["id","object","created_at","model","status","completed_at","output","error","incomplete_details","temperature","top_p","presence_penalty","frequency_penalty","instructions","metadata","tools","tool_choice","parallel_tool_calls"]},"OpenAIResponsesResponseStatus":{"type":"string","enum":["completed","incomplete","in_progress","failed","cancelled","queued"]},"ResponsesErrorField":{"type":"object","nullable":true,"properties":{"code":{"type":"string","enum":["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":["code","message"],"description":"Error information returned from the API"},"OpenAIResponsesIncompleteDetails":{"type":"object","nullable":true,"properties":{"reason":{"type":"string","enum":["max_output_tokens","content_filter"]}}},"OpenAIResponsesUsage":{"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"]},"OpenAIResponsesInput":{"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"},{"$ref":"#/components/schemas/ResponseInputAudio"}],"discriminator":{"propertyName":"type","mapping":{"input_text":"#/components/schemas/ResponseInputText","input_image":"#/components/schemas/ResponseInputImage","input_file":"#/components/schemas/ResponseInputFile","input_audio":"#/components/schemas/ResponseInputAudio"}}}},{"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"},{"$ref":"#/components/schemas/ResponseInputAudio"}],"discriminator":{"propertyName":"type","mapping":{"input_text":"#/components/schemas/ResponseInputText","input_image":"#/components/schemas/ResponseInputImage","input_file":"#/components/schemas/ResponseInputFile","input_audio":"#/components/schemas/ResponseInputAudio"}}}}},"required":["id","role","content"]},{"type":"object","properties":{"type":{"type":"string","enum":["function_call_output"]},"id":{"type":"string","nullable":true},"call_id":{"type":"string"},"output":{"type":"string"},"status":{"$ref":"#/components/schemas/ToolCallStatus"}},"required":["type","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}]},"OpenAIResponsesServiceTier":{"type":"string","nullable":true,"enum":["auto","default","flex","priority","scale"]},"ResponsesOutputItem":{"anyOf":[{"$ref":"#/components/schemas/ResponsesOutputMessage"},{"$ref":"#/components/schemas/ResponsesOutputItemReasoning"},{"$ref":"#/components/schemas/ResponsesOutputItemFunctionCall"},{"$ref":"#/components/schemas/ResponsesWebSearchCallOutput"},{"$ref":"#/components/schemas/ResponsesOutputItemFileSearchCall"},{"$ref":"#/components/schemas/ResponsesImageGenerationCall"}],"description":"An output item from the response"},"OpenResponsesUsage":{"allOf":[{"$ref":"#/components/schemas/OpenAIResponsesUsage"},{"type":"object","nullable":true,"properties":{"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"]}}}],"description":"Token usage information for the response"},"OpenResponsesStreamEvent":{"oneOf":[{"allOf":[{"$ref":"#/components/schemas/OpenResponsesCreatedEvent"},{"type":"object","properties":{"response":{"$ref":"#/components/schemas/OpenResponsesNonStreamingResponse"}}}],"description":"Event emitted when a response is created"},{"allOf":[{"$ref":"#/components/schemas/OpenResponsesInProgressEvent"},{"type":"object","properties":{"response":{"$ref":"#/components/schemas/OpenResponsesNonStreamingResponse"}}}],"description":"Event emitted when a response is in progress"},{"allOf":[{"$ref":"#/components/schemas/OpenResponsesCompletedEvent"},{"type":"object","properties":{"response":{"$ref":"#/components/schemas/OpenResponsesNonStreamingResponse"}}}],"description":"Event emitted when a response has completed successfully"},{"allOf":[{"$ref":"#/components/schemas/OpenResponsesIncompleteEvent"},{"type":"object","properties":{"response":{"$ref":"#/components/schemas/OpenResponsesNonStreamingResponse"}}}],"description":"Event emitted when a response is incomplete"},{"allOf":[{"$ref":"#/components/schemas/OpenResponsesFailedEvent"},{"type":"object","properties":{"response":{"$ref":"#/components/schemas/OpenResponsesNonStreamingResponse"}}}],"description":"Event emitted when a response has failed"},{"$ref":"#/components/schemas/OpenResponsesErrorEvent"},{"allOf":[{"$ref":"#/components/schemas/OpenResponsesOutputItemAddedEvent"},{"type":"object","properties":{"item":{"$ref":"#/components/schemas/ResponsesOutputItem"}}}],"description":"Event emitted when a new output item is added to the response"},{"allOf":[{"$ref":"#/components/schemas/OpenResponsesOutputItemDoneEvent"},{"type":"object","properties":{"item":{"$ref":"#/components/schemas/ResponsesOutputItem"}}}],"description":"Event emitted when an output item is complete"},{"allOf":[{"$ref":"#/components/schemas/OpenResponsesContentPartAddedEvent"},{"type":"object","properties":{"part":{"anyOf":[{"$ref":"#/components/schemas/ResponseOutputText"},{"$ref":"#/components/schemas/ReasoningTextContent"},{"$ref":"#/components/schemas/OpenAIResponsesRefusalContent"}]}}}],"description":"Event emitted when a new content part is added to an output item"},{"allOf":[{"$ref":"#/components/schemas/OpenResponsesContentPartDoneEvent"},{"type":"object","properties":{"part":{"anyOf":[{"$ref":"#/components/schemas/ResponseOutputText"},{"$ref":"#/components/schemas/ReasoningTextContent"},{"$ref":"#/components/schemas/OpenAIResponsesRefusalContent"}]}}}],"description":"Event emitted when a content part is complete"},{"allOf":[{"$ref":"#/components/schemas/OpenResponsesTextDeltaEvent"},{"type":"object","properties":{}}],"description":"Event emitted when a text delta is streamed"},{"allOf":[{"$ref":"#/components/schemas/OpenResponsesTextDoneEvent"},{"type":"object","properties":{}}],"description":"Event emitted when text streaming is complete"},{"allOf":[{"$ref":"#/components/schemas/OpenResponsesRefusalDeltaEvent"},{"type":"object","properties":{}}],"description":"Event emitted when a refusal delta is streamed"},{"allOf":[{"$ref":"#/components/schemas/OpenResponsesRefusalDoneEvent"},{"type":"object","properties":{}}],"description":"Event emitted when refusal streaming is complete"},{"allOf":[{"$ref":"#/components/schemas/OpenResponsesOutputTextAnnotationAddedEvent"},{"type":"object","properties":{}}],"description":"Event emitted when a text annotation is added to output"},{"allOf":[{"$ref":"#/components/schemas/OpenResponsesFunctionCallArgumentsDeltaEvent"},{"type":"object","properties":{}}],"description":"Event emitted when function call arguments are being streamed"},{"allOf":[{"$ref":"#/components/schemas/OpenResponsesFunctionCallArgumentsDoneEvent"},{"type":"object","properties":{}}],"description":"Event emitted when function call arguments streaming is complete"},{"$ref":"#/components/schemas/OpenResponsesReasoningDeltaEvent"},{"$ref":"#/components/schemas/OpenResponsesReasoningDoneEvent"},{"$ref":"#/components/schemas/OpenResponsesReasoningSummaryPartAddedEvent"},{"allOf":[{"$ref":"#/components/schemas/OpenResponsesReasoningSummaryPartDoneEvent"},{"type":"object","properties":{}}],"description":"Event emitted when a reasoning summary part is complete"},{"$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"},"OpenResponsesCreatedEvent":{"type":"object","properties":{"type":{"type":"string","enum":["response.created"]},"response":{"$ref":"#/components/schemas/OpenAIResponsesNonStreamingResponse"},"sequence_number":{"type":"number"}},"required":["type","response","sequence_number"],"description":"Event emitted when a response is created"},"OpenResponsesInProgressEvent":{"type":"object","properties":{"type":{"type":"string","enum":["response.in_progress"]},"response":{"$ref":"#/components/schemas/OpenAIResponsesNonStreamingResponse"},"sequence_number":{"type":"number"}},"required":["type","response","sequence_number"],"description":"Event emitted when a response is in progress"},"OpenResponsesCompletedEvent":{"type":"object","properties":{"type":{"type":"string","enum":["response.completed"]},"response":{"$ref":"#/components/schemas/OpenAIResponsesNonStreamingResponse"},"sequence_number":{"type":"number"}},"required":["type","response","sequence_number"],"description":"Event emitted when a response has completed successfully"},"OpenResponsesIncompleteEvent":{"type":"object","properties":{"type":{"type":"string","enum":["response.incomplete"]},"response":{"$ref":"#/components/schemas/OpenAIResponsesNonStreamingResponse"},"sequence_number":{"type":"number"}},"required":["type","response","sequence_number"],"description":"Event emitted when a response is incomplete"},"OpenResponsesFailedEvent":{"type":"object","properties":{"type":{"type":"string","enum":["response.failed"]},"response":{"$ref":"#/components/schemas/OpenAIResponsesNonStreamingResponse"},"sequence_number":{"type":"number"}},"required":["type","response","sequence_number"],"description":"Event emitted when a response has failed"},"OpenResponsesErrorEvent":{"allOf":[{"$ref":"#/components/schemas/OpenAIResponsesErrorEvent"},{"type":"object","properties":{}}],"description":"Event emitted when an error occurs during streaming"},"OpenAIResponsesErrorEvent":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"code":{"type":"string","nullable":true},"message":{"type":"string"},"param":{"type":"string","nullable":true},"sequence_number":{"type":"number"}},"required":["type","code","message","param","sequence_number"],"description":"Event emitted when an error occurs during streaming"},"OpenResponsesOutputItemAddedEvent":{"type":"object","properties":{"type":{"type":"string","enum":["response.output_item.added"]},"output_index":{"type":"number"},"item":{"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"}}},"sequence_number":{"type":"number"}},"required":["type","output_index","item","sequence_number"],"description":"Event emitted when a new output item is added to the response"},"OpenResponsesOutputItemDoneEvent":{"type":"object","properties":{"type":{"type":"string","enum":["response.output_item.done"]},"output_index":{"type":"number"},"item":{"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"}}},"sequence_number":{"type":"number"}},"required":["type","output_index","item","sequence_number"],"description":"Event emitted when an output item is complete"},"OpenResponsesContentPartAddedEvent":{"type":"object","properties":{"type":{"type":"string","enum":["response.content_part.added"]},"output_index":{"type":"number"},"item_id":{"type":"string"},"content_index":{"type":"number"},"part":{"anyOf":[{"$ref":"#/components/schemas/ResponseOutputText"},{"$ref":"#/components/schemas/OpenAIResponsesRefusalContent"}]},"sequence_number":{"type":"number"}},"required":["type","output_index","item_id","content_index","part","sequence_number"],"description":"Event emitted when a new content part is added to an output item"},"OpenResponsesContentPartDoneEvent":{"type":"object","properties":{"type":{"type":"string","enum":["response.content_part.done"]},"output_index":{"type":"number"},"item_id":{"type":"string"},"content_index":{"type":"number"},"part":{"anyOf":[{"$ref":"#/components/schemas/ResponseOutputText"},{"$ref":"#/components/schemas/OpenAIResponsesRefusalContent"}]},"sequence_number":{"type":"number"}},"required":["type","output_index","item_id","content_index","part","sequence_number"],"description":"Event emitted when a content part is complete"},"OpenResponsesTextDeltaEvent":{"type":"object","properties":{"type":{"type":"string","enum":["response.output_text.delta"]},"logprobs":{"type":"array","items":{"$ref":"#/components/schemas/OpenResponsesLogProbs"}},"output_index":{"type":"number"},"item_id":{"type":"string"},"content_index":{"type":"number"},"delta":{"type":"string"},"sequence_number":{"type":"number"}},"required":["type","logprobs","output_index","item_id","content_index","delta","sequence_number"],"description":"Event emitted when a text delta is streamed"},"OpenResponsesLogProbs":{"type":"object","properties":{"logprob":{"type":"number"},"token":{"type":"string"},"top_logprobs":{"type":"array","items":{"$ref":"#/components/schemas/OpenResponsesTopLogprobs"}}},"required":["logprob","token"],"description":"Log probability information for a token"},"OpenResponsesTopLogprobs":{"type":"object","properties":{"token":{"type":"string"},"logprob":{"type":"number"}},"description":"Alternative token with its log probability"},"OpenResponsesTextDoneEvent":{"type":"object","properties":{"type":{"type":"string","enum":["response.output_text.done"]},"output_index":{"type":"number"},"item_id":{"type":"string"},"content_index":{"type":"number"},"text":{"type":"string"},"sequence_number":{"type":"number"},"logprobs":{"type":"array","items":{"$ref":"#/components/schemas/OpenResponsesLogProbs"}}},"required":["type","output_index","item_id","content_index","text","sequence_number","logprobs"],"description":"Event emitted when text streaming is complete"},"OpenResponsesRefusalDeltaEvent":{"type":"object","properties":{"type":{"type":"string","enum":["response.refusal.delta"]},"output_index":{"type":"number"},"item_id":{"type":"string"},"content_index":{"type":"number"},"delta":{"type":"string"},"sequence_number":{"type":"number"}},"required":["type","output_index","item_id","content_index","delta","sequence_number"],"description":"Event emitted when a refusal delta is streamed"},"OpenResponsesRefusalDoneEvent":{"type":"object","properties":{"type":{"type":"string","enum":["response.refusal.done"]},"output_index":{"type":"number"},"item_id":{"type":"string"},"content_index":{"type":"number"},"refusal":{"type":"string"},"sequence_number":{"type":"number"}},"required":["type","output_index","item_id","content_index","refusal","sequence_number"],"description":"Event emitted when refusal streaming is complete"},"OpenResponsesOutputTextAnnotationAddedEvent":{"type":"object","properties":{"type":{"type":"string","enum":["response.output_text.annotation.added"]},"output_index":{"type":"number"},"item_id":{"type":"string"},"content_index":{"type":"number"},"sequence_number":{"type":"number"},"annotation_index":{"type":"number"},"annotation":{"$ref":"#/components/schemas/OpenAIResponsesAnnotation"}},"required":["type","output_index","item_id","content_index","sequence_number","annotation_index","annotation"],"description":"Event emitted when a text annotation is added to output"},"OpenResponsesFunctionCallArgumentsDeltaEvent":{"type":"object","properties":{"type":{"type":"string","enum":["response.function_call_arguments.delta"]},"item_id":{"type":"string"},"output_index":{"type":"number"},"delta":{"type":"string"},"sequence_number":{"type":"number"}},"required":["type","item_id","output_index","delta","sequence_number"],"description":"Event emitted when function call arguments are being streamed"},"OpenResponsesFunctionCallArgumentsDoneEvent":{"type":"object","properties":{"type":{"type":"string","enum":["response.function_call_arguments.done"]},"item_id":{"type":"string"},"output_index":{"type":"number"},"name":{"type":"string"},"arguments":{"type":"string"},"sequence_number":{"type":"number"}},"required":["type","item_id","output_index","name","arguments","sequence_number"],"description":"Event emitted when function call arguments streaming is complete"},"OpenResponsesReasoningDeltaEvent":{"allOf":[{"$ref":"#/components/schemas/OpenAIResponsesReasoningDeltaEvent"},{"type":"object","properties":{}}],"description":"Event emitted when reasoning text delta is streamed"},"OpenAIResponsesReasoningDeltaEvent":{"type":"object","properties":{"type":{"type":"string","enum":["response.reasoning_text.delta"]},"output_index":{"type":"number"},"item_id":{"type":"string"},"content_index":{"type":"number"},"delta":{"type":"string"},"sequence_number":{"type":"number"}},"required":["type","output_index","item_id","content_index","delta","sequence_number"],"description":"Event emitted when reasoning text delta is streamed"},"OpenResponsesReasoningDoneEvent":{"allOf":[{"$ref":"#/components/schemas/OpenAIResponsesReasoningDoneEvent"},{"type":"object","properties":{}}],"description":"Event emitted when reasoning text streaming is complete"},"OpenAIResponsesReasoningDoneEvent":{"type":"object","properties":{"type":{"type":"string","enum":["response.reasoning_text.done"]},"output_index":{"type":"number"},"item_id":{"type":"string"},"content_index":{"type":"number"},"text":{"type":"string"},"sequence_number":{"type":"number"}},"required":["type","output_index","item_id","content_index","text","sequence_number"],"description":"Event emitted when reasoning text streaming is complete"},"OpenResponsesReasoningSummaryPartAddedEvent":{"allOf":[{"$ref":"#/components/schemas/OpenAIResponsesReasoningSummaryPartAddedEvent"},{"type":"object","properties":{}}],"description":"Event emitted when a reasoning summary part is added"},"OpenAIResponsesReasoningSummaryPartAddedEvent":{"type":"object","properties":{"type":{"type":"string","enum":["response.reasoning_summary_part.added"]},"output_index":{"type":"number"},"item_id":{"type":"string"},"summary_index":{"type":"number"},"part":{"$ref":"#/components/schemas/ReasoningSummaryText"},"sequence_number":{"type":"number"}},"required":["type","output_index","item_id","summary_index","part","sequence_number"],"description":"Event emitted when a reasoning summary part is added"},"OpenResponsesReasoningSummaryPartDoneEvent":{"type":"object","properties":{"type":{"type":"string","enum":["response.reasoning_summary_part.done"]},"output_index":{"type":"number"},"item_id":{"type":"string"},"summary_index":{"type":"number"},"part":{"$ref":"#/components/schemas/ReasoningSummaryText"},"sequence_number":{"type":"number"}},"required":["type","output_index","item_id","summary_index","part","sequence_number"],"description":"Event emitted when a reasoning summary part is complete"},"OpenResponsesReasoningSummaryTextDeltaEvent":{"allOf":[{"$ref":"#/components/schemas/OpenAIResponsesReasoningSummaryTextDeltaEvent"},{"type":"object","properties":{}}],"description":"Event emitted when reasoning summary text delta is streamed"},"OpenAIResponsesReasoningSummaryTextDeltaEvent":{"type":"object","properties":{"type":{"type":"string","enum":["response.reasoning_summary_text.delta"]},"item_id":{"type":"string"},"output_index":{"type":"number"},"summary_index":{"type":"number"},"delta":{"type":"string"},"sequence_number":{"type":"number"}},"required":["type","item_id","output_index","summary_index","delta","sequence_number"],"description":"Event emitted when reasoning summary text delta is streamed"},"OpenResponsesReasoningSummaryTextDoneEvent":{"allOf":[{"$ref":"#/components/schemas/OpenAIResponsesReasoningSummaryTextDoneEvent"},{"type":"object","properties":{}}],"description":"Event emitted when reasoning summary text streaming is complete"},"OpenAIResponsesReasoningSummaryTextDoneEvent":{"type":"object","properties":{"type":{"type":"string","enum":["response.reasoning_summary_text.done"]},"item_id":{"type":"string"},"output_index":{"type":"number"},"summary_index":{"type":"number"},"text":{"type":"string"},"sequence_number":{"type":"number"}},"required":["type","item_id","output_index","summary_index","text","sequence_number"],"description":"Event emitted when reasoning summary text streaming is complete"},"OpenResponsesImageGenCallInProgress":{"allOf":[{"$ref":"#/components/schemas/OpenAIResponsesImageGenCallInProgress"},{"type":"object","properties":{}}],"description":"Image generation call in progress"},"OpenAIResponsesImageGenCallInProgress":{"type":"object","properties":{"type":{"type":"string","enum":["response.image_generation_call.in_progress"]},"item_id":{"type":"string"},"output_index":{"type":"number"},"sequence_number":{"type":"number"}},"required":["type","item_id","output_index","sequence_number"]},"OpenResponsesImageGenCallGenerating":{"allOf":[{"$ref":"#/components/schemas/OpenAIResponsesImageGenCallGenerating"},{"type":"object","properties":{}}],"description":"Image generation call is generating"},"OpenAIResponsesImageGenCallGenerating":{"type":"object","properties":{"type":{"type":"string","enum":["response.image_generation_call.generating"]},"item_id":{"type":"string"},"output_index":{"type":"number"},"sequence_number":{"type":"number"}},"required":["type","item_id","output_index","sequence_number"]},"OpenResponsesImageGenCallPartialImage":{"allOf":[{"$ref":"#/components/schemas/OpenAIResponsesImageGenCallPartialImage"},{"type":"object","properties":{}}],"description":"Image generation call with partial image"},"OpenAIResponsesImageGenCallPartialImage":{"type":"object","properties":{"type":{"type":"string","enum":["response.image_generation_call.partial_image"]},"item_id":{"type":"string"},"output_index":{"type":"number"},"sequence_number":{"type":"number"},"partial_image_b64":{"type":"string"},"partial_image_index":{"type":"number"}},"required":["type","item_id","output_index","sequence_number","partial_image_b64","partial_image_index"]},"OpenResponsesImageGenCallCompleted":{"allOf":[{"$ref":"#/components/schemas/OpenAIResponsesImageGenCallCompleted"},{"type":"object","properties":{}}],"description":"Image generation call completed"},"OpenAIResponsesImageGenCallCompleted":{"type":"object","properties":{"type":{"type":"string","enum":["response.image_generation_call.completed"]},"item_id":{"type":"string"},"output_index":{"type":"number"},"sequence_number":{"type":"number"}},"required":["type","item_id","output_index","sequence_number"]},"BadRequestResponse":{"type":"object","properties":{"error":{"$ref":"#/components/schemas/BadRequestResponseErrorData"},"user_id":{"type":"string","nullable":true}},"required":["error"],"description":"Bad Request - Invalid request parameters or malformed input"},"BadRequestResponseErrorData":{"type":"object","properties":{"code":{"type":"integer"},"message":{"type":"string"},"metadata":{"type":"object","nullable":true,"additionalProperties":{"nullable":true}}},"required":["code","message"],"description":"Error data for BadRequestResponse"},"UnauthorizedResponse":{"type":"object","properties":{"error":{"$ref":"#/components/schemas/UnauthorizedResponseErrorData"},"user_id":{"type":"string","nullable":true}},"required":["error"],"description":"Unauthorized - Authentication required or invalid credentials"},"UnauthorizedResponseErrorData":{"type":"object","properties":{"code":{"type":"integer"},"message":{"type":"string"},"metadata":{"type":"object","nullable":true,"additionalProperties":{"nullable":true}}},"required":["code","message"],"description":"Error data for UnauthorizedResponse"},"PaymentRequiredResponse":{"type":"object","properties":{"error":{"$ref":"#/components/schemas/PaymentRequiredResponseErrorData"},"user_id":{"type":"string","nullable":true}},"required":["error"],"description":"Payment Required - Insufficient credits or quota to complete request"},"PaymentRequiredResponseErrorData":{"type":"object","properties":{"code":{"type":"integer"},"message":{"type":"string"},"metadata":{"type":"object","nullable":true,"additionalProperties":{"nullable":true}}},"required":["code","message"],"description":"Error data for PaymentRequiredResponse"},"NotFoundResponse":{"type":"object","properties":{"error":{"$ref":"#/components/schemas/NotFoundResponseErrorData"},"user_id":{"type":"string","nullable":true}},"required":["error"],"description":"Not Found - Resource does not exist"},"NotFoundResponseErrorData":{"type":"object","properties":{"code":{"type":"integer"},"message":{"type":"string"},"metadata":{"type":"object","nullable":true,"additionalProperties":{"nullable":true}}},"required":["code","message"],"description":"Error data for NotFoundResponse"},"RequestTimeoutResponse":{"type":"object","properties":{"error":{"$ref":"#/components/schemas/RequestTimeoutResponseErrorData"},"user_id":{"type":"string","nullable":true}},"required":["error"],"description":"Request Timeout - Operation exceeded time limit"},"RequestTimeoutResponseErrorData":{"type":"object","properties":{"code":{"type":"integer"},"message":{"type":"string"},"metadata":{"type":"object","nullable":true,"additionalProperties":{"nullable":true}}},"required":["code","message"],"description":"Error data for RequestTimeoutResponse"},"PayloadTooLargeResponse":{"type":"object","properties":{"error":{"$ref":"#/components/schemas/PayloadTooLargeResponseErrorData"},"user_id":{"type":"string","nullable":true}},"required":["error"],"description":"Payload Too Large - Request payload exceeds size limits"},"PayloadTooLargeResponseErrorData":{"type":"object","properties":{"code":{"type":"integer"},"message":{"type":"string"},"metadata":{"type":"object","nullable":true,"additionalProperties":{"nullable":true}}},"required":["code","message"],"description":"Error data for PayloadTooLargeResponse"},"UnprocessableEntityResponse":{"type":"object","properties":{"error":{"$ref":"#/components/schemas/UnprocessableEntityResponseErrorData"},"user_id":{"type":"string","nullable":true}},"required":["error"],"description":"Unprocessable Entity - Semantic validation failure"},"UnprocessableEntityResponseErrorData":{"type":"object","properties":{"code":{"type":"integer"},"message":{"type":"string"},"metadata":{"type":"object","nullable":true,"additionalProperties":{"nullable":true}}},"required":["code","message"],"description":"Error data for UnprocessableEntityResponse"},"TooManyRequestsResponse":{"type":"object","properties":{"error":{"$ref":"#/components/schemas/TooManyRequestsResponseErrorData"},"user_id":{"type":"string","nullable":true}},"required":["error"],"description":"Too Many Requests - Rate limit exceeded"},"TooManyRequestsResponseErrorData":{"type":"object","properties":{"code":{"type":"integer"},"message":{"type":"string"},"metadata":{"type":"object","nullable":true,"additionalProperties":{"nullable":true}}},"required":["code","message"],"description":"Error data for TooManyRequestsResponse"},"InternalServerResponse":{"type":"object","properties":{"error":{"$ref":"#/components/schemas/InternalServerResponseErrorData"},"user_id":{"type":"string","nullable":true}},"required":["error"],"description":"Internal Server Error - Unexpected server error"},"InternalServerResponseErrorData":{"type":"object","properties":{"code":{"type":"integer"},"message":{"type":"string"},"metadata":{"type":"object","nullable":true,"additionalProperties":{"nullable":true}}},"required":["code","message"],"description":"Error data for InternalServerResponse"},"BadGatewayResponse":{"type":"object","properties":{"error":{"$ref":"#/components/schemas/BadGatewayResponseErrorData"},"user_id":{"type":"string","nullable":true}},"required":["error"],"description":"Bad Gateway - Provider/upstream API failure"},"BadGatewayResponseErrorData":{"type":"object","properties":{"code":{"type":"integer"},"message":{"type":"string"},"metadata":{"type":"object","nullable":true,"additionalProperties":{"nullable":true}}},"required":["code","message"],"description":"Error data for BadGatewayResponse"},"ServiceUnavailableResponse":{"type":"object","properties":{"error":{"$ref":"#/components/schemas/ServiceUnavailableResponseErrorData"},"user_id":{"type":"string","nullable":true}},"required":["error"],"description":"Service Unavailable - Service temporarily unavailable"},"ServiceUnavailableResponseErrorData":{"type":"object","properties":{"code":{"type":"integer"},"message":{"type":"string"},"metadata":{"type":"object","nullable":true,"additionalProperties":{"nullable":true}}},"required":["code","message"],"description":"Error data for ServiceUnavailableResponse"},"EdgeNetworkTimeoutResponse":{"type":"object","properties":{"error":{"$ref":"#/components/schemas/EdgeNetworkTimeoutResponseErrorData"},"user_id":{"type":"string","nullable":true}},"required":["error"],"description":"Infrastructure Timeout - Provider request timed out at edge network"},"EdgeNetworkTimeoutResponseErrorData":{"type":"object","properties":{"code":{"type":"integer"},"message":{"type":"string"},"metadata":{"type":"object","nullable":true,"additionalProperties":{"nullable":true}}},"required":["code","message"],"description":"Error data for EdgeNetworkTimeoutResponse"},"ProviderOverloadedResponse":{"type":"object","properties":{"error":{"$ref":"#/components/schemas/ProviderOverloadedResponseErrorData"},"user_id":{"type":"string","nullable":true}},"required":["error"],"description":"Provider Overloaded - Provider is temporarily overloaded"},"ProviderOverloadedResponseErrorData":{"type":"object","properties":{"code":{"type":"integer"},"message":{"type":"string"},"metadata":{"type":"object","nullable":true,"additionalProperties":{"nullable":true}}},"required":["code","message"],"description":"Error data for ProviderOverloadedResponse"}}},"paths":{"/responses":{"post":{"tags":["beta.responses"],"summary":"Create a response","description":"Creates a streaming or non-streaming response using OpenResponses API format","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenResponsesRequest"}}},"required":true},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenResponsesNonStreamingResponse"}},"text/event-stream":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/OpenResponsesStreamEvent"}},"required":["data"]}}}},"400":{"description":"Bad Request - Invalid request parameters or malformed input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestResponse"}}}},"401":{"description":"Unauthorized - Authentication required or invalid credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedResponse"}}}},"402":{"description":"Payment Required - Insufficient credits or quota to complete request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentRequiredResponse"}}}},"404":{"description":"Not Found - Resource does not exist","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundResponse"}}}},"408":{"description":"Request Timeout - Operation exceeded time limit","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RequestTimeoutResponse"}}}},"413":{"description":"Payload Too Large - Request payload exceeds size limits","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLargeResponse"}}}},"422":{"description":"Unprocessable Entity - Semantic validation failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnprocessableEntityResponse"}}}},"429":{"description":"Too Many Requests - Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TooManyRequestsResponse"}}}},"500":{"description":"Internal Server Error - Unexpected server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerResponse"}}}},"502":{"description":"Bad Gateway - Provider/upstream API failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadGatewayResponse"}}}},"503":{"description":"Service Unavailable - Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ServiceUnavailableResponse"}}}},"524":{"description":"Infrastructure Timeout - Request timed out at our edge network","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EdgeNetworkTimeoutResponse"}}}},"529":{"description":"Provider Overloaded - Provider is temporarily overloaded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProviderOverloadedResponse"}}}}},"operationId":"createResponses"}}}}
```
