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
Theme

Hang up call

client.Realtime.Calls.Hangup(ctx, callID) error
POST
/realtime/calls/{call_id}/hangup

End an active Realtime API call, whether it was initiated over SIP or WebRTC.

Hang up call

package main

import (
  "context"

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

func main() {
  client := openai.NewClient(
    option.WithAPIKey("My API Key"),
  )
  err := client.Realtime.Calls.Hangup(context.TODO(), "call_id")
  if err != nil {
    panic(err.Error())
  }
}
Parameters
callID string
Returns Examples