Accept call
live.sessions.accept(strsession_id, SessionAcceptParams**kwargs)
POST/live/sessions/{session_id}/accept
Accept an incoming SIP call. Supply session with type live, the model, and startup configuration. Before accepting calls, follow the Live prompting guide to write frontend conversation instructions and a separate backend prompt. SIP media format is negotiated; omit audio.format.
Accept call
import os
from openai import OpenAI
client = OpenAI(
api_key=os.environ.get("OPENAI_API_KEY"), # This is the default and can be omitted
)
client.live.sessions.accept(
session_id="session_id",
session={
"model": "gpt-live-1",
"type": "live",
},
)