Home / Servers / OpenAI API / create_realtime_session
Create session
An MCP tool from the OpenAI API server, hosted on mcp.hjlabs.in.
Create session 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… [POST /realtime/sessions]
Name on the gateway: openai_api__create_realtime_session · may change things.
Parameters
| Name | Type | Description |
|---|---|---|
client_secret required | object | Ephemeral key returned by the API. |
modalities | array | The set of modalities the model can respond with. To disable audio, set this… |
instructions | string | The default system instructions (i.e. system message) prepended to model… |
voice | object | The voice the model uses to respond. Supported built-in voices are alloy, ash… |
input_audio_format | string | The format of input audio. Options are pcm16, g711_ulaw, or g711_alaw. |
output_audio_format | string | The format of output audio. Options are pcm16, g711_ulaw, or g711_alaw. |
input_audio_transcription | object | Configuration for input audio transcription, defaults to off and can be set to… |
speed | number | The speed of the model's spoken response. 1.0 is the default speed. 0.25 is… |
tracing | object | Configuration options for tracing. Set to null to disable tracing. Once… |
turn_detection | object | Configuration for turn detection. Can be set to null to turn off. Server VAD… |
tools | array | Tools (functions) available to the model. |
tool_choice | string | How the model chooses tools. Options are auto, none, required, or specify a… |
temperature | number | Sampling temperature for the model, limited to [0.6, 1.2]. Defaults to 0.8. |
max_response_output_tokens | integer | Maximum number of output tokens for a single assistant response, inclusive of… |
truncation | object | When the number of tokens in a conversation exceeds the model's input token… |
prompt | object | Reference to a prompt template and its variables. Learn more. |
How to call it
Through the Smart Gateway, any client can run it by name with call_tool, or let the gateway find it with search_tools:
{
"name": "openai_api__create_realtime_session",
"arguments": {
"client_secret": "…"
}
}Or connect the OpenAI API server directly, which lists 371 tools including this one:
claude mcp add --transport http hj-openai-api https://mcp.hjlabs.in/mcp/openai-api \
--header "Authorization: Bearer YOUR_API_KEY"Try asking
Use the create session tool with client_secret set to ….