Class RealtimeSessionCreateRequest
- 
                    
                    - All Implemented Interfaces:
 
 public final class RealtimeSessionCreateRequestRealtime session object configuration. 
- 
                
                    
                    - 
                                
                            
                                Nested Class SummaryNested Classes Modifier and Type Class Description public final classRealtimeSessionCreateRequest.BuilderA builder for RealtimeSessionCreateRequest. public final classRealtimeSessionCreateRequest.Includepublic final classRealtimeSessionCreateRequest.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 classRealtimeSessionCreateRequest.ModelThe Realtime model used for this session. public final classRealtimeSessionCreateRequest.OutputModality
 - 
                                
                            
                                Method SummaryModifier and Type Method Description final JsonValue_type()The type of session to create. final Optional<RealtimeAudioConfig>audio()Configuration for input and output audio. final Optional<List<RealtimeSessionCreateRequest.Include>>include()Additional fields to include in server outputs. final Optional<String>instructions()The default system instructions (i.e. final Optional<RealtimeSessionCreateRequest.MaxOutputTokens>maxOutputTokens()Maximum number of output tokens for a single assistant response, inclusive of tool calls. final Optional<RealtimeSessionCreateRequest.Model>model()The Realtime model used for this session. final Optional<List<RealtimeSessionCreateRequest.OutputModality>>outputModalities()The set of modalities the model can respond with. final Optional<ResponsePrompt>prompt()Reference to a prompt template and its variables. final Optional<RealtimeToolChoiceConfig>toolChoice()How the model chooses tools. final Optional<List<RealtimeToolsConfigUnion>>tools()Tools available to the model. final Optional<RealtimeTracingConfig>tracing()Realtime API can write session traces to the /logs? final Optional<RealtimeTruncation>truncation()Controls how the realtime conversation is truncated prior to model inference. final JsonField<RealtimeAudioConfig>_audio()Returns the raw JSON value of audio. final JsonField<List<RealtimeSessionCreateRequest.Include>>_include()Returns the raw JSON value of include. final JsonField<String>_instructions()Returns the raw JSON value of instructions. final JsonField<RealtimeSessionCreateRequest.MaxOutputTokens>_maxOutputTokens()Returns the raw JSON value of maxOutputTokens. final JsonField<RealtimeSessionCreateRequest.Model>_model()Returns the raw JSON value of model. final JsonField<List<RealtimeSessionCreateRequest.OutputModality>>_outputModalities()Returns the raw JSON value of outputModalities. final JsonField<ResponsePrompt>_prompt()Returns the raw JSON value of prompt. final JsonField<RealtimeToolChoiceConfig>_toolChoice()Returns the raw JSON value of toolChoice. final JsonField<List<RealtimeToolsConfigUnion>>_tools()Returns the raw JSON value of tools. final JsonField<RealtimeTracingConfig>_tracing()Returns the raw JSON value of tracing. final JsonField<RealtimeTruncation>_truncation()Returns the raw JSON value of truncation. final Map<String, JsonValue>_additionalProperties()final RealtimeSessionCreateRequest.BuildertoBuilder()final RealtimeSessionCreateRequestvalidate()final BooleanisValid()Booleanequals(Object other)IntegerhashCode()StringtoString()final static RealtimeSessionCreateRequest.Builderbuilder()Returns a mutable builder for constructing an instance of RealtimeSessionCreateRequest. - 
                    
                    
                    - 
                                
                            
                                Method Detail- 
                                        _typefinal JsonValue _type() The type of session to create. Always realtimefor the Realtime API.Expected to always return the following: JsonValue.from("realtime")However, this method can be useful for debugging and logging (e.g. if the server responded with an unexpected value). 
 - 
                                        audiofinal Optional<RealtimeAudioConfig> audio() Configuration for input and output audio. 
 - 
                                        includefinal Optional<List<RealtimeSessionCreateRequest.Include>> include() Additional fields to include in server outputs. item.input_audio_transcription.logprobs: Include logprobs for input audio transcription.
 - 
                                        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<RealtimeSessionCreateRequest.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.
 - 
                                        modelfinal Optional<RealtimeSessionCreateRequest.Model> model() The Realtime model used for this session. 
 - 
                                        outputModalitiesfinal Optional<List<RealtimeSessionCreateRequest.OutputModality>> outputModalities() The set of modalities the model can respond with. It defaults to ["audio"], indicating that the model will respond with audio plus a transcript.["text"]can be used to make the model respond with text only. It is not possible to request bothtextandaudioat the same time.
 - 
                                        promptfinal Optional<ResponsePrompt> prompt() Reference to a prompt template and its variables. Learn more. 
 - 
                                        toolChoicefinal Optional<RealtimeToolChoiceConfig> toolChoice() How the model chooses tools. Provide one of the string modes or force a specific function/MCP tool. 
 - 
                                        toolsfinal Optional<List<RealtimeToolsConfigUnion>> tools() Tools available to the model. 
 - 
                                        tracingfinal Optional<RealtimeTracingConfig> tracing() Realtime API can write session traces to the /logs?api=traces. Set to null to disable tracing. Once tracing is enabled for a session, the configuration cannot be modified. autowill create a trace for the session with default values for the workflow name, group id, and metadata.
 - 
                                        truncationfinal Optional<RealtimeTruncation> truncation() Controls how the realtime conversation is truncated prior to model inference. The default is auto.
 - 
                                        _audiofinal JsonField<RealtimeAudioConfig> _audio() Returns the raw JSON value of audio. Unlike audio, this method doesn't throw if the JSON field has an unexpected type. 
 - 
                                        _includefinal JsonField<List<RealtimeSessionCreateRequest.Include>> _include() Returns the raw JSON value of include. Unlike include, 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<RealtimeSessionCreateRequest.MaxOutputTokens> _maxOutputTokens() Returns the raw JSON value of maxOutputTokens. Unlike maxOutputTokens, this method doesn't throw if the JSON field has an unexpected type. 
 - 
                                        _modelfinal JsonField<RealtimeSessionCreateRequest.Model> _model() Returns the raw JSON value of model. Unlike model, this method doesn't throw if the JSON field has an unexpected type. 
 - 
                                        _outputModalitiesfinal JsonField<List<RealtimeSessionCreateRequest.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<RealtimeToolChoiceConfig> _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<RealtimeToolsConfigUnion>> _tools() Returns the raw JSON value of tools. Unlike tools, this method doesn't throw if the JSON field has an unexpected type. 
 - 
                                        _tracingfinal JsonField<RealtimeTracingConfig> _tracing() Returns the raw JSON value of tracing. Unlike tracing, this method doesn't throw if the JSON field has an unexpected type. 
 - 
                                        _truncationfinal JsonField<RealtimeTruncation> _truncation() Returns the raw JSON value of truncation. Unlike truncation, this method doesn't throw if the JSON field has an unexpected type. 
 - 
                                        _additionalPropertiesfinal Map<String, JsonValue> _additionalProperties() 
 - 
                                        toBuilderfinal RealtimeSessionCreateRequest.Builder toBuilder() 
 - 
                                        validatefinal RealtimeSessionCreateRequest validate() 
 - 
                                        builderfinal static RealtimeSessionCreateRequest.Builder builder() Returns a mutable builder for constructing an instance of RealtimeSessionCreateRequest. 
 
- 
                                        
 
- 
                                
                            
                                
 
- 
                    
                    
                    
 
-