OpenResponsesRequest - TypeScript SDK
OpenResponsesRequest type definition
The TypeScript SDK and docs are currently in beta. Report issues on GitHub.
Request schema for Responses endpoint
Example Usage
1 import { OpenResponsesRequest } from "@openrouter/sdk/models"; 2 3 let value: OpenResponsesRequest = {};
Fields
| Field | Type | Required | Description | Example |
|---|---|---|---|---|
input | models.OpenResponsesInput | ➖ | Input for a response request - can be a string or array of items | [{"role": "user","content": "What is the weather today?"}] |
instructions | string | ➖ | N/A | |
metadata | Record<string, *string*> | ➖ | 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. | {"user_id": "123","session_id": "abc-def-ghi"} |
tools | models.OpenResponsesRequestToolUnion[] | ➖ | N/A | |
toolChoice | models.OpenAIResponsesToolChoiceUnion | ➖ | N/A | |
parallelToolCalls | boolean | ➖ | N/A | |
model | string | ➖ | N/A | |
models | string[] | ➖ | N/A | |
text | models.OpenResponsesResponseText | ➖ | Text output configuration including format and verbosity | {"format": {"type": "text"},“verbosity”: “medium” } |
reasoning | models.OpenResponsesReasoningConfig | ➖ | Configuration for reasoning mode in the response | {"summary": "auto","enabled": true} |
maxOutputTokens | number | ➖ | N/A | |
temperature | number | ➖ | N/A | |
topP | number | ➖ | N/A | |
topK | number | ➖ | N/A | |
promptCacheKey | string | ➖ | N/A | |
previousResponseId | string | ➖ | N/A | |
prompt | models.OpenAIResponsesPrompt | ➖ | N/A | |
include | models.OpenAIResponsesIncludable[] | ➖ | N/A | |
background | boolean | ➖ | N/A | |
safetyIdentifier | string | ➖ | N/A | |
store | boolean | ➖ | N/A | |
serviceTier | models.ServiceTier | ➖ | N/A | auto |
truncation | models.Truncation | ➖ | N/A | auto |
stream | boolean | ➖ | N/A | |
provider | models.Provider | ➖ | When multiple model providers are available, optionally indicate your routing preference. | |
plugins | models.Plugin[] | ➖ | Plugins you want to enable for this request, including their settings. | |
user | string | ➖ | 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. |