Create Realtime Session

Go to Product

Create an ephemeral API token for use in client-side applications with the Realtime API. Can be configured with the same session parameters as the session.update client event.

It responds with a session object, plus a client_secret key which contains a usable ephemeral API token that can be used to authenticate browser clients for the Realtime API.

Returns the created Realtime session object, plus an ephemeral key.

Options

Body
Create an ephemeral API key with the given session configuration.

The JSON request body. Pre-filled with an example which is derived from the schema.

Validate JSON
Checks “Body” against the JSON schema of the API. This happens on demand only, i.e. a failed check does not prevent the node from being executed — ultimately, the API itself decides what it accepts.
Body: Validation
Result of the last “Validate JSON” run, i.e. a confirmation or the list of schema violations. Not saved with the node settings.
Result Format

Specify how the response should be mapped to the table output. The following formats are available:

Structured Table: Returns a parsed table with data split into rows and columns.

  • Id: Unique identifier for the session that looks like sess_1234567890abcdef.
  • Object: The object type. Always realtime.session.
  • Expires At: Expiration timestamp for the session, in seconds since epoch.
  • Include:

    Additional fields to include in server outputs.

    • item.input_audio_transcription.logprobs: Include logprobs for input audio transcription.
  • Model: The Realtime model used for this session.
  • Output Modalities: The set of modalities the model can respond with. To disable audio, set this to ["text"].
  • 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.created event at the start of the session.

  • Audio: Configuration for input and output audio for the session.
  • Tracing:

    Configuration options for tracing. Set to null to disable tracing. Once tracing is enabled for a session, the configuration cannot be modified.

    auto will create a trace for the session with default values for the workflow name, group id, and metadata.

  • Turn Detection: Configuration for turn detection. Can be set to null to turn off. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech.
  • Tools: Tools (functions) available to the model.
  • Tool Choice: How the model chooses tools. Options are auto, none, required, or specify a function.
  • Max Output Tokens: 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 inf for the maximum available tokens for a given model. Defaults to inf.

Raw Response: Returns the raw response in a single row with the following columns:

  • body: Response body
  • status: HTTP status code

Input Ports

Icon
Configuration data.

Output Ports

Icon
Result of the request depending on the selected Result Format.
Icon
Configuration data (this is the same as the input port; it is provided as passthrough for sequentially chaining nodes to declutter your workflow connections).

Popular Predecessors

  • No recommendations found

Popular Successors

  • No recommendations found

Views

This node has no views

Workflows

  • No workflows found

Links

Developers

You want to see the source code for this node? Click the following button and we’ll use our super-powers to find it for you.