OhMyGPT

Start a Realtime WebRTC call

POST
/v1/realtime/calls

Exchanges a WebRTC SDP offer for an OpenAI Realtime SDP answer. Audio and the oai-events data channel then flow between the client and the model; each response is billed as it finishes. Authenticate with an API key or a client secret. Send the offer as multipart/form-data with sdp and session fields, or as application/sdp with the model in the model query parameter. With a client secret, the model and session settings come from the secret.

授权

ApiKeyAuth
headerAuthorization<token>

查询参数

model?string

Model ID used when the session field omits model.

请求主体

body*string

WebRTC SDP offer.

响应主体

The SDP answer. Location is /v1/realtime/calls/{call_id}.

response?stringapplication/sdp
示例请求
curl -X POST 'https://api.ohmygpt.com/v1/realtime/calls'
示例响应
"string"