create_client_secret
const url = 'https://app.everruns.com/api/v1/sessions/example/voice/client-secret';const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{"instructions":"Always confirm before placing an order.","model":"gpt-realtime","provider_id":"prov_01h…","reasoning_effort":"medium","voice":"alloy"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://app.everruns.com/api/v1/sessions/example/voice/client-secret \ --header 'Content-Type: application/json' \ --data '{ "instructions": "Always confirm before placing an order.", "model": "gpt-realtime", "provider_id": "prov_01h…", "reasoning_effort": "medium", "voice": "alloy" }'Create an ephemeral client secret for the voice channel.
Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters ”Request Body required
Section titled “Request Body required ”Request body for voice client secret.
object
Extra system instructions appended to the realtime session prompt.
Example
Always confirm before placing an order.Provider-side realtime model identifier. When omitted the server picks the agent’s configured default.
Example
gpt-realtimeRealtime provider binding: the prefixed public id of the provider
connection to route this voice connection through (e.g. prov_…). Lets
an org with more than one realtime-capable provider pick which one serves
the connection. When omitted, the server resolves the org’s default (or
single) realtime provider. The bound provider’s driver MUST declare the
realtime service, otherwise the request is rejected with 400.
Example
prov_01h…Reasoning effort hint passed through to the realtime model. One of low, medium, high.
When omitted the server picks the provider’s default.
Example
mediumRealtime voice preset (provider-specific). When omitted the server picks the agent’s configured default.
Example
alloyResponses
Section titled “ Responses ”Realtime client secret created
Response body for voice client secret.
object
Provider-specific ephemeral credential payload the client uses to authenticate the realtime connection.
Timestamp when the client secret expires (RFC 3339). The client must establish the realtime connection before this.
Provider-side model identifier used for the realtime session.
Realtime provider routing this connection (e.g. openai).
Reasoning effort tier for thinking-capable models (none, minimal, low, medium, high).
Realtime voice preset selected for the connection (provider-specific).
Prefixed public identifier of the voice connection. See ID Schema.
Example generated
{ "client_secret": "example", "expires_at": "2026-04-15T12:00:00Z", "model": "example", "provider": "example", "reasoning_effort": "example", "voice": "example", "voice_connection_id": "example"}