Skip to content
For the complete documentation index, see llms.txt. Markdown versions of documentation pages are available by appending .md to the page URL.
Primary navigation

Accept call

client.Realtime.Calls.Accept(ctx, callID, body) error
POST/realtime/calls/{call_id}/accept

Accept an incoming SIP call and configure the realtime session that will handle it.

ParametersExpand Collapse
callID string
body CallAcceptParams

Accept call

package main

import (
  "context"

  "github.com/openai/openai-go"
  "github.com/openai/openai-go/option"
  "github.com/openai/openai-go/realtime"
)

func main() {
  client := openai.NewClient(
    option.WithAPIKey("My API Key"),
  )
  err := client.Realtime.Calls.Accept(
    context.TODO(),
    "call_id",
    realtime.CallAcceptParams{
      RealtimeSessionCreateRequest: realtime.RealtimeSessionCreateRequestParam{

      },
    },
  )
  if err != nil {
    panic(err.Error())
  }
}
Returns Examples