For the complete documentation index, see llms.txt. Markdown versions of documentation pages are available by appending
.mdto the page URL.
Create call
post /realtime/calls
Create a new Realtime API call over WebRTC and receive the SDP answer needed to complete the peer connection.
Example
curl https://api.openai.com/v1/realtime/calls \
-H 'Content-Type: multipart/form-data' \
-H "Authorization: Bearer $OPENAI_API_KEY" \
-F sdp=sdp
Example
curl -X POST https://api.openai.com/v1/realtime/calls \
-H "Authorization: Bearer $OPENAI_API_KEY" \
-F "sdp=<offer.sdp;type=application/sdp" \
-F 'session={"type":"realtime","model":"gpt-realtime"};type=application/json'
Response
v=0
o=- 4227147428 1719357865 IN IP4 127.0.0.1
s=-
c=IN IP4 0.0.0.0
t=0 0
a=group:BUNDLE 0 1
a=msid-semantic:WMS *
a=fingerprint:sha-256 CA:92:52:51:B4:91:3B:34:DD:9C:0B:FB:76:19:7E:3B:F1:21:0F:32:2C:38:01:72:5D:3F:78:C7:5F:8B:C7:36
m=audio 9 UDP/TLS/RTP/SAVPF 111 0 8
a=mid:0
a=ice-ufrag:kZ2qkHXX/u11
a=ice-pwd:uoD16Di5OGx3VbqgA3ymjEQV2kwiOjw6
a=setup:active
a=rtcp-mux
a=rtpmap:111 opus/48000/2
a=candidate:993865896 1 udp 2130706431 4.155.146.196 3478 typ host ufrag kZ2qkHXX/u11
a=candidate:1432411780 1 tcp 1671430143 4.155.146.196 443 typ host tcptype passive ufrag kZ2qkHXX/u11
m=application 9 UDP/DTLS/SCTP webrtc-datachannel
a=mid:1
a=sctp-port:5000