> This page is for APIs.

> Fetch clean Markdown by appending `.md` to any page URL under https://signalwire.com/docs or requesting it with the HTTP header `Accept: text/markdown`. The root index at https://signalwire.com/docs/llms.txt lists the available documentation indexes.

# calling.ai_adjust

GET /

Adjust a running AI agent's settings

Reference: https://signalwire.com/docs/apis/relay/server/calling/calling-ai-adjust

## AsyncAPI Specification

```yaml
asyncapi: 2.6.0
info:
  title: calling.ai_adjust
  version: subpackage_callingAiAdjust.calling.ai_adjust
  description: Adjust a running AI agent's settings
channels:
  /:
    description: Adjust a running AI agent's settings
    publish:
      operationId: subpackage_callingAiAdjust.calling.ai_adjust-publish
      summary: calling.ai_adjust response
      message:
        name: onCallingAiAdjustResponse
        title: calling.ai_adjust response
        payload:
          $ref: '#/components/schemas/calling.ai_adjust_callingAiAdjustResponse'
    subscribe:
      operationId: subpackage_callingAiAdjust.calling.ai_adjust-subscribe
      summary: calling.ai_adjust
      message:
        name: callingAiAdjust
        title: calling.ai_adjust
        payload:
          $ref: '#/components/schemas/calling.ai_adjust_callingAiAdjustRequest'
servers:
  production:
    url: wss://relay.signalwire.com/
    protocol: wss
    x-default: true
components:
  schemas:
    ChannelsCallingAiAdjustMessagesCallingAiAdjustResponseJsonrpc:
      type: string
      enum:
        - '2.0'
      description: JSON-RPC version. Always `2.0`.
      title: ChannelsCallingAiAdjustMessagesCallingAiAdjustResponseJsonrpc
    Calling.AiAdjustResult:
      type: object
      properties:
        code:
          type: string
          description: >-
            Result code as a string. `"200"` means success. Failures use an
            HTTP-style code

            such as `"400"` (bad request), `"403"`, `"404"` (call not found),
            `"405"`, `"409"`

            (conflict, for example another operation is still running), `"410"`
            (call gone),

            or `"500"`. If the call could not be reached in time, `code` is a
            lowercase error

            identifier instead, such as `response_timeout`, `not_available`, or

            `internal_error`.
        message:
          type: string
          description: >-
            Human-readable description of the result. On failure, it explains
            what went wrong. Always check `code`; `message` may be omitted when
            there is nothing extra to report.
        call_id:
          type: string
          description: The call this result is for, echoed from your request.
      required:
        - code
      description: >-
        Confirmation that the settings were applied. `message` is the raw status
        line

        (`"+OK Success\n"`). On failure `code` is `"400"` and `message` names
        the problem,

        e.g. `"-ERR attention_timeout error\n"` for an out-of-range value or

        `"-ERR no recognized settings\n"` when no supported key was sent.
      title: Calling.AiAdjustResult
    JsonRpcErrorCode0:
      type: string
      enum:
        - '-32000'
      title: JsonRpcErrorCode0
    JsonRpcErrorCode1:
      type: string
      enum:
        - '-32001'
      title: JsonRpcErrorCode1
    JsonRpcErrorCode2:
      type: string
      enum:
        - '-32002'
      title: JsonRpcErrorCode2
    JsonRpcErrorCode3:
      type: string
      enum:
        - '-32003'
      title: JsonRpcErrorCode3
    JsonRpcErrorCode4:
      type: string
      enum:
        - '-32004'
      title: JsonRpcErrorCode4
    JsonRpcErrorCode5:
      type: string
      enum:
        - '-32005'
      title: JsonRpcErrorCode5
    JsonRpcErrorCode6:
      type: string
      enum:
        - '-32600'
      title: JsonRpcErrorCode6
    JsonRpcErrorCode7:
      type: string
      enum:
        - '-32601'
      title: JsonRpcErrorCode7
    JsonRpcErrorCode8:
      type: string
      enum:
        - '-32602'
      title: JsonRpcErrorCode8
    JsonRpcErrorCode9:
      type: string
      enum:
        - '-32603'
      title: JsonRpcErrorCode9
    JsonRpcErrorCode10:
      type: string
      enum:
        - '-32700'
      title: JsonRpcErrorCode10
    JsonRpcErrorCode:
      oneOf:
        - $ref: '#/components/schemas/JsonRpcErrorCode0'
        - $ref: '#/components/schemas/JsonRpcErrorCode1'
        - $ref: '#/components/schemas/JsonRpcErrorCode2'
        - $ref: '#/components/schemas/JsonRpcErrorCode3'
        - $ref: '#/components/schemas/JsonRpcErrorCode4'
        - $ref: '#/components/schemas/JsonRpcErrorCode5'
        - $ref: '#/components/schemas/JsonRpcErrorCode6'
        - $ref: '#/components/schemas/JsonRpcErrorCode7'
        - $ref: '#/components/schemas/JsonRpcErrorCode8'
        - $ref: '#/components/schemas/JsonRpcErrorCode9'
        - $ref: '#/components/schemas/JsonRpcErrorCode10'
      title: JsonRpcErrorCode
    JsonRpcError:
      type: object
      properties:
        code:
          $ref: '#/components/schemas/JsonRpcErrorCode'
          description: >-
            The error code — a negative integer identifying the failure. See
            `JsonRpcErrorCode` for the full list of values and meanings.
        message:
          type: string
          description: A human-readable description of what went wrong.
        original_request:
          type: object
          additionalProperties:
            description: Any type
          description: >-
            An echo of the request that failed — the full JSON-RPC frame you
            sent

            (`jsonrpc`, `id`, `method`, `params`). Always present.
        requester_nodeid:
          type: string
          description: >-
            The node that sent the failed request. Present only on some routing
            errors.
        requester_identity:
          type: string
          description: >-
            The identity of the requester. Present only on some routing errors;
            same value as `requester_nodeid`.
        responder_nodeid:
          type: string
          description: >-
            The node that was handling the request. Present only on some routing
            errors.
        responder_identity:
          type: string
          description: >-
            The identity of the responder. Present only on some routing errors;
            same value as `responder_nodeid`.
        last_hop_timeout:
          type: boolean
          description: >-
            `true` when the request timed out on its final hop inside
            SignalWire. Present only on some timeout errors.
      required:
        - code
        - message
        - original_request
      description: >-
        A JSON-RPC 2.0 error object, delivered on the `error` field of a
        `JsonRpcResponse` when

        a request fails at the protocol level (bad version, authentication,
        scope, params, or

        your project's connection limit). It replaces `result` — a frame carries
        one or the other, never both.
      title: JsonRpcError
    calling.ai_adjust_callingAiAdjustResponse:
      type: object
      properties:
        jsonrpc:
          $ref: >-
            #/components/schemas/ChannelsCallingAiAdjustMessagesCallingAiAdjustResponseJsonrpc
          description: JSON-RPC version. Always `2.0`.
        id:
          type: string
          description: The id of the request this responds to.
        result:
          $ref: '#/components/schemas/Calling.AiAdjustResult'
          description: The method result. Present when the request succeeded.
        error:
          $ref: '#/components/schemas/JsonRpcError'
          description: >-
            Present instead of `result` when the request failed at the protocol
            level.
      required:
        - jsonrpc
        - id
      description: >-
        A JSON-RPC response frame correlated to a request by `id`. On success
        the frame carries

        `result` (the method result). If the request fails at the protocol level
        — an

        incompatible version, failed authentication, insufficient scope, invalid
        params, or your

        project's connection limit — the frame carries `error` instead of
        `result`. Many

        method-level failures (for example most Calling failures) are reported
        the other way: a

        normal `result` whose own `code` is not `"200"`. Each method documents
        which form its

        failures take.


        An `error` returned for `signalwire.connect` is followed by the service
        closing the

        WebSocket; open a new connection to try again. The same happens when

        `signalwire.reauthenticate` sends credentials that are rejected, except
        for a

        Subscriber Access Token. Errors on any other request leave the
        connection open.
      title: calling.ai_adjust_callingAiAdjustResponse
    ChannelsCallingAiAdjustMessagesCallingAiAdjustRequestJsonrpc:
      type: string
      enum:
        - '2.0'
      description: JSON-RPC version. Always `2.0`.
      title: ChannelsCallingAiAdjustMessagesCallingAiAdjustRequestJsonrpc
    ChannelsCallingAiAdjustMessagesCallingAiAdjustRequestMethod:
      type: string
      enum:
        - calling.ai_adjust
      description: The name of the JSON-RPC method being invoked.
      title: ChannelsCallingAiAdjustMessagesCallingAiAdjustRequestMethod
    CallingAiAdjustSettingsAttentionTimeout:
      oneOf:
        - type: integer
        - type: string
      description: >-
        Milliseconds to wait before prompting the caller to respond:
        `1000`–`600000`, or

        `0` to disable. If it ends up below `end_of_speech_timeout`, it is
        raised to

        `end_of_speech_timeout` + 1000.
      title: CallingAiAdjustSettingsAttentionTimeout
    CallingAiAdjustSettingsOutboundAttentionTimeout:
      oneOf:
        - type: integer
        - type: string
      description: >-
        Milliseconds the outbound call recipient has to respond before timeout:
        `10000`–`600000`.
      title: CallingAiAdjustSettingsOutboundAttentionTimeout
    CallingAiAdjustSettingsEndOfSpeechTimeout:
      oneOf:
        - type: integer
        - type: string
      description: >-
        Milliseconds of silence at the end of an utterance that marks end of
        speech: `0`–`10000`.
      title: CallingAiAdjustSettingsEndOfSpeechTimeout
    CallingAiAdjustSettingsSpeechEventTimeout:
      oneOf:
        - type: integer
        - type: string
      description: 'Milliseconds to wait for a speech event: `0`–`10000`.'
      title: CallingAiAdjustSettingsSpeechEventTimeout
    CallingAiAdjustSettingsFirstWordTimeout:
      oneOf:
        - type: integer
        - type: string
      description: >-
        Milliseconds to wait for the first word after speech is detected:
        `0`–`10000`.
      title: CallingAiAdjustSettingsFirstWordTimeout
    CallingAiAdjustSettingsInactivityTimeout:
      oneOf:
        - type: integer
        - type: string
      description: >-
        Milliseconds of inactivity before the agent exits: `10000`–`3600000`, or
        `0` to disable.
      title: CallingAiAdjustSettingsInactivityTimeout
    Calling.AiAdjustSettings:
      type: object
      properties:
        attention_timeout:
          $ref: '#/components/schemas/CallingAiAdjustSettingsAttentionTimeout'
          description: >-
            Milliseconds to wait before prompting the caller to respond:
            `1000`–`600000`, or

            `0` to disable. If it ends up below `end_of_speech_timeout`, it is
            raised to

            `end_of_speech_timeout` + 1000.
        outbound_attention_timeout:
          $ref: '#/components/schemas/CallingAiAdjustSettingsOutboundAttentionTimeout'
          description: >-
            Milliseconds the outbound call recipient has to respond before
            timeout: `10000`–`600000`.
        end_of_speech_timeout:
          $ref: '#/components/schemas/CallingAiAdjustSettingsEndOfSpeechTimeout'
          description: >-
            Milliseconds of silence at the end of an utterance that marks end of
            speech: `0`–`10000`.
        speech_event_timeout:
          $ref: '#/components/schemas/CallingAiAdjustSettingsSpeechEventTimeout'
          description: 'Milliseconds to wait for a speech event: `0`–`10000`.'
        first_word_timeout:
          $ref: '#/components/schemas/CallingAiAdjustSettingsFirstWordTimeout'
          description: >-
            Milliseconds to wait for the first word after speech is detected:
            `0`–`10000`.
        inactivity_timeout:
          $ref: '#/components/schemas/CallingAiAdjustSettingsInactivityTimeout'
          description: >-
            Milliseconds of inactivity before the agent exits:
            `10000`–`3600000`, or `0` to disable.
      description: >-
        The AI settings to change. Each key is the same setting as in the `ai`
        method's

        `params`, with the same range. Send at least one supported key; unknown
        keys are

        ignored, but a request with no supported key is rejected. Values may be
        integers

        or integer strings.
      title: Calling.AiAdjustSettings
    Calling.AiAdjustParams:
      type: object
      properties:
        node_id:
          type: string
          description: >-
            Opaque identifier that, paired with `call_id`, addresses this call.
            Echo back the value you received; treat it as opaque.
        call_id:
          type: string
          description: Unique identifier of the call.
        settings:
          $ref: '#/components/schemas/Calling.AiAdjustSettings'
          description: The settings to change. Must be a non-empty object.
      required:
        - node_id
        - call_id
        - settings
      title: Calling.AiAdjustParams
    calling.ai_adjust_callingAiAdjustRequest:
      type: object
      properties:
        jsonrpc:
          $ref: >-
            #/components/schemas/ChannelsCallingAiAdjustMessagesCallingAiAdjustRequestJsonrpc
          description: JSON-RPC version. Always `2.0`.
        id:
          type: string
          description: Request id, echoed on the correlated response.
        method:
          $ref: >-
            #/components/schemas/ChannelsCallingAiAdjustMessagesCallingAiAdjustRequestMethod
          description: The name of the JSON-RPC method being invoked.
        params:
          $ref: '#/components/schemas/Calling.AiAdjustParams'
          description: The method's input parameters.
      required:
        - jsonrpc
        - id
        - method
        - params
      description: >-
        A JSON-RPC request frame. `Method` is the method name; `Params` is the
        method's input.
      title: calling.ai_adjust_callingAiAdjustRequest

```