=encoding utf8

=head1 NAME

OpenAPI::Client::OpenAI::Path::realtime-calls-call_id-accept - Documentation for the /realtime/calls/{call_id}/accept path.

=head1 OPERATIONS

=head2 POST /realtime/calls/{call_id}/accept

=head3 accept-realtime-call

  $client->accept_realtime_call({
      body => { ... },
  });

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

=head4 Path/query parameters

=over

=item * C<call_id> (in path, required, string) - The identifier for the call provided in the
L<C<realtime.call.incoming>|https://platform.openai.com/docs/api-reference/webhook-events/realtime/call/incoming>
webhook.

=back

=head4 Responses

B<200 - Call accepted successfully.>

=head1 SCHEMAS

=head2 AudioTranscription

Properties:

=over

=item * C<delay> (string) - Controls how long the model waits before emitting transcription text. Higher
values can improve transcription accuracy at the cost of latency. Only
supported with C<gpt-realtime-whisper> in GA Realtime sessions.

Allowed values: minimal, low, medium, high, xhigh

=item * C<language> (string) - The language of the input audio. Supplying the input language in
L<ISO-639-1|https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes> (e.g. C<en>
) format will improve accuracy and latency.

=item * C<model> (anyOf) - The model to use for transcription. Current options are C<whisper-1> ,
C<gpt-4o-mini-transcribe> , C<gpt-4o-mini-transcribe-2025-12-15> ,
C<gpt-4o-transcribe> , C<gpt-4o-transcribe-diarize> , and
C<gpt-realtime-whisper> . Use C<gpt-4o-transcribe-diarize> when you need
diarization with speaker labels.

=item * C<prompt> (string) - An optional text to guide the model's style or continue a previous audio
segment. For C<whisper-1> , the
L<prompt is a list of keywords|https://platform.openai.com/docs/guides/speech-to-text#prompting>
. For C<gpt-4o-transcribe> models (excluding C<gpt-4o-transcribe-diarize> ),
the prompt is a free text string, for example "expect words related to
technology". Prompt is not supported with C<gpt-realtime-whisper> in GA
Realtime sessions.

=back

=head2 NoiseReductionType

Type of noise reduction. C<near_field> is for close-talking microphones such
as headphones, C<far_field> is for far-field microphones such as laptop or
conference room microphones.

=head2 Prompt

Reference to a prompt template and its variables.
L<Learn more|https://platform.openai.com/docs/guides/text?api-mode=responses#reusable-prompts>
.

=head2 RealtimeAudioFormats

The PCM audio format. Only a 24kHz sample rate is supported.

=head2 RealtimeReasoning

Properties:

=over

=item * C<effort> (RealtimeReasoningEffort)

See L</RealtimeReasoningEffort> below for shape.

=back

=head2 RealtimeReasoningEffort

Constrains effort on reasoning for reasoning-capable Realtime models such as
C<gpt-realtime-2> .

=head2 RealtimeSessionCreateRequestGA

Properties:

=over

=item * C<audio> (object) - Configuration for input and output audio.

=item * C<include> (array of string) - Additional fields to include in server outputs.

C<item.input_audio_transcription.logprobs> : Include logprobs for input audio
transcription.

=item * C<instructions> (string) - The default system instructions (i.e. system message) prepended to model
calls. This field allows the client to guide the model on desired responses.
The model can be instructed on response content and format, (e.g. "be
extremely succinct", "act friendly", "here are examples of good responses")
and on audio behavior (e.g. "talk quickly", "inject emotion into your voice",
"laugh frequently"). The instructions are not guaranteed to be followed by the
model, but they provide guidance to the model on the desired behavior.

Note that the server sets default instructions which will be used if this
field is not set and are visible in the C<session.created> event at the start
of the session.

=item * C<max_output_tokens> (oneOf) - Maximum number of output tokens for a single assistant response, inclusive of
tool calls. Provide an integer between 1 and 4096 to limit output tokens, or
C<inf> for the maximum available tokens for a given model. Defaults to C<inf>
.

=item * C<model> (anyOf) - The Realtime model used for this session.

=item * C<output_modalities> (array of string) - The set of modalities the model can respond with. It defaults to C<["audio"]>
, indicating that the model will respond with audio plus a transcript.
C<["text"]> can be used to make the model respond with text only. It is not
possible to request both C<text> and C<audio> at the same time.

Default: ["audio"]

=item * C<parallel_tool_calls> (boolean) - Whether the model may call multiple tools in parallel. Only supported by
reasoning Realtime models such as C<gpt-realtime-2> .

=item * C<prompt> (Prompt)

See L</Prompt> below for shape.

=item * C<reasoning> (RealtimeReasoning)

See L</RealtimeReasoning> below for shape.

=item * C<tool_choice> (oneOf) - How the model chooses tools. Provide one of the string modes or force a
specific function/MCP tool.

Default: auto

=item * C<tools> (array of object) - Tools available to the model.

=item * C<tracing> (oneOf) - Realtime API can write session traces to the
L<Traces Dashboard|https://platform.openai.com/logs?api=traces> . Set to null
to disable tracing. Once tracing is enabled for a session, the configuration
cannot be modified.

C<auto> will create a trace for the session with default values for the
workflow name, group id, and metadata.

Default: null

=item * C<truncation> (RealtimeTruncation)

See L</RealtimeTruncation> below for shape.

=item * C<type> (string, required) - The type of session to create. Always C<realtime> for the Realtime API.

Allowed values: realtime

=back

=head2 RealtimeTruncation

When the number of tokens in a conversation exceeds the model's input token
limit, the conversation be truncated, meaning messages (starting from the
oldest) will not be included in the model's context. A 32k context model with
4,096 max output tokens can only include 28,224 tokens in the context before
truncation occurs.

Clients can configure truncation behavior to truncate with a lower max token
limit, which is an effective way to control token usage and cost.

Truncation will reduce the number of cached tokens on the next turn (busting
the cache), since messages are dropped from the beginning of the context.
However, clients can also configure truncation to retain messages up to a
fraction of the maximum context size, which will reduce the need for future
truncations and thus improve the cache rate.

Truncation can be disabled entirely, which means the server will never
truncate but would instead return an error if the conversation exceeds the
model's input token limit.

=head2 RealtimeTurnDetection

Configuration for turn detection, ether Server VAD or Semantic VAD. This can
be set to C<null> to turn off, in which case the client must manually trigger
model response.

Server VAD means that the model will detect the start and end of speech based
on audio volume and respond at the end of user speech.

Semantic VAD is more advanced and uses a turn detection model (in conjunction
with VAD) to semantically estimate whether the user has finished speaking,
then dynamically sets a timeout based on this probability. For example, if
user audio trails off with "uhhm", the model will score a low probability of
turn end and wait longer for the user to continue speaking. This can be useful
for more natural conversations, but may have a higher latency.

For C<gpt-realtime-whisper> transcription sessions, turn detection must be set
to C<null> ; VAD is not supported.

=head2 VoiceIdsOrCustomVoice

A built-in voice name or a custom voice reference.

=head1 SEE ALSO

L<OpenAPI::Client::OpenAI::Path>

=head1 COPYRIGHT AND LICENSE

Copyright (C) 2023-2026 by Nelson Ferraz

This library is free software; you can redistribute it and/or modify
it under the same terms as Perl itself, either Perl version 5.14.0 or,
at your option, any later version of Perl 5 you may have available.

=cut
