Class RealtimeResponseCreateParams
- 
                    
                    - All Implemented Interfaces:
 
 public final class RealtimeResponseCreateParamsCreate a new Realtime response with these parameters 
- 
                
                    
                    - 
                                
                            
                                Nested Class SummaryNested Classes Modifier and Type Class Description public final classRealtimeResponseCreateParams.BuilderA builder for RealtimeResponseCreateParams. public final classRealtimeResponseCreateParams.ConversationControls which conversation the response is added to. Currently supports autoandnone, withautoas the default value. Theautovalue means that the contents of the response will be added to the default conversation. Set this tononeto create an out-of-band response which will not add items to default conversation.public final classRealtimeResponseCreateParams.MaxOutputTokensMaximum number of output tokens for a single assistant response, inclusive of tool calls. Provide an integer between 1 and 4096 to limit output tokens, or inffor the maximum available tokens for a given model. Defaults toinf.public final classRealtimeResponseCreateParams.MetadataSet of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format, and querying for objects via API or the dashboard. Keys are strings with a maximum length of 64 characters. Values are strings with a maximum length of 512 characters. public final classRealtimeResponseCreateParams.OutputModalitypublic final classRealtimeResponseCreateParams.ToolChoiceHow the model chooses tools. Provide one of the string modes or force a specific function/MCP tool. public final classRealtimeResponseCreateParams.ToolGive the model access to additional tools via remote Model Context Protocol (MCP) servers. Learn more about MCP. 
 - 
                                
                            
                                Method Summary- 
                    
                    
                    - 
                                
                            
                                Method Detail- 
                                        audiofinal Optional<RealtimeResponseCreateAudioOutput> audio() Configuration for audio input and output. 
 - 
                                        conversationfinal Optional<RealtimeResponseCreateParams.Conversation> conversation() Controls which conversation the response is added to. Currently supports autoandnone, withautoas the default value. Theautovalue means that the contents of the response will be added to the default conversation. Set this tononeto create an out-of-band response which will not add items to default conversation.
 - 
                                        inputfinal Optional<List<ConversationItem>> input() Input items to include in the prompt for the model. Using this field creates a new context for this Response instead of using the default conversation. An empty array []will clear the context for this Response. Note that this can include references to items that previously appeared in the session using their id.
 - 
                                        instructionsfinal Optional<String> instructions() The default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. "be extremely succinct", "act friendly", "here are examples of good responses") and on audio behavior (e.g. "talk quickly", "inject emotion into your voice", "laugh frequently"). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior. Note that the server sets default instructions which will be used if this field is not set and are visible in the session.createdevent at the start of the session.
 - 
                                        maxOutputTokensfinal Optional<RealtimeResponseCreateParams.MaxOutputTokens> maxOutputTokens() Maximum number of output tokens for a single assistant response, inclusive of tool calls. Provide an integer between 1 and 4096 to limit output tokens, or inffor the maximum available tokens for a given model. Defaults toinf.
 - 
                                        metadatafinal Optional<RealtimeResponseCreateParams.Metadata> metadata() Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format, and querying for objects via API or the dashboard. Keys are strings with a maximum length of 64 characters. Values are strings with a maximum length of 512 characters. 
 - 
                                        outputModalitiesfinal Optional<List<RealtimeResponseCreateParams.OutputModality>> outputModalities() The set of modalities the model used to respond, currently the only possible values are [\"audio\"],[\"text\"]. Audio output always include a text transcript. Setting the output to modetextwill disable audio output from the model.
 - 
                                        promptfinal Optional<ResponsePrompt> prompt() Reference to a prompt template and its variables. Learn more. 
 - 
                                        toolChoicefinal Optional<RealtimeResponseCreateParams.ToolChoice> toolChoice() How the model chooses tools. Provide one of the string modes or force a specific function/MCP tool. 
 - 
                                        toolsfinal Optional<List<RealtimeResponseCreateParams.Tool>> tools() Tools available to the model. 
 - 
                                        _audiofinal JsonField<RealtimeResponseCreateAudioOutput> _audio() Returns the raw JSON value of audio. Unlike audio, this method doesn't throw if the JSON field has an unexpected type. 
 - 
                                        _conversationfinal JsonField<RealtimeResponseCreateParams.Conversation> _conversation() Returns the raw JSON value of conversation. Unlike conversation, this method doesn't throw if the JSON field has an unexpected type. 
 - 
                                        _inputfinal JsonField<List<ConversationItem>> _input() Returns the raw JSON value of input. Unlike input, this method doesn't throw if the JSON field has an unexpected type. 
 - 
                                        _instructionsfinal JsonField<String> _instructions() Returns the raw JSON value of instructions. Unlike instructions, this method doesn't throw if the JSON field has an unexpected type. 
 - 
                                        _maxOutputTokensfinal JsonField<RealtimeResponseCreateParams.MaxOutputTokens> _maxOutputTokens() Returns the raw JSON value of maxOutputTokens. Unlike maxOutputTokens, this method doesn't throw if the JSON field has an unexpected type. 
 - 
                                        _metadatafinal JsonField<RealtimeResponseCreateParams.Metadata> _metadata() Returns the raw JSON value of metadata. Unlike metadata, this method doesn't throw if the JSON field has an unexpected type. 
 - 
                                        _outputModalitiesfinal JsonField<List<RealtimeResponseCreateParams.OutputModality>> _outputModalities() Returns the raw JSON value of outputModalities. Unlike outputModalities, this method doesn't throw if the JSON field has an unexpected type. 
 - 
                                        _promptfinal JsonField<ResponsePrompt> _prompt() Returns the raw JSON value of prompt. Unlike prompt, this method doesn't throw if the JSON field has an unexpected type. 
 - 
                                        _toolChoicefinal JsonField<RealtimeResponseCreateParams.ToolChoice> _toolChoice() Returns the raw JSON value of toolChoice. Unlike toolChoice, this method doesn't throw if the JSON field has an unexpected type. 
 - 
                                        _toolsfinal JsonField<List<RealtimeResponseCreateParams.Tool>> _tools() Returns the raw JSON value of tools. Unlike tools, this method doesn't throw if the JSON field has an unexpected type. 
 - 
                                        _additionalPropertiesfinal Map<String, JsonValue> _additionalProperties() 
 - 
                                        toBuilderfinal RealtimeResponseCreateParams.Builder toBuilder() 
 - 
                                        validatefinal RealtimeResponseCreateParams validate() 
 - 
                                        builderfinal static RealtimeResponseCreateParams.Builder builder() Returns a mutable builder for constructing an instance of RealtimeResponseCreateParams. 
 
- 
                                        
 
- 
                                
                            
                                
 
- 
                    
                    
                    
 
-