## Accept call

`client.Live.Sessions.Accept(ctx, sessionID, body) error`

**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](/api/docs/guides/live-prompting) to write frontend conversation instructions and a separate backend prompt. SIP media format is negotiated; omit audio.format.

### Parameters

- `sessionID string`

- `body SessionAcceptParams`

  - `Session param.Field[SessionAcceptParamsSession]`

    Model and startup configuration for the Live session that answers the incoming SIP call.

    - `Model string`

      The Live model to use for the accepted call.

      - `string`

      - `type SessionAcceptParamsSessionModel string`

        The Live model. Required in the session configuration for every transport; do not pass it as a URL query parameter.

        - `const SessionAcceptParamsSessionModelGPTLive1 SessionAcceptParamsSessionModel = "gpt-live-1"`

    - `Type Live`

      The session type. Always `live`.

      - `const LiveLive Live = "live"`

    - `Audio SessionAcceptParamsSessionAudio`

      Startup audio output configuration. SIP negotiates the media format; audio.format is only accepted for primary WebSockets. Voice cannot change after startup.

      - `Output SessionAcceptParamsSessionAudioOutput`

        Settings for speech generated by the Live model. Choose the voice before starting the session.

        - `Voice SessionAcceptParamsSessionAudioOutputVoiceUnion`

          The voice used for Live speech, as a built-in voice name or a custom voice object containing its ID. Defaults to `marin` and cannot change after startup.

          - `string`

          - `type BuiltInVoice string`

            A built-in voice available for Live speech.

            - `const BuiltInVoiceAlloy BuiltInVoice = "alloy"`

            - `const BuiltInVoiceAsh BuiltInVoice = "ash"`

            - `const BuiltInVoiceBallad BuiltInVoice = "ballad"`

            - `const BuiltInVoiceBeacon BuiltInVoice = "beacon"`

            - `const BuiltInVoiceBossa BuiltInVoice = "bossa"`

            - `const BuiltInVoiceCedar BuiltInVoice = "cedar"`

            - `const BuiltInVoiceCinder BuiltInVoice = "cinder"`

            - `const BuiltInVoiceCoral BuiltInVoice = "coral"`

            - `const BuiltInVoiceDelta BuiltInVoice = "delta"`

            - `const BuiltInVoiceEcho BuiltInVoice = "echo"`

            - `const BuiltInVoiceGleam BuiltInVoice = "gleam"`

            - `const BuiltInVoiceMarin BuiltInVoice = "marin"`

            - `const BuiltInVoiceMeridian BuiltInVoice = "meridian"`

            - `const BuiltInVoiceQuartz BuiltInVoice = "quartz"`

            - `const BuiltInVoiceRipple BuiltInVoice = "ripple"`

            - `const BuiltInVoiceSage BuiltInVoice = "sage"`

            - `const BuiltInVoiceShimmer BuiltInVoice = "shimmer"`

            - `const BuiltInVoiceStone BuiltInVoice = "stone"`

            - `const BuiltInVoiceTempo BuiltInVoice = "tempo"`

            - `const BuiltInVoiceVerse BuiltInVoice = "verse"`

            - `const BuiltInVoiceVesper BuiltInVoice = "vesper"`

            - `const BuiltInVoiceWillow BuiltInVoice = "willow"`

          - `type CustomVoice struct{…}`

            - `ID string`

    - `Delegation SessionAcceptParamsSessionDelegationUnion`

      Who handles tasks delegated by the Live model. Omitted or null selects your application; use `responses` to let the API manage a Responses backend.

      - `type ClientDelegation struct{…}`

        Delegate tasks to your application. The Live session emits delegation events that your backend handles.

        - `Type Client`

          The delegation owner. Always `client` for tasks handled by your application.

          - `const ClientClient Client = "client"`

      - `type SessionAcceptParamsSessionDelegationResponses struct{…}`

        Delegate tasks to a Responses model managed by the Live session.

        - `Responses ResponsesDelegationConfig`

          Backend model, prompt, and tools used when the Live session delegates a task to Responses.

          - `Model string`

            The model used for server-owned Responses delegations.

          - `Instructions string`

            Instructions for the delegated Responses model, separate from Live instructions. See [backend prompting](/api/docs/guides/live-delegation#start-with-your-existing-backend-prompt).

          - `MaxOutputTokens int64`

            Maximum number of output tokens for each delegated response.

          - `ParallelToolCalls bool`

            Whether the delegated Responses model may request multiple tool calls in a single response.

          - `Reasoning ResponsesDelegationConfigReasoning`

            Reasoning settings passed to each delegated Responses request.

            - `Effort string`

              How much reasoning effort the delegated Responses model should use. Supported values depend on the backend model.

              - `const ResponsesDelegationConfigReasoningEffortNone ResponsesDelegationConfigReasoningEffort = "none"`

              - `const ResponsesDelegationConfigReasoningEffortMinimal ResponsesDelegationConfigReasoningEffort = "minimal"`

              - `const ResponsesDelegationConfigReasoningEffortLow ResponsesDelegationConfigReasoningEffort = "low"`

              - `const ResponsesDelegationConfigReasoningEffortMedium ResponsesDelegationConfigReasoningEffort = "medium"`

              - `const ResponsesDelegationConfigReasoningEffortHigh ResponsesDelegationConfigReasoningEffort = "high"`

              - `const ResponsesDelegationConfigReasoningEffortXhigh ResponsesDelegationConfigReasoningEffort = "xhigh"`

            - `Summary string`

              The reasoning summary to request from the delegated Responses model, when supported.

              - `const ResponsesDelegationConfigReasoningSummaryConcise ResponsesDelegationConfigReasoningSummary = "concise"`

              - `const ResponsesDelegationConfigReasoningSummaryDetailed ResponsesDelegationConfigReasoningSummary = "detailed"`

              - `const ResponsesDelegationConfigReasoningSummaryAuto ResponsesDelegationConfigReasoningSummary = "auto"`

          - `ServiceTier ResponsesDelegationConfigServiceTier`

            Service tier for delegated Responses requests.

            - `const ResponsesDelegationConfigServiceTierAuto ResponsesDelegationConfigServiceTier = "auto"`

            - `const ResponsesDelegationConfigServiceTierDefault ResponsesDelegationConfigServiceTier = "default"`

            - `const ResponsesDelegationConfigServiceTierFastTierTempPilot ResponsesDelegationConfigServiceTier = "fast_tier_temp_pilot"`

            - `const ResponsesDelegationConfigServiceTierFlex ResponsesDelegationConfigServiceTier = "flex"`

            - `const ResponsesDelegationConfigServiceTierPriority ResponsesDelegationConfigServiceTier = "priority"`

            - `const ResponsesDelegationConfigServiceTierUltrafast ResponsesDelegationConfigServiceTier = "ultrafast"`

          - `Text ResponsesDelegationConfigText`

            Text generation settings passed to each delegated Responses request.

            - `Verbosity string`

              The amount of detail in text generated by the Responses backend. This does not configure the Live model’s spoken delivery.

              - `const ResponsesDelegationConfigTextVerbosityLow ResponsesDelegationConfigTextVerbosity = "low"`

              - `const ResponsesDelegationConfigTextVerbosityMedium ResponsesDelegationConfigTextVerbosity = "medium"`

              - `const ResponsesDelegationConfigTextVerbosityHigh ResponsesDelegationConfigTextVerbosity = "high"`

          - `ToolChoice ResponsesDelegationConfigToolChoiceUnion`

            Controls which tool the Responses backend uses when handling a task delegated by the Live model.

            - `string`

              - `const ResponsesDelegationConfigToolChoiceLiveToolChoiceEnumAuto ResponsesDelegationConfigToolChoiceLiveToolChoiceEnum = "auto"`

              - `const ResponsesDelegationConfigToolChoiceLiveToolChoiceEnumNone ResponsesDelegationConfigToolChoiceLiveToolChoiceEnum = "none"`

              - `const ResponsesDelegationConfigToolChoiceLiveToolChoiceEnumRequired ResponsesDelegationConfigToolChoiceLiveToolChoiceEnum = "required"`

            - `ResponsesDelegationConfigToolChoiceLiveFunctionToolChoiceParam`

              - `Name string`

              - `Type Function`

                - `const FunctionFunction Function = "function"`

            - `ResponsesDelegationConfigToolChoiceLiveMcpToolChoiceParam`

              - `Name string`

              - `ServerLabel string`

              - `Type Mcp`

                - `const McpMcp Mcp = "mcp"`

          - `Tools []ResponsesDelegationConfigToolUnion`

            Tools available to the Responses backend while it handles tasks delegated by the Live model.

            - `type FunctionTool struct{…}`

              A function tool available to the Responses backend when the Live model delegates a task.

              - `Name string`

                The name the delegated Responses model uses when calling this function.

              - `Type Function`

                The tool type. Always `function`.

                - `const FunctionFunction Function = "function"`

              - `Description string`

                What the function does and when the delegated Responses model should call it.

              - `Parameters map[string, any]`

                A JSON Schema object describing the arguments accepted by the function.

              - `Strict bool`

                Whether the delegated Responses model must follow the function’s parameter schema exactly.

            - `ResponsesDelegationConfigToolWebSearch`

              - `Type WebSearch`

                The tool type. Always `web_search`.

                - `const WebSearchWebSearch WebSearch = "web_search"`

        - `Type Responses`

          The delegation owner. Always `responses` for tasks handled by the Responses API.

          - `const ResponsesResponses Responses = "responses"`

    - `Input []InitialItemUnion`

      Ordered text-only history supplied before startup. Supports developer, user, and assistant messages with one text part each; at most 128 messages and 8,192 rendered tokens in total.

      - `InitialItemDeveloper`

        - `Content []InitialItemDeveloperContent`

          The message content. Supply exactly one text part for the initial Live conversation history.

          - `Text string`

            The message text to include in the Live session’s initial conversation history.

          - `Type string`

            The text content type. Always `input_text`.

            - `const InitialItemDeveloperContentTypeInputText InitialItemDeveloperContentType = "input_text"`

        - `Role Developer`

          The author of this history message. Always `developer`.

          - `const DeveloperDeveloper Developer = "developer"`

        - `ID string`

          An optional identifier for the supplied history message. Live uses the message’s role and text to initialize the conversation.

        - `Status string`

          The supplied message’s status. Live uses its text as history and does not resume an incomplete message.

          - `const InitialItemDeveloperStatusIncomplete InitialItemDeveloperStatus = "incomplete"`

          - `const InitialItemDeveloperStatusCompleted InitialItemDeveloperStatus = "completed"`

        - `Type string`

          The history item type. Always `message`.

          - `const InitialItemDeveloperTypeMessage InitialItemDeveloperType = "message"`

      - `InitialItemUser`

        - `Content []InitialItemUserContent`

          The message content. Supply exactly one text part for the initial Live conversation history.

          - `Text string`

            The message text to include in the Live session’s initial conversation history.

          - `Type string`

            The text content type. Always `input_text`.

            - `const InitialItemUserContentTypeInputText InitialItemUserContentType = "input_text"`

        - `Role User`

          The author of this history message. Always `user`.

          - `const UserUser User = "user"`

        - `ID string`

          An optional identifier for the supplied history message. Live uses the message’s role and text to initialize the conversation.

        - `Status string`

          The supplied message’s status. Live uses its text as history and does not resume an incomplete message.

          - `const InitialItemUserStatusIncomplete InitialItemUserStatus = "incomplete"`

          - `const InitialItemUserStatusCompleted InitialItemUserStatus = "completed"`

        - `Type string`

          The history item type. Always `message`.

          - `const InitialItemUserTypeMessage InitialItemUserType = "message"`

      - `InitialItemAssistant`

        - `Content []InitialItemAssistantContentUnion`

          The message content. Supply exactly one text part for the initial Live conversation history.

          - `InitialItemAssistantContentText`

            - `Text string`

              The message text to include in the Live session’s initial conversation history.

            - `Type string`

              The text content type. Always `text`.

              - `const InitialItemAssistantContentTextTypeText InitialItemAssistantContentTextType = "text"`

          - `InitialItemAssistantContentOutputText`

            - `Text string`

              The message text to include in the Live session’s initial conversation history.

            - `Type OutputText`

              The text content type. Always `output_text`.

              - `const OutputTextOutputText OutputText = "output_text"`

        - `Role Assistant`

          The author of this history message. Always `assistant`.

          - `const AssistantAssistant Assistant = "assistant"`

        - `ID string`

          An optional identifier for the supplied history message. Live uses the message’s role and text to initialize the conversation.

        - `Status string`

          The supplied message’s status. Live uses its text as history and does not resume an incomplete message.

          - `const InitialItemAssistantStatusIncomplete InitialItemAssistantStatus = "incomplete"`

          - `const InitialItemAssistantStatusCompleted InitialItemAssistantStatus = "completed"`

        - `Type string`

          The history item type. Always `message`.

          - `const InitialItemAssistantTypeMessage InitialItemAssistantType = "message"`

    - `Instructions string`

      Frontend instructions for voice, conversation, interruptions, and when to delegate. Start with the [Live prompting guide](/api/docs/guides/live-prompting); put business rules and tool workflows in a separate [backend prompt](/api/docs/guides/live-delegation#start-with-your-existing-backend-prompt). Limited to 16,384 client-supplied tokens. Omitted or blank instructions use server defaults. Immutable after startup.

    - `Store bool`

      Whether to store the session for later forking and recording download. Defaults to false for new sessions.

### Example

```go
package main

import (
  "context"

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

func main() {
  client := openai.NewClient(
    option.WithAPIKey("My API Key"),
  )
  err := client.Live.Sessions.Accept(
    context.TODO(),
    "session_id",
    live.SessionAcceptParams{
      Session: live.SessionAcceptParamsSession{
        Model: "gpt-live-1",
        Type: live.LiveLive,
      },
    },
  )
  if err != nil {
    panic(err.Error())
  }
}
```
